// JavaScript Document

//Function for Jump Menu 
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

//Homepage Funcitons 
function s2BtnOver(obj, txt) {
	obj.style.backgroundColor = "#B4B4B4";
	obj.innerHTML = "<h1>" + txt + "</h1>";
}
function s2BtnOut(obj) {
	obj.style.backgroundColor = "";
		obj.innerHTML = "<h1>&nbsp;</h1>";
}


//TYPEWRITER SCRIPT
function type()
{
  if (document.getElementById)
  {
    var dest=document.getElementById(destination);
    if (dest)
    {
      dest.innerHTML=text.substr(0, currentChar);
      currentChar++
      if (currentChar>text.length)
      {
        currentChar=1;
        setTimeout("type()", 5000);
      }
      else
      {
        setTimeout("type()", delay);
      }
    }
  }
}

function startTyping(textParam, delayParam, destinationParam)
{
  text=textParam;
  delay=delayParam;
  currentChar=1;
  destination=destinationParam;
  type();
}
