function adjustLayout()
{
    var targetHeight = Math.max(xHeight("railLeft"), xHeight("content"));
    
    if (targetHeight > 600)
    {
        xHeight("railLeft", targetHeight);
        xHeight("content", targetHeight);
    }
}

window.onload = function()
{
    adjustLayout();
    HighlightMenuItem();
}

function Product(pObj)
{
    var pLI = document.getElementById(pObj.id.replace("hl", "li"));
    var pUL = document.getElementById(pObj.id.replace("hl", "ul"));

    pLI.className = pLI.className == "parent" ? "parent selected" : "parent";    
    pUL.className = pUL.className.indexOf(" hide") > -1 ? pUL.className.replace(" hide", "") : pUL.className += " hide";
   
    return false;
}

function HighlightMenuItem()
{
    var p = undefined;
    var pid = QS[0];
    var cid = QS[1];
    if ( (pid=="") && (cid=="") ) return;
    if (pid == "")
    {
        document.getElementById("li" + cid).className = "bold";
    }
    else
    {
        document.getElementById("liAgentBroker").className += " bold";
        var p = document.getElementById("li" + pid);
        var s = " bold";
        if (p.className.indexOf("NoChild") == -1)
        {
            s = " selected";
            document.getElementById("ul" + pid).className = "child";
            document.getElementById("li" + pid + cid).className += " bold";
        }
        p.className += s;
    }
}
