/*
 * menuExpandable2.js - implements an expandable menu based on a HTML list
 * Author: Dave Lindquist (dave@gazingus.org)
 */

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;

    //if (window.opera) return; // I'm too tired

    //actuator.parentNode.style.backgroundImage = "url(/ashe/facilities/e2c/img/btnPlus.gif)";

    actuator.onclick = function() {
	   
        var display = menu.style.display;
        menu.parentNode.style.backgroundImage =
            (display == "block") ? "url(/ashe/codes/facilities/e2c/plus.gif)" : "url(/ashe/facilities/e2c/img/minus.gif)";
        menu.style.display = (display == "block") ? "none" : "block";

        return false;
    }

}

function expandCurrent(menuID) {
	var currentMenu = document.getElementById(menuID);
	
	if ( currentMenu == null ) return;
	
	currentMenu.style.display = "block";
	currentMenu.parentNode.style.backgroundImage ="url(/ashe/facilities/e2c/img/minus.gif)";
}
	
