//class Ticker
function Ticker(q_div){
this.myContainer=q_div;
this.myLoop=false;
this.myVisibility=q_div.style.visibility;
}//end function

Ticker.prototype.paint=function paint(content){
if(content==""){
	this.stop();
	this.myContainer.innerHTML="";
	this.myContainer.style.visibility=this.myVisibility;
}else{
	if(this.myContainer.innerHTML==""){
		this.myContainer.innerHTML="<span id='"+this.myContainer.id+"text' style='position:absolute;left:0px;top:0px;white-space:nowrap;' >"+content+"<\/span>";
		this.myText=document.getElementById(this.myContainer.id+"text");
		this.myText.style.left=this.myContainer.offsetWidth+20;
		this.myContainer.style.visibility="visible";
		this.start();
	}else{
		this.add(content);
//		this.myText.innerHTML=content;
//		this.myText.style.left=this.myContainer.offsetWidth+20;
	}//end if
	}//end if
}//end function

Ticker.prototype.add=function add(content){
this.myText.innerHTML=this.myText.innerHTML+"&nbsp;&nbsp;&nbsp;"+content;
}//end function
 
var q_Ticker=new Array();
function q_Tickerscroll(q_tickerid){
q_Ticker[q_tickerid].scroll(q_tickerid);
}//end function
 
Ticker.prototype.start=function (){
//q_Ticker[q_Ticker.length]=this;
if(q_Ticker[0]){
}else{
	q_Ticker[0]=this;
	this.timerID=setInterval("q_Tickerscroll("+(q_Ticker.length-1)+")",50);
}//end if
}//end function
 
Ticker.prototype.stop=function (){
	clearInterval(this.timerID);
	q_Ticker[0]=null;
}//end function
 
Ticker.prototype.scroll=function scrollticker(q_tickerid){
//var	mq = document.getElementById("mq"); 
	if(parseInt(this.myText.style.left)>(-10 - this.myText.offsetWidth)){
		this.myText.style.left=parseInt(this.myText.style.left)-3+"px";
	}else if(this.myLoop){
		this.myText.style.left=this.myContainer.offsetWidth+20;	
	}else{
		this.stop();
		this.myContainer.innerHTML="";
		this.myContainer.style.visibility=this.myVisibility;
	}//end if
}//end function


                  