var ns4 = (document.layers)? true:false;var ie4 = (document.all)? true:false;



function Ticker(name,aLayer,aText,speed,width,height,left,top){

	this.name=name;

	this.layer=aLayer;

	this.text=aText;

	this.speed=speed;

	this.width=width;

	this.height=height;

	this.left=left;

	this.top=top;

	this.blnScroll=false;

	this.ant=0;

	this.layer.write(this.text);

	

}

function init(){

	this.layer.moveTo(this.left+this.width,this.top);

	this.layer.setClip(-this.width,0,0,this.height);

}

function start(){

	this.blnScroll=true;

	this.scroll();

}



function scroll(){

	//alert(this.ant++);

	this.layer.moveTo((this.layer.left - this.speed),this.top);

	this.layer.setClip(this.layer.clip.left+this.speed,0,this.layer.clip.left+this.width,this.height)

	if((this.layer.left+this.layer.getDocWidth())<this.left){

		this.init();

	}

	if(this.blnScroll){

		setTimeout(this.name+".scroll()",50);

	}

}

function stop(){

	this.blnScroll=false;

}



Ticker.prototype.start=start;

Ticker.prototype.stop=stop;

Ticker.prototype.scroll=scroll;

Ticker.prototype.init=init;  