﻿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;

    actuator.parentNode.style.backgroundImage = "url(images/plus.gif)";
    actuator.onclick = function()
    {
        var display = menu.style.display;
        this.parentNode.style.backgroundImage =
            ( display == "block" ) ? "url(images/plus.gif)" : "url(images/minus.gif)";
        menu.style.display = ( display == "block" ) ? "none" : "block";

        return false;
    }
}

function InitRollOverMenu( MenuID )
{
	if( document.all && document.getElementById )
	{
		navRoot = document.getElementById( MenuID );
		for( i = 0; i < navRoot.childNodes.length; i++ )
		{
			node = navRoot.childNodes[ i ];
			if( node.nodeName == "LI" )
			{
				node.onmouseover = function()
				{
					this.className += " over";
				}
				node.onmouseout  = function()
				{
					this.className = this.className.replace( " over", "" );
				}
			}
		}
	}
}