/*
 * menu.js - implements an dropdown menu based on a HTML list
 * Author: Dave Lindquist (http://www.gazingus.org)
 * Modified: Todd Zusman (http://www.acdrifter.com)
 */
 
var currentmenu = null;

if ( !document.getElementById )
	document.getElementById = function() { return null; }

function initializeMenu ( menuId, actuatorId ) {
	var menu = document.getElementById( menuId );
	var actuator = document.getElementById( actuatorId );
	if (menu == null || actuator == null) return;
  
	actuator.onmouseover = function () {
		if ( currentmenu != null )
			currentmenu.style.visibility = 'hidden';
		this.showMenu();
		return false;
	}
		
	actuator.showMenu = function () {
		menu.style.left = this.offsetLeft + 'px';
		menu.style.top = this.offsetTop + this.offsetHeight + 'px';
		menu.style.visibility = 'visible';
		currentmenu = menu;
	}
	 
}

function kill () {
	if ( currentmenu != null )
		currentmenu.style.visibility = 'hidden';
}





