function Affordability(E,D,C,B,A){this.constClosingCostFactor=2.5/100;this.constMaxDebtRatio=35/100;this.taxesAndInsuranceRate=25/100;this.cashAvailableToMaxLTVRatio=5.6701/100;this.excessDebt=false;this.maxLoanPayment=0;this.maxDebt=0;this.loanTerm=C;this.interestRate=B/100;this.monthlyIncome=E/12;this.monthlyDebt=D;this.monthlyRate=this.interestRate/12;this.availablePayment=0;this.maxLoanAmount=0;this.closingCosts=0;this.downPayment=A;this.maxPurchasePrice=0;this.errors=[];this.calculate=function(F){this.maxPaymentBasedOnDebtRatio=((this.constMaxDebtRatio)*this.monthlyIncome-this.monthlyDebt)*(1-(this.taxesAndInsuranceRate));
this.maxLoanPayment=this.maxPaymentBasedOnDebtRatio;this.maxLoanAmount=((this.maxLoanPayment*(Math.pow(this.monthlyRate+1,(this.loanTerm*12))-1))/(this.monthlyRate*Math.pow(this.monthlyRate+1,(this.loanTerm*12))));this.closingCosts=this.maxLoanAmount*this.constClosingCostFactor;this.maxPurchasePrice=((this.maxLoanAmount+this.downPayment)/(1+this.constClosingCostFactor));this.actualDownPayment=this.downPayment-this.closingCosts}}var MAX_TERM=360;var COLUMN_DELIMITER="\t";var ROW_DELIMITER="\r\n";var HEADER="paymentNumber"+COLUMN_DELIMITER+"month"+COLUMN_DELIMITER+"year"+COLUMN_DELIMITER+"principal"+COLUMN_DELIMITER+"interest"+COLUMN_DELIMITER+"PMI"+COLUMN_DELIMITER+"monthlyPayment"+COLUMN_DELIMITER+"beginningBalance"+COLUMN_DELIMITER+"endingBalance"+COLUMN_DELIMITER+"interestRate"+COLUMN_DELIMITER+"marginRate"+COLUMN_DELIMITER+"prepaidPrincipal"+COLUMN_DELIMITER+"prepaidInterest"+COLUMN_DELIMITER+"prepaidBeginBalance"+COLUMN_DELIMITER+"prepaidEndBalance"+COLUMN_DELIMITER+"taxSavings"+COLUMN_DELIMITER;
function AmortScheduleCalculator(){var A=new Object();A.payCount=new Number(0);A.paymentNumber=new Array(MAX_TERM);A.month=new Array(MAX_TERM);A.year=new Array(MAX_TERM);A.principal=new Array(MAX_TERM);A.interest=new Array(MAX_TERM);A.beginningBalance=new Array(MAX_TERM);A.endingBalance=new Array(MAX_TERM);A.interestRate=new Array(MAX_TERM);A.prepaidPrincipal=new Array(MAX_TERM);A.prepaidInterest=new Array(MAX_TERM);A.prepaidBeginBalance=new Array(MAX_TERM);A.prepaidEndBalance=new Array(MAX_TERM);A.taxSavings=new Array(MAX_TERM);
A.marginRate=new Array(MAX_TERM);A.PMI=new Array(MAX_TERM);A.monthlyPayment=new Array(MAX_TERM);A.totalTaxSavings=new Number(0);A.totalNormalPrincipal=new Number(0);A.totalPrepaidSavings=new Number(0);A.totalNormalInterest=new Number(0);A.totalPMI=new Number(0);A.className="AmortScheduleCalculator";A.calculate=AmortScheduleCalculatorCalculate;A.getARMPayments=getARMPayments;A.checkIndexRange=checkIndexRange;A.getPaymentCount=getPaymentCount;A.getMonth=getMonth;A.getYear=getYear;A.getPrincipal=getPrincipal;A.getInterest=getInterest;
A.getMonthlyPayment=getMonthlyPayment;A.getInterestRate=getInterestRate;A.getBeginningBalance=getBeginningBalance;A.getEndingBalance=getEndingBalance;A.getPrepaidPrincipal=getPrepaidPrincipal;A.getPrepaidInterest=getPrepaidInterest;A.getPrepaidBeginBalance=getPrepaidBeginBalance;A.getPrepaidEndBalance=getPrepaidEndBalance;A.getTotalNormalPrincipal=getTotalNormalPrincipal;A.getTotalNormalInterest=getTotalNormalInterest;A.getTaxSavings=getTaxSavings;A.getMarginRate=getMarginRate;A.getTotalOwnershipSavings=getTotalOwnershipSavings;
A.getTotalPMI=getTotalPMI;A.getMonthlyPayments=getMonthlyPayments;A.getTotalTaxSavings=getTotalTaxSavings;A.getTotalPrepaidSavings=getTotalPrepaidSavings;A.getPMI=getPMI;A.getPaymentNumber=getPaymentNumber;A.getHeader=getHeader;A.getSchedule=getSchedule;A.round=round;return A}function AmortScheduleCalculatorCalculate(j,z,Y,B,L,v,x,w,F,G,b,g,K,W,a,m,A,l,k,h,r,X,s,AB,u,R){var C=0;var c=false;var o=false;var Z=0;var d=0;var I=0;var n=0;var t=0;var E=0;var AC=0;var q=0;var U=0;var M=0;var f=0;var y=0;var AD=0;var T=0;
var V=0;var D=0;var AA=0;var H=0;var p=0;var e=B;var Q=L;var N=new AmortScheduleCalculator();N.totalMonthsToPayoff=0;if(W==false&&a>m){c=true}if(m==0){m=a}if((x>0)&&(x>m)){x=m}o=(G+F+w)>0;AD=(Y/12);var J="";if(W==true){J=getARMPayments(j,Y,a,A,l,k,h,r,X,s,AB,u,R)}else{if(AB>0){M=j*Y/12}else{var P=new MonthlyPayment();M=P.calculate(a,Y,j)}}for(paymentNumber=1;paymentNumber<=m;paymentNumber++){if(paymentNumber==1){Z=j;d=j;var S=new Date();if((z>0)&&(j>0)&&(K>0)){y=j/z;f=(y>0.8)?K:0}if(e==0){e=S.getMonth()+1}if(Q==0){Q=S.getFullYear()
}}else{Z=I;d=n;if((z>0)&&(Z>0)&&(K>0)){y=Z/z;f=(y>0.8)?K:0}e++;if(e>12){e=1;Q++}}if(W==true&&J!=""){var O=new ARMPayment();AC=O.principal;t=O.interest;U=t+t;V=O.monthlyRate;D=O.marginRate}else{U=M;V=AD;t=Z*V;AC=U-t}if(Math.round(Z)==0){t=0;AC=0}else{if(g>0){T=t*g}if(Math.round(d)==0){E=0;q=0}else{E=d*V;q=U+w-E;if(F>0&&paymentNumber%12==0){q=q+F}if(b==paymentNumber){q=q+G}if(q>d){q=d}}}I=Z-AC;n=d-q;if(Math.round(I)==0){I=0}if(Math.round(n)==0){n=0}if((paymentNumber<v)||(paymentNumber>x)){continue}else{if(c&&paymentNumber==m){AC=j-N.totalNormalPrincipal;
I=0}AA=round(AC+t+f,0.01);p+=AC+t+f;N.paymentNumber[C]=paymentNumber;N.month[C]=e;N.year[C]=Q;N.principal[C]=AC;N.interest[C]=t;N.beginningBalance[C]=Z;N.endingBalance[C]=I;N.interestRate[C]=V*12;N.marginRate[C]=D;N.prepaidPrincipal[C]=q;N.prepaidInterest[C]=E;N.prepaidBeginBalance[C]=d;N.prepaidEndBalance[C]=n;N.taxSavings[C]=T;N.PMI[C]=f;if(paymentNumber==m&&!c&&!(AB>0&&!W)&&(H+AA!=p)){AA=round(p-H,0.01)}N.monthlyPayment[C]=AA;H+=AA;N.totalTaxSavings+=T;N.totalNormalPrincipal+=AC;N.totalNormalInterest+=t;N.totalPMI+=f;
N.totalMonthsToPayoff=(n>0)?N.totalMonthsToPayoff+1:N.totalMonthsToPayoff;N.totalPrepaidSavings+=(AC+t)-(q+E);++C}}N.payCount=m;return N}function getARMPayments(S,A,W,R,Y,L,K,N,C,M,D,F,Q){var B=0;var H=0;var T=0;var U=0;var E=0;var V=0;var P=0;var G=0;var J=0;var X=0;P=A/12;E=S;if(D>0){V=S*P}else{var I=new MonthlyPayment();V=I.calculate(W,A,E)}var O=new Array();for(li=0;li<R;li++){if(R<D){J=V;X=0;E=S}else{J=E*P;X=V-J;E=E-(V-((P)*E))}O[li]=new ARMPayment(X,J,P,N)}T=W-R;U=T/Y;H=R-1;for(B=0;B<U;B++){if(B==0){G=L
}else{G=K}if(Q>0){if(H+1<D){P=(Q*C+N)/12}else{N=F;P=(C+N)/12}}else{P=(P*12+G)/12;if(P>(C+N)/12){P=(C+N)/12}}P=round(P*12,0.00125)/12;T=W-H-1;if(Q>0&&B==0){V=S*P}else{if(H+1>=D){var I=new MonthlyPayment();V=I.calculate(T,P*1200,E)}}for(li=0;li<Y;li++){H=H+1;if(H<D){J=V;X=0;E=S}else{J=E*P;X=V-J;E=E-(V-((P)*E))}O[li]=new ARMPayment(X,J,P,N);if(E<=0){E=0;V=0}}}return O}function checkIndexRange(A){if(A>(this.payCount-1)){return false}else{return true}}function getPaymentCount(){return(this.payCount)}function getMonth(A){if(this.checkIndexRange(A)){return(month[A])
}else{return 0}}function getYear(A){if(this.checkIndexRange(A)){return(year[A])}else{return 0}}function getPrincipal(A){if(this.checkIndexRange(A)){return(principal[A])}else{return 0}}function getInterest(A){if(this.checkIndexRange(A)){return(this.interest[A])}else{return 0}}function getMonthlyPayment(A){if(this.checkIndexRange(A)){return(this.monthlyPayment[A])}else{return 0}}function getInterestRate(A){if(this.checkIndexRange(A)){return(this.interestRate[A])}else{return 0}}function getBeginningBalance(A){if(this.checkIndexRange(A)){return(this.beginningBalance[A])
}else{return 0}}function getEndingBalance(A){if(this.checkIndexRange(A)){return(this.endingBalance[A])}else{return 0}}function getPrepaidPrincipal(A){if(this.checkIndexRange(A)){return(this.prepaidPrincipal[A])}else{return 0}}function getPrepaidInterest(A){if(this.checkIndexRange(A)){return(this.prepaidInterest[A])}else{return 0}}function getPrepaidBeginBalance(A){if(this.checkIndexRange(A)){return(this.prepaidBeginBalance[A])}else{return 0}}function getPrepaidEndBalance(A){if(this.checkIndexRange(A)){return(this.prepaidEndBalance[A])
}else{return 0}}function getTotalNormalPrincipal(){return(this.totalNormalPrincipal)}function getTotalNormalInterest(){return(this.totalNormalInterest)}function getTaxSavings(A){if(this.checkIndexRange(A)){return(this.taxSavings[A])}else{return 0}}function getMarginRate(A){if(this.checkIndexRange(A)){return(this.marginRate[A])}else{return 0}}function getTotalOwnershipSavings(){return 0}function getTotalPMI(){return(this.totalPMI)}function getMonthlyPayments(){return(this.monthlyPayment)}function getTotalTaxSavings(){return(this.totalTaxSavings)
}function getTotalPrepaidSavings(){return(this.totalPrepaidSavings)}function getPMI(A){if(this.checkIndexRange(A)){return(this.PMI[A])}else{return 0}}function getPaymentNumber(A){if(this.checkIndexRange(A)){return(this.paymentNumber[A])}else{return 0}}function getHeader(){return HEADER}function getSchedule(){if(payCount<=0){return""}var A="";for(i=0;i<payCount;i++){A+(this.paymentNumber[i])+(COLUMN_DELIMITER);A+(this.month[i])+(COLUMN_DELIMITER);A+(this.year[i])+(COLUMN_DELIMITER);A+(this.principal[i])+(COLUMN_DELIMITER);
A+(this.interest[i])+(COLUMN_DELIMITER);A+(this.PMI[i])+(COLUMN_DELIMITER);A+(this.monthlyPayment[i])+(COLUMN_DELIMITER);A+(this.beginningBalance[i])+(COLUMN_DELIMITER);A+(this.endingBalance[i])+(COLUMN_DELIMITER);A+(this.interestRate[i])+(COLUMN_DELIMITER);A+(this.marginRate[i])+(COLUMN_DELIMITER);A+(this.prepaidPrincipal[i])+(COLUMN_DELIMITER);A+(this.prepaidInterest[i])+(COLUMN_DELIMITER);A+(this.prepaidBeginBalance[i])+(COLUMN_DELIMITER);A+(this.prepaidEndBalance[i])+(COLUMN_DELIMITER);A+(this.taxSavings[i])+(COLUMN_DELIMITER)+(ROW_DELIMITER)
}return A}function round(E,D){if(D==0.01){return(Math.round(E*100))/100}var C;E=E;D=D;var B=E-Math.floor(E);var A=Math.floor(B/D);if((B-D*A)>=(D*(A+1)-B)){C=Math.floor(E)+D*(A+1)}else{C=Math.floor(E)+D*A}return C}function ARMPayment(D,E,C,B){var A=new Object();A.principal=D;A.interest=E;A.monthlyRate=C;A.marginRate=B;return A}var TAXSERVICEFEE;var FEETOCHARGE;var CREDITREPORTFEE;var APPRAISALFEE;var FLOODCERTFEE;var DEFAULTRATE;var DEFAULTLOANAMT;var DEFAULTTERM;var DEFAULTINTERESTDAYS;function EstimatedClosingCosts(){var A=new Object();
A.className="EstimatedClosingCosts";A.calculate=EstimatedClosingCostsCalculate;return A}function EstimatedClosingCostsCalculate(K,H,O,M,G,B){TAXSERVICEFEE=75;FEETOCHARGE=250;CREDITREPORTFEE=20.7;APPRAISALFEE=300;FLOODCERTFEE=15.5;DEFAULTRATE=0.08;DEFAULTLOANAMT=100000;DEFAULTTERM=360;DEFAULTINTERESTDAYS=15;if(K==null){K=new Number(DEFAULTLOANAMT)}if(H==null){H=new Number(DEFAULTTERM)}if(G==null){G=new NUmber(0)}if(O==null){O=new Number(DEFAULTRATE)}var F=new PMICalculator();var I=F.calculate(K,G);var N=2*I;var J=new Date();
var A=DEFAULTINTERESTDAYS;if(B!=null){A=J.getDate()}var D=O/365*K*A;var C=0;if(M==null){M=new Number(0)}else{if(M>=0.01){C=0.01*K}}var L=0;if(M>0.01){L=(M-0.01)*K}else{if(M>0&&M<0.01){L=M*K}}var E=0;if(M<0){E=M*K}return new Number(TAXSERVICEFEE+FEETOCHARGE+CREDITREPORTFEE+APPRAISALFEE+FLOODCERTFEE+E+L+C+D+N)}function MonthlyPayment(){var A=new Object();A.calculate=MonthlyPaymentCalculate;A.className="MonthlyPayment";return A}function MonthlyPaymentCalculate(A,E,C){var B=0;var D=0;if((E>0)&&(E<1)){B=(E/12)}else{B=(E/12)/100
}D=C*((B*(Math.pow((1+B),A)))/(Math.pow((1+B),A)-1));return(D)}var LTVTHRESHOLD=0.8;function PMICalculator(){var A=new Object();A.calculate=PMICalculatorCalculate;return A}function PMICalculatorCalculate(C,B){if(C<=0){return 0}var E=0;var A=C/(C+B);if(A>LTVTHRESHOLD){var D=0;if(A<=0.85){D=0.0032}else{if(A<=0.9){D=0.0052}else{if(A<=0.95){D=0.0078}else{D=0.009}}}E=C*D/12}return E}var DEFAULT_INVESTMENT_RATE=new Number(0.08);function RentVsBuyCalculator(){this.rentingCost=0;this.ownershipCost=0;this.taxSavings=0;
this.closingCosts=0;this.equityEarned=0;this.grossCosts=0;this.className="RentVsBuyCalculator";this.getOwnershipBenefit=getOwnershipBenefit;this.getRentingCost=getRentingCost;this.getOwnershipCost=getOwnershipCost;this.getTaxSavings=getTaxSavings;this.getClosingCosts=getClosingCosts;this.getGrossCosts=getGrossCosts;this.getEquityEarned=getEquityEarned;this.getPotentialSavings=getPotentialSavings;this.calculate=RentVsBuyCalculatorCalculate}function getOwnershipBenefit(){if(this.rentingCost-this.ownershipCost>0){return(this.rentingCost-this.ownershipCost)
}else{return 0}}function getRentingCost(){return this.rentingCost}function getOwnershipCost(){return this.ownershipCost}function getTaxSavings(){return this.taxSavings}function getClosingCosts(){return this.closingCosts}function getGrossCosts(){return this.grossCosts}function getEquityEarned(){return this.equityEarned}function getPotentialSavings(){return((this.rentingCost-this.ownershipCost)*DEFAULT_INVESTMENT_RATE)}function RentVsBuyCalculatorCalculate(E,V,T,S,Q,C,A,U,P,I,D,H,G,N){var F=new Number(0);var B=new Number(0);
var O=new Number(0);var R=new Number(0);var M=new AmortScheduleCalculator();M=M.calculate(T,E,V,0,0,1,P*12,0,0,0,0,C,Q,false,S,S,0,0,0,0,0,0);B=M.getTotalNormalPrincipal();O=M.getTotalNormalInterest();R=M.getTotalPMI();var J=0;var J=I*12;this.rentingCost=0;for(year=0;year<P;year++){this.rentingCost+=J;J+=J*D;if(year>0){F+=E*A}}this.rentingCost+=(N*P);E=new Number(E);F=new Number(F);B=new Number(B);T=new Number(T);this.equityEarned=0;this.equityEarned=E+F+B-T;var K=H*P;this.taxSavings=0;this.taxSavings=M.getTotalTaxSavings()+(K*C)+(U*T*C);
var L=new EstimatedClosingCosts();this.closingCosts=0;this.closingCosts=L.calculate(T,S,V,U,E-T);this.ownershipCost=0;this.ownershipCost=(O+B+R+K+this.closingCosts+(G*P))-(this.taxSavings+this.equityEarned);this.grossCosts=0;this.grossCosts=(O+B+R+K+this.closingCosts+(G*P));return this}function showHelp(C,A){var C=window.event||C;var B=getEventXY(C);if(!document.getElementById("helpboxdiv")){appendHelpBox()}if(helpBox=document.getElementById("helpboxdiv")){if(helpHash[A]){helpBoxLabel=document.getElementById("helpboxlabel");
helpBoxContent=document.getElementById("helpboxcontent");helpBoxLabel.innerHTML=helpHash[A].title;helpBoxContent.innerHTML=helpHash[A].text;if(HasClass("helpboxdiv","hide")){RemoveClass("helpboxdiv","hide")}helpBox.style.left=(B.x-100)+"px";helpBox.style.top=(B.y-100)+"px"}else{alert("helpHash["+A+"] does not exist.")}}else{alert("The helpboxdiv does not exist.")}}function hideHelp(){if(helpBox=document.getElementById("helpboxdiv")){AddClass("helpboxdiv","hide")}}function appendHelpBox(){strContent='<div id="helpboxclose"><a href="javascript:hideHelp();"><img src="/images/calculators/close_but.gif" width="25" height="25" border="0"></a></div>';
strContent+='<div id="helpboxlabel"></div>';strContent+='<div id="helpboxcontent"></div>';strContent+='<DIV class="tl"></DIV><DIV class="tr"></DIV><DIV class="bl"></DIV><DIV class="br"></DIV>';var A=document.createElement("div");A.setAttribute("id","helpboxdiv");A.setAttribute("class","bluecalloutcontainer hide");A.setAttribute("style","color:black;z-index:9999999999;");A.innerHTML=strContent;document.body.appendChild(A)}function getEventXY(B){var A=0;var C=0;if(B.pageX||B.pageY){A=B.pageX;C=B.pageY}else{if(B.clientX||B.clientY){A=B.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;
C=B.clientY+document.body.scrollTop+document.documentElement.scrollTop}}return{x:A,y:C}}helpHash={current_property_value:{title:"Current Property Value",text:"The current market value of the home you intend to buy."},property_value:{title:"Property Value",text:"The value you believe the property would be appraised for now."},annual_property_insurance:{title:"Annual Property Insurance",text:"Insurance for home loss caused by fire, vandalism, and other damaging events, depending upon the terms of the policy."},annual_property_taxes:{title:"Annual Property Taxes",text:"Expected annual property taxes."},annual_hoa_fees:{title:"Annual HOA Fees",text:"Expected HOA fees."},loan_amount:{title:"Loan Amount",text:"The amount you borrow from a lender to purchase a home."},loan_term:{title:"Loan Term",text:"The agreed-upon interval of time in which a loan is repaid through regular periodic payments."},interest_rate:{title:"Interest Rate",text:"The amount you pay to borrow money from a lender, calculated as a percentage of the amount borrowed."},new_loan_amount:{title:"New Loan Amount",text:"The new amount you borrow from a lender to purchase a home."},new_loan_term:{title:"New Loan Term",text:"The new agreed-upon interval of time in which a loan is repaid through regular periodic payments."},new_interest_rate:{title:"New Interest Rate",text:"The new amount you pay to borrow money from a lender, calculated as a percentage of the amount borrowed."},current_loan_balance:{title:"Current Loan Balance",text:"The remaining balance on your current loan."},current_interest_rate:{title:"Current Interest Rate",text:"The amount you currently pay to borrow money from a lender, calculated as a percentage of the amount borrowed."},current_monthly_payment:{title:"Current Payment",text:"The amount you currently pay on your mortgage loan on a monthly basis. Normally, a monthly mortgage payment consists of principal, interest, property taxes and homeowners insurance."},expected_years_before_selling:{title:"Years Before Selling",text:"The number of years you plan to own the property before selling it."},down_payment:{title:"Down Payment",text:"The part of the property purchase price paid in cash, and not financed with a mortgage."},estimated_monthly_mi:{title:"Mortgage Insurance",text:"The monthly amount you expect to pay for mortgage insurance. Mortgage Insurance is a policy that guarantees payment of a mortgage loan in case of default. Paid by the homeowner, mortgage insurance is not required on a conventional loan if your down payment is at least 20 percent."},cost_of_renting:{title:"Cost of Renting",text:"This is your total cost of renting. Since nothing is being earned as equity in your home, all expenses are costs and not investments."},cost_of_buying:{title:"Gross Cost of Buying",text:"This is your gross cost of buying, including your closing costs."},net_costs_of_buying:{title:"Net Cost of Buying",text:"Net Cost of Buying includes ... "},tax_related_savings:{title:"Tax Related Savings",text:"This is the amount you would be expected to save related to general tax principals, assuming you itemize your mortgage interest on your tax return."},investment_related_savings:{title:"Investment Related Savings",text:"The equity you earn in your home is considered an investment. Other such savings might include appreciation on the value of your home."},estimated_equity_increase:{title:"Estimated Equity Increase",text:"This is the amount your home value is estimated to increase if the appreciation rate you entered holds steady for the term shown."},estimated_total_savings:{title:"Estimated Total Savings",text:"Adding all savings types shown together; this is the bottom line, showing how much you are estimated to save."},monthly_rent:{title:"Monthly Rent",text:"The monthly cost of rental payments."},expected_purchase_price:{title:"Expected Purchase Price",text:"The price you expect to pay to purchase a home."},expected_annual_appreciation:{title:"Expected Apprecation",text:"The expected increase in the value of your property because of positive events, such as favorable changes in market conditions or enhancements made to the property."},federal_income_tax_rate:{title:"Federal Income Tax Rate",text:"Your Federal Income Tax Rate. The percentage of your income taken by the Federal Government each year."},discount_points:{title:"Discount Points",text:"A percentage of the loan amount paid at closing. For instance, on a $90,000 loan amount, 1 point = 1%, or $900. Points are typically paid to buy down (reduce) the interest rate. Alternatively, in exchange for a higher rate, the lender may pay points to offset a homeowner's closing costs. These are called negative points."},expected_annual_rent_increase:{title:"Expected Annual Rent Increase",text:"Many rent agreements have an rate at which the rent will increase each year. This percentage of your current payment is added to your current payment, and the sum becomes your new rent payment for next year."},misc_annual_rental_fees:{title:"Misc. Annual Rental Fees",text:"Includes any rental fees not included in your monthly rent payment. This might include HOA dues, parking fees, etc."},expected_loan_rate:{title:"Expected Loan Rate",text:"The amount you expect to pay to borrow money from a lender, calculated as a percentage of the amount borrowed."},expected_loan_amount:{title:"Expected Loan Amount",text:"The amount you expect to borrow from a lender to purchase a home."},misc_annual_ownership_fees:{title:"Misc. Annual Ownership Fees",text:"Includes any fees associated with owning a home not included above. This might include HOA dues, community memberships, etc."},upfront_costs:{title:"Cash Toward Purchase",text:"The amount of cash you have on-hand to put toward the purchase. This cash may be applied to closing costs, or the purchase price."},income:{title:"Annual or Monthly Income",text:"Your annual or monthly income. To change from annual to monthly, use the select box next to the field label."},debts:{title:"Annual or Monthly Debts",text:"Your annual or monthly debts. To change from annual to monthly, use the select box next to the field label."},large_payment:{title:"Large Payment",text:"During the course of your loan, you may want to make a large payment to pay-down the balance. If so, enter the amount here."},made_after_month:{title:"Made After Month",text:"If you are making a large payment, enter the month in the loan term after which your large payment will be made. For example, if you are going to make a large payment after 2 years, enter 24 because the 24<sup>th</sup> month in the loan term is the 2 year mark."}};
var aCalcContentDivNames=["inputset1","inputset2","inputset3"];var aCalcTabNames=["bottomtab1","bottomtab2","bottomtab3"];var aCalcContentDivs=[];var aCalcTabDivs=[];var aCalcButtons=["button1","button2"];function showCalcFormTab(C,B,A){fillDivArrays();for(i=0;i<aCalcContentDivs.length;i++){AddClass(aCalcContentDivs[i],"hide")}for(i=0;i<aCalcTabDivs.length;i++){RemoveClass(aCalcTabDivs[i],"bluecalloutcontainer");AddClass(aCalcTabDivs[i],"graycalloutcontainer")}for(i=0;i<aCalcButtons.length;i++){AddClass(aCalcButtons[i],"hide")
}RemoveClass(B,"hide");AddClass(C,"bluecalloutcontainer");RemoveClass(A,"hide")}function showNextTab(){fillDivArrays();for(i=0;i<aCalcTabDivs.length;i++){if(HasClass(aCalcTabDivs[i],"bluecalloutcontainer")){if(i<aCalcTabDivs.length-2){showCalcFormTab(aCalcTabDivs[i+1],"inputset"+(i+2),"button1")}else{showCalcFormTab(aCalcTabDivs[i+1],"inputset"+(i+2),"button2")}}}}function fillDivArrays(){if(aCalcContentDivs.length==0){for(i=0;i<aCalcContentDivNames.length;i++){if(document.getElementById(aCalcContentDivNames[i])){aCalcContentDivs[i]=document.getElementById(aCalcContentDivNames[i])
}}}if(aCalcTabDivs.length==0){for(i=0;i<aCalcTabNames.length;i++){if(document.getElementById(aCalcTabNames[i])){aCalcTabDivs[i]=document.getElementById(aCalcTabNames[i])}}}}CyberCoreAddEvent(document,"keyup",function(A){var A=window.event||A;if(el=document.getElementById("helpboxdiv")){if(A.keyCode==27){if(!HasClass(el,"hide")){AddClass(el,"hide")}}}},false);