/*
 * 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 initializeMenu(listId, categoryId) {
	var answer = document.getElementById(listId);
    var actuator = document.getElementById(categoryId);

    if (answer == null || actuator == null) return;

    //if (window.opera) return; // I'm too tired

    actuator.onclick = function() {
		var display = answer.style.display;
       this.parentNode.style.backgroundImage =
            (display == "block") ? "url(../images/expand.gif)" : "url(../images/collapse.gif)";
			answer.style.display = (display == "block") ? "none" : "block";
        return false;
    }
}





