logo
masthead

'); fix.document.close(); } else{alert(n+'\n'+q)} } /* FUNCTION CONFIRMS THAT THE VALUE ENTERED INTO A FIELD FALLS WITHIN THE PRE-DETERMINED MINIMUM AND MAXIMUM VALUES, AND DISPLAYS AN ERROR MESSAGE WITH THE ALLOWABLE NUMERIC RANGE FOR THE FIELD DATA IN A POP UP VALIDATION WINDOW */ function checkNumber(quest,input, min, max, msg) { var str = input.value; for (var i = 0; i < str.length; i++) { var ch = str.substring(i, i + 1) if ((ch < "0" || "9" < ch) && ch != '.') { alert(msg); return false; } } if(input.value!="") { var num = 0 + str if (num < min || max < num) { var sendn = "Question " + quest + ": ("+ msg + ")"; var sendq = "You have entered " + input.value + ". Please enter a number between " + min + " and " + max + "."; fixpro(sendn,sendq); return false; } input.value = str; return true; } } /* CALLS UPON THE FUNCTIONS TO DETERMINE IF THE NUMBERS ENTERED ARE VALID AND TO CALCULATE THE RESULTS OF THE ENTERED DATA FOR EXAMPLE - MORTGAGE PAYMENT, GDS AND TDS RATIOS, AND LOAN TO VALUE. THIS FUNCTION IS EXECUTED EVERYTIME A VALUE IS CHANGED IN A FIELD */ function computeField(quest,input,min,max,msage) { doSum(input); checkNumber(quest,input,min,max,msage); } /* RETURNS THE SELECTED INDEX VALUE OF SELECT LISTS IN THE CALCULATOR TO BE USED IN CALCULATIONS */ function getIndex(n){return n.selectedIndex;} function calcRdefine(intrate,compound, freq){ return Math.pow((1.0 + ((intrate/100)/compound)),(compound/freq))-1.0;} function calcBal(mortgage,intrate,compound,freq,payment,term){ rdefine = calcRdefine(intrate,compound, freq); return (mortgage*(Math.pow((1.0 + rdefine),(term)))) - ((payment * ((Math.pow((1.0 + rdefine),(term))) - 1.0))/rdefine); } /* ROUNDS OFF MONETARY NUMBERS TO TWO DECIMALS (PENNIES) */ function roundPen(n) { if(n > 0){ pennies = n*100; pennies = Math.round(pennies); strPennies = "" + pennies; len = strPennies.length; return strPennies.substring(0, len - 2) + "." + strPennies.substring(len -2, len); } else return 0; } /* THIS FUNCTION CALCULATES THE LOAN TO VALUE RATIO */ function LTVcalc(MORTGAGE, MORTGAGE2, APPRAISE){ return (MORTGAGE/APPRAISE) + (MORTGAGE2/APPRAISE); } function Ratios(PAY1, PAY2, HEAT, TAX, DEBT, INCOME){ return (PAY1/INCOME)+(PAY2/INCOME)+(HEAT/INCOME)+(TAX/INCOME)+(DEBT/INCOME); } /* THIS FUNCTION CALCULATES THE MONTHLY MORTGAGE PAYMENT BASED ON THE USER'S INPUT */ function calcPay(MORTGAGE, AMORT, INRATE, COMPOUND, FREQ){ var compound = COMPOUND/12; var monTime = AMORT * 12; var RATE = (INRATE*1.0)/100; var yrRate = RATE/COMPOUND; var rdefine = Math.pow((1.0 + yrRate),compound)-1.0; var PAYMENT = (MORTGAGE*rdefine * (Math.pow((1.0 + rdefine),monTime)))/ ((Math.pow((1.0 + rdefine),monTime)) - 1.0); if(FREQ==12){ return PAYMENT;} if(FREQ==26||FREQ==24){ return PAYMENT/2.0;} if(FREQ==52){ return PAYMENT/4.0;} } function retTerm(n){ if(n==0){return 0;} if(n==1){return 6;} if(n==2){return 12;} if(n==3){return 24;} if(n==4){return 36;} if(n==5){return 60;} if(n==6){return 84;} if(n==7){return 120;} } function retFreq(n){ if(n==0){return 0;} if(n==1){return 12;} if(n==2){return 24;} if(n==3){return 26;} if(n==4){return 52;} } function calcTotal(MORTGAGE, LTV){ if(LTV>.75&<V<=.80){ return MORTGAGE*1.0125;} if(LTV>.80&<V<=.85){ return MORTGAGE*1.02;} if(LTV>.80){ return MORTGAGE*1.025;} if(LTV<=.75){ return MORTGAGE} } /* SAVES COOKIE CONTAINING DATA TO BE USED IN AMORTIZATION SCHEDULE */ function quickCook(MTGAMT,AMORT,RATE,TERM,FREQ){ var expire = new Date (); expire.setTime (expire.getTime() + (numDays * 24 * 3600000));/* 2 MONTHS */ var qkData = " " ; qkData = qkData + '`' + MTGAMT + '`' + AMORT + '`' + RATE + '`' + TERM + '`' + FREQ; document.cookie = qk +"=" + escape(qkData) +"; expires=" + expire.toGMTString()+"; path=/" ; } /* VALIDATES ALL THE FIELDS AND CALCULATES VALUES TO BE ENTERED INTO THE TEXT BOXES AT THE BOTTOM OF THE PAGE WHEN THE USER CLICKS ON COMPUTE OR COMPUTE AMORTIZATION */ function compute(form){ if(document.paycalc.desterm.selectedIndex == 0){ fixpro('Question 1: (Mortgage Term)','You have not answered this question, click on the PLEASE CHOOSE button to select your option.');return false;} if(document.paycalc.PFREQ.selectedIndex == 0){ fixpro('Question 2: (Payment Frequency)','You have not answered this question, click on the PLEASE CHOOSE button to select your option.');return false;} if((document.paycalc.NAMORT.value == null || document.paycalc.NAMORT.value.length == 0)|| (document.paycalc.NAMORT.value < 1 || document.paycalc.NAMORT.value > 40)){ fixpro('Question 3: (Amortization Period)','Please enter a number between 1 and 40.');return false;} if((document.paycalc.mortamt.value == null|| document.paycalc.mortamt.value.length == 0)|| (document.paycalc.mortamt.value <10000|| document.paycalc.mortamt.value > 1000000000) ) {fixpro('Question 4: (Mortgage Amount)','Please enter a number between 10,000 and 100,000,000.');return false;} if((document.paycalc.rate.value == null || document.paycalc.rate.value.length == 0)||(document.paycalc.rate.value < 2 || document.paycalc.rate.value > 25)) {fixpro('Question 5: (Interest Rate)','Please enter a number between 2.0 and 25.0.');return false;} if(retTerm(document.paycalc.desterm.selectedIndex)/12>document.paycalc.NAMORT.value){ fixpro('Question 1: (Mortgage Term)','The selected mortgage term is greater than the amortization period entered. Increase the amortization period or choose a shorter mortgage term.');return false;} term = retTerm(document.paycalc.desterm.selectedIndex); freq = retFreq(document.paycalc.PFREQ.selectedIndex); amort = document.paycalc.NAMORT.value; mortgage = document.paycalc.mortamt.value; intrate = document.paycalc.rate.value; var payment = calcPay(mortgage, amort, intrate, 2, freq); form.mainpay.value = '$' + roundPen(payment); form.mainyr1.value = '$' + roundPen(calcBal(mortgage,intrate,2,freq,payment,(12/(12/freq)))); form.mainyr2.value = '$' + roundPen(calcBal(mortgage,intrate,2,freq,payment,(24/(12/freq)))); form.mainyr3.value = '$' + roundPen(calcBal(mortgage,intrate,2,freq,payment,(36/(12/freq)))); form.mainyr5.value = '$' + roundPen(calcBal(mortgage,intrate,2,freq,payment,(60/(12/freq)))); form.mainyr10.value = '$' + roundPen(calcBal(mortgage,intrate,2,freq,payment,(120/(12/freq)))); quickCook(mortgage,amort,intrate,term,freq); return true; } /* OPENS WINDOW USED TO DISPLAY HELP MESSAGES WHEN THE USER CLICKS ON A HELP BUTTON. THE HELP MESSAGE DISPLAYED IS DETERMINED IN THE ARRAY WHICH IS REFERENCED ACCORDING TO THE HELP BUTTON WHICH WAS CLICKED */ function winopen(name) { var linkit = "help/"+name; if(versTest() == true||nineTest()==true){ qc=window.open(linkit,'helpscreen','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=250,height=180'); if(navigator.appName.substring(0,8) == "Netscape") {qc.focus();} } else{location.href=linkit;} } function StringArray(n) { this.length = n; for (var i = 1; i <= n; i++) this[i] = '' return this } /* LOADS THE AMORTIZATION SCHEDULE FILE ONCE IT IS CERTAIN THAT ALL VALUES ENTERED INTO THE FORM ARE CORRECT. */ function amortLink() { if(navigator.appVersion.substring(0,3) == 2.0 && navigator.appName.substring(0,8)=="Netscape" && (navigator.appVersion.indexOf("Macintosh")>=0||navigator.appVersion.indexOf("PowerPC")>=0)){ var timere = compute(document.forms[0]); if(timere==true){setTimeout("document.form2.submit()",100);} } else{ if(compute(document.forms[0])==true){document.form2.submit();}} } function amortonLink() { if(compute(document.forms[0])==true){document.form2.submit();return false;} else{return false;} } function payBal() { if(navigator.appVersion.substring(0,3) == 2.0 && navigator.appName.substring(0,8)=="Netscape" && navigator.appVersion.indexOf("Macintosh")>=0){ setTimeout("compute(document.forms[0])",200); } else{compute(document.forms[0]);} } function browTest() { if((navigator.appVersion.substring(0,3) == 3.0 || navigator.appVersion.substring(0,3) == 4.0)&& navigator.appName.substring(0,8)=="Netscape"){ return true; } else{ return false; } } function makeImg() { if(browTest()==true){ Img = new Image(); Img.src = "graphics/back_on.gif"; document.images.Back_button.src=Img.src; } else{} } function clearImg() { if(browTest()==true){ OrImg= new Image(); OrImg.src="graphics/back_off.gif"; document.images.Back_button.src=OrImg.src; } else{} } function loadImg() { if(browTest()==true){ Img = new Image(); Img.src = "graphics/back_on.gif" } else{} } //--> Mortgage Analyzer
Mortgage Calculator

Mortgage Analyzer Answer the questions listed below, then click the red "Compute Payment & Balance Summary" button when you are finished.

1. Mortgage Term:
2. Payment Frequency:
3. Amortization Period: Year(s)
4. Mortgage Amount:
5. Interest Rate: (e.g. 3.59)

Compute Payment & Balance Summary 

Mortgage Payment:

Mortgage Balance Remaining After:
1 Year 2 Years 3 Years 5 Years 10 Years


Back

Information is provided for sample purposes only. It's accuracy is not guaranteed. Information should be verified and should not be relied upon as legal,
financial or other advice.

  For more information, call: 604 820 4570
    
 

all three