/*
FILE NAME:	Functions.js
AUTHOR:		Dan Knapton
CREATED:	2/19/03
COMMENTS:	Contains client-side javascript code that creates behavior
			specific to the web page headings (ie. the buttons in the heading). 
REVISIONS:
*/
/***************************************************************************
    Name:		fncIsDigit
    Purpose:	This function returns a true if the character given is
				a digit; otherwise it returns a false. 
*/

function fncIsDigit (sInChar) {
	return ((sInChar >= "0") && (sInChar <= "9"));
}

/***************************************************************************
    Name:		fncIsInteger
    Purpose:	This function returns a true if the given string is
				is an unsigned-integer; otherwise it returns a false. 
*/

function fncIsInteger (sInString)
{
    var tInString = sInString.value
    
	for (nIdx = 0; nIdx < sInString.value.length; nIdx++) 
	{
        //var sChar = sInString.charAt(nIdx);
        var sChar = tInString.charAt(nIdx);
         
		if (!fncIsDigit(sChar)) 
		{
		    sInString.select();
			alert ('\'' + sInString.value + '\' needs to be a number.');
			sInString.focus();
			return false;
		}
               
    }
    return true;
}


