2 * menuExpandable3.js - implements an expandable menu based on a HTML list
3 * Author: Dave Lindquist (http://www.gazingus.org)
6 if (!document.getElementById)
7 document.getElementById = function() { return null; }
9 function initializeMenu(menuId, actuatorId) {
10 var menu = document.getElementById(menuId);
11 var actuator = document.getElementById(actuatorId);
13 if (menu == null || actuator == null) return;
15 //if (window.opera) return; // I'm too tired
17 actuator.parentNode.style.backgroundImage = "url(/static/plus.gif)";
18 actuator.onclick = function() {
19 var display = menu.style.display;
20 this.parentNode.style.backgroundImage =
21 (display == "block") ? "url(/static/plus.gif)" : "url(/static/minus.gif)";
22 menu.style.display = (display == "block") ? "none" : "block";