/////////////////////////////////////////////////////////////////
/* JavaScript by KLIK! Klein Informatik | rklein@klik-info.ch */
////////////////////////////////////////////////////////////////

/////////////////////////////////
/* dhtml-Objekt-Werkzeugkasten */
/////////////////////////////////

function dObj(xpos,ypos,id,sicht) {
   if (document.documentElement) {
      this.el = document.getElementById(id);
      this.css = this.el.style;
   }
   else if (document.all) {
      this.el = document.all[id];
      this.css = this.el.style;
   }
   else if (document.layers) {
      this.el = document.layers[id];
      this.css = this.el;
   }
   this.x = xpos; this.css.left = xpos;
   this.y = ypos; this.css.top = ypos;
   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;
   if(id == "leer"){
   //this.el.onmouseout = menuOut;
   this.el.onmouseover = menuOver;
   }
}

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;
}
///////////////////////////////////////
/* Ende dhtml-Objekt-Werkzeugkasten */
//////////////////////////////////////


window.onload = init;
var submen = new Array();
var starty=200;
var geladen = false;
var ally =200;

function absTop(Element) {
   abstop=0;
   while (Element) {
      abstop+=Element.offsetTop;
      Element=Element.offsetParent;
   }
   return abstop;
}

function pos(index){
	//IE PC
	if (document.all){
		//starty=absTop(document.all.nav1);
		ypos=absTop(document.all.nav[index])-1;
		navheight = 42
		//starty = starty-1;
	}
	//Netscape 7.xx / Firefox PC
	else if (document.documentElement){   	
		ypos=document.nav[index].y-1;
		navheight = 42
		//starty = starty-1;
   	} 
	
	//Netscape 4.xx PC
	else if(document.layers){
		ypos=document.nav[index].y-1;
		navheight = 42
		//starty = starty-1;
	}
	//starty = starty-1;
}

function dummy(){
	return true;
}

function init(){
	window.scroll(0,0);
	//pos();
	//if(starty == 0)starty=200;
	for (i=1;i<=anz_menu;i++) {
		pos(i-1);
		//ypos = starty+((i-1)*navheight);
     	submen[i] = new dObj(184,200,"um"+i,false);
     	submen[i].gehNach(184,ypos);
	}
	dummy = new dObj(184,20,"leer",false);
	geladen = true;
	if(document.all && !document.documentElement && navigator.userAgent.indexOf("Opera",0)==-1)document.onmousemove = verfolgen;
}

function alleaus(){
if(geladen){
	for (j=1; j <= anz_menu; j++){
	if(submen[j].sichtbar){
			submen[j].verstecke();
	}
	}
}
}
function verfolgen(e){
ally = event.clientY;
}

function zeigMenu(nr,ok){
if(geladen){
	if(document.all && !document.documentElement && ok && navigator.userAgent.indexOf("Opera",0)==-1){
		submen[nr].gehNach(184,ally-20);
	}
	alleaus();
	submen[nr].zeige();
	dummy.zeige();
	}
}

function menuOver(){
   alleaus();
   dummy.verstecke();
}
