////==(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 New York State",     0.00,   ],
["Don't Know;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(This selection<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adds a service fee<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to your total.)",                 7.00,   ],
["Albany County",                4.00,   ],
["Allegany County",              4.50,   ],
["Broome County",                4.00,   true],
["Cattaraugus County<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Except 2 cities)",           4.00,   ],
["--Olean(city)",                 4.00,   ],
["--Salamanca(city)",             4.00,   ],
["Cayuga County<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Except 1 city)",                4.00,   ],
["--Auburn(city)",                4.00,   ],
["Chautauqua County",            3.75,   true],
["Chemung County",               4.00,   ],
["Chenango County<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Except 1 city)",              4.00,   true],
["--Norwich(city)",               4.00,   true],
["Clinton County",               4.00,   ],
["Columbia County",              4.00,   true],
["Cortland County",              4.00,   ],
["Delaware County",              4.00,   true],
["Dutchess County",              4.125,  true],
["Erie County",                  4.75,   ],
["Essex County",                 3.75,   ],
["Franklin County",              4.00,   ],
["Fulton County<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Except 2 cities)",                4.00,   ],
["--Gloversville(city)",          4.00,   ],
["--Johnstown(city)",             4.00,   ],
["Genesee County",               4.00,   ],
["Greene County",                4.00,   true],
["Hamilton County",              3.00,   true],
["Herkimer County",              4.25,   ],
["Jefferson County",             3.75,   ],
["Lewis County",                 3.75,   ],
["Livingston County",            4.00,   ],
["Madison County<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Except 1 city)",     4.00,   true],
["--Oneida(city)",                4.00,   ],
["Monroe County",                4.00,   ],
["Montgomery County",            4.00,   ],
["Nassau County",                4.625,  ],
["New York City",                 4.375,  true],
["Niagara County",               4.00,   ],
["Oneida County<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Except 3 cities)",                4.75,   ],
["--Rome(city)",                  4.75,   ],
["--Sherrill(city)",             3.75,   ],
["--Utica(city)",                 4.75,   ],
["Onondaga County",              4.00,   ],
["Ontario County",               3.125,  ],
["Orange County",                4.125,  ],
["Orleans County",               4.00,   ],
["Oswego County<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Except 1 city)",                4.00,   ],
["--Oswego(city)",                4.00,   ],
["Otsego County",                4.00,   ],
["Putnam County",                4.375,  ],
["Rensselaer County",            4.00,   ],
["Rockland County",              4.375,  ],
["Saratoga County<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Except 1 city)",              3.00,   ],
["--Saratoga Springs(city)",       3.00,   ],
["Schenectady County",           4.00,   ],
["Schoharie County",             4.00,   ],
["Schuyler County",              4.00,   true],
["Seneca County",                4.00,   ],
["St.Lawrence County",           3.00,   ],
["Steuben County<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Except 2 cities)",               4.00,   ],
["--Corning(city)",               4.00,   ],
["--Hornell(city)",               4.00,   ],
["Suffolk County",               4.625,  ],
["Sullivan County",              4.00,   ],
["Tioga County",                 4.00,   true],
["Tompkins County<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Except 1 city)",              4.00,   ],
["--Ithaca(city)",                4.00,   ],
["Ulster County",                4.00,   ],
["Warren County<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Except 1 city)",                3.00,   ],
["--GlensFalls(city)",            3.00,   ],
["Washington County",            3.00,   ],
["Wayne County",                 4.00,   true],
["WestchesterCounty<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Except 4 cities)", 3.375,  ],
["--Mount Vernon(city)",           4.375,  ],
["--New Rochelle(city)",           4.375,  ],
["--White Plains(city)",           4.125,  ],
["--Yonkers(city)",               4.375,  ],
["Wyoming County",               4.00,   ],
["Yates County",                 4.00,   ]
];
//
//==javascript code that converts the TaxInfo table into the nopercart-options;
TaxNames        =[ "State-NY" ];
TaxRates        =[ 0.0400 ];
TaxesByID       ={ c:[] };
TaxesByRegion   =[ [] ];
RegionTable     =[ "Not NYS" ];
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
}
