// init initialisiert die Variablen
function init(){
	window.name="tcm";
	loaded=0;
	memsrc=""; //speichert die adresse des wiederherzustellenden Bildes in der ersten Menueebene
	mem1=0; // speichert welcher Menüpunkt in der ersten ebene grade aktiv ist
	mem2=0; // speichert welcher Menüpunkt in der zweiten ebene grade aktiv ist
	mem3=0; // speichert welcher Menüpunkt in der dritten ebene grade aktiv ist
	llayers=document.layers; //layers ? true bei NS4 sonst false;
	hidedelay=1000; // nach wieviel ms wird ausgeblendet
	hidestr="onMouseout=\"timeout=window.setTimeout('do_out()',"+hidedelay+");\" onMouseover=\"window.clearTimeout(timeout);\""; // zum Untermenüs ausblenden wenn die Mouse den Bereich verlässt
	starttop1=97; //startposition vom oberen documentrand
	left1=163; // horizontale Startposition der ersten Unterbene
	mcount1=0; // zählt mit welches menü in der ersten Unterebene grade geschrieben wird
	mcount2=0; // zählt mit welches menü in der zweiten Unterebene grade geschrieben wird
	//left2=375; // horizontale Startposition der zweiten Unterbene
	bugelheight1=21; //Höhe des Verbindungsbügels des ersten Untermenüs
	lineheight1=21; // wie hoch sind die Grafiken in Menü ?
	lineheight2=19; // Höhe eines Menüeintrages
	abstand2=1;//dicke der Anstandlinie im Untermenü
	width1=170; //Breite des ersten Untermenüs
	defaultwidth2=210;	//Standardbreite des zweiten Untermenüs
	timeout=setTimeout("temp1=0",1); //Variable zum ausblenden nach gewisser Zeit

	//Farbset blau
//	bgcolornorm="#003399";// normale Hintergrundfarbe in den FlyOuts
//	bgcolorhl="#6699CC";// Hintergrundfarbe bei highlighting in den FlyOuts
//	colornorm="#CCCCCC";// normale Schriftfarbe in den FlyOuts
//	colorhl="#FFFFFF";// Schriftfarbe bei highlighting in den FlyOuts
//	bgcolornormOverview="#000066";// normale Hintergrundfarbe in den FlyOuts
//	bgcolorhlOverview="#6699CC";// Hintergrundfarbe bei highlighting in den FlyOuts
//	colornormOverview="#CCCCCC";// normale Schriftfarbe in den FlyOuts
//	colorhlOverview="#FFFFFF";// Schriftfarbe bei highlighting in den FlyOuts

	//Farbset rot
	bgcolornorm="#FFFFE1";// normale Hintergrundfarbe in den FlyOuts
	bgcolorhl="#FFEEE1";// Hintergrundfarbe bei highlighting in den FlyOuts
	colornorm="#990000";// normale Schriftfarbe in den FlyOuts
	colorhl="#000000";// Schriftfarbe bei highlighting in den FlyOuts
	bgcolornormOverview="#990000";// normale Hintergrundfarbe in den FlyOuts
	bgcolorhlOverview="#FFEEE1";// Hintergrundfarbe bei highlighting in den FlyOuts
	colornormOverview="#FFFFE1";// normale Schriftfarbe in den FlyOuts
	colorhlOverview="#000000";// Schriftfarbe bei highlighting in den FlyOuts

	adessofortoppos=114;
	adessoforleftpos=200;
	adessoforwidth=200;
	adessoformem=0;
	hidestr2="onMouseout=\"timeout=window.setTimeout('do_out2()',"+hidedelay+");\" onMouseover=\"window.clearTimeout(timeout2);\""; // zum Untermenüs ausblenden wenn die Mouse den Bereich verlässt
	timeout2=setTimeout("temp1=0",1); //Variable zum ausblenden nach gewisser Zeit
	//BrowserCheck
	validBr=false;//gültiger Browser
	tempstr=navigator.userAgent;
	browser="unknown";
	version=0;
	menustyle="class=\"menu\" style=\"background-color:"+bgcolornorm+";color:"+colornorm+";\"";
	if (tempstr.indexOf("MSIE")>-1) {
		version=parseFloat(tempstr.substring(tempstr.indexOf("MSIE")+5));
		browser="MSIE";
	}
	if (tempstr.indexOf("Opera")>-1) {
		version=parseFloat(tempstr.substring(tempstr.indexOf("Opera")+6));
		browser="Opera";
	}

	if (tempstr.indexOf("Konqueror")>-1) {
		version=parseFloat(tempstr.substring(tempstr.indexOf("Konqueror")+10));
		browser="Konqueror";
	}

	if (version==0 & navigator.appName.indexOf("etscape")>-1) {
		version=parseFloat(navigator.appVersion);
		browser="Netscape";
	}

	if (browser=="Netscape" && version >= 4.5) validBr=true;
	if (browser=="MSIE" && version >= 5) validBr=true;
	if (browser=="Opera" && version >= 5.11) validBr=true;
	//validBr=confirm("JavaScript aktivieren");
}// end function init


function initmenu(){
	preload();
	writemenu();
	loaded=1;
	window.setTimeout("loaded=2",1000);
}

function chkForm(){
	if (document.searchform.words.value=="") return false;
	f1 = window.open("about:blank","search","resizable=yes,width=650,scrollbars=yes,height=450,screenX=0,screenY=0");
	return true;

}

function leergif(imgwidth, imgheight){
	return "<img src=\""+leergifpath+"\" width=\""+imgwidth+"\" height=\""+imgheight+"\" border=\"0\" hspace=\"0\" vspace=\"0\">";
}


function popup(pic, sizex ,sizey){
	fenster=window.open(pic,"_blank",'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+sizex+',height='+sizey);
	fenster.focus();
	return false;
}

function popup2(file){
	window.open(file,"adesso2","width=769,height="+(screen.height-220)+",scrollbars,resizable=yes");
}

function reload(){
	document.location.reload();
	}

// blendet alle ebenen aus
function do_out(){
	unmark1();
}//end do_out()

function do_out2(){
	/*
	hidelayer("adessofor");
	unmarkfor();
	*/
}//end do_out2()

function do_outall(){
	do_out();
	do_out2();
}//end do_out2()

function hidelayer(el){// blendet Ebenen aus
	if (llayers){
		document.layers[el].visibility = "hide";
	}else {
		document.getElementById(el).style.visibility ="hidden";
	}
}//end function hidelayer.

function showlayer(el){//blendet Ebenen ein
	if (llayers){
		document.layers[el].visibility = "show";
	}else {
		document.getElementById(el).style.visibility ="visible";
	}

}//end function hidelayer.

function hover (image,src){
	window.document.images[image].src=src;
}


//cursor returnt bei IE ein StyleSheet, das den Cursor wie eine Hand aussehn lässt überschreibt das StyleSheet aus der CSS Datei
function cursor(){
if (document.all) return " style=\"cursor:hand;\"";
	else return "";
}//end function cursor

// mark1 sorgt für den MouseOvereffekt(Bild austauschen und ausfahren des ersten flyout) ganz links
function mark1(el,src){
	if (!validBr || loaded==0) return;
	el++;
	if (loaded==1){
		if (window.location.search.indexOf("menu="+(el-1))>-1) {
			loaded=2;
			return;
		}
	}
	loaded=2;
	unmark1();
	memsrc=window.document.images["menu"+(el-1)].src;
	window.document.images["menu"+(el-1)].src=src;
	showlayer("z"+(el-1));
	showlayer("z"+(el-1)+"bridge");
	mem1=el;
}// end function mark1

function unmark1(){
	if (!validBr || loaded==0) return;
	do_out2();//!!!!!!
	unmark2();
	if (mem1>0) {
		document["menu"+(mem1-1)].src=memsrc;
		hidelayer("z"+(mem1-1));
		hidelayer("z"+(mem1-1)+"bridge");
		mem1=0;
	}// end if (mem1>0)
}// end function unmark1


// mark2 highlightet den Menüpunkt in der zweiten Ebene und fährt falls vorhanden das Untermenü aus
function mark2(el,hassub){
	//normales Bild wiederherstellen
	unmark2();
	tempstr="msub"+el.substr(1,el.length-1);
	if (llayers){
		document.layers[el.substr(0,2)].layers[el+"a1"].zIndex=101;
		if (document.layers[tempstr]){
			showlayer(tempstr);
			showlayer(tempstr+"bridge");
		}
	}else
	{

		if (document.getElementById(tempstr)){
			showlayer(tempstr);
			showlayer(tempstr+"bridge");
		}//end if (document.getElementById(tempstr)
		var Suche2 = /z\d0/;
		if (Suche2.test(el)){
			document.getElementById(el+"a").style.background=bgcolorhlOverview;
			document.getElementById(el+"a").style.color=colorhlOverview;
		}
		else{
			document.getElementById(el+"a").style.background=bgcolorhl;
			document.getElementById(el+"a").style.color=colorhl;
		}
	}
	mem2=el;
}// end function mark2

function unmark2(){
	if (mem2!=0) {
		tempstr="msub"+mem2.substr(1,mem2.length-1);
		unmark3();
		if (llayers){
			if (document.layers[tempstr]){
				hidelayer(tempstr);
				hidelayer(tempstr+"bridge");
			}
			document.layers[mem2.substr(0,2)].layers[mem2+"a1"].zIndex=99;
		}
		else{
			if (document.getElementById(tempstr)){
				hidelayer(tempstr+"bridge");
				hidelayer(tempstr);
			}//end if (document.getElementById(tempstr)
			//document.getElementById(mem2+"a").className="menu";
			var Suche2 = /z\d0/;
			if (Suche2.test(mem2)){
				document.getElementById(mem2+"a").style.background=bgcolornormOverview;
				document.getElementById(mem2+"a").style.color=colornormOverview;
			}
			else{
				document.getElementById(mem2+"a").style.background=bgcolornorm;
				document.getElementById(mem2+"a").style.color=colornorm;
			}
		}
		mem2=0;
	}
}//end function unmark2

function mark3(el){
	//normales Bild wiederherstellen
	unmark3();
	if (llayers){
		document.layers[el.substring(0,el.length-1)].layers[el+"a1"].zIndex=101;
	}
	else{
		var Suche3 = /msub\d\d0/;
		if (Suche3.test(el)){
			document.getElementById(el).style.background = bgcolorhlOverview;
			document.getElementById(el).style.color = colorhlOverview;
		}
		else{
			document.getElementById(el).style.background = bgcolorhl;
			document.getElementById(el).style.color = colorhl;
		}
	}
	mem3=el;
}// end function mark3

function unmark3(){
	if (mem3!=0) {
		if (llayers){
			document.layers[mem3.substring(0,mem3.length-1)].layers[mem3+"a1"].zIndex=99;
		}
		else{
			var Suche3 = /msub\d\d0/;
			if (Suche3.test(mem3)){
				document.getElementById(mem3).style.background = bgcolornormOverview;
				document.getElementById(mem3).style.color = colornormOverview;
			}
			else{
				document.getElementById(mem3).style.background = bgcolornorm;
				document.getElementById(mem3).style.color = colornorm;
			}
		}
		mem3=0;
	}//end if (mem3!=0)
}//end function unmark3

function markfor(el){
	// alert(el);
	unmarkfor();
	if (llayers){
		document.layers[el.substring(0,el.length-1)].layers[el+"a1"].zIndex=101;
	}
	else{
		var Suche3 = /adessofor0/;
		if (Suche3.test(el)){
			document.getElementById(el).style.background = bgcolorhlOverview;
			document.getElementById(el).style.color = colorhlOverview;
		}
		else{
			document.getElementById(el).style.background = bgcolorhl;
			document.getElementById(el).style.color = colorhl;
		}
	}
	adessoformem=el;
}// end function mark1


function unmarkfor(){//blendet das adesso fuer Menü aus
	if (adessoformem!=0) {
		if (llayers){
			document.layers[adessoformem.substring(0,adessoformem.length-1)].layers[adessoformem+"a1"].zIndex=99;
		}
		else{
			var Suche3 = /adessofor0/;
			if (Suche3.test(adessoformem)){
				document.getElementById(adessoformem).style.background = bgcolornormOverview;
				document.getElementById(adessoformem).style.color = colornormOverview;
			}
			else{
				document.getElementById(adessoformem).style.background = bgcolornorm;
				document.getElementById(adessoformem).style.color = colornorm;
			}
		}
		mem3=0;
	}//end if (mem3!=0)
}//end function unmarkfor

function showadessofor(){//blendet das adesso fuer Menü ein
	if (!validBr || loaded==0) return;
	do_out();
	unmarkfor();
	showlayer("adessofor");
}//end function unmarkfor


function aliasOf(number) {
	return "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".substr(number, 1);
}

//Methode um das Menü in der ersten Ebene zu schreiben
function writesubmenu1(){
	if (!validBr) return;
	leerzeile="<tr><td colspan=\"3\" bgcolor=\"#000000\">"+leergif(1,1)+"</td></tr>\n";
	tempint=0;
	a=writesubmenu1.arguments;
	subs=null;
	subs=new Array();
	for(i=1; i<a.length; i+=3){subs[tempint++]=a[i+2];}
	tempint=0;
		if (isNaN(a[0]) || a[0]=="" || a[0]==null ) width2=defaultwidth2;
			else  width2=a[0];
	toppos=((mcount1*lineheight1)+starttop1-lineheight2-2);
	if (!llayers){
		towrite="<div id=\"z"+mcount1+"bridge\" class=\"submenu\" style=\"top:"+(toppos-3+lineheight2+2)+"px;left:"+(left1-10)+"px;\"><img src=\""+bugelpath+"\" width=\"10\" height=\""+bugelheight1+"\" border=\"0\"></div>";
		towrite+="<div "+hidestr+" id=\"z"+mcount1+"\" class=\"submenu\" style=\"top:"+toppos +"px;left:"+left1+"px;\">\n";
		towrite+="<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
		towrite+="<tr bgcolor=\"#000000\"><td>"+leergif(2,2)+"</td><td>"+leergif(width1,2)+"</td><td>"+leergif(2,2)+"</td></tr>\n";
		i=1;
		tempstr="z"+mcount1+""+aliasOf((i-1)/3);
		towrite+="<tr><td bgcolor=\"#000000\">"+leergif(2,2)+"</td><td id=\""+tempstr+"a\""+cursor()+" height=\""+lineheight2+"\" class=\"menuOverview\" onClick=\"document.location.href='"+a[i+1]+jsessionid+"'\" onMouseover=\"mark2('"+tempstr+"',"+a[i+2]+");window.status='"+a[i]+"';return true;\"  onMouseout=\"window.status='';return true;\">"+a[i]+"</td><td bgcolor=\"#000000\">"+leergif(2,2)+"</td></tr>"+leerzeile+leerzeile;
		for(i=4; i<a.length; i+=3){
			tempstr="z"+mcount1+""+aliasOf((i-1)/3);
			towrite+="<tr><td bgcolor=\"#000000\">"+leergif(2,2)+"</td><td id=\""+tempstr+"a\""+cursor()+" height=\""+lineheight2+"\" class=\"menu\" onClick=\"document.location.href='"+a[i+1]+jsessionid+"'\" onMouseover=\"mark2('"+tempstr+"',"+a[i+2]+");window.status='"+a[i]+"';return true;\"  onMouseout=\"window.status='';return true;\">"+a[i]+"</td><td bgcolor=\"#000000\">"+leergif(2,2)+"</td></tr>"+leerzeile;
			if (i==1) towrite+=leerzeile;
		}
		towrite+=leerzeile+"</table>";
		towrite+="</div>";
	}
	else{
		towrite="<layer name=\"z"+mcount1+"bridge\" top=\""+(toppos-3+lineheight2+2)+"\" left=\""+(left1-10)+"\"  visibility=\"hide\"><img src=\""+bugelpath+"\" width=\"10\" height=\""+bugelheight1+"\" border=\"0\"></layer>\n";
		towrite+="<layer name=\"z"+mcount1+"\" height=\""+((((a.length-1)/3)*(lineheight2+abstand2)+1)+3)+"\" width=\""+(width1+4)+"\" top=\""+toppos+"\" left=\""+left1+"\" bgcolor =\"#000000\" visibility=\"hide\" "+hidestr+">\n";
		i=1;
		tempstr="z"+mcount1+""+aliasOf((i-1)/3);
		tempint=(((i-1)/3)*(lineheight2+abstand2))+2;
		towrite+="<layer z-Index=\"99\" bgcolor=\""+bgcolorhlOverview+"\" name=\""+tempstr+"a1\" top=\""+tempint+"\" left=\"2\"><table width=\""+width1+"\" height=\""+(lineheight2)+"\" bgcolor=\""+bgcolorhlOverview+"\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td valign=\"top\" align=\"right\" class=\"highlight\">"+a[i]+"&nbsp;&nbsp;</td></tr></table></layer>\n";
		towrite+="<layer z-Index=\"100\" bgcolor=\""+bgcolornormOverview+"\" name=\""+tempstr+"a2\" top=\""+tempint+"\" left=\"2\"><table width=\""+width1+"\" height=\""+(lineheight2)+"\" bgcolor=\""+bgcolornormOverview+"\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td valign=\"top\" align=\"right\" class=\"normal\">"+a[i]+"&nbsp;&nbsp;</td></tr></table></layer>\n";
		towrite+="<layer z-Index=\"200\" top=\""+tempint+"\" left=\"2\"><a href=\""+a[i+1]+jsessionid+"\" onMouseover=\"mark2('"+tempstr+"');window.status='"+a[i]+"';return true;\" onMouseout=\"window.status='';return true;\">"+leergif(width1,lineheight2-abstand2)+"</a></layer>\n";

		for(i=4; i<a.length; i+=3){
			tempstr="z"+mcount1+""+aliasOf((i-1)/3);
			tempint=(((i-1)/3)*(lineheight2+abstand2))+3;
			towrite+="<layer z-Index=\"99\" bgcolor=\""+bgcolorhl+"\" name=\""+tempstr+"a1\" top=\""+tempint+"\" left=\"2\"><table width=\""+width1+"\" height=\""+(lineheight2)+"\" bgcolor=\""+bgcolorhl+"\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td valign=\"top\" align=\"right\" class=\"highlight\">"+a[i]+"&nbsp;&nbsp;</td></tr></table></layer>\n";
			towrite+="<layer z-Index=\"100\" bgcolor=\""+bgcolornorm+"\" name=\""+tempstr+"a2\" top=\""+tempint+"\" left=\"2\"><table width=\""+width1+"\" height=\""+(lineheight2)+"\" bgcolor=\""+bgcolornorm+"\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td valign=\"top\" align=\"right\" class=\"normal\">"+a[i]+"&nbsp;&nbsp;</td></tr></table></layer>\n";
			towrite+="<layer z-Index=\"200\" top=\""+tempint+"\" left=\"2\"><a href=\""+a[i+1]+jsessionid+"\" onMouseover=\"mark2('"+tempstr+"');window.status='"+a[i]+"';return true;\" onMouseout=\"window.status='';return true;\">"+leergif(width1,lineheight2-abstand2)+"</a></layer>\n";
		}
		towrite+="</layer>\n";
	}
	document.writeln(towrite);
	mcount1++;
	mcount2=0;
}//End writesubmenu1();

//Methode um das Menü in der zweiten Unterebene zu schreiben
function writesubmenu2(){
	if (!validBr) return;
	leerzeile="<tr><td colspan=\"3\" bgcolor=\"#000000\">"+leergif(width2+4,1)+"</td></tr>\n";
	tempint=0;
	while (!subs[mcount2]) mcount2++;
	a=writesubmenu2.arguments;
	tempint=0;
	var towrite="";
	toppos=((mcount1-1)*lineheight1)+starttop1+(mcount2*(lineheight2+abstand2))-2*(lineheight2+1)-1;
	leftpos=width1+left1+10+4;
	idstr="msub"+(mcount1-1)+""+aliasOf(mcount2);
	if (!llayers){
		towrite+="<div id=\""+idstr+"bridge\" class=\"submenu\" style=\"top:"+(toppos+1+lineheight2+2)+"px;left:"+(leftpos-10)+"px;\"><img src=\""+linespath+"\" width=\"10\" height=\"21\" border=\"0\"></div>";
		towrite+="<div "+hidestr+" id=\""+idstr+"\" class=\"submenu\" style=\"top:"+toppos+"px;left:"+leftpos+"px;\">\n";
		towrite+="<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
		towrite+="<tr bgcolor=\"#000000\"><td>"+leergif(2,2)+"</td><td>"+leergif(width2,2)+"</td><td>"+leergif(2,2)+"</td></tr>\n";
		i=0;
		tempstr=idstr+(i/2);
		towrite+="<tr><td bgcolor=\"#000000\" height=\""+lineheight2+"\">"+leergif(2,2)+"</td><td id=\""+tempstr+"\""+cursor()+" class=\"menuOverview\" onClick=\"document.location.href='"+a[i+1]+jsessionid+"'\" onMouseover=\"mark3('"+tempstr+"',true);window.status='"+a[i]+"';return true;\"  onMouseout=\"window.status='';return true;\">"+a[i]+"</td><td bgcolor=\"#000000\">"+leergif(2,2)+"</td></tr>"+leerzeile+leerzeile;
		for(i=2; i<a.length; i+=2){
			tempstr=idstr+(i/2);
			towrite+="<tr><td bgcolor=\"#000000\" height=\""+lineheight2+"\">"+leergif(2,2)+"</td><td id=\""+tempstr+"\""+cursor()+" class=\"menu\" onClick=\"document.location.href='"+a[i+1]+jsessionid+"'\" onMouseover=\"mark3('"+tempstr+"',true);window.status='"+a[i]+"';return true;\"  onMouseout=\"window.status='';return true;\">"+a[i]+"</td><td bgcolor=\"#000000\">"+leergif(2,2)+"</td></tr>"+leerzeile;
		}
		towrite+=leerzeile+"</table>";
		towrite+="</div>";
	}
	else{
		towrite="<layer name=\""+idstr+"bridge\" top=\""+(toppos+1+lineheight2+2)+"\" left=\""+(leftpos-10)+"\"  visibility=\"hide\"><img src=\""+linespath+"\" width=\"10\" height=\"21\" border=\"0\"></layer>\n";
		towrite+="<layer name=\""+idstr+"\" top=\""+toppos+"\" left=\""+leftpos+"\" bgcolor=\"#000000\" width=\""+(width2+4)+"\" height=\""+((((a.length)/2)*(lineheight2+abstand2)+1)+3)+"\" visibility=\"hide\" "+hidestr+">\n";
		i=0;
			tempstr=idstr+(i/2);
			tempint=((i/2)*(lineheight2+abstand2))+2;
			towrite+="<layer z-Index=\"99\" bgcolor=\""+bgcolorhlOverview+"\" name=\""+tempstr+"a1\" top=\""+tempint+"\" left=\"2\"><table width=\""+width2+"\" height=\""+(lineheight2)+"\" bgcolor=\""+bgcolorhlOverview+"\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td valign=\"top\" align=\"right\" class=\"highlight\">"+a[i]+"&nbsp;&nbsp;</td></tr></table></layer>\n";
			towrite+="<layer z-Index=\"100\" bgcolor=\""+bgcolorhlOverview+"\" name=\""+tempstr+"a2\" top=\""+tempint+"\" left=\"2\"><table width=\""+width2+"\" height=\""+(lineheight2)+"\" bgcolor=\""+bgcolornormOverview+"\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td valign=\"top\" align=\"right\" class=\"normal\">"+a[i]+"&nbsp;&nbsp;</td></tr></table></layer>\n";
			towrite+="<layer z-Index=\"200\" top=\""+tempint+"\" left=\"2\"><a href=\""+a[i+1]+jsessionid+"\" onMouseover=\"mark3('"+tempstr+"');window.status='"+a[i]+"';return true;\" onMouseout=\"window.status='';return true;\">"+leergif(width2,lineheight2)+"</a></layer>\n";

		for(i=2; i<a.length; i+=2){
			tempstr=idstr+(i/2);
			tempint=((i/2)*(lineheight2+abstand2))+3;
			towrite+="<layer z-Index=\"99\" bgcolor=\""+bgcolorhl+"\" name=\""+tempstr+"a1\" top=\""+tempint+"\" left=\"2\"><table width=\""+width2+"\" height=\""+(lineheight2)+"\" bgcolor=\""+bgcolorhl+"\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td valign=\"top\" align=\"right\" class=\"highlight\">"+a[i]+"&nbsp;&nbsp;</td></tr></table></layer>\n";
			towrite+="<layer z-Index=\"100\" bgcolor=\""+bgcolorhl+"\" name=\""+tempstr+"a2\" top=\""+tempint+"\" left=\"2\"><table width=\""+width2+"\" height=\""+(lineheight2)+"\" bgcolor=\""+bgcolornorm+"\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td valign=\"top\" align=\"right\" class=\"normal\">"+a[i]+"&nbsp;&nbsp;</td></tr></table></layer>\n";
			towrite+="<layer z-Index=\"200\" top=\""+tempint+"\" left=\"2\"><a href=\""+a[i+1]+jsessionid+"\" onMouseover=\"mark3('"+tempstr+"');window.status='"+a[i]+"';return true;\" onMouseout=\"window.status='';return true;\">"+leergif(width2,lineheight2)+"</a></layer>\n";
		}
		towrite+="</layer>\n";
	}
document.writeln(towrite);
mcount2++;
}//End writesubmenu2();

//Methode um das Menü in der zweiten Unterebene zu schreiben
function writeadessoformenu(){
	//adessofortoppos=50;
	//adessoforleftpos=200;
	//adessoforwidth=200;
	//adessoformem=0;


	if (!validBr) return;
	leerzeile="<tr><td colspan=\"3\" bgcolor=\"#000000\">"+leergif(width2+4,1)+"</td></tr>\n";
	tempint=0;
	a=writeadessoformenu.arguments;
	var towrite="";
	toppos=adessofortoppos;
	leftpos=adessoforleftpos;
	idstr="adessofor";
	if (!llayers){
		towrite+="<div "+hidestr2+" id=\"adessofor\" class=\"submenu\" style=\"top:"+toppos+"px;left:"+leftpos+"px;\">\n";
		towrite+="<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
		towrite+="<tr bgcolor=\"#000000\"><td>"+leergif(2,2)+"</td><td>"+leergif(adessoforwidth,2)+"</td><td>"+leergif(2,2)+"</td></tr>\n";
		i=0;
		tempstr=idstr+(i/2);
		towrite+="<tr><td bgcolor=\"#000000\" height=\""+lineheight2+"\">"+leergif(2,2)+"</td><td id=\""+tempstr+"\""+cursor()+" class=\"menuOverview\" onClick=\"document.location.href='"+a[i+1]+jsessionid+"'\" onMouseover=\"markfor('"+tempstr+"',true);window.status='"+a[i]+"';return true;\"  onMouseout=\"window.status='';return true;\">"+a[i]+"</td><td bgcolor=\"#000000\">"+leergif(2,2)+"</td></tr>"+leerzeile+leerzeile;
		for(i=2; i<a.length; i+=2){
			tempstr=idstr+(i/2);
			towrite+="<tr><td bgcolor=\"#000000\" height=\""+lineheight2+"\">"+leergif(2,2)+"</td><td id=\""+tempstr+"\""+cursor()+" class=\"menu\" onClick=\"document.location.href='"+a[i+1]+jsessionid+"'\" onMouseover=\"markfor('"+tempstr+"',true);window.status='"+a[i]+"';return true;\"  onMouseout=\"window.status='';return true;\">"+a[i]+"</td><td bgcolor=\"#000000\">"+leergif(2,2)+"</td></tr>"+leerzeile;
		}
		towrite+=leerzeile+"</table>";
		towrite+="</div>";

	}
	else{
		towrite+="<layer name=\"adessofor\" top=\""+toppos+"\" left=\""+leftpos+"\" bgcolor=\"#000000\" width=\""+(adessoforwidth+4)+"\" height=\""+((((a.length)/2)*(lineheight2+abstand2)+1)+3)+"\" visibility=\"hide\" "+hidestr+">\n";
		i=0;
			tempstr=idstr+(i/2);
			tempint=((i/2)*(lineheight2+abstand2))+2;
			towrite+="<layer z-Index=\"99\" bgcolor=\""+bgcolorhlOverview+"\" name=\""+tempstr+"a1\" top=\""+tempint+"\" left=\"2\"><table width=\""+adessoforwidth+"\" height=\""+(lineheight2)+"\" bgcolor=\""+bgcolorhlOverview+"\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td valign=\"top\" align=\"right\" class=\"highlight\">"+a[i]+"&nbsp;&nbsp;</td></tr></table></layer>\n";
			towrite+="<layer z-Index=\"100\" bgcolor=\""+bgcolorhlOverview+"\" name=\""+tempstr+"a2\" top=\""+tempint+"\" left=\"2\"><table width=\""+adessoforwidth+"\" height=\""+(lineheight2)+"\" bgcolor=\""+bgcolornormOverview+"\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td valign=\"top\" align=\"right\" class=\"normal\">"+a[i]+"&nbsp;&nbsp;</td></tr></table></layer>\n";
			towrite+="<layer z-Index=\"200\" top=\""+tempint+"\" left=\"2\"><a href=\""+a[i+1]+jsessionid+"\" onMouseover=\"markfor('"+tempstr+"');window.status='"+a[i]+"';return true;\" onMouseout=\"window.status='';return true;\">"+leergif(adessoforwidth,lineheight2)+"</a></layer>\n";

		for(i=2; i<a.length; i+=2){
			tempstr=idstr+(i/2);
			tempint=((i/2)*(lineheight2+abstand2))+3;
			towrite+="<layer z-Index=\"99\" bgcolor=\""+bgcolorhl+"\" name=\""+tempstr+"a1\" top=\""+tempint+"\" left=\"2\"><table width=\""+adessoforwidth+"\" height=\""+(lineheight2)+"\" bgcolor=\""+bgcolorhl+"\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td valign=\"top\" align=\"right\" class=\"highlight\">"+a[i]+"&nbsp;&nbsp;</td></tr></table></layer>\n";
			towrite+="<layer z-Index=\"100\" bgcolor=\""+bgcolorhl+"\" name=\""+tempstr+"a2\" top=\""+tempint+"\" left=\"2\"><table width=\""+adessoforwidth+"\" height=\""+(lineheight2)+"\" bgcolor=\""+bgcolornorm+"\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td valign=\"top\" align=\"right\" class=\"normal\">"+a[i]+"&nbsp;&nbsp;</td></tr></table></layer>\n";
			towrite+="<layer z-Index=\"200\" top=\""+tempint+"\" left=\"2\"><a href=\""+a[i+1]+jsessionid+"\" onMouseover=\"markfor('"+tempstr+"');window.status='"+a[i]+"';return true;\" onMouseout=\"window.status='';return true;\">"+leergif(adessoforwidth,lineheight2)+"</a></layer>\n";
		}
		towrite+="</layer>\n";
	}
document.writeln(towrite);
}//End writeadessoformenu();
