function CheckInt (fieldObject) {
// Verifies that a text field contains an integer or is empty.  
// Input object should be a text field object handle -- same as TAS_ValidateNum.
// If an empty field is found, just return false.
// If only one or two blanks are found, empty the field and return false.
// If an integer is found, display only the integer in the field and return true.
// To be found, the integer must precede any other nonblank characters.
// If noninteger data are found instead, present a msg, empty and focus the field, and return false.
// By MLD
//
// Updated to enforce min and max properties of the text fields (if present); if the value is 
// out of range, it is set to the nearest range endpoint.  --  MLD, 3-22-99

	var MyValue = fieldObject.value
	if (MyValue == "") return false;
	if (MyValue == " " || MyValue == "  ") {
		fieldObject.value = "";
		return false;
	}
	if (isNaN(parseInt(MyValue, 10))) {
		alert ('Please enter an integer in this field, such as 1 or 2.');
		fieldObject.value = "";
		fieldObject.focus();
		//fieldObject.select();
		return false;
	}
	MyValue = (parseInt(MyValue, 10));

	// Enforce range limits, if specified.  Then write parsed and maybe adjusted value to field.
	if (fieldObject.min != null && MyValue < fieldObject.min){
		fieldObject.value = fieldObject.min;
		alert("The value you have entered is less than the minimum acceptable value="+fieldObject.min+
			", the value has been changed to the minimum acceptable for you.");
		fieldObject.focus();
		fieldObject.select();
		return false;
	}		
	else if (fieldObject.max != null && MyValue > fieldObject.max) {
		fieldObject.value = fieldObject.max;
		alert("The value you have entered is greater than the maximum acceptable value="+fieldObject.max+
			", the value has been changed to the maximum acceptable for you.");
		fieldObject.focus();
		fieldObject.select();
		return false;
	}		
	fieldObject.value = MyValue;
	return true;
}
