var text="content of text here";
var delay=10;
var currentChar=1;
var nbChar=1;
var destination="[not defined]";

function type() {
	if (document.getElementById) {
	    var dest=document.getElementById(destination);
    	if (dest) {
      		dest.innerHTML=text.substr(0, currentChar, nbChar);
      		currentChar = currentChar + nbChar;
      		if (currentChar>text.length) {
		        currentChar=1;
//    		    setTimeout("type()", 5000);
      		} else {
        		setTimeout("type()", delay);
      		}
    	}
  	} else {
		alert ("Sorry: your browser doesn't support this function !");
	}
}
function startTyping(textParam, delayParam, destinationParam, nbParam)
{
  text=textParam;
  delay=delayParam;
  currentChar=1;
  nbChar = nbParam;
  destination=destinationParam;
  type();
}
