var someText = "! яоежхюкэмне опедкнфемхе - йнлокейямше гюбндш !";	// the text
var aChar;
var aSentence;
var i=0;					// a counter

var colors = new Array("fff884","fd40ff","a7ff40","9cf5ff","ff3333","efff40"); // the colors
var aColor;					// the chosen color

function loadText()
{
	// randomly choose color
	aColor = colors[Math.floor(Math.random()*colors.length)];

	aChar = someText.charAt(i);
	if (i == 0)
		aSentence = aChar;
	else
		aSentence += aChar;	

	// 50 iterations max.
	if (i < 50)	i++;
	
	// For IE
	if (document.all)
	{
	    if(document.all.textDiv!=null)
		{
		    textDiv.innerHTML= "<font color='#"+aColor+"' face='Arial' size='3'>"+aSentence+"</font>";
		    setTimeout("loadText()",250);
		}	
	}
		
	// For Netscape Navigator 4
	else if (document.layers) 
	{
	    if(document.textDiv!=null)
		{
		    document.textDiv.document.write("<font color='#"+aColor+"' face='Arial' size='3'>"+aSentence+"</font>");
		    document.textDiv.document.close();
		    setTimeout("loadText()",250);
		}	
	}
		
	// For other
	else if (document.getElementById)
	{ 
	    if(document.getElementById("textDiv")!=null)
		{
		    document.getElementById("textDiv").innerHTML = "<font color='#"+aColor+"' face='Arial' size='3'>"+aSentence+"</font>";
		    setTimeout("loadText()",250);
		}
	}
}
