// begin absolutely positioned autoscroll area object scripts 

/*
Extension developed by David G. Miles (www.z3roadster.net/dreamweaver)
Original Scrollable Area code developed by Thomas Brattli (www.bratta.com)
To add more shock to your site, visit www.DHTML Shock.com
*/

lstart=80;  //120
loop=true;  
speed=40; // 100
pr_step=1;

function ConstructObject(obj,nest){ 
  nest=(!nest) ? '':'document.'+nest+'.' 
	this.el=document.getElementById(obj); 
  this.css=document.getElementById(obj).style; 
	this.scrollHeight=document.getElementById(obj).scrollHeight; 
	this.newsScroll=newsScroll; 
	this.moveIt=b_moveIt; 
	this.x=0; 
	this.y=0; 
  this.obj = obj + "Object" 
  eval(this.obj + "=this") 
  return this 
} 
function b_moveIt(x,y){ 
	this.x=x;this.y=y 
	this.css.left=parseInt(this.x)+"px"; 
	this.css.top=parseInt(this.y)+"px";
} 

//Makes the object scroll up 
function newsScroll(speed){ 
	if(parseInt(this.y)>-parseInt(this.scrollHeight)){ 
		this.moveIt(0,parseInt(this.y)-pr_step) 
		timer=setTimeout(this.obj+".newsScroll("+speed+")",speed);
	} else if(loop) { 
		this.moveIt(0,lstart+"px") 
		eval(this.obj+".newsScroll("+speed+")") 
	  } 
} 

//Makes the object 
function InitialiseAutoScrollArea(){ 
	objContainer=new ConstructObject('div_scroller_container') 
	objContent=new ConstructObject('div_scroller_content') 
	objContent.moveIt(0,lstart+"px") 
	objContainer.css.visibility='visible' 
	objContent.newsScroll(speed) 
} 
function PauseAutoScrollArea(){ 
	clearTimeout(timer); 
} 
function PlayAutoScrollArea(){ 
	objContent.newsScroll(speed) 
} 
// end absolutely positioned scrollable area object scripts 


