//
// Kilak (c) 2003
// www.kilak.com

//
// INICIO FUNCIONES DE VALIDACIÓN CONTACT
//
function vName() 
    {
	if (document.FormContact.Name.value == "")
           {
             alert('\You should write your name.');
             document.FormContact.Name.focus();
             return(false);
           }
             else { return(true); }
    }

function vLastname() 
    {
	if (document.FormContact.Lastname.value == "")
           {
             alert('\nYou should write your last name.');
             document.FormContact.Lastname.focus();
             return(false);
           }
             else { return(true); }
    }

function vEmail() 
    {
	if (document.FormContact.Email.value == "")
           {
             alert('\nYou should write your e-mail.');
             document.FormContact.Email.focus();
             return(false);
        }

        if (document.FormContact.Email.value.indexOf('@',0)==-1 || document.FormContact.Email.value.indexOf('@',0)== 0 ||
          document.FormContact.Email.value.indexOf('.',0)==-1)
             {
                 alert('\nThe e-mail address is invalid. Please check it.');
                 document.FormContact.Email.focus();
                 return(false);
              }
             else { return(true); }
    }

function vWork() 
    {
	if (document.FormContact.Work.value == "")
           {
             alert('\nYou should write the work we have done for you.');
             document.FormContact.Work.focus();
             return(false);
           }
             else { return(true); }
    }

function vCity() 
    {
	if (document.FormContact.City.value == "")
           {
             alert('\nYou should write the city where you live.');
             document.FormContact.City.focus();
             return(false);
           }
             else { return(true); }
    }

function vComment() 
    {
	if (document.FormContact.Comment.value == "")
           {
             alert('\nYou should write a comment.');
             document.FormContact.Comment.focus();
             return(false);
           }
             else { return(true); }
    }

// FIN FUNCIONES DE VALIDACIÓN

//
//
// BOTONES DE ENVIO DE FUNCIONES
//

// BOTÓN ENVIAR CONTÁCTENOS
<!--
function SendContact(FormContact) 
   {
       if ( vName() && vLastname() && vEmail() && vComment() )
          {
          document.FormContact.submit();
          }
   }
// END ->

// BOTÓN ENVIAR COMENTARIOS
<!--
function SendComment(FormContact) 
   {
       if ( vName() && vLastname() && vCity() && vWork() && vComment() )
          {
          document.FormContact.submit();
          }
   }
// END ->
