function Cabecera_Principal()
	{
	document.write('                    <table width="100%" border="0" align="center" cellpadding="8" cellspacing="0" background="imagenes/topweb.jpg">');
	document.write('                      <tr>');
	document.write('                        <td valign="top">');
	document.write('                          <form name="form_vip" method="post" action="privada_zonaentrar.asp" onSubmit="return comprueba_acceso();">');
	document.write('                          <table width="98%" border="0" align="right" cellpadding="0" cellspacing="0">');
	document.write('                            <tr>');
	document.write('                              <td height="30" class="top">');
	document.write('                                Federaci&oacute;n de Motociclismo de Castilla y Le&oacute;n');
	document.write('                              </td>');
	document.write('                              <td class="intranet">');
	document.write('                                <div align="center" class="calendario"></div>');
	document.write('                              </td>');
	document.write('                              <td class="intranet">');
	document.write('                                <select name="zonaprivada" id="zonaprivada" class="intranet_t" onChange="javascript:cambio()">');
	document.write('                                  <option value="" selected>Elige tu categoria</option>');
	document.write('                                  <option value="4">Club</option>');
	document.write('                                  <option value="5">Federado</option>');
	document.write('                                  <!-- <option value="3">Prensa</option> -->');
	document.write('                                </select>');
	document.write('                              </td>');
	document.write('                              <td class="intranet">');
	document.write('                                usuario: <input name="usuario" id="usuario" class="intranet_t" type="text" value="usuario" maxlength="15" size="15">');
	document.write('                              </td>');
	document.write('                              <td class="categoria">');
	document.write('                                <span class="intranet">password</span>:<input name="clave" id="clave" class="intranet_t" type="password" maxlength="15" size="8">');
	document.write('                              </td>');
	document.write('                              <td>');
	document.write('                                <input name="Submit" class="leermas" type="submit" value="entrar" />');
	document.write('                              </td>');
	document.write('                            </tr>');
	document.write('                          </table>');
	document.write('                          </form>');
	document.write('                        </td>');
	document.write('                      </tr>');
	document.write('                    </table>');
	}

function Cabecera_PrincipalTPV()
	{
	document.write('                    <table width="100%" border="0" align="center" cellpadding="8" cellspacing="0" background="imagenes/topweb.jpg">');
	document.write('                      <tr>');
	document.write('                        <td valign="top">');
	document.write('                          <table width="98%" border="0" align="right" cellpadding="0" cellspacing="0">');
	document.write('                            <tr>');
	document.write('                              <td height="30" class="top">');
	document.write('                                Federaci&oacute;n de Motociclismo de Castilla y Le&oacute;n');
	document.write('                              </td>');
	document.write('                              <td class="intranet">');
	document.write('                                <div align="center" class="calendario"></div>');
	document.write('                              </td>');
	document.write('                            </tr>');
	document.write('                          </table>');
	document.write('                        </td>');
	document.write('                      </tr>');
	document.write('                    </table>');
	}

function Pie_Principal()
	{
	document.write('              <table width="100%" border="0" align="center" cellpadding="20" cellspacing="0">');
	document.write('                <tr>');
	document.write('                  <td valign="middle" background="imagenes/fbottom.jpg">');
	document.write('                    <span class="calendario"><strong>Federaci&oacute;n de Motociclismo de Castilla y Le&oacute;n</strong></span><br>');
	document.write('                    <span class="bottom">Avda. Vicente Mortes, 35<br>');
	document.write('                    47014 VALLADOLID <br>Tel&eacute;fono: 983 38 05 24 Fax: 983 38 05 69 </span>');
	document.write('                  </td>');
	document.write('                  <td valign="middle" background="imagenes/fbottom.jpg">');
	document.write('                    <div align="right" class="bottom">');
	document.write('                      <a href="avisolegal.asp">Aviso legal</a> - <a href="mapaweb.asp">Mapa del Web</a> - <a href="creditos.asp">Créditos</a>');
	document.write('                    </div>');
	document.write('                  </td>');
	document.write('                </tr>');
	document.write('              </table>');
	}

function cambio()
{
  if (document.getElementById("zonaprivada").value=="3")
  { 
    alert("Estamos trabajando en la construcción de esta zona privada. En breve estará disponible. Gracias.");
  }
}

function comprueba_acceso()
{
  if(document.getElementById("zonaprivada").value!="")
  {
    txt_zonaprivada=document.getElementById("zonaprivada").value;
    if(document.getElementById("usuario").value!="")
    {
      txt_usuario=document.getElementById("usuario").value;
      if(document.getElementById("clave").value!="")
      {
        txt_clave=document.getElementById("clave").value;
        form_vip.submit();
        return true;
      }
      else
      {
        alert("El campo password está vacío");
        return false;
      }
    }
    else
    {
      alert("El campo usuario está vacío");
      return false;
    }
  }
  else
  {
    alert("Debe seleccionar una categoría");
    return false;
  }
}
