function CheckLength(fld,iMax,sDescrip) {

	//THIH FUNCTION CHECKS IF THE IMAX LENGTH OF
	//THE STRING IN THE FLD FIELD HAS BEEN EXCEEDED.
	//SDESRIPT IS A DESCRIPTION OF THE FIELD
	//BEING CHECKED.
	//
	//RETURNS A BOOLEAN VALUE

	var sMsg;


	if (fld.value.length > iMax) {

		sMsg = "You have exceeded the " + iMax; 
		sMsg = sMsg +  " character limit for the field: "; 
		sMsg = sMsg + sDescrip + ". The current length of the text";
		sMsg = sMsg + " in that field is: " + fld.value.length;
		alert(sMsg);
		fld.focus()
		return(false);
	}
	return(true);
}

function CheckRequired(fld) {

	//MAKES SURE A TEXT BOX HAS A SOME DATA IN IT	
		
	//PARAMETERS: SELECT OBJECT
	
	//RETURNS: TRUE IF VALID

	if (fld.value.length == 0) {
		alert("Please enter the required field.");
		fld.focus()
		return(false);
	}
	return(true);
}

function CheckRequiredSelect(fld) {

	//MAKES SURE A SELECT BOX HAS A VALUE CHOSEN OTHER
	//THAN THE FIRST OPTION
	
	//PARAMETERS: SELECT OBJECT
	
	//RETURNS: TRUE IF VALID
	
	if (fld.selectedIndex == 0) {
		alert("Please make a selection in the required field.");
		fld.focus()
		return(false);
	}
	return(true);
}


