function emailCheck (emailStr)

 {
  var emailPat=/^(.+)@(.+)$/
  var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
  var validChars="\[^\\s" + specialChars + "\]"
  var quotedUser="(\"[^\"]*\")"
  var atom=validChars + '+'
  var word="(" + atom + "|" + quotedUser + ")"
  var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
  var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")
  var matchArray=emailStr.match(emailPat)

   if(document.Formular.Vorname.value == "")
    {
     alert("Indicate il vostro nome!");
     document.Formular.Vorname.focus();
     return false;
    }


   if(document.Formular.Nachname.value == "")
    {
     alert("Indicate il vostro cognome!");
     return false;
    }
   if(document.Formular.Strasse.value == "")
    {
     alert("Indicate il vostro indirizzo!");
     document.Formular.Strasse.focus();
     return false;
    }
   if(document.Formular.PLZ.value == "")
    {
     alert("Indicate il vostro CAP!");
     document.Formular.PLZ.focus();
     return false;
    }
   if(document.Formular.Ort.value == "")
    {
     alert("Indicate la vostra cittą!");
     document.Formular.Ort.focus();
     return false;
    }
    if(document.Formular.Telefon.value == "")
    {
     alert("Indicate la vostra telefono!");
     document.Formular.Telefon.focus();
     return false;
    }
   if(document.Formular.email.value == "")
    {
     alert("Indicate il vostro indirizzo e-mail CORRETTO!");
     document.Formular.email.focus();
     return false;
    }
  if (matchArray==null) {
  alert("Indicate il vostro indirizzo e-mail CORRETTO!");
     document.Formular.email.focus();
  return false
  }
  var user=matchArray[1]
  var domain=matchArray[2]

  if (user.match(userPat)==null) {
    alert("Verificate il nome che precede la chiocciola! (fabiola@, office@)")
     document.Formular.email.focus();
    return false
  }

   var domainArray=domain.match(domainPat)
   if (domainArray==null) {
	alert("Verificate il nome che segue la chiocciola! (@italy.)")
     document.Formular.email.focus();
    return false
   }
   var atomPat=new RegExp(atom,"g")
   var domArr=domain.match(atomPat)
   var len=domArr.length
   if (domArr[domArr.length-1].length<2 ||
    domArr[domArr.length-1].length>4) {
   alert("Verificate la parte finale dell'indirizzo! (.it, .com)")
     document.Formular.email.focus();
   return false
   }
   if (len<2) {
   alert("Verificate la parte finale dell'indirizzo! (.it, .com)")
     document.Formular.email.focus();
   alert(errStr)
   return false
   }


       if(document.Formular.code.value == "")
    {
     alert("Please enter the text of the captcha!");
     document.Formular.code.focus();
     return false;
    }


   return true;
   }



