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: 93 516 61 61</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="0" cellspacing="0">');
	document.write('	<tr>'); 
	document.write('	  <td class="txttop"><div style="background: url(imatges/bar.gif);height:29px;padding-left:8px"><img src="imatges/noimatge.gif" alt="" width="1" height="8" />ZONA PRIVADA</div></td>');
	document.write('	</tr>');
	document.write('</table>');
	document.write('<table width="100%" border="0" cellpadding="8" cellspacing="1" bgcolor="#167F18">');
	document.write('	<tr>'); 
	document.write('	  <td bgcolor="#FFFFFF" class="txt">');
	document.write('                    <form name="form_vip" method="post" action="privada_zonaentrar.asp" onSubmit="return comprueba_acceso();">');
	document.write('                      <table width="100%" border="0" cellspacing="6" cellpadding="0">');
	document.write('                        <tr>');
	document.write('                          <td class="categoria">');
	document.write('                            <div align="right" class="txt">E-Mail:</div>');
	document.write('                          </td>');
	document.write('                          <td>');
	document.write('                            <div align="right">');
	document.write('                              <input class="txt" name="usuario" type="text" style="width:120px" maxlength="50">');
	document.write('                            </div>');
	document.write('                          </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:120px" maxlength="15">');
	document.write('                            </div>');
	document.write('                          </td>');
	document.write('                        </tr>');
	document.write('                        <tr>');
	document.write('                          <td colspan=2 align="center">');
	document.write('                            <input name="Submit" type="submit" class="txt" value="Accedir">');
	document.write('                          </td>');
	document.write('                        </tr>');
	document.write('                        <tr>');
	document.write('                          <td colspan=2 align="center">');
	document.write('                            <div class="txt"><b><a target="_blanck" href="usuariweb.asp">Donar-se d´alta</a></b></div>');
	document.write('                          </td>');
	document.write('                        </tr>');
	document.write('                      </table>');
	document.write('                    </form>');
	document.write('    </td>');
	document.write('  </tr>');
	document.write('</table>');
	document.write('<br>');
}

function comprueba_acceso()
{
    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;
    }
}
