tacho, muchas gracias, me sirvió.
Finalmente el código queda de la siguiente forma:
Función que setea el tamaño de la pantallaCÓDIGO
var myWidth,myHeight,myScroll,myScrollWidth,myScrollHeight;
function getSize() {
if (self.innerHeight) { // NO IE
myWidth = window.innerWidth;
myHeight = window.innerHeight;
myScroll = window.pageYOffset;
} else if (document.documentElement && document.documentElement.clientHeight) { // IE6
myWidth = document.documentElement.clientWidth;
myHeight = document.documentElement.clientHeight;
myScroll = document.documentElement.scrollTop;
} else if (document.body) { // Other IE, such as IE7
myWidth = document.body.clientWidth;
myHeight = document.body.clientHeight;
myScroll = document.body.scrollTop;
}
if (window.innerHeight && window.scrollMaxY) {
myScrollWidth = document.body.scrollWidth;
myScrollHeight = window.innerHeight + window.scrollMaxY;
} else if (document.body.scrollHeight > document.body.offsetHeight) { // No Explorer Mac
myScrollWidth = document.body.scrollWidth;
myScrollHeight = document.body.scrollHeight;
} else { // Explorer Mac... ¿Explorer 6 Strict, Mozilla y Safari?
myScrollWidth = document.body.offsetWidth;
myScrollHeight = document.body.offsetHeight;
}
}
Función que crea la capa de transiciónCÓDIGO
// Llegados a este punto, ha pasado todas las validaciones, por lo que crearemos
// una capa llamada cargando y la mostraremos
try{
var newdiv = document.createElement('div');
newdiv.setAttribute('id', "cargando");
newdiv.className ="cargando";
getSize();
newdiv.style.height = myScrollHeight + 'px';
document.body.appendChild(newdiv);
document.getElementById("cargando").style.display = "block";
} catch(e){
alert("Error al mostrar la capa de cargando - Consulte al Administrador\n"+e);
}
CSS de la capa de transiciónCÓDIGO
.cargando {
display: block;
position: absolute;
top: 0;
left: 0;
z-index: 100;
width: 100%;
height: 100%;
background: #000 url(../images/cargando.gif) no-repeat;
background-position:center;
filter:alpha(opacity=30);
-moz-opacity: 0.3;
opacity: 0.3;
}
Para la imagen cargando