/////////////////////////////////////////////////////////////////////////////////////////
// BEGIN:  NumericVal Code
//
// This script validates input values against a set of standardized rules defined in
// each function.
/////////////////////////////////////////////////////////////////////////////////////////

function NumOnlyKeyPress(inputValue, exceptions, delimiter)
{
	/***************************************************************************/
	/* NumOnlyKeyPress
	/*
	/* Determines if the specified input data value is 'allowable' based on 
	/* whether it is either numeric OR matches an entry in the exception array.
	/*
	/* WARNING:  Exceptions MUST be defined using their ASCII character code.
	/***************************************************************************/

	// Define variables
	var counter = 0;
	var found = false;
//	var exceptionList;

	// Tack all numeric codes(48-57)and the Backspace(8) to the exceptions
	exceptions += delimiter + "8" + delimiter + "48" + delimiter;
	exceptions += "49" + delimiter + "50" + delimiter + "51" + delimiter;
	exceptions += "52" + delimiter + "53" + delimiter + "54" + delimiter;
	exceptions += "55" + delimiter + "56" + delimiter + "57";
	var exceptionList = exceptions.split(delimiter);

	// Loop through the exceptions list and test for an occurrence.  If the value
	// matches one in the exception list, the function returns true, else false.
	for (counter = 0; counter <= exceptionList.length; counter++)
	{
		if (inputValue == Number(exceptionList[counter]))
		{
			found = true;
			break;
		}
	}
	return found;
}

