function closeOverlay() { coverdiv = document.getElementById("coverDIV"); if(coverdiv) document.body.removeChild(coverdiv); dejaopaque=false; window.onresize = null; } var dejaopaque = false; function loadOverlay() { if (!dejaopaque) { dejaopaque = true; var divSplash_loginRequired = document.getElementById("connexion_form"); if (divSplash_loginRequired !=null) { var splash_login_div = document.getElementById("connexion_form"); //Login box // splash_login_div.parentNode.insertBefore(divOverlay,splash_login_div); splash_login_div.style.position = "relative"; splash_login_div.style.zIndex = 2; // This image will be used for gray effect. coverdiv= document.createElement("IMG"); document.body.insertBefore(coverdiv, document.body.lastChild); coverdiv.src="/images/clear.gif"; coverdiv.alt=""; coverdiv.style.height = getWindowHeight(); coverdiv.style.width = "100%"; coverdiv.style.cursor ="not-allowed"; coverdiv.style.left = "0px"; coverdiv.style.top = "0px"; coverdiv.style.position = "absolute"; coverdiv.style.display = "block"; coverdiv.style.visibility = "visible"; coverdiv.style.backgroundColor ="#eee"; coverdiv.id = "coverDIV"; coverdiv.style.zIndex = 1; coverdiv.style.MozOpacity = 0.2; // Mozilla if (coverdiv.style.setAttribute) //For IE { coverdiv.style.setAttribute("filter", "alpha(opacity=20);"); } } } } function getWindowHeight() { var pageHeight; if( window.innerHeight && window.scrollMaxY ) // Firefox //Fix for IE7 (at then end) pageHeight = window.innerHeight + window.scrollMaxY ; else if( document.body.scrollHeight > document.body.offsetHeight ) // all but Explorer Mac ageHeight = document.body.scrollHeight ; else // works in Explorer 6 Strict, Mozilla (not FF) and Safari pageHeight = document.body.offsetHeight + document.body.offsetTop ; return pageHeight; }