function isNumber(value) {
	var t;
	
	t=parseFloat(value)
	if(isNaN(t)){
		return false;
	}
	
	return (t==value)?true:false;
}

function formatNumeric(inVal, n) {
	var strIn;
	var numeric;
	var decimal;
	
	strIn = new String(inVal);
	
	if(strIn.indexOf(".") == -1 ) {
		numeric=strIn;
		decimal="";
		for(i=0; i<n; i++) {
			decimal+="0";	
		}
	} else {
		numeric=strIn.substring(0, strIn.indexOf("."));
		if(numeric.length==0) {
			numeric="0";
		}
		decimal=strIn.substring(strIn.indexOf(".")+1, strIn.length);
		if(decimal.length>n) {
			decimal=decimal.substring(0,n);
		} else {
			var l;
			
			l=decimal.length;
			for(i=0; i<n-l; i++) {
				decimal+="0";
			}
		}
	}
	return numeric + "." + decimal;
}

function formatMoney(inVal){
	strIn = new String(inVal);
	if ( strIn.indexOf(".") == -1 ){
		dollar = strIn;
		cent = ".00";
	}else{
		dollar = strIn.substring(0,strIn.indexOf("."));
		cent = strIn.substring(strIn.indexOf("."),strIn.length);
	}
	count = dollar.length%3;
	if ( count == 0 ){
		count = 3;
	}
	result = dollar.substring(0,count);
	count += 3;
	while ( count <= dollar.length ){
		result += ",";
		result += dollar.substring(count-3,count);
		count += 3;
	}
	result += cent;
	return result;
}
