// JavaScript Document
function isNumber(str){
	if(str.length==0) return false;
	for(var loc=0; loc<str.length; loc++)
	if((str.charAt(loc)<'0'  )|| (str.charAt(loc)> '9' ) )
		return false;
	return true;
}

function isFloat(str){
	var dot = 0;
	if(str.length==0) return false;
	if (str.charAt(0)=='.') return false;
	for(var loc=0; loc<str.length; loc++){
		if (str.charAt(loc)=='.') {
			dot=dot+1;
		}
		else if((str.charAt(loc)<'0'  )|| (str.charAt(loc)> '9' ) ){
			return false;
		}
	}
	if (dot > 1)  return false;
	return true;
}


function trim(strText){
	while(strText.substring(0,1) == ' ' )
		strText = strText.substring(1, strText.length);
	while(strText.substring(strText.length-1,strText.length) == ' ' )
		strText=strText.substring(0,strText.length-1);
	return strText;
}