

function checkEmail (strng) {
var error="";
if (strng == "") {
   error = "No email entered.\n";
}

    var emailFilter=/^.+@.+\..{2,3}$/;
    if (!(emailFilter.test(strng))) { 
       error = "Please enter a valid email format.\n";
    }
    else {
//test email for illegal characters
       var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/
         if (strng.match(illegalChars)) {
          error = "The email contains illegal characters.\n";
       }
    }
return error;    
}

// non-empty textboxes
function isEmpty(strField,strValue) {
	var error = "";
	if (strValue.length == 0) {
		error = "Please enter the "+strField+".\n"
	}
return error;	  
}
