Lo mejor que podrias hacer es copiar bien mi codigo no ????
esta mal por dos cosas........
1. copia bien mi codigo ya que no es none, sino "none"....... aca mira:
document.getElementById(nombreCapa).style.display = "none";
2. por donde vas a pasar para que se muestre u oculte si capa1 no tiene algun contenido ????
Bueno, aqui te pongo tu codigo arreglado y listo.
Código html:
Ver original<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script language="Javascript"> display = (navigator.appName == "Microsoft Internet Explorer") ? "block" : "table-row" ;
function mostrar(nombreCapa){ document.getElementById(nombreCapa).style.display = display;}
function ocultar(nombreCapa){ document.getElementById(nombreCapa).style.display = "none";}
<body background="../../imagenes/FondoderechaEventos.png" onLoad="MM_showHideLayers('Layer3','','show')"> <div id="Layer1" style="position:absolute; left:100px; top:51px; width:98px; height:149px; z-index:1" align="center"><img src="http://www.forosdelweb.com/imagenes/mapas/MapaEventosGral.jpg" width="418" height="520" border="0" > <div id="capa1" style="position:absolute;width:100px;height:26px;top:167px;left:247px;" onmouseout="ocultar('capa2')" onmouseover="mostrar('capa2')">opcion
</div> <div id="capa2" style="position:absolute;width:100;height:100;top: 112px;left:556px;display:none">prueba
</div>
espero te sirva..... no olvides el karma ........ jaja
suerte.