function checkBrowser(){
	if (document.layers) {
		ns4=true;
		ie=false;
		ns6=false;
	}	
	else if (document.all) {
		ns4=false;
		ie=true;
		ns6=false;
	}
	else {
		ns4=false;
		ie=false;
		ns6=true;
	}
}
//If you want it to move faster you can set this lower:
var speed=50
//Sets variables to keep track of what's happening
var loop;
function divObj(obj,nest){
	if (!nest)
		nest="";
	else
		nest='document.'+nest+".";
    if (ns4)  {
		this.el = eval(nest+'document.'+obj);
		this.css = this.el;
		this.scrollHeight = this.css.document.height;
		//alert(this.scrollHeight);
		this.clipHeight = this.css.clip.height;
	}
	else if (ie) {
		this.el = document.all[obj];
		this.css = document.all[obj].style;
		this.scrollHeight = this.el.offsetHeight;
		//alert(this.scrollHeight);
		this.clipHeight = this.el.offsetHeight;
	}
	else if (ns6) {
		this.el = document.getElementById(obj);
		this.css = document.getElementById(obj).style;
		this.scrollHeight = this.el.offsetHeight;
		this.clipHeight = this.el.offsetHeight;
		//alert(this.scrollHeight);
		if(this.scrollHeight==0) this.scrollHeight=2500;
	}
	this.up = goUp;
	this.down = goDown;	
	this.moveIt=moveIt; 
	this.x; 
	this.y;
   this.obj = obj + "Object";
	eval(this.obj + "=this");
   return this
}
function moveIt(x,y){
	this.x=x;
	this.y=y;
	this.css.left=this.x;
	this.css.top=this.y;
}

//Makes the object go up
function goDown(move){
	//alert((this.scrollHeight-342)+":"+Math.abs(this.y));
	if(Math.abs(this.y)<=(this.scrollHeight-322)){         // '>' wurde zu '<' und '-' zu '+'           
		this.moveIt(0,this.y-move);
		if(loop) {
			setTimeout(this.obj+".down("+move+")",speed);
		}
	}
}
//Makes the object go down
function goUp(move){
	if(this.y<=0){
		this.moveIt(0,this.y-move);
		if(loop) 
			setTimeout(this.obj+".up("+move+")",speed);
	}
}

//Calls the scrolling functions. Also checks whether the page is loaded or not.
function scroll(speed){

	if(loaded){
		loop=true;
		if(speed>0) 
			oScroll.down(speed);
		else 
			oScroll.up(speed);
	}
}

//Stops the scrolling (called on mouseout)
function noScroll(){
	loop=false;
	//if(timer) 
		//clearTimeout(timer);
}
//Makes the object
var loaded;
function scrollInit(){
	oCont=new divObj('divCont');
	oScroll=new divObj('divText','divCont');
	oScroll.moveIt(0,0);
	loaded=true;
}
//Call the init on page load
function getPos(){
//	alert(navigator.appVersion.substr(0,1));
   checkBrowser();
	scrollInit();
	if(ie){
		posmy=document.body.clientHeight;
		posmx=document.body.clientWidth;
	}
	else if (ns4) {
		posmy=window.innerHeight;
		posmx=window.innerWidth;
	}
	else if(ns6){
		posmy=self.innerHeight;
		posmx=self.innerWidth;

	}
	if (posmy/2>462/2)
		posy=((posmy-464)/2)+45;						//hier heißt es +45 statt +40 weil es bei der Bildschirmabmessung wohl unterschiede gibt
	else 
		posy=45;
	if (posmx/2>754/2)
		posx=((posmx-751)/2)+127+16;
	else
		posx=127+16;
	posx=Math.round(posx);
	posy=Math.round(posy);
	oCont.moveIt(posx,posy);
	window.setTimeout("showtext()",50);
}
function showtext() {
	//if(ns6)document.getElementById('divCont').style.visibility='visible';
	//alert(oCont.css);
	oCont.css.visibility='visible';
}
//window.onresize=alert("hier");
