function startCalc(){
	interval = setInterval("calc()",1);
}

function calc(){
	mrt = document.autoSumForm.mortgage.value;
	int = document.autoSumForm.interest.value;
	trm = document.autoSumForm.term.value;
	num_pay = document.autoSumForm.num_payments.value;
	
	int_trm = Math.pow(1 + int / 1200 ,trm * 12);
	mrt_year = (mrt * int * int_trm) / (1200 * (int_trm - 1));
	payments = (mrt_year * 12 / num_pay);
	payment_round = Math.round(payments*100)/100;
	var num = payment_round;
	var payment_fixed = num.toFixed(2);
	
	document.autoSumForm.payments.value = (payment_fixed);
}

function stopCalc(){
  clearInterval(interval);
}



