function scrollText(id,objWidth,objHeight,objectRows,scrollSpeed,delaySeconds,director){
	
	var obj=document.getElementById(id);
	obj.ss=false; 
	obj.objectRows=objectRows;
	obj.objWidth=objWidth; 
	obj.objHeight=objHeight; 
	obj.scrollSpeed=scrollSpeed; 
	obj.delaySeconds=delaySeconds;
	obj.pt=0; 
	obj.st=0; 
	obj.director=director; 

	with(obj){
		style.width=objWidth+"px";
		style.height=objHeight+"px";
		noWrap=false;
		onmouseover=stopm;
		onmouseout=startm;
		scrollTop=0+"px";
		scrollLeft=0+"px";
	}
	
	if(obj.objectRows!=1){
		switch(obj.director){
			case("up"):
				obj.tt=objHeight*objectRows;
				obj.ct=objHeight; //current top
				obj.innerHTML+=obj.innerHTML;
				setInterval(scrollUp,obj.scrollSpeed); break;
			default://("left"):
				obj.tt=objWidth*objectRows;
				obj.ct=objWidth;
				obj.innerHTML='<div style="width:'+(obj.tt*2)+'px;"><div style="float:left;">'+obj.innerHTML+'</div><div style="float:right;">'+obj.innerHTML+'</div></div>';
				document.write('<style type="text/css">#'+id+' table{width:'+objWidth*objectRows+'px;} #'+id+' td{width:'+objWidth+'px;}</style>');
				setInterval(scrollLeft,obj.scrollSpeed); break;
		}
	}

	function scrollUp(){
		if(obj.ss==true) return;
		obj.ct+=1;
		if(obj.ct==obj.objHeight+1){
			obj.st+=1; obj.ct-=1;
			if(obj.st==obj.delaySeconds){obj.ct=0; obj.st=0;}
		}else {
			obj.pt=(++obj.scrollTop);
			if(obj.pt==obj.tt){obj.scrollTop=0;}
		}
	}

	function scrollLeft(){
		if(obj.ss==true) return;
		obj.ct+=1;
		if(obj.ct==obj.objWidth+1){
			obj.st+=1; obj.ct-=1;
			if(obj.st==obj.delaySeconds){obj.ct=0; obj.st=0;}
		}else {
			obj.pt=(++obj.scrollLeft);
			if(obj.pt==obj.tt){obj.scrollLeft=0;}
		}
	}

	function stopm(){obj.ss=true;}
	function startm(){obj.ss=false;}
}

