var lsvisible = 'visible';
var lshidden = 'hidden';
var lslayerRef = '';
var lsstyleRef = '';

if (navigator.appName == "Netscape")
	{
		lsvisible = 'show';
		lshidden = 'hide';
		lslayerRef = '.layers';
		lsstyleRef = '';
	}
else
	{
		lsvisible = 'visible';
		lshidden = 'hidden';
		lslayerRef = '.all';
		lsstyleRef = '.style';
	}

function lsverifyCompatibleBrowser()
	{ 
	    this.ver=navigator.appVersion; 
	    this.dom=document.getElementById?1:0;
	    this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; 
	    this.ie4=(document.all && !this.dom)?1:0;
	    this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	 
	    this.ns4=(document.layers && !this.dom)?1:0; 
	    this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5) 
	    return this; 
	} 
bw=new lsverifyCompatibleBrowser(); 
 

 

 
function lsConstructObject(obj,nest)
	{ 
    nest=(!nest) ? '':'document.'+nest+'.'; 
    this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0; 
    this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0; 
    this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight;
	this.scrollWidth=bw.ns4?this.css.document.width:this.el.offsetWidth; 
    this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight;
	this.clipWidth=bw.ns4?this.css.clip.width:this.el.offsetWidth; 
    this.left=lsMoveAreaLeft;this.right=lsMoveAreaRight; 
    this.down=lsMoveAreaDown;this.up=lsMoveAreaUp; 
	this.lsMoveArea=lsMoveArea; this.x; this.y; 
	this.PerformScroll = lsPerformScroll;
	this.CeaseScroll = lsCeaseScroll;
	this.lsloop; this.lstimer;
	this.lsinitialised;
	this.clippingobj;
	this.hifloop = false;
	this.vifloop = false;
	this.speed = 25;
	this.l2;this.r1;
	this.r2=this.scrollWidth;
    this.obj = obj + "Object"; 
    eval(this.obj + "=this"); 
    return this; 
	} 
function lsMoveArea(x,y)
	{ 
    this.x=x;this.y=y; 
    this.css.left=this.x; 
    this.css.top=this.y; 
	} 
function lsMoveAreaDown(move)
	{ 
	   if(this.vifloop)
		   {
				
				if(this.y< -this.r1)
					{
						this.y = 0;
					}
				
					this.lsMoveArea(this.x,this.y-move); 
					if(this.lsloop) setTimeout(this.obj+".down("+move+")",this.speed);
				
		   } else {
			   if(this.y>-this.scrollHeight+this.clippingobj.clipHeight)
					{ 
					    this.lsMoveArea(this.x,this.y-move); 
					    if(this.lsloop) setTimeout(this.obj+".down("+move+")",this.speed); 
					} 
			
			
			}	
	} 
function lsMoveAreaUp(move)
	{ 
		if(this.vifloop)
		   {
			   if(this.y>0)
				{ 
				   this.y = -this.r1;    
				}			
	      
		        this.lsMoveArea(this.x,this.y-move); 
				if(this.lsloop) setTimeout(this.obj+".up("+move+")",this.speed);
		   
			
			} else {
			   if(this.y<0)
				{ 
				    this.lsMoveArea(this.x,this.y-move); 
				    if(this.lsloop) setTimeout(this.obj+".up("+move+")",this.speed);
				} 
			
			}	
	} 
 
 function lsMoveAreaRight(move)
	{ 
		if(this.hifloop)
		  {
			if(this.x< -this.r1)
				{
					
					this.x = 0;
				}
			
				this.lsMoveArea(this.x-move,this.y);
				if(this.lsloop) setTimeout(this.obj+".right("+move+")",this.speed); 
		  } else {
		    
		    if(this.x > -(this.scrollWidth - this.clippingobj.clipWidth))
				{
				   this.lsMoveArea(this.x-move,this.y);
				   if(this.lsloop) setTimeout(this.obj+".right("+move+")",this.speed);
				}
				
		  }	
	} 
function lsMoveAreaLeft(move)
	{ 
		if(this.hifloop)
		  {
			if(this.x>0)
				{ 
				   this.x = -this.r1;    
				}			
	      
		        this.lsMoveArea(this.x-move,this.y); 
				if(this.lsloop) setTimeout(this.obj+".left("+move+")",this.speed); 
		  } else {
		    if(this.x<0)
				{ 
				  this.lsMoveArea(this.x-move,this.y); 
		          if(this.lsloop) setTimeout(this.obj+".left("+move+")",this.speed);   
				}
				
		  }
		  
		  
		  
		  
		  
	}
 
function lsPerformScroll(hov,lsspeed)
	{ 
		if(this.lsinitialised)
			{ 
				this.lsloop=true; 
				
				switch(hov)
				  {
				    case 'h':
					   if(lsspeed>0)
						   { 
						      this.right(lsspeed); 
						   } else {
						      this.left(lsspeed);
						   }
					break;
					
					case 'v':
					   if(lsspeed<0)
						   { 
						      this.up(lsspeed); 
						   } else {
						      this.down(lsspeed);
						   }
					break;
				  
				  }
			}
		 
	} 
 
function lsCeaseScroll()
	{ 
    this.lsloop=false; 
    if(this.lstimer) clearTimeout(this.lstimer); 
	} 
 



