472,143 Members | 1,770 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,143 software developers and data experts.

Getting Values of NaN in Floor Are Ratio (FAR) Calculations

Catalyst159
111 100+
I have a form which is used to calculate residential Floor Area Ratio (FAR). The form is structured into seven parts as follows:

Part A: Maximum FAR and Floor Area:

Part B: Gross Floor Area of the main floors of the main house:

Part C: Gross Floor Area of the basement or cellar:

Part D: Gross Floor Area of the attic:

Part E. Gross Floor Area of all accessory structures except detached garages: (including cabanas, guest houses, caretaker's cottages, pool houses, sheds, barns, or other structures except a detached garage)

Part F. Gross Floor Area of the garage: (not including basement garages)

Part G: Total Floor Area:


The Javascript involved in the calculations is as follows:
Expand|Select|Wrap|Line Numbers
  1. <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
  2.  
  3. //**************************************************************************************
  4.  
  5. function checkAllInputFields(){
  6.     IsValidEntry(entireForm.A1.value)
  7.     IsValidEntry(entireForm.A5.value)
  8.     IsValidEntry(entireForm.A6.value)
  9.     IsValidEntry(entireForm.A8.value)
  10.     IsValidEntry(entireForm.A9.value)
  11.     IsValidEntry(entireForm.B1.value)
  12.     IsValidEntry(entireForm.B3.value)
  13.     IsValidEntry(entireForm.B4.value)
  14.     IsValidEntry(entireForm.B5.value)
  15.     IsValidEntry(entireForm.C1.value)
  16.     IsValidEntry(entireForm.C2.value)
  17.     IsValidEntry(entireForm.C3.value)
  18.     IsValidEntry(entireForm.D3.value)
  19.     IsValidEntry(entireForm.D4.value)
  20.     IsValidEntry(entireForm.D6.value)
  21.     IsValidEntry(entireForm.D7.value)
  22.     IsValidEntry(entireForm.D9.value)
  23.     IsValidEntry(entireForm.D10.value)
  24.     IsValidEntry(entireForm.D12.value)
  25.     IsValidEntry(entireForm.D13.value)
  26.     IsValidEntry(entireForm.D14.value)
  27.     IsValidEntry(entireForm.D15.value)
  28.     IsValidEntry(entireForm.E1.value)
  29.     IsValidEntry(entireForm.F2.value)
  30.     IsValidEntry(entireForm.F3.value)
  31.     IsValidEntry(entireForm.F4.value)
  32.     IsValidEntry(entireForm.F5.value)
  33.     IsValidEntry(entireForm.F8.value)
  34.     IsValidEntry(entireForm.F9.value)
  35.     IsValidEntry(entireForm.F11.value)
  36.     IsValidEntry(entireForm.F12.value)
  37.     IsValidEntry(entireForm.F14.value)
  38.     IsValidEntry(entireForm.F15.value)
  39.     IsValidEntry(entireForm.F17.value)
  40.     IsValidEntry(entireForm.F18.value)
  41.     IsValidEntry(entireForm.F19.value)
  42.     IsValidEntry(entireForm.F20.value)
  43.  
  44. }
  45.  
  46. //**************************************************************************************
  47.  
  48. function IsValidEntry(entry){
  49.     if(entry == "N/A to this property" || entry == "" || IsNumeric(entry)){
  50.         //do nothing
  51.     }
  52.     else{
  53.         alert(entry + " is not a number.  Numbers must only contain digits and decimal points")
  54.     }
  55. }
  56.  
  57. //**************************************************************************************
  58.  
  59. function IsNumeric(sText){
  60.     var ValidChars = "0123456789.";
  61.     var IsNumber=true;
  62.     var Char;
  63.  
  64.     for (i = 0; i < sText.length && IsNumber == true; i++) { 
  65.         Char = sText.charAt(i); 
  66.         if (ValidChars.indexOf(Char) == -1) {
  67.             IsNumber = false;
  68.         }
  69.     }
  70.     return IsNumber;
  71.     }
  72.  
  73.  
  74. //function which returns given number to 2 decimal places
  75. function roundTwo(x) {
  76.     return (Math.round(x*Math.pow(10,2)))/Math.pow(10,2)
  77. }
  78.  
  79. //**************************************************************************************
  80.  
  81. // function which returns given number to 4 decimal places
  82. function roundFour(x) {
  83.     return (Math.round(x*Math.pow(10,4)))/Math.pow(10,4)
  84. }
  85.  
  86. //**************************************************************************************
  87.  
  88. // function which calls calculation functions for all sections
  89. // this function is called whenever anything is changed on the form
  90. function calculateAll(){
  91.     checkAllInputFields()
  92.     doZoneChange()
  93.     doPartA()
  94.     doPartB()
  95.     doPartC()
  96.     doPartD()
  97.     doPartE()
  98.     doPartF()
  99.     doPartG()
  100. }
  101.  
  102. //***************************************************************************************
  103.  
  104. //funtion that changes form according to zoning district
  105. function doZoneChange(){
  106.     if (entireForm.zone.value == "AA1"){
  107.         entireForm.A5.value = "N/A to this property" 
  108.         entireForm.A5.disabled = true
  109.         entireForm.A6.value = "N/A to this property" 
  110.         entireForm.A6.disabled = true
  111.         entireForm.A7.value = "---------------------" 
  112.         entireForm.A8.value = "N/A to this property" 
  113.         entireForm.A8.disabled = true
  114.         entireForm.A9.value = "N/A to this property" 
  115.         entireForm.A9.disabled = true
  116.         entireForm.A10.value = "---------------------" 
  117.         entireForm.A11.value = "---------------------" 
  118.         entireForm.A12.value = "---------------------" 
  119.         entireForm.A13.value = "---------------------" 
  120.         entireForm.A14.value = "N/A to this property" 
  121.     }
  122.     else{
  123.         if (entireForm.A6.value == "N/A to this property"){
  124.             entireForm.A5.value = "" 
  125.             entireForm.A5.disabled = false
  126.             entireForm.A6.value = "" 
  127.             entireForm.A6.disabled = false
  128.             entireForm.A7.value = "" 
  129.             entireForm.A8.value = "" 
  130.             entireForm.A8.disabled = false
  131.             entireForm.A9.value = "" 
  132.             entireForm.A9.disabled = false
  133.             entireForm.A10.value = "" 
  134.             entireForm.A11.value = "" 
  135.             entireForm.A12.value = "" 
  136.             entireForm.A13.value = "" 
  137.             entireForm.A14.value = "" 
  138.  
  139.             if (entireForm.zone.value == "A1"){
  140.                 entireForm.A13.value = "1200"
  141.             }
  142.             else if (entireForm.zone.value == "A4" || entireForm.zone.value == "A5"){
  143.                 entireForm.A13.value = "400"
  144.             }
  145.             else{
  146.                 entireForm.A13.value = "700"
  147.             }
  148.         }
  149.         else{
  150.             if (entireForm.zone.value == "A1"){
  151.                 entireForm.A13.value = "1200"
  152.             }
  153.             else if (entireForm.zone.value == "A4" || entireForm.zone.value == "A5"){
  154.                 entireForm.A13.value = "400"
  155.             }
  156.             else{
  157.                 entireForm.A13.value = "700"
  158.             }
  159.         }
  160.     }
  161. }
  162.  
  163. //***************************************************************************************
  164.  
  165. function doPartA(){
  166.  
  167. //----------------------------------------
  168. // Calculates A2
  169. //----------------------------------------
  170.  
  171.     var lotArea = entireForm.A1.value
  172.  
  173.     if(lotArea < 5000){
  174.         entireForm.A2.value = .43
  175.     }
  176.     else if(lotArea < 10000){
  177.         entireForm.A2.value = (.43-(((lotArea-5000)/1000)*.016))
  178.     } 
  179.     else if(lotArea < 15000){
  180.         entireForm.A2.value = (.35-(((lotArea-10000)/1000)*.012))
  181.     }
  182.     else if(lotArea < 30000){
  183.         entireForm.A2.value = (.29-(((lotArea-15000)/1000)*.006))
  184.     }
  185.     else if(lotArea < 35000){
  186.         entireForm.A2.value = (.20-(((lotArea-30000)/1000)*.0045))
  187.     }
  188.     else if(lotArea < 40000){
  189.         entireForm.A2.value = (.1775-(((lotArea-35000)/1000)*.003))
  190.     }
  191.     else if(lotArea < 45000){
  192.         entireForm.A2.value = (.1625-(((lotArea-40000)/1000)*.002))
  193.     }
  194.     else if(lotArea < 50000){
  195.         entireForm.A2.value = (.1525-(((lotArea-45000)/1000)*.0015))
  196.     }
  197.     else if(lotArea < 76231){
  198.         entireForm.A2.value = .145
  199.     }
  200.     else {
  201.         entireForm.A2.value = 0
  202.     }     
  203.  
  204.     entireForm.A2.value = roundFour(entireForm.A2.value)
  205.  
  206. //------------------------------------
  207. // Calculates A4
  208. //------------------------------------
  209.  
  210.     if(lotArea < 76231){
  211.         var maxFar = entireForm.A2.value
  212.         entireForm.A4.value = (roundTwo(lotArea * maxFar))
  213.     }
  214.     else{
  215.         entireForm.A4.value = 15000
  216.     }
  217.  
  218. //-------------------------------------
  219. // Calculates A7 & A10
  220. //--------------------------------------
  221.     var RRightSetBack = entireForm.A5.value
  222.     var PRightSetBack = entireForm.A6.value
  223.     var RLeftSetBack = entireForm.A8.value
  224.     var PLeftSetBack = entireForm.A9.value
  225.  
  226.     entireForm.A7.value = (PRightSetBack - RRightSetBack)
  227.     if(entireForm.A7.value <= 0){
  228.         entireForm.A7.value = 0
  229.     }
  230.  
  231.     entireForm.A10.value = roundFour(PLeftSetBack - RLeftSetBack)
  232.     if(entireForm.A10.value <= 0){
  233.         entireForm.A10.value = 0
  234.     }
  235.  
  236.     leftResult = entireForm.A10.value
  237.     rightResult = entireForm.A7.value
  238.  
  239. //-------------------------------------
  240. // Calculates A11
  241. //--------------------------------------
  242.  
  243.     entireForm.A11.value = roundFour(Number(leftResult) + Number(rightResult))
  244.  
  245. //-------------------------------------
  246. // Calculates A12
  247. //--------------------------------------
  248.  
  249.     entireForm.A12.value =  roundFour(entireForm.A11.value * 100)
  250.  
  251. //-------------------------------------
  252. // Calculates A14
  253. //--------------------------------------
  254.  
  255.     if(entireForm.zone.value == "AA1"){
  256.         entireForm.A14.value = "0"
  257.     }
  258.     else{
  259.         var formA13 = entireForm.A13.value
  260.         var formA12 = entireForm.A12.value
  261.  
  262.         if(Number(formA13) < Number(formA12)){
  263.             entireForm.A14.value = formA13
  264.         }
  265.         else{
  266.             entireForm.A14.value = formA12
  267.         } 
  268.     }
  269. //-------------------------------------
  270. // Calculates A15
  271. //--------------------------------------
  272.  
  273.     entireForm.A15.value = (Number(entireForm.A14.value) + Number(entireForm.A4.value))
  274.  
  275. }
  276.  
  277. //***************************************************************************************
  278.  
  279. function doPartB(){
  280.  
  281. //-------------------------------------
  282. // Calculates B2 & B6
  283. //--------------------------------------
  284.  
  285.     var formB2 = (entireForm.B1.value * 2)
  286.     var formB3 = entireForm.B3.value
  287.     var formB4 = entireForm.B4.value
  288.     var formB5 = entireForm.B5.value
  289.  
  290.     entireForm.B2.value = formB2
  291.     entireForm.B6.value = roundTwo(Number(formB2) + Number(formB3) + Number(formB4) + Number(formB5))
  292.  
  293. }
  294.  
  295. //***************************************************************************************
  296. var firstTimeThrough = 0
  297.  
  298. function doPartC(){
  299.  
  300. //-------------------------------------
  301. // Calculates C4
  302. //--------------------------------------
  303.  
  304.     var tallestPoint = entireForm.C1.value
  305.  
  306.     if( !(entireForm.C1.value == "") ){ 
  307.         firstTimeThrough = 1
  308.     }
  309.  
  310.     if ( (tallestPoint < 3) && (firstTimeThrough == 1) ){
  311.         entireForm.C2.value = "N/A to this property"
  312.         entireForm.C2.disabled = true
  313.         entireForm.C3.value = "N/A to this property"
  314.         entireForm.C3.disabled = true
  315.         entireForm.C4.value = "0"
  316.     }
  317.     else{
  318.         if (entireForm.C2.value == "N/A to this property"){
  319.             entireForm.C2.value = ""
  320.             entireForm.C2.disabled = false
  321.             entireForm.C3.value = ""
  322.             entireForm.C3.disabled = false
  323.             entireForm.C4.value = ""
  324.         }
  325.         else{
  326.             entireForm.C4.value = roundTwo(entireForm.C3.value * entireForm.C2.value)
  327.         }
  328.  
  329.     }
  330. }
  331.  
  332. //***************************************************************************************
  333.  
  334. function doPartD(){
  335.     if(entireForm.D1.value == "No" || entireForm.D2.value == "No"){
  336.         entireForm.D3.value = "N/A to this property"
  337.         entireForm.D3.disabled = true
  338.         entireForm.D4.value = "N/A to this property"
  339.         entireForm.D4.disabled = true
  340.         entireForm.D5.value = "---------------------"
  341.         entireForm.D6.value = "N/A to this property"
  342.         entireForm.D6.disabled = true
  343.         entireForm.D7.value = "N/A to this property"
  344.         entireForm.D7.disabled = true
  345.         entireForm.D8.value = "---------------------"
  346.         entireForm.D9.value = "N/A to this property"
  347.         entireForm.D9.disabled = true
  348.         entireForm.D10.value = "N/A to this property"
  349.         entireForm.D10.disabled = true
  350.         entireForm.D11.value = "---------------------"
  351.         entireForm.D12.value = "N/A to this property"
  352.         entireForm.D12.disabled = true
  353.         entireForm.D13.value = "N/A to this property"
  354.         entireForm.D13.disabled = true
  355.         entireForm.D14.value = "N/A to this property"
  356.         entireForm.D14.disabled = true
  357.         entireForm.D15.value = "N/A to this property"
  358.         entireForm.D15.disabled = true
  359.         entireForm.D16.value = "0"
  360.     } 
  361.     else if(entireForm.D3.value == "N/A to this property"){
  362.         entireForm.D3.value = ""
  363.         entireForm.D3.disabled = false
  364.         entireForm.D4.value = ""
  365.         entireForm.D4.disabled = false
  366.         entireForm.D5.value = ""
  367.         entireForm.D6.value = ""
  368.         entireForm.D6.disabled = false
  369.         entireForm.D7.value = ""
  370.         entireForm.D7.disabled = false
  371.         entireForm.D8.value = ""
  372.         entireForm.D9.value = ""
  373.         entireForm.D9.disabled = false
  374.         entireForm.D10.value = ""
  375.         entireForm.D10.disabled = false
  376.         entireForm.D11.value = ""
  377.         entireForm.D12.value = ""
  378.         entireForm.D12.disabled = false
  379.         entireForm.D13.value = ""
  380.         entireForm.D13.disabled = false
  381.         entireForm.D14.value = ""
  382.         entireForm.D14.disabled = false
  383.         entireForm.D15.value = ""
  384.         entireForm.D15.disabled = false
  385.         entireForm.D16.value = ""
  386.     }
  387.     else{
  388. //-------------------------------------
  389. // Calculates D5
  390. //--------------------------------------
  391.         if(entireForm.D3.value == "0"){
  392.             entireForm.D4.value = "0"
  393.             entireForm.D5.value = "0"
  394.         }
  395.         else{
  396.             entireForm.D5.value = roundFour((entireForm.D4.value / entireForm.D3.value)*100)
  397.         }
  398. //-------------------------------------
  399. // Calculates D8
  400. //--------------------------------------
  401.         if(entireForm.D6.value == "0"){
  402.             entireForm.D7.value = "0"
  403.             entireForm.D8.value = "0"
  404.         }
  405.         else{
  406.             entireForm.D8.value = roundFour((entireForm.D7.value / entireForm.D6.value)*100)
  407.         }
  408. //-------------------------------------
  409. // Calculates D11
  410. //--------------------------------------
  411.         if(entireForm.D9.value == "0"){
  412.             entireForm.D10.value = "0"
  413.             entireForm.D11.value = "0"
  414.         }
  415.         else{
  416.             entireForm.D11.value = roundFour((entireForm.D10.value / entireForm.D9.value)*100)
  417.         }
  418.  
  419.         if(entireForm.D12.value == "0"){
  420.             entireForm.D13.value = "0"
  421.         }
  422.  
  423.         if(entireForm.D4.value == ""){
  424.             entireForm.D5.value = "NMI"
  425.         }
  426.         if(entireForm.D7.value == ""){
  427.             entireForm.D8.value = "NMI"
  428.         }
  429.         if(entireForm.D10.value == ""){
  430.             entireForm.D11.value = "NMI"
  431.         }
  432. //-------------------------------------
  433. // Calculates D16
  434. //--------------------------------------
  435.         if(entireForm.D5.value < 30 && entireForm.D8.value < 30 && entireForm.D11.value < 30 && entireForm.D12.value >= 5 && entireForm.D13.value >= 5){
  436.             entireForm.D14.value = "N/A to this property"
  437.             entireForm.D14.disabled = true
  438.             entireForm.D15.value = "N/A to this property"
  439.             entireForm.D15.disabled = true
  440.             entireForm.D16.value = "N/A to this property"
  441.         }
  442.         else if (entireForm.D14.value == "N/A to this property"){
  443.             entireForm.D14.value = ""
  444.             entireForm.D14.disabled = false
  445.             entireForm.D15.value = ""
  446.             entireForm.D15.disabled = false
  447.             entireForm.D16.value = ""
  448.         }
  449.  
  450.         if (!(entireForm.D14.value == "") && !(entireForm.D15.value == "") && !(entireForm.D15.value == "N/A to this property") && !(entireForm.D15.value == "N/A to this property")){
  451.             entireForm.D16.value = (entireForm.D14.value - entireForm.D15.value)
  452.         }
  453.  
  454.     }
  455. }
  456.  
  457. //***************************************************************************************
  458.  
  459. function doPartE(){
  460. //-------------------------------------
  461. // Calculates E2
  462. //--------------------------------------
  463.     entireForm.E2.value = entireForm.E1.value
  464.  
  465. }
  466.  
  467. //***************************************************************************************
  468.  
  469. function doPartF(){
  470.  
  471.     if(entireForm.F0.value == "No"){
  472.         entireForm.F3.value = "0"
  473.         entireForm.F3.disabled = true
  474.         entireForm.F4.value = "0"
  475.         entireForm.F4.disabled = true
  476.         entireForm.F5.value = "0"
  477.         entireForm.F5.disabled = true
  478.         entireForm.F6.value = "No"
  479.         entireForm.F6.disabled = true
  480.         entireForm.F7.disabled = true
  481.     }
  482.     else if(entireForm.F0.value == "Yes" && entireForm.F3.value == "0"){
  483.         entireForm.F3.value = ""
  484.         entireForm.F3.disabled = false
  485.         entireForm.F4.value = ""
  486.         entireForm.F4.disabled = false
  487.         entireForm.F5.value = ""
  488.         entireForm.F5.disabled = false
  489.         entireForm.F6.value = "Yes"
  490.         entireForm.F6.disabled = false
  491.         entireForm.F7.disabled = false
  492.     }
  493.  
  494.     if(entireForm.F1.value == "No"){
  495.         entireForm.F2.value = "0"
  496.         entireForm.F2.disabled = true
  497.     }
  498.     else if(entireForm.F1.value == "Yes" && entireForm.F2.value == "0"){
  499.         entireForm.F2.value = ""
  500.         entireForm.F2.disabled = false
  501.  
  502.     }
  503.  
  504.  
  505.  
  506.  
  507.     if(entireForm.F6.value == "No" || entireForm.F7.value == "No"){
  508.         entireForm.F8.value = "N/A to this property"
  509.         entireForm.F8.disabled = true
  510.         entireForm.F9.value = "N/A to this property"
  511.         entireForm.F9.disabled = true
  512.         entireForm.F10.value = "---------------------"
  513.         entireForm.F11.value = "N/A to this property"
  514.         entireForm.F11.disabled = true
  515.         entireForm.F12.value = "N/A to this property"
  516.         entireForm.F12.disabled = true
  517.         entireForm.F13.value = "---------------------"
  518.         entireForm.F14.value = "N/A to this property"
  519.         entireForm.F14.disabled = true
  520.         entireForm.F15.value = "N/A to this property"
  521.         entireForm.F15.disabled = true
  522.         entireForm.F16.value = "---------------------"
  523.         entireForm.F17.value = "N/A to this property"
  524.         entireForm.F17.disabled = true
  525.         entireForm.F18.value = "N/A to this property"
  526.         entireForm.F18.disabled = true
  527.         entireForm.F19.value = "N/A to this property"
  528.         entireForm.F19.disabled = true
  529.         entireForm.F20.value = "N/A to this property"
  530.         entireForm.F20.disabled = true
  531.         entireForm.F21.value = "0"
  532.     } 
  533.     else if(entireForm.F8.value == "N/A to this property"){
  534.         entireForm.F8.value = ""
  535.         entireForm.F8.disabled = false
  536.         entireForm.F9.value = ""
  537.         entireForm.F9.disabled = false
  538.         entireForm.F10.value = ""
  539.         entireForm.F11.value = ""
  540.         entireForm.F11.disabled = false
  541.         entireForm.F12.value = ""
  542.         entireForm.F12.disabled = false
  543.         entireForm.F13.value = ""
  544.         entireForm.F14.value = ""
  545.         entireForm.F14.disabled = false
  546.         entireForm.F15.value = ""
  547.         entireForm.F15.disabled = false
  548.         entireForm.F16.value = ""
  549.         entireForm.F17.value = ""
  550.         entireForm.F17.disabled = false
  551.         entireForm.F18.value = ""
  552.         entireForm.F18.disabled = false
  553.         entireForm.F19.value = ""
  554.         entireForm.F19.disabled = false
  555.         entireForm.F20.value = ""
  556.         entireForm.F20.disabled = false
  557.         entireForm.F21.value = "0"
  558.     }
  559.     else{
  560. //-------------------------------------
  561. // Calculates F10
  562. //--------------------------------------
  563.         if(entireForm.F8.value == "0"){
  564.             entireForm.F9.value = "0"
  565.             entireForm.F10.value = "0"
  566.         }
  567.         else{
  568.             entireForm.F10.value = roundFour((entireForm.F9.value / entireForm.F8.value)*100)
  569.         }
  570. //-------------------------------------
  571. // Calculates F13
  572. //--------------------------------------
  573.         if(entireForm.F11.value == "0"){
  574.             entireForm.F12.value = "0"
  575.             entireForm.F13.value = "0"
  576.         }
  577.         else{
  578.             entireForm.F13.value = roundFour((entireForm.F12.value / entireForm.F11.value)*100)
  579.         }
  580. //-------------------------------------
  581. // Calculates F16
  582. //--------------------------------------
  583.         if(entireForm.F14.value == "0"){
  584.             entireForm.F15.value = "0"
  585.             entireForm.F16.value = "0"
  586.         }
  587.         else{
  588.             entireForm.F16.value = roundFour((entireForm.F15.value / entireForm.F14.value)*100)
  589.         }
  590.  
  591.         if(entireForm.F17.value == "0"){
  592.             entireForm.F18.value = "0"
  593.         }
  594.  
  595.         if(entireForm.F9.value == ""){
  596.             entireForm.F10.value = "NMI"
  597.         }
  598.         if(entireForm.F12.value == ""){
  599.             entireForm.F13.value = "NMI"
  600.         }
  601.         if(entireForm.F15.value == ""){
  602.             entireForm.F16.value = "NMI"
  603.         }
  604. //-------------------------------------
  605. // Calculates F21
  606. //--------------------------------------
  607.         if(entireForm.F10.value < 30 && entireForm.F13.value < 30 && entireForm.F16.value < 30 && entireForm.F17.value >= 5 && entireForm.F18.value >= 5){
  608.             entireForm.F19.value = "N/A to this property"
  609.             entireForm.F19.disabled = true
  610.             entireForm.F20.value = "N/A to this property"
  611.             entireForm.F20.disabled = true
  612.             entireForm.F21.value = "N/A to this property"
  613.         }
  614.         else if (entireForm.F19.value == "N/A to this property"){
  615.             entireForm.F19.value = ""
  616.             entireForm.F19.disabled = false
  617.             entireForm.F20.value = ""
  618.             entireForm.F20.disabled = false
  619.             entireForm.F21.value = ""
  620.         }
  621.  
  622.         if (!(entireForm.F19.value == "") && !(entireForm.F20.value == "") && !(entireForm.F20.value == "N/A to this property") && !(entireForm.F20.value == "N/A to this property")){
  623.             entireForm.F21.value = roundTwo(entireForm.F19.value - entireForm.F20.value)
  624.         }
  625.  
  626.     }
  627.  
  628. //-------------------------------------
  629. // Calculates F23
  630. //--------------------------------------
  631.     entireForm.F22.value = entireForm.A1.value 
  632.     if(entireForm.F22.value <= 10000){
  633.         entireForm.F23.value = 250
  634.     }
  635.     else{
  636.         entireForm.F23.value = 400
  637.     }
  638.  
  639. //-------------------------------------
  640. // Calculates F24 & F25
  641. //--------------------------------------
  642.     entireForm.F24.value = roundFour(Number(entireForm.F2.value) + Number(entireForm.F3.value))
  643.     entireForm.F25.value = roundFour(entireForm.F24.value - entireForm.F23.value)
  644.  
  645. //-------------------------------------
  646. // Calculates F26
  647. //--------------------------------------
  648.     if(entireForm.F25.value < 0){
  649.         entireForm.F25.value = 0
  650.     }
  651.     entireForm.F26.value = roundTwo(Number(entireForm.F4.value) + Number(entireForm.F5.value) + Number(entireForm.F21.value) + Number(entireForm.F25.value))
  652.  
  653. }
  654.  
  655. //***************************************************************************************
  656.  
  657. function doPartG(){
  658. //-------------------------------------
  659. // Calculates G1 & G2
  660. //--------------------------------------
  661.     entireForm.G1.value = roundTwo(Number(entireForm.B6.value) + Number(entireForm.C4.value) + Number(entireForm.D16.value) + Number(entireForm.E2.value) + Number(entireForm.F26.value))
  662.     entireForm.G2.value = entireForm.A15.value
  663.  
  664. //-------------------------------------
  665. // Calculates G4 & G5
  666. //--------------------------------------
  667.     if (entireForm.G1.value > entireForm.G2.value){
  668.         entireForm.G3.value = "Yes"
  669.         entireForm.G4.value = roundTwo(entireForm.G1.value - entireForm.G2.value)
  670.     }
  671.     else{
  672.         entireForm.G3.value = "No"
  673.         entireForm.G4.value = "Not exceeded"
  674.     }
  675.  
  676. }
  677.  
  678. //***************************************************************************************
  679. </SCRIPT>


The HTML is as Follows :
Expand|Select|Wrap|Line Numbers
  1. <html>
  2.  
  3. <head>
  4. <meta http-equiv="Content-Language" content="en-us">
  5. <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
  6. <meta name="ProgId" content="FrontPage.Editor.Document">
  7. <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  8. <title>Village of Scarsdale</title>
  9. </head>
  10.  
  11. <body>
  12.  
  13. <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="95%" id="AutoNumber1">
  14.   <tr>
  15.     <td width="50%"><font size="5" face="Verdana">Village of Scarsdale</font></td>
  16.     <td width="50%">
  17.     <p align="right">&nbsp;
  18.         <SCRIPT LANGUAGE="JavaScript1.2">
  19.  
  20.         <!-- Begin
  21.         var months=new Array(13);
  22.         months[1]="January";
  23.         months[2]="February";
  24.         months[3]="March";
  25.         months[4]="April";
  26.         months[5]="May";
  27.         months[6]="June";
  28.         months[7]="July";
  29.         months[8]="August";
  30.         months[9]="September";
  31.         months[10]="October";
  32.         months[11]="November";
  33.         months[12]="December";
  34.         var time=new Date();
  35.         var lmonth=months[time.getMonth() + 1];
  36.         var date=time.getDate();
  37.         var year=time.getYear();
  38.         if (year < 2000)    // Y2K Fix, Isaac Powell
  39.         year = year + 1900; // http://onyx.idbsu.edu/~ipowell
  40.         document.write("<center>" + lmonth + " ");
  41.         document.write(date + ", " + year + "</center>");
  42.         // End -->
  43.         </SCRIPT>
  44. </td>
  45.   </tr>
  46.   <tr>
  47.     <td width="100%" colspan="2"><font face="Verdana">Residential Floor Area Ratio (Far) 
  48.     Worksheet</font></td>
  49.   </tr>
  50. </table>
  51. <p>For more FAR information click
  52. <a href="http://www.scarsdale.com/portals/0/planning/Far_Information.doc">here</a> (Word 
  53. .doc).<br/>
  54. For non-automated FAR worksheet click
  55. <a href="http://www.scarsdale.com/portals/0/planning/Far_worksheet.xls">here</a> (Excel .xls).</p>
  56. <p>Update: 10/9/02 Error corrected for lots 15,000 to 30,000 square feet (was
  57. computing a gross residential floor area 1.9% too high).</p>
  58. <table border="1" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber4" height="132">
  59.   <tr>
  60.     <td width="605" height="128"><font face="Verdana" size="2"><b>Notes:</b>&nbsp; 
  61.     This online worksheet will do all FAR calculations automatically, please 
  62.     enter all the required measurements and information.&nbsp; All measurements 
  63.     are in feet or square feet.&nbsp; All measurements must be represented in 
  64.     decimal form.&nbsp; For example, 2 feet and 6 inches should be represented 
  65.     as &quot;2.5&quot;.&nbsp; Users may only enter information into the user input column, 
  66.     all other fields will be automatically calculated.&nbsp; Users may only type 
  67.     numbers and decimal points into input fields.&nbsp; For example, &quot;12,000&quot; 
  68.     would not be accepted because it has a comma in it.&nbsp; The calculations 
  69.     column should be ignored by the user.&nbsp; A message of &quot;N/A for this 
  70.     property&quot; means that this field is irrelevant to the calculation of FAR.&nbsp; 
  71.     Fields with the value &quot;N/A for this property&quot; should be ignored by the user.&nbsp; 
  72.     No fields in the user input column should be left blank.&nbsp; After all 
  73.     user input fields have been completed, the worksheet should be printed and 
  74.     signed.</font></td>
  75.   </tr>
  76. </table>
  77. <p>&nbsp;</p>
  78. <form method="POST" name = "entireForm" action="FAR.asp" webbot-action="--WEBBOT-SELF--">
  79.       <!--webbot bot="SaveResults" startspan
  80.       u-file="fpweb:///_private/form_results.csv" s-format="TEXT/CSV"
  81.       s-label-fields="TRUE" --><strong>[FrontPage Save Results Component]</strong><!--webbot
  82.       bot="SaveResults" endspan i-checksum="6561" --><p>
  83. <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="85%" id="AutoNumber3">
  84.   <tr>
  85.     <td width="33%">Enter Full Name:</td>
  86.     <td width="67%"><input type="text" name="fullName" size="50"></td>
  87.   </tr>
  88.   <tr>
  89.     <td width="33%">Enter Property Address:</td>
  90.     <td width="67%"><input type="text" name="address" size="50"></td>
  91.   </tr>
  92.   <tr>
  93.     <td width="33%">Enter Zoning District:</td>
  94.     <td width="67%">
  95.  
  96.       <select size="1" name="zone" onclick= "calculateAll()">
  97.       <option value="A1">A-1 Zone</option>
  98.       <option value="AA1">AA-1 Zone</option>
  99.       <option value="A2">A-2 Zone</option>
  100.       <option value="A2a">A-2a Zone</option>
  101.       <option value="A3">A-3 Zone</option>
  102.       <option value="A4">A-4 Zone</option>
  103.       <option value="A5">A-5 Zone</option>
  104.       </select></p>
  105.     </td>
  106.   </tr>
  107. </table>
  108. <p>&nbsp;</p>
  109. <table border="0" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2" height="510">
  110.   <tr>
  111.     <td width="70%" bgcolor="#FFFFFF" align="center" height="33">&nbsp;</td>
  112.     <td width="22%" bgcolor="#FFFFFF" style="border: 2px solid #000000" align="center" height="34">
  113.     <b><font face="Verdana">User Input</font></b></td>
  114.     <td width="53%" bgcolor="#FFFFFF" style="border: 2px solid #000000" align="center" height="34">
  115.     <b><font face="Verdana">Results</font></b></td>
  116.     <td width="19%" bgcolor="#FFFFFF" style="border: 2px solid #000000" align="center" height="34">
  117.     <font face="Verdana"><b><font size="2">Calculations</font> </b>
  118.     <font size="1">(ignore)</font></font></td>
  119.   </tr>
  120.   <tr>
  121.     <td width="70%" height="20">&nbsp;</td>
  122.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  123.     <td width="53%" height="19">&nbsp;</td>
  124.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  125.   </tr>
  126.   <tr>
  127.     <td width="70%" height="36"><b><font face="Verdana">Part A: Maximum FAR and 
  128.     Floor Area</font></b></td>
  129.     <td width="22%" bgcolor="#FFFFCC" height="36">&nbsp;</td>
  130.     <td width="53%" height="36">&nbsp;</td>
  131.     <td width="19%" bgcolor="#E3E0DB" height="36">&nbsp;</td>
  132.   </tr>
  133.   <tr>
  134.     <td width="70%" height="22"><font face="Verdana" size="1">Enter total lot 
  135.     area:</font></td>
  136.     <td width="22%" bgcolor="#FFFFCC" height="22"><font face="Verdana">
  137.     <input type="text" name="A1" size="17" onBlur = "calculateAll()" maxlength="120000"></font></td>
  138.     <td width="53%" height="22">&nbsp;</td>
  139.     <td width="19%" bgcolor="#E3E0DB" height="22">&nbsp;</td>
  140.   </tr>
  141.   <tr>
  142.     <td width="70%" height="22">&nbsp;</td>
  143.     <td width="22%" bgcolor="#FFFFCC" height="22">&nbsp;</td>
  144.     <td width="53%" height="22">&nbsp;</td>
  145.     <td width="19%" bgcolor="#E3E0DB" height="22"><font face="Verdana">
  146.     <input disabled = "true" type="text" name="A2" size="11"></font></td>
  147.   </tr>
  148.   <tr>
  149.     <td width="70%" height="22">
  150.     <p align="right"><b><font face="Verdana" size="1">Base Maximum Floor Area</font></b></td>
  151.     <td width="22%" bgcolor="#FFFFCC" height="22"><font face="Verdana" size="2">
  152.     -----------------</font></td>
  153.     <td width="53%" height="22"><font face="Verdana" size="2">
  154.     --------------&gt;</font></td>
  155.     <td width="19%" bgcolor="#E3E0DB" height="22"><font face="Verdana">
  156.     <input type="text" name="A4" size="11" disabled = "true"></font></td>
  157.   </tr>
  158.   <tr>
  159.     <td width="70%" height="19">&nbsp;</td>
  160.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  161.     <td width="53%" height="19">&nbsp;</td>
  162.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  163.   </tr>
  164.   <tr>
  165.     <td width="70%" height="11"><font size="1" face="Verdana">Enter the required 
  166.     right side yard setback:*</font></td>
  167.     <td width="22%" bgcolor="#FFFFCC" height="11"><font face="Verdana">
  168.     <input type="text" name="A5" size="17" onBlur = "calculateAll()" ></font></td>
  169.     <td width="53%" height="11"></td>
  170.     <td width="19%" bgcolor="#E3E0DB" height="11">&nbsp;</td>
  171.   </tr>
  172.   <tr>
  173.     <td width="70%" height="19"><font size="1" face="Verdana">Enter the proposed 
  174.     right side yard setback:*</font></td>
  175.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  176.     <input type="text" name="A6" size="17" onBlur = "calculateAll()"></font></td>
  177.     <td width="53%" height="19">&nbsp;</td>
  178.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  179.   </tr>
  180.   <tr>
  181.     <td width="70%" height="19">&nbsp;</td>
  182.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  183.     <td width="53%" height="19">&nbsp;</td>
  184.     <td width="19%" bgcolor="#E3E0DB" height="19"><font face="Verdana">
  185.     <input type="text" name="A7" size="11" disabled = "true"></font></td>
  186.   </tr>
  187.   <tr>
  188.     <td width="70%" height="19"><font size="1" face="Verdana">Enter the required 
  189.     left side yard setback:*</font></td>
  190.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  191.     <input type="text" name="A8" size="17" onBlur = "calculateAll()" ></font></td>
  192.     <td width="53%" height="19">&nbsp;</td>
  193.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  194.   </tr>
  195.   <tr>
  196.     <td width="70%" height="19"><font size="1" face="Verdana">Enter the proposed 
  197.     left side yard setback:*</font></td>
  198.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  199.     <input type="text" name="A9" size="17" onBlur = "calculateAll()"></font></td>
  200.     <td width="53%" height="19">&nbsp;</td>
  201.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  202.   </tr>
  203.   <tr>
  204.     <td width="70%" height="19">&nbsp;</td>
  205.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  206.     <td width="53%" height="19">&nbsp;</td>
  207.     <td width="19%" bgcolor="#E3E0DB" height="19"><font face="Verdana">
  208.     <input type="text" name="A10" size="11" disabled = "true"></font></td>
  209.   </tr>
  210.   <tr>
  211.     <td width="70%" height="19">&nbsp;</td>
  212.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  213.     <td width="53%" height="19">&nbsp;</td>
  214.     <td width="19%" bgcolor="#E3E0DB" height="19"><font face="Verdana">
  215.     <input type="text" name="A11" size="11" disabled = "true"></font></td>
  216.   </tr>
  217.   <tr>
  218.     <td width="70%" height="19">&nbsp;</td>
  219.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  220.     <td width="53%" height="19">&nbsp;</td>
  221.     <td width="19%" bgcolor="#E3E0DB" height="19"><font face="Verdana">
  222.     <input type="text" name="A12" size="11" disabled = "true"></font></td>
  223.   </tr>
  224.   <tr>
  225.     <td width="70%" height="19">&nbsp;</td>
  226.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  227.     <td width="53%" height="19">&nbsp;</td>
  228.     <td width="19%" bgcolor="#E3E0DB" height="19"><font face="Verdana">
  229.     <input type="text" name="A13" size="11" value = "1200" disabled = "true"></font></td>
  230.   </tr>
  231.   <tr>
  232.     <td width="70%" height="19">
  233.     <p align="right"><b><font face="Verdana" size="1">Floor Area Bonus for 
  234.     Greater Setbacks*</font></b></td>
  235.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana" size="2">
  236.     -----------------</font></td>
  237.     <td width="53%" height="19"><font face="Verdana" size="2">--------------&gt;</font></td>
  238.     <td width="19%" bgcolor="#E3E0DB" height="19"><font face="Verdana">
  239.     <input type="text" name="A14" size="11" disabled = "true"></font></td>
  240.   </tr>
  241.   <tr>
  242.     <td width="70%" height="19">
  243.     <p align="right"><b><font face="Verdana" size="1">Maximum Floor Area</font></b></td>
  244.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana" size="2">
  245.     ---------------&gt;</font></td>
  246.     <td width="53%" height="19"><font face="Verdana">
  247.     <input type="text" name="A15" size="17" disabled = "true"></font></td>
  248.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  249.   </tr>
  250.   <tr>
  251.     <td width="70%" height="19"><i><font face="Verdana" size="1">* &quot;Right&quot; and 
  252.     &quot;Left&quot; side yards are as seen from the front property line.</font></i></td>
  253.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  254.     <td width="53%" height="19">&nbsp;</td>
  255.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  256.   </tr>
  257.   <tr>
  258.     <td width="70%" height="19"><i><font face="Verdana" size="1">**In the case 
  259.     of an addition to an existing home, the Floor Area Bonus for Greater 
  260.     Setbacks must be added to the rear of the existing house.</font></i></td>
  261.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  262.     <td width="53%" height="19">&nbsp;</td>
  263.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  264.   </tr>
  265.   <tr>
  266.     <td width="70%" height="19">&nbsp;</td>
  267.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  268.     <td width="53%" height="19">&nbsp;</td>
  269.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  270.   </tr>
  271.   <tr>
  272.     <td width="70%" height="19"><b><font face="Verdana">Part B: Gross Floor Area 
  273.     of the main floors of the main house</font></b></td>
  274.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  275.     <td width="53%" height="19">&nbsp;</td>
  276.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  277.   </tr>
  278.   <tr>
  279.     <td width="70%" height="19"><font face="Verdana" size="1">Calculate the 
  280.     total area of all those interior parts of the house with a floor-to-ceiling 
  281.     height greater then 14.0 ft:</font></td>
  282.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  283.     <input type="text" name="B1" size="17" onBlur = "calculateAll()"></font></td>
  284.     <td width="53%" height="19">&nbsp;</td>
  285.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  286.   </tr>
  287.   <tr>
  288.     <td width="70%" height="19">&nbsp;</td>
  289.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  290.     <td width="53%" height="19">&nbsp;</td>
  291.     <td width="19%" bgcolor="#E3E0DB" height="19"><font face="Verdana">
  292.     <input type="text" name="B2" size="11" disabled = "true"></font></td>
  293.   </tr>
  294.   <tr>
  295.     <td width="70%" height="19"><font face="Verdana" size="1">Calculate the 
  296.     total area of the first floor:*</font></td>
  297.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  298.     <input type="text" name="B3" size="17" onBlur = "calculateAll()"></font></td>
  299.     <td width="53%" height="19">&nbsp;</td>
  300.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  301.   </tr>
  302.   <tr>
  303.     <td width="70%" height="19"><font face="Verdana" size="1">Calculate the 
  304.     total area of the second floor:*</font></td>
  305.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  306.     <input type="text" name="B4" size="17" onBlur = "calculateAll()"></font></td>
  307.     <td width="53%" height="19">&nbsp;</td>
  308.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  309.   </tr>
  310.   <tr>
  311.     <td width="70%" height="19"><font face="Verdana" size="1">Calculate the 
  312.     total area of any additional floor(s), but not including basement, cellar, 
  313.     or attic space:*</font></td>
  314.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  315.     <input type="text" name="B5" size="17" onBlur = "calculateAll()"></font></td>
  316.     <td width="53%" height="19">&nbsp;</td>
  317.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  318.   </tr>
  319.   <tr>
  320.     <td width="70%" height="19"><i><font face="Verdana" size="1">* Measure to 
  321.     the exterior of the outside walls. Exclude all those interior parts of the 
  322.     house with a floor-to-ceiling height greater than 14.0 ft. Also exclude 
  323.     basements, cellars, attic space, garage space, decks, patios, balconies, or 
  324.     unenclosed porches/porticoes. Include all existing and proposed space, all 
  325.     enclosed porches/porticoes, any non-attic floor space above a garage.</font></i></td>
  326.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  327.     <td width="53%" height="19">&nbsp;</td>
  328.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  329.   </tr>
  330.   <tr>
  331.     <td width="70%" height="19">
  332.     <p align="right"><b><font face="Verdana" size="1">Floor area of the main 
  333.     floors of the main house</font></b></td>
  334.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana" size="2">
  335.     ---------------&gt;</font></td>
  336.     <td width="53%" height="19"><font face="Verdana">
  337.     <input type="text" name="B6" size="17" disabled = "true"></font></td>
  338.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  339.   </tr>
  340.   <tr>
  341.     <td width="70%" height="19">&nbsp;</td>
  342.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  343.     <td width="53%" height="19">&nbsp;</td>
  344.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  345.   </tr>
  346.   <tr>
  347.     <td width="70%" height="19"><b><font face="Verdana">Part C: Gross Floor Area 
  348.     of the basement or cellar</font></b></td>
  349.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  350.     <td width="53%" height="19">&nbsp;</td>
  351.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  352.   </tr>
  353.   <tr>
  354.     <td width="70%" height="19"><font face="Verdana" size="1">Measure the height 
  355.     of the tallest exposed basement or cellar wall: (If this number is less then 
  356.     3.0, this section will not be included in the calculations) *</font></td>
  357.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  358.     <input type="text" name="C1" size="17" onBlur = "calculateAll()"></font></td>
  359.     <td width="53%" height="19">&nbsp;</td>
  360.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  361.   </tr>
  362.   <tr>
  363.     <td width="70%" height="19"><font face="Verdana" size="1">Measure the width 
  364.     of those sections of the exposed wall that have a height equal to or greater 
  365.     than 3.0 ft.:</font></td>
  366.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  367.     <input type="text" name="C2" size="17" onBlur = "calculateAll()"></font></td>
  368.     <td width="53%" height="19">&nbsp;</td>
  369.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  370.   </tr>
  371.   <tr>
  372.     <td width="70%" height="19"><font face="Verdana" size="1">Measure the 
  373.     distance between the front wall and the rear wall for those sections of the 
  374.     exposed wall that have a height equal to or greater than 3.0 ft.:**</font></td>
  375.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  376.     <input type="text" name="C3" size="17" onBlur = "calculateAll()"></font></td>
  377.     <td width="53%" height="19">&nbsp;</td>
  378.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  379.   </tr>
  380.   <tr>
  381.     <td width="70%" height="19"><i><font face="Verdana" size="1">* Measure from 
  382.     the finished grade to the point where the basement or cellar ceiling joins 
  383.     the wall on the inside of the house. </font></i></td>
  384.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  385.     <td width="53%" height="19">&nbsp;</td>
  386.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  387.   </tr>
  388.   <tr>
  389.     <td width="70%" height="19"><i><font face="Verdana" size="1">** If the depth 
  390.     varies, measure the depth at the widest point.</font></i></td>
  391.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  392.     <td width="53%" height="19">&nbsp;</td>
  393.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  394.   </tr>
  395.   <tr>
  396.     <td width="70%" height="19">
  397.     <p align="right"><b><font face="Verdana" size="1">Floor area of the basement 
  398.     or cellar</font></b></td>
  399.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana" size="2">
  400.     ---------------&gt;</font></td>
  401.     <td width="53%" height="19"><font face="Verdana">
  402.     <input type="text" name="C4" size="17" disabled = "true"></font></td>
  403.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  404.   </tr>
  405.   <tr>
  406.     <td width="70%" height="19">&nbsp;</td>
  407.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  408.     <td width="53%" height="19">&nbsp;</td>
  409.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  410.   </tr>
  411.   <tr>
  412.     <td width="70%" height="19"><b><font face="Verdana">Part D: Gross Floor Area 
  413.     of the attic</font></b></td>
  414.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  415.     <td width="53%" height="19">&nbsp;</td>
  416.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  417.   </tr>
  418.   <tr>
  419.     <td width="70%" height="19"><font face="Verdana" size="1">Does any part of 
  420.     the attic have a floor-to-ceiling height equal to or greater than 4.0 ft.?</font></td>
  421.     <td width="22%" bgcolor="#FFFFCC" height="19">
  422.     <p align="center"><select size="1" name="D1" onclick= "calculateAll()">
  423.     <option value="Yes">Yes</option>
  424.     <option value="No">No</option>
  425.     </select></td>
  426.     <td width="53%" height="19">&nbsp;</td>
  427.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  428.   </tr>
  429.   <tr>
  430.     <td width="70%" height="19"><font face="Verdana" size="1">Is there one or 
  431.     more dormer on the roof?</font></td>
  432.     <td width="22%" bgcolor="#FFFFCC" height="19">
  433.     <p align="center"><select size="1" name="D2" onclick= "calculateAll()">
  434.     <option value="Yes">Yes</option>
  435.     <option value="No">No</option>
  436.     </select></td>
  437.     <td width="53%" height="19">&nbsp;</td>
  438.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  439.   </tr>
  440.   <tr>
  441.     <td width="70%" height="19"><font face="Verdana" size="1">If there is one or 
  442.     more dormer on the roof, <u>facing the front yard</u>, measure the length of 
  443.     the roof, from one side to the other, at its widest point*, otherwise type 
  444.     &quot;0&quot;</font></td>
  445.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  446.     <input type="text" name="D3" size="17" onBlur = "calculateAll()"></font></td>
  447.     <td width="53%" height="19">&nbsp;</td>
  448.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  449.   </tr>
  450.   <tr>
  451.     <td width="70%" height="19"><font face="Verdana" size="1">Measure the total 
  452.     exterior width of all dormers <u>facing the front yard:</u></font></td>
  453.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  454.     <input type="text" name="D4" size="17" onBlur = "calculateAll()"></font></td>
  455.     <td width="53%" height="19">&nbsp;</td>
  456.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  457.   </tr>
  458.   <tr>
  459.     <td width="70%" height="19">&nbsp;</td>
  460.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  461.     <td width="53%" height="19">&nbsp;</td>
  462.     <td width="19%" bgcolor="#E3E0DB" height="19"><font face="Verdana">
  463.     <input type="text" name="D5" size="11" disabled = "true"></font></td>
  464.   </tr>
  465.   <tr>
  466.     <td width="70%" height="19"><font face="Verdana" size="1">If there is one or 
  467.     more dormer on the roof, <u>facing the right side yard</u>, measure the 
  468.     length of the roof, from one side to the other, at its widest point*: 
  469.     otherwise type &quot;0&quot;</font></td>
  470.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  471.     <input type="text" name="D6" size="17" onBlur = "calculateAll()"></font></td>
  472.     <td width="53%" height="19">&nbsp;</td>
  473.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  474.   </tr>
  475.   <tr>
  476.     <td width="70%" height="19"><font face="Verdana" size="1">Measure the total 
  477.     exterior width of all dormers <u>facing the right side yard:</u></font></td>
  478.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  479.     <input type="text" name="D7" size="17" onBlur = "calculateAll()"></font></td>
  480.     <td width="53%" height="19">&nbsp;</td>
  481.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  482.   </tr>
  483.   <tr>
  484.     <td width="70%" height="19">&nbsp;</td>
  485.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  486.     <td width="53%" height="19">&nbsp;</td>
  487.     <td width="19%" bgcolor="#E3E0DB" height="19"><font face="Verdana">
  488.     <input type="text" name="D8" size="11" disabled = "true"></font></td>
  489.   </tr>
  490.   <tr>
  491.     <td width="70%" height="19"><font face="Verdana" size="1">If there is one or 
  492.     more dormer on the roof, <u>facing the left side yard</u>, measure the 
  493.     length of the roof, from one side to the other, at its widest point, 
  494.     otherwise type &quot;0&quot;</font></td>
  495.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  496.     <input type="text" name="D9" size="17" onBlur = "calculateAll()"></font></td>
  497.     <td width="53%" height="19">&nbsp;</td>
  498.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  499.   </tr>
  500.   <tr>
  501.     <td width="70%" height="19"><font face="Verdana" size="1">Measure the total 
  502.     exterior width of all dormers <u>facing the left side yard:</u></font></td>
  503.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  504.     <input type="text" name="D10" size="17" onBlur = "calculateAll()"></font></td>
  505.     <td width="53%" height="19">&nbsp;</td>
  506.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  507.   </tr>
  508.   <tr>
  509.     <td width="70%" height="19">&nbsp;</td>
  510.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  511.     <td width="53%" height="19">&nbsp;</td>
  512.     <td width="19%" bgcolor="#E3E0DB" height="19"><font face="Verdana">
  513.     <input type="text" name="D11" size="11" disabled = "true"></font></td>
  514.   </tr>
  515.   <tr>
  516.     <td width="70%" height="18"><font face="Verdana" size="1">If there is one or 
  517.     more dormer on the roof, <u>facing the rear yard</u>, measure the distance 
  518.     between the left side wall of the main house and the exterior left side wall 
  519.     of the leftmost dormer, otherwise type &quot;0&quot;</font></td>
  520.     <td width="22%" bgcolor="#FFFFCC" height="18"><font face="Verdana">
  521.     <input type="text" name="D12" size="17" onBlur = "calculateAll()"></font></td>
  522.     <td width="53%" height="18"></td>
  523.     <td width="19%" bgcolor="#E3E0DB" height="18">&nbsp;</td>
  524.   </tr>
  525.   <tr>
  526.     <td width="70%" height="19"><font face="Verdana" size="1">Measure the 
  527.     distance between the left side wall of the main house and the exterior left 
  528.     side wall of the leftmost dormer <u>facing the rear yard</u>:</font></td>
  529.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  530.     <input type="text" name="D13" size="17" onBlur = "calculateAll()"></font></td>
  531.     <td width="53%" height="19">&nbsp;</td>
  532.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  533.   </tr>
  534.   <tr>
  535.     <td width="70%" height="19"><font face="Verdana" size="1">Calculate the 
  536.     total area of the attic*:</font></td>
  537.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  538.     <input type="text" name="D14" size="17" onBlur = "calculateAll()"></font></td>
  539.     <td width="53%" height="19">&nbsp;</td>
  540.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  541.   </tr>
  542.   <tr>
  543.     <td width="70%" height="19"><font face="Verdana" size="1">Calculate the area 
  544.     of that part of the attic* where the distance between the floor and ceiling 
  545.     is less than 4 feet in height:</font></td>
  546.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  547.     <input type="text" name="D15" size="17" onBlur = "calculateAll()"></font></td>
  548.     <td width="53%" height="19">&nbsp;</td>
  549.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  550.   </tr>
  551.   <tr>
  552.     <td width="70%" height="17"><i><font face="Verdana" size="1">* Measure to 
  553.     the exterior of the outside walls. Exclude roof decks, balconies, or 
  554.     unenclosed porches/porticoes. Include enclosed porches/porticoes and all 
  555.     attic space above an attached garage. </font></i></td>
  556.     <td width="22%" bgcolor="#FFFFCC" height="17">&nbsp;</td>
  557.     <td width="53%" height="17"></td>
  558.     <td width="19%" bgcolor="#E3E0DB" height="17">&nbsp;</td>
  559.   </tr>
  560.   <tr>
  561.     <td width="70%" height="17">
  562.     <p align="right"><b><font face="Verdana" size="1">Floor Area of the attic:</font></b></td>
  563.     <td width="22%" bgcolor="#FFFFCC" height="17"><font face="Verdana" size="2">
  564.     ---------------&gt;</font></td>
  565.     <td width="53%" height="17"><font face="Verdana">
  566.     <input type="text" name="D16" size="17" disabled = "true"></font></td>
  567.     <td width="19%" bgcolor="#E3E0DB" height="17">&nbsp;</td>
  568.   </tr>
  569.   <tr>
  570.     <td width="70%" height="19">&nbsp;</td>
  571.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  572.     <td width="53%" height="19">&nbsp;</td>
  573.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  574.   </tr>
  575.   <tr>
  576.     <td width="70%" height="18"><font face="Verdana"><b>Part E. Gross Floor Area 
  577.     of all accessory structures except detached garages </b></font>
  578.     <font face="Verdana" size="1">(including cabanas, guest houses, caretaker's 
  579.     cottages, pool houses, sheds, barns, or other structures except a detached 
  580.     garage)</font></td>
  581.     <td width="22%" bgcolor="#FFFFCC" height="18">&nbsp;</td>
  582.     <td width="53%" height="18"></td>
  583.     <td width="19%" bgcolor="#E3E0DB" height="18">&nbsp;</td>
  584.   </tr>
  585.   <tr>
  586.     <td width="70%" height="19"><font face="Verdana" size="1">Calculate the 
  587.     total area of all floors of all structures on the property except for the 
  588.     main house and, if applicable, the detached garage:*</font></td>
  589.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  590.     <input type="text" name="E1" size="17" onBlur = "calculateAll()"></font></td>
  591.     <td width="53%" height="19">&nbsp;</td>
  592.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  593.   </tr>
  594.   <tr>
  595.     <td width="70%" height="19"><i><font face="Verdana" size="1">* Measure to 
  596.     the exterior of the outside walls. Exclude basements, cellars, attic space, 
  597.     garage space, decks, patios, balconies, or unenclosed porches/porticoes. 
  598.     Include all enclosed porches/porticoes. </font></i></td>
  599.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  600.     <td width="53%" height="19">&nbsp;</td>
  601.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  602.   </tr>
  603.   <tr>
  604.     <td width="70%" height="19">
  605.     <p align="right"><font face="Verdana" size="1"><b>Floor Area of all 
  606.     accessory structures except detached garages:</b></font></td>
  607.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana" size="2">
  608.     ---------------&gt;</font></td>
  609.     <td width="53%" height="19"><font face="Verdana">
  610.     <input type="text" name="E2" size="17" disabled = "true"></font></td>
  611.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  612.   </tr>
  613.   <tr>
  614.     <td width="70%" height="19">&nbsp;</td>
  615.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  616.     <td width="53%" height="19">&nbsp;</td>
  617.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  618.   </tr>
  619.   <tr>
  620.     <td width="70%" height="19"><font face="Verdana"><b>Part F. Gross Floor Area 
  621.     of the garage</b><font size="1"> (not including basement garages)</font></font></td>
  622.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  623.     <td width="53%" height="19">&nbsp;</td>
  624.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  625.   </tr>
  626.   <tr>
  627.     <td width="70%" height="19"><font face="Verdana" size="1">Do you have a 
  628.     detached garage?</font></td>
  629.     <td width="22%" bgcolor="#FFFFCC" height="19">
  630.     <p align="center"><select size="1" name="F0" onclick= "calculateAll()">
  631.     <option value="Yes" selected>Yes</option>
  632.     <option value="No">No</option>
  633.     </select></td>
  634.     <td width="53%" height="19">&nbsp;</td>
  635.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  636.   </tr>
  637.   <tr>
  638.     <td width="70%" height="19"><font face="Verdana" size="1">Do you have a 
  639.     attached garage?</font></td>
  640.     <td width="22%" bgcolor="#FFFFCC" height="19">
  641.     <p align="center"><select size="1" name="F1" onclick= "calculateAll()">
  642.     <option value="Yes">Yes</option>
  643.     <option value="No" selected>No</option>
  644.     </select></td>
  645.     <td width="53%" height="19">&nbsp;</td>
  646.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  647.   </tr>
  648.   <tr>
  649.     <td width="70%" height="19"><font face="Verdana" size="1">For the attached 
  650.     garage, calculate the total area of the attached garage:*</font></td>
  651.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  652.     <input type="text" name="F2" size="17" onBlur = "calculateAll()"></font></td>
  653.     <td width="53%" height="19">&nbsp;</td>
  654.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  655.   </tr>
  656.   <tr>
  657.     <td width="70%" height="19"><font face="Verdana" size="1">For the detached 
  658.     garage, calculate total area of the first floor:*</font></td>
  659.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  660.     <input type="text" name="F3" size="17" onBlur = "calculateAll()"></font></td>
  661.     <td width="53%" height="19">&nbsp;</td>
  662.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  663.   </tr>
  664.   <tr>
  665.     <td width="70%" height="20"><font face="Verdana" size="1">For the detached 
  666.     garage, calculate total area of the second floor:*</font></td>
  667.     <td width="22%" bgcolor="#FFFFCC" height="20"><font face="Verdana">
  668.     <input type="text" name="F4" size="17" onBlur = "calculateAll()"></font></td>
  669.     <td width="53%" height="20">&nbsp;</td>
  670.     <td width="19%" bgcolor="#E3E0DB" height="20">&nbsp;</td>
  671.   </tr>
  672.   <tr>
  673.     <td width="70%" height="19"><font face="Verdana" size="1">For the detached 
  674.     garage, calculate the total area of any additional floor(s), but not 
  675.     including basement, cellar, or attic space:*</font></td>
  676.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  677.     <input type="text" name="F5" size="17" onBlur = "calculateAll()"></font></td>
  678.     <td width="53%" height="19">&nbsp;</td>
  679.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  680.   </tr>
  681.   <tr>
  682.     <td width="70%" height="19"><font face="Verdana" size="1">For the detached 
  683.     garage, does any part of 
  684.     the garage attic have a floor-to-ceiling height equal to or greater than 4.0 
  685.     ft.?</font></td>
  686.     <td width="22%" bgcolor="#FFFFCC" height="19">
  687.     <p align="center"><select size="1" name="F6" onclick= "calculateAll()">
  688.     <option value="Yes">Yes</option>
  689.     <option value="No">No</option>
  690.     </select></td>
  691.     <td width="53%" height="19">&nbsp;</td>
  692.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  693.   </tr>
  694.   <tr>
  695.     <td width="70%" height="19"><font face="Verdana" size="1">For the detached 
  696.     garage, is there one or 
  697.     more dormer on the garage roof?</font></td>
  698.     <td width="22%" bgcolor="#FFFFCC" height="19">
  699.     <p align="center"><select size="1" name="F7" onclick= "calculateAll()">
  700.     <option value="Yes">Yes</option>
  701.     <option value="No">No</option>
  702.     </select></td>
  703.     <td width="53%" height="19">&nbsp;</td>
  704.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  705.   </tr>
  706.   <tr>
  707.     <td width="70%" height="19"><font face="Verdana" size="1">If there is one or 
  708.     more dormer on the detached garage roof, <u>facing the front yard</u>, measure the 
  709.     length of the roof, from one side to the other, at its widest point, 
  710.     otherwise type &quot;0&quot;</font></td>
  711.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  712.     <input type="text" name="F8" size="17" onBlur = "calculateAll()"></font></td>
  713.     <td width="53%" height="19">&nbsp;</td>
  714.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  715.   </tr>
  716.   <tr>
  717.     <td width="70%" height="19"><font face="Verdana" size="1">Measure the total 
  718.     exterior width of all detached garage roof dormers <u>facing the front yard:</u></font></td>
  719.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  720.     <input type="text" name="F9" size="17" onBlur = "calculateAll()"></font></td>
  721.     <td width="53%" height="19">&nbsp;</td>
  722.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  723.   </tr>
  724.   <tr>
  725.     <td width="70%" height="19">&nbsp;</td>
  726.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  727.     <td width="53%" height="19">&nbsp;</td>
  728.     <td width="19%" bgcolor="#E3E0DB" height="19"><font face="Verdana">
  729.     <input type="text" name="F10" size="11" disabled = "true"></font></td>
  730.   </tr>
  731.   <tr>
  732.     <td width="70%" height="19"><font face="Verdana" size="1">If there is one or 
  733.     more dormer on the detached garage roof, <u>facing the right side yard</u>, measure 
  734.     the length of the roof, from one side to the other, at its widest point**: 
  735.     otherwise type &quot;0&quot;</font></td>
  736.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  737.     <input type="text" name="F11" size="17" onBlur = "calculateAll()"></font></td>
  738.     <td width="53%" height="19">&nbsp;</td>
  739.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  740.   </tr>
  741.   <tr>
  742.     <td width="70%" height="19"><font face="Verdana" size="1">Measure the total 
  743.     exterior width of all detached garage roof dormers <u>facing the right side yard:</u></font></td>
  744.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  745.     <input type="text" name="F12" size="17" onBlur = "calculateAll()"></font></td>
  746.     <td width="53%" height="19">&nbsp;</td>
  747.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  748.   </tr>
  749.   <tr>
  750.     <td width="70%" height="19">&nbsp;</td>
  751.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  752.     <td width="53%" height="19">&nbsp;</td>
  753.     <td width="19%" bgcolor="#E3E0DB" height="19"><font face="Verdana">
  754.     <input type="text" name="F13" size="11" disabled = "true"></font></td>
  755.   </tr>
  756.   <tr>
  757.     <td width="70%" height="19"><font face="Verdana" size="1">If there is one or 
  758.     more dormer on the detached garage roof, <u>facing the left side yard</u>, measure 
  759.     the length of the roof, from one side to the other, at its widest point**, 
  760.     otherwise type &quot;0&quot;</font></td>
  761.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  762.     <input type="text" name="F14" size="17" onBlur = "calculateAll()"></font></td>
  763.     <td width="53%" height="19">&nbsp;</td>
  764.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  765.   </tr>
  766.   <tr>
  767.     <td width="70%" height="19"><font face="Verdana" size="1">Measure the total 
  768.     exterior width of all detached garage roof dormers <u>facing the left side yard:</u></font></td>
  769.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  770.     <input type="text" name="F15" size="17" onBlur = "calculateAll()"></font></td>
  771.     <td width="53%" height="19">&nbsp;</td>
  772.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  773.   </tr>
  774.   <tr>
  775.     <td width="70%" height="19">&nbsp;</td>
  776.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  777.     <td width="53%" height="19">&nbsp;</td>
  778.     <td width="19%" bgcolor="#E3E0DB" height="19"><font face="Verdana">
  779.     <input type="text" name="F16" size="11" disabled = "true"></font></td>
  780.   </tr>
  781.   <tr>
  782.     <td width="70%" height="18"><font face="Verdana" size="1">If there is one or 
  783.     more dormer on the detached garage roof, <u>facing the rear yard</u>, measure the 
  784.     distance between the left side wall of the main house and the exterior left 
  785.     side wall of the leftmost dormer, otherwise type &quot;0&quot;</font></td>
  786.     <td width="22%" bgcolor="#FFFFCC" height="18"><font face="Verdana">
  787.     <input type="text" name="F17" size="17" onBlur = "calculateAll()"></font></td>
  788.     <td width="53%" height="18"></td>
  789.     <td width="19%" bgcolor="#E3E0DB" height="18">&nbsp;</td>
  790.   </tr>
  791.   <tr>
  792.     <td width="70%" height="19"><font face="Verdana" size="1">Measure the 
  793.     distance between the left side wall of the detached garage and the exterior 
  794.     left side wall of the leftmost dormer <u>facing the rear yard</u>:</font></td>
  795.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  796.     <input type="text" name="F18" size="17" onBlur = "calculateAll()"></font></td>
  797.     <td width="53%" height="19">&nbsp;</td>
  798.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  799.   </tr>
  800.   <tr>
  801.     <td width="70%" height="19"><font face="Verdana" size="1">Calculate the 
  802.     total area of the detached garage attic*:</font></td>
  803.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  804.     <input type="text" name="F19" size="17" onBlur = "calculateAll()"></font></td>
  805.     <td width="53%" height="19">&nbsp;</td>
  806.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  807.   </tr>
  808.   <tr>
  809.     <td width="70%" height="19"><font face="Verdana" size="1">Calculate the area 
  810.     of that part of the detached garage attic** where the distance between the floor and ceiling 
  811.     is less than 4 feet in height:</font></td>
  812.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana">
  813.     <input type="text" name="F20" size="17" onBlur = "calculateAll()"></font></td>
  814.     <td width="53%" height="19">&nbsp;</td>
  815.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  816.   </tr>
  817.   <tr>
  818.     <td width="70%" height="17"><i><font face="Verdana" size="1">* Measure to 
  819.     the exterior of the outside walls. Exclude any floor space above the garage, 
  820.     as this floor area has already been counted elsewhere on this worksheet.</font></i></td>
  821.     <td width="22%" bgcolor="#FFFFCC" height="17">&nbsp;</td>
  822.     <td width="53%" height="17"></td>
  823.     <td width="19%" bgcolor="#E3E0DB" height="17">&nbsp;</td>
  824.   </tr>
  825.   <tr>
  826.     <td width="70%" height="17"><i><font face="Verdana" size="1">** Measure to 
  827.     the exterior of the outside walls. Exclude roof decks, balconies, or 
  828.     unenclosed porches/porticoes. Include enclosed porches/porticoes and all 
  829.     attic space above an attached garage. </font></i></td>
  830.     <td width="22%" bgcolor="#FFFFCC" height="17">&nbsp;</td>
  831.     <td width="53%" height="17"></td>
  832.     <td width="19%" bgcolor="#E3E0DB" height="17">&nbsp;</td>
  833.   </tr>
  834.   <tr>
  835.     <td width="70%" height="17">
  836.     <p align="right"><b><font face="Verdana" size="1">Floor Area of the detached 
  837.     garage attic</font></b></td>
  838.     <td width="22%" bgcolor="#FFFFCC" height="17"><font face="Verdana" size="2">
  839.     -----------------</font></td>
  840.     <td width="53%" height="17"><font face="Verdana" size="2">--------------&gt;</font></td>
  841.     <td width="19%" bgcolor="#E3E0DB" height="17"><font face="Verdana">
  842.     <input type="text" name="F21" size="11" disabled = "true"></font></td>
  843.   </tr>
  844.   <tr>
  845.     <td width="70%" height="19">&nbsp;</td>
  846.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  847.     <td width="53%" height="19">&nbsp;</td>
  848.     <td width="19%" bgcolor="#E3E0DB" height="19"><font face="Verdana">
  849.     <input type="text" name="F22" size="11" disabled = "true"></font></td>
  850.   </tr>
  851.   <tr>
  852.     <td width="70%" height="19">&nbsp;</td>
  853.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  854.     <td width="53%" height="19">&nbsp;</td>
  855.     <td width="19%" bgcolor="#E3E0DB" height="19"><font face="Verdana">
  856.     <input type="text" name="F23" size="11" disabled = "true"></font></td>
  857.   </tr>
  858.   <tr>
  859.     <td width="70%" height="19">&nbsp;</td>
  860.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  861.     <td width="53%" height="19">&nbsp;</td>
  862.     <td width="19%" bgcolor="#E3E0DB" height="19"><font face="Verdana">
  863.     <input type="text" name="F24" size="11" disabled = "true"></font></td>
  864.   </tr>
  865.   <tr>
  866.     <td width="70%" height="19">&nbsp;</td>
  867.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  868.     <td width="53%" height="19">&nbsp;</td>
  869.     <td width="19%" bgcolor="#E3E0DB" height="19"><font face="Verdana">
  870.     <input type="text" name="F25" size="11" disabled = "true"></font></td>
  871.   </tr>
  872.   <tr>
  873.     <td width="70%" height="19">
  874.     <p align="right"><b><font face="Verdana" size="1">Total  Floor Area of the garage(s)</font></b></td>
  875.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana" size="2">
  876.     ---------------&gt;</font></td>
  877.     <td width="53%" height="19"><font face="Verdana">
  878.     <input type="text" name="F26" size="17" disabled = "true"></font></td>
  879.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  880.   </tr>
  881.   <tr>
  882.     <td width="70%" height="19">&nbsp;</td>
  883.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  884.     <td width="53%" height="19">&nbsp;</td>
  885.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  886.   </tr>
  887.   <tr>
  888.     <td width="70%" height="19"><b><font face="Verdana">Part G: Total Floor Area</font></b></td>
  889.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  890.     <td width="53%" height="19">&nbsp;</td>
  891.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  892.   </tr>
  893.   <tr>
  894.     <td width="70%" height="19">
  895.     <p align="right"><b><font face="Verdana" size="1">Total Floor Area</font></b></td>
  896.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana" size="2">
  897.     ---------------&gt;</font></td>
  898.     <td width="53%" height="19"><font face="Verdana">
  899.     <input type="text" name="G1" size="17" disabled = "true"></font></td>
  900.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  901.   </tr>
  902.   <tr>
  903.     <td width="70%" height="19">
  904.     <p align="right"><b><font face="Verdana" size="1">Maximum Floor Area</font></b></td>
  905.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana" size="2">
  906.     ---------------&gt;</font></td>
  907.     <td width="53%" height="19"><font face="Verdana">
  908.     <input type="text" name="G2" size="17" disabled = "true"></font></td>
  909.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  910.   </tr>
  911.   <tr>
  912.     <td width="70%" height="19">
  913.     <p align="right"><b><font size="1" face="Verdana">Exceeded Maximum Floor 
  914.     Area?</font></b></td>
  915.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana" size="2">
  916.     ---------------&gt;</font></td>
  917.     <td width="53%" height="19"><font face="Verdana">
  918.     <input type="text" name="G3" size="17" disabled = "true"></font></td>
  919.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  920.   </tr>
  921.   <tr>
  922.     <td width="70%" height="19">
  923.     <p align="right"><b><font face="Verdana" size="1">Amount Exceeded</font></b></td>
  924.     <td width="22%" bgcolor="#FFFFCC" height="19"><font face="Verdana" size="2">
  925.     ---------------&gt;</font></td>
  926.     <td width="53%" height="19"><font face="Verdana">
  927.     <input type="text" name="G4" size="17" disabled = "true"></font></td>
  928.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  929.   </tr>
  930.   <tr>
  931.     <td width="70%" height="19">&nbsp;</td>
  932.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  933.     <td width="53%" height="19">&nbsp;</td>
  934.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  935.   </tr>
  936.   <tr>
  937.     <td width="70%" height="19">&nbsp;</td>
  938.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  939.     <td width="53%" height="19">&nbsp;</td>
  940.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  941.   </tr>
  942.   <tr>
  943.     <td width="70%" height="16"></td>
  944.     <td width="22%" bgcolor="#FFFFCC" height="16">&nbsp;</td>
  945.     <td width="53%" height="16"></td>
  946.     <td width="19%" bgcolor="#E3E0DB" height="16">&nbsp;</td>
  947.   </tr>
  948.   <tr>
  949.     <td width="70%" height="19">&nbsp;</td>
  950.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  951.     <td width="53%" height="19">&nbsp;</td>
  952.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  953.   </tr>
  954.   <tr>
  955.     <td width="70%" height="19">&nbsp;</td>
  956.     <td width="22%" bgcolor="#FFFFCC" height="19">&nbsp;</td>
  957.     <td width="53%" height="19">&nbsp;</td>
  958.     <td width="19%" bgcolor="#E3E0DB" height="19">&nbsp;</td>
  959.   </tr>
  960. </table>
  961. </form>
  962.  
  963. <p>_____________________________________________<br/>
  964. Signature of Owner and/or Signature of Licensed Architect, Engineer or 
  965. Surveyor<p/>
  966. __________<br/>
  967. Date
  968. </p>
  969. </body>
  970.  
  971. </html>
I have also attached the html file as a .txt file for reference.

The problem im having is as follows:

When entering certain values into the form which are as follows:
--------------------------------------------------------------------------------------------------------
Part A: Maximum FAR and Floor Area: (Values Used)

Enter total lot Area: (43995)
*Enter the required right side yard setback: (20)
*Enter the proposed right side yard setback: (42.7)
*Enter the required left side yard setback: (20)
*Enter the proposed left side yard setback: (47.1)
--------------------------------------------------------------------------------------------------------
Part B: Gross Floor Area of the main floors of the main house: (Values Used)

Calculate the total area of all those interior parts of the house with a floor-to-ceiling height greater then 14.0 ft: (264)
*Calculate the total area of the first floor: (4227)
*Calculate the total area of the second floor: (3536)
*Calculate the total area of any additional floor(s), but not including basement, cellar, or attic space: (0)
--------------------------------------------------------------------------------------------------------
Part C: Gross Floor Area of the basement or cellar: (Values Used)

*Measure the height of the tallest exposed basement or cellar wall: (If this number is less then 3.0, this section will not be included in the calculations) (0)
--------------------------------------------------------------------------------------------------------
Part D: Gross Floor Area of the attic: (Values Used)

Does any part of the attic have a floor-to-ceiling height equal to or greater than 4.0 ft.? ---- (YES)

Is there one or more dormer on the roof? ---- (YES)

If there is one or more dormer on the roof, facing the front yard, measure the length of the roof, from one side to the other, at its widest point*, otherwise type "0" ---- (26)

Measure the total exterior width of all dormers facing the front yard: ---- (4)

If there is one or more dormer on the roof, facing the right side yard, measure the length of the roof, from one side to the other, at its widest point*: otherwise type "0" ---- (46.5)

Measure the total exterior width of all dormers facing the right side yard: ---- (12)

If there is one or more dormer on the roof, facing the left side yard, measure the length of the roof, from one side to the other, at its widest point, otherwise type "0" ---- (0)

Measure the total exterior width of all dormers facing the left side yard: ---- (0)

If there is one or more dormer on the roof, facing the rear yard, measure the distance between the left side wall of the main house and the exterior left side wall of the leftmost dormer, otherwise type "0" ---- (15.5)

Measure the distance between the left side wall of the main house and the exterior left side wall of the leftmost dormer facing the rear yard: ----- (6)
--------------------------------------------------------------------------------------------------------
Part E. (NO VALUES ENTERED)
--------------------------------------------------------------------------------------------------------

Part F. Gross Floor Area of the garage: (Values Used)

Do you have a detached garage? --- (NO)

Do you have a attached garage? ---- (YES)

For the attached garage, calculate the total area of the attached garage:* - (894)

For the detached garage, calculate total area of the first floor:* ---- (0)

For the detached garage, calculate total area of the second floor:* ---- (0)

For the detached garage, calculate the total area of any additional floor(s), but not including basement, cellar, or attic space:* ---- (0)

For the detached garage, does any part of the garage attic have a floor-to-ceiling height equal to or greater than 4.0 ft.? ---- (NO)

For the detached garage, is there one or more dormer on the garage roof? (YES)

If there is one or more dormer on the detached garage roof, facing the front yard, measure the length of the roof, from one side to the other, at its widest point, otherwise type "0" ---- (N/A to this property)

Measure the total exterior width of all detached garage roof dormers facing the front yard: ---- (N/A to this property)

If there is one or more dormer on the detached garage roof, facing the right side yard, measure the length of the roof, from one side to the other, at its widest point**: otherwise type "0"---- (N/A to this property)

--------------------------------------------------------------------------------------------------------

Results in Part G using the values supplied is as Follows:

In Part G: Total Floor Area:

Total Floor Area ---------------> (NaN)

Maximum Floor Area ---------------> (7997.23)

Exceeded Maximum Floor Area? ---------------> (YES

Amount Exceeded --------------> (NaN)

--------------------------------------------------------------------------------------------------------

Why is it showing NaN values? Any help would be greatly appreciated.

Thank You.
Attached Files
File Type: txt far.txt (66.7 KB, 444 views)
Aug 4 '09 #1
9 2389
gits
5,390 Expert Mod 4TB
wooooh ... that's a bunch of lines :) ... for the Total Floor Area i think it is the input-field named F26 which is set at line 651 of your javascript ... could you trace the processed values? you could alert them there ... typically that is an issue with the fields input-values ... for example:

Expand|Select|Wrap|Line Numbers
  1. isNaN('1.2') // --> false because it is a number
  2. isNaN('1,2') // --> true because it is not a number
  3.  
so you need to ensure that the values are correctly parseable as numbers ... in your validation for example.

this even might go for empty-values (i didn't go through your entire code because of that many lines ... perhaps you find out some specific lines?), that sometimes is implicitly parsed as 0 but some functions need it already parsed/replaced with a real number 0 ... so when you use math-functions you always need to sure that you are working with numbers.

kind regards
Aug 6 '09 #2
Catalyst159
111 100+
Hey Gits,

Can I call you Gits? Thanks for helping me out on this. I really appreciate any insight or help.

You can call me Catalyst if you want or my name is Nick.

I see you are from Germany, good soccer over there. I am a big soccer fan.

Well I was looking at it again and I think the problem has to do with how G1 is being calculated.

G1 (Total Floor Area) is calculated with the following:

Expand|Select|Wrap|Line Numbers
  1.  
  2. entireForm.G1.value = roundTwo(Number(entireForm.B6.value) + Number(entireForm.C4.value) + Number(entireForm.D16.value) + Number(entireForm.E2.value) + Number(entireForm.F26.value))
  3.  
  4.  
If I go ahead and plug in the values it would be:

G1 = (8291) + (0) + (N/A to this property) + (BLANK) + (494)

I think the problem has to do with the D16 value in the equation. The D16 is represented by (N/A to this property).

(N/A to this property) is not a number so how can it be used in the calculation. I think this is why we are getting the NaN.

Please let me know what you think ? Or if you have any ideas.

Regards,

Catalyst
Aug 6 '09 #3
gits
5,390 Expert Mod 4TB
when that is the case and it seems so then you might use the following:

Expand|Select|Wrap|Line Numbers
  1. var d16val = isNaN(entireForm.D16.value) ? 
  2.     0 : entireForm.D16.value;
  3.  
  4. entireForm.G1.value = roundTwo(Number(entireForm.B6.value) 
  5.     + Number(entireForm.C4.value) 
  6.     + Number(d16val) 
  7.     + Number(entireForm.E2.value) 
  8.     + Number(entireForm.F26.value));
kind regards
Aug 6 '09 #4
Catalyst159
111 100+
So you think this should work? I am a little confused with this part:

Expand|Select|Wrap|Line Numbers
  1.  
  2. var d16val = isNaN(entireForm.D16.value) ?  
  3.     0 : entireForm.D16.value;
  4.  
  5.  

What is the "?" doing here ? How can I interpret this ?
I am not the most familiar with JS.

Thanks.

Regards,

Catalyst
Aug 6 '09 #5
gits
5,390 Expert Mod 4TB
not at all ... you might have noticed that d16val is then used in the equation. the construct is the so called ternary operator and is an equivalent for the following:

Expand|Select|Wrap|Line Numbers
  1. if (isNaN(entireForm.D16.value)) {
  2.     var d16val = 0;
  3. } else {
  4.     d16val = entireForm.D16.value;
  5. }
but shorter and therefor to prefer :)

kind regards
Aug 6 '09 #6
Catalyst159
111 100+
So the if statement is the equivalent to what you stated before?

I see you replied "not at all". So you dont think this will work then ?
Aug 6 '09 #7
gits
5,390 Expert Mod 4TB
1. yes
2. of course it will work when you use what i showed in post #4 -> i said 'not at all' since you only quoted the half of that what i showed there

kind regards
Aug 6 '09 #8
Catalyst159
111 100+
O I see what you are saying. I am going to have to try it. Thank you very much for all the help and insight. This is good stuff.
Aug 6 '09 #9
gits
5,390 Expert Mod 4TB
post back in case you have more problems with it :)
Aug 6 '09 #10

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

9 posts views Thread by Ken | last post: by
17 posts views Thread by John Hunter | last post: by
22 posts views Thread by John | last post: by
2 posts views Thread by TamaThps | last post: by
reply views Thread by Saiars | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.