Posted By

dottDesign on 04/29/10


Tagged

textmate Calculator mortgage


Versions (?)

Mortgage Calculator


 / Published in: Other
 

  1. <div id="mcalc">
  2. <script language="JavaScript1.2">// <![CDATA[
  3.  
  4. /*
  5. Pleas leave this notice.
  6. DHTML tip message version 1.2 copyright Essam Gamal 2003 (http://migoicons.tripod.com, [email protected])
  7. All modifications are done in the style.js you should not modify this file. Created on : 06/03/2003
  8. Script featured on and can be found at Dynamic Drive (http://www.dynamicdrive.com)
  9. */
  10.  
  11. var ua = navigator.userAgent
  12. var ps = navigator.productSub
  13. var dom = (document.getElementById)? 1:0
  14. var ie4 = (document.all&&!dom)? 1:0
  15. var ie5 = (document.all&&dom)? 1:0
  16. var nn4 =(navigator.appName.toLowerCase() == "netscape" && parseInt(navigator.appVersion) == 4)
  17. var nn6 = (dom&&!ie5)? 1:0
  18. var sNav = (nn4||nn6||ie4||ie5)? 1:0
  19. var cssFilters = ((ua.indexOf("MSIE 5.5")>=0||ua.indexOf("MSIE 6")>=0)&&ua.indexOf("Opera")<0)? 1:0
  20. var Style=[],Text=[],Count=0,sbw=0,move=0,hs="",mx,my,scl,sct,ww,wh,obj,sl,st,ih,iw,vl,hl,sv,evlh,evlw,tbody
  21. var HideTip = "eval(obj+sv+hl+';'+obj+sl+'=0;'+obj+st+'=-800')"
  22. var doc_root = ((ie5&&ua.indexOf("Opera")<0||ie4)&&document.compatMode=="CSS1Compat")? "document.documentElement":"document.body"
  23. var PX = (nn6)? "px" :""
  24.  
  25. if(sNav) {
  26. window.onresize = ReloadTip
  27. document.onmousemove = MoveTip
  28. if(nn4) document.captureEvents(Event.MOUSEMOVE)
  29. }
  30. if(nn4||nn6) {
  31. mx = "e.pageX"
  32. my = "e.pageY"
  33. scl = "window.pageXOffset"
  34. sct = "window.pageYOffset"
  35. if(nn4) {
  36. obj = "document.TipLayer."
  37. sl = "left"
  38. st = "top"
  39. ih = "clip.height"
  40. iw = "clip.width"
  41. vl = "'show'"
  42. hl = "'hide'"
  43. sv = "visibility="
  44. }
  45. else obj = "document.getElementById('TipLayer')."
  46. }
  47. if(ie4||ie5) {
  48. obj = "TipLayer."
  49. mx = "event.x"
  50. my = "event.y"
  51. scl = "eval(doc_root).scrollLeft"
  52. sct = "eval(doc_root).scrollTop"
  53. if(ie5) {
  54. mx = mx+"+"+scl
  55. my = my+"+"+sct
  56. }
  57. }
  58. if(ie4||dom){
  59. sl = "style.left"
  60. st = "style.top"
  61. ih = "offsetHeight"
  62. iw = "offsetWidth"
  63. vl = "'visible'"
  64. hl = "'hidden'"
  65. sv = "style.visibility="
  66. }
  67. if(ie4||ie5||ps>=20020823) {
  68. ww = "eval(doc_root).clientWidth"
  69. wh = "eval(doc_root).clientHeight"
  70. }
  71. else {
  72. ww = "window.innerWidth"
  73. wh = "window.innerHeight"
  74. evlh = eval(wh)
  75. evlw = eval(ww)
  76. sbw=15
  77. }
  78.  
  79. function applyCssFilter(){
  80. if(cssFilters&&FiltersEnabled) {
  81. var dx = " progid:DXImageTransform.Microsoft."
  82. TipLayer.style.filter = "revealTrans()"+dx+"Fade(Overlap=1.00 enabled=0)"+dx+"Inset(enabled=0)"+dx+"Iris(irisstyle=PLUS,motion=in enabled=0)"+dx+"Iris(irisstyle=PLUS,motion=out enabled=0)"+dx+"Iris(irisstyle=DIAMOND,motion=in enabled=0)"+dx+"Iris(irisstyle=DIAMOND,motion=out enabled=0)"+dx+"Iris(irisstyle=CROSS,motion=in enabled=0)"+dx+"Iris(irisstyle=CROSS,motion=out enabled=0)"+dx+"Iris(irisstyle=STAR,motion=in enabled=0)"+dx+"Iris(irisstyle=STAR,motion=out enabled=0)"+dx+"RadialWipe(wipestyle=CLOCK enabled=0)"+dx+"RadialWipe(wipestyle=WEDGE enabled=0)"+dx+"RadialWipe(wipestyle=RADIAL enabled=0)"+dx+"Pixelate(MaxSquare=35,enabled=0)"+dx+"Slide(slidestyle=HIDE,Bands=25 enabled=0)"+dx+"Slide(slidestyle=PUSH,Bands=25 enabled=0)"+dx+"Slide(slidestyle=SWAP,Bands=25 enabled=0)"+dx+"Spiral(GridSizeX=16,GridSizeY=16 enabled=0)"+dx+"Stretch(stretchstyle=HIDE enabled=0)"+dx+"Stretch(stretchstyle=PUSH enabled=0)"+dx+"Stretch(stretchstyle=SPIN enabled=0)"+dx+"Wheel(spokes=16 enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=0,motion=forward enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=0,motion=reverse enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=1,motion=forward enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=1,motion=reverse enabled=0)"+dx+"Zigzag(GridSizeX=8,GridSizeY=8 enabled=0)"+dx+"Alpha(enabled=0)"+dx+"Dropshadow(OffX=3,OffY=3,Positive=true,enabled=0)"+dx+"Shadow(strength=3,direction=135,enabled=0)"
  83. }
  84. }
  85.  
  86. function stm(t,s) {
  87. if(sNav) {
  88. if(t.length<2||s.length<25) {
  89. var ErrorNotice = "DHTML TIP MESSAGE VERSION 1.2 ERROR NOTICE.\n"
  90. if(t.length<2&&s.length<25) alert(ErrorNotice+"It looks like you removed an entry or more from the Style Array and Text Array of this tip.\nTheir should be 25 entries in every Style Array even though empty and 2 in every Text Array. You defined only "+s.length+" entries in the Style Array and "+t.length+" entry in the Text Array. This tip won't be viewed to avoid errors")
  91. else if(t.length<2) alert(ErrorNotice+"It looks like you removed an entry or more from the Text Array of this tip.\nTheir should be 2 entries in every Text Array. You defined only "+t.length+" entry. This tip won't be viewed to avoid errors.")
  92. else if(s.length<25) alert(ErrorNotice+"It looks like you removed an entry or more from the Style Array of this tip.\nTheir should be 25 entries in every Style Array even though empty. You defined only "+s.length+" entries. This tip won't be viewed to avoid errors.")
  93. }
  94. else {
  95. var ab = "" ;var ap = ""
  96. var titCol = (s[0])? "COLOR='"+s[0]+"'" : ""
  97. var txtCol = (s[1])? "COLOR='"+s[1]+"'" : ""
  98. var titBgCol = (s[2])? "BGCOLOR='"+s[2]+"'" : ""
  99. var txtBgCol = (s[3])? "BGCOLOR='"+s[3]+"'" : ""
  100. var titBgImg = (s[4])? "BACKGROUND='"+s[4]+"'" : ""
  101. var txtBgImg = (s[5])? "BACKGROUND='"+s[5]+"'" : ""
  102. var titTxtAli = (s[6] && s[6].toLowerCase()!="left")? "ALIGN='"+s[6]+"'" : ""
  103. var txtTxtAli = (s[7] && s[7].toLowerCase()!="left")? "ALIGN='"+s[7]+"'" : ""
  104. var add_height = (s[15])? "HEIGHT='"+s[15]+"'" : ""
  105. if(!s[8]) s[8] = "Verdana,Arial,Helvetica"
  106. if(!s[9]) s[9] = "Verdana,Arial,Helvetica"
  107. if(!s[12]) s[12] = 1
  108. if(!s[13]) s[13] = 1
  109. if(!s[14]) s[14] = 200
  110. if(!s[16]) s[16] = 0
  111. if(!s[17]) s[17] = 0
  112. if(!s[18]) s[18] = 10
  113. if(!s[19]) s[19] = 10
  114. hs = s[11].toLowerCase()
  115. if(ps==20001108){
  116. if(s[2]) ab="STYLE='border:"+s[16]+"px solid"+" "+s[2]+"'"
  117. ap="STYLE='padding:"+s[17]+"px "+s[17]+"px "+s[17]+"px "+s[17]+"px'"}
  118. var closeLink=(hs=="sticky")? "<TD ALIGN='right'><FONT SIZE='"+s[12]+"' FACE='"+s[8]+"'><A HREF='javascript:void(0)' ONCLICK='stickyhide()' STYLE='text-decoration:none;color:"+s[0]+"'><B>Close</B></A></FONT></TD>":""
  119. var title=(t[0]||hs=="sticky")? "<TABLE WIDTH='100%' BORDER='0' CELLPADDING='0' CELLSPACING='0'><TR><TD "+titTxtAli+"><FONT SIZE='"+s[12]+"' FACE='"+s[8]+"' "+titCol+"><B>"+t[0]+"</B></FONT></TD>"+closeLink+"</TR></TABLE>" : ""
  120. var txt="<TABLE "+titBgImg+" "+ab+" WIDTH='"+s[14]+"' BORDER='0' CELLPADDING='"+s[16]+"' CELLSPACING='0' "+titBgCol+" ><TR><TD>"+title+"<TABLE WIDTH='100%' "+add_height+" BORDER='0' CELLPADDING='"+s[17]+"' CELLSPACING='0' "+txtBgCol+" "+txtBgImg+"><TR><TD "+txtTxtAli+" "+ap+" VALIGN='top'><FONT SIZE='"+s[13]+"' FACE='"+s[9]+"' "+txtCol +">"+t[1]+"</FONT></TD></TR></TABLE></TD></TR></TABLE>"
  121. if(nn4) {
  122. with(eval(obj+"document")) {
  123. open()
  124. write(txt)
  125. close()
  126. }
  127. }
  128. else eval(obj+"innerHTML=txt")
  129. tbody = {
  130. Pos:s[10].toLowerCase(),
  131. Xpos:s[18],
  132. Ypos:s[19],
  133. Transition:s[20],
  134. Duration:s[21],
  135. Alpha:s[22],
  136. ShadowType:s[23].toLowerCase(),
  137. ShadowColor:s[24],
  138. Width:parseInt(eval(obj+iw)+3+sbw)
  139. }
  140. if(ie4) {
  141. TipLayer.style.width = s[14]
  142. tbody.Width = s[14]
  143. }
  144. Count=0
  145. move=1
  146. }
  147. }
  148. }
  149.  
  150. function MoveTip(e) {
  151. if(move) {
  152. var X,Y,MouseX = eval(mx),MouseY = eval(my); tbody.Height = parseInt(eval(obj+ih)+3)
  153. tbody.wiw = parseInt(eval(ww+"+"+scl)); tbody.wih = parseInt(eval(wh+"+"+sct))
  154. switch(tbody.Pos) {
  155. case "left" : X=MouseX-tbody.Width-tbody.Xpos; Y=MouseY+tbody.Ypos; break
  156. case "center": X=MouseX-(tbody.Width/2); Y=MouseY+tbody.Ypos; break
  157. case "float": X=tbody.Xpos+eval(scl); Y=tbody.Ypos+eval(sct); break
  158. case "fixed": X=tbody.Xpos; Y=tbody.Ypos; break
  159. default: X=MouseX+tbody.Xpos; Y=MouseY+tbody.Ypos
  160. }
  161.  
  162. if(tbody.wiw<tbody.Width+X) X = tbody.wiw-tbody.Width
  163. if(tbody.wih<tbody.Height+Y+sbw) {
  164. if(tbody.Pos=="float"||tbody.Pos=="fixed") Y = tbody.wih-tbody.Height-sbw
  165. else Y = MouseY-tbody.Height
  166. }
  167. if(X<0) X=0
  168. eval(obj+sl+"=X+PX;"+obj+st+"=Y+PX")
  169. ViewTip()
  170. }
  171. }
  172.  
  173. function ViewTip() {
  174. Count++
  175. if(Count == 1) {
  176. if(cssFilters&&FiltersEnabled) {
  177. for(Index=28; Index<31; Index++) { TipLayer.filters[Index].enabled = 0 }
  178. for(s=0; s<28; s++) { if(TipLayer.filters[s].status == 2) TipLayer.filters[s].stop() }
  179. if(tbody.Transition == 51) tbody.Transition = parseInt(Math.random()*50)
  180. var applyTrans = (tbody.Transition>-1&&tbody.Transition<24&&tbody.Duration>0)? 1:0
  181. var advFilters = (tbody.Transition>23&&tbody.Transition<51&&tbody.Duration>0)? 1:0
  182. var which = (applyTrans)?0:(advFilters)? tbody.Transition-23:0
  183. if(tbody.Alpha>0&&tbody.Alpha<100) {
  184. TipLayer.filters[28].enabled = 1
  185. TipLayer.filters[28].opacity = tbody.Alpha
  186. }
  187. if(tbody.ShadowColor&&tbody.ShadowType == "simple") {
  188. TipLayer.filters[29].enabled = 1
  189. TipLayer.filters[29].color = tbody.ShadowColor
  190. }
  191. else if(tbody.ShadowColor&&tbody.ShadowType == "complex") {
  192. TipLayer.filters[30].enabled = 1
  193. TipLayer.filters[30].color = tbody.ShadowColor
  194. }
  195. if(applyTrans||advFilters) {
  196. eval(obj+sv+hl)
  197. if(applyTrans) TipLayer.filters[0].transition = tbody.Transition
  198. TipLayer.filters[which].duration = tbody.Duration
  199. TipLayer.filters[which].apply()
  200. }
  201. }
  202. eval(obj+sv+vl)
  203. if(cssFilters&&FiltersEnabled&&(applyTrans||advFilters)) TipLayer.filters[which].play()
  204. if(hs == "sticky") move=0
  205. }
  206. }
  207.  
  208. function stickyhide() {
  209. eval(HideTip)
  210. }
  211.  
  212. function ReloadTip() {
  213. if(nn4&&(evlw!=eval(ww)||evlh!=eval(wh))) location.reload()
  214. else if(hs == "sticky") eval(HideTip)
  215. }
  216.  
  217. function htm() {
  218. if(sNav) {
  219. if(hs!="keep") {
  220. move=0;
  221. if(hs!="sticky") eval(HideTip)
  222. }
  223. }
  224. }
  225. // ]]></script>
  226. <script language="javascript">// <![CDATA[
  227. /* THE FOLLOWING TWO FUNCTIONS CHECK THAT ALL NUMERIC VALUES ARE REAL NUMBER AND REMOVE DOUBLE DECIMALS */
  228. function doSum(a){
  229. a.value = check(a.value);
  230. }
  231. function check(a)
  232. {
  233. var pest = 0;
  234. var b = "";
  235. for(i=0;i<=a.length;i++)
  236. {
  237. var u = a.charAt(i);
  238. if((u>="0"&&u<="9")||u==".")
  239. {
  240. if(u=="."){
  241. var pest = pest+1
  242. if(pest==2){break;}}
  243. var b = b + u; }}
  244. return b;
  245. }
  246.  
  247. /* FUNCTION CONFIRMS THAT THE VALUE ENTERED INTO A FIELD FALLS WITHIN THE PRE-DETERMINED MINIMUM AND MAXIMUM VALUES */
  248. function checkNumber(quest,input, min, max, msg)
  249. {
  250.  
  251. var str = input.value;
  252. for (var i = 0; i < str.length; i++) {
  253. var ch = str.substring(i, i + 1)
  254. if ((ch < "0" || "9" < ch) && ch != '.') {
  255. alert(msg);
  256. return false;
  257. }
  258. }
  259. if(input.value!="")
  260. {
  261. var num = 0 + str
  262. if (num < min || max < num) {
  263. var sendn = "Question " + quest + ": ("+ msg + ")";
  264. var sendq = "You have entered " + input.value + ". Please enter a number between " + min + " and " + max + ".";
  265. fixpro(sendn,sendq);
  266.  
  267. return false;
  268. }
  269. input.value = str;
  270. return true;
  271. }
  272.  
  273.  
  274. }
  275.  
  276.  
  277. /* CALLS UPON THE FUNCTIONS TO DETERMINE IF THE NUMBERS ENTERED ARE VALID AND TO CALCULATE THE RESULTS OF THE ENTERED DATA */
  278. function computeField(quest,input,min,max,msage)
  279. {
  280. doSum(input);
  281. checkNumber(quest,input,min,max,msage);
  282. }
  283.  
  284. /* ROUNDS OFF MONETARY NUMBERS TO TWO DECIMALS (PENNIES) */
  285. function roundPen(n)
  286. {
  287. if(n > 0){
  288. pennies = n*100;
  289. pennies = Math.round(pennies);
  290. strPennies = "" + pennies;
  291. len = strPennies.length;
  292.  
  293. return strPennies.substring(0, len - 2) + "." + strPennies.substring(len -2, len);
  294. }
  295. else return 0;
  296. }
  297.  
  298. /* CALCULATES VALUES DISPLAYED WHEN COMPUTE IS CLICKED. FIRST CHECKS THAT THERE ARE VALUES IN ALL OF THE FIELDS. THE RESULTS ARE SENT TO THE TEXT BOXES - MAXIMUM MORTGAGE AND MONTHLY PAYMENT */
  299.  
  300. function calcMax(){
  301.  
  302. if((document.maxcalc.totinc.value == null || document.maxcalc.totinc.value.length == 0)|| (document.maxcalc.totinc.value < 10000 || document.maxcalc.totinc.value > 1000000)){
  303. fixpro('Question 1: (Annual Family Income)','Please enter a number between 10000 and 1000000.');return;}
  304.  
  305.  
  306. if((document.maxcalc.protax.value == null || document.maxcalc.protax.value.length == 0)|| (document.maxcalc.protax.value < 100 || document.maxcalc.protax.value > 50000)){
  307. fixpro('Question 2: (Annual Property Taxes)','Please enter a number between 100 and 50000.');return;}
  308.  
  309. if((document.maxcalc.proheat.value == null || document.maxcalc.proheat.value.length == 0)|| (document.maxcalc.proheat.value < 20 || document.maxcalc.proheat.value > 1500)){
  310. fixpro('Question 3: (Monthly Heating Costs/Condo Fees)','Please enter a number between 20 and 1500.');return;}
  311.  
  312. if((document.maxcalc.debt.value == null || document.maxcalc.debt.value.length == 0)|| (document.maxcalc.debt.value < 0 || document.maxcalc.debt.value > 5000)){
  313. fixpro('Question 4: (Monthly Debt Payments)','Please enter a number between 0 and 5000.');return;}
  314.  
  315. if((document.maxcalc.second.value == null || document.maxcalc.second.value.length == 0)|| (document.maxcalc.second.value < 0 || document.maxcalc.second.value > 5000)){
  316. fixpro('Question 5: (Secondary Financing Payment)','Please enter a number between 0 and 5000.');return;}
  317.  
  318. if((document.maxcalc.rate.value == null || document.maxcalc.rate.value.length == 0)|| (document.maxcalc.rate.value < 2 || document.maxcalc.rate.value > 25)){
  319. fixpro('Question 6: (Interest Rate)','Please enter a number between 2.0 and 25.0.');return;}
  320.  
  321.  
  322. var RATE = document.maxcalc.rate.value/100;
  323. var income = document.maxcalc.totinc.value;
  324. var tax = document.maxcalc.protax.value;
  325. var heat = document.maxcalc.proheat.value*12;
  326. var debt = document.maxcalc.debt.value*12;
  327. var second = document.maxcalc.second.value*12;
  328. var compound = 2/12;
  329. //var monTime = 25 * 12;
  330. var monTime = 35 * 12;
  331. var yrRate = RATE/2;
  332. var rdefine = Math.pow((1.0 + yrRate),compound)-1.0;
  333. var purchcompound = Math.pow((1.0 + rdefine),monTime);
  334.  
  335.  
  336. var maxgdsr =.32;
  337. var maxtdsr =.42;
  338.  
  339.  
  340. var GDSPAY = (maxgdsr*income) - tax - heat - second;
  341. var TDSPAY = (maxtdsr*income) - tax - heat - second - debt;
  342.  
  343. var PAYMENT = (GDSPAY<TDSPAY) ? GDSPAY/12 : TDSPAY/12;
  344. var MORTGAGE = (0 +((PAYMENT*(purchcompound-1.0))/rdefine))/purchcompound;
  345.  
  346.  
  347. document.maxcalc.amt.value = '$'+roundPen(MORTGAGE);
  348. document.maxcalc.pay.value = '$'+roundPen(PAYMENT);
  349. return;
  350. }
  351.  
  352. /* TESTS VERSIONS FOR WHICH WILL SUPPORT POP UP WINDOWS */
  353. function versTest()
  354. {
  355. var one = '';
  356. var two = '';
  357.  
  358. if (
  359. (navigator.appName.substring(0,8)=="Netscape" && (navigator.appVersion.substring(0,3) == "3.0" || navigator.appVersion.substring(0,3) =="4.0")))
  360. {var one='true';}
  361. if(
  362. (navigator.appName.substring(0,9) == "Microsoft" && navigator.appVersion.substring(0,3) == "3.0" && navigator.appVersion.indexOf("Macintosh")>=0))
  363. {var two='true';}
  364.  
  365. if(one=='true' || two=='true' ||
  366. (navigator.appName.substring(0,9) == "Microsoft" && navigator.appVersion.indexOf("MSIE 3.0")>=0 &&
  367. navigator.appVersion.indexOf("Windows 3.1")>=0)
  368. )
  369. {return true;}
  370. else
  371. {return false;}
  372.  
  373.  
  374. }
  375.  
  376. /* TESTS IF VERSION IS MSIE 3.0 FOR MAC */
  377. function msTest()
  378. {
  379. if(navigator.appName.substring(0,9) == "Microsoft" && (navigator.appVersion.substring(0,3) == "3.0" && navigator.appVersion.indexOf("Macintosh")>=0))
  380. {return true;}
  381. else
  382. {return false;}
  383.  
  384. }
  385.  
  386.  
  387. function nineTest()
  388. {
  389. if(navigator.appName.substring(0,9) == "Microsoft" && (navigator.appVersion.substring(0,3)=="3.0" || navigator.appVersion.indexOf("MSIE 3.0")>=0) && (navigator.appVersion.indexOf("Macintosh")==-1 || navigator.appVersion.indexOf("Windows 3.1")== -1)
  390. )
  391. {return true;}
  392. else
  393. {return false;}
  394. }
  395.  
  396.  
  397. /* OPENS WINDOW FOR PRESENCE & DATA VALIDATION */
  398. function fixpro(n,q)
  399. {
  400. if(versTest() == true){
  401. if(msTest()==true){
  402. var winNam='';
  403. }
  404. else{
  405. var slash = location.href.lastIndexOf("/")+1;
  406. var filNam = location.href.substring(0,slash);
  407. var winNam = filNam+'maxem.html?bid=BASB500B014';
  408. }
  409. fix = window.open(winNam,'FIX','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,copyhistory=no,width=300,height=100,outerWidth=350,outerHeight=150');
  410. if(navigator.appName.substring(0,8) == "Netscape"){
  411. fix.focus();
  412. }
  413. fix.document.write('<head><title>OME</title>');
  414. fix.document.write('</head><body bgcolor=ffffff><form name=fixer>');
  415. fix.document.write('<font size=2 face="Verdana, Arial, Helvetica" color=306798>'+n+'</font><p><FONT SIZE=2 FACE="Verdana, Arial, Helvetica">'+q+'<p>');
  416. fix.document.write('<center><input type=button value=OK onClick=self.close()>');
  417. fix.document.write('</center></form></body>');
  418. fix.document.close();
  419.  
  420. }
  421. else{
  422. alert(n+'\n'+q);
  423. }
  424. }
  425.  
  426. /* OPENS POP UP WINDOW TO DISPLAY HELP MESSAGES IN NETSCAPE 3.0 AND 4.0 */
  427. function winopen(name)
  428. {
  429. var linkit = "help/"+name;
  430. if(versTest() == true || nineTest()==true){
  431. maxMo=window.open(linkit,'helpscreen','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,copyhistory=no,width=250,height=180,outerWidth=300,outerHeight=230');
  432. if(navigator.appName.substring(0,8) == "Netscape")
  433. {maxMo.focus();}
  434. }
  435.  
  436. else{location.href=linkit;}
  437.  
  438. }
  439.  
  440.  
  441. function StringArray(n)
  442. {
  443. this.length = n;
  444. for (var i = 1; i <= n; i++)
  445. this[i] = ''
  446. return this
  447. }
  448.  
  449.  
  450. maxtitle = new StringArray(9);
  451. maxtitle['A'] = 'Total Annual Income';
  452. maxtitle['B'] = 'Annual Property Taxes';
  453. maxtitle['C'] = 'Monthly Heating Costs';
  454. maxtitle['D'] = 'Other Monthly Debt Payments';
  455. maxtitle['E'] = 'Mortgage Term';
  456. maxtitle['F'] = 'Interest Rate';
  457. maxtitle['G'] = 'Special Circumstances';
  458. maxtitle['H'] = 'Second Mortgage Payments';
  459. maxtitle['I'] = 'Maintenance Fees';
  460.  
  461.  
  462.  
  463. function browTest()
  464. {
  465. if((navigator.appVersion.substring(0,3) == 3.0 || navigator.appVersion.substring(0,3) == 4.0)&& navigator.appName.substring(0,8)=="Netscape"){
  466. return true;
  467. }
  468. else{
  469. return false;
  470. }
  471. }
  472.  
  473. function makeImg()
  474. {
  475. if(browTest()==true){
  476. Img = new Image();
  477. Img.src = "graphics/back_on.gif";
  478. document.images.Back_button.src=Img.src;
  479. }
  480. else{}
  481. }
  482.  
  483. function clearImg()
  484. {
  485. if(browTest()==true){
  486. OrImg= new Image();
  487. OrImg.src="graphics/back_off.gif";
  488. document.images.Back_button.src=OrImg.src;
  489. }
  490. else{}
  491. }
  492.  
  493. function loadImg()
  494. {
  495. if(browTest()==true){
  496. Img = new Image();
  497. Img.src = "graphics/back_on.gif"
  498. }
  499. else{}
  500. }
  501. // ]]></script>
  502. <p>&nbsp;</p>
  503. <div id="TipLayer" style="visibility: hidden; position: absolute; z-index: 1000; top: -100px;"></div>
  504. <script language="JavaScript1.2">// <![CDATA[
  505. /*
  506. Please refer to readme.html for full Instructions
  507.  
  508. Text[...]=[title,text]
  509.  
  510. Style[...]=[TitleColor,TextColor,TitleBgColor,TextBgColor,TitleBgImag,TextBgImag,TitleTextAlign,TextTextAlign, TitleFontFace, TextFontFace, TipPosition, StickyStyle, TitleFontSize, TextFontSize, Width, Height, BorderSize, PadTextArea, CoordinateX , CoordinateY, TransitionNumber, TransitionDuration, TransparencyLevel ,ShadowType, ShadowColor]
  511. */
  512.  
  513. var FiltersEnabled = 1 // if your not going to use transitions or filters in any of the tips set this to 0
  514.  
  515. Text[0]=["Mortgage Amount","Enter the amount of money you want to borrow. Do not enter a dollar sign.<br><br>Minimum: $10,000<br>Maximum: $1,000,000,000"]
  516. Text[1]=["Interest Rate","Enter the interest rate you would like to use for calculating your payment and amortization schedule. Enter the interest rate in a whole number format. For example: 4.56 NOT .0456<br><br>Minimum: 2.0<br> Maximum: 25.0 "]
  517. Text[2]=["Amortization Period ","Enter a number representing over how many years you would like to repay your mortgage. The standard is 25 years.<br><br>Minimum: 1 Year<br>Maximum: 35 Years"]
  518. Text[3]=["Annual Family Income","Enter the total amount of annual family income you can prove. Enter gross income (before taxes). You must be able to prove your income, by one or more of:<li>t-4 slips </li> <li>pay stubs </li> <li>employment letters </li> <li>financial statements </li> <li>tax assessment notices </li> <li>investment income documentation </li><br><br>The proof required may depend on your specific circumstances.<br><br>Minimum: $10,000<br>Maximum: $1,000,000"]
  519. Text[4]=["Property Tax ","Enter your estimated annual property taxes. These are the taxes for local services, which are either billed directly by your municipality or added to your monthly mortgage payment. You may find this amount on a property listing, it may be estimated by the builder, or indicated by the local municipality. <br><br>If you are Pre Qualifying for a mortgage, please estimate the property taxes.<br><br>Minimum: $100<br>Maximum: $50,000 "]
  520. Text[5]=["Heat and Condo Fees","Enter the total of your monthly heating costs and half of any applicable monthly condo/maintenance fees. Ask your realtor or your builder to obtain the most likely amount for you, if you are not currently occupying the property. Don't underestimate the high cost of electric and oil heat (often double or triple the cost of natural gas).<br><br>If you are Pre Qualifying for a mortgage, please estimate the amount.<br><br>Minimum: $20<br>Maximum: $1,500 "]
  521. Text[6]=["Loans/Credit Cards","Enter your <b>minimum</b> monthly payments on loans/credit cards. You should also include personal use property lease payments; alimony and any other legally required payments (at this point exclude other mortgages/secured credit lines etc.). <br><br>Minimum: $0<br>Maximum: $5,000 "]
  522. Text[7]=["Secondary Financing Payment ","Enter the total monthly amount of all existing loans and mortgages that are or will be registered against the property you are financing/buying. Do not include the first mortgage that you are qualifying for now. For example: second or third mortgage, a secured line of credit.<br><br>Minimum: $0<br>Maximum: $5,000 "]
  523. Text[8]=["Interest Rate ","Enter the interest rate you would like to use for calculating your payment and amortization schedule. Enter the interest rate in a whole number format. For example: 4.56 NOT .0456<br><br>Minimum: 2.0<br>Maximum: 25.0 "]
  524. Text[9]=["Payment Frequency ","Select how often you would like to make your mortgage payments. Number of payments per year:<br><br><b>Monthly:</b> 12 (once a month).<br><br><b>Semi-Monthly:</b> 24 (twice a month).<br><br><b>Bi-Weekly:</b> 26 (once every two weeks).<br><br><b>Weekly:</b> 52 (once a week). "]
  525. Text[10]=["Mortgage Payment ","The mortgage payment is the amount the borrower would finance in order to pay off the desired loan. The payment corresponds to the selected frequency.<br><br><b>Minimum: $1.00</b> "]
  526. Text[11]=["Monthly Shelter Costs ","This is your <i><b>target</b></i> monthly payment of principal and interest. Assume, at this point that you qualify.<br><br>Minimum: $ 200<br>Maximum: $10,000 "]
  527. Text[12]=["Down payment ","Enter the actual down payment you have available. Assume that, if not applied to your home purchase, it could be invested to earn 4% (after tax).<br><br>Minimum: $ 2,000<br>Maximum: $1,000,000 "]
  528. Text[13]=["Annual Property Taxes ","Estimated annual property taxes billed by municipality.<br><br>Minimum: $ 300<br>Maximum: $10,000 "]
  529. Text[14]=["Home Value Increase ","The expected average annual increase in property values that you (conservatively) believe will apply to the home you would purchase. "]
  530. Text[15]=["Monthly Rent ","Average your expected rent payments. If you would not have to pay any rent (living with parents, etc) please do not change the default of zero.<br><br>Minimum: $ 0<br>Maximum: $ 5,000 "]
  531. Text[16]=["Years of Comparison ","The length of time you would be prepared to wait before buying (if it made sense financially)."]
  532. Text[17]=["Mortgage Amount ","Enter the amount of money you want to borrow. Do not enter a dollar sign.<br><br>You can calculate the maximum mortgage amount you qualify for (based on income and debt) by using the Maximum Mortgage calculator, located in the \"Mortgage Calculator\" section.<br><br>Minimum: $10,000<br>Maximum: $1,000,000,000 "]
  533. Text[18]=["Years of Comparison ","The length of time you would be prepared to wait before buying (if it made sense financially)."]
  534. Text[19]=["Years of Comparison ","The length of time you would be prepared to wait before buying (if it made sense financially)."]
  535. Text[20]=["Years of Comparison ","The length of time you would be prepared to wait before buying (if it made sense financially)."]
  536. Text[21]=["Years of Comparison ","The length of time you would be prepared to wait before buying (if it made sense financially)."]
  537.  
  538.  
  539.  
  540. Style[0]=["white","black","#686A69","#E8E8FF","","","","","","","left","","","",200,"",2,2,10,-100,51,1,0,"",""]
  541. Style[1]=["white","black","#686A69","#E8E8FF","","","","","","","left","","","",300,"",2,2,10,-200,51,1,0,"",""]
  542. Style[2]=["white","black","#000099","#E8E8FF","","","","","","","left","","","",200,"",2,2,10,10,"","","","",""]
  543. Style[3]=["white","black","#000099","#E8E8FF","","","","","","","float","","","",200,"",2,2,10,10,"","","","",""]
  544. Style[4]=["white","black","#000099","#E8E8FF","","","","","","","fixed","","","",200,"",2,2,1,1,"","","","",""]
  545. Style[5]=["white","black","#000099","#E8E8FF","","","","","","","","sticky","","",200,"",2,2,10,10,"","","","",""]
  546. Style[6]=["white","black","#000099","#E8E8FF","","","","","","","","keep","","",200,"",2,2,10,10,"","","","",""]
  547. Style[7]=["white","black","#000099","#E8E8FF","","","","","","","","","","",200,"",2,2,40,10,"","","","",""]
  548. Style[8]=["white","black","#000099","#E8E8FF","","","","","","","","","","",200,"",2,2,10,50,"","","","",""]
  549. Style[9]=["white","black","#000099","#E8E8FF","","","","","","","","","","",300,"",2,2,10,10,51,0.5,75,"simple","gray"]
  550. Style[10]=["white","black","black","white","","","right","","Impact","cursive","center","",3,5,200,150,5,20,10,0,50,1,80,"complex","gray"]
  551. Style[11]=["white","black","#000099","#E8E8FF","","","","","","","","","","",200,"",2,2,10,10,51,0.5,45,"simple","gray"]
  552. Style[12]=["white","black","#000099","#E8E8FF","","","","","","","","","","",200,"",2,2,10,10,"","","","",""]
  553.  
  554. applyCssFilter()
  555. // ]]></script>
  556. <form class="mceVisualAid" action="./certificate.php" method="post" enctype="multipart/form-data" name="maxcalc" target="_blank">
  557. <!--form name=maxcalc-->
  558. <table style="width: 500px;" align="center" border="0" cellpadding="11" cellspacing="0">
  559. <tbody>
  560. <tr>
  561. <th scope="col">
  562. <div align="left">
  563. <table border="0" cellpadding="8" cellspacing="1">
  564. <tbody>
  565. <tr>
  566. <td class="text" valign="middle" width="36"> <center>
  567. 1.
  568. </center></td>
  569. <td class="text" width="286">Annual Family Income:</td>
  570. <td width="60"><input size="10" name="totinc" onchange="computeField('1',this,10000,1000000,'Annual Family Income')" type="text"></td>
  571. <td width="39"><a href="#" onmouseover="stm(Text[3],Style[1])" onmouseout="htm()"><img src="http://www.website.com/path/help.gif" alt="Help" border="0" height="32" width="32"></a></td>
  572. <td width="39">&nbsp;</td>
  573. </tr>
  574. <tr>
  575. <td class="text" valign="middle">
  576. <center>
  577. 2.
  578. </center></td>
  579. <td class="text">Annual Property Taxes: (estimate)</td>
  580. <td><input size="10" name="protax" onchange="computeField('2',this,100,50000,'Annual Property Taxes')" type="text"></td>
  581. <td><a href="#" onmouseover="stm(Text[4],Style[1])" onmouseout="htm()"><img src="http://www.website.com/path/help.gif" alt="Help" border="0" height="32" width="32"></a></td>
  582. <td>&nbsp;</td>
  583. </tr>
  584. <tr>
  585. <td class="text" valign="middle">
  586. <center>
  587. 3.
  588. </center></td>
  589. <td class="text">Monthly Heating Costs/Condo Fees: (estimate)</td>
  590. <td><input size="10" name="proheat" onchange="computeField('3',this,20,1500,'Condo and/or Heating Costs')" type="text"></td>
  591. <td><a href="#" onmouseover="stm(Text[5],Style[1])" onmouseout="htm()"><img src="http://www.website.com/path/help.gif" alt="Help" border="0" height="32" width="32"></a></td>
  592. <td>&nbsp;</td>
  593. </tr>
  594. <tr>
  595. <td class="text" valign="middle"><center>
  596. 4.
  597. </center></td>
  598. <td class="text">Minimum Monthly Payments for Loans/Credit Cards:</td>
  599. <td><input size="10" name="debt" onchange="computeField('4',this,0,5000,'Monthly Debt Payments')" type="text"></td>
  600. <td><a href="#" onmouseover="stm(Text[6],Style[1])" onmouseout="htm()"><img src="http://www.website.com/path/help.gif" alt="Help" border="0" height="32" width="32"></a></td>
  601. <td>&nbsp;</td>
  602. </tr>
  603. <tr>
  604. <td class="text" valign="middle"><center>
  605. 5.
  606. </center></td>
  607. <td class="text">Monthly Secondary Financing Payment:</td>
  608. <td><input name="second" value="0" size="10" onchange="computeField('5',this,0,5000,'Secondary Financing Payment')" type="text"></td>
  609. <td><a href="#" onmouseover="stm(Text[7],Style[1])" onmouseout="htm()"><img src="http://www.website.com/path/help.gif" alt="Help" border="0" height="32" width="32"></a></td>
  610. <td>&nbsp;</td>
  611. </tr>
  612. <tr>
  613. <td class="text" align="center" valign="middle">6. </td>
  614. <td class="text">Interest Rate:</td>
  615. <td>
  616. <input size="10" name="rate" onchange="computeField('6',this,2.0,25.0,'Interest Rate')" type="text">
  617. </td>
  618. <td><a href="#" onmouseover="stm(Text[8],Style[1])" onmouseout="htm()"><img src="http://www.website.com/path/help.gif" alt="Help" border="0" height="32" width="32"></a></td>
  619. <td>&nbsp;</td>
  620. </tr>
  621. </tbody>
  622. </table>
  623. </div>
  624. </th>
  625.  
  626. </tr>
  627. </tbody>
  628. </table>
  629. <div align="center"><a href="javascript:calcMax()" onmouseover="self.status='Compute Maximum Mortgage &amp; Payment';return true;"><img src="http://www.website.com/path/calculate.png" alt="Compute Maximum Mortgage &amp; Payment" border="0" height="62" width="62"></a>
  630.  
  631. <table style="width: 283px; height: 51px;" align="center" border="0" cellpadding="2">
  632. <tbody>
  633. <tr>
  634. <td width="126"><center>
  635. Maximum Mortgage
  636. </center>
  637. </td>
  638. <td colspan="4" width="130"><center>
  639. Monthly Payment
  640. </center>
  641. </td>
  642. </tr>
  643. <tr>
  644. <td align="center"><input size="10" name="amt" onchange="calcMax()" id="amt" type="text"></td>
  645. <td align="center"><input size="10" name="pay" onchange="calcMax()" type="text"></td>
  646. </tr>
  647. <tr>
  648. </tr>
  649. </tbody>
  650. </table>
  651. </div>
  652. </form>
  653. </div>

Report this snippet  

You need to login to post a comment.