Adobe PDF Format If you do not have Adobe Acrobat Reader download it
for free 
|
|
Mortgage
Amortization Calculator
|
|
|
");
text = (text +"
");
text = (text +"Amortization Table");
text = (text +"The following table is based on the information entered in the calculator form. ");
text = (text +"Mortgage Amount: " +"" + calcRound(Mortgage.Amount));
text = (text +" Interest Rate: " + Mortgage.Rate + " %");
text = (text +" Mortgage Length: " +get_selection(oForm.YEARS) + " Years ");
text = (text +"
");
text = (text +"| Year | Interest | Principal | Balance | \n");
makeTable(oForm)
text = (text +" ");
msgWindow=window.open("","displayWindow","toolbar=no,width=500,height=300,directories=no,status=no,scrollbars=yes,resize=yes,menubar=no")
msgWindow.document.write(text)
msgWindow.document.close()
return(true)
}
return(false)
}
function makeTable(oView) {
var currInt = 0
var currPrin = 0
prevBalance = Mortgage.Amount
InterestRate = ( Mortgage.Rate /100) / Mortgage.Periods
MonthlyPayment = Mortgage.Payment
currStart = get_selection(oView.START)
for(i=1;i<=30;i++) {
for(j=1;j<=Mortgage.Periods;j++) {
periodInt = prevBalance * InterestRate
periodPrin = MonthlyPayment - periodInt
currBal = prevBalance - periodPrin
currInt += periodInt
currPrin += periodPrin
prevBalance = currBal
}
if( currBal <= 0 ){
currBal = 0
}
text = (text +" | | " + currStart +" | "+"" + calcRound(currInt) +" | "+"" + calcRound(currPrin) +" | "+"" + calcRound(currBal)+" | ");
currInt = 0
currPrin = 0
currStart = parseInt(currStart)
currStart += 1
if(currBal<=0) {
return(true)
}
}
return (true)
}
function setfocus() {
document.MORTGAGE.AMOUNT.focus()
document.MORTGAGE.AMOUNT.select()
}
// unhide
// -->
|