var iSpeed=15;
var bLoop;
var oTimer;
function objScroll(oDiv,sOwner){ 
	sOwner=(!sOwner) ? '':'document.'+sOwner+'.'
	this.el=objClient.dom?document.getElementById(oDiv):objClient.ie4?document.all[oDiv]:objClient.ns4?eval(sOwner+'document.'+oDiv):0;
	this.css=objClient.dom?document.getElementById(oDiv).style:objClient.ie4?document.all[oDiv].style:objClient.ns4?eval(sOwner+'document.'+oDiv):0;
	this.scrollHeight=objClient.ns4?this.css.document.height:this.el.offsetHeight
	this.clipHeight=objClient.ns4?this.css.clip.height:this.el.offsetHeight
	this.up=scrollUp;
	this.down=scrollDown;
	this.scrollDiv=scrollDiv; 
	this.x; 
	this.y;
	this.obj = oDiv + "Object";
	eval(this.obj + "=this");
	this.firstime=true;
	this.css.visibility="visible";
	this.scrollDiv(0,0);
	this.factor=this.scrollHeight-oViewer.clipHeight;
	return this;
}
function scrollDiv(iX,iY){ 
	if(!firsttime) {  
		if (iY<(-this.scrollHeight+oViewer.clipHeight)){ iY=-this.scrollHeight+oViewer.clipHeight }			
	}
	if (iY>0){iY=0;}
	this.x=iX; 
	this.y=iY;
	this.css.left=this.x;
	this.css.top=this.y
}
function startScroll(iY){
		if(loaded){
			bLoop=true;
			if(iY>0) oScroll.down(iY)
			else oScroll.up(iY)
		}
}
function scrollUp(iY){
	if(this.y<0){
		this.scrollDiv(0,this.y-iY)
		if(bLoop){ setTimeout(this.obj+".up("+iY+")",iSpeed)}
	}
}
function scrollDown(iY){ 
	if(this.y>-this.scrollHeight+oViewer.clipHeight){
		this.scrollDiv(0,this.y-iY)
		if(bLoop){ setTimeout(this.obj+".down("+iY+")",iSpeed)}
	}	
}
function endScroll(){
		bLoop=false
		if(oTimer) clearTimeout(oTimer)
}