function crObj(id) {
	//eigenschaften
	if ( is.nav6up) { 	
		this.el = document.getElementById(id);
		this.img = document.images; 
		this.css = this.el.style;
		this.scrollHeight=this.el.offsetHeight; }
	else if (document.all) 	{ 	
		this.el = document.all[id]; 
		this.img = document.images; 
		this.css = this.el.style;
		this.scrollHeight=this.el.offsetHeight;}
	else if (document.layers) 	{ 	
		this.el = document.layers[id]; 
		this.img = this.el.document.images; 
		this.css = this.el;
		this.scrollHeight=this.css.document.height;
	}
	
	this.sichtbar = true;
    this.zIndex = this.css.zIndex;
  	
 	if(this.el.captureEvents) // Netscape
		this.el.captureEvents(Event.MOUSEDOWN);
	this.el.onmousedown = mdown;
		
	this.id = id;					
  	this.x = (!document.all)? parseInt(this.css.left):this.el.offsetLeft;
   	this.y = (!document.all)? parseInt(this.css.top):this.el.offsetTop;
  
  if (document.layers) {
      		this.breite = this.el.document.width;
     		this.hoehe = this.el.document.height;
   	} else {
      		this.breite = this.el.offsetWidth;
      		this.hoehe = this.el.offsetHeight;
   	}


	//methoden
   	this.zeige = Obj_ein;
  	this.verstecke = Obj_aus;
    this.gehNach = dObj_gehNach;
    this.up=goUp;
    this.down=goDown;
   
}
	
function Obj_ein() {
   	this.css.visibility = (document.layers)? "show":"visible";
   	this.sichtbar = true;
}

function Obj_aus() {
   	this.css.visibility = (document.layers)? "hide":"hidden";
   	this.sichtbar = false;
}

function dObj_gehNach(x,y) {

   this.css.left = x;
   this.css.top = y;
   this.x = x;
   this.y = y;
}

function mdown(e){
   // Wir mssen onmousedown herausfinden, welches div-
   // Element aktiviert wurde. Dazu benutzen wir "this". 
   // Dann zhlen wir den bislang hchsten z-Index Wert eins 
   // nach oben und weisen ihn dem aktiven div zu. Der Rest 
   // ist wie gehabt.
   aktivDiv = this.id;
   //this.zIndex = aktivZindex++;
   drag = "aktiv";
   aktivX = (e) ? e.pageX : event.clientX + document.body.scrollLeft;
   aktivY = (e) ? e.pageY : event.clientY + document.body.scrollTop; 
   //alert(this.id+"\n"+aktivX+" - "+aktivY);
  return false;
   
}

//Makes the object go up
function goDown(move){
	//if (this.y>-this.scrollHeight+divs["inhalt"].clipHeight){
		divs["inhalt"].gehNach( divs["inhalt"].x,  divs["inhalt"].y + move);
		//divs["inhalt"].gehNach(0, divs["inhalt"].y-move)
			if (loop) setTimeout("divs['inhalt']"+".down("+move+")",speed)
	//}
}
//Makes the object go down
function goUp(move){
	//if (this.y<0){
		divs["inhalt"].gehNach( divs["inhalt"].x,  divs["inhalt"].y + move);
		//divs["inhalt"].gehNach(0,this.y-move)
		if (loop) setTimeout("divs['inhalt']"+".up("+move+")",speed)
	//}
}

//Calls the scrolling functions. Also checks whether the page is loaded or not.
function scroll(speed){
	if (scrolltextLoaded){
		loop = true;
		//alert(speed);
		if (speed>0) {divs["inhalt"].up(speed);}
		else {divs["inhalt"].down(speed);}
	}
}

//Stops the scrolling (called on mouseout)
function noScroll(){
	loop = false
	if (timer) clearTimeout(timer)
}
//Makes the object
var scrolltextLoaded = true;

