			/*************************************
			* Copyright 2002 by Morelogs 
			* @Author: Michael Delamere
			* @Date: 23.06.2002
			* @Version: 0.1
			*
			* Wiederverwendbares Javascript Menu.
			***/

			/*************************************
			* Hole style Object je nach Browsertyp
			* @param String Elementname (div)
			*
			*	@return Object Divelement
			***/
			function getDivElement(elementName) {
				if (navigator.appName == "Microsoft Internet Explorer") {
					return document.all[elementName].style;
				}
				if(navigator.appName == "Netscape") {
					if(parseInt(navigator.appVersion) > 4) {
						return document.getElementById(elementName).style;
					}
					else {
						return document.layers[elementName];
					}
				}
			}

			/*************************************
			* Hole image Object je nach Browsertyp
			* @param String Elementname (div)
			* @param String Imagename
			*
			*	@return Object Image
			***/
			function getImgElement(elementName, imgName) {
				if (navigator.appName == "Microsoft Internet Explorer") {
					return document.images[imgName];
				}
				if(navigator.appName == "Netscape") {
					if(parseInt(navigator.appVersion) > 4) {
						return document.images[imgName];
					}
					else {
						return document.layers[elementName].document.images[imgName];
					}
				}
			}

			/*************************************
			* Das Menuobject 
			***/
			function Menu() {

				this.hauptmenuArr = new Array(); 					// Array von Hauptmenuelementen
				this.hm_timer = 700;											// Wie lange soll das Menu beim Mouseover sichtbar sein
				this.aktiveMenu = null;										// Das aktive Hauptmenu merken
				this.aktiveSubmenu = null;								// Das aktive Submenu merken 
				this.aktiveSubmenuImgUrl;
				this.selectedMenu = null;									// Das selektierete Hauptmenu
				this.selectedSubmenu = null;							// Das selektierete Submenu
				this.reaktivateOnLoad = true;						// Menu bei der Folgeseite wieder aktivieren
				this.aktiveImage = null;

				
				// Menu Methods
				this.addHauptmenuTxt = addHauptmenuTxt;
				this.addHauptmenuImg = addHauptmenuImg;
				this.addMenuItemTxt = addMenuItemTxt;
				this.addMenuItemImg = addMenuItemImg;
				this.writeMenu = writeMenu;
				this.aktivateMenu = aktivateMenu;
				this.aktivateImage = aktivateImage;
				this.getImageByName = getImageByName;
				
				this.getDivElement = getDivElement;
				this.getImgElement = getImgElement;
				this.swap = swap;
				this.hide = hide;
				this.hideMenu = hideMenu;
				this.showMenu = showMenu;
			}

			/********************************
			* Aktiviere das selektierete Menu
			* @param String Hauptmenubez.
			* @param String Submenubez.
			***/
			function aktivateMenu(hm_name, sm_imgName, imgType) {
				// Hide previously selected image
				if(this.selectedSubmenu != null && this.selectedMenu != null) {
					if(imgType == "sm") {
						this.getImgElement(this.selectedMenu, this.selectedSubmenu).src = this.getImageByName("off", this.selectedMenu, this.selectedSubmenu, "sm");
					}
				}
				// Hide previously selected menu
				if(this.selectedMenu != null) {
					this.hide(this.selectedMenu);
				}
				if(imgType != "hm") {
					// Assign new selected menu
					this.selectedMenu = hm_name;
					// Assign new selected image
					this.selectedSubmenu = sm_imgName;
				}
				else {
					if(this.selectedSubmenu != null && this.selectedMenu != null) {
						this.getImgElement(this.selectedMenu, this.selectedSubmenu).src = this.getImageByName("off", this.selectedMenu, this.selectedSubmenu, "sm");
					}
					// Assign new selected image
					this.selectedMenu = hm_name;
					this.selectedSubmenu = null;
					this.aktiveSubmenu = null;
				}
				// Stop menu timer
				window.clearTimeout(this.aktive_timer);

				// Display new selected menu
				this.showMenu(hm_name);
				// Display new selected image
				this.swap("show", hm_name, sm_imgName, imgType);
			}


			/*************************************
			* Tausche Bilder im aus (Rollover)
			* @param String type (on, off)
			* @param String Layername (div)
			* @param String Imagename (img)
			*
			* @return String Image url (img.src)
			***/
			function getImageByName(type, layername, imgName, imgType) {

				switch(imgType) {
					case "sm" :
						var num = this.hauptmenuArr[layername].submenuArr.length;
		
						for(var i=0; i < num; i++) {
							// MenuItem mit Text
							if(this.hauptmenuArr[layername].submenuArr[i].sm_imgName == imgName) {
								if(type == "on") {
									return this.hauptmenuArr[layername].submenuArr[i].sm_imgOn.src;
								}
								else {
									return this.hauptmenuArr[layername].submenuArr[i].sm_imgOff.src;
								}
							}
						}
					break;
					case "hm" :
						if(type == "on") {
							return this.hauptmenuArr[layername].hm_imgOn.src;
						}
						else {
							return this.hauptmenuArr[layername].hm_imgOff.src;
						}
					break;
				}
				return null;
			}

			function aktivateImage(menuId, submenuId) {

				this.aktiveImage = submenuId;
				this.getImgElement(menuId, submenuId).src = this.getImageByName("on", menuId, submenuId, "sm");
				
			}

			/*************************************
			* Tausche Bilder im aus (Rollover)
			* @param String type (show, hide)
			* @param String Layername (div)
			* @param String Imagename (img)
			* @param String Image url (img.src)
			***/
			function swap(type, layername, imgName, imgType) {
				if(this.aktiveImage != imgName) {
					if(type == "show") {
							if(this.selectedSubmenu != null) {
								if(this.aktiveSubmenu != null && this.aktiveSubmenu != imgName) {
								}
							}
							this.aktiveSubmenu = imgName;
		
							window.clearTimeout(this.aktive_timer);
							this.getImgElement(layername, imgName).src = this.getImageByName("on", layername, imgName, imgType);
							this.getDivElement(layername).visibility = "visible";
					}
					if(type == "hide") {
						this.hideMenu(layername);
	
						if(this.reaktivateOnLoad == true && this.selectedSubmenu == imgName) {
						}
						else {
							this.getImgElement(layername, imgName).src = this.getImageByName("off", layername, imgName, imgType);
						}
					}
				}
			}


			/****************************
			* Object hauptmenu containing
			* Submenu array
			***/
			function hauptmenuImg(hmName, hmUrl, hmTarget, hmImgName, hmImgOn, hmImgOff, hmImgWidth, hmImgHeight, hmImgBorder, hmImgAlign, hmImgAlt, hmImgHspace, hmVspace) {
				this.hm_type = "img";
				this.hm_name = hmName;
				this.hm_url = hmUrl;
				this.hm_target = hmTarget;
				this.hm_imgName = hmImgName;
				this.hm_imgOn = new Image();	this.hm_imgOn.src = hmImgOn;
				this.hm_imgOff = new Image(); this.hm_imgOff.src = hmImgOff;
				this.hm_imgWidth = hmImgWidth;
				this.hm_imgHeight = hmImgHeight;
				this.hm_imgBorder = hmImgBorder;
				this.hm_imgAlign = hmImgAlign;
				this.hm_imgAlt = hmImgAlt;
				this.hm_imgHspace = hmImgHspace;
				this.hm_imgVspace = hmVspace;
				
				this.submenuArr = new Array();
			}

			/****************************
			* Object hauptmenu containing
			* Submenu array
			***/
			function hauptmenuTxt(hmName, hmUrl, hmTarget, hmClass) {
				this.hm_type = "txt";
				this.hm_name = hmName;
				this.hm_url = hmUrl;
				this.hm_target = hmTarget;
				this.hm_class = hmClass;

				this.submenuArr = new Array();
			}

			/**********************************
			* Object submenu element containing
			***/
			function submenuTxt(smName, smUrl, smTarget, smClass) {
				this.sm_type = "txt";
				this.sm_name = smName;
				this.sm_url = smUrl;
				this.sm_target = smTarget;
				this.sm_class = smClass;
			}

			/**********************************
			* Object submenu element containing
			***/
			function submenuImg(smName, smUrl, smTarget, smImgName, smImgOn, smImgOff, smImgWidth, smImgHeight, smImgBorder, smImgAlign, smImgAlt, smImgHspace, smVspace) {
				this.sm_type = "img";
				this.sm_name = smName;
				this.sm_imgName = smImgName;
				this.sm_url = smUrl;
				this.sm_target = smTarget;
				this.sm_imgOn = new Image();	this.sm_imgOn.src = smImgOn;
				this.sm_imgOff = new Image(); this.sm_imgOff.src = smImgOff;
				this.sm_imgWidth = smImgWidth;
				this.sm_imgHeight = smImgHeight;
				this.sm_imgBorder = smImgBorder;
				this.sm_imgAlign = smImgAlign;
				this.sm_imgAlt = smImgAlt;
				this.sm_imgHspace = smImgHspace;
				this.sm_imgVspace = smVspace;
			}

			/****************************
			* Hauptmenuelement hinzufügen
			* @param String Hauptmenu
			*/
			function addHauptmenuTxt(hmName, hmUrl, hmTarget, hmClass) {
				this.hauptmenuArr[hmName] = new hauptmenuTxt(hmName, hmUrl, hmTarget, hmClass);
			}

			/****************************
			* Hauptmenuelement hinzufügen
			* @param String Hauptmenu
			*/
			function addHauptmenuImg(hmName, hmUrl, hmTarget, hmImgName, hmImgOn, hmImgOff, hmImgWidth, hmImgHeight, hmImgBorder, hmImgAlign, hmImgAlt, hmImgHspace, hmVspace) {
				this.hauptmenuArr[hmName] = new hauptmenuImg(hmName, hmUrl, hmTarget, hmImgName, hmImgOn, hmImgOff, hmImgWidth, hmImgHeight, hmImgBorder, hmImgAlign, hmImgAlt, hmImgHspace, hmVspace);
			}
	
			/*************************************
			* Füge dem Hauptmenu ein Element hinzu
			* @param String hauptmenu
			* @param String menuElement
			***/
			function addMenuItemTxt(smHauptmenu, smName, smUrl, smTarget, smClass) {
				var index = this.hauptmenuArr[smHauptmenu].submenuArr.length;
				this.hauptmenuArr[smHauptmenu].submenuArr[index] = new submenuTxt(smName, smUrl, smTarget, smClass);
			}

			/*************************************
			* Füge dem Hauptmenu ein Element hinzu
			* @param String hauptmenu
			* @param String menuElement
			***/
			function addMenuItemImg(smHauptmenu, smName, smUrl, smTarget, smImgName, smImgOn, smImgOff, smImgWidth, smImgHeight, smImgBorder, smImgAlign, smImgAlt, smImgHspace, smVspace) {
				var index = this.hauptmenuArr[smHauptmenu].submenuArr.length;
				this.hauptmenuArr[smHauptmenu].submenuArr[index] = new submenuImg(smName, smUrl, smTarget, smImgName, smImgOn, smImgOff, smImgWidth, smImgHeight, smImgBorder, smImgAlign, smImgAlt, smImgHspace, smVspace);
			}

			/*************************************
			* Initialisiere Menu
			* @param String Hauptmenubez.
			***/
			function writeMenu(hmName) {
				var num = this.hauptmenuArr[hmName].submenuArr.length;

				var menu_html =	'<div id="' + hmName + '">' +
													 '<table cellpadding="4" cellspacing="0" border="0">' +
															'<tr>';
															// Hauptmenu header mit Text
															if(this.hauptmenuArr[hmName].hm_type == "txt") {
																menu_html +=
																 '<td><a href="' + this.hauptmenuArr[hmName].hm_url + '" target="' + this.hauptmenuArr[hmName].hm_target 
																+ '" onMouseover="menu.showMenu(\'' + hmName + '\')" onMouseout="menu.hideMenu(\'' + hmName + '\')" class="' + this.hauptmenuArr[hmName].hm_class + '">' 
																+ this.hauptmenuArr[hmName].hm_name + '</a></td>';
															}
															// Hauptmenu header mit Bild
															if(this.hauptmenuArr[hmName].hm_type == "img") {
																menu_html +=
																 '<td><a href="' + this.hauptmenuArr[hmName].hm_url + '" target="' + this.hauptmenuArr[hmName].hm_target 
																+ '" onMouseover="menu.showMenu(\'' + hmName + '\')" onMouseout="menu.hideMenu(\'' + hmName + '\')">' 
																+ '<img name="' + this.hauptmenuArr[hmName].hm_imgName + '" src="' + this.hauptmenuArr[hmName].hm_imgOn.src + '" width="' + this.hauptmenuArr[hmName].hm_imgWidth 
																+ '" height="' + this.hauptmenuArr[hmName].hm_imgHeight + '" hspace="' + this.hauptmenuArr[hmName].hm_imgHspace
																+ '" vspace="' + this.hauptmenuArr[hmName].hm_imgVspace + '" align="' + this.hauptmenuArr[hmName].hm_imgAlign
																+ '" alt="' + this.hauptmenuArr[hmName].hm_imgAlt + '" border="' + this.hauptmenuArr[hmName].hm_imgBorder + '"></a></td>';
															}
															menu_html +=
															'</tr>';
															for(var i=0; i < num; i++) {
																// MenuItem mit Text
																if(this.hauptmenuArr[hmName].submenuArr[i].sm_type == "txt") {
																	menu_html += 
																	'<tr>' +
																		'<td><a href="' + this.hauptmenuArr[hmName].submenuArr[i].sm_url + '" target="' + this.hauptmenuArr[hmName].submenuArr[i].sm_target 
																		+ '" onMouseover="menu.showMenu(\'' + hmName + '\')" onMouseout="menu.hideMenu(\'' + hmName + '\')" class="' + this.hauptmenuArr[hmName].submenuArr[i].sm_class + '">' 
																		+ this.hauptmenuArr[hmName].submenuArr[i].sm_name + '</a></td>' +
																	'</tr>';
																}
																// MenuItem mit Bild
																if(this.hauptmenuArr[hmName].submenuArr[i].sm_type == "img") {
																	menu_html +=
																	'<tr>'
																		+ '<td><a href="' + this.hauptmenuArr[hmName].submenuArr[i].sm_url + '" target="' + this.hauptmenuArr[hmName].submenuArr[i].sm_target 
																		+ '" onMouseover="menu.swap(\'show\', \'' + hmName + '\', \'' + this.hauptmenuArr[hmName].submenuArr[i].sm_imgName + '\', \'sm\')" onMouseout="menu.swap(\'hide\', \'' + hmName + '\', \'' + this.hauptmenuArr[hmName].submenuArr[i].sm_imgName + '\', \'sm\')">'
																		+ '<img name="' + this.hauptmenuArr[hmName].submenuArr[i].sm_imgName + '" src="' + this.hauptmenuArr[hmName].submenuArr[i].sm_imgOff.src + '" width="' + this.hauptmenuArr[hmName].submenuArr[i].sm_imgWidth 
																		+ '" height="' + this.hauptmenuArr[hmName].submenuArr[i].sm_imgHeight + '" hspace="' + this.hauptmenuArr[hmName].submenuArr[i].sm_imgHspace
																		+ '" vspace="' + this.hauptmenuArr[hmName].submenuArr[i].sm_imgVspace + '" align="' + this.hauptmenuArr[hmName].submenuArr[i].sm_imgAlign
																		+ '" alt="' + this.hauptmenuArr[hmName].submenuArr[i].sm_imgAlt + '" border="' + this.hauptmenuArr[hmName].submenuArr[i].sm_imgBorder + '"></a></td>'
																	+ '</tr>';
																}
															}
				menu_html += 
													'</table>' +
												'</div>';
				document.write(menu_html);

			}

			/****************************
			* Zeige Menu beim OnMouseOver
			* @param String Hauptmenubez.
			***/  
			function showMenu(hmName) {
	
				if(this.selectedMenu == null) {
					if(this.aktiveMenu != hmName && this.aktiveMenu != null) {
						this.hide(this.aktiveMenu);
					}
				}
				else {
					if(this.aktiveMenu != this.selectedMenu) {
						this.hide(this.aktiveMenu);
					}
				}
				this.aktiveMenu = hmName;
				this.aktiveSubmenu = null;
				
				window.clearTimeout(this.aktive_timer);
				this.getDivElement(hmName).visibility = "visible";
			}

			/****************************
			* Verstecke Menu beim OnMouseOut
			* @param String Hauptmenubez.
			***/
			function hideMenu(hmName) {
				if(this.reaktivateOnLoad == true && this.selectedMenu == hmName) {
//					alert("raktivate");
				}
				else {
					this.aktive_timer = window.setTimeout("hide('" + hmName + "')", this.hm_timer);
				}
			}

			function hide(layername) {
					this.getDivElement(layername).visibility = "hidden";
			}






		// initialisiere ein neues Menu
		var menu = new Menu();
		// Add main menu elements
		// Hauptmenubez., url, target

		menu.addHauptmenuImg("aboutGore", "aboutgore.html", "_self", "hmImg1", "mainmedia/navigation/n_aboutgore_on.gif", "mainmedia/navigation/n_aboutgore.gif", 140, 24, 0, "middle", "ABOUT GORE", 0, 0);
		//Hauptmenubez., submenuImg(smName, smUrl, smTarget, smImgName, smImgOn, smImgOff, smImgWidth, smImgHeight, smImgBorder, smImgAlign, smImgAlt, smImgHspace, smVspace)
		menu.addMenuItemImg("aboutGore", "a1", "aboutgore1.html", "_self", "img1a", "mainmedia/navigation/sn_datesandfacts_on.gif", "mainmedia/navigation/sn_datesandfacts.gif", 141, 24, 0, "middle", "DATES AND FACTS", 0, 0);
		menu.addMenuItemImg("aboutGore", "a2", "aboutgore2.html", "_self", "img2a", "mainmedia/navigation/sn_ourculture_on.gif", "mainmedia/navigation/sn_ourculture.gif", 141, 24, 0, "middle", "OUR CULTURE", 0, 0);
		menu.addMenuItemImg("aboutGore", "a3", "aboutgore3.html", "_self", "img3a", "mainmedia/navigation/sn_downloadarea_on.gif", "mainmedia/navigation/sn_downloadarea.gif", 141, 24, 0, "middle", "DOWNLOAD AREA", 0, 0);
 		menu.writeMenu("aboutGore");

		menu.addHauptmenuImg("careers", "careers.html", "_self", "hmImg2", "mainmedia/navigation/n_careers_on.gif", "mainmedia/navigation/n_careers.gif", 140, 24, 0, "middle", "Careers", 0, 0);
		menu.addMenuItemImg("careers", "b1", "careers1.html", "_self", "img1b", "mainmedia/navigation/sn_workingwithgore_on.gif", "mainmedia/navigation/sn_workingwithgore.gif", 141, 24, 0, "middle", "WORKING WITH GORE", 0, 0);
		menu.addMenuItemImg("careers", "b2", "http://www.gore.com/de_de/jobsearch.html", "_blank", "img2b", "mainmedia/navigation/sn_jobboard_on.gif", "mainmedia/navigation/sn_jobboard.gif", 141, 24, 0, "middle", "JOB BOARD", 0, 0);
		
		<!-- menu.addMenuItemImg("careers", "b2", "http://www.refline.de/kunden/gore/jobboard.html", "_blank", "img2b", "mainmedia/navigation/sn_jobboard_on.gif", "mainmedia/navigation/sn_jobboard.gif", 141, 24, 0, "middle", "JOB BOARD", 0, 0); -->
		<!-- menu.addMenuItemImg("careers", "b2", "careers2.html", "_blank", "img2b", "mainmedia/navigation/sn_jobboard_on.gif", "mainmedia/navigation/sn_jobboard.gif", 141, 24, 0, "middle", "JOB BOARD", 0, 0); -->
		<!--menu.addMenuItemImg("careers", "b3", "careers3.html", "_self", "img3b", "mainmedia/navigation/sn_onlinebewerbung_on.gif", "mainmedia/navigation/sn_onlinebewerbung.gif", 141, 24, 0, "middle", "ONLINE BEWERBUNG", 0, 0); -->
		menu.addMenuItemImg("careers", "b4", "careers4.html", "_self", "img4b", "mainmedia/navigation/sn_campus_on.gif", "mainmedia/navigation/sn_campus.gif", 141, 24, 0, "middle", "CAMPUS", 0, 0);
 		menu.writeMenu("careers");

		menu.addHauptmenuImg("locations", "locations.html", "_self", "hmImg3", "mainmedia/navigation/n_locations_on.gif", "mainmedia/navigation/n_locations.gif", 140, 24, 0, "middle", "LOCATIONS", 0, 0);
		menu.addMenuItemImg("locations", "c1", "locations1.html", "_self", "img1c", "mainmedia/navigation/sn_benelux_on.gif", "mainmedia/navigation/sn_benelux.gif", 141, 24, 0, "middle", "BENELUX", 0, 0);
		menu.addMenuItemImg("locations", "c2", "locations2.html", "_self", "img2c", "mainmedia/navigation/sn_deutschland_on.gif", "mainmedia/navigation/sn_deutschland.gif", 141, 24, 0, "middle", "DEUTSCHLAND", 0, 0);
		menu.addMenuItemImg("locations", "c3", "locations3.html", "_self", "img3c", "mainmedia/navigation/sn_frankreich_on.gif", "mainmedia/navigation/sn_frankreich.gif", 141, 24, 0, "middle", "FRANKREICH", 0, 0);
		menu.addMenuItemImg("locations", "c4", "locations4.html", "_self", "img4c", "mainmedia/navigation/sn_grossbritannien_on.gif", "mainmedia/navigation/sn_grossbritannien.gif", 141, 24, 0, "middle", "GROSSBRITANNIEN", 0, 0);
		menu.addMenuItemImg("locations", "c5", "locations5.html", "_self", "img5c", "mainmedia/navigation/sn_italien_on.gif", "mainmedia/navigation/sn_italien.gif", 141, 24, 0, "middle", "ITALIEN", 0, 0);
		menu.addMenuItemImg("locations", "c6", "locations6.html", "_self", "img6c", "mainmedia/navigation/sn_schweden_on.gif", "mainmedia/navigation/sn_schweden.gif", 141, 24, 0, "middle", "SCHWEDEN", 0, 0);
		menu.addMenuItemImg("locations", "c7", "locations7.html", "_self", "img7c", "mainmedia/navigation/sn_spanien_on.gif", "mainmedia/navigation/sn_spanien.gif", 141, 24, 0, "middle", "SPANIEN", 0, 0);
 		menu.writeMenu("locations");

		menu.addHauptmenuImg("links", "links.html", "_self", "hmImg4", "mainmedia/navigation/n_links_on.gif", "mainmedia/navigation/n_links.gif", 140, 24, 0, "middle", "LINKS", 0, 0);
		menu.addMenuItemImg("links", "d1", "links1.html", "_self", "img1d", "mainmedia/navigation/sn_links_on.gif", "mainmedia/navigation/sn_links.gif", 141, 24, 0, "middle", "LINKLISTE", 0, 0);
 		menu.writeMenu("links");

		menu.addHauptmenuImg("home", "index1.html", "_self", "hmImg5", "mainmedia/navigation/n_home_on.gif", "mainmedia/navigation/n_home.gif", 140, 24, 0, "middle", "Home", 0, 0);
		menu.addMenuItemImg("home", "e1", "e_aboutgore.html", "_self", "img1e", "mainmedia/navigation/sn_english_on.gif", "mainmedia/navigation/sn_english.gif", 140, 24, 0, "middle", "ENGLISH", 0, 0);
		menu.addMenuItemImg("home", "e2", "aboutgore.html", "_self", "img2e", "mainmedia/navigation/sn_deutsch_on.gif", "mainmedia/navigation/sn_deutsch.gif", 140, 24, 0, "middle", "DEUTSCH", 0, 0);
 		menu.writeMenu("home");

		menu.addHauptmenuImg("aboutGore2", "aboutgore.html", "_self", "hmImg6", "mainmedia/navigation/n_aboutgore_on.gif", "mainmedia/navigation/n_aboutgore.gif", 140, 24, 0, "middle", "ABOUT GORE", 0, 0);
		menu.addMenuItemImg("aboutGore2", "f1", "aboutgore.html", "_self", "img1f", "mainmedia/navigation/zurueck_on.gif", "mainmedia/navigation/zurueck.gif", 140, 24, 0, "middle", "ZURUECK", 0, 0);
 		menu.writeMenu("aboutGore2");
 		
//alert("dsdsd");
 		
 


//		menu.aktivateMenu('careers','img1c', 'mainmedia/sn_workingwgore2_on.gif');
//		alert(menu.aktiveSubmenu + " :: " +  menu.aktiveMenu);




















