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

function checkWholeForm(theForm) {
	var why = "";
	if (!(theForm.OrgName.value)) {
		why += "- Please enter the name of your organization.\n";
	}
	why += checkEmail(theForm.Email.value);
	if (!(theForm.NameOfRequestor.value)) {
		why += "- Please enter your name.\n";
	}
	if (why != "") {
	   alert(why);
	   return false;
	}
return true;
}
