// email
function checkEmail (strng) {
   var error="";
   if (strng == "") {
   return "Please enter your email address.";
   }

   var emailFilter=/^.+@.+\..{2,3}$/;
   if (!(emailFilter.test(strng))) {
      error = "Please enter a valid email address.";
   }
   else {
      //test email for illegal characters
      var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/
      if (strng.match(illegalChars)) {
         error = "The email address contains illegal characters.";
      }
   }
   return error;
}
