Salve a tutti,
volevo creare un messaggio di alert personalizzato ma non capisco per quale ragione il seguente codice funziona bene su ff ma non su ie...
La funzione viene chiamata attraverso crea("mio messaggio") Spero che qualcuno sappia darmi consigli in merito

function crea(messaggio) {
nuovo_elemento = document.createElement("div");
nuovo_elemento.setAttribute("id","Popup");
nuovo_elemento.setAttribute("class","transparent") ;
nuovo_elemento.setAttribute("type", "text/css");
nuovo_elemento.innerHTML= "
" + messaggio + "<div>
CHIUDI</div>";
document.getElementById("container").appendChild(n uovo_elemento);
obj=eval("document.getElementById(\"Popup\")");
obj.style.height="100px";
obj.style.width="500px";
obj.style.border="1px #000000 dotted";
obj.style.margin="0px";
obj.style.filter = "alpha(opacity:80)";
obj.style.backgroundcolor = "#00C100";
obj.style.zIndex = 10000;
x = document.body.scrollLeft + windowWidth()/2 - 250;
y = document.body.scrollTop + 300;
obj.style.left = x + "px";
obj.style.top = y + "px";
obj.style.display="block";
}
function Hide() {
/* hide the pop-up */
document.getElementById("Popup").style.display="no ne";
}

function windowWidth() {
if (window.innerWidth){
if (document.body.offsetWidth){
if (window.innerWidth!=document.body.offsetWidth)
return document.body.offsetWidth;
}
return (window.innerWidth); // Mozilla
}


if (document.documentElement.clientWidth)
return document.documentElement.clientWidth; // IE6


if (document.body.clientWidth)
return document.body.clientWidth; // IE DHTML-compliant any other

}