
////////////////////Please leave this notice////////////////////
//
//	DropDown Menu 1.0
//	By Evgeny Novikov (java@aladin.ru)
//	http://java.skyteam.ru
//	It works only with IE5.0(++) and Netscape6.0(++)
//	Free to use!
//
////////////////////Last modified 2002-03-05////////////////////

//	Modify following four lines to customize your menu
var tdColor="#FFFFFF";		// menu item text color
var tdBgColor="#003366";	// menu item background color
var hlColor="#97aa2F";		// highlight text color
var hlBgColor="#003366";	// highlight background color
//	After change, modify same values in your *.css file

// Browsertyp ermitteln (und in B_Type speichern) 
 /*  Autor, Entwicklung 8/2002 Kristof Lipfert Duesseldorf    */
 /*  Version 2005-07-12                                  */

if(document.ids){x='nc4';my_off=96;}
else if( document.all && !document.getElementById ){x='ie4';my_off=138;}
else if( window.opera && !document.createElement ){x='op5';my_off=133;}
else if( window.opera && window.getComputedStyle )  {
          if(document.createRange){x='op8';my_off=133;}
            else if(window.navigate){x='op7.5';my_off=133;}
                             else {x='op7.2'; my_off=133; }                 }
else if( window.opera && document.compatMode ){x='op7';my_off=133;}
else if( window.opera && document.releaseEvents ){x='op6';my_off=133;}
else if( document.contains && !window.opera ){x='kq3';my_off=126;}
else if(window.pkcs11&&window.XML){x='f15';my_off=126;}
else if( window.getSelection && window.atob ){x='nn7';my_off=126;}
else if( window.getSelection && !document.compatMode ){x='nn6';my_off=126;}
else if( window.clipboardData && document.compatMode ){x='ie6';my_off=138;}
else if( window.clipboardData ){x='ie5';my_off=138;
     if( !document.createDocumentFragment ) {x+='.5';my_off=138;}
     if( document.doctype && !window.print ) x+='m';}
else if( document.getElementById && !document.all ){ x='op4';my_off=133;}
else if( document.images && !document.all ) {x='nn3';my_off=126;}
else if(document.clientWidth&&!window.RegExp){x='kq2';my_off=126;}
else {x='???';my_off=126};

//alert(x+' '+my_off);

var md=250;
var ti=-1;
var oTd=new Object;
oTd=null;

function doMenu(td){
	clearTimeout(ti);
	td.style.backgroundColor=hlBgColor;
	td.style.color=hlColor;
	var i;
	var sT="";
	var tda=new Array();
	tda=td.id.split("_");
	if(oTd!=null){
		var tdo=new Array();
		tdo=oTd.id.split("_");
		for(i=1;i<tdo.length;i++){
			sT+="_"+tdo[i];
			if(tdo[i]!=tda[i]){
				document.getElementById("td"+sT).style.backgroundColor=tdBgColor;
				document.getElementById("td"+sT).style.color=tdColor;
				if(document.getElementById("tbl"+sT)!=null)
					document.getElementById("tbl"+sT).style.visibility="hidden";
			}
		}			
	}
	oTd=td;
	sT="tbl";
	for(i=1;i<tda.length;i++)
		sT+="_"+tda[i];
	if(document.getElementById(sT)!=null)
		document.getElementById(sT).style.visibility="visible";

}

function clearMenu(){
	if(oTd!=null){
		var tdo=new Array();
		tdo=oTd.id.split("_");
		var sT="";
		for(var i=1;i<tdo.length;i++){
			sT+="_"+tdo[i];
			document.getElementById("td"+sT).style.backgroundColor=tdBgColor;
			document.getElementById("td"+sT).style.color=tdColor;
			if(document.getElementById("tbl"+sT)!=null)
				document.getElementById("tbl"+sT).style.visibility="hidden";
		}
		oTd=null;			
	}
}

function runMenu(strURL){
	location.href=strURL;
}

var tt="";
var sT="";
var pT=new Array();
var tA=new Array();

function getCoord(st){
	
	tA=st.split("_");
	//alert(document.getElementById("mainmenu").offsetTop+'+'+getElementById("td"+st).offsetHeight);
	if(tA.length>2){
		tA=tA.slice(0,-1);
		tt=tA.join("_");
		
		return (document.getElementById("tbl"+tt).offsetTop+document.getElementById("td"+st).offsetTop+4)+"px;left:"+
			(document.getElementById("tbl"+tt).offsetLeft+document.getElementById("td"+st).offsetWidth-2)+"px\">";
	}
	return (document.getElementById("mainmenu").offsetTop+my_off+document.getElementById("td"+st).offsetHeight-2)+((tA[1]-1.6)*30)+"px;left:"+
		  (document.getElementById("mainmenu").offsetLeft+document.getElementById("td"+st).offsetLeft+115)+"px\">";
}

var sH="<table class=\"menu\" id=\"mainmenu\" cellspacing=\"0\">";
var p=0;
var j=0;
while(eval("typeof(td_"+ ++j +")!=\"undefined\"")){
	sH+="<tr id=\"tr_"+j+"\"><td id=\"td_"+j+"\" onmouseover=\"doMenu(this)\" onmouseout=\"ti=setTimeout('clearMenu()',md)\"";
	sH+=(eval("typeof(url_"+j+")!=\"undefined\""))?" onclick=\"runMenu('"+eval("url_"+j)+"');\">":">";
	sH+=unescape(eval("td_"+j))+"</td></tr>";
	if (eval("typeof(td_"+j+"_1)!=\"undefined\""))
		pT[p++]="_"+j;
}
sH+="<tr><td class=navi  style='padding-bottom:5px;' align=left><span style='font-size:7pt;color:#ffffff;font-family:Tahoma,Arial,Helvetica,sans-serif; font-weight:normal;'><a href='index.php?id=8'><span style='font-size:7pt;color:#ffffff;'>Impressum</span></a>&nbsp;|&nbsp;<a href='htw/index.htm' target='_blank'>HT Intern</span></a></td></tr>";
sH+="</table>";
document.write(sH);
for(var q=0;typeof(pT[q])!="undefined";q++){
	sT=pT[q];
	sH="";
	j=0;
	sH+="<table class=\"menu1\" id=\"tbl"+sT+"\" cellspacing=\"0\" style=\"top:"+getCoord(sT);
	while (eval("typeof(td"+sT+"_"+ ++j +")!=\"undefined\"")){
		sH+="<tr><td id=\"td"+sT+"_"+j+"\" onmouseover=\"doMenu(this)\" onmouseout=\"ti=setTimeout('clearMenu()',md)\"";
		sH+=(eval("typeof(url"+sT+"_"+j+")!=\"undefined\""))?" onclick=\"runMenu('"+eval("url"+sT+"_"+j)+"')\">":">";
		sH+=unescape(eval("td"+sT+"_"+j))+"</td></tr>";
		if (eval("typeof(td"+sT+"_"+j+"_1)!=\"undefined\""))
			pT[p++]=sT+"_"+j;
	}

	sH+="</table>";
	document.write(sH);
}
document.getElementById("menue_js").style.display="inline";
document.getElementById("menue_static").style.display="none";
document.getElementById("mainmenu").style.visibility="visible";
document.getElementById("tbl_3").style.visibility="hidden";
document.getElementById("tbl_5").style.visibility="hidden";
document.getElementById("tbl_6").style.visibility="hidden";

