	//******************************************************************
	//	Converts the number values into a currency format
	//******************************************************************
	function FormatAmount(item) {
		item.value = Trim(item.value);
		if (item.value != '' && !isNaN(item.value)) item.value = parseFloat(item.value).toFixed(2);
	}


	function RemoveSpaces(item) {
		var sSpace = String.fromCharCode(32);
		var iLength = item.value.length;
		var sValue = item.value;
		var sTemp = "";
		var i;
		
		if (iLength < 0) return "";
		
		for(i=0; i<=iLength; i++) {
			if(sValue.charAt(i) != sSpace) sTemp = sTemp + sValue.charAt(i);
		}
		item.value = sTemp;
	}
	
	
	//******************************************************
	// Remove spaces to the left and right of a string
	//******************************************************
	function Trim(TRIM_VALUE){
		if(TRIM_VALUE.length < 1){
			return"";
		}
		TRIM_VALUE = RTrim(TRIM_VALUE);
		TRIM_VALUE = LTrim(TRIM_VALUE);
		return TRIM_VALUE;
	}


	//******************************************************
	// Remove spaces to the right of a string
	//******************************************************
	function RTrim(VALUE){
		var w_space = String.fromCharCode(32);
		var v_length = VALUE.length;
		var strTemp = "";
		if(v_length < 0){
			return"";
		}
		var iTemp = v_length -1;
	
		while(iTemp > -1){
			if(VALUE.charAt(iTemp) == w_space){
			}
			else{
				strTemp = VALUE.substring(0,iTemp +1);
				break;
			}
			iTemp = iTemp-1;
		}
		return strTemp;
	}


	//******************************************************
	// Remove spaces to the right of a string
	//******************************************************
	function LTrim(VALUE){
		var w_space = String.fromCharCode(32);

		if(v_length < 1){
			return"";
		}
		var v_length = VALUE.length;
		var strTemp = "";
	
		var iTemp = 0;
	
		while(iTemp < v_length){
			if(VALUE.charAt(iTemp) == w_space){
			}
			else{
				strTemp = VALUE.substring(iTemp,v_length);
				break;
			}
			iTemp = iTemp + 1;
		}
		return strTemp;
	}


	//*********************************************************
	//	Change the first letter of a string to an upper case
	//*********************************************************
	function ChangeCase(item) {
			var sName;
			var s;
			
			sName = item.value;
			sName = sName.toLowerCase();
			s = sName.substring(0, 1);
			item.value = s.toUpperCase() + sName.substring(1, sName.length);
	}

