<script language="JavaScript" type="text/JavaScript"><!-- [et_pb_line_break_holder] --><!--<!-- [et_pb_line_break_holder] -->// copyright par Dominique Peladeau<!-- [et_pb_line_break_holder] -->// www.calcul-de-pret.com<!-- [et_pb_line_break_holder] -->// info@1stop-info.com<!-- [et_pb_line_break_holder] -->function montremess(quel){<!-- [et_pb_line_break_holder] --> if(quel == 'help') { <!-- [et_pb_line_break_holder] --> var message = <!-- [et_pb_line_break_holder] --> 'Input Principal, Interest Rate, Amortization (in months) and the type of periodic\n' +<!-- [et_pb_line_break_holder] --> 'payment (annual, semi-annual, monthly, bi-weekly, weekly, accelerated bi-weekly or\n' +<!-- [et_pb_line_break_holder] --> 'accelerated weekly), and click on \"Calculate Payment\" to calculate the periodic payments.\n\n'+<!-- [et_pb_line_break_holder] --> 'Or Input Payment, Interest Rate, Amortization (in months) the type of payment\n' +<!-- [et_pb_line_break_holder] --> '(annual, semi-annual, monthly, bi-weekly, weekly, accelerated bi-weekly or accelerated\n' +<!-- [et_pb_line_break_holder] --> 'weekly), and Click on \"Calculate Principal\" to calculate the amount\n' + <!-- [et_pb_line_break_holder] --> 'you can borrow.\n' +<!-- [et_pb_line_break_holder] --> ' Example...: \n' + <!-- [et_pb_line_break_holder] --> ' With $600 payment and 6 % interest -- what is the Principal ?\n ' +<!-- [et_pb_line_break_holder] --> ' Type 600 in \"Input Payment\", type 6 in Interest Rate, type 300 in \n' +<!-- [et_pb_line_break_holder] --> ' Amortization, select a periodic payment, and click on \"Calculate Principal\".\n' +<!-- [et_pb_line_break_holder] --> ' \nThanks for visiting.';<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> if(quel == 'about') { <!-- [et_pb_line_break_holder] --> var message = <!-- [et_pb_line_break_holder] --> 'Mortgage Calculator with Amortization.\n\n' + <!-- [et_pb_line_break_holder] --> 'Rates are compounded semi-annually (Canadian standards).\n\n' +<!-- [et_pb_line_break_holder] --> 'Note:\n\n' +<!-- [et_pb_line_break_holder] --> 'This mortgage calculator uses javascript to process its calculations,\n' +<!-- [et_pb_line_break_holder] --> 'your actual mortgage payments might be slightly different than\n' +<!-- [et_pb_line_break_holder] --> 'the results shown here.\n\n' +<!-- [et_pb_line_break_holder] --> 'Thanks for visiting.\n' ;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> alert (message);<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->function Decimales (entree,decim) {<!-- [et_pb_line_break_holder] --> entree += ""; // S'assurer que entree est une chaine texte:<!-- [et_pb_line_break_holder] --> var original_entree = entree; // Garder l'original de la chaine entree:<!-- [et_pb_line_break_holder] --> var montant = parseFloat(entree); // Prendre la valeur flottante:<!-- [et_pb_line_break_holder] --> var valpos = "";<!-- [et_pb_line_break_holder] --> var valdec = "";<!-- [et_pb_line_break_holder] --> if (isNaN (montant)) // Retourner chaine entree si non convertible:<!-- [et_pb_line_break_holder] --> return original_entree;<!-- [et_pb_line_break_holder] --> if (decim == 2) {<!-- [et_pb_line_break_holder] --> montant = Math.round (100 * montant); // Mettre montant en sous, arrondi au sou:<!-- [et_pb_line_break_holder] --> var chaine;<!-- [et_pb_line_break_holder] --> if (montant < 10) {<!-- [et_pb_line_break_holder] --> chaine = "00" + montant; // Mettre montant en chaine et mettre des zeros si necessaire:<!-- [et_pb_line_break_holder] --> } else if (montant < 100) {<!-- [et_pb_line_break_holder] --> chaine = "0" + montant;<!-- [et_pb_line_break_holder] --> } else {<!-- [et_pb_line_break_holder] --> chaine = "" + montant;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> valpos = chaine.substring(0,chaine.length - 2);<!-- [et_pb_line_break_holder] --> valdec = chaine.substring(chaine.length - 2,chaine.length);<!-- [et_pb_line_break_holder] --> } else {<!-- [et_pb_line_break_holder] --> valpos = "" + Math.round (montant); // Exprime le montant<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> var chiffresavant = "";<!-- [et_pb_line_break_holder] --> var chiffresmilieu = "";<!-- [et_pb_line_break_holder] --> if (valpos.length > 6) {<!-- [et_pb_line_break_holder] --> chiffresavant = valpos.substring(0,(valpos.length - (parseInt(valpos.length / 3) * 3) ))+",";<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> if (valpos.length > 3){<!-- [et_pb_line_break_holder] --> chiffresmilieu = valpos.substring(valpos.length - 6,valpos.length - 3)+",";<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> chiffresfin = valpos.substring(valpos.length - 3, valpos.length);<!-- [et_pb_line_break_holder] --> nouvalpos = "$ "+chiffresavant+chiffresmilieu+chiffresfin;<!-- [et_pb_line_break_holder] --> if (decim == 2) {nouvalpos = nouvalpos+"."+valdec;}<!-- [et_pb_line_break_holder] --> return nouvalpos; // Retourne la chaine en format monetaire:<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->function StripLe(LeTexte) { // enlever le signe de $ et les virgules<!-- [et_pb_line_break_holder] --> LeTexte += "";<!-- [et_pb_line_break_holder] --> var original_LeTexte = LeTexte;<!-- [et_pb_line_break_holder] --> var LeMontant = parseFloat(LeTexte);<!-- [et_pb_line_break_holder] --> while (LeTexte.indexOf("$") == 0 || LeTexte.indexOf(" ") == 0) {<!-- [et_pb_line_break_holder] --> LeTexte = LeTexte.substring(1, LeTexte.length);<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> while (LeTexte.indexOf("+") == 0 || LeTexte.indexOf(" ") == 0) {<!-- [et_pb_line_break_holder] --> LeTexte = LeTexte.substring(1, LeTexte.length);<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> while (LeTexte.indexOf(",") != -1) {<!-- [et_pb_line_break_holder] --> var LeTexte = ""+LeTexte.substring(0, LeTexte.indexOf(","))+LeTexte.substring(LeTexte.indexOf(",")+1, LeTexte.length);<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> while (LeTexte.indexOf(" ") != -1) {<!-- [et_pb_line_break_holder] --> var LeTexte = ""+LeTexte.substring(0, LeTexte.indexOf(" "))+LeTexte.substring(LeTexte.indexOf(" ")+1, LeTexte.length);<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> if (isNaN(LeTexte)) {<!-- [et_pb_line_break_holder] --> return original_LeTexte;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> return LeTexte;<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->var _ONE=1; // changer un caractère par un autre<!-- [et_pb_line_break_holder] -->function Switch(item,VieuxCar,NouvCar)<!-- [et_pb_line_break_holder] -->{<!-- [et_pb_line_break_holder] --> var _ret="";<!-- [et_pb_line_break_holder] --> var _flag=0;<!-- [et_pb_line_break_holder] --> var _item=item.split("");<!-- [et_pb_line_break_holder] --> for(var i=0;i<_item.length;i++)<!-- [et_pb_line_break_holder] --> {<!-- [et_pb_line_break_holder] --> if(!_flag&&_item[i]==VieuxCar)<!-- [et_pb_line_break_holder] --> {<!-- [et_pb_line_break_holder] --> _item[i]=NouvCar;<!-- [et_pb_line_break_holder] --> _flag=_ONE;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> _ret+=_item[i];<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> return(_ret);<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->function getFieldValue (strFieldName) { // aller chercher les variables du get<!-- [et_pb_line_break_holder] -->var strFieldValue;<!-- [et_pb_line_break_holder] -->var objRegExp = new RegExp(strFieldName + "=([^&]+)","gi");<!-- [et_pb_line_break_holder] -->if (objRegExp.test(location.search))<!-- [et_pb_line_break_holder] -->strFieldValue = unescape(RegExp.$1);<!-- [et_pb_line_break_holder] -->else strFieldValue="";<!-- [et_pb_line_break_holder] -->return strFieldValue;<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->// et si on le faisait avec des cookies<!-- [et_pb_line_break_holder] -->function createCookie(name,value,days) {<!-- [et_pb_line_break_holder] --> if (days) {<!-- [et_pb_line_break_holder] --> var date = new Date();<!-- [et_pb_line_break_holder] --> date.setTime(date.getTime()+(days*24*60*60*1000));<!-- [et_pb_line_break_holder] --> var expires = "; expires="+date.toGMTString();<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> else var expires = "";<!-- [et_pb_line_break_holder] --> document.cookie = name+"="+value+expires+"; path=/";<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->function readCookie(name) {<!-- [et_pb_line_break_holder] --> var nameEQ = name + "=";<!-- [et_pb_line_break_holder] --> var ca = document.cookie.split(';');<!-- [et_pb_line_break_holder] --> for(var i=0;i < ca.length;i++) {<!-- [et_pb_line_break_holder] --> var c = ca[i];<!-- [et_pb_line_break_holder] --> while (c.charAt(0)==' ') c = c.substring(1,c.length);<!-- [et_pb_line_break_holder] --> if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> return null;<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->function eraseCookie(name) {<!-- [et_pb_line_break_holder] --> createCookie(name,"",-1);<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->var sURL = unescape(window.location.pathname);<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->function recharge() {<!-- [et_pb_line_break_holder] --> // window.location.href = "CalcAmortEnf2.htm";<!-- [et_pb_line_break_holder] --> window.location.href = sURL;<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->function faitCookies() {<!-- [et_pb_line_break_holder] -->createCookie('principal',document.CalcAmortE.principal.value,0);<!-- [et_pb_line_break_holder] -->createCookie('amortiss',document.CalcAmortE.amortiss.value,0);<!-- [et_pb_line_break_holder] -->createCookie('interest',document.CalcAmortE.interest.value,0);<!-- [et_pb_line_break_holder] -->createCookie('periodepaym',document.CalcAmortE.periodepaym.options[document.CalcAmortE.periodepaym.selectedIndex].value,0);<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->function EffaceCookies() {<!-- [et_pb_line_break_holder] --> eraseCookie('principal');<!-- [et_pb_line_break_holder] --> eraseCookie('amortiss');<!-- [et_pb_line_break_holder] --> eraseCookie('interest');<!-- [et_pb_line_break_holder] --> eraseCookie('periodepaym');<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->function travailForm(quel) { // au travail!<!-- [et_pb_line_break_holder] --> var nombrepaym = ""+document.CalcAmortE.periodepaym.options[document.CalcAmortE.periodepaym.selectedIndex].value;<!-- [et_pb_line_break_holder] --> var termeans = 0;<!-- [et_pb_line_break_holder] --> var periodesterme = 0;<!-- [et_pb_line_break_holder] --> var anneesamort = parseFloat((document.CalcAmortE.amortiss.value)/12);<!-- [et_pb_line_break_holder] --> var periodestotales = anneesamort*parseInt(nombrepaym);<!-- [et_pb_line_break_holder] --> var valeurprina = document.CalcAmortE.principal.value;<!-- [et_pb_line_break_holder] --> var calculepaym = document.CalcAmortE.paymperiodique.value;<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] --> var temp3 = document.CalcAmortE.interest.value;<!-- [et_pb_line_break_holder] --> temp3 = Switch(temp3,",",".");<!-- [et_pb_line_break_holder] --> tauxi = parseFloat(temp3);<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> // se debarrasser des signes de $ de l'entree<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->var temp1 = valeurprina;<!-- [et_pb_line_break_holder] -->valeurprina = StripLe(temp1);<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->var temp2 = calculepaym;<!-- [et_pb_line_break_holder] -->calculepaym = StripLe(temp2);<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> var calcmontant = parseFloat(calculepaym);<!-- [et_pb_line_break_holder] --> if (calcmontant != calculepaym && calculepaym > 0 ) {<!-- [et_pb_line_break_holder] --> document.CalcAmortE.paymperiodique.value = " ERROR ";<!-- [et_pb_line_break_holder] --> return;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> if ( ( (document.CalcAmortE.interest.value == null || document.CalcAmortE.interest.value.length == 0) && quel != 'i') ||<!-- [et_pb_line_break_holder] --> ( (document.CalcAmortE.principal.value == null || document.CalcAmortE.principal.value.length == 0) && quel != 'p') ) {<!-- [et_pb_line_break_holder] --> return;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> diffcalc = 99999;<!-- [et_pb_line_break_holder] --> nouvpaym = 0;<!-- [et_pb_line_break_holder] --> tauxcalc = 0.09;<!-- [et_pb_line_break_holder] --> if (quel == "i" && calculepaym > 0 ) {<!-- [et_pb_line_break_holder] --> while (Math.abs(diffcalc) > 0.1 ) {<!-- [et_pb_line_break_holder] --> nouvpaym = (parseFloat(valeurprina) * tauxcalc) / ( 1 - ( 1/ Math.pow((1+tauxcalc),periodestotales)));<!-- [et_pb_line_break_holder] --> diffcalc = (calculepaym - nouvpaym);<!-- [et_pb_line_break_holder] --> var signe = (diffcalc) / Math.abs(diffcalc)<!-- [et_pb_line_break_holder] --> tauxcalc = (0.01 * signe) * ( Math.abs(diffcalc) > 500 ) + (0.0001 * signe) * ( Math.abs(diffcalc) > 20 ) + (0.00001 * signe) * ( Math.abs(diffcalc) > 10 ) + (0.000001 * signe) * ( Math.abs(diffcalc) > 1 ) +(0.0000001 * signe) + tauxcalc;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> tauxi = 2 * ( Math.pow((1+tauxcalc),parseInt(nombrepaym)/2) - 1); <!-- [et_pb_line_break_holder] --> tauxi = parseInt(tauxi * 1000000)/10000;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> if (isNaN (tauxi)) { // Retourner chaine entree si non convertible:<!-- [et_pb_line_break_holder] --> alert("The Interest Rate ("+temp3+") causes an error! \n" +<!-- [et_pb_line_break_holder] --> "Please enter new data ...");<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] --> // document.CalcAmortE.termebalcan.value = 0;<!-- [et_pb_line_break_holder] --> // document.CalcAmortE.termeintcan.value = 0;<!-- [et_pb_line_break_holder] --> // document.CalcAmortE.paymentcan.value = 0; <!-- [et_pb_line_break_holder] --> // document.CalcAmortE.intemprunttotcan.value = 0;<!-- [et_pb_line_break_holder] --> return;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> if (tauxi < 0.3) {<!-- [et_pb_line_break_holder] --> tauxi = tauxi * 100.0; <!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> temp2 = ""+tauxi;<!-- [et_pb_line_break_holder] -->// temp2 = Switch(temp2,".",",");<!-- [et_pb_line_break_holder] --> document.CalcAmortE.interest.value = temp2+" %"; <!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] --> tauxi = tauxi / 100.0; <!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> var intcan = Math.pow((1+tauxi/2),(2/parseInt(nombrepaym))) - 1; <!-- [et_pb_line_break_holder] --> var intcandebase = Math.pow((1+tauxi/2),(2/12)) - 1; <!-- [et_pb_line_break_holder] --> var intus = tauxi / parseInt(nombrepaym);<!-- [et_pb_line_break_holder] --> var intusdebase = tauxi / 12;<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] --> if (quel == "p" && intcan != 0 ) {<!-- [et_pb_line_break_holder] --> calcpaymdebase = calculepaym;<!-- [et_pb_line_break_holder] --> calcperiodes = parseInt(nombrepaym);<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> if ((nombrepaym == '52a' ||nombrepaym == '26a') && intcan != 0 ) {<!-- [et_pb_line_break_holder] --> var calcpaymdebase = calculepaym * (parseInt(nombrepaym)/13) ;<!-- [et_pb_line_break_holder] --> var valeurprina = (calcpaymdebase/intcandebase) * ( 1 - (1/(Math.pow((1+intcandebase),(anneesamort*12))) ) ) ;<!-- [et_pb_line_break_holder] --> // pour US var valeurprina = (calcpaymdebase/intusdebase) * ( 1 - (1/(Math.pow((1+intusdebase),(anneesamort*12))) ) ) ;<!-- [et_pb_line_break_holder] --> } else {<!-- [et_pb_line_break_holder] --> var valeurprina = (calculepaym/intcan) * ( 1 - (1/(Math.pow((1+intcan),(periodestotales))) ) ) ;<!-- [et_pb_line_break_holder] --> // pour US var valeurprina = (calculepaym/intus) * ( 1 - (1/(Math.pow((1+intus),(periodestotales))) ) ) ;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> document.CalcAmortE.principal.value = Decimales(valeurprina,0);<!-- [et_pb_line_break_holder] --> } <!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] --> if (quel == "p" && intcan == 0 ) {<!-- [et_pb_line_break_holder] --> var valeurprina = (calculepaym*periodestotales) ;<!-- [et_pb_line_break_holder] --> document.CalcAmortE.principal.value = Decimales(valeurprina,0);<!-- [et_pb_line_break_holder] --> } <!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> var montantprin = parseFloat(valeurprina);<!-- [et_pb_line_break_holder] --> if (montantprin != valeurprina) {<!-- [et_pb_line_break_holder] --> document.CalcAmortE.principal.value = " ERROR ";<!-- [et_pb_line_break_holder] --> document.CalcAmortE.paymperiodique.value = " ERROR ";<!-- [et_pb_line_break_holder] --> return;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> if (anneesamort < termeans ) {<!-- [et_pb_line_break_holder] --> alert("L'amortissement ("+anneesamort+") doit être plus grand que le terme ("+termeans+") !\n" +<!-- [et_pb_line_break_holder] --> "Entrer les données à nouveau s.v.p. ...");<!-- [et_pb_line_break_holder] --> document.CalcAmortE.termebalcan.value = 0;<!-- [et_pb_line_break_holder] --> document.CalcAmortE.termeintcan.value = 0;<!-- [et_pb_line_break_holder] --> document.CalcAmortE.paymentcan.value = 0; <!-- [et_pb_line_break_holder] --> document.CalcAmortE.intemprunttotcan.value = 0;<!-- [et_pb_line_break_holder] --> return;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> if ( intcan == 0 ) {<!-- [et_pb_line_break_holder] --> var paymbasecana = montantprin/ (anneesamort * 12) ;<!-- [et_pb_line_break_holder] --> var paymbaseusa = paymbasecana;<!-- [et_pb_line_break_holder] --> } else {<!-- [et_pb_line_break_holder] --> var paymbasecana = (montantprin * intcandebase) / ( 1 - ( 1/ Math.pow((1+intcandebase),(anneesamort*12))));<!-- [et_pb_line_break_holder] --> var paymbaseusa = (montantprin * intusdebase ) / ( 1 - ( 1/ Math.pow((1+ intusdebase),(anneesamort*12))));<!-- [et_pb_line_break_holder] --> } <!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> var paymcana = paymbasecana;<!-- [et_pb_line_break_holder] --> var paymusa = paymbaseusa;<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> if ((nombrepaym == '52a' ||nombrepaym == '26a') && intcan != 0 ) {<!-- [et_pb_line_break_holder] --> var paymcana = paymbasecana / (parseInt(nombrepaym)/13) ;<!-- [et_pb_line_break_holder] --> var paymusa = paymbaseusa / (parseInt(nombrepaym)/13) ;<!-- [et_pb_line_break_holder] --> } <!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> if ((nombrepaym == '52' || nombrepaym == '26'|| nombrepaym == '2'|| nombrepaym == '1' ) && intcan != 0 ) {<!-- [et_pb_line_break_holder] --> var paymcana = (montantprin * intcan) / ( 1 - ( 1/ Math.pow((1+intcan),periodestotales)));<!-- [et_pb_line_break_holder] --> var paymusa = (montantprin * intus ) / ( 1 - ( 1/ Math.pow((1+ intus),periodestotales)));<!-- [et_pb_line_break_holder] --> } <!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> document.CalcAmortE.paymperiodique.value = Decimales(paymcana,2);<!-- [et_pb_line_break_holder] --> // pour US document.CalcAmortE.paymperiodique.value = Decimales(paymusa,2);<!-- [et_pb_line_break_holder] --> // document.CalcAmortE.paymentcan.value = Decimales(paymcana,2); <!-- [et_pb_line_break_holder] --> // pour US document.CalcAmortE.paymentusa.value = Decimales(paymusa,2); <!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> var balcana = valeurprina;<!-- [et_pb_line_break_holder] --> var balusa = balcana;<!-- [et_pb_line_break_holder] --> var intcana = 0;<!-- [et_pb_line_break_holder] --> var intusa = 0;<!-- [et_pb_line_break_holder] --> var inttotcana = 0;<!-- [et_pb_line_break_holder] --> var inttotusa = 0;<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> for (var jj = 0; jj < periodesterme ; jj++) {<!-- [et_pb_line_break_holder] --> intcana = intcan * balcana;<!-- [et_pb_line_break_holder] --> inttotcana = inttotcana + intcana;<!-- [et_pb_line_break_holder] --> balcana = balcana - (paymcana - intcana); <!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> intusa = intus * balusa<!-- [et_pb_line_break_holder] --> inttotusa = inttotusa + intusa<!-- [et_pb_line_break_holder] --> balusa = balusa - (paymusa - intusa); <!-- [et_pb_line_break_holder] --> if (balusa < 0 ) { <!-- [et_pb_line_break_holder] --> balusa = 0;<!-- [et_pb_line_break_holder] --> break;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> if (balcana < 0 ) { <!-- [et_pb_line_break_holder] --> balcana = 0 <!-- [et_pb_line_break_holder] --> break;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] --> if (balusa < 0 ) { balusa = 0 };<!-- [et_pb_line_break_holder] --> if (balcana < 0 ) { balcana = 0 };<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> // pour US document.CalcAmortE.termebalusa.value = Decimales(parseInt(balusa),0);<!-- [et_pb_line_break_holder] --> // pour US document.CalcAmortE.termeintusa.value = Decimales(parseInt(inttotusa),0);<!-- [et_pb_line_break_holder] --> // pour US document.CalcAmortE.TermePayUsa.value = Decimales(montantprin-(parseInt(balusa)),0);<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> // document.CalcAmortE.termebalcan.value = Decimales(parseInt(balcana),0);<!-- [et_pb_line_break_holder] --> // document.CalcAmortE.termeintcan.value = Decimales(parseInt(inttotcana),0);<!-- [et_pb_line_break_holder] --> // document.CalcAmortE.TermePayCan.value = Decimales(montantprin-(parseInt(balcana)),0); <!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> var kk = jj;<!-- [et_pb_line_break_holder] --> for (var jj = periodesterme; jj < periodestotales; jj++) {<!-- [et_pb_line_break_holder] --> intcana = intcan * balcana;<!-- [et_pb_line_break_holder] --> inttotcana = inttotcana + intcana;<!-- [et_pb_line_break_holder] --> balcana = balcana - (paymcana - intcana); <!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> intusa = intus * balusa<!-- [et_pb_line_break_holder] --> inttotusa = inttotusa + intusa<!-- [et_pb_line_break_holder] --> balusa = balusa - (paymusa - intusa); <!-- [et_pb_line_break_holder] --> kk = jj; <!-- [et_pb_line_break_holder] --> if (balusa < 0 ) { <!-- [et_pb_line_break_holder] --> balusa = 0;<!-- [et_pb_line_break_holder] --> break;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> if (balcana < 0 ) { <!-- [et_pb_line_break_holder] --> balcana = 0 <!-- [et_pb_line_break_holder] --> break;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> vraiterme = Decimales((kk+1)/parseInt(nombrepaym),2);<!-- [et_pb_line_break_holder] --> if (intcan == 0 ) {<!-- [et_pb_line_break_holder] --> vraiterme = anneesamort ;<!-- [et_pb_line_break_holder] --> } else {<!-- [et_pb_line_break_holder] --> vraiterme = vraiterme.substring(0,vraiterme.length-1);<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] --> // document.CalcAmortE.amortactuellecan.value = ""+vraiterme+" ans";<!-- [et_pb_line_break_holder] --> // document.CalcAmortE.intemprunttotcan.value = Decimales(parseInt(inttotcana),0);<!-- [et_pb_line_break_holder] --> // pour US document.CalcAmortE.intemprunttotusa.value = Decimales(parseInt(inttotusa),0);<!-- [et_pb_line_break_holder] --> TotalInt = Decimales(inttotcana,2);<!-- [et_pb_line_break_holder] --> document.CalcAmortE.principal.value = Decimales(montantprin,0);<!-- [et_pb_line_break_holder] --> if (quel == "p") {<!-- [et_pb_line_break_holder] --> faitCookies();<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] -->//--><!-- [et_pb_line_break_holder] --></script><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><form name="CalcAmortE"><!-- [et_pb_line_break_holder] --><center><!-- [et_pb_line_break_holder] --> <table width="550" border="1" cellpadding="8" cellspacing="0" bgcolor="#0080C0"><!-- [et_pb_line_break_holder] --> <tr><!-- [et_pb_line_break_holder] --> <td><!-- [et_pb_line_break_holder] --> <div align="center"><strong><font color="#FFFFFF" size="2" face="arial,helvetica">Canadian mortgage calculator <br><!-- [et_pb_line_break_holder] --> with amortization schedule <br><!-- [et_pb_line_break_holder] --> <br><!-- [et_pb_line_break_holder] --> </font></strong><!-- [et_pb_line_break_holder] --> <table width="470" border="1" cellpadding="1" cellspacing="0"><!-- [et_pb_line_break_holder] --> <tr><!-- [et_pb_line_break_holder] --> <td align=CENTER> <!-- [et_pb_line_break_holder] --> <table width="469" border="0" cellpadding="1" cellspacing="0"><!-- [et_pb_line_break_holder] --> <tr> <!-- [et_pb_line_break_holder] --> <td width="187" align=right valign=middle bgcolor="#FFFFFF"><font face="arial,helvetica" size="-1">Principal <!-- [et_pb_line_break_holder] --> </font> <!-- [et_pb_line_break_holder] --> <input type="text" name="principal" size="10" value="100000"> <!-- [et_pb_line_break_holder] --> </td><!-- [et_pb_line_break_holder] --> <td align=right valign=middle nowrap bgcolor="#FFFFFF"> <!-- [et_pb_line_break_holder] --> <font face="arial,helvetica" size="-1">Amortization</font> <!-- [et_pb_line_break_holder] --> <input type="text" name="amortiss" size="3" value="300"><!-- [et_pb_line_break_holder] --> <font face="arial,helvetica" size="-1">months</font></td><!-- [et_pb_line_break_holder] --> <td width="49" align=left valign=middle nowrap bgcolor="#FFFFFF"><div align="right"> <strong><font color="#FFCC00" size="-1" face="arial,helvetica"><a href="javascript:montremess('help');" onMouseOver= "window.status='Aide'; return true;"><font size="2" face="arial,helvetica" color="#000099">Help</font></a> </font></strong></div></td><!-- [et_pb_line_break_holder] --> </tr><!-- [et_pb_line_break_holder] --> <tr> <!-- [et_pb_line_break_holder] --> <td align=right valign=middle bgcolor="#FFFFFF"><font face="arial,helvetica" size="-1">Interest Rate<strong> </strong></font> <input type="text" name="interest" size="10" value="6.5 %"> <!-- [et_pb_line_break_holder] --> </td><!-- [et_pb_line_break_holder] --> <td align=right valign=middle bgcolor="#FFFFFF"><font face="arial,helvetica" size="-1">Payment</font> <select name="periodepaym" size="1"><!-- [et_pb_line_break_holder] --> <option value="1">Annual</option><!-- [et_pb_line_break_holder] --> <option value="2">Semi-annual</option><!-- [et_pb_line_break_holder] --> <option value="12" selected>Monthly</option><!-- [et_pb_line_break_holder] --> <option value="26">Bi-weekly</option><!-- [et_pb_line_break_holder] --> <option value="52">Weekly</option><!-- [et_pb_line_break_holder] --> <option value="26a">Accel. bi-weekly</option><!-- [et_pb_line_break_holder] --> <option value="52a">Accel. weekly</option><!-- [et_pb_line_break_holder] --> </select></td><!-- [et_pb_line_break_holder] --> <td align=left valign=middle bgcolor="#FFFFFF"><div align="right"><strong><font color="#FFCC00" size="-1" face="arial,helvetica"> <a href="javascript:montremess('about');" onMouseOver= "window.status='Info'; return true;"><font size="2" color="#000099">Info</font></a> </font></strong></div></td><!-- [et_pb_line_break_holder] --> </tr><!-- [et_pb_line_break_holder] --> <tr><!-- [et_pb_line_break_holder] --> <td colspan="3" align=right valign=middle bgcolor="#FFFFFF"><div align="center"><!-- [et_pb_line_break_holder] --> <input name="button2" type="button" onClick="faitCookies();window.location.reload();" value="Calculate Payment"><!-- [et_pb_line_break_holder] --> </div></td><!-- [et_pb_line_break_holder] --> </tr><!-- [et_pb_line_break_holder] --> </table><!-- [et_pb_line_break_holder] --> </td></tr><!-- [et_pb_line_break_holder] --> </table><!-- [et_pb_line_break_holder] --> <table width="425" border="0" cellpadding="1" cellspacing="0"><!-- [et_pb_line_break_holder] --> <tr> <!-- [et_pb_line_break_holder] --> <td align=right valign=middle nowrap><font color="#FFFFFF" size="-1" face="arial,helvetica"> </font><!-- [et_pb_line_break_holder] --> <div align="left"> <font color="#000000"> <!-- [et_pb_line_break_holder] --> </font></div> <font face="arial,helvetica" size="-1"><font color="#FFFFFF" size="-1" face="arial,helvetica"> </font></font></td><!-- [et_pb_line_break_holder] --> </tr><!-- [et_pb_line_break_holder] --> </table><!-- [et_pb_line_break_holder] --> <table width="450" border="1" cellpadding="1" cellspacing="0" bgcolor="#FFFFFF"><!-- [et_pb_line_break_holder] --> <tr> <!-- [et_pb_line_break_holder] --> <td><table border="0" cellspacing="0" cellpadding="0"><!-- [et_pb_line_break_holder] --> <tr> <!-- [et_pb_line_break_holder] --> <td><table width="449" border="0" cellpadding="0" cellspacing="0"><!-- [et_pb_line_break_holder] --> <tr> <!-- [et_pb_line_break_holder] --> <td width="157" bgcolor="#FFFFFF"> <!-- [et_pb_line_break_holder] --> <div align="right"><font face="arial,helvetica" size="-1"> <!-- [et_pb_line_break_holder] --> Or Input Payment </font></div></td><!-- [et_pb_line_break_holder] --> <td width="82" bgcolor="#FFFFFF"> <!-- [et_pb_line_break_holder] --> <font color="#000000"><!-- [et_pb_line_break_holder] --> <input name="paymperiodique" type="text" value="669,82 $" size="10"><!-- [et_pb_line_break_holder] --> </font></td><!-- [et_pb_line_break_holder] --> <td width="43" bgcolor="#FFFFFF"><div align="right"><font face="arial,helvetica" size="-1">and<strong> </strong></font></div></td><!-- [et_pb_line_break_holder] --> <td width="143" bgcolor="#FFFFFF"><font face="arial,helvetica" size="-1"> <!-- [et_pb_line_break_holder] --> <input name="button" type="button" onClick="faitCookies();travailForm('p');window.location.reload();" value="Calculate Principal"><!-- [et_pb_line_break_holder] --></font></td><!-- [et_pb_line_break_holder] --> </tr><!-- [et_pb_line_break_holder] --> </table></td><!-- [et_pb_line_break_holder] --> </tr><!-- [et_pb_line_break_holder] --> </table></td><!-- [et_pb_line_break_holder] --> </tr><!-- [et_pb_line_break_holder] --> </table><!-- [et_pb_line_break_holder] --> <font color="#FFFFFF" size="-2" face="arial,helvetica">The above is for illustrative purposes only. Canadian Rates are compounded semi-annually</font></div><!-- [et_pb_line_break_holder] --> </td><!-- [et_pb_line_break_holder] --> </tr><!-- [et_pb_line_break_holder] --></table><!-- [et_pb_line_break_holder] --> </center><!-- [et_pb_line_break_holder] --></form><!-- [et_pb_line_break_holder] --><script language="JavaScript" type="text/JavaScript"><!-- [et_pb_line_break_holder] --><!--<!-- [et_pb_line_break_holder] -->var principal = readCookie('principal'); // aller chercher le principal<!-- [et_pb_line_break_holder] -->if (!principal) {<!-- [et_pb_line_break_holder] --> principal = "100000";<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] -->temp3 = Switch(principal,"+","");<!-- [et_pb_line_break_holder] -->principal = StripLe(temp3);<!-- [et_pb_line_break_holder] -->document.CalcAmortE.principal.value = Decimales(principal,0);<!-- [et_pb_line_break_holder] -->var temp1 = document.CalcAmortE.principal.value;<!-- [et_pb_line_break_holder] -->principal = StripLe(temp1);<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->var amortiss = readCookie('amortiss'); // aller chercher l'amortisation<!-- [et_pb_line_break_holder] -->if (!amortiss) {<!-- [et_pb_line_break_holder] --> amortiss = "300";<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] -->document.CalcAmortE.amortiss.value = amortiss; <!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->var interest2 = readCookie('interest'); // aller chercher le taux interet<!-- [et_pb_line_break_holder] --> if (!interest2) {<!-- [et_pb_line_break_holder] --> interest2 = "6.5 %";<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] -->document.CalcAmortE.interest.value = interest2;<!-- [et_pb_line_break_holder] --> interest = parseFloat(interest2);<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->var nombrepaym = readCookie('periodepaym'); // aller chercher le type de paiement<!-- [et_pb_line_break_holder] -->if (!nombrepaym) {<!-- [et_pb_line_break_holder] --> nombrepaym = "12";<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> if (nombrepaym == "") {nombrepaym = "12";}<!-- [et_pb_line_break_holder] --> if (nombrepaym == "1") { a = 0; pper = "Annual"; pper2 = "for Annual Payments";}<!-- [et_pb_line_break_holder] --> if (nombrepaym == "2") { a = 1; pper = "Semi-Annual"; pper2 = "for Semi-Annual Payments";}<!-- [et_pb_line_break_holder] --> if (nombrepaym == "12") { a = 2; pper = "Monthly"; pper2 = "for Monthly Payments";}<!-- [et_pb_line_break_holder] --> if (nombrepaym == "26") { a = 3; pper = "Bi-Weekly"; pper2 = "for Bi-Weekly Payments";}<!-- [et_pb_line_break_holder] --> if (nombrepaym == "52") { a = 4; pper = "Weekly"; pper2 = "for Weekly Payments";}<!-- [et_pb_line_break_holder] --> if (nombrepaym == "26a") { a = 5; pper = "Accelerated Bi-Weekly"; pper2 = "for Accelerated Bi-Weekly Payments";}<!-- [et_pb_line_break_holder] --> if (nombrepaym == "52a") { a = 6; pper = "Accelerated Weekly"; pper2 = "for Accelerated Weekly Payments";}<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->document.CalcAmortE.periodepaym.options[a].selected = true;<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->EffaceCookies(); // erase all cookies<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->travailForm();<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> var P; //Principal<!-- [et_pb_line_break_holder] --> var I; //Interets<!-- [et_pb_line_break_holder] --> var L; //Amortisation en annees<!-- [et_pb_line_break_holder] --> var N; //nombre de paiements totaux (non acc)<!-- [et_pb_line_break_holder] --> var M; //paiement périodique<!-- [et_pb_line_break_holder] --> var H; //paiement hypothèque périodique<!-- [et_pb_line_break_holder] --> var C; //capital<!-- [et_pb_line_break_holder] --> var Q; //balance due<!-- [et_pb_line_break_holder] --> var NP; //nombre de paiements<!-- [et_pb_line_break_holder] --> var X;<!-- [et_pb_line_break_holder] --> var H2=0;<!-- [et_pb_line_break_holder] --> var C2=0;<!-- [et_pb_line_break_holder] --> var Affiche;<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] --> //Mettre conteurs a zero<!-- [et_pb_line_break_holder] --> X=0;<!-- [et_pb_line_break_holder] --> Affiche=0;<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] --> //Principal<!-- [et_pb_line_break_holder] --> P = principal;<!-- [et_pb_line_break_holder] --> P2 = principal;<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] --> //taux interet annuel<!-- [et_pb_line_break_holder] --> I = interest;<!-- [et_pb_line_break_holder] --> TauxAnnu = interest/100;<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] --> //Amortisation en annees<!-- [et_pb_line_break_holder] --> L = amortiss/12; <!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] --> //nombre de paiements totaux<!-- [et_pb_line_break_holder] --> NP = parseInt(nombrepaym); // nombre de paiements<!-- [et_pb_line_break_holder] --> N = L*NP; // periodestotales<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> //Taux interet par paiement<!-- [et_pb_line_break_holder] --> I = Math.pow((1+TauxAnnu/2),(2/NP)) - 1;<!-- [et_pb_line_break_holder] --> //Taux interet de base<!-- [et_pb_line_break_holder] --> var intcandebase = Math.pow((1+TauxAnnu/2),(2/12)) - 1;<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] --> //Et maintenant... les gros calculs...<!-- [et_pb_line_break_holder] --> //paiements périodiques<!-- [et_pb_line_break_holder] --> var paymperiobase = (P * intcandebase) / ( 1 - ( 1/ Math.pow((1+intcandebase),(L*12)))); <!-- [et_pb_line_break_holder] --> var M = paymperiobase;<!-- [et_pb_line_break_holder] --> if (nombrepaym == '52a' || nombrepaym == '26a') {<!-- [et_pb_line_break_holder] --> M = paymperiobase / (NP/13) ;<!-- [et_pb_line_break_holder] --> } <!-- [et_pb_line_break_holder] --> if ((nombrepaym == '52' || nombrepaym == '26'|| nombrepaym == '2'|| nombrepaym == '1' )) {<!-- [et_pb_line_break_holder] --> M = (P * I) / ( 1 - ( 1/ Math.pow((1+I),N)));<!-- [et_pb_line_break_holder] --> } <!-- [et_pb_line_break_holder] --> //trouver amortiss réel<!-- [et_pb_line_break_holder] --> if (nombrepaym == '52a' || nombrepaym == '26a') {<!-- [et_pb_line_break_holder] --> kk = 0;<!-- [et_pb_line_break_holder] --> inttotcana2 = 0;<!-- [et_pb_line_break_holder] --> balcana2 = P2;<!-- [et_pb_line_break_holder] --> paymcana2 = M;<!-- [et_pb_line_break_holder] --> for (var jj = 0; jj < N; jj++) {<!-- [et_pb_line_break_holder] --> intcana2 = I * balcana2;<!-- [et_pb_line_break_holder] --> inttotcana2 = inttotcana2 + intcana2;<!-- [et_pb_line_break_holder] --> balcana2 = balcana2 - (paymcana2 - intcana2); <!-- [et_pb_line_break_holder] --> kk = jj;<!-- [et_pb_line_break_holder] --> if (balcana2 < 0 ) { <!-- [et_pb_line_break_holder] --> balcana2 = 0;<!-- [et_pb_line_break_holder] --> amortreelmois = Decimales(((kk+1)/NP)*12,0);<!-- [et_pb_line_break_holder] --> amortreelmois = amortreelmois.substring(2,amortreelmois.length);<!-- [et_pb_line_break_holder] --> amortreel = Decimales((kk+1)/NP,2);<!-- [et_pb_line_break_holder] --> amortreel = amortreel.substring(2,amortreel.length);<!-- [et_pb_line_break_holder] --> break;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->//--><!-- [et_pb_line_break_holder] --></script><!-- [et_pb_line_break_holder] --><table width="550" border="1" align="center" cellpadding="1" cellspacing="0" bordercolor="#000000" bgcolor="#FFFFFF"><!-- [et_pb_line_break_holder] --> <tr><!-- [et_pb_line_break_holder] --> <td><script language="javascript"><!-- [et_pb_line_break_holder] --> <!--<!-- [et_pb_line_break_holder] --> document.write("<div align='center'><font size='2' face='Verdana, Arial, Helvetica, sans-serif'><br>");<!-- [et_pb_line_break_holder] --> document.write("<strong>Amortization: </strong>");<!-- [et_pb_line_break_holder] --> document.write(amortiss); <!-- [et_pb_line_break_holder] --> document.write(" Months (");<!-- [et_pb_line_break_holder] --> ann=""+parseInt(L*100)/100;<!-- [et_pb_line_break_holder] --> document.write(ann);<!-- [et_pb_line_break_holder] --> document.write(" Years)<br><br><strong>");<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> if (nombrepaym == '52a' || nombrepaym == '26a') {<!-- [et_pb_line_break_holder] --> document.write("Actual Amortization: </strong>");<!-- [et_pb_line_break_holder] --> document.write(amortreelmois);<!-- [et_pb_line_break_holder] --> document.write(" Months (");<!-- [et_pb_line_break_holder] --> document.write(amortreel);<!-- [et_pb_line_break_holder] --> document.write(" Years)<br><br><strong>");<!-- [et_pb_line_break_holder] --> var TP=kk+1;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> if (nombrepaym == '52' || nombrepaym == '26'|| nombrepaym == '2'|| nombrepaym == '1' || nombrepaym == '12') {<!-- [et_pb_line_break_holder] --> var TP = parseInt(N);<!-- [et_pb_line_break_holder] --> if (TP < parseFloat(N)){TP=TP+1;}<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> document.write(TP);<!-- [et_pb_line_break_holder] --> document.write(" Periodic Payments of </strong>"); <!-- [et_pb_line_break_holder] --> document.write(document.CalcAmortE.paymperiodique.value);<!-- [et_pb_line_break_holder] --> document.write("<br><br><strong>Mortgage Cost (Total Interests): </strong>");<!-- [et_pb_line_break_holder] --> document.write(TotalInt);<!-- [et_pb_line_break_holder] --> document.write("<br><br></font></div>");<!-- [et_pb_line_break_holder] --> //--><!-- [et_pb_line_break_holder] --> </script><!-- [et_pb_line_break_holder] --> </td><!-- [et_pb_line_break_holder] --> </tr><!-- [et_pb_line_break_holder] --></table><!-- [et_pb_line_break_holder] --><br><!-- [et_pb_line_break_holder] --><table width="550" border="1" align="center" cellpadding="1" cellspacing="0" bordercolor="#000000" bgcolor="#FFFFFF"><!-- [et_pb_line_break_holder] --> <tr><!-- [et_pb_line_break_holder] --> <td bgcolor="#0080C0"><div align="center"><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong><!-- [et_pb_line_break_holder] --> <script language="javascript"><!-- [et_pb_line_break_holder] --> <!--<!-- [et_pb_line_break_holder] --> if (TP > 1560) {document.write("!!! Amortization Schedule too long to show !!!<br><br>Summary by Year <br>of the Amortization Schedule <br>");}<!-- [et_pb_line_break_holder] --> if (TP <= 1560) {document.write("Amortization Schedule <br>");}<!-- [et_pb_line_break_holder] --> document.write(pper2);<!-- [et_pb_line_break_holder] --> //--><!-- [et_pb_line_break_holder] --> </script><!-- [et_pb_line_break_holder] --> </strong></font></div></td><!-- [et_pb_line_break_holder] --> </tr><!-- [et_pb_line_break_holder] --></table><!-- [et_pb_line_break_holder] --><script language="javascript"><!-- [et_pb_line_break_holder] --><!--<!-- [et_pb_line_break_holder] -->// mettre les en-têtes<!-- [et_pb_line_break_holder] -->tete1="<td bgColor=#D6D6D6><strong><font size='2' face='Verdana, Arial, Helvetica, sans-serif'>";<!-- [et_pb_line_break_holder] -->document.write("<table cellSpacing=1 cellPadding=3 width='550' bgColor=#000000 align='center' border=0>");<!-- [et_pb_line_break_holder] -->var montreAns=0;<!-- [et_pb_line_break_holder] -->if (TP<1561){<!-- [et_pb_line_break_holder] --> if (nombrepaym == '52' || nombrepaym == '52a' || nombrepaym == '26' || nombrepaym == '26a') { // trouver les montants semi annuels <!-- [et_pb_line_break_holder] --> document.write(tete1+"Periodic<br>Payment</strong></td>");<!-- [et_pb_line_break_holder] --> var montreAns=1;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] -->} //fin TP<1561<!-- [et_pb_line_break_holder] -->if (TP>1560){<!-- [et_pb_line_break_holder] --> if (nombrepaym == '52' || nombrepaym == '52a' || nombrepaym == '26' || nombrepaym == '26a') { // trouver les montants semi annuels <!-- [et_pb_line_break_holder] --> document.write(tete1+" Year </strong></td>");<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] -->} //fin TP>1560<!-- [et_pb_line_break_holder] -->if (nombrepaym == '12') {document.write(tete1+"Month</strong></td>");var montreAns=1;}// trouver les montants par mois<!-- [et_pb_line_break_holder] -->if (nombrepaym == '2') {document.write(tete1+"Periodic<br>Payment</strong></td>");}// trouver les montants par demi-mois<!-- [et_pb_line_break_holder] -->if (nombrepaym == '1') {document.write(tete1+" Year </strong></td>");}// trouver les montants annuels<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->document.write(tete1+"Principal<br>Balance</strong></td>");<!-- [et_pb_line_break_holder] -->document.write(tete1+"Capital<br>Paid</strong></td>");<!-- [et_pb_line_break_holder] -->document.write(tete1+"Total<br>Capital</strong></td>");<!-- [et_pb_line_break_holder] -->document.write(tete1+"Interests<br>Paid</strong></td>");<!-- [et_pb_line_break_holder] -->document.write(tete1+"Total<br>Interests</strong></td></tr>");<!-- [et_pb_line_break_holder] -->document.write("<tr>");<!-- [et_pb_line_break_holder] -->// fin des en-têtes<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->// afficher le reste du tableau par années<!-- [et_pb_line_break_holder] -->Tb1="<td border=1 bordercolor=#000000 bgColor=#E8E8E8><font size='2' face='Verdana, Arial, Helvetica, sans-serif'>";<!-- [et_pb_line_break_holder] -->Tbf="</td>";<!-- [et_pb_line_break_holder] -->Tbf2="</tr>";<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->while (X < N) {<!-- [et_pb_line_break_holder] -->P3=P2-C2;<!-- [et_pb_line_break_holder] -->Hp=0;<!-- [et_pb_line_break_holder] -->Q2=0;<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->if (montreAns==1){<!-- [et_pb_line_break_holder] --> var z=(Affiche)/NP<!-- [et_pb_line_break_holder] --> var z2=parseInt(z)-parseFloat(z)<!-- [et_pb_line_break_holder] --> if (z>0){<!-- [et_pb_line_break_holder] --> if (z2>=0){document.write(Tb1+" Year "+z+Tbf+Tb1+Tbf+Tb1+Tbf+Tb1+Tbf+Tb1+Tbf+Tb1+Tbf+Tbf2);}<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->L1=Tb1+(Affiche+1)+Tbf;// periode <!-- [et_pb_line_break_holder] -->L2=Tb1+Decimales(P3,2)+Tbf;// solde a payer<!-- [et_pb_line_break_holder] -->LL=L1+L2<!-- [et_pb_line_break_holder] -->document.write(LL);<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->cycle=1;<!-- [et_pb_line_break_holder] --> if (nombrepaym == '52' || nombrepaym == '52a' || nombrepaym == '26' || nombrepaym == '26a') { // trouver les montants annuels<!-- [et_pb_line_break_holder] --> cycle=NP;<!-- [et_pb_line_break_holder] --> if (TP<1561){cycle=1;}<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->for (i = 1; i <= cycle; i++) // trouver les montants annuels<!-- [et_pb_line_break_holder] -->{<!-- [et_pb_line_break_holder] --> H=P*I; // hypo payé par paiement<!-- [et_pb_line_break_holder] --> H2=H2+H; // intérets accumulés<!-- [et_pb_line_break_holder] --> Hp=Hp+H; // interets payés<!-- [et_pb_line_break_holder] --> C=M-H; // capital<!-- [et_pb_line_break_holder] --> C2=C2+C; // capital accumulé<!-- [et_pb_line_break_holder] --> Q=P-C; // balance due<!-- [et_pb_line_break_holder] --> Q2=Q2+C; // capital remboursé<!-- [et_pb_line_break_holder] --> P=Q;<!-- [et_pb_line_break_holder] --> if (P2-C2 <= 0 ) {<!-- [et_pb_line_break_holder] --> C2 = P2;<!-- [et_pb_line_break_holder] --> Q2 = P3;<!-- [et_pb_line_break_holder] --> break;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] -->} <!-- [et_pb_line_break_holder] -->L3=Tb1+Decimales(Q2,2)+Tbf; // capital remboursé<!-- [et_pb_line_break_holder] -->L4=Tb1+Decimales(C2,2)+Tbf; // capital accumulé<!-- [et_pb_line_break_holder] -->L5=Tb1+Decimales(Hp,2)+Tbf; // interets payés<!-- [et_pb_line_break_holder] -->L6=Tb1+Decimales(H2,2)+Tbf; // intérets accumulés<!-- [et_pb_line_break_holder] -->L7=L3+L4+L5+L6;<!-- [et_pb_line_break_holder] -->document.write(L7);<!-- [et_pb_line_break_holder] -->document.write(Tbf2);<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] --> X=X+cycle; // ajuster compteur paiements<!-- [et_pb_line_break_holder] --> Affiche=Affiche+1; // ajuster compteur annuel<!-- [et_pb_line_break_holder] --> if (P2-C2 <= 0 ) {<!-- [et_pb_line_break_holder] --> break;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] -->document.write("</table>");<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->//--><!-- [et_pb_line_break_holder] --></script><!-- [et_pb_line_break_holder] -->