function verifyCompatibleBrowser2(){

    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 verifyCompatibleBrowser2()
var speed=80
var loop, timer
 
function ConstructObject2(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.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight
    this.up=MoveAreaUp2;this.down=MoveAreaDown2;

    this.scrollWidth=bw.ns4?this.css.document.width:this.el.offsetWidth
    this.clipWidth=bw.ns4?this.css.clip.width:this.el.offsetWidth
    this.left=MoveAreaLeft2;this.right=MoveAreaRight2;
	
    this.MoveArea2=MoveArea2; this.x=0; this.y=0;
    this.obj = obj + "Object"
    eval(this.obj + "=this")
    return this
}

function MoveArea2(x,y){

    this.x=x;this.y=y
    this.css.left=this.x+"px" 
    this.css.top=this.y+"px" 
}
 
function MoveAreaDown2(move){

	if(this.y>-this.scrollHeight+objContainer2.clipHeight){
    
		this.MoveArea2(this.x,this.y-move)
		
			if(loop) setTimeout(this.obj+".down("+move+")",speed)
   }
}

function MoveAreaUp2(move){

	if(this.y<0){
	
		this.MoveArea2(this.x,this.y-move)
   
   		if(loop) setTimeout(this.obj+".up("+move+")",speed)
   }
}

function MoveAreaRight2(move){

	if(-this.x + objContainer2.clipWidth < this.scrollWidth){
	
		this.MoveArea2(this.x-move,this.y)
		if(loop) setTimeout(this.obj+".right("+move+")",speed)
   }
   
   window.status = "right no action " + this.Ax;
}

function MoveAreaLeft2(move){

	if(this.x<0){
	
		this.MoveArea2(this.x-move,this.y)
		if(loop) setTimeout(this.obj+".left("+move+")",speed)
   }
   
   window.status = "left no action " + this.x;
}
 
function PerformScroll2(direction,speed){

	if(initialised){

		loop=true;
		// Wenn 0 dann -> Horizontal // Wenn 1 dann -> Vertikal
		if(direction == 1) {
		
	        if(speed>0) objScroller2.down(speed)
            else objScroller2.up(speed)
	  	}
	  	else {
			
			if(speed>0) objScroller2.right(speed)
            else objScroller2.left(speed)
	  }
   }
}
 
function CeaseScroll2(){

    loop=false
    if(timer) clearTimeout(timer)
}

var initialised;

function InitialiseScrollableArea2(){

    objContainer2=new ConstructObject2('divContainerX')
    objScroller2=new ConstructObject2('divContentX','divContainerX')
    objScroller2.MoveArea2(0,0)
    objContainer2.css.visibility='visible'
    initialised=true;
}