
/*
aside from the care that needs to be taken with the CSS, and especially if this is
in the context of the menu CSS in ezwebin ...

as well, the HTML is pretty much all required - torque it at your own risk (although,
it would be a nice thing to replace the outer UL/LI structure with some nice simple
divs, assuming that it works at all)

this will build a main-horizontal menu with dropdowns for any object that has a priority
greater than 0, ignoring all 0-priority items.

if an item is a link, then the menu will link to the link's target and not the link itself

there is no support for "ui_context" stuff, not for any technical reasons

*/

var numMenus = 0; // initialized below
var timer=null;
var dropdownDelay=400;
function hideAllDD()
{
    for( var n=0; n<numMenus; n+=1 )
    {
        document.getElementById( "dropdownList" + n ).style.display = "none";
    }
}
function showDD( n )
{
    document.getElementById( "dropdownList" + n ).style.display = "inline";
}
function menuOver( n )
{
    clearTimeout( timer );
    hideAllDD();
    showDD( n );
}
function dropdownOver( n )
{
    clearTimeout( timer );
    showDD( n );
}
function menuOut()
{
    timer=window.setTimeout( "timeout()", dropdownDelay );
}
function dropdownOut()
{
    timer=window.setTimeout( "timeout()", dropdownDelay );
}
function timeout()
{
    hideAllDD();
}
