// This file contains intellectual property and artistic creations 
// by Dennis Sandow and is copyright 2000-2010 by the author. 
// For use only on websites maintained by Dennis Sandow, or with
// specific permission.  Do not remove this notice.

var demoStr='', pistons=new Array();

function pistStore( pName, pTitle, pFootnote, pSort, pTowns, pDataCols ){
  pColsA = new Array();pColsA = pDataCols.replace(/ /g,'').split(',');
  for (xx=0; xx<pColsA.length; xx++) {
    lookupOK=false;
    for(xy=0; xy<document.forms.FZ.length; xy++){
      if ( document.forms.FZ[xy].name == 'ckbx'+pColsA[xx] ) {lookupOK=true; break;};
    };
    if (!lookupOK) return '';
  };
  if ( typeof pTowns == 'string' && pTowns.indexOf(',') >=0 ) {
    testtwns = new Array();testtwns = pTowns.split(',');
    testAtwns = new Array()
    for (argm=0; argm<testtwns.length; argm++ ) {
      testAtwns[testtwns[argm]]=true;
    }
  } else testAtwns = pTowns;
  pistons[pName] = new Array(pTitle, pFootnote, pSort, testAtwns, pColsA)
 return '__<a href="javascript:DoIt(\''+pName+'\')">'+pName.replace(/ /g,HS)+'</a>__ '
};

function makeDemoLinks(){
  stdYear = 7; y2 = Yr2(stdYear); yr2StdMinus1=Yr2(stdYear-1)
  demoStr = ''+

pistStore('Population Density',
 'Population Density ranked',
 '',
 'PopPerSqmi'+yr2StdMinus1,
 'Alltowns',
 'ValSqMi,ValPctLandArea,ValPopu'+yr2StdMinus1+',ValPopPerSqmi'+yr2StdMinus1
)+

pistStore('Is Long Hill Rural (Assessment Density)?',
'2007 Equalized Valuation per Square Mile',
'About 48% of Long Hill land is public parkland.  This dilutes the (equalized) assessment per square mile by about 1/2.  Without our federal, state and county parks, the Long Hill assessment density would compare to Chatham Twp or Bernards.<p>The other low assessment-density towns (Bernardsville, Harding, Mendham Twp.) are notorious for large-lot zoning. The high assessment-density towns are physically small and intensely commercial and truly suburban.<p> I don\'t understand why Morris Twp. is so high.',
'EqVllPerSqmi07',
12,
'ValSqMi, ValNJTEqAssess07, ValEqVllPerSqmi07'
)+

pistStore('School tax increases (K-8 + RHS only)',
'Increase in Local School Taxes for K-8 + RHS Districts  SUBSTYRS',
'This report ranks the 8 year % increases in LOCAL school tax, and also shows the increase in high school and total school taxes._ "Per Capita" values are used to account for dramatic increases in population, and (implicitly) school enrollment.<p>Note that RHS increases tend to be higher than K-8 increases, and that drags the total school tax increase upward._ Be aware that the allocation of RHS tax burden among the member towns is based on K-8 enrollment, HS enrollment and equalized assessment in preceding years, with different lags.<p>Green Brook is included._ It is not a member of WHRHS and is not taxed by WHRHS._ Green Brook has a K-12 district, which taxes for all students, then pays per-student tuition to WHRHS._ The very high growth in taxes may be due to extensive residential construction and a corresponding increase in enrollment.',
'PctChgLocalSchlTaxPerPop',
'Chester Bor,Chester Twp,Denville,East Hanover,Florham Park,Green Brook,Hanover,Long Hill,Mendham Bor,Mendham Twp,Netcong,Rockaway Bor,Rockaway Twp,Warren Twp,Washington,Watchung,Wharton',
'ValDFG, ValSchType, ValLocalSchlTaxPerPop00, ValLocalSchlTaxPerPop07, PctChgValLocalSchlTaxPerPop, ValRegSchlTaxPerPop00, ValRegSchlTaxPerPop07, PctChgValRegSchlTaxPerPop, ValSchTaxPerPop00, ValSchTaxPerPop07, PctChgValSchTaxPerPop')+

pistStore('Muni Tax per Res since 2000',
 'Normalized MUNICIPAL tax per resident in Long Hill and 12 nearby towns, sorted by percent increase from SUBSTYRS',
 'This is the annual operating tax levy only, and EXCLUDES additional municipal taxes such as Open Space, fire, sewer, etc.'+
 '<p><b>"Normalized"</b> means that we take into account the fact that if 80% of the assessments are residential, then the homeowners and landlords only pay 80% of the taxes._ For per-capita comparisons, these calculations are based only on the proportion of the MUNICIPAL tax levy that is collected from residences and apartment houses.'+
  '<p>Note that since 2000, Long Hill\'s <b>MUNICIPAL OPERATING tax per person</b> has increased more than most of our neighbors' + 
  '<p>Also note only two towns have a higher <b>MUNICIPAL tax per per person</b> than Long Hill.'+
  '<p>Note the columns marked <b>"Muni Taxes as % of Total"</b>._ A higher number means that the municipality takes more, and the school and county take less of the tax dollar._ (Long Hill has the second highest percentage on the list.)'+
  '<p>If the "% Muni Taxes" DECREASED between 2000 and 20'+y2+', it means the school taxes grew faster than the Municipal taxes._  If the "% Muni Taxes" INCREASED between 2000 and 20'+y2+', it means the municipal taxes grew faster than the school taxes._ Once again, Long Hill is out in front._ Since 2000, the Township has taken an additional 1.3 cents of every tax dollar._ That 1.3 cents offsets the 0.5 cents given up by the School District, and 0.9 cents given up by the county, both of which increased their tax levies at a slower rate.'+
  '<p>Finally, note that among our neighbors, we have the second lowest <b>Median Household Income</b>, and the lowest percent of <b>College Graduates</b> (both from the 2000 Census)._ Draw your own conclusions.',
 'PctChgNrmMuniTaxPerPop',
 12,
 'ValMedIncome,ValCollGrad,ValPctRes'+y2+',ValNrmMuniTaxPerPop00, ValNrmMuniTaxPerPop'+y2+',PctChgValNrmMuniTaxPerPop,ValPctMuni00,ValPctMuni'+y2+',ChgVvlValPctMuni'
)+

pistStore('Muni Tax per Res 2005-20'+y2,
  'Normalized MUNICIPAL tax per resident in Long Hill and 12 nearby towns, sorted by percent increase from SUBSTYRS',
  'This is the annual operating tax levy only, and EXCLUDES additional municipal taxes such as Open Space, fire, sewer, etc.'+
    '<p><b>"Normalized"</b> means that we take into account the fact that if 80% of the assessments are residential, then the homeowners and landlords only pay 80% of the taxes._ For per-capita comparisons, these calculations are based only on the proportion of the MUNICIPAL tax levy that is collected from residences and apartment houses.'+
    '<p>Note that since 2005, Long Hill\'s <b>MUNICIPAL OPERATING tax per person</b> has increased LESS than most of our neighbors' + 
    '<p>But note that in spite of the conservative growth, Long Hill still has the third highest <b>MUNICIPAL tax per person</b> (Behind only Harding and Mendham Twp.)'+
    '<p>Note the columns marked <b>"Muni Taxes as % of Total"</b>._ A higher number means that the municipality takes more, and the school and county take less of the tax dollar._ (Long Hill has the second highest percentage on the list.)'+
    '<p>If the "% Muni Taxes" DECREASED between 2005 and 20'+y2+', it means the school taxes grew faster than the Municipal taxes._  If the "% Muni Taxes" INCREASED between 2005 and 20'+y2+', it means the municipal taxes grew faster than the school taxes._ Long Hill has done well the past few years._ Since 2005, the Township has "given back" 0.7 cents of every tax dollar._ That 0.7 cents was absorbed by higher tavy levy shares of the School Districts (0.6 cents) and county (0.1 cent).',
  'PctChgNrmMuniTaxPerPop',
  12,
  'ValPctRes'+y2+',ValNrmMuniTaxPerPop05,ValNrmMuniTaxPerPop'+y2+ ',RkNrmMuniTaxPerPop'+y2+',PctChgValNrmMuniTaxPerPop,ValPctMuni05,ValPctMuni'+y2+ ',ChgVvlValPctMuni'
)+

pistStore('Muni Taxes in the upscale towns',
'Municipal Taxes as a % share of Total Taxes for wealthier towns.',
'This report lists only towns in DFG "I" and "J", the highest socio-economic classifications for state school aid._ (Mouseover the column heading for "School DFG" for more information.)_ Towns with lower DFGs receive more state school aid, which reduces their school tax levy and (<i>by subtraction</i>) increases the county and municipal shares of the total tax levy.<p>So, after we restrict this list to only the wealthier communities, is there a pattern?_  It would be convenient to hypothesize that a certain minimal set of municipal functions are required, even for small towns, and so smaller towns should be "less efficient" and thus have a higher municipal tax (as a percent of the whole tax bill.)<p><b>But that is not the case.</b>_ Mountain Lakes and Washington Twp  have nearly identical percentages, even though Mountain Lakes is very small in population and land, while Washington Twp. is the largest in land, and among the largest in population._ And BOTH devote 16.6% of their tax bill to municipal functions, compared to 27.6% in Long Hill._ The variability in the first two columns, compared to the sorted (pink) muni tax ranking, defies orderly correlation.',
'PctMuni07',
'DFGIJ',
'ValSqMi, ValPopu06, ValPctCnty07, RkPctCnty07, ValPctMuni07, RkPctMuni07, ValDFG, ValPctSch07, RkPctSch07'
)+

pistStore('Muni Taxes in the upscale towns (2)',
'Municipal Taxes as a % share of Total Taxes for wealthier towns - Part 2',
'This is the same as the previous report (which you should understand before proceeding to this one.)_ The county and school tax columns are omitted, and columns are added for total per capita taxation, "Residents per police officer" ("Pop per cop"), and Average Crime Rate.<p>Again, we restrict this list to only the wealthier communities (DFG "I/J")._ However, we <b>omit obvious outlier towns</b> as follows:<ul><li>Towns with intense commercial shopping where the police force and crime rate are inflated by shoplifting, credit card fraud, etc. Route 22/10/24 (Watchung, Green Brook, Morris Plains, Chester Boro), Rockaway Twp (Mall), Summit (downtown))<li>Towns with property taxes greater than $5000 per capita normalized._ Presumably the voters are satisfied at this level of taxation and services, and choose not to overhaul their governing bodies to lower taxes. (Mountain Lakes, Mendham Twp., and Harding).</ul><b>All Taxes per Capita</b> is a measure of the residents\' willingness to pay for services._ There is no apparent correlation. between per capita property taxes and the percentage of taxes that support the municipal government.<p><b>Pop per Cop</b> has more correlation._  Note that towns which dedicate a smaller percentage of their per capita tax dollar to muni services, <u>tend</u> to have MORE residents per officer (or FEWER officers per resident.) (Only Boonton Twp. has a lower ratio than Long Hill - probably a result of its smaller population.)  And police costs are the largest single component of the muni operating budget.<p>Most of these towns deliver <b>crime rates</b> (8 year average) below 10, regardless of the "pop/cop" ratio.',
'PctMuni07',
'Berkeley Heights,Bernards Twp,Bernardsville,Boonton Twp,Chatham Bor,Chatham Twp,Chester Twp,Denville,Florham Park,Kinnelon,Long Hill,Madison,Mendham Bor,Montville,Morris Twp,New Providence,Randolph,Warren Twp,Washington',
'ValSqMi, ValPopu06, ValPctMuni07, RkPctMuni07, ValNrmTotTaxPerPop07, ValNrmResPerPolice07, ValCrimeRate00, ValCrimeRate07, AvggValCrimeRate, SuppressValCrimeRate'
)+

pistStore('Muni Taxes in the upscale towns, sorted by pop/cop',
'Residents per Police Officer for wealthier towns',
'This is the same as the previous report but sorted by "Normalized Residents per Police Officer".<p>Again note that there is no correlation between % Muni Taxes, Total taxes per capita, and Pop per cop, and that most crime rates are below 10, regardless of pop per cop. ',
'NrmResPerPolice07',
'Berkeley Heights,Bernards Twp,Bernardsville,Boonton Twp,Chatham Bor,Chatham Twp,Chester Twp,Denville,Florham Park,Kinnelon,Long Hill,Madison,Mendham Bor,Montville,Morris Twp,New Providence,Randolph,Warren Twp,Washington',
'ValSqMi, ValPopu06, ValPctMuni07, ValNrmTotTaxPerPop07, ValNrmResPerPolice07, RkNrmResPerPolice07, ValCrimeRate00, ValCrimeRate07, AvggValCrimeRate, SuppressValCrimeRate'
)+

'</td></tr>';
  document.write( '<table border=0 cellpadding=0 cellspacing=0>'+
    '<tr valign=top><td align="center" class="v10">'+
    ('<b>Sample Reports:</b>__ '+demoStr ).replace(/_/g,HS)+
    '</td></tr></table>');
};  

