//---------------------------------------------------------- // 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 //---------------------------------------------------------- if(! self.positionDivisions){ positionDivisions = function() { 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 != null) { 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"; } } } if(! self.repositionDivisions){ repositionDivisions = function(height) { var bottomPos = 0; if (!height) { height = 140; } // Calculate the bottom of the page bottomPos = calcBottomOfPage(false) - 25; bottomPos += height; var column1 = document.getElementById("column1"); var column2 = document.getElementById("column2"); var column3 = document.getElementById("column3"); var beColumn1 = document.getElementById("BEColumn1"); var minTop = 0; if (column1 && column2 && column3) { col1Y = column1.offsetTop + column1.offsetHeight; col2Y = column2.offsetTop + column2.offsetHeight; col3Y = column3.offsetTop + column3.offsetHeight; minTop = Math.max(col1Y, Math.max(col2Y, col3Y)); } else if (beColumn1) { minTop = beColumn1.offsetTop + beColumn1.offsetHeight; } var disclaimer = document.getElementById("disclaimer"); if (disclaimer != null) { var browserHeight = getBrowserHeight(); var disclaimerTop = bottomPos; var disclaimerHeight = disclaimer.offsetHeight; disclaimer.style.top = (bottomPos > minTop ? bottomPos : minTop) + "px"; bottomPos = (bottomPos > minTop ? bottomPos : minTop) + disclaimerHeight; if ((disclaimerTop + disclaimerHeight) < browserHeight) { disclaimerHeight = browserHeight - disclaimerTop; disclaimer.style.height = disclaimerHeight + "px"; } disclaimer.style.visibility = "visible"; } var footer = document.getElementById("footer"); if (footer != null) { var browserHeight = getBrowserHeight(); var footerTop = bottomPos; var footerHeight = footer.offsetHeight; footer.style.top = (bottomPos > minTop ? bottomPos : minTop) + "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