//
// Kilak (c) 2009
// http://www.kilak.com/
//

<!--
//
// INICIO FUNCIONES DE VALIDACIÓN
//
function vNombre() 
    {
	if (document.frmContacto.Nombre.value == "")
           {
             alert('\nPlease enter your name.');
             document.frmContacto.Nombre.focus();
             return(false);
           }
             else { return(true); }
    }

function vApellido() 
    {
	if (document.frmContacto.Apellido.value == "")
           {
             alert('\nPlease enter your surname.');
             document.frmContacto.Apellido.focus();
             return(false);
           }
             else { return(true); }
    }

function vDireccion() 
    {
	if (document.frmContacto.Direccion.value == "")
           {
             alert('\nPlease enter your address.');
             document.frmContacto.Direccion.focus();
             return(false);
           }
             else { return(true); }
    }

function vCiudad() 
    {
	if (document.frmContacto.Ciudad.value == "")
           {
             alert('\nPlease enter your city.');
             document.frmContacto.Ciudad.focus();
             return(false);
           }
             else { return(true); }
    }

function vPais() 
    {
	if (document.frmContacto.Pais.value == "")
           {
             alert('\nPlease enter your country.');
             document.frmContacto.Pais.focus();
             return(false);
           }
             else { return(true); }
    }

function vTelefono() 
    {
	if (document.frmContacto.Telefono.value == "")
           {
             alert('\nPlease enter your telephone number.');
             document.frmContacto.Telefono.focus();
             return(false);
           }
             else { return(true); }
    }

function vEmail()
    {
	if (document.frmContacto.Email.value == "")
           {
             alert('\nPlease enter your e-mail address.');
             document.frmContacto.Email.focus();
             return(false);
        }

        if (document.frmContacto.Email.value.indexOf('@',0)==-1 || document.frmContacto.Email.value.indexOf('@',0)== 0 ||
          document.frmContacto.Email.value.indexOf('.',0)==-1)
             {
                 alert('\nE-mail address is not valid. Please check your e-mail address.');
                 document.frmContacto.Email.focus();
                 return(false);
              }
             else { return(true); }
    }

function vZona() 
    {
	if (!(document.frmContacto.zone[0].checked || document.frmContacto.zone[1].checked))
           {
             alert('\nPlease select your WAP zone.');
             return(false);
           }
             else { return(true); }
    }

function vTarifas() 
    {
	if (!(document.frmContacto.tarifa_inscripcion.checked))
           {
             alert('\nPlease select the tarif.');
             return(false);
           }
             else { return(true); }
    }

function vModoPago() 
    {
	if (!(document.frmContacto.modo_pago[0].checked || document.frmContacto.modo_pago[1].checked || document.frmContacto.modo_pago[2].checked))
           {
             alert('\nPlease select a payment method.');
             return(false);
           }
             else { return(true); }
    }

function vComentario() 
    {
	if (document.frmContacto.Comentario.value == "")
           {
             alert('\nPlease enter your message.');
             document.frmContacto.Comentario.focus();
             return(false);
           }
             else { return(true); }
    }

// FIN FUNCIONES DE VALIDACIÓN


// BOTÓN ENVIAR CONTÁCTENOS
<!--
function EnviarContacto(frmContacto) 
   {
       if ( vNombre() && vApellido() && vEmail() && vComentario() )
          {
          document.frmContacto.submit();
          }
   }
// -->

// BOTÓN ENVIAR INSCRIPCIÓN
<!--
function EnviarInscripcion(frmContacto)
   {
       if ( vApellido() && vNombre() && vDireccion() && vCiudad() && vPais() && vTelefono() && vEmail() && vZona() && vTarifas() && vModoPago() )
          {
          document.frmContacto.submit();
          }
   }
// -->

// BOTÓN ENVIAR INSCRIPCIÓN NO MIEMBROS
<!--
function EnviarInscripcionNoMiembro(frmContacto)
   {
       if ( vApellido() && vNombre() && vDireccion() && vCiudad() && vPais() && vEmail() && vZona() && vModoPago() )
          {
          document.frmContacto.submit();
          }
   }