setMenueIndex();
document.write("\n<style type='text/css'>\n");
document.write("<!--\n");

	
// *****************************************************************************************
// Hauptmenue (1. Navigationsebene)
// *****************************************************************************************

// .HAUPT_CLASS
document.write("."+HAUPT_CLASS+" {\n");
document.write("font-family: Verdana, Arial, Helvetica, sans-serif;\n");
document.write("font-size: "+globalConfig[HM_TXT]+"px;\n");
document.write("font-weight: bold;\n");
document.write("margin: 0px;\n");
//if (globalConfig[M_TYPE] == 0){
	document.write("position: absolute;\n");
//}
document.write("z-index: 100;\n");
if (!(globalConfig[HM_COLHG] == "" || globalConfig[HM_COLHG] == null || globalConfig[HM_COLHG] == "#")){
	document.write("background-color: "+globalConfig[HM_COLHG]+";\n");
}
if (!(globalConfig[HM_COLFONT] == "" || globalConfig[HM_COLFONT] == null || globalConfig[HM_COLFONT] == "#")){
	document.write("color: "+globalConfig[HM_COLFONT]+";\n");
}
if (globalConfig[HM_RICHTUNG] == "x"){
	document.write("height: "+globalConfig[HM_H]+"px;\n");
} else {
	document.write("width: "+globalConfig[HM_W]+"px;\n");
}
document.write("}\n\n");


// Hauptmenue
var x = 0;
while (x < hauptMenue.length){
	document.write("#"+HAUPT_ID+x+" {\n");
	if (globalConfig[M_TYPE] == 0){
		document.write("top: "+globalConfig[HM_POSY]+"px;\n");
	}
	if (globalConfig[M_TYPE] == 0){
		document.write("left: "+globalConfig[HM_POSX]+"px;\n");
	}
	document.write("visibility: visible;\n");
	//document.write("padding: "+globalConfig[HM_PADDING]+"px;\n");
	//document.write("margin: 0px;\n");
	document.write("z-index: "+(x*10)+101+";\n");
	
	if (globalConfig[HM_RICHTUNG] == "x"){
		var thisWidth;
		if (globalConfig[HM_RICHTUNG] == "x"){
			thisWidth = globalConfig[HM_PADDING]+2*globalConfig[HM_BORDER];
			var a = 0;
			while (a < hmTitel.length){
				thisWidth = thisWidth+hmWidth[a]+globalConfig[HM_PADDING];
				if (globalConfig[SEP_W] != "" && a < hmTitel.length-1){
					thisWidth = thisWidth + 2*globalConfig[HM_PADDING]+globalConfig[SEP_W];
				}
				a++;
			}
								
		} else {
			thisWidth = globalConfig[HM_W];
		}
		document.write("width: "+thisWidth+"px;\n");
	} else {
		document.write("height: "+globalConfig[HM_H]+"px;\n");
	}
	
	
	document.write("}\n\n");

	document.write(".haupt_"+x+" {\n");
	if (!(hmColFont[x][1] == "" || hmColFont[x][1] == null || hmColFont[x][1] == "#")){
		document.write("color: "+hmColFont[x][1]+";\n");
	}
	if(!(globalConfig[HM_COLBORDER] == "" || globalConfig[HM_COLBORDER] == null || globalConfig[HM_COLBORDER] == "#")){
		document.write("border: "+globalConfig[HM_BORDER]+"px solid "+globalConfig[HM_COLBORDER] +";\n");	
	} else {
		document.write("border: "+globalConfig[HM_BORDER]+"px solid;\n");
	}
	
	document.write("padding: "+globalConfig[HM_PADDING]+"px;\n");
	document.write("margin: 0px;\n");
	document.write("}\n\n");
	
	var i = 0;
	while (i < hmTitel.length){
		document.write("#"+HAUPT_TD+x+"_"+i+" {\n");
		document.write("text-align: "+globalConfig[HM_ALIGN]+";\n");
		if (globalConfig[HM_RICHTUNG] == "x"){
			document.write("vertical-align: middle;\n");
		document.write("width: "+hmWidth[i]+"px;\n");
		} else {
			if (globalConfig[M_TYPE] == 2){
				document.write("vertical-align: bottom;\n");
			} else {
				document.write("vertical-align: top;\n");
			}
			document.write("height: "+hmHeight[i]+"px;\n");
		}
		if (i == hmActive){
			if (!(hmColHg[i][0] == "" || hmColHg[i][0] == null || hmColHg[i][0] == "#")){
				document.write("background-color: "+hmColHg[i][0]+";\n");
			} 
			if (!(hmImgHg[i][0] == "" || hmImgHg[i][0] == null || hmImgHg[i][0] == "#")){
				document.write("background-image: url("+hmImgHg[i][0]+");\n");
				document.write("background-repeat: no-repeat;\n");
				document.write("background-position: 0px 0px;\n");
			}
		} else {
			if (!(hmColHg[i][1] == "" || hmColHg[i][1] == null || hmColHg[i][1] == "#")){
				document.write("background-color: "+hmColHg[i][1]+";\n");
			}
			if (!(hmImgHg[i][1] == "" || hmImgHg[i][1] == null || hmImgHg[i][1] == "#")){
				document.write("background-image: url("+hmImgHg[i][1]+");\n");
				document.write("background-repeat: no-repeat;\n");
				document.write("background-position: 0px 0px;\n");
			}
		}
		
		document.write("}\n\n");
		
				
		document.write("#"+HAUPT_TD+x+"_"+i+" a {\n");
		var isSet = false;
		if (i == hmActive){
			if (!(hmColFont[i][0] == "" || hmColFont[i][0] == null || hmColFont[i][0] == "#")){
				document.write("color: "+hmColFont[i][0]+";\n");
			}
			/*if (!(hmColHg[i][0] == "" || hmColHg[i][0] == null || hmColHg[i][0] == "#")){
				document.write("background-color: "+hmColHg[i][0]+";\n");
			}*/
			isSet = true;
		} else {
			if (hmURL[i] == null){	
				var a = 0;
				while (a < smURL[i].length){
					if (smURL[i][a] == thisPath){
						if (!(hmColFont[i][0] == "" || hmColFont[i][0] == null || hmColFont[i][0] == "#")){
							document.write("color: "+hmColFont[i][0]+";\n");
						}
						/*if (!(hmColHg[i][0] == "" || hmColHg[i][0] == null || hmColHg[i][0] == "#")){
							document.write("background-color: "+hmColHg[i][0]+";\n");
						}*/
						isSet = true;
					}
					a++;
				}
			}			
		}
		if (!isSet){
			if (!(hmColFont[i][1] == "" || hmColFont[i][1] == null || hmColFont[i][1] == "#")){
				document.write("color: "+hmColFont[i][1]+";\n");
			}
			/*if (!(hmColHg[i][1] == "" || hmColHg[i][1] == null || hmColHg[i][1] == "#")){
				document.write("background-color: "+hmColHg[i][1]+";\n");
			}*/
		}
		document.write("text-decoration: none;\n");
		document.write("}\n\n");
		
		document.write("#"+HAUPT_TD+x+"_"+i+" a:hover {\n");
		if (!(hmColFont[i][0] == "" || hmColFont[i][0] == null || hmColFont[i][0] == "#")){
			document.write("color: "+hmColFont[i][0]+";\n");
		}
		/*if (!(hmColHg[i][0] == "" || hmColHg[i][0] == null || hmColHg[i][0] == "#")){
			document.write("background-color: "+hmColHg[i][0]+";\n");
		}*/
		document.write("text-decoration: underline;\n");
		document.write("}\n\n");
		
		document.write("#"+HAUPT_TD+x+"_"+i+" a:active {\n");
		if (!(hmColFont[i][0] == "" || hmColFont[i][0] == null || hmColFont[i][0] == "#")){
			document.write("color: "+hmColFont[i][0]+";\n");
		}
		/*if (!(hmColHg[i][0] == "" || hmColHg[i][0]  == null || hmColHg[i][0] == "#")){
			document.write("background-color: "+hmColHg[i][0]+";\n");
		}*/
		document.write("text-decoration: underline;\n");
		document.write("}\n\n");
			
		i++;
	}
	
// *****************************************************************************************
// Submenue  (2. Navigationsebene)
// *****************************************************************************************
	
	// .SUB_CLASS
	document.write("."+SUB_CLASS+" {\n");
	document.write("visibility: visible;\n");
	document.write("font-family: Verdana, Arial, Helvetica, sans-serif;\n");
	document.write("font-size: "+globalConfig[SM_TXT]+"px;\n");
	document.write("font-weight: bold;\n");
	if (!(globalConfig[SM_COLHG] == "" || globalConfig[SM_COLHG] == null || globalConfig[SM_COLHG] == "#")){
		document.write("background-color: "+globalConfig[SM_COLHG]+";\n");
	}
	if (!(globalConfig[SM_COLFONT] == "" || globalConfig[SM_COLFONT] == null || globalConfig[SM_COLFONT]  == "#")){
		document.write("color: "+globalConfig[SM_COLFONT]+";\n");
	}
	if (globalConfig[SM_RICHTUNG] == "x"){
		document.write("vertical-align: middle;\n");
	} else {
		document.write("vertical-align: middle;\n");
	}
	if (globalConfig[M_TYPE] == 0){
		document.write("position: absolute;\n");
	}
	
	document.write("width: "+globalConfig[SM_W]+"px;\n");
	document.write("min-width: "+globalConfig[SM_W]+"px;\n");
	document.write("}\n\n");
	
	var thisSmPosX = 0;
	var thisSmPosY = 0;
	var j = 0;
	while (j < hmTitel.length){
		if (hmSmTrue[j]){
			// .subMenue
			document.write(".subMenue_"+j+" {\n");
			if(!(globalConfig[SM_BORDER] == "" || globalConfig[SM_COLBORDER] == null || globalConfig[SM_COLBORDER] == "#")){
				document.write("border: "+globalConfig[SM_BORDER]+"px solid "+globalConfig[SM_COLBORDER] +";\n");	
			} else {
				document.write("border: "+globalConfig[SM_BORDER]+"px solid;\n");
			}
			
			
			if (!(globalConfig[SM_COLHG] == "" || globalConfig[SM_COLHG] == null || globalConfig[SM_COLHG] == "#")){
				document.write("background-color: "+globalConfig[SM_COLHG]+";\n");
			}
			if (!(globalConfig[SM_COLFONT] == "" || globalConfig[SM_COLFONT] == null || globalConfig[SM_COLFONT]  == "#")){
				document.write("color: "+globalConfig[SM_COLFONT]+";\n");
			}
			
			if (globalConfig[SM_RICHTUNG] == "x"){
				document.write("vertical-align: middle;\n");
				document.write("height: "+globalConfig[SM_H]+"px;\n");
			} else {
				//document.write("vertical-align: top;\n");
				document.write("width: "+globalConfig[SM_W]+"px;\n");
				document.write("min-width: "+globalConfig[SM_W]+"px;\n");
			}
			document.write("}\n\n");
			
			// .subMenue_active
			document.write(".subMenue_"+j+"_active {\n");
			if(!(globalConfig[SM_BORDER] == "" || globalConfig[SM_COLBORDER] == null || globalConfig[SM_COLBORDER] == "#")){
				document.write("border: "+globalConfig[SM_BORDER]+"px solid "+globalConfig[SM_COLBORDER] +";\n");	
			} else {
				document.write("border: "+globalConfig[SM_BORDER]+"px solid;\n");
			}
			
			if (!(globalConfig[SM_COLFONTAKT] == "" || globalConfig[SM_COLFONTAKT] == null || globalConfig[SM_COLFONTAKT]  == "#")){
				document.write("color: "+globalConfig[SM_COLFONTAKT]+";\n");
			}
			
			if (globalConfig[SM_RICHTUNG] == "x"){
				document.write("vertical-align: middle;\n");
				document.write("height: "+globalConfig[SM_H]+"px;\n");
			} else {
				//document.write("vertical-align: top;\n");
				document.write("width: "+globalConfig[SM_W]+"px;\n");
				document.write("min-width: "+globalConfig[SM_W]+"px;\n");
			}
			document.write("}\n\n");
			
			
			
			if (globalConfig[M_TYPE] == 2){
				// #SUB_ID_COLLAPS
				document.write("#"+SUB_ID_COLLAPS+x+"_"+j+" {\n");
				document.write("display: none;\n");
				document.write("}\n\n");
			}
			
			
			// #SUB_ID
			document.write("#"+SUB_ID+x+"_"+j+" {\n");			
			if (globalConfig[M_TYPE] == 0){ // Submenue relativ zu Hauptmenue
				if (globalConfig[SM_RICHTUNG] == "x"){
					if (j == 0){
						 thisSmPosX = globalConfig[HM_POSX];
						 //alert("#"+SUB_ID+x+"_"+j+": thisSmPosX: "+thisSmPosX+" + "+smInset[j]+"="+(thisSmPosX + smInset[j]));
					} else {
						thisSmPosX = thisSmPosX + hmWidth[j-1];
						if (!(globalConfig[SEP_W] == "" || globalConfig[SEP_W] == null || globalConfig[SEP_W] == 0)){
							thisSmPosX = thisSmPosX + globalConfig[SEP_W] ;
						}
						//alert("#"+SUB_ID+x+"_"+j+": thisSmPosX: "+thisSmPosX+" + "+smInset[j]+"="+(thisSmPosX + smInset[j])+"\n hmWidth["+(j-1)+"]: "+hmWidth[j-1]);
					}
					document.write("left: "+(thisSmPosX + smInset[j])+"px;\n");
					
					thisSmPosY = globalConfig[HM_POSY]+globalConfig[HM_H]+2*globalConfig[HM_BORDER]+globalConfig[M_DIST];
					document.write("top: "+thisSmPosY+"px;\n");
					//alert("top: "+thisSmPosY+"px\nleft:"+thisSmPosX+"px");
										
				} else {
					thisSmPosX = globalConfig[HM_POSX]+globalConfig[HM_W]+2*globalConfig[HM_BORDER]+globalConfig[M_DIST];
					document.write("left: "+thisSmPosX+"px;\n");
					
					if (j == 0){
						 thisSmPosY = globalConfig[HM_POSY] ;
					} else {
						thisSmPosY = thisSmPosY + hmHeight[j-1];
						if (!(globalConfig[SEP_W] == "" || globalConfig[SEP_W] == null || globalConfig[SEP_W] == 0)){
							thisSmPosY = thisSmPosY + globalConfig[SEP_W] ;
						}
					}
					document.write("top: "+(thisSmPosY + smInset[j])+"px;\n");
				}
			} else if (globalConfig[M_TYPE] == 1){ // Submenue absolt positioniert
				thisSmPosX = globalConfig[SM_ABSPOSX];
				document.write("left: "+thisSmPosX+"px;\n");
				
				thisSmPosY = globalConfig[SM_ABSPOSY];
				document.write("top: "+thisSmPosY+"px;\n");
			}
			
			if (!(globalConfig[SM_COLHGAKT] == "" || globalConfig[SM_COLHGAKT] == null || globalConfig[SM_COLHGAKT] == "#")){
				document.write("background-color: "+globalConfig[SM_COLHGAKT]+";\n");
			}
			document.write("z-index: "+(x*100+200)+";\n");
			document.write("}\n\n")			
		
			var k = 0;
			while (k < smTitel[j].length){
				// #SUB_TD
				document.write("#"+SUB_TD+x+"_"+j+"_"+k+" {\n");
				document.write("text-align: "+globalConfig[SM_ALIGN]+";\n");
				if (globalConfig[HM_RICHTUNG] == "x"){
					document.write("width: "+smWidth[j][k]+"px;\n");
				} else {
					document.write("height: "+smHeight[j][k]+"px;\n");
				}
				document.write("margin: 0px;\n");
				document.write("padding: "+globalConfig[SM_PADDING]+"px;\n");
				
				if (globalConfig[M_TYPE] == 2){
					if (globalConfig[SM_RICHTUNG] == "y"){
						document.write("padding-left: "+globalConfig[M_DIST]+";\n");
					}
				}	
				document.write("}\n\n")
				
				document.write("#"+SUB_TD+x+"_"+j+"_"+k+" a {\n");
				
				if (j == hmActive && k == smActive){
					if (!(smColFont[j][k][0] == "" || smColFont[j][k][0] == null || smColFont[j][k][0] == "#")){
						document.write("color: "+smColFont[j][k][0]+";\n");
					}
					if (!(smColHg[j][k][0] == "" || smColHg[j][k][0] == null || smColHg[j][k][0] == "#")){
						document.write("background-color: "+smColHg[j][k][0]+";\n");
					}
				} else {
					if (!(smColFont[j][k][1] == "" || smColFont[j][k][1] == null || smColFont[j][k][1] == "#")){
						document.write("color: "+smColFont[j][k][1]+";\n");
					}
					if (!(smColHg[j][k][1] == "" || smColHg[j][k][1] == null || smColHg[j][k][1] == "#")){
						document.write("background-color: "+smColHg[j][k][1]+";\n");
					}
				}
				document.write("text-decoration: none;\n");
				document.write("}\n\n");
				
				document.write("#"+SUB_TD+x+"_"+j+"_"+k+" a:hover {\n");
				if (!(smColFont[j][k][0] == "" || smColFont[j][k][0] == null || smColFont[j][k][0] == "#")){
					document.write("color: "+smColFont[j][k][0]+";\n");
				}
				if (!(smColHg[j][k][0] == "" || smColHg[j][k][0] == null || smColHg[j][k][0] == "#")){
					document.write("background-color: "+smColHg[j][k][0]+";\n");
				}
				document.write("text-decoration: underline;\n");
				document.write("}\n\n");
				
				document.write("#"+SUB_TD+x+"_"+j+"_"+k+" a:active {\n");
				if (!(smColFont[j][k][0] == "" || smColFont[j][k][0] == null || smColFont[j][k][0] == "#")){
					document.write("color: "+smColFont[j][k][0]+";\n");
				}
				if (!(smColHg[j][k][0] == "" || smColHg[j][k][0] == null || smColHg[j][k][0] == "#")){
					document.write("background-color: "+smColHg[j][k][0]+";\n");
				}
				document.write("text-decoration: underline;\n");
				document.write("}\n\n");

				k++;
			}
		} else {
			if (j == 0){
				thisSmPosX = globalConfig[HM_POSX] ;
				thisSmPosY = globalConfig[HM_POSY] ;
			} else {
				thisSmPosX = thisSmPosX + hmWidth[j-1];
				if (!(globalConfig[SEP_W] == "" || globalConfig[SEP_W] == null || globalConfig[SEP_W] == 0)){
					thisSmPosX = thisSmPosX + globalConfig[SEP_W] ;
				}
				thisSmPosY = thisSmPosY+ hmHeight[j-1];
				if (!(globalConfig[SEP_W] == "" || globalConfig[SEP_W] == null || globalConfig[SEP_W] == 0)){
					thisSmPosY = thisSmPosY + globalConfig[SEP_W] ;
				}
			}
		}
		j++;
	}
	
	x++;
}



	
// *****************************************************************************************
// Submenue 2 (3. Navigationsebene)
// *****************************************************************************************

// .TABNav3
document.write("."+SUB2_TAB+" {\n");
document.write("border: "+globalConfig[SM2_BORDER]+"px;\n");
//document.write("width: "+(globalConfig[SM2_TDWIDTH]*(thisSub2Array.length/globalConfig[SM2_MAXTR]))+"px;\n");
document.write("height: "+globalConfig[SM2_TDHEIGHT]*globalConfig[SM2_MAXTR]+"px;\n");	
document.write("}\n\n");

//.TDNav3
document.write("."+SUB2_TD+" {\n");
document.write("text-align: "+globalConfig[SM2_ALIGN]+";\n");
document.write("vertical-align: "+globalConfig[SM2_ALIGNV]+";\n");
document.write("padding: "+globalConfig[SM2_PADDING]+"px;\n");
document.write("}\n\n");

//.TxtNav3
document.write("."+SUB2_TXT+" {\n");
document.write("font-weight: bold;\n");
document.write("font-size: "+globalConfig[SM2_TXT]+"px;\n");
document.write("color: "+globalConfig[SM2_COLFONT]+";\n");
document.write("text-align: "+globalConfig[SM2_ALIGN]+";\n");
document.write("vertical-align: "+globalConfig[SM2_ALIGNV]+";\n");
document.write("height: "+globalConfig[SM2_TDHEIGHT]+"px;\n");
document.write("width: "+globalConfig[SM2_TDWIDTH]+"px;\n");
document.write("}\n\n");

//.TxtNav3Aktiv
document.write("."+SUB2_TXTAKTIV+" {\n");
document.write("font-size: "+globalConfig[SM2_TXT]+"px;\n");
document.write("font-weight: bold;\n");

document.write("color: "+globalConfig[SM2_COLFONTAKT]+";\n");
document.write("text-align: "+globalConfig[SM2_ALIGN]+";\n");
document.write("vertical-align: "+globalConfig[SM2_ALIGNV]+";\n");
document.write("height: "+globalConfig[SM2_TDHEIGHT]+"px;\n");
document.write("width: "+globalConfig[SM2_TDWIDTH]+"px;\n");
document.write("}\n\n");


document.write("#"+SUB2_TXT+" a {\n");
if (!(globalConfig[SM2_COLFONT] == "" || globalConfig[SM2_COLFONT] == null || globalConfig[SM2_COLFONT] == "#")){
	document.write("color: "+globalConfig[SM2_COLFONT]+";\n");
}
if (!(globalConfig[SM2_COLHG] == "" || globalConfig[SM2_COLHG] == null || globalConfig[SM2_COLHG] == "#")){
	document.write("background-color: "+globalConfig[SM2_COLHG]+";\n");
}
document.write("text-decoration: none;\n");
document.write("}\n\n");
				
				
document.write("#"+SUB2_TXT+" a:hover {\n");
if (!(globalConfig[SM2_COLFONTAKT] == "" || globalConfig[SM2_COLFONTAKT] == null || globalConfig[SM2_COLFONTAKT] == "#")){
	document.write("color: "+globalConfig[SM2_COLFONTAKT]+";\n");
}
if (!(globalConfig[SM2_COLHGAKT] == "" || globalConfig[SM2_COLHGAKT] == null || globalConfig[SM2_COLHGAKT] == "#")){
	document.write("background-color: "+globalConfig[SM2_COLHGAKT]+";\n");
}
document.write("text-decoration: underline;\n");
document.write("}\n\n");
				
document.write("#"+SUB2_TXT+" a:active {\n");
if (!(globalConfig[SM2_COLFONT] == "" || globalConfig[SM2_COLFONT] == null || globalConfig[SM2_COLFONT] == "#")){
	document.write("color: "+globalConfig[SM2_COLFONT]+";\n");
}
if (!(globalConfig[SM2_COLHG] == "" || globalConfig[SM2_COLHG] == null || globalConfig[SM2_COLHG] == "#")){
	document.write("background-color: "+globalConfig[SM2_COLHG]+";\n");
}
document.write("text-decoration: underline;\n");
document.write("}\n\n");


document.write("-->\n");
document.write("</style>\n");