$(function() {


    var cssdisplay = { "display": "none" }
    var cssNone = {
        "backgroundColor": "transparent",
        "display": "none",
        "visibility": "hidden",
        "position": "absolute",
        "Z-INDEX": "1",
        "LEFT": "210px",
        "CLIP": "rect(auto auto auto auto)",
        "TOP": "101px",
        "HEIGHT": "140px"
    }
    //DISPLAY: none;	LEFT: 0px;	VISIBILITY: hidden;	POSITION: absolute;	TOP: 0px;

    var signIn = $("[id$='welcomeSignIn']");

    var divRows = $("[id$='divUrl']");

    var cssdisplay = { "display": "none" }

    var signIn = $("[id$='welcomeSignIn']");

    var trans = $("[id$='zz1_TopNavigationMenun1Items']");
    //trans +='cssNone';
    //trans.css(cssNone);
    //trans.filter("[id='zz1_TopNavigationMenun1Items']").attr("class", 'cssNone');

    $(divRows).each(function(index) {


        var a = window.location.href;
        if (!a.toLowerCase().match("topaz")) {

            signIn.css(cssdisplay);

        } //alert(document.body.innerWidth);

    })


    if (jQuery.browser.msie) {


        var menuRows = $("[id$='HBN100'] >table> tbody > tr > td > div");

        $(menuRows).each(function(index) {

            this.className += " wrapper"


        })

    }


});


$(function() {

    var xScroll, yScroll;
    if (window.innerHeight && window.scrollMaxY) {
        xScroll = window.innerWidth + window.scrollMaxX;
        yScroll = window.innerHeight + window.scrollMaxY;
    } else if (document.body.scrollHeight > document.body.offsetHeight) { // all but Explorer Mac
        xScroll = document.body.scrollWidth;
        yScroll = document.body.scrollHeight;
    } else { // Explorer Mac...would also work in Explorer 6 Strict,Mozilla and Safari
        xScroll = document.body.offsetWidth;
        yScroll = document.body.offsetHeight;
    }
    var windowWidth, windowHeight;
    if (self.innerHeight) { // all except Explorer
        if (document.documentElement.clientWidth) {
            windowWidth = document.documentElement.clientWidth;
        } else {
            windowWidth = self.innerWidth;
        }
        windowHeight = self.innerHeight;
    } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
        windowWidth = document.documentElement.clientWidth;
        windowHeight = document.documentElement.clientHeight;
    } else if (document.body) { // other Explorers
        windowWidth = document.body.clientWidth;
        windowHeight = document.body.clientHeight;
    }
    var pageHeight;
    var pageWidth;
    if (yScroll < windowHeight) {
        pageHeight = windowHeight;
    } else {
        pageHeight = yScroll;
    }
    if (xScroll < windowWidth) {
        pageWidth = xScroll;
    } else {
        pageWidth = windowWidth;
    }


    var bodyHeight = $("[id$='MSO_ContentTable'] > tbody > tr");


    //alert(document.documentElement.clientHeight);
    //works in all browser document.body.clientHeight;

    bodyHeight.css("height", document.documentElement.clientHeight - 120);

    //bodyHeight.height=document.documentElement.clientHeight-120;
});

$(function() {
    //initialize menus
    var menuRows = $("[id$='HBN100'] >table > tbody > tr > td > div >table > tbody");
    var menuHd = menuRows.filter("[id='']");

    var subT = menuRows.filter("[id='']");
    var menus = subT.find("TABLE")
    //alert(jQuery.url.attr("path"));

    var subMenuLast = $(menuRows).find("td:last")

    // subMenuLast.corner("bottom");
    menuRows.append('<tr><td><table id="tblRound" width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td  class="menuLeft" align="left"></td><td class ="menuCenter" align="left"></td><td class="menuRight" align="right"></td></tr></table></td></tr>');
    //jQuery.noConflict();   
    //jQuery("*[id*='_LoginAsDifferentUser']").replaceWith("");  
    //jQuery("*[id*='_RequestAccess']").replaceWith("");         
    //jQuery("*[id*='_Logout']").replaceWith("");
//    var i = 0;
//    $(menuRows).each(function(index) {
//        i = i + 1;
//        this.innerText = window.location;
//        var a = this.innerText;
//        alert(i);
//        if (i <= 1) {

//            if (a.toLowerCase().match("solution") || a.toLowerCase().match("partners") || a.toLowerCase().match("newsroom") || a.toLowerCase().match("awards") || a.toLowerCase().match("clientspeak")) {
//            
//                var headRow = $("[class$='ms-bannerframe'] > tbody");

//                headRow.append('<tr><td><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td  class="aboutImage" align="left"></td></tr></table></td></tr>');
//            }
//        }

//    });
});
function Menu_HoverStatic(item) {
    var node = (item.tagName.toLowerCase() == "td") ?
        item :
        item.cells[0];
    var data = Menu_GetData(item);
    if (!data) {
        return null;
    }
    var nodeTable = WebForm_GetElementByTagName(node, "table");
    if (data.staticHoverClass) {
        nodeTable.hoverClass = data.staticHoverClass;
        WebForm_AppendToClassName(nodeTable, data.staticHoverClass);
    }
    node = nodeTable.rows[0].cells[0].childNodes[0];
    if (data.staticHoverHyperLinkClass) {
        node.hoverHyperLinkClass = data.staticHoverHyperLinkClass;
        WebForm_AppendToClassName(node, data.staticHoverHyperLinkClass);
    }
    return node;
}
 

