function EmailCheck(str) {
   arrayEmail = str.split("@") ;
   if (arrayEmail.length != 2) {
      return false;
      }
   if (arrayEmail[0] == "" || arrayEmail[1] == "") {
      return false;
      }
   arrayEmailx = arrayEmail[1].split(".") ;
   ftmp = arrayEmailx.length ;
   if (ftmp < 2) {
      return false;
      }
   if (arrayEmailx[ftmp-1] == "" || arrayEmailx[ftmp-2] == "") {
      return false;
      }
   return true;
}
function checkinput(thisform) {
   var tmp = "";
   var prom1 = " is required. Please enter now.:" ;
   var prom2 = "Data not entered. Form not submitted." ;
   var prom3 = ", is incorrect. Please re-enter now: " ;
   var prom4 = " not correct. Form not submitted." ;

   tmx = thisform.email.value.replace(/ /g,"");
   thisform.email.value = tmx;
   if (thisform.email.value == "") {
      thisform.email.value = prompt("Email Address"+prom1,"");
      tmx = thisform.email.value.replace(/ /g,"");
      thisform.email.value = tmx;
      if (thisform.email.value == "" || thisform.email.value == "null") {
         alert(prom2);
         thisform.email.value = "";
         return false; }
   }
   if (thisform.email.value != "") {
    if (! EmailCheck(thisform.email.value)) {
      tmp = thisform.email.value;
      thisform.email.value = prompt("Email, "+thisform.email.value+prom3,"");
      tmx = thisform.email.value.replace(/ /g,"");
      thisform.email.value = tmx;
      if ((! EmailCheck(thisform.email.value)) || thisform.email.value == "") {
         alert("Email"+prom4);
         if (thisform.email.value == "" || thisform.email.value == "null") {
            thisform.email.value = tmp;}
         return false; }
    }
   }
  return true;
}