var id;
var width;
var height;
var content;
var rtl;
var delay;
var	bgcolor;
var	forcolor;
var	supported=false;
var	from=0;
var	tickID=null;
function NewsTicker(m_id,m_width,m_height,m_delay,m_rtl,m_content,m_bgcolor,m_forcolor){
	id=m_id;
	width=m_width;
	height=m_height;
	content=m_content;
	rtl=m_rtl;
	delay=m_delay;
	bgcolor=m_bgcolor;
	forcolor=m_forcolor;
	if(document.getElementById){
		output='<div dir="ltr" id="'+id+'" style="position:relative;overflow:hidden;width:'+width+';height:'+height+'; background-color:'+bgcolor+';color:'+forcolor+'"><span id="'+id+'_content" onmouseover="pause()" onmouseout="tick()" style="position:relative;"><nobr>'+content+'</nobr></span></div>'
		document.write(output);
		supported=true;
		if(supported){
			from=(rtl) ? 0 : width;
			document.getElementById(id+"_content").style.left=0 ;
			tick();			
		}
	}
}
function pause(){
    clearTimeout(tickID);
	tickID=null;
}
function tick(){
	if(rtl){
		if(from < width){
			from+=delay * 1;
		}
		else{
			from=0;
		}
	}
	else{
		if(from >-document.getElementById(id+"_content").offsetWidth){
			from+=delay * -1;
		}
		else{	
			from=width;
		}
	}
	document.getElementById(id+"_content").style.left = from;
	tickID=setTimeout('tick()', 20);
}
