//This source code is the copyrighted work of n-Tier Financial Services, LLC. All software owned by n-Tier Financial Services, LLC.
//is protected by the United States patent and copyright laws and international treaty provisions. Unless otherwise specified in
//writing, you may not modify, copy, distribute, transfer, display, perform, reproduce, publish, license, create derivative works
//from, decompile, decipher, disassemble, reverse engineer or otherwise decrypt or discover this source code. Any reproduction,
//redistribution or unauthorized use of this source code is expressly prohibited and may result in civil or criminal penalties.
//All rights not expressly granted are reserved.-->

function setheights() {
//    var theoffsetheight=0;
//   var theoffsetwidth=0;
//    var theexpppptdiv = document.getElementById("expppptdiv");
//    var thenscppptdiv = document.getElementById("nscppptdiv");
//    var theouterdiv = document.getElementById("outerdiv");
//    var themnudiv = document.getElementById("mnudiv");
//    var thedetaildiv = document.getElementById("detaildiv");
//    var thebdypxheight=document.body.offsetHeight;
//    var thebdypxwidth=document.body.offsetWidth;
//    if (navigator.userAgent.indexOf("Netscape") > -1) {
//        theoffsetheight=thenscppptdiv.offsetHeight;
//        theoffsetwidth=thenscppptdiv.offsetWidth;
//    } else {
//        theoffsetheight=theexpppptdiv.offsetHeight;
//        theoffsetwidth=theexpppptdiv.offsetWidth;
//    }
//    theouterdiv.style.position='relative';
//    theouterdiv.style.height=eval(thebdypxheight-(theoffsetheight*1.5))+"px";
//    theouterdiv.style.width=eval(thebdypxwidth-(theoffsetwidth*1.5))+"px";
//    themnudiv.style.position='relative';
//    themnudiv.style.width=eval(thebdypxwidth-(theoffsetwidth*1.4))+"px";
//    thedetaildiv.style.position='relative';
//    thedetaildiv.style.height=eval(thebdypxheight-themnudiv.offsetHeight-(theoffsetheight*1.4))+"px";
//    thedetaildiv.style.width=eval(thebdypxwidth-(theoffsetwidth*1.4))+"px";
//    thedetaildiv.style.overflow='auto';
}

function hideall () {
    var theservoverviewdiv = document.getElementById("servoverviewdiv");
    var theservsysmgrmangdiv = document.getElementById("servsysmgrmangdiv");
    var theservwebtechcnsltdiv = document.getElementById("servwebtechcnsltdiv");
    var theservarchcnsltdiv = document.getElementById("servarchcnsltdiv");
    theservoverviewdiv.style.display="none";
    theservsysmgrmangdiv.style.display="none";
    theservwebtechcnsltdiv.style.display="none";
    theservarchcnsltdiv.style.display="none";
}


function servoverview() {
    var theservoverviewdiv = document.getElementById("servoverviewdiv");
    hideall();
    setheights();
    theservoverviewdiv.style.display="block";
}

function servsysmgrmang() {
    var theservsysmgrmangdiv = document.getElementById("servsysmgrmangdiv");
    hideall();
    setheights();
    theservsysmgrmangdiv.style.display="block";
}

function servwebtechcnslt() {
     var theservwebtechcnsltdiv = document.getElementById("servwebtechcnsltdiv");
    hideall();
    setheights();
    theservwebtechcnsltdiv.style.display="block";
}

function servarchcnslt() {
    var theservarchcnsltdiv = document.getElementById("servarchcnsltdiv");
    hideall();
    setheights();
    theservarchcnsltdiv.style.display="block";
}

function setselection() {
    try {
        if (name=="Services_Overview") {
            servoverview();
        } else if (name=="Services_Sysmigmang") {
            servsysmgrmang();
        } else if (name=="Services_Webtechcnslt") {
            servwebtechcnslt();
        } else if (name=="Services_Archcnslt") {
            servarchcnslt();
        } else {
            name="";
            servoverview();
        }
    } catch (e) {
        name="";
        servoverview();
    }
}

function ntierhome() {
    try {
        if (name.length>0) { // opened from website
            var thentierhomea = document.getElementById("ntierfshomea");
            thentierhomea.click();
            window.close();
        } else {
            window.location.href="http://www.ntierfs.com";
        }
    } catch (e) {
        try {
            window.location.href="http://www.ntierfs.com";
        } catch (e) {}
    }
}

function  dispmnuitem(theitm, thetd) {
    if (theitm=="mnuone") {
      servoverview();
    } else if (theitm=="mnutwo") {
	servsysmgrmang();
    } else if (theitm=="mnuthree") {
	servwebtechcnslt();
    } else if (theitm=="mnufour") {
	servarchcnslt();
    } else if (theitm=="exit") {
       window.close();
    } else {
	servoverview();
    }
}


function exit() {
    window.close();
}
