/*
 * menuExpandable2.js - implements an expandable menu based on a HTML list
 * Author: Dave Lindquist (http://www.gazingus.org)
 */

if (!document.getElementById)
    document.getElementById = function() { return null; }

function initializeMenu2(menuId, plusId) {
    var menu = document.getElementById(menuId);
    var plus = document.getElementById(plusId);

    if (menu == null || plus == null) return;

    //if (window.opera) return; // I'm too tired

    plus.onclick = function() {
        var display = menu.style.display;
        this.parentNode.style.backgroundImage =
            (display == "block") ? "url(/i/plusAlt.gif)" : "url(/i/minusAlt.gif)";
	   this.parentNode.style.fontWeight =
            (display == "block") ? "normal" : "bold";
	   this.parentNode.style.margin =
            (display == "block") ? "0" : "0 0 0 0";
        menu.style.display = (display == "block") ? "none" : "block";
        return false;
    }
}