//---------------------------------------------------------- // Browser Detection //---------------------------------------------------------- isMac = (navigator.appVersion.indexOf("Mac")!=-1) ? true : false; NS4 = (document.layers) ? true : false; IEmac = ((document.all)&&(isMac)) ? true : false; IE4plus = (document.all) ? true : false; IE4 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 4.")!=-1)) ? true : false; IE5 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 5.")!=-1)) ? true : false; ver4 = (NS4 || IE4plus) ? true : false; NS6 = (!document.layers) && (navigator.userAgent.indexOf('Netscape')!=-1) ? true:false; //---------------------------------------------------------- // Find the bottom of the page //---------------------------------------------------------- function calcBottomOfPage(flag) { var bottomOfPage = 0; var divElements = document.getElementsByTagName('div'); for(i = 0; i < divElements.length; i++) { var thisDiv = divElements[i]; var tempTop = 0; if (flag) { while (thisDiv != null) { tempTop += thisDiv.offsetTop; thisDiv = thisDiv.offsetParent; } } if((divElements[i].offsetHeight + tempTop) > bottomOfPage) { bottomOfPage = divElements[i].offsetHeight + tempTop; } } return bottomOfPage; } //---------------------------------------------------------- // Position the footer //---------------------------------------------------------- function positionDivisions() { var bottomPos = 0; // Calculate the bottom of the page bottomPos = calcBottomOfPage(true) - 25; var disclaimer = document.getElementById("disclaimer"); if (disclaimer != null) { disclaimer.style.top = bottomPos + "px"; disclaimer.style.visibility = "visible"; bottomPos = bottomPos + disclaimer.offsetHeight; } var footer = document.getElementById("footer"); if (!footer) { footer = document.getElementById("pageFooter"); } if (footer) { var browserHeight = getBrowserHeight(); var footerTop = bottomPos; var footerHeight = footer.offsetHeight; footer.style.top = bottomPos + "px"; if ((footerTop + footerHeight) < browserHeight) { footerHeight = browserHeight - footerTop; footer.style.height = footerHeight + "px"; } footer.style.visibility = "visible"; } } function repositionDivisions() { var bottomPos = 0; // Calculate the bottom of the page bottomPos = calcBottomOfPage(false) - 25; var disclaimer = document.getElementById("disclaimer"); if (disclaimer != null) { disclaimer.style.top = bottomPos + "px"; disclaimer.style.visibility = "visible"; bottomPos = bottomPos + disclaimer.offsetHeight; } var footer = document.getElementById("footer"); if (!footer) { footer = document.getElementById("pageFooter"); } if (footer) { var browserHeight = getBrowserHeight(); bottomPos = bottomPos + 140; var footerTop = bottomPos; var footerHeight = footer.offsetHeight; footer.style.top = bottomPos + "px"; if ((footerTop + footerHeight) < browserHeight) { footerHeight = browserHeight - footerTop; footer.style.height = footerHeight + "px"; } footer.style.visibility = "visible"; } } //---------------------------------------------------------- // Body onload utility (supports multiple onload functions) //---------------------------------------------------------- var gSafeOnload = new Array(); function SafeAddOnload(f) { if(IEmac && IE4) // IE 4.5 blows out on testing window.onload { window.onload = SafeOnload; gSafeOnload[gSafeOnload.length] = f; } else if(window.onload) { if(window.onload != SafeOnload) { gSafeOnload[0] = window.onload; window.onload = SafeOnload; } gSafeOnload[gSafeOnload.length] = f; } else window.onload = f; } //---------------------------------------------------------- // Provides safe onload function //---------------------------------------------------------- function SafeOnload() { for (var i=0;i