var Ticker = new Object();

Ticker.Init = function() {
	this.Object = document.getElementById("Ticker");
	
	if (this.Object) {
		var width = 0;
		
		try {
			width = parseInt(this.Object.parentNode.offsetWidth);
		} catch(e) {}

		if (width) {
			this.Object.style.width = width+"px";
			this.Object.style.display = "block";
			
			window.clearInterval(this.ID);
			window.setInterval("Ticker.Run();", 20);
		}
	}
}

Ticker.onMouseOver = function() {
	this.Pause = 1;
}

Ticker.onMouseOut = function() {
	this.Pause = 0;
}

Ticker.Run = function() {
	if (this.Object && this.Object.scrollWidth > this.Object.offsetWidth && !this.Pause) {
		this.Object.scrollLeft += 1;

		if (this.Object.offsetWidth+this.Object.scrollLeft >= this.Object.scrollWidth) {
			this.Direction = 0;
			this.Object.innerHTML = this.Object.innerHTML+this.Object.innerHTML;
		}
	}
}

Ticker.ID = window.setInterval("Ticker.Init();", 100);
