prova a vedere dentro questa funzione
codice:
//--------------------------------------------------------------------------
//aggiunge al body un div opaco per inibire tutti i comandi
/*
esempio

    disabilita_pagina(document.getElementById("Text1").value);
    window.setTimeout(abilita_pagina, 5000);
*/
//--------------------------------------------------------------------------
function disabilita_pagina(opacita, backgroundColor)
{
    opacita = (opacita == undefined)? "50" : opacita;
    backgroundColor = (backgroundColor == undefined)? "black" : backgroundColor;
    
    var c = (parseInt("0" + opacita, 10)/100).toString();
    
    var div = document.createElement("div");
    div.setAttribute("id", "div_readonly");
    //div.setAttribute("style", "-moz-opacity: " + c);
    div.style.position = "absolute";
    div.style.left = "0px";
    div.style.top = "0px";
    div.style.zIndex = "9999";
    div.style.width = "100%";
    div.style.height = "100%";
    div.style.backgroundColor = backgroundColor;
    div.style.filter = "alpha(opacity=" + opacita + ")";
    //div.filters.alpha.opacity = opacita;
    div.style.opacity = c;
    div.style.MozOpacity = c;
    div.style.KhtmlOpacity = c;

    document.body.appendChild(div);
    //div.focus();

}