var errMsgHdr = "The following errors were detected\n";
var errMsgFtr = "This form has not been submitted\n";

function isBlank(inStr, inFldName){
// returns an error message as a string if the argument is zero length
// returns a zero length string otherwise
	if (inStr.length == 0)
		return '"' + inFldName + '" is blank\n';
	return "";
}


function isBlankRadio(inRadio){
	for (i = 0; i < inRadio.length; i++){
		if (inRadio[i].checked == true)
			return "";
	}
	return "\"" + inRadio[0].name + "\" is blank\n";
}


function isURL(inStr, inFldName){
}


function isYear(inYear, inFldName, lLimit, uLimit){
	if (isNaN(inYear)){
		return "\"" + inYear + "\" is not a valid year\n";
	}
	if (inYear < lLimit || inYear > uLimit)
		return "\"" + inYear + "\" is not a valid year\n";
	return "";
}

function isEmail(inStr, inFldName) {
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(inStr)){
		return "";
	}
	return "\"" + inFldName + "\" is not a valid E-mail Address!\n";
}
