// JavaScript Document

var delay=10;
var currentChar=1;

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

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