/* 
FUNCTION:	StripNonNumeric
 
INPUT:  		str (string) - a string to be altered

RETURN: 		a string containing only numeric characters 0-9;
				returns null if invalid arguments were passed
*/
function stripNonNumeric( str ) {
	var 	resultStr = "";
	if (str+"" == "undefined" || str == null)	
		return null;
	str += "";
	for (var i=0; i < str.length; i++)
	{
   	if ( (str.charAt(i) >= "0") && (str.charAt(i) <= "9") )
     			resultStr = resultStr + str.charAt(i);
 
   }
			
   return resultStr;
}  

/*
FUNCTION:	CheckInteger(str)

INPUT:  		str (string) - the input string

RETURN: 		true or false
*/

function checkInteger( str ) {
	var ch = '';
	if (str+"" == "undefined" || str == null)	
		return null;
	str += "";
	for (var i=0; i < str.length; i++)
	{
		ch = str.charAt(i);
		if ((ch< "0") || (ch >'9'))
			return false;
	}
	
	return true;
}

/*
FUNCTION:	CheckFloat(str)

INPUT:  		str (string) - the input string

RETURN: 		true or false
*/

function checkFloat( str ) {
	var ch = '';
	if (str+"" == "undefined" || str == null)	
		return null;
	str += "";
	for (var i=0; i < str.length; i++)
	{
		ch = str.charAt(i);
		if (((ch< "0") || (ch >'9'))&&(ch!='.'))
			return false;
	}
	return true;
}

/*fucntion checkSize(str)


*/
function checkSize(str) {
 window.alert(str.length);
	for (var i=0; i < str.length; i++)
	{
		ch = str.charAt(i);
		window.alert(ch);	
	}
}

