function computeForm(form){var m=form.interest.value;if(m>=1.0){m=m/100.0;form.interest.value=m;};m/=12;var j=eval(form.principal.value),i=eval(form.principal.value),l=form.payment.value,k=eval(form.payment.value)+eval(form.extra.value),h=0,g=0,f=0,e=0,b=0,a=0,d=0,c=0;while(j>0){f=eval(m*j);d=eval(d)+eval(f);h=eval(l-f);j=eval(j-h);b=b+1;if(b>600){break;}else{continue;};}while(i>0){e=eval(m*i);c=eval(c)+eval(e);g=eval(k-e);i=eval(i-g);a=a+1;if(a>600){break;}else{continue;};};form.savings.value=eval(d)-eval(c);form.percentage.value=(form.savings.value/(a*form.extra.value))/(a/12);var n=eval(b)-eval(a);form.answer.value=("Adding $"+form.extra.value+" to your monthly payment will pay off $"+form.principal.value+" in "+a+" payments instead of "+b+". You will save $"+parseInt(form.savings.value,10)+" in total interest.");};function clearForm(form){form.principal.value="";form.interest.value="";form.payment.value="";form.extra.value="";form.savings.value="";form.percentage.value="";form.answer.value="";};
