function checkStandard(frm, val, displayText, fieldName) {
	var returnVal = false;
	if (val == "" || val == "null") {
		alert("Please enter "+ displayText.toLowerCase() + ".");
		frm[fieldName].focus();
	} else {
		returnVal = true;
		if (fieldName == "fName") {
			var illegalChars = /[0-9]/;
			var i = val.length;
			while (i--) {
				var n = val.substr(i,1);
				if (n.match(illegalChars)) {
					alert (displayText + " contains illegal characters.");
					returnVal = false;
					frm[fieldName].focus();
					break;
				}
			}
		}
	}
	return returnVal;
}

function checkEmail(frm, em, displayText, fieldName) {
//	alert(em);
	var returnVal = false;
	var emailFilter=/^.+@.+\..+$/;
	if (!em) {
		alert("Please enter " + displayText.toLowerCase() + ".");
		frm[fieldName].focus();
	} else if (!(emailFilter.test(em))) { 
		alert(displayText + " is not a valid email address.");
		frm[fieldName].focus();
	} else {
		var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\]]/
		if (em.match(illegalChars)) {
			alert(displayText + " contains illegal characters.");
			frm[fieldName].focus();
		} else {
			returnVal = true;
		}
	}
	return returnVal;
}
