//
// Kilak (c) 2009
// http://www.kilak.com/
//

<!--
//
// INICIO FUNCIONES DE VALIDACIÓN
//
function vNombre() 
    {
	if (document.frmContacto.Nombre.value == "")
           {
             alert('\nDebe incluir su nombre.');
             document.frmContacto.Nombre.focus();
             return(false);
           }
             else { return(true); }
    }

function vApellido() 
    {
	if (document.frmContacto.Apellido.value == "")
           {
             alert('\nDebe incluir su apellido.');
             document.frmContacto.Apellido.focus();
             return(false);
           }
             else { return(true); }
    }

function vDireccion() 
    {
	if (document.frmContacto.Direccion.value == "")
           {
             alert('\nDebe incluir su dirección postal.');
             document.frmContacto.Direccion.focus();
             return(false);
           }
             else { return(true); }
    }

function vCiudad() 
    {
	if (document.frmContacto.Ciudad.value == "")
           {
             alert('\nDebe incluir la ciudad en la que reside.');
             document.frmContacto.Ciudad.focus();
             return(false);
           }
             else { return(true); }
    }

function vPais() 
    {
	if (document.frmContacto.Pais.value == "")
           {
             alert('\nDebe incluir el país en el que reside.');
             document.frmContacto.Pais.focus();
             return(false);
           }
             else { return(true); }
    }

function vTelefono() 
    {
	if (document.frmContacto.Telefono.value == "")
           {
             alert('\nDebe incluir su número telefónico.');
             document.frmContacto.Telefono.focus();
             return(false);
           }
             else { return(true); }
    }

function vEmail()
    {
	if (document.frmContacto.Email.value == "")
           {
             alert('\nDebe incluir su dirección de e-mail.');
             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('\nLa dirección de e-mail ingresada es incorrecta. Por favor verifíquela.');
                 document.frmContacto.Email.focus();
                 return(false);
              }
             else { return(true); }
    }

function vZona() 
    {
	if (!(document.frmContacto.zone[0].checked || document.frmContacto.zone[1].checked))
           {
             alert('\nDebe seleccionar la zona a la que pertenece.');
             return(false);
           }
             else { return(true); }
    }

function vTarifas() 
    {
	if (!(document.frmContacto.tarifa_inscripcion.checked))
           {
             alert('\nDebe seleccionar la tarifa de inscripción.');
             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('\nDebe seleccionar el modo de pago.');
             return(false);
           }
             else { return(true); }
    }

function vComentario() 
    {
	if (document.frmContacto.Comentario.value == "")
           {
             alert('\nDebe incluir un mensaje o comentario.');
             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();
          }
   }