////==(v1): Lumped Approach:
////
////TAX-NUMBERS:   0          1      2       3      4         5       6      7         8       9        10       11     12      13      14       15     16      COND-DEMONY
//TaxNames      =["State-NY","4.75","4.625","4.50","4.375-c","4.375","4.25","4.125-c","4.125","4.00-c","3.75-c","3.75","3.375","3.125","3.00-c","3.00","4.00"]; //COND-DEMONY
//TaxRates      =[0.0400   ,0.0475,0.04625,0.0450,0.04375  ,0.04375,0.0425,0.04125  ,0.04125,0.0400  ,0.0375  ,0.0375,0.03375,0.03125,0.0300  ,0.0300,0.0400 ]; //COND-DEMONY
//TaxesByID     ={c:[1,2,3,5,6,8,10,12,13,14,16]};  //product-IDs c* are exempt from State-tax and some others, those with -c in name                           COND-DEMONY
//TaxesByRegion =[[],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10],[0,11],[0,12],[0,13],[0,14],[0,15],[0,16]];//Reg#1 gets Tax0+1, #2 gets 0+2...COND-DEMONY
//RegionTable   =[                                                                                                                        //    COND-DEMONY
//  "<tt>0.00    </tt>outside of New York State",                                                                                         //00  COND-DEMONY
//  "<tt>4.75    </tt>Erie County, Oneida County, Rome (city), Utica (city)",                                                             //01  COND-DEMONY
//  "<tt>4.625   </tt>Nassau County, Suffolk County",                                                                                     //02  COND-DEMONY
//  "<tt>4.50    </tt>Allegany County",                                                                                                   //03  COND-DEMONY
//  "<tt>4.375-c </tt>New York City",                                                                                                     //04  COND-DEMONY
//  "<tt>4.375   </tt>Mount Vernon (city), New Rochelle (city), Putnam County, Rockland County, Yonkers (city)",                          //05  COND-DEMONY
//  "<tt>4.25    </tt>Herkimer County",                                                                                                   //06  COND-DEMONY
//  "<tt>4.125-c </tt>Dutchess County",                                                                                                   //07  COND-DEMONY
//  "<tt>4.125   </tt>Orange County, White Plains (city)",                                                                                //08  COND-DEMONY
//  "<tt>4.00-c  </tt>Broome County, Chenango County, Columbia County, Delaware County, Greene County, Madison County (NOT INCLUDING Oneida), Norwich (city), Schuyler County, Tioga County, Wayne County",  //09  COND-DEMONY
//  "<tt>3.75-c  </tt>Chautauqua County",                                                                                                 //10  COND-DEMONY
//  "<tt>3.75    </tt>Essex County, Jefferson County, Lewis County",                                                                      //11  COND-DEMONY
//  "<tt>3.375   </tt>Westchester County (NOT INCLUDING Mount Vernon, New Rochelle, White Plains, Yonkers)",                              //12  COND-DEMONY
//  "<tt>3.125   </tt>Ontario County",                                                                                                    //13  COND-DEMONY
//  "<tt>3.00-c  </tt>Hamilton County",                                                                                                   //14  COND-DEMONY
//  "<tt>3.00    </tt>Glens Falls (city), Saratoga County, Saratoga Springs (city), St.Lawrence County, Warren County, Washington County",//15  COND-DEMONY
//  "<tt>4.00    </tt>elsewhere within New York State"                                                                                    //16  AKA "Albany County, Auburn (city), Cattaraugus County, Cayuga County, Chemung County, Clinton County, Corning (city), Cortland County, Franklin County, Fulton County, Genesee County, Gloversville (city), Hornell (city), Ithaca (city), Johnstown (city), Livingston County, Monroe County, Montgomery County, Niagara County, Olean (city), Oneida (city), Onondaga County, Orleans County, Oswego (city), Oswego County, Otsego County, Rensselaer County, Salamanca (city), Schenectady County, Schoharie County, Seneca County, Steuben County, Sullivan County, Tompkins County, Ulster County, Wyoming County, Yates County"   COND-DEMONY
//];                                                                                                                                      //    COND-DEMONY
//RegionFromZone=[[1,0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],[0],[0]];          //Zone#0 can be Region0..16;  Zone#1/2 implies Region0          COND-DEMONY


//==(v2): Separate Entry For Each City/County Jurisdiction:
TaxInfo = [                                     //TaxInfo table of [Name, TaxRate, ClothingExemption] entries will be converted into the nopERcart options below
["outside of NewYorkState",     0.00,   ],
["AlbanyCounty",                4.00,   ],
["AlleganyCounty",              4.50,   ],
["Auburn(city)",                4.00,   ],
["BroomeCounty",                4.00,   true],
["CattaraugusCounty",           4.00,   ],
["CayugaCounty",                4.00,   ],
["ChautauquaCounty",            3.75,   true],
["ChemungCounty",               4.00,   ],
["ChenangoCounty",              4.00,   true],
["ClintonCounty",               4.00,   ],
["ColumbiaCounty",              4.00,   true],
["Corning(city)",               4.00,   ],
["CortlandCounty",              4.00,   ],
["DelawareCounty",              4.00,   true],
["DutchessCounty",              4.125,  true],
["ErieCounty",                  4.75,   ],
["EssexCounty",                 3.75,   ],
["FranklinCounty",              4.00,   ],
["FultonCounty",                4.00,   ],
["GeneseeCounty",               4.00,   ],
["GlensFalls(city)",            3.00,   ],
["Gloversville(city)",          4.00,   ],
["GreeneCounty",                4.00,   true],
["HamiltonCounty",              3.00,   true],
["HerkimerCounty",              4.25,   ],
["Hornell(city)",               4.00,   ],
["Ithaca(city)",                4.00,   ],
["JeffersonCounty",             3.75,   ],
["Johnstown(city)",             4.00,   ],
["LewisCounty",                 3.75,   ],
["LivingstonCounty",            4.00,   ],
["MadisonCounty<br>(NOT INCLUDING Oneida)",     4.00,   true],
["MonroeCounty",                4.00,   ],
["MontgomeryCounty",            4.00,   ],
["MountVernon(city)",           4.375,  ],
["NassauCounty",                4.625,  ],
["NewRochelle(city)",           4.375,  ],
["NewYorkCity",                 4.375,  true],
["NiagaraCounty",               4.00,   ],
["Norwich(city)",               4.00,   true],
["Olean(city)",                 4.00,   ],
["Oneida(city)",                4.00,   ],
["OneidaCounty",                4.75,   ],
["OnondagaCounty",              4.00,   ],
["OntarioCounty",               3.125,  ],
["OrangeCounty",                4.125,  ],
["OrleansCounty",               4.00,   ],
["Oswego(city)",                4.00,   ],
["OswegoCounty",                4.00,   ],
["OtsegoCounty",                4.00,   ],
["PutnamCounty",                4.375,  ],
["RensselaerCounty",            4.00,   ],
["RocklandCounty",              4.375,  ],
["Rome(city)",                  4.75,   ],
["Salamanca(city)",             4.00,   ],
["SaratogaCounty",              3.00,   ],
["SaratogaSprings(city)",       3.00,   ],
["SchenectadyCounty",           4.00,   ],
["SchoharieCounty",             4.00,   ],
["SchuylerCounty",              4.00,   true],
["SenecaCounty",                4.00,   ],
["St.LawrenceCounty",           3.00,   ],
["SteubenCounty",               4.00,   ],
["SuffolkCounty",               4.625,  ],
["SullivanCounty",              4.00,   ],
["TiogaCounty",                 4.00,   true],
["TompkinsCounty",              4.00,   ],
["UlsterCounty",                4.00,   ],
["Utica(city)",                 4.75,   ],
["WarrenCounty",                3.00,   ],
["WashingtonCounty",            3.00,   ],
["WayneCounty",                 4.00,   true],
["WestchesterCounty<br>(NOT INCLUDING MountVernon, NewRochelle, WhitePlains, Yonkers)", 3.375,  ],
["WhitePlains(city)",           4.125,  ],
["WyomingCounty",               4.00,   ],
["YatesCounty",                 4.00,   ],
["Yonkers(city)",               4.375,  ]
];
//
//==javascript code that converts the TaxInfo table into the nopercart-options;
TaxNames        =[ "State-NY" ];
TaxRates        =[ 0.0400 ];
TaxesByID       ={ c:[] };
TaxesByRegion   =[ [] ];
RegionTable     =[ "outside of NewYorkState" ];
RegionFromZone  =[ [1], [0], [0], [0] ];                                //note: assumes 4 Zones, #0 being NY-state, #1 other-state, #1 and #2 being outside-of-USA
for(T=1;T<TaxInfo.length;++T){                                          //skipping entry#0...
   Nm=TaxInfo[T][0];
   Ra=TaxInfo[T][1];
   Cl=TaxInfo[T][2];
   nm=Nm;  if(X=Nm.indexOf("<br>(NOT"), X!=-1) nm=Nm.substring(0,X);    //short-name (nm) gets long-name (Nm) less any "(NOT INCLUDING..."
   TaxNames[T]=nm;                                                      //use short-name for TaxName
   TaxRates[T]=Ra/100;
   if(!Cl) TaxesByID.c.push(T);
   TaxesByRegion[T]=[0,T];
   RegionTable[T]=Nm;                                                   //use long-name for RegionName
   if(T>=2) RegionFromZone[0][T-1]=T;                                   //skipping entry#0+1
}
