<!--
function echeck(str) {
  var at="@"
  var dot="."
  var lat=str.indexOf(at)
  var lstr=str.length
  var ldot=str.indexOf(dot)
  if (str.indexOf(at)==-1){
     alert("E-MAIL incorrecto. ")
     return false
  }
  if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
     alert("E-MAIL incorrecto. ")
     return false
  }
  if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
      alert("E-MAIL incorrecto")
      return false
  }
   if (str.indexOf(at,(lat+1))!=-1){
      alert("E-MAIL incorrecto. ")
      return false
   }
   if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
      alert("E-MAIL incorrecto. ")
      return false
   }
   if (str.indexOf(dot,(lat+2))==-1){
      alert("E-MAIL incorrecto. ")
      return false
   }
   if (str.indexOf(" ")!=-1){
      alert("E-MAIL incorrecto. ")
      return false
   }
   return true          
}

function ValidateForm(){
  var emailID=document.formulario.txtEmail
  
  if ((emailID.value==null)||(emailID.value=="")){
    alert("Por favor, inserta un E-MAIL correcto. ")
    emailID.focus()
    return false
  }
  if (echeck(emailID.value)==false){
    emailID.value=""
    emailID.focus()
    return false
  }
  return true
 }
function checkrequired(which) {
var pass=true;
if (document.images) {
for (i=0;i<which.length;i++) {
var tempobj=which.elements[i];
if (tempobj.name.substring(0,8)=="required") {
if (((tempobj.type=="text"||tempobj.type=="textarea")&&
tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&
tempobj.selectedIndex==0)) {
pass=false;
break;
         }
      }
   }
}
if (!pass) {
shortFieldName=tempobj.name.substring(8,30).toUpperCase();
alert("Por favor el campo"+shortFieldName+" debe ser completado. ");
return false;
}
else
return true;
}
//-->