A nice effect is to put the rest of the page in "shadow":
Code:
var b = document.createElement("div"),
c = document.createElement("div");
c.style.position = b.style.position = "absolute";
c.style.top = c.style.left = "0";
c.style.height = c.style.width = "100%";
c.style.backgroundColor = "black";
c.style.filter = "alpha(Opacity=" + Math.floor((c.style.opacity = c.style.MozOpacity = c.style.KhtmlOpacity = "0.5") * 100) + ")";
b.style.top = b.style.left = "45%";
b.style.fontSize = "300%";
b.style.border = "2px solid red";
b.style.backgroundColor = "white";
b.appendChild(document.createTextNode("Please be patient while the document is loading."));
document.body.appendChild(c);
document.body.appendChild(b);
// long slow code goes here
document.body.removeChild(c);
document.body.removeChild(b);
c = b = null;
Bookmarks