window.onload = DoLoad;window.onscroll = PositionNavMenu;function DoLoad(){    ShowNavigationDiv();    ResizePage();}// Function to show/hide navigation DIV sectionsfunction ShowNavigationDiv(){    var menuName = window.location.href.toLowerCase();    var subMenuName;        menuName = menuName.substring(menuName.replace("\\", "/").lastIndexOf("/") + 1);    if (menuName.indexOf(".") != -1) menuName = menuName.substring(0, menuName.indexOf("."));    subMenuName = "navsub_" + menuName;    menuName = "nav_" + menuName;        // Show selected page's sub-menu and highlight menu item    if (document.getElementById(subMenuName)) document.getElementById(subMenuName).style.display = '';    if (document.getElementById(menuName))     {        document.getElementById(menuName).style.color = "white";        document.getElementById(menuName).style.backgroundColor = "#4F8400";    }}// Function to resize the page to a standard minimum heightfunction ResizePage(){    var bannerHeight = document.getElementById("BannerContainer").offsetHeight;    var footerHeight = document.getElementById("FooterContainer").offsetHeight;    var contentHeight = document.getElementById("ContentContainer").scrollHeight;    var minContentHeight = (document.body.scrollHeight - bannerHeight - footerHeight - 20);    if (IsOlderIEVersion()) minContentHeight = document.body.scrollHeight - document.getElementById("ContentContainer").offsetTop;    // Resize content wrapper    if (contentHeight < minContentHeight)        document.getElementById("ContentContainer").style.height = minContentHeight + "px";            // Set content to same height as wrapper    document.getElementById("Content").style.height = document.getElementById("ContentContainer").offsetHeight + "px";        // Resize page (for footer spacing)    document.getElementById("Page").style.height = (bannerHeight + contentHeight + footerHeight + 10) + "px";}function ScrollPage(evt, anchorName){    // Event pointer    var e = (evt ? evt : window.event);        // Scroll to named anchor    var anchors = document.getElementsByName(anchorName);    if (!anchors) return;    var anchor = anchors[0];     var scroll = anchor.offsetTop;    if (IsOlderIEVersion()) scroll += document.getElementById("ContentContainer").offsetTop + 5;        window.scrollTo(0, scroll);        // Avoid bubbling to parent element    e.cancelBubble = true;}// PositionNavMenu - Changes position with relative values if less than IE8function PositionNavMenu(){    var bannerHeight = document.getElementById("BannerContainer").offsetHeight;        if (document.documentElement.scrollTop > bannerHeight)    {        document.getElementById("Navigation").style.position = "fixed";        document.getElementById("Navigation").style.top = 0;                if (IsOlderIEVersion())        {            document.getElementById("Navigation").style.position = "relative";            document.getElementById("Navigation").style.top = document.documentElement.scrollTop - document.getElementById("ContentContainer").offsetTop;            document.getElementById("Navigation").style.left = "0px";        }    }    else        document.getElementById("Navigation").style.position = "static";       }function IsOlderIEVersion() {        var olderIE = false;        if (navigator && navigator.appName == 'Microsoft Internet Explorer')     {                var ua = navigator.userAgent;                var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");                if (re.exec(ua) != null)                        olderIE = (parseFloat(RegExp.$1) < 8.0);        else            olderIE = true;        }        return olderIE;}