/*
 * menuExpandable.js - implements an expandable menu based on a HTML list
 * Author: Dave Lindquist (http://www.gazingus.org)
 * I have been unable to find a contact email for Mr Lindquist on his website 
 * to ask about permission for using this script. 
 * hope it is OK Robert Hart
*/ 
   
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.listStyleImage = "url(../../cart_images/nav/arrow2r.gif)";
    actuator.onclick = function() {
        var display = menu.style.display;
        this.parentNode.style.listStyleImage =
            (display == "block") ? "url(../../cart_images/nav/arrow2r.gif)" : "url(../../cart_images/nav/arrow3r.gif)";
       /* menu.style.listStyleImage = "url(../../cart_images/nav/disc1r.gif)";*/ /* looks pretty but slower load time all them darn images*/
       /* uncomment the followinf line for non image style type bullets*/
	   menu.style.listStyleImage = "url()";  /*adjust type in stylesheet menu.li */

		 menu.style.display = (display == "block") ? "none" : "block";

        return false;
    }
	//attempt to close list on mouse out
	actuator.onmouseover = function() {
		
        return false;
	}
}

