// -----------------------------------------------------
// intern
// -----------------------------------------------------
	
var hmTitel = new Array();
var smTitel = null;

var hmSmTrue = new Array();
	
var hmURL = new Array();
var smURL = null;
	
var hmTarget = new Array();
var smTarget = null;

var hmWidth = new Array();
var smWidth = null;

var hmHeight = new Array();
var smHeight = null;

var smInset = new Array();
	
var hmColFont = new Array();
var smColFont = null;
	
var hmColHg = new Array();
var smColHg = null;
	
var hmImgHg = new Array();
var smImgHg = null;

var pageTitel = new Array();

var pageImg = new Array();

var hmPos = new Array();
var smPos = null;
	
var hauptMenue = new Array();
var subMenue = new Array();
var sub2Menue = new Array();

var hauptMenueCount = -1;

var HAUPT_ID = "hauptId_";
var HAUPT_CLASS = "hauptMenue";
var HAUPT_TR = "hauptTR_";
var HAUPT_TD = "hauptTD_";
var SUB_ID = "subId_";
var SUB_CLASS = "subMenue";
var SUB_TD = "subTD_";
var SUB2_TAB = "TABNav3";
var SUB2_TD = "TDNav3";
var SUB2_TXT = "TxtNav3";
var SUB2_TXTAKTIV = "TxtNav3Aktiv";
var SUB_ID_COLLAPS = "subIdCol_";

var browser = navigator.appName;	

var HM_POSX = 0;           // Startposition des Hauptmenüs x-Achse in Pixel
var HM_POSY = 1;           // Startposition des Hauptmenüs y-Achse in Pixel
var HM_W = 2;              // Breite der Hauptmenüs in Pixel
var HM_H = 3;              // Höhe der Hauptmenüs in Pixel
var HM_TXT = 4;           // Textgröße Hauptmenü
var HM_ALIGN = 5;          // Textausrichtung Hauptmenue ("left" [standard], "center", "right")
var HM_BORDER = 6;         // Rahmenbreite Hauptmenü
var HM_PADDING = 7;        // Abstand Text Rahmen in Pixel (padding)
var HM_RICHTUNG = 8;      // Ausrichtung des Hauptmenüs
var HM_COLFONT = 9;       // Textfarbe Hauptmenü (colFontHM)
var HM_COLHG = 10;         // Hintergrundfarbe Hauptmenü (colHgHM)
var HM_COLFONTAKT = 11;    // Farbe der Schrift wenn Hauptmenüpunkt aktiv (colFontAktH)
var HM_COLFONTPAS = 12;    // Farbe der Schrift wenn Hauptmenüpunkt inaktiv (colFontPasH)
var HM_COLHGAKT = 13;      // Hintergrundfarbe des aktiven Hauptmenüpunktes (colHgAktH)
var HM_COLHGPAS = 14;      // Hintergrundfarbe des inaktiven Hauptmenüpunktes (colHgPasH)
var HM_IMGHGAKT = 15;      // Hintergrundbild des aktiven Hauptmenüpunktes (imgHgAktH)
var HM_IMGHGPAS = 16;      // Hintergrundbild des inaktiven Hauptmenüpunktes (imgHgPasH)
var HM_COLBORDER = 17;     // Rahmenfarbe Hauptmenü
var M_DIST = 18;           // Abstand zwischen Hauptmenü und Submenü
var M_TYPE = 19;           // Menütyp (Ausrichtung des Submenüs zu dem zugehörigen Hauptmenüpunkt)
var SM_ABSPOSX =20;           // Menütyp 1: Startposition des Submenüs x-Achse in Pixel
var SM_ABSPOSY = 21;           // Menütyp 1: Startposition des Submenüs y-Achse in Pixel
var SM_W = 22;              // Breite der Submenüs in Pixel
var SM_H = 23;              // Höhe der Submenüs in Pixel
var SM_TXT = 24;           // Textgröße Submenü
var SM_ALIGN = 25;          // Textausrichtung Submenue ("left" [standard], "center", "right")
var SM_BORDER = 26;        // Rahmenbreite Submenü
var SM_PADDING = 27;        // Abstand Text Rahmen in Pixel (padding)
var SM_RICHTUNG = 28;      // Ausrichtung der Submenüs
var SM_INSET = 29;       // zusätzliche Einrückung des Submenü
var SM_COLFONT = 30;         // Textfarbe Submenü
var SM_COLHG = 31;         // Hintergrundfarbe Submenü
var SM_COLFONTAKT = 32;    // Farbe der Schrift wenn Submenüpunkt aktiv (colFontAktS)
var SM_COLFONTPAS = 33;    // Farbe der Schrift wenn Submenüpunkt inaktiv (colFontPasS)
var SM_COLHGAKT = 34;      // Hintergrundfarbe des aktiven Submenüpunktes (colHgAktS)
var SM_COLHGPAS = 35;      // Hintergrundfarbe des inaktiven Submenüpunktes (colHgPasS)
var SM_IMGHGAKT = 36;      // Hintergrundbild des aktiven Submenüpunktes (imgHgAktS)
var SM_IMGHGPAS = 37;      // Hintergrundbild des inaktiven Submenüpunktes (imgHgPasS)
var SM_COLBORDER = 38;     // Rahmenfarbe Submenü
var SM2_MAXTR = 39;        // maximale Zeilenzahl für die 3. Navigationsebene
var SM2_TDWIDTH = 40;      // Breite der Zelle der 3. NavEbene in Pixel
var SM2_TDHEIGHT = 41;     // Höhe der Zelle der 3. NavEbene in Pixel
var SM2_TXT = 42;          // Textgröße Submenü
var SM2_ALIGN = 43;        // Textausrichtung Sub2menue ("left" [standard], "center", "right")
var SM2_ALIGNV = 44;        // Textausrichtung Sub2menue ("left" [standard], "center", "right")
var SM2_BORDER = 45;       // Tabellenrahmenbreite der 3. NavEbene in Pixel
var SM2_PADDING = 46;      // Abstand Text Rahmen in Pixek (padding)
var SM2_COLFONT = 47;         // Textfarbe Submenü2
var SM2_COLHG = 48;         // Hintergrundfarbe Submenü2
var SM2_COLFONTAKT = 49;    // Farbe der Schrift wenn Submenüpunkt2 aktiv (colFontAktS)
var SM2_COLFONTPAS = 50;    // Farbe der Schrift wenn Submenüpunkt2 inaktiv (colFontPasS)
var SM2_COLHGAKT = 51;      // Hintergrundfarbe des aktiven Submenüpunktes2 (colHgAktS)
var SM2_COLHGPAS = 25;      // Hintergrundfarbe des inaktiven Submenüpunktes2 (colHgPasS)
var SM2_IMGHGAKT = 35;      // Hintergrundbild des aktiven Submenüpunktes2 (imgHgAktS)
var SM2_IMGHGPAS = 45;      // Hintergrundbild des inaktiven Submenüpunktes2 (imgHgPasS)
var SM2_COLBORDER = 55;     // Rahmenfarbe Submenü2
var SEP = 56;              // Menue Separator
var SEP_W = 57;            // Separatorbreite in Pixel
var PAGETITLE = 58;         // Standardseitentitel
var NAVTIMER = 59;         // Zeitverzögerung des Menüs in Millisekunden


var thisDomain = "";       // URL bis zum Unterordnet wo Navigation gültig ist
var pathToRoot ="";
var thisPath ="";
var hmFolder = "";
var smFolder = "";
var sm2Path = "";

var hmActive = -1;
var smActive = -1;

var hmIndex = -1;
var lastHmIndex = -1;
var smIndex = -1;
var lastSmIndex = -1;

var thisColorIndex = 5;


function setPaths(){
	folderURLs = getHmSmFolder(thisURL = document.URL);
	hmFolder = folderURLs[0];
	smFolder = folderURLs[1];
	pathToRoot = folderURLs[2];
	thisPath = folderURLs[3];
	sm2Path = folderURLs[4];
}


/*
 * Setzt den Navigations_Unterordner
 */
function setDomain(value){
	thisDomain = value;
}

/*
 * Berechnet den Farbindex
 */
function setColorIndex(){
	if (globalColorSet.length > 1){
		thisColorIndex = Math.round(globalColorSet.length*Math.random())-1;
		if (thisColorIndex < 0){thisColorIndex = 0};
	}
}

	
/*
 * Schreibt die Daten eines Hauptmenüpunktes
 */
hauptMenue[0] = 1;
if (globalConfig[SEP] == null){
	globalConfig[SEP] = "";
}

if (globalConfig[SEP] == ""){
	globalConfig[SEP_W] = 0;
}

function addHM(titel, url, target, width, height, inset, colFontA, colFontP, colHgA, colHgP, imgHgA, imgHgP, thisPageTitle, thisPageImg){
	if (hmIndex == lastHmIndex){
		hmIndex++;
		smIndex = -1;
		lastSmIndex = -1;
	}
	
	hmSmTrue[hmIndex] = false;
	
	if (hmIndex > hauptMenueCount){
		hauptMenueCount = hmIndex;
	}
	
	var hmPos = hmTitel.length;
	
	// Titel
	if (titel == "" || titel == null){
		hmTitel[hmPos] = "";
	} else {
		hmTitel[hmPos] = titel;
	}
	if (smTitel == null){
		smTitel = new Array();
	}
	smTitel[hmPos] = new Array();
	
	// URL
	if (url == "" || url == null){
		hmURL[hmPos] = null;
	} else {
		if (url.search(":") != -1){
			hmURL[hmPos] = url;
		} else {
			hmURL[hmPos] = pathToRoot+url;
		}
	}
	
	subMenue[hmPos] = SUB_ID+hmPos;
	
	/*
	if (url == "" || url == null){
		hmURL[hmPos] = null;
		subMenue[hmPos] = SUB_ID+hmPos;
	} else {
		if (url.search(":") != -1){
			hmURL[hmPos] = url;
		} else {
			hmURL[hmPos] = pathToRoot+url;
		}
		subMenue[hmPos] = null;
	}
	*/


	if (smURL == null){
		smURL = new Array();
	}
	smURL[hmPos] = new Array();
	
	// Target
	if (target == "" || target == null){
		hmTarget[hmPos] = "_self";
	} else {
		hmTarget[hmPos] = target;
	}
	if (smTarget == null){
		smTarget = new Array();
	}
	smTarget[hmPos] = new Array();
	
	// Width
	if (width == 0 || width == "" || width == null){
		hmWidth[hmPos] = globalConfig[HM_W];
	} else {
		hmWidth[hmPos] = width;
	}
	if (smWidth == null){
		smWidth = new Array();
	}
	smWidth[hmPos] = new Array();
	
	// Height
	if (height == 0 || height == "" || height == null){
		hmHeight[hmPos] = globalConfig[HM_H];
	} else {
		hmHeight[hmPos] = height;
	}
	if (smHeight == null){
		smHeight = new Array();
	}
	smHeight[hmPos] = new Array();
	
	// Inset
	if (inset == 0 || inset == "" || inset == null){
		smInset[hmPos] = globalConfig[SM_INSET];
	} else {
		smInset[hmPos] = inset;
	}
	
	// Schriftfarben (Aktiv / Passiv)
	var thisColFont = new Array();
	if (colFontA == "" || colFontA == null){
		thisColFont[0] = globalConfig[HM_COLFONTAKT];
	} else {
		thisColFont[0] = colFontA;
	}
	if (colFontP == "" || colFontP == null){
		thisColFont[1] = globalConfig[HM_COLFONTPAS];
	} else {
		thisColFont[1] = colFontP;
	}
	hmColFont[hmPos] = thisColFont;
	if (smColFont == null){
		smColFont = new Array();
	}
	smColFont[hmPos] = new Array();
	
	// Hintergrundfarben (Aktiv / Passiv)
	var thisColHg = new Array();
	if (colHgA == "" || colHgA == null){
		thisColHg[0] = globalConfig[HM_COLHGAKT];
	} else {
		thisColHg[0] = colHgA;
	}
	if (colHgP == "" || colHgP == null){
		thisColHg[1] = globalConfig[HM_COLHGPAS];
	} else {
		thisColHg[1] = colHgP;
	}
	hmColHg[hmPos] = thisColHg;
	if (smColHg == null){
		smColHg = new Array();
	}
	smColHg[hmPos] = new Array();
	
	// Hintergrundbild (Aktive / Passiv)
	var thisImgHg = new Array();
	if (imgHgA == "" || imgHgA == null){
		thisImgHg[0] = pathToRoot+globalConfig[HM_IMGHGAKT];
	} else {
		thisImgHg[0] = pathToRoot+imgHgA;
	}
	if (imgHgP == "" || imgHgP == null){
		thisImgHg[1] = pathToRoot+globalConfig[HM_IMGHGPAS];
	} else {
		thisImgHg[1] = pathToRoot+imgHgP;
	}
	hmImgHg[hmPos] = thisImgHg;
	if (smImgHg == null){
		smImgHg = new Array();
	}
	smImgHg[hmPos] = new Array();
	
	sub2Menue.push(new Array());
	
	// Seitentitel
	if (thisPageTitle == "" || thisPageTitle == null){
		pageTitel.push(new Array(hmIndex, smIndex, globalConfig[PAGETITLE]));
	} else {
		pageTitel.push(new Array(hmIndex, smIndex, thisPageTitle));
	}
	
	// Seitenbild
	if (thisPageImg == "" || thisPageImg == null){
		pageImg.push(new Array(hmIndex, smIndex, null));
	} else {
		pageImg.push(new Array(hmIndex, smIndex, thisPageImg));
	}
	
	lastHmIndex++;
	
	//alert("pathToRoot: "+pathToRoot+"\nimgHgA: "+imgHgA+"\nimgHgP: "+imgHgP+"\nhmImgHg[0]: "+hmImgHg[hmPos][0]+"\nhmImgHg[1]: "+hmImgHg[hmPos][1]);
	
	//alert(hmPos+"\nthisPath == url: "+thisPath+" = "+url+"\nhmActive: "+hmActive+"\nsmActive: "+smActive);
	
	//alert("Hauptmenü: "+hmTitel+"\n"+hmURL+"\n"+hmTarget+"\n"+hmColFont+"\n"+hmColHg);
}
	

/*
 * Schreibt die Daten eines Submenüpunktes
 */
function addSM(titel, url, target, width, height, colFontA, colFontP, colHgA, colHgP, imgHgA, imgHgP, thisPageTitle, thisPageImg){	
	if (smIndex == -1){
		hmSmTrue[hmIndex] = true;
	}
	
	if (smIndex == lastSmIndex){
		smIndex++;
	}
	
	//var smPos = smTitel[hmIndex].length;
	
	// Titel
	if (titel == "" || titel == null){
		smTitel[hmIndex][smIndex] = "";
	} else {
		smTitel[hmIndex][smIndex] = titel;
	}
	
	// URL
	if (url == "" || url == null){
		smURL[hmIndex][smIndex] = "#";
	} else {if (url.search(":") != -1){
			smURL[hmIndex][smIndex] = url;
		} else {
			smURL[hmIndex][smIndex] = pathToRoot+url;
		}
		if (thisPath == pathToRoot+url){
			hmActive = hmPos;
			if (url.indexOf(smFolder) != -1){
				smActive = smIndex;
			}
		}
	}
	
	// Target
	if (target == "" || target == null){
		smTarget[hmIndex][smIndex] = "_self";
	} else {
		smTarget[hmIndex][smIndex] = target;
	}
	
	// Width
	if (width == 0 || width == "" || width == null){
		smWidth[hmIndex][smIndex] = globalConfig[SM_W];
	} else {
		smWidth[hmIndex][smIndex] = width;
	}
	
	// Height
	if (height == 0 || height == "" || height == null){
		smHeight[hmIndex][smIndex] = globalConfig[SM_H];
	} else {
		smHeight[hmIndex][smIndex] = height;
	}
	
	// Schriftfarben (Aktiv / Passiv)
	var thisColFont = new Array();
	if (colFontA == "" || colFontA == null){
		thisColFont[0] = globalConfig[SM_COLFONTAKT];
	} else {
		thisColFont[0] = colFontA;
	}
	if (colFontP == "" || colFontP == null){
		thisColFont[1] = globalConfig[SM_COLFONTPAS];
	} else {
		thisColFont[1] = colFontP;
	}
	smColFont[hmIndex][smIndex] = thisColFont;
	
	// Hintergrundfarben (Aktiv / Passiv)
	var thisColHg = new Array();
	if (colHgA == "" || colHgA == null){
		thisColHg[0] = globalConfig[SM_COLHGAKT];
	} else {
		thisColHg[0] = colHgA;
	}
	if (colHgP == "" || colHgP == null){
		thisColHg[1] = globalConfig[SM_COLHGPAS];
	} else {
		thisColHg[1] = colHgP;
	}
	smColHg[hmIndex][smIndex] = thisColHg;
	
	// Hintergrundbild (Aktiv / Passiv)
	var thisImgHg = new Array();
	if (imgHgA == "" || imgHgA == null){
		thisImgHg[0] = pathToRoot+globalConfig[SM_IMGHGAKT];
	} else {
		thisImgHg[0] = pathToRoot+imgHgA;
	}
	if (imgHgP == "" || imgHgP == null){
		thisImgHg[1] = pathToRoot+globalConfig[SM_IMGHGPAS];
	} else {
		thisImgHg[1] = pathToRoot+imgHgP;
	}
	smImgHg[hmIndex][smIndex] = thisImgHg;
	
	// Seitentitel
	if (thisPageTitle == "" || thisPageTitle == null){
		pageTitel.push(new Array(hmIndex, smIndex, globalConfig[PAGETITLE]));
	} else {
		pageTitel.push(new Array(hmIndex, smIndex, thisPageTitle));
	}
	
	
	// Seitenbild
	if (thisPageImg == "" || thisPageImg == null){
		pageImg.push(new Array(hmIndex, smIndex, null));
	} else {
		pageImg.push(new Array(hmIndex, smIndex, thisPageImg));
	}
	
	lastSmIndex++;
	
	
	//alert(hmPos+"\nthisPath == url: "+thisPath+" = "+url+"\nhmActive: "+hmActive+"\nsmActive: "+smActive);
	
	//alert("Submenü "+hmPos+": "+smTitel+"\n"+smURL+"\n"+smTarget+"\n"+smColFont+"\n"+smColHg);
}


function addSM2(sub2Txt,sub2Url,thisPageTitle,thisPageImg){
	if (thisPageTitle == null){thisPageTitle = globalConfig[PAGETITLE];}
	if (thisPageImg == ""){thisPageImg = null;}
	if (sub2Url == null){sub2Url = "#";}
	if (sub2Txt == null){sub2Txt = "link";}
	
	sub2Menue.push(new Array(hmIndex, smIndex, thisPageTitle, sub2Url, sub2Txt, thisPageImg));
}


function getHmSmFolder(thisURL){
	var lastDotPos = thisURL.lastIndexOf(".");
	var thisPath = thisURL.substr(0, lastDotPos);
	var urlDotPos = thisURL.substr(0, lastDotPos).lastIndexOf(".");
	thisPath = thisURL.substr(urlDotPos+1, thisURL.length-1);
	thisPath = thisPath.substr(thisPath.indexOf("/"));
	var indexAnchor = thisPath.indexOf("#");
	if (indexAnchor > 0){
		thisPath = thisPath.substr(0, thisPath.indexOf("#"));
	}
	var thisPathToRoot = thisDomain.slice(thisDomain.indexOf("/"));
	thisPathToRoot = thisPathToRoot.substr(0, thisPathToRoot.lastIndexOf("/"));
	var thisHmFolder = thisPath.substr(thisPathToRoot.length);
	thisHmFolder = thisHmFolder.substr(1);
	thisHmFolder = "/" + thisHmFolder.substr(0, thisHmFolder.indexOf("/"));
	var thisSmFolder = thisPath.substr((thisPath.indexOf(thisHmFolder))+thisHmFolder.length);
	thisSmFolder = thisSmFolder.substr(1);
	thisSmFolder = "/" + thisSmFolder.substr(0, thisSmFolder.indexOf("/"))+"/";
	calcLength = ((thisPath.indexOf(thisHmFolder))+thisHmFolder.length)+(thisSmFolder.length);
	if (thisSmFolder.length > 1){
		calcLength++;
	}
	var thisSm2Path = thisPath.substr(calcLength-1);
	
	//alert("setupMenue\nthisURL: "+thisURL+"\nthisPath: "+thisPath+"\nthisPathToRoot: "+thisPathToRoot+"\nthisHmFolder: "+thisHmFolder+"\nthisSmFolder: "+thisSmFolder+"\nthisSm2Path: "+thisSm2Path);
	
	returnValue = new Array();
	returnValue[0] = thisHmFolder;
	returnValue[1] = thisSmFolder;
	returnValue[2] = thisPathToRoot;
	returnValue[3] = thisPath;
	returnValue[4] = thisSm2Path;
	
	return returnValue;
}



function setMenueIndex(){

	i = 0;
	while (i < hmURL.length){
		hmURLToTest = hmURL[i];
		if (hmURLToTest == null){
			hmURLToTest = smURL[i][0];
		}
		thisPaths = getHmSmFolder(hmURLToTest);
		
		if (thisPaths[0] == hmFolder){
			hmActive = i;
			smActive = -1;
			//alert("hm\n"+thisPaths[0]+" == "+hmFolder+" ("+i+")");
		}
		
		i++;
	}
	
	if (hmActive != -1){
		
		a = 0;
		while (a < smURL[hmActive].length){
			thisPaths = getHmSmFolder(smURL[hmActive][a])
			//alert("sm\n"+thisPaths[1]+" == "+smFolder+" ("+a+")");
			if (thisPaths[1] == smFolder){
				smActive = a;
			}
			a++;
		}
	}
	//alert(hmActive+" | "+smActive);
}


// -----------------------------------------------------------------------------------------------------
// Menüsteuerung
// -----------------------------------------------------------------------------------------------------

var navClicked = false; // Startwert des Timers
var timerIntervall = globalConfig[NAVTIMER]; // Verzögerungszeit
var countdown;
var hauptMenueSet = -1; // momentan aktives Hauptmenü
var subMenueSet = -1; // momentan aktives Submenü
var hmClicked = false; // wenn Menuemodus == 1

// Aktionen beim Hineinfahren mit der Maus in das Hauptmenü
function setMenue(hmNr, smNr){
	hauptMenueSet = 0;
	sm_Vis(hmNr);
}
	
// Ändert das Submenü
function sm_Change(hmNr, smNr) {
	hauptMenueSet = hmNr;
	subMenueSet = smNr;
	navClicked = true;
	if (globalConfig[M_TYPE] > 0){
		if (hmClicked){
			hmClicked = false;
			sm_Vis(smNr);
			hmClicked = true;
		} else {
			hmClicked = true;
			sm_Vis(smNr);
		}
	} else {
		sm_Vis(smNr);
	}
}

// Ändert das Hauptmenü
function hm_Click(hmNr) {
	hauptMenueSet = hmNr;
	subMenueSet = -1;
	navClicked = true;
	sm_Vis(-1);
}

// Blendet die Untermenüs ein oder aus
function sm_Vis(smNr){
	if (!hmClicked){
		//alert("sm_Vis Start, "+hauptMenueSet+", "+smNr);
		window.clearInterval(countdown);
		if (hauptMenueSet > -1){
			// alle Untermenüs ausblenden
			for (i=0; i<subMenue.length; i++) {
				sm_hide(i);
			}
			
			if (hmSmTrue[smNr] == true) {
				// neues Untermenü einblenden
				sm_show(smNr);
			}
			if (globalConfig[M_TYPE] == 2){
				sm_show(hmActive);
			}
			hauptMenueSet = -1;
		}
		//alert("sm_Vis Ende, "+hauptMenueSet+", "+smNr);
	}
}

// blendet ein Submenü ein
function sm_show(smNr){
//alert("function sm_show(smNr): smNr = "+smNr);
	//if ([smNr] != null) {
	if (hmSmTrue[smNr]) {
	//alert("function sm_show(smNr): subMenue[smNr] = "+subMenue[smNr]);
		if (globalConfig[M_TYPE] == 2){
			var thisType2Object = String(SUB_ID_COLLAPS+0+"_"+smNr);
			var thisEl = getElement("id", thisType2Object);
			//alert("thisType2Object: "+thisType2Object);
			if (NS4) {
				thisEl.display = "block";
			} else {
				thisEl.style.display = "block";
			}
		}
		var thisObject = String(SUB_ID+0+"_"+smNr);
		var thisEl = getElement("id", thisObject);
		//alert("thisObject: "+thisObject);
		if (NS4) {
			thisEl.visibility = "show";
		} else {
			thisEl.style.visibility = "visible";
		}
	}
}

// blendet ein Submenü aus
function sm_hide(smNr){
	//if (subMenue[i] != null) {
	if (hmSmTrue[smNr]) {
		if (globalConfig[M_TYPE] == 2){
			var thisType2Object = String(SUB_ID_COLLAPS+0+"_"+i);
			var thisEl = getElement("id", thisType2Object);
			//alert("thisType2Object: "+thisType2Object);
			if (NS4) {
				thisEl.display = "none";
			} else {
				thisEl.style.display = "none";
			}
		}
		var thisObject = String(SUB_ID+0+"_"+i);
		//alert("sm_hide(smNr); thisObject: "+thisObject);
		var thisEl = getElement("id", thisObject);
		//alert("thisObject: "+thisObject);
		if (NS4) {
			thisEl.visibility = "hide";
		} else {
			thisEl.style.visibility = "hidden";
		}
	}
}

// Aktionen beim Hineinfahren mit der Maus in das Hauptmenü
function hm_Over(hmNr, smNr){
	hauptMenueSet = hmNr;
	//alert("hm_Over; subMenueSet: "+subMenueSet+", hauptMenueSet: "+hauptMenueSet);
	window.clearInterval(countdown);
	sm_Vis(smNr);
}

// Aktionen beim Hinausfahren mit der Maus aus dem Hauptmenü
function hm_Out(hmNr, smNr){
	hauptMenueSet = hmNr;
	//alert("hm_Out; subMenueSet: "+subMenueSet+", hauptMenueSet: "+hauptMenueSet);
	if (!navClicked){
		countdown = window.setInterval("sm_Vis(hmActive)", timerIntervall);
	} else {
		//alert("clicked");
		navClicked = !navClicked;
	}
}

// Aktionen beim Hineinfahren mit der Maus in das Submenü
function sm_Over(hmNr, smNr, smTd){
	hauptMenueSet = hmNr;
	window.clearInterval(countdown);
	sm_Vis(smNr);
}

// Aktionen beim Hinausfahren mit der Maus aus dem Submenü
function sm_Out(hmNr, smNr, smTd){
	hauptMenueSet = hmNr;
	hmClicked = false;
	//alert("sm_Out; subMenueSet: "+subMenueSet+", hauptMenueSet: "+hauptMenueSet);
	if (!navClicked){
		countdown = window.setInterval("sm_Vis(hmActive)", timerIntervall);
	} else {
		//alert("clicked");
		navClicked = !navClicked;
	}
}




// Ändert dern Text in der Statuszeile wenn sie sichtbar ist
function setStatusBar(text){
	if(window.statusbar && window.statusbar.visible == true) {
		window.defaultStatus = Text;
	}
}