var currentDiv = "NONE"; function getPageSize(){ var pageWd, pageHt; if (window.innerHeight && window.scrollMaxY) { pageWd = document.body.scrollWidth; pageHt = window.innerHeight + window.scrollMaxY; } else if (document.body.scrollHeight > document.body.offsetHeight) { // all but Explorer Mac pageWd = document.body.scrollWidth; pageHt = document.body.scrollHeight; } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari pageWd = document.body.offsetWidth; pageHt = document.body.offsetHeight; } var winWd, winHt; if (self.innerHeight) { // all except Explorer winWd = self.innerWidth; winHt = self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode winWd = document.documentElement.clientWidth; winHt = document.documentElement.clientHeight; } else if (document.body) { // other Explorers winWd = document.body.clientWidth; winHt = document.body.clientHeight; } // for small pages with total height less then height of the viewport //if (winHt > pageHt) { pageHt = winHt; } // for small pages with total width less then width of the viewport //if (winWd > pageWd) { pageWd = winWd; } var pageSizeArry = new Array(pageWd, pageHt,winWd,winHt); return pageSizeArry; } function getElementPosition(elemID) { var offsetTrail = document.getElementById(elemID); var offsetLeft = 0; var offsetTop = 0; while (offsetTrail) { offsetLeft += offsetTrail.offsetLeft; offsetTop += offsetTrail.offsetTop; offsetTrail = offsetTrail.offsetParent; } if (navigator.userAgent.indexOf("Mac") != -1 && typeof document.body.leftMargin != "undefined") { offsetLeft += parseInt(document.body.leftMargin); offsetTop += parseInt(document.body.topMargin); } return {left:offsetLeft, top:offsetTop}; } function MSIEVersion(){ var appVersion=navigator.appVersion; var tokens=appVersion.split(";"); for(var token=0;token=5) { if(typeof window.addEventListener!="undefined"){ window.addEventListener("scroll",positionOverlay,false); } else if(typeof window.attachEvent!="undefined"){ window.attachEvent("onscroll",positionOverlay); } } } function removeScrollEvent(){ if(MSIEVersion()>=5) { if(typeof window.addEventListener!="undefined"){ window.removeEventListener("scroll",positionOverlay,false); } else if(typeof window.attachEvent!="undefined"){ window.detachEvent("onscroll",positionOverlay); } } } function toggleDropdowns(showBoolean) { /* for (var i=0; i