/* * menuDropdown.js - implements an dropdown menu based on a HTML list * Author: Dave Lindquist (http://www.gazingus.org) */var currentMenu = null;if (!document.getElementById)    document.getElementById = function() { return null; }function initializeMenu(menuId, actuatorId) {		var browser_type=navigator.appName	var browser_version=parseInt(navigator.appVersion)	if (browser_type=="Netscape"&&browser_version==4){		var menu=document.layers[menuId];		var actuator=document.layers[actuatorId];		browDOM=false;	}else{		var menu = document.getElementById(menuId);		var actuator = document.getElementById(actuatorId);		browDOM=true;	}    if (menu == null || actuator == null) return;    //if (window.opera) return; // I'm too tired	if(browDOM){				actuator.onmouseout = function() {			if (currentMenu) {				currentMenu.style.visibility = "hidden";				// this.showMenu();				currentMenu=null;			}		}				actuator.onmouseover = function() {			if (currentMenu == null) {				this.showMenu();			}else{				currentMenu.style.visibility = "hidden";				currentMenu = null;			}			return false;		}				menu.onmouseover = function() {			if (currentMenu == null) {				actuator.showMenu();			}			return false;		}				menu.onmouseout = function(){			if (currentMenu) {				currentMenu.style.visibility = "hidden";				//this.showMenu();				currentMenu=null;			}		}				actuator.showMenu = function() {			menu.style.left = this.offsetLeft+149+"px";			menu.style.top = this.offsetTop+116+"px";			menu.style.visibility = "visible";			currentMenu = menu;		}	}else if (document.layers){		//actuator.onmouseout = function() {			//if (currentMenu) {				//currentMenu.visibility = "hidden";				// this.showMenu();				//currentMenu=null;			//}		//}				actuator.onmouseover = function() {			if (currentMenu == null) {				this.showMenu();			}else{				currentMenu.visibility = "hidden";				currentMenu = null;				this.showMenu();			}			return false;		}				menu.onmouseover = function() {			if (currentMenu == null) {				actuator.showMenu();			}			return false;		}				menu.onmouseout = function(){			if (currentMenu) {				currentMenu.visibility = "hidden";				//this.showMenu();				currentMenu=null;			}		}				actuator.showMenu = function() {			menu.x = this.x+149;			menu.y = this.y +116;			menu.visibility = "visible";			currentMenu = menu;			alert(this.y)		}	}}
