<!--
var iL;
function getPos(iN)
{
	if (aW[iN]) {
	if (aW[aW[iN][0]][0]==-1) { //Hauptlinks
		for (var j=0;j<aW[iN][0];j++) { //get Pos Left 
				iL += parseInt(oN.getElementsByTagName("a")[j].style.width);
		} //for
	} else {
		iL+=aW[aW[iN][0]][1]; iL++; if (!document.all || document.all) iL+=4;
		getPos(aW[iN][0]);
	}
	} //if
}

function cnav() {
	oN = document.getElementById("navigation");
	var bOK = true;
	for (i=0;i<aW.length;i++) { //create Hauptpunkte

	if (aW[i]) {

		if (aW[i][0]==-1) {
			oLink = document.createElement("a");
			oLink.setAttribute("href",aW[i][3]);
			oLink.setAttribute("id","m"+i);
			if (document.all) {
				oLink.attachEvent("onmouseout",clearT);
				eval('oLink.attachEvent("onmouseover",function() {rollOver('+i+');});');
			} else {
				oLink.setAttribute("onmouseout","clearT();");
				oLink.setAttribute("onmouseover","rollOver("+i+")");
			}//else
			oLink.style.width = aW[i][1]+"px";
			oLink.appendChild(document.createTextNode(aW[i][2]));
			oN.appendChild(oLink);
		} else {
			if (!document.getElementById("sub"+aW[i][0])) {
				iL=-1; if (!document.all ||document.all) iL=0;
				getPos(i);
				if (aW[aW[i][0]][0]==-1) {
					iT=122;
				} else {
					iT = parseInt(document.getElementById("sub"+aW[aW[i][0]][0]).style.top);
					for (j=0;j<aW[i][0];j++) {
						if (aW[j] && aW[j][0] == aW[aW[i][0]][0]) {
							iT+=20;
							if (!document.all || document.all) iT+=3;
						}//if
					}//for
				}//else
				oSub = document.createElement("div");
				oSub.setAttribute("id","sub"+aW[i][0]);
				oSub.className="sub";
				oSub.style.top=iT+"px";
				if ( document.all ) {
					oSub.style.left=(iL)+"px";
					//if ( bOK ) alert( 'ok'+oSub.style.left );
					bOK = false;
				} else {
					//if ( bOK ) alert( 'ok' );
					bOK = false;
					oSub.style.left=(iL)+"px";
				}
				oSub.style.visibility="hidden";
				if ( document.all ) {
					oSub.style.width=(aW[i][1]+4)+"px"
				} else {
					oSub.style.width=(aW[i][1]+4)+"px"
				}
			} else {
				oSub = document.getElementById("sub"+aW[i][0]);
			} //else
			oLink = document.createElement("a");
			oLink.setAttribute("href",aW[i][3]);
			oLink.setAttribute("id","l"+i);
			if ( document.all ) {
				oLink.style.width = (aW[i][1]+1)+"px";
			} else {
				oLink.style.width = (aW[i][1]+1)+"px";
			}
			oLink.appendChild(document.createTextNode(aW[i][2]));
			if (document.all) {
				oLink.attachEvent("onmouseout",clearT);
				eval('oLink.attachEvent("onmouseover",function() {rollOver('+i+');});');
			} else {
				oLink.setAttribute("onmouseout","clearT();");
				oLink.setAttribute("onmouseover","rollOver("+i+")");
			} //else
			oSub.appendChild(oLink);
			document.getElementsByTagName("body")[0].appendChild(oSub);
			if (aW[ aW[i][0] ][0]!=-1)	{
				if (document.getElementById("l"+aW[i][0])) {
					document.getElementById("l"+aW[i][0]).style.backgroundImage="url(../images/main/nav.gif)";
					document.getElementById("l"+aW[i][0]).style.backgroundPosition="right";
					document.getElementById("l"+aW[i][0]).style.backgroundRepeat="no-repeat";
				} //if
			} //if
		} //else

	} //if

	} //for

	//fix
	if (!document.all ) {
		//document.getElementById("navigation").style.height = "19px"
		/*for (i=0;i<aW.length;i++) {
		if (document.getElementById("sub"+i))
			document.getElementById("sub"+i).style.width = (parseInt(document.getElementById("sub"+i).style.width)+3)+"px";
		}*/
	} else {
		/*for (i=0;i<aW.length;i++) {
		if (document.getElementById("sub"+i))
			document.getElementById("sub"+i).style.width = (parseInt(document.getElementById("sub"+i).style.width)+5)+"px";
		}*/
	}
	if (navigator.userAgent.indexOf("Opera")!=-1) {
		for (i=0;i<aW.length;i++) {
		if (document.getElementById("sub"+i))
			document.getElementById("sub"+i).style.width = (parseInt(document.getElementById("sub"+i).style.width)+2)+"px";
		}
	}


} //function


var oInt, iAktiv=-1;

function ebene(nam,seg) {
    if (seg) {document.getElementById(nam).style.visibility = "visible";} else {document.getElementById(nam).style.visibility = "hidden";}
} //ebene

function changeClass(sID,sClass) {
		document.getElementById(sID).className=sClass;
} //changeClass

function clearAll() {
	window.clearInterval(oInt);
	if (iAktiv!=-1) {
		showEbene(iAktiv,false);
	} //if
} //clearAll

function clearT() {
	window.clearInterval(oInt);
	oInt = window.setInterval("clearAll()",400);
} //clearT

function showEbene(iN,bW) {

	if (document.getElementById("sub"+iN)) {
		ebene("sub"+iN,bW);
	}
	if (aW[iN][0]!=-1) {
		if (bW)
			changeClass("l"+iN,"aktivmain2");
		else
			changeClass("l"+iN,"");

		showEbene(aW[iN][0],bW);
	} else {
		if (bW)
			changeClass("m"+iN,"aktivmain");
		else
			changeClass("m"+iN,"");
	}
}

function rollOver(iNummer) {
	clearAll();
	showEbene(iNummer,true);
	iAktiv=iNummer;
	
} //rollOver

//-->