          function valid(form) {
            var field = form.email; // email field
            var str = field.value; // email string
            var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
            var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
            if (!reg1.test(str) && reg2.test(str)) { // if syntax is valid
              alert("Details being processed. To ensure your email is submitted successfully, please wait until you are prompted with the Success message that follows."); 
              return true;
            }
            alert("\"" + str + "\" as an email address has been entered incorrectly. Please retype without any spaces.");
            field.focus();
            field.select();
            return false;
          }

