function Cabecera_Principal()
	{
	document.write('	 </TD>');
	document.write('  </TR>');
	document.write('  <TR>');
	document.write('    <TD width="100%" height="103" BGCOLOR="#ffffff">');
  
  document.write('      <table width="100%" height="103" border="0" cellpadding="0" cellspacing="0" bgcolor="#002600">');
  document.write('        <tr height="103">');
  document.write('          <td width="940">');
  document.write('            <a href="default.asp"><img src="imatges/logo.jpg" alt="Parc Motor de Castellol&iacute;" width="940" height="103" border="0"><br></a>');
  document.write('          </td>');
  document.write('        </tr>');
  document.write('      </table>');
	}

function Cabecera_Secundaria()
	{
	document.write('<tr>'); 
	document.write('  <td bgcolor="#F7F7F7">');
	document.write('	<table width="100%" border="0" cellspacing="5" cellpadding="5">');
	document.write('	  <tr>');
	document.write('		<td width="33%" height="100" bgcolor="#FFFFFF"> <div align="center"><a href="http://www.gemocat.com/" target="_blank"><img src="imatges/gemocat.jpg" alt="GEMOCAT" width="200" height="93" border="0"></a></div></td>');
	document.write('		<td width="33%" bgcolor="#CCCCCC"><div align="center"><a href="imatges/Promo%20Derbi.pdf" target="_blank"><img src="imatges/copamotard.jpg" alt="copa motard" width="200" height="93" border="0"></a></div></td>');
	document.write('		<td width="33%" bgcolor="#D7141F"> <div align="center"><img src="imatges/apuntat.gif" alt="Moto Esport" width="200" height="50"></div></td>');
	document.write('	  </tr>');
	document.write('	</table>');
	document.write('  </td>');
	document.write('</tr>');
	}

function Peu_Principal(idioma)
	{
	document.write('  <TR>'); 
	document.write('	<td height="30" background="imatges/bar.gif" bgcolor="#FFFFFF">');
	document.write('		<table width="100%" border="0" cellspacing="10" cellpadding="0">');
	document.write('			<tr>');

  switch(idioma)
  {
    case "1":
	    document.write('			  <td><div align="left" class="txtbottom">&copy; Parcmotor Castellol&iacute; | <a href="avislegal.asp" CLASS="LinkPeuPagina">Av&iacute;s legal</a> | <a href="credits.asp" CLASS="LinkPeuPagina">Crèdits</a> | <a href="mapaweb.asp" CLASS="LinkPeuPagina">Mapa Web</a></div></td>');
      break;
    case "2":
	    document.write('			  <td><div align="left" class="txtbottom">&copy; Parcmotor Castellol&iacute; | <a href="avislegal.asp" CLASS="LinkPeuPagina">Aviso legal</a> | <a href="credits.asp" CLASS="LinkPeuPagina">Créditos</a> | <a href="mapaweb.asp" CLASS="LinkPeuPagina">Mapa Web</a></div></td>');
      break;
    case "3":
	    document.write('			  <td><div align="left" class="txtbottom">&copy; Parcmotor Castellol&iacute; | <a href="avislegal.asp" CLASS="LinkPeuPagina">Legal</a> | <a href="credits.asp" CLASS="LinkPeuPagina">Credits</a> | <a href="mapaweb.asp" CLASS="LinkPeuPagina">Site map</a></div></td>');
      break;
  }

	document.write('			</tr>');
	document.write('		</table>');
	document.write('	</td>');
	document.write('  </TR>');
	document.write('  <TR>'); 
	document.write('	<td height="34" bgcolor="#F7F7F7">');
	document.write('		<table width="100%" border="0" cellspacing="10" cellpadding="0">');
	document.write('			<tr>');
	document.write('			  <td>&nbsp;</td>');
	document.write('			  <td><div align="right" class="txt"> Parcmotor Castellolí KM. 560 N-IIa tf: 616 500 600</div></td>');
	document.write('			</tr>');
	document.write('		</table>');
	document.write('	</td>');
	document.write('  </TR>');
	}

function zonaprivada_home()
{
	document.write('<table width="100%" border="0" cellpadding="8" cellspacing="1" bgcolor="#D7141F">');
	document.write('	<tr>'); 
	document.write('	  <td background="../imatges/bar.gif" class="txttop">ZONA PRIVADA</td>');
	document.write('	</tr>');
	document.write('	<tr>'); 
	document.write('	  <td bgcolor="#FFFFFF" class="txt">');
	document.write('  		<table width="100%" border="0" cellspacing="0" cellpadding="7">');
	document.write('        <tr>');
	document.write('  				<td bgcolor="#FFFFFF">');
	document.write('              <table width="100%" border="0" cellpadding="0" cellspacing="0">');
	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="100%" border="0" cellspacing="8" cellpadding="0">');
	document.write('                        <tr>');
	document.write('                          <td class="categoria">');
	document.write('                            <div align="right" class="txt">Categoria:</div>');
	document.write('                          </td>');
	document.write('                          <td>');
	document.write('                            <div align="right">');
	document.write('                              <select name="zonaprivada" id="zonaprivada" class="txt" style="width:150px" onChange="javascript:cambio()">');
	document.write('                                <option selected>Escolleix la categoria</option>');
	document.write('                                <option value="4">Club</option>');
	document.write('                                <option value="5">Federat</option>');
	document.write('                                <!-- <option value="3">Premsa</option> -->');
	document.write('                              </select>');
	document.write('                            </div>');
	document.write('                          </td>');
	document.write('                          <td></td>');
	document.write('                        </tr>');
	document.write('                        <tr>');
	document.write('                          <td class="categoria">');
	document.write('                            <div align="right" class="txt">Usuari:</div>');
	document.write('                          </td>');
	document.write('                          <td>');
	document.write('                            <div align="right">');
	document.write('                              <input class="txt" name="usuario" type="text" style="width:150px" maxlength="15">');
	document.write('                            </div>');
	document.write('                          </td>');
	document.write('                          <td></td>');
	document.write('                        </tr>');
	document.write('                        <tr>');
	document.write('                          <td class="categoria">');
	document.write('                            <div align="right" class="txt">Password: </div>');
	document.write('                          </td>');
	document.write('                          <td>');
	document.write('                            <div align="right">');
	document.write('                              <input class="txt" name="clave" type="password" style="width:150px" maxlength="15">');
	document.write('                            </div>');
	document.write('                          </td>');
	document.write('                          <td>');
	document.write('                            <input name="Submit" type="submit" class="txt" value="Accedir">');
	document.write('                          </td>');
	document.write('                        </tr>');
	document.write('                      </table>');
	document.write('                    </form>');
	document.write('                  </td>');
	document.write('                </tr>');
	document.write('              </table>');
	document.write('  				</td>');
	document.write('  			</tr>');
	document.write('  		</table>');
	document.write('    </td>');
	document.write('  </tr>');
	document.write('</table>');
	document.write('<br>');
}

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 camp password està buit");
        return false;
      }
    }
    else
    {
      alert("El camp usuari està buit");
      return false;
    }
  }
  else
  {
    alert("Ha de sel·leccionar una categoria");
    return false;
  }
}
function cambio()
{
  if (document.getElementById("zonaprivada").value=="3")
  { 
    alert("Estem treballant en la construcció d'aquesta zona privada. En breu estarà disponible. Gràcies");
  }
}
