'); Newwindow.document.write(''); Newwindow.document.write(' '); Newwindow.document.write('Results Window ' + iWin + '

'); Newwindow.document.write(''); Newwindow.document.write(''); Newwindow.document.write(''); Newwindow.document.write(''); Newwindow.document.write(''); Newwindow.document.write(''); Newwindow.document.write(''); Newwindow.document.write(''); Newwindow.document.write(''); Newwindow.document.write(''); Newwindow.document.write(''); Newwindow.document.write('
Loan Amount:$' + setup.principal.value + '
Interest Rate:' + setup.rate.value + ' %
Payment Amount:$' + setup.payment.value + '
Payment Interval:' + setup.interval.value + '
Monthly Fee:$' + setup.fee.value + '
'); Newwindow.document.write('

'); Newwindow.document.write('


'); Newwindow.document.write('

'); Popwindow=window.open("",0,"resizable=no,scrollbars=no,status=0,width=150,height=20"); Popwindow.document.write('Please Wait'); Popwindow.document.write('

Calculating ...

'); Popwindow.document.write('

'); Newwindow.document.write(''); Newwindow.document.write(''); while (Principal>0) { iDays++; today.setDate(today.getDate()+1); if (setup.interval.value=="Fortnightly") { if (iDays==14) { Principal=Principal-Payment; TotalPayment+=Payment*1; PaymentNo++; iDays=0; bLine=1; } } else { if (today.getDate()==iStartDate) { Principal=Principal-Payment; TotalPayment+=Payment*1; PaymentNo++; bLine=1; } } if (today.getDate()==iStartDate) { Principal+=MonthlyFee*1; TotalFees+=MonthlyFee*1; Principal+=Interest*1; TotalInterest+=Interest*1; Interest=0; iMonths++; if (iMonths>=13) { iYears++; iMonths=0; } } if (Principal<=0) { Principal+=Interest*1; TotalInterest+=Interest*1; Interest=0; if (Principal<=0) { TotalPayment+=Principal*1; Principal=0; bLine = 1; } } Interest+=Principal*Rate/36500; if (bLine==1) { Newwindow.document.write(''); bLine=0; } } Popwindow.close(); Newwindow.document.write('
DatePaymentPrincipalTotal PaymentTotal InterestTotal FeesExtra Payment
'+today.getDate()+'/'+(today.getMonth()*1+1)+'/'+today.getYear()+''+PaymentNo+''+(Math.round(Principal*100)/100)+''+(Math.round(TotalPayment*100)/100)+''+(Math.round(TotalInterest*100)/100)+''+(Math.round(TotalFees*100)/100)+' 
'); Newwindow.document.write(''); setup.index.value++; } MORTGAGE CALCULATOR
Loan Amount:
Interest Rate:
Payment Amount:
Payment Interval:
Monthly Fee:
Start Date: