Ver Mensaje Individual
  #1 (permalink)  
Antiguo 20/12/2008, 14:11
Rodre
Invitado
 
Mensajes: n/a
Puntos:
Javascript anda en IE pero no en Firefox

Estoy haciendo una página y de repente unas funciones muy simples Javascript me dejaron de andar en el Firefox. Yo había modificado algunas propiedades de los divs con css. Dejo el código a ver si alguien encuentra lo que pasa.

Saludos y gracias.

CODIGO HTML:

Código HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=windows-1250">
  <meta name="generator" content="PSPad editor, www.pspad.com">
  <title></title>
  <link rel="stylesheet" type="text/css" href="main.css">
  <script language="javascript">
  var cateover = '';
  var cateout = '';
  function over(cateover){
    document.getElementById(cateover).src='botones/'+cateover+'-hover.gif';
  }
  function out(cateout){
    document.getElementById(cateout).src='botones/'+cateout+'.gif';
  }
  function contacto(){
    document.getElementById('fotomain').src='img/fotocontacto.jpg';
  }
  </script>
  </head>
  <body>
    <div class="contenedor">
      <div class="divprincipal">
        <div class="divlinks">
          <table class="tablalinks">
            <tr>
              <td><img id="commercial" src="botones/commercial.gif" onmouseover="over('commercial');" onmouseout="out('commercial');" /></td>
              <td class="tdseparador">&nbsp;</td>
              <td><img id="personal" src="botones/personal.gif" onmouseover="over('personal');" onmouseout="out('personal');" /></td>
              <td class="tdseparador">&nbsp;</td>
              <td><img id="contact" src="botones/contact.gif" onmouseover="over('contact');" onmouseout="out('contact');" onclick="contacto();" /></td>
            </tr>
          </table>
        </div>
        <div class="subcontenedor">
          <div class="divfotos"> 
            <img id="fotomain" class="fotomain" src="img/fotomain.jpg" />
          </div>
        </div>
      </div>
    </div>
  </body>
</html> 
ESTILOS CSS:

Código:
.contenedor {
  height: 100%;
  width: 100%;
  text-align: center;
}

.divprincipal {
  width: 921px;
  height: 700px;
  background-image: url(img/fondomain.gif);
  margin: auto;
  position: relative;
  top: 50%;
  margin-top: -350px;
}

.divlinks {
  width: 700px;
  height: 50px;
  margin: auto;
  position: relative;
  top: 16%;
}

.tablalinks {
  margin: auto;
  position: relative;
  right: 20px;
}

#personal {
  cursor: pointer;
}

#commercial {
  cursor: pointer;
}

#contact {
  cursor: pointer;
}

.tdseparador {
  width: 90px;
}

.subcontenedor {
  width: 700px;
  height: 450px;
  position: relative;
  margin: auto;
}

.divfotos {
  width: 590px;
  height: 400px;
  margin: auto;
  overflow: hidden;
  position: relative;
  top: 47%;
}