<!--
function CheckForNumbersOnly(theFormField, blnAllowDecimal)
{
	//Check the last character entered to see if it is only a number. If not, alert the user.
	//Don't do anything if the user just blanked out the field ("" or null, depending on browser).
	//Also check to see if decimal points are allowed in the field.
	//Check to see if there already is a decimal point.
	//NOTE: There is a possibility that non-numbers can still be entered:
	//The user may quickly hit a couple of keys before the fuction catches it.
	//Raj Alairys - August 16, 2000.

	var blnSuccess = true; //If things are OK, return true, else return false.
		
	if((theFormField.value.substring(theFormField.value.length-1,theFormField.value.length)<"0"
		|| theFormField.value.substring(theFormField.value.length-1,theFormField.value.length)>"9")
		&& !(theFormField.value=="" || theFormField.value == null))
	{
		//Now check to see if decimals are allowed. If so, check to see if one was already entered.
		if (!(blnAllowDecimal &&
		   (theFormField.value.substring(theFormField.value.length-1,theFormField.value.length)==".")
		   && !(theFormField.value.indexOf(".")<theFormField.value.length-1)))
		{
			alert("Numbers only, please.");
			theFormField.value = theFormField.value.substring(0,theFormField.value.length-1);
			blnSuccess = false; //Return false, so we know this keystroke didn't get entered.
		}
	}

	return blnSuccess;
}
	
function CheckForAlphaNumericsOnly(theFormField)
{
	//Check the last character entered to see if it is alphanumeric. If not, alert the user.
	//Don't do anything if the user just blanked out the field ("" or null, depending on browser).
	//NOTE: There is a possibility that non-alphanumerics can still be entered:
	//The user may quickly hit a couple of keys before the fuction catches it.
	//This could probably be fixed by looping through the whole string each time, but that seems
	//simply too resouce-intensive.
	//Raj Alairys - May 9, 2001.

	var blnSuccess = true; //If things are OK, return true, else return false.
		
	if(!((theFormField.value.substring(theFormField.value.length-1,theFormField.value.length)>="0"
		&& theFormField.value.substring(theFormField.value.length-1,theFormField.value.length)<="9")
		|| (theFormField.value.substring(theFormField.value.length-1,theFormField.value.length)>="a"
		&& theFormField.value.substring(theFormField.value.length-1,theFormField.value.length)<="z")
		|| (theFormField.value.substring(theFormField.value.length-1,theFormField.value.length)>="A"
		&& theFormField.value.substring(theFormField.value.length-1,theFormField.value.length)<="Z"))
		&& !(theFormField.value=="" || theFormField.value == null))
	{
			alert("Alpha-numeric characters only, please.");
			theFormField.value = theFormField.value.substring(0,theFormField.value.length-1);
			blnSuccess = false; //Return false, so we know this keystroke didn't get entered.
	}

	return blnSuccess;
}
// -->
