var o = new Array();

function Scroller(e) 
{
	
	speed = 75;
	this.oIndex = o.push(this)-1;
	if (document.getElementById(e)) {
		this.el = document.getElementById(e);
		this.speed = speed;
		
		this.outer = document.createElement("DIV");
		this.outer.style.position = "relative";
		this.outer.style.height = "115px";
		this.outer.style.overflow = "hidden";
		
		this.inner = document.createElement("DIV");
		this.inner.id = e + "_inner";
		this.inner.style.position = "absolute";
		this.inner.style.top = "115px";
		this.inner.style.left = "5px"

		this.inner.onmouseover = function () {

}
//		this.inner.onmouseout = start();
		this.inner.innerHTML = this.el.innerHTML;
		this.el.innerHTML = "";
		
		this.outer.appendChild(this.inner);
		this.el.appendChild(this.outer);
		
		this.stopPoints = this.inner.getElementsByTagName("LI");
		this.offPage = this.inner.offsetTop-this.inner.offsetHeight-115;
		this.timer = setTimeout("o["+this.oIndex+"].start()",speed);
	}
}


Scroller.prototype.start = function ()
{
	this.inner.style.top = (this.inner.offsetTop - 1) + 'px';

	for (i=0;i<this.stopPoints.length;i++) {
		if (this.inner.offsetTop == -this.stopPoints[i].offsetTop) {
			this.timer = setTimeout("o["+this.oIndex+"].start();", 0);
			return true;
		}
	}

	if((parseFloat(this.inner.offsetTop))<=this.offPage)
	{
		this.inner.style.top=parseFloat(this.outer.offsetHeight) + "px";
	}
	this.timer = setTimeout("o["+this.oIndex+"].start()",this.speed);
}

Scroller.prototype.pause = function () {
	clearTimeout(this.timer);
}



