Código PHP:
   <form action="index.php" method="post" name="form1" enctype="multipart/form-data">
....
....
 <table width="93%"  border="0" align="center" cellpadding="2" cellspacing="1">
        <tr>
          <td align="right" bgcolor="#999999" class="style9">Referencia: <br>              </td>
          <td align="left" bgcolor="#CCCCCC" class="style10"> 
              <input name="referencia" type="text" id="referencia" size="6">
</td>
        </tr>
 
        <SCRIPT>
            function mostrar_encuesta() {
                        document.getElementById("div_encuesta").style.display = "none";
                        document.getElementById("div_encuesta_prov").style.display = "none";
                if (document.form1.tipo.selectedIndex>0) {
                    if (document.form1.tipo.selectedIndex==4) || (document.form1.tipo.selectedIndex==5) {
                        document.getElementById("div_encuesta_prov").style.display = "block";
                        document.getElementById("div_encuesta").style.display = "none";
                    } else {
                        document.getElementById("div_encuesta_prov").style.display = "none";
                        document.getElementById("div_encuesta").style.display = "block";
                    }
                }
                
            }
            </SCRIPT>
        <tr>
          <td align="right" bgcolor="#999999" class="style9">Tipo:  </td>
           
          <td align="left" bgcolor="#CCCCCC" class="style10">  
        
             <select onchange=mostrar_encuesta()  name="tipo" id="tipo">
             <OPTION value="" selected valign="top">[seleccione una opción]</option>
            <option>Valladolid</option>
            <option>Madrid</option>
            <option>Barcelona</option>
            <option>Valencia</option>
            <option>Bilbao</option>
          </select> </td>
        </tr> 
   Pues siempre muestra la parte que solo deberia mostrarse si se ha seleccionado antes el valor 4 o 5, en este caso Valencia o Bilbao. Hago uso de un div pero nada, ni caso.
Código PHP:
   <DIV id=div_encuesta_prov style="DISPLAY: none">
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
 
          <td align="right" bgcolor="#999999" class="style9">Localidad: </td>
          <td align="left" bgcolor="#CCCCCC" class="style10">             <input name="localidad" type="text" id="localidad" size="2"></td>
        </tr> 
     
 

 
 

