function rollerText()
{	
	text=" "+text+" ";
	for(var i=0;i<amount_space;i++)
		text+=space;
	var newtext=text;
	while(newtext.length<width){
		newtext+=text
	}
	//document.write("<div style=\"width:"+width+"px;overflow:hidden;font:"+font_style+" "+font_size+"px Arial;color:"+font_color+";background-color:"+br_background+";border:solid "+br_width+"px "+br_color+";\">");
	document.write("<div id=\"creeping-line\">");
	document.write("<pre id=\"roll_text\" style=\"display:inline;\">"+newtext+"</pre>");
	document.write("</div>");roll();
}

function roll()
{
	var txt;
	var roll_text=document.getElementById("roll_text");
	var bw=navigator.appName;
	var IE='Microsoft Internet Explorer';
	var Opera='Opera';
	(bw==IE||bw==Opera)?txt=roll_text.innerText:txt=roll_text.innerHTML;
	
	if (txt.substring(0,1)=='&'){
		var go=true;
		//спецсимволы заключенные &xxxx; нужно переносить в хвост целиком.
		while(go)
		{
			if(txt.substring(0,1)==';') go=false;
			txt=txt.substring(1,txt.length)+txt.substring(0,1);			
		}
	}else{
		txt=txt.substring(1,txt.length)+txt.substring(0,1);
	}
		
	
	(bw==IE||bw==Opera)?roll_text.innerText=txt:roll_text.innerHTML=txt;
	if(speed==9) setTimeout("roll()",30);
	if(speed==8)setTimeout("roll()",50);
	if(speed==7)setTimeout("roll()",65);
	if(speed==6)setTimeout("roll()",85);
	if(speed==5)setTimeout("roll()",100);
	if(speed==4)setTimeout("roll()",120);
	if(speed==3)setTimeout("roll()",140);
	if(speed==2)setTimeout("roll()",170);
	if(speed==1)setTimeout("roll()",210);
	if(speed==0)	
	{
		clearTimeout("roll()");
		(bw==IE||bw==Opera)?roll_text.innerText=text:roll_text.innerHTML=text;
	}
}

