/////////////////////////////////
/* dhtml-Objekt-Werkzeugkasten */
/////////////////////////////////

function dObj(xpos,ypos,id,sicht) {
   if (document.documentElement) {
      this.el = document.getElementById(id);
      this.css = this.el.style;
      this.img = document.images;
   }
   else if (document.all) {
      this.el = document.all[id];
      this.css = this.el.style;
      this.img = document.images;
   }
   else if (document.layers) {
      this.el = document.layers[id];
      this.css = this.el;
      this.img = this.el.document.images; 
   }
   if (xpos != "") {
      this.x = xpos; 
      this.css.left = xpos;
   }
   else {
      this.x = parseInt(this.css.left);
   }
   if (ypos != "") {
      this.y = ypos; 
      this.css.top = ypos;
   }
   else {
      this.y = parseInt(this.css.top);
   }
   this.zIndex = this.css.zIndex;
   this.sichtbar = sicht;
   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;
   }
    
   this.gehNach = dObj_gehNach;
   this.zeige = dObj_zeige;
   this.verstecke = dObj_verstecke;
   
   // Diese (this) Ebene mit dem Event-Handler vorbereiten,
	// der auf ein mousedown reagiert
	if (this.el.captureEvents) // Netscape 4
	{
		this.el.captureEvents(Event.MOUSEDOWN);
	}
	this.el.onmousedown = mdown;
}

function dObj_gehNach(x,y) {
   this.css.left = x;
   this.css.top = y;
   this.x = x;
   this.y = y;
}

function dObj_zeige() {
   this.css.visibility = "visible";
   this.sichtbar = true;
}

function dObj_verstecke() {
   this.css.visibility = "hidden";
   this.sichtbar = false;
}

function mdown(e){
   	aktivDiv = this.id;
   	drag = "aktiv";
   	if (document.layers)
   	{
   		this.zIndex = aktivZindex++;
  	}
  	else 
  	{
  		this.style.zIndex = aktivZindex++;
	}
	aktivX = (e) ? e.pageX : event.clientX + document.body.scrollLeft;
	aktivY = (e) ? e.pageY : event.clientY + document.body.scrollTop; 
	return false;
}
///////////////////////////////////////
/* Ende dhtml-Objekt-Werkzeugkasten */
//////////////////////////////////////
 function sichtbar(bereich) {
			if(document.getElementById) {
				document.getElementById([bereich]).style.visibility = "visible";
			} else if(document.all) {
				document.all[bereich].style.visibility = "visible";
 			} else {
   				document[bereich].visibility="visible";
   				
   			}
		}
		
function schliessen(bereich) {
 			if(document.getElementById) {
   				document.getElementById([bereich]).style.visibility = "hidden";
   			} else if(document.all) {
   				document.all[bereich].style.visibility = "hidden";
 			} else {
   				document[bereich].visibility="hidden";
   			}
		}
		
////////////////// scroller 1 /////////////////////////////////////////////////
var bewegung    = 0;
var kurzschritt = 5;		// Standard-Schrittchen
var langschritt	= 10;		// Schnell-Schrittchen
var tempo       = 60;		// Timeout
var startpunkt  = 2;		// Abstand der Ebene zum oberen Rand

function init() {
	eb = new dObj(0,startpunkt,"box",true);	
}
window.onload = init;

function bewege(richtung,schritt) {
	if (richtung == "auf")
	{
		gehe = schritt;
	}
	else 
	{
		gehe = -schritt;
	}
	
	if ((eb.y + gehe) < ((startpunkt + 180) - eb.hoehe))
	{
		gehe = 0;
	}
	
	if ( (eb.y + gehe) > startpunkt) 
	{
			eb.gehNach(0,startpunkt);
	}
	else
	{	
		eb.gehNach(0,eb.y + gehe);		
		window.status = "Hin" + richtung + " scrollen.";
	}
	bewegung = setTimeout("bewege('"+richtung+"',"+schritt+")",tempo);
}

function stop() {
	window.status = "";
	clearTimeout(bewegung);
}	


/////link von text und credit class ändern damit der link rot bleibt wenn die ebene eingeblendet ist
function rot(g){
document.getElementById(g).className ="aktiv";
}
function schwarz(g){
document.getElementById(g).className = "normal";
}
