CSS used to hide everything, second one is for FireFox and Mac, first for all others
#overlayblackout {
position: absolute;
top: 0;
left: 0;
z-index: 90;
background-color: #000;
filter:alpha(opacity=70);
-moz-opacity: 0.7;
opacity: 0.7; }
#overlayblackout_ffmac {
position: absolute;
top: 0;
left: 0;
z-index: 90; }
JS used to add div tag
// Set up our background and append it to the body.
ourbody = document.getElementsByTagName("body").item(0);
pbackground = document.createElement("div");
if(!(IsFirefoxMac()))
{
pbackground.setAttribute("id", movie_viewer.BACKGROUND_DIV);
}
else
{
// Mac Firefox can't handle opacity stuff, so let's do a workaround.
movie_viewer.BACKGROUND_DIV = "overlayblackout_ffmac";
pbackground.setAttribute("id", movie_viewer.BACKGROUND_DIV);
pbackground.style.backgroundImage = "url(http://img.ngfiles.com/blackbox.png)";
pbackground.style.backgroundRepeat = "repeat";
}
pbackground.style.display = 'none';
ourbody.appendChild(pbackground);
I hope this helps.