// JavaScript Document
function ScrollerDIV(divId)
{
	this.crossobj=document.getElementById ? document.getElementById(divId) : document.all.content
	this.contentheight=this.crossobj.offsetHeight
	this.moveupvar = 0;
	this.movedownvar = 0;

	this.movedown = function (speed) {
		if (this.moveupvar) clearTimeout(this.moveupvar)
		if (parseInt(this.crossobj.style.top)>=(this.contentheight*(-1)+100))
		this.crossobj.style.top=parseInt(this.crossobj.style.top)-speed+"px"
		var self = this;
		this.movedownvar = setTimeout(function() {self.movedown(speed);}, 20); 
	};
	
	this.moveup = function (speed) {
		if (this.movedownvar) clearTimeout(this.movedownvar)
		if (parseInt(this.crossobj.style.top)<=0)
		this.crossobj.style.top=parseInt(this.crossobj.style.top)+speed+"px"
		var self = this;
		this.moveupvar = setTimeout(function() {self.moveup(speed);}, 20);
	}

	this.stopscroll = function() {
		if (this.moveupvar) clearTimeout(this.moveupvar)
		if (this.movedownvar) clearTimeout(this.movedownvar)
	}

	this.movetop = function() {
		this.stopscroll()
		this.crossobj.style.top=0+"px"
	}

}

