// DataValidation.js
//
// Check whether a parameter is of a given type
//
// 20 March 2000 Steve Pearce
//
// Is the parameter string alphnumeric only
function isAlphaNumeric(pstrSTR)
	{
	// Check pstrSTR comprises of alphnumerics
	var numCount;
	var numLen = pstrSTR.length;
	var strChar;
	var strOKChars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
	
	for ( numCount = 0; numCount < numLen ; numCount++)
		{
		strChar = pstrSTR.charAt(numCount);

		if (strOKChars.indexOf(strChar) < 0 )
			{
			return false
			}
		}
	return true;	
	}
	
// Is the parameter string alpha characters only
function isAlpha(pstrSTR)
	{
	// Check pstrSTR comprises of alphnumerics
	var numCount;
	var numLen = pstrSTR.length;
	var strChar;
	var strOKChars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
	
	for ( numCount = 0; numCount < numLen ; numCount++)
		{
		strChar = pstrSTR.charAt(numCount);

		if (strOKChars.indexOf(strChar) < 0 )
			{
			return false
			}
		}
	return true;	
	}	
	
// Is the parameter purely numeric	
function isNumeric(pnumNUM)
	 {
	var numPF = parseFloat(pnumNUM);
	
	if(pnumNUM==numPF)
		{		
		return true; 
		}
	else
		{
		return false;
		}
	}
	
