// Grupo Ambrosia
// www.grupo-ambrosia.com
//
// Kilak (c) 2005
// www.kilak.com

//
// INICIO FUNCIONES DE VALIDACIÓN
//
function vNombre() 
    {
	if (document.Contacto.nombre.value == "")
           {
             alert('\nDebe incluir su nombre.');
             document.Contacto.nombre.focus();
             return(false);
           }
             else { return(true); }
    }

function vApellido() 
    {
	if (document.Contacto.apellido.value == "")
           {
             alert('\nDebe incluir su apellido.');
             document.Contacto.apellido.focus();
             return(false);
           }
             else { return(true); }
    }

function vEmail() 
    {
	if (document.Contacto.email.value == "")
           {
             alert('\nDebe ingresar su e-mail.');
             document.Contacto.email.focus();
             return(false);
        }

        if (document.Contacto.email.value.indexOf('@',0)==-1 || document.Contacto.email.value.indexOf('@',0)== 0 ||
          document.Contacto.email.value.indexOf('.',0)==-1)
             {
                 alert('\nDirección de mail no válido. Por favor verifique el e-mail ingresado.');
                 document.Contacto.email.focus();
                 return(false);
              }
             else { return(true); }
    }


function vMotivo() 
    {
	if (document.Contacto.motivo.value == "")
           {
             alert('\nDebe incluir un motivo.');
             document.Contacto.motivo.focus();
             return(false);
           }
             else { return(true); }
    }

function vMensaje() 
    {
	if (document.Contacto.mensaje.value == "")
           {
             alert('\nDebe incluir un mensaje.');
             document.Contacto.mensaje.focus();
             return(false);
           }
             else { return(true); }
    }

// FIN FUNCIONES DE VALIDACIÓN

//
// BOTÓN ENVIAR CONTACTO
<!--
function EnviarContacto(Contacto) 
   {
       if ( vNombre() && vApellido() && vEmail() && vMotivo() && vMensaje() )
          {
          document.Contacto.submit();
          }
   }
//-->
