function calculateValues(form){





	calcRealPropertySold(form);





	calcRealPropertyNotSold(form);





	calcJointAndSurvivorProperty(form);





	calcTotal(form);





	return false;





}





function toCurrency(num) {





     var newNum;





	newNum = Math.round(num * 100) / 100;





if(parseFloat(newNum)!=parseInt(newNum)){





			if(parseFloat(newNum*10)==parseInt(newNum*10))





				newNum+="0";





			}





		else{





			newNum+=".00";





		}





	return '$' + newNum;





}











function calcRealPropertySold(form){





	var value1;




	var RealProperty;
	RealProperty = form.txtRealProperty.value.replace(/[,\$]/g,"");

	if (RealProperty<100001){





		value1 = RealProperty * .04;





	}





	else if (RealProperty<400001){





		value1 = ((RealProperty - 100000) * .03) + 4000;





	}





	else {





		value1 = ((RealProperty - 400000) * .02) + 13000;





	}





	form.txtRealPropertyFee.value = toCurrency(value1);





	return false;





}





function calcRealPropertyNotSold(form){




	var NotSold;




	NotSold = form.txtNotSold.value.replace(/[,\$]/g,"");





	form.txtNotSoldFee.value = toCurrency(NotSold * .01);





	return;





}







function calcJointAndSurvivorProperty(form){




	var JASP;
	JASP = form.txtJointAndSurvivorProperty.value.replace(/[,\$]/g,"");

	form.txtJointAndSurvivorPropertyFee.value = toCurrency(JASP * .01);





}





function calcTotal(form){





	form.txtTotalFee.value = toCurrency(eval(form.txtRealPropertyFee.value.slice(1)) + eval(form.txtNotSoldFee.value.slice(1)) + eval(form.txtJointAndSurvivorPropertyFee.value.slice(1)));





}
