//dojo.require("dojo.currency");

function reset() {
	dojo.byId("paymentCalculatorForm").reset();
}

function dosum() {
	var amt = dojo.byId("amount").value;
	var interestMonthly = dojo.byId("rate").value;
	interestMonthly = interestMonthly / 1200;
	var termMonths = dojo.byId("term").value;
	termMonths = termMonths * 12;
	var dasum = (termMonths == 0) ? 0 : (interestMonthly == 0) ? 0 : (interestMonthly + (interestMonthly / (Math.pow(1 + interestMonthly, termMonths) - 1))) * amt;
	//dojo.byId("calcPayment").innerHTML = dojo.currency.format(dasum, {currency: "USD"});
	dojo.byId("calcPayment").innerHTML = "$" + dasum.toFixed(2);
	return;
}
