function checkField(fieldName, checkList, displayName, errorList){
	var field = (fieldName == "") ? null : new Element(fieldName);
	var checks = Trim(checkList).split(',');
	var check = "";
	var checkName = "";
	var checkValue = "";
	var checkResults = "";
	
	//The following variables only apply to radio buttons & check boxes
	var radioFields = null;
	var radioField = null;
	var checkedAttribute;
	
	errorList = (errorList == null) ? "" : errorList;

	for(var count = 0; count < checks.length; count++){
		check = checks[count];
		if(check.indexOf("(") > -1){
			checkName = check.slice(0, check.indexOf("("));
			checkValue = check.slice(check.indexOf("(")+1, check.indexOf(")"));
		}
		else{
			checkName = check;
			checkValue = "";
		}
		checkName = checkName.toUpperCase();
		
		switch(checkName){
			case "NOTNULL":
				if(Trim(field.obj.value) == ""){
					checkResults += displayName + " cannot be blank.\n";
				}
				break;
			case "NUMERIC":
				if(isNaN(field.obj.value)){
					checkResults += displayName + " must be a number.\n";
				}
				break;
			case "NOTNUMERIC":
				if(!isNaN(field.obj.value)){
					checkResults += displayName + " cannot be a number.\n";
				}
				break;
			case "MAX":
				if(parseFloat(field.obj.value) > parseFloat(checkValue)){
					checkResults += displayName + " cannot be greater than " + checkValue + ".\n";
				}
				break;
			case "MIN":
				if(parseFloat(field.obj.value) < parseFloat(checkValue)){
					checkResults += displayName + " cannot be less than " + checkValue + ".\n";
				}
				break;
			case "NOTFIRST":
				if(field.obj.selectedIndex == 0 || field.obj.selectedIndex == -1){
					checkResults += "You must select another option for " + displayName + ".\n";
				}
				break;
			case "LENGTH":
				if(Trim(field.obj.value).length != parseInt(checkValue)){
					checkResults += displayName + " must be " + checkValue + " characters in length.\n";
				}
				break;
			case "LENGTH<":
				if(Trim(field.obj.value).length >= parseInt(checkValue)){
					checkResults += displayName + " must be less than " + checkValue + " characters in length.\n-- Please remove at least " + ((Trim(field.obj.value).length - parseInt(checkValue))+1) + " characters from " + displayName + "\n";
				}
				break;
			case "LENGTH<=":
				if(Trim(field.obj.value).length > parseInt(checkValue)){
					checkResults += displayName + " must be less than or equal to " + checkValue + " characters in length.\n-- Please remove at least " + (Trim(field.obj.value).length - parseInt(checkValue)) + " characters from " + displayName + "\n";
				}
				break;
			case "LENGTH>":
				if(Trim(field.obj.value).length <= parseInt(checkValue)){
					checkResults += displayName + " must be greater than " + checkValue + " characters in length.\n-- Please add at least " + ((parseInt(checkValue) + 1) - Trim(field.obj.value).length) + " characters to " + displayName + "\n";
				}
				break;
			case "LENGTH>=":
				if(Trim(field.obj.value).length < parseInt(checkValue)){
					checkResults += displayName + " must be greater than or equal to " + checkValue + " characters in length.\n-- Please add at least " + (parseInt(checkValue) - Trim(field.obj.value).length) + " characters to " + displayName + "\n";
				}
				break;
			case "CHECKONE":
				checkedAttribute = false;
				radioFields = checkValue.split(';');
				for(var i = 0; i < radioFields.length; i++){
					radioField = new Element(radioFields[i]);
					if(radioField.obj.checked){
						checkedAttribute = true;
						break;
					}
				}
				radioField = null;
				if(!checkedAttribute){
					checkResults += "You must select an option for " + displayName + ".\n";
				}
				break;
			default:
				alert("\"" + checkName + "\" is not a valid check constraint.");
		}
	}
	
	return (errorList + checkResults);
}

