Document Ready
Simplest document ready code. Tested in IE9, Firefox, Chrome.
HTML
<div id="load"></div>
CSS
#load{
width:100%;
height:100%;
position:fixed;
z-index:9999;
background:url("https://www.creditmutuel.fr/cmne/fr/banques/webservices/nswr/images/loading.gif") no-repeat center center rgba(0,0,0,0.25)
}
JavaScript
document.onreadystatechange = function () {
var state = document.readyState
if (state == 'complete') {
document.getElementById('interactive');
document.getElementById('load').style.visibility="hidden";
}
}