﻿/* Menu Functions*/
function btn_NeedHelpWith_Over() {
    var pos = findPos(document.getElementById('btn_NeedHelpWith'));
    Menu = document.getElementById('NeedHelp');
    Menu.style.position = 'fixed';
    pos[0] = pos[0] + 12;
    Menu.style.left = pos[0] + 'px';
    if (typeof (window.pageYOffset) == 'number') {
        //Netscape compliant
        pos[1] = pos[1] + 34 - window.pageYOffset;
    } else if (document.body && (document.body.scrollLeft || document.body.scrollTop)) {
    //DOM compliant
    
        pos[1] = pos[1] + 34 - document.body.scrollTop;
    } else if (document.documentElement) {
    //IE6 standards compliant mode
        if (document.documentElement.scrollTop == 0) {
            pos[1] = pos[1] + 34;
        }
        else {
            pos[1] = pos[1] + 34 - document.documentElement.scrollTop;
        }   
        
    }
    Menu.style.top = pos[1] + 'px';
    Menu.style.display = 'block';
    document.getElementById('Nirix').style.display = 'none';
}

function HideMenus() {
    document.getElementById('NeedHelp').style.display = 'none';
    document.getElementById('Nirix').style.display = 'none';
}
function btn_HostedServices_Over() {
    Menu = document.getElementById('Nirix');
    var pos = findPos(document.getElementById('btn_HostedServices'));
    Menu.style.position = 'fixed';
    Menu.style.left = pos[0] + 'px';
    if (typeof (window.pageYOffset) == 'number') {
        //Netscape compliant
        pos[1] = pos[1] + 34 - window.pageYOffset;
    } else if (document.body && (document.body.scrollLeft || document.body.scrollTop)) {
        //DOM compliant

        pos[1] = pos[1] + 34 - document.body.scrollTop;
    } else if (document.documentElement) {
        //IE6 standards compliant mode
        if (document.documentElement.scrollTop == 0) {
            pos[1] = pos[1] + 34;
        }
        else {
            pos[1] = pos[1] + 34 - document.documentElement.scrollTop;
        }

    }
    Menu.style.top = pos[1] + 'px';
    Menu.style.display = 'block';
    document.getElementById('NeedHelp').style.display = 'none';
}
function MenuRedirect(url) {
    window.location = url;
}
function findPos(obj) {
    var curleft = curtop = 0;
    if (obj.offsetParent) {
        do {
            curleft += obj.offsetLeft;
            curtop += obj.offsetTop;
        } while (obj = obj.offsetParent);
        return [curleft, curtop];
    }
}
function ShowDiv(obj) {
    
    Div = document.getElementById(obj);
    Div.style.left = '20%';
    Div.style.top = '20%';
    Div.style.display = 'block';
}

function HideDiv(obj) {
    Div = document.getElementById(obj);
    Div.style.display = 'none';
}
function Highlight(cellName) {
    var Cell = document.getElementById(cellName);
    Cell.style.border = "3pt dashed black";
    Cell.style.background = "#e5e5e5";
    window.setTimeout("UnHighlight('" + cellName + "')", 60000);
}

function UnHighlight(cellName) {
    var Cell = document.getElementById(cellName);
    Cell.style.border = "0pt solid black";
    Cell.style.background = "#f9f9f9";
}
