Les dejo el codigo por si alguien pueda dar una mano..
Código:
<SCRIPT language=JavaScript>
<!--
var ns = (document.layers)? true:false;
var ie = (document.all)? true:false;
var visibleMenu = "";
var visibleThumb = "promoTn";
function background() {
var bgndNumber = Math.round(Math.random() * 6) + 1;
if (ie) {
document.bgnd.src = "/images/" + bgndNumber + ".jpg";
} else if(ns) {
document.bgndImg.document.bgnd.src = "/images/" + bgndNumber + ".jpg";
}
}
function evalObj(objName) {
var objPath = "";
if(ns){
objPath = eval("document." + objName);
} else if(ie) {
objPath = eval(objName + ".style");
}
return objPath;
}
function openMenu(layerID) {
if (visibleMenu != "") {
var visibleLayer = evalObj(visibleMenu);
visibleLayer.visibility = "hidden";
}
var theLayer = evalObj(layerID );
theLayer.visibility = "visible";
visibleMenu = layerID;
}
function closeMenu() {
if (visibleMenu != "") {
// alert("the open menu is " + visibleMenu);
var visibleLayer = evalObj(visibleMenu);
visibleLayer.visibility = "hidden";
}
}
function showThumb(layerID) {
var visibleLayer = evalObj(visibleThumb);
visibleLayer.visibility = "hidden";
var theLayer = evalObj(layerID );
theLayer.visibility = "visible";
visibleThumb = layerID;
}
function swapImage (image_name, new_image) {
if (ie) {
var the_image = eval("document." + image_name);
} else if(ns) {
var the_image = eval("document.smallTmb.document." + image_name);
}
the_image.src = new_image;
}
document.onclick = closeMenu;
if (ns) document.captureEvents(Event.CLICK);
//-->
</SCRIPT>