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

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

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