// CUFON REPLACER

function isIE()
{
  return /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent);
}


if( isIE()){
	Cufon.replace(['h1','h2','h3','p.date', '#splashtext', 'a.button']);
}else{
	Cufon.replace(['h1','h2','h3','p.date', '#nav ul li a', '#splashtext', 'a.button']);
}


// TEXT RESIZER

// <![CDATA[
var min=8;
var max=18;
function increaseMyFonts(){
	increaseFontSize('p');
	increaseFontSize('ul');
	increaseFontSize('li');
}

function increaseFontSize(passedElement) {
   var p = document.getElementsByTagName(passedElement);
   for(var i=0; i< p.length; i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         s = 12;
      }
      if(s!=max) {
         s += 1;
      }
      p[i].style.fontSize = s+"px"
   }
}

function decreaseMyFonts(){
	decreaseFontSize('p');
	decreaseFontSize('ul');
	decreaseFontSize('li');
}
function decreaseFontSize(passedElement) {
   var p = document.getElementsByTagName(passedElement);
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s -= 1;
      }
      p[i].style.fontSize = s+"px"
   }   
}
// ]]>

// SEARCH FIELD REMOVER

function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
}
