Dovrebbe essere giusto il codice per renderle invisibili! E' quello che ti ho postato. L'ho messo nella funzione che crea il div con sfondo grigio e lo mette a tutto schermo, subito all'inizio. Ti posto la funzione che fa quello che ti ho descritto.
codice:
function upload_alert() {
d = document;
// if the modalContainer object already exists in the DOM, bail out.
if(d.getElementById("modalContainer")) return;
array_select = document.getElementsByTagName("select");
for (i=0; i<array_select.length; i++){
array_select[i].style.visibility = "hidden";
}
// create the modalContainer div as a child of the BODY element
mObj = d.getElementsByTagName("body")[0].appendChild(d.createElement("div"));
mObj.id = "modalContainer";
// make sure its as tall as it needs to be to overlay all the content on the page
mObj.style.height = document.documentElement.scrollHeight + "px";
// create the DIV that will be the alert
alertObj = mObj.appendChild(d.createElement("div"));
alertObj.id = "alertBox";
// MSIE doesnt treat position:fixed correctly, so this compensates for positioning the alert
if(d.all && !window.opera) alertObj.style.top = document.documentElement.scrollTop + "px";
// center the alert box
alertObj.style.left = (d.documentElement.scrollWidth - alertObj.offsetWidth)/2 + "px";
alertObj.style.marginTop = ((screen.height/2)-150)+"px";
// create an H1 element as the title bar
h1 = alertObj.appendChild(d.createElement("h1"));
h1.appendChild(d.createTextNode(ALERT_TITLE));
// create a paragraph element to contain the txt argument
div_centrale = d.createElement("div");
div_centrale.setAttribute("style","text-align:center");
immagine = d.createElement("img");
immagine.setAttribute("src","loading.gif");
immagine.setAttribute("alt","loading...");
paragrafo = d.createElement("div");
paragrafo.setAttribute("id","paragrafo");
paragrafo.appendChild(d.createTextNode("Il tempo di caricamento puo' variare a seconda della connessione e della dimensione dell'immagine"));
h3 = d.createElement("h3");
h3.appendChild(d.createTextNode("Caricamento dell'immagine in corso..."));
msg = alertObj.appendChild(div_centrale);
msg.appendChild(immagine);
msg.appendChild(h3);
msg.appendChild(paragrafo);