var ie45,ns6,ns4,dom;
if (navigator.appName=="Microsoft Internet Explorer")
    ie45=parseInt(navigator.appVersion)>=4;
else if (navigator.appName=="Netscape")
    {
    ns6=parseInt(navigator.appVersion)>=5;
    ns4=parseInt(navigator.appVersion)<5;
    }
    
dom=ie45 || ns6;

function onShowHide(strGroupName)
{
    var id = "menuMainClosed" + strGroupName;
    var els = getElementStyle(id)

    if (dom)
        {
        if (els.display == "none")
            {
            els.display = "inline";
            getElementStyle("menuMainOpen" + strGroupName).display = "none";
            getElementStyle("menuItems" + strGroupName).display = "none";
            }
        else
            {
            els.display = "none";
            getElementStyle("menuMainOpen" + strGroupName).display = "inline";
            getElementStyle("menuItems" + strGroupName).display = "inline";
            }
        }
    else if (ns4)
        {
        if (els.visibility == "show")
            els.visibility = "hide";
        else
            els.visibility = "show";
        }
}

function getElementStyle(id)
{
    var el = document.all ? document.all[id] : 
        dom ? document.getElementById(id) : 
        document.layers[id];
        
    var els = dom ? el.style : el;
    return(els);
}

function onMouseOver(obj)
{
    if (dom)
        {
        obj.firstChild.style.backgroundColor = "#ffcc33";
        obj.firstChild.style.color = "#000000";
        }
}

function onMouseOut(obj)
{
    if (dom)
        {
        obj.firstChild.style.backgroundColor = "#3868C8";
        obj.firstChild.style.color = "#ffffff";
        }
}
