/*taxInfo.js*/
/*Copyright 2000-2005 by EarthOdyssey, LLC. All rights reserved. The content of this file may not be copied, used, sold or distributed in whole or in part without the express written consent of EarthOdyssey, LLC.*/
<!-- Hide Script
function makeArray(n)  {
		this.length = n
		return this	
		}
		
	
var taxLocation = new makeArray(82)

taxLocation[0] = ""
taxLocation[1] = "Albany County"
taxLocation[2] = "Allegany County"
taxLocation[3] = "Broome County"
taxLocation[4] = "Cattaraugus County"
taxLocation[5] = "   Olean(city)"
taxLocation[6] = "   Salamanca(city)"
taxLocation[7] = "Cayuga County"
taxLocation[8] = "   Auburn(city)"
taxLocation[9] = "Chautauqua County"
taxLocation[10] = "Chemung County"
taxLocation[11] = "Chenango County"
taxLocation[12] = "   Norwich(city)"
taxLocation[13] = "Clinton County"
taxLocation[14] = "Columbia County"
taxLocation[15] = "Cortland County"
taxLocation[16] = "Delaware County"
taxLocation[17] = "Dutchess County"
taxLocation[18] = "Erie County" 
taxLocation[19] = "Essex County"
taxLocation[20] = "Franklin County"
taxLocation[21] = "Fulton County"
taxLocation[22] = "   Gloversville(city)"
taxLocation[23] = "   Johnstown(city)"
taxLocation[24] = "Genesee County"
taxLocation[25] = "Greene County"
taxLocation[26] = "Hamilton County"
taxLocation[27] = "Herkimer County"
taxLocation[28] = "Jefferson County"
taxLocation[29] = "Lewis County"
taxLocation[30] = "Livingston County"
taxLocation[31] = "Madison County"
taxLocation[32] = "   Oneida(city)"
taxLocation[33] = "Monroe County"
taxLocation[34] = "Montgomery County"
taxLocation[35] = "Nassau County"
taxLocation[36] = "New York City"
taxLocation[37] = "Niagara County"
taxLocation[38] = "Oneida County"
taxLocation[39] = "   Rome(city)"
taxLocation[40] = "   Sherrill(city)"
taxLocation[41] = "   Utica(city)"
taxLocation[42] = "Onondaga County"
taxLocation[43] = "Ontario County"
taxLocation[44] = "Orange County"
taxLocation[45] = "Orleans County"
taxLocation[46] = "Oswego County"
taxLocation[47] = "   Oswego(city)"
taxLocation[48] = "Otsego County"
taxLocation[49] = "Putnam County"
taxLocation[50] = "Rensselaer County"
taxLocation[51] = "Rockland County"
taxLocation[52] = "St. Lawrence County"
taxLocation[53] = "Saratoga County"
taxLocation[54] = "   Saratoga Springs(city)"
taxLocation[55] = "Schenectady County"
taxLocation[56] = "Schoharie County"
taxLocation[57] = "Schuyler County"
taxLocation[58] = "Seneca County"
taxLocation[59] = "Steuben County"
taxLocation[60] = "   Corning(city)"
taxLocation[61] = "   Hornell(city)"
taxLocation[62] = "Suffolk County"
taxLocation[63] = "Sullivan County"
taxLocation[64] = "Tioga County"
taxLocation[65] = "Tompkins County"
taxLocation[66] = "   Ithaca(city)"
taxLocation[67] = "Ulster County"
taxLocation[68] = "Warren County"
taxLocation[69] = "   Glens Falls(city)"
taxLocation[70] = "Washington County"
taxLocation[71] = "Wayne County"
taxLocation[72] = "Westchester County"
taxLocation[73] = "   Mt. Vernon(city)"
taxLocation[74] = "   New Rochelle(city)"
taxLocation[75] = "   White Plains(city)"
taxLocation[76] = "   Yonkers(city)"
taxLocation[77] = "Wyoming County"
taxLocation[78] = "Yates County"


//On june 1, 2003 state increased by 0.25%, therefore an adjustment was made
var totalRate= new makeArray(82)

totalRate[0] = 0.0
totalRate[1] = 8.00
totalRate[2] = 8.50
totalRate[3] = 8.00
totalRate[4] = 8.00
totalRate[5] = 8.00
totalRate[6] = 8.00
totalRate[7] = 8.00
totalRate[8] = 8.00
totalRate[9] = 7.75
totalRate[10] = 8.00
totalRate[11] = 8.00
totalRate[12] = 8.00
totalRate[13] = 8.00
totalRate[14] = 8.00
totalRate[15] = 8.00
totalRate[16] = 8.00
totalRate[17] = 8.125 
totalRate[18] = 8.75           
totalRate[19] = 7.75
totalRate[20] = 8.00
totalRate[21] = 8.00
totalRate[22] = 8.00
totalRate[23] = 8.00
totalRate[24] = 8.00
totalRate[25] = 8.00
totalRate[26] = 7.00
totalRate[27] = 8.25
totalRate[28] = 7.75
totalRate[29] = 7.75
totalRate[30] = 8.00
totalRate[31] = 8.00
totalRate[32] = 8.00
totalRate[33] = 8.00
totalRate[34] = 8.00
totalRate[35] = 8.625 
totalRate[36] = 8.875 
totalRate[37] = 8.00
totalRate[38] = 8.75
totalRate[39] = 8.75
totalRate[40] = 8.75
totalRate[41] = 8.75
totalRate[42] = 8.00
totalRate[43] = 7.50
totalRate[44] = 8.125
totalRate[45] = 8.00
totalRate[46] = 8.00
totalRate[47] = 8.00
totalRate[48] = 8.00
totalRate[49] = 8.375 
totalRate[50] = 8.00
totalRate[51] = 8.375 
totalRate[52] = 7.00
totalRate[53] = 7.00
totalRate[54] = 7.00
totalRate[55] = 8.00
totalRate[56] = 8.00
totalRate[57] = 8.00
totalRate[58] = 8.00
totalRate[59] = 8.00
totalRate[60] = 8.00
totalRate[61] = 8.00
totalRate[62] = 8.625
totalRate[63] = 8.00
totalRate[64] = 8.00
totalRate[65] = 8.00
totalRate[66] = 8.00
totalRate[67] = 8.00
totalRate[68] = 7.00
totalRate[69] = 7.00
totalRate[70] = 7.00
totalRate[71] = 8.00
totalRate[72] = 7.375
totalRate[73] = 8.375
totalRate[74] = 8.375
totalRate[75] = 8.125 
totalRate[76] = 8.375
totalRate[77] = 8.00
totalRate[78] = 8.00



var code = new makeArray(82)

code[0] = "0000"
code[1] = "0181"
code[2] = "0221"
code[3] = "0321"
code[4] = "0481"
code[5] = "0441"
code[6] = "0431"
code[7] = "0511"
code[8] = "0561"
code[9] = "0641"
code[10] = "0711"
code[11] = "0861"
code[12] = "0831"
code[13] = "0921"
code[14] = "1021"
code[15] = "1131"
code[16] = "1231"
code[17] = "1311"
code[18] = "1451"       
code[19] = "1521"
code[20] = "1621"
code[21] = "1791"
code[22] = "1741"
code[23] = "1751"
code[24] = "1811"
code[25] = "1911"
code[26] = "2011" 
code[27] = "2121"
code[28] = "2221"
code[29] = "2321"
code[30] = "2411"
code[31] = "2511"
code[32] = "2541"
code[33] = "2611"
code[34] = "2781"
code[35] = "2811"
code[36] = "8081"
code[37] = "2911"
code[38] = "3010"
code[39] = "3015"
code[40] = "3017"
code[41] = "3018"
code[42] = "3121"
code[43] = "3211"
code[44] = "3321"
code[45] = "3481"
code[46] = "3501"
code[47] = "3561"
code[48] = "3621"
code[49] = "3731"
code[50] = "3881"
code[51] = "3921"
code[52] = "4091"
code[53] = "4111"
code[54] = "4131"
code[55] = "4241"
code[56] = "4321"
code[57] = "4411"
code[58] = "4511"
code[59] = "4691"
code[60] = "4611"
code[61] = "4641"
code[62] = "4711"
code[63] = "4821"
code[64] = "4921"
code[65] = "5081"
code[66] = "5021"
code[67] = "5111"
code[68] = "5281"
code[69] = "5211"
code[70] = "5311"
code[71] = "5421"
code[72] = "5581"
code[73] = "5521"
code[74] = "6861"
code[75] = "6521"
code[76] = "6511"
code[77] = "5621"
code[78] = "5721"

function pickTaxTable (form) {
	if (NS6) {showTaxTableNS6()}else{showTaxTable()}
	
	
	}
	   
	function showTaxTable(form) {
		
	for (var j=0;j<79;j=j+15) {
	
	calculateTable(j)
	if (j<74) {if (confirm('Location\t\t\tCode\tState\tLocal\tMCTD\*\tTotal\n\n'+taxTable+'\n\nCLICK OK TO VIEW THE NEXT TABLE.\n\nCLICK CANCEL TO EXIT THIS TABLE ENTIRELY AND PROCEED TO THE SALES TAX CALCULATOR.\n\n\*MCTD is the acronym for Metropolitan Commuter Transportation District.')){
	continue
	}else{ 
	break
	}}else{if (confirm('\n\n\nLocation\t\t\tCode\tState\tLocal\tMCTD\*\tTotal\n\n'+taxTable+'\n\n\n\n\nTHIS TABLE IS THE LAST ONE.\n\nCLICK OK OR CANCEL TO EXIT THIS TABLE ENTIRELY AND PROCEED TO THE SALES TAX CALCULATOR.\n\n\*MCTD is the acronym for Metropolitan Commuter Transportation District.')){
		continue
		}else{ 
		break
	}
		}	
		}
		
	}
			
	
	var j;
	var taxTable;
	var localRate;
	function calculateTable(k) {
	var mctd
        taxTable=""
	
	var m = k+15
	for (i=k;i<m;i++) {
	if (i==17 || i==35 || i==36 || i==44 || i==49 || i==51 || i==62 || i==72 || i==73 || i==74 || i==75 || i==76) {mctd=0.375;}
	else {
	mctd=0}
	
	//state rate is 4.00%, therefore local rate = total rate - 4.00%-mctd rate
	
	localRate=totalRate[i]-4.00-mctd;
	
	//make some adjustments to control tabs
	if ((taxLocation[i].length >20 && i != 22 && i != 75) ||i==4 ||i==9 ||i==34 ||i==52 || i == 55 ||i==72) {
	
	
	
	line=taxLocation[i]+'\t'+code[i]+'\t4.00\%'+'\t'+localRate+'\%\t'+mctd+'\%\t'+totalRate[i]+'\%';
	}else{
	
	line=taxLocation[i]+'\t\t'+code[i]+'\t4.00\%'+'\t'+localRate+'\%\t'+mctd+'\%\t'+totalRate[i]+'\%';
	}
	
	
	
			if (i == 0) {
			taxTable='\n';
			}
			if (i > 0) {
			taxTable+=line+'\n';
			}
			if (i == 78) {
			break;
			}
			
			}
	
	}
	
	
	function showTaxTableNS6 (form) {
	
	createTaxWindow ()
	}
	
	var zPopUp = null;
		
	function createTaxWindow () {
		
	zPopUp=window.open('countyTaxTableCSS.html','Note','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,copyhistory=no,width=550,height=300,top=80,left=50')
		if (zPopUp != null) {
			if (zPopUp.opener == null) {
				zPopUp.opener = self;
				}
			}
	}	
	
	
//-->