function LimpiaFormulario(){
  document.Form1.reset();
  document.Form1.TxNom.focus();
}
function EnviarFormulario(){
   var Sw;
  Sw=true;
  	if (document.Form1.TxNom.value.length==0){
		Sw=false;
		alert("ENTER YOUR NAME");
		document.Form1.TxNom.focus();
	    }
	else{
     if (document.Form1.TxApe.value.length==0){
        Sw=false;
        alert("ENTER YOUR LASTNAME");
        document.Form1.TxApe.focus();
        }
     else{
       if (document.Form1.TxEmp.value.length==0){
	      Sw=false;
		  alert("ENTER YOUR COMPANY");
          document.Form1.TxEmp.focus();
          }
      else{
          if (document.Form1.TxCar.value.length==0){
		      Sw=false;
			  alert("ENTER YOUR POSITION");
              document.Form1.TxCar.focus();
            }
        else{
            if (document.Form1.TxTel.value.length==0){
                Sw=false;
                alert("ENTER YOUR TELEPHONE");
                document.Form1.TxTel.focus();
             }
          else{
              if (document.Form1.TxDir.value.length==0){
                 Sw=false;
                 alert("ENTER YOUR ADDRESS");
                 document.Form1.TxDir.focus();
              }
            else{		                  
                 if (ValidaEMail(document.Form1.TxEMa.value)){
                    Sw=false;		                      
                    document.Form1.TxEMa.focus();
                 }
            }
		  }
	    }
	  }
     } 
    }
  if (Sw){document.Form1.submit();}		       
}		    
function ValidaEMail(Valor){
  var SwError;
  var MsgError;				
  SwError=true;
  MsgError= "E-MAIL INVALID";
  at=0;
  ats=0;
  dot=0;
  elen = Valor.length;
  for (i=0; i<=elen; i++)
	{	if (Valor.charAt(i)=="@")	{ats++; 	at = i;}
		if (Valor.charAt(i)==".")	{dot = i;}
		if (Valor.charAt(i)==" ")	{SwError=false;}
	}
  if (at>0 && ats==1 && dot-1>at && (dot+3==elen || dot+4==elen)){SwError=false;}
  if (SwError) alert(MsgError);
  return SwError;
}