var zipCodes = [
[27006,30],
[27007,86],
[27009,34],
[27009,85],
[27010,34],
[27011,86],
[27011,99],
[27012,29],
[27012,34],
[27013,49],
[27013,80],
[27014,30],
[27016,85],
[27017,86],
[27018,99],
[27019,34],
[27019,85],
[27020,97],
[27020,99],
[27021,34],
[27021,85],
[27022,85],
[27023,34],
[27024,86],
[27025,79],
[27025,85],
[27027,79],
[27028,30],
[27030,85],
[27030,86],
[27031,86],
[27040,34],
[27041,85],
[27041,86],
[27042,85],
[27043,34],
[27043,85],
[27043,86],
[27045,34],
[27045,85],
[27046,79],
[27046,85],
[27047,86],
[27048,79],
[27049,86],
[27050,34],
[27050,85],
[27051,34],
[27052,34],
[27052,85],
[27053,86],
[27054,80],
[27055,30],
[27055,99],
[27094,34],
[27098,34],
[27099,34],
[27101,34],
[27102,34],
[27103,34],
[27104,34],
[27105,34],
[27106,34],
[27107,29],
[27107,34],
[27108,34],
[27109,34],
[27110,34],
[27111,34],
[27113,34],
[27114,34],
[27115,34],
[27116,34],
[27117,34],
[27120,34],
[27127,29],
[27127,34],
[27130,34],
[27150,34],
[27151,34],
[27152,34],
[27155,34],
[27156,34],
[27157,34],
[27198,34],
[27199,34],
[27201,1], 
[27202,1], 
[27203,76],
[27204,76],
[27205,68],
[27205,76],
[27207,19],
[27208,19],
[27208,63],
[27208,76],
[27209,62],
[27209,63],
[27212,17],
[27213,19],
[27214,41],
[27214,79],
[27215,1], 
[27215,41],
[27216,1], 
[27217,1], 
[27217,17],
[27220,1], 
[27228,19],
[27229,62],
[27230,76],
[27231,68],
[27233,41],
[27233,76],
[27235,41],
[27237,53],
[27239,29],
[27239,76],
[27242,63],
[27243,68],
[27244,1], 
[27244,17],
[27244,41],
[27247,62],
[27248,76],
[27249,1], 
[27249,17],
[27249,41],
[27249,79],
[27252,19],
[27252,63],
[27253,1], 
[27256,19],
[27258,1], 
[27259,63],
[27260,29],
[27260,41],
[27260,76],
[27261,41],
[27262,29],
[27262,41],
[27263,41],
[27263,76],
[27264,41],
[27265,29],
[27265,34],
[27265,41],
[27278,32],
[27278,68],
[27281,62],
[27281,63],
[27282,41],
[27283,41],
[27283,76],
[27284,29],
[27284,34],
[27284,41],
[27285,34],
[27288,79],
[27289,79],
[27291,17],
[27292,29],
[27292,76],
[27293,29],
[27294,29],
[27295,29],
[27298,1], 
[27298,18],
[27298,19],
[27298,41],
[27298,76],
[27299,29],
[27301,41],
[27302,1], 
[27302,17],
[27302,68],
[27305,17],
[27305,73],
[27306,62],
[27306,77],
[27310,41],
[27311,17],
[27311,79],
[27312,1], 
[27312,19],
[27313,41],
[27313,76],
[27314,17],
[27315,17],
[27316,76],
[27317,41],
[27317,76],
[27320,17],
[27320,41],
[27320,79],
[27321,79],
[27322,79],
[27323,79],
[27325,19],
[27325,63],
[27325,76],
[27326,17],
[27326,79],
[27330,19],
[27330,43],
[27330,53],
[27330,63],
[27331,53],
[27332,1], 
[27332,19],
[27332,43],
[27332,53],
[27340,1], 
[27341,62],
[27341,63],
[27341,76],
[27342,41],
[27343,17],
[27343,73],
[27344,19],
[27344,76],
[27349,1], 
[27349,19],
[27350,76],
[27351,29],
[27355,19],
[27355,76],
[27356,62],
[27356,63],
[27357,41],
[27357,79],
[27358,41],
[27358,79],
[27359,1], 
[27360,29],
[27360,76],
[27361,29],
[27370,76],
[27371,62],
[27371,76],
[27373,29],
[27374,29],
[27375,79],
[27376,63],
[27377,41],
[27379,17],
[27395,17],
[27401,41],
[27402,41],
[27403,41],
[27404,41],
[27405,41],
[27406,41],
[27407,41],
[27408,41],
[27409,41],
[27410,41],
[27411,41],
[27412,41],
[27413,41],
[27415,41],
[27416,41],
[27417,41],
[27419,41],
[27420,41],
[27425,41],
[27427,41],
[27429,41],
[27435,41],
[27438,41],
[27455,41],
[27480,41],
[27495,41],
[27497,41],
[27498,41],
[27499,41],
[27501,43],
[27501,51],
[27501,92],
[27502,19],
[27502,92],
[27503,32],
[27504,43],
[27504,51],
[27505,43],
[27505,53],
[27506,43],
[27507,39],
[27507,91],
[27508,35],
[27509,39],
[27510,68],
[27511,92],
[27512,92],
[27513,92],
[27514,68],
[27515,68],
[27516,19],
[27516,68],
[27517,19],
[27517,32],
[27517,68],
[27518,92],
[27519,19],
[27519,92],
[27520,51],
[27520,92],
[27521,43],
[27522,39],
[27522,92],
[27523,92],
[27524,51],
[27524,96],
[27525,35],
[27525,39],
[27526,43],
[27526,92],
[27527,51],
[27528,51],
[27529,51],
[27529,92],
[27530,96],
[27531,96],
[27532,96],
[27533,96],
[27534,96],
[27536,91],
[27537,35],
[27537,91],
[27537,93],
[27539,92],
[27540,43],
[27540,92],
[27541,68],
[27541,73],
[27542,51],
[27542,96],
[27542,98],
[27543,43],
[27544,39],
[27544,91],
[27545,92],
[27546,43],
[27549,35],
[27551,93],
[27552,43],
[27553,91],
[27553,93],
[27555,51],
[27556,91],
[27557,35],
[27557,51],
[27557,64],
[27557,98],
[27559,19],
[27560,19],
[27560,32],
[27560,92],
[27562,19],
[27562,43],
[27562,92],
[27563,93],
[27564,39],
[27565,39],
[27565,73],
[27565,91],
[27568,51],
[27569,51],
[27569,96],
[27570,93],
[27571,92],
[27572,32],
[27572,39],
[27572,68],
[27572,73],
[27573,39],
[27573,73],
[27574,73],
[27576,51],
[27577,51],
[27581,39],
[27582,39],
[27583,68],
[27583,73],
[27584,91],
[27586,93],
[27587,35],
[27587,39],
[27587,92],
[27588,92],
[27589,35],
[27589,93],
[27591,51],
[27591,92],
[27592,43],
[27592,51],
[27592,92],
[27593,51],
[27594,93],
[27596,35],
[27596,39],
[27596,91],
[27596,92],
[27597,35],
[27597,51],
[27597,64],
[27597,92],
[27599,68],
[27601,92],
[27602,92],
[27603,51],
[27603,92],
[27604,92],
[27605,92],
[27606,92],
[27607,92],
[27608,92],
[27609,92],
[27610,68],
[27610,92],
[27611,92],
[27612,92],
[27613,32],
[27613,92],
[27614,92],
[27615,92],
[27616,92],
[27617,92],
[27619,92],
[27620,92],
[27621,92],
[27622,92],
[27623,92],
[27624,92],
[27625,92],
[27626,92],
[27627,92],
[27628,92],
[27629,92],
[27634,92],
[27635,92],
[27636,92],
[27640,92],
[27650,92],
[27656,92],
[27658,92],
[27661,92],
[27668,92],
[27675,92],
[27676,92],
[27690,92],
[27695,92],
[27697,92],
[27698,92],
[27699,92],
[27701,32],
[27702,32],
[27703,32],
[27703,92],
[27704,32],
[27705,32],
[27705,68],
[27706,32],
[27707,32],
[27707,68],
[27708,32],
[27709,32],
[27710,32],
[27711,32],
[27712,32],
[27712,68],
[27713,32],
[27715,32],
[27717,32],
[27722,32],
[27801,33],
[27802,33],
[27803,33],
[27803,64],
[27803,98],
[27804,64],
[27805,46],
[27805,8], 
[27806,7], 
[27807,64],
[27807,98],
[27808,7], 
[27809,33],
[27809,64],
[27810,48],
[27810,7], 
[27811,74],
[27812,33],
[27812,74],
[27813,98],
[27814,7], 
[27815,33],
[27816,35],
[27816,64],
[27817,7], 
[27818,46],
[27819,33],
[27820,66],
[27821,7], 
[27822,33],
[27822,64],
[27822,98],
[27823,42],
[27824,48],
[27825,58],
[27826,48],
[27826,89],
[27827,74],
[27828,40],
[27828,74],
[27829,33],
[27829,74],
[27829,98],
[27830,96],
[27830,98],
[27831,66],
[27832,66],
[27833,74],
[27834,74],
[27835,74],
[27836,74],
[27837,7], 
[27837,74],
[27839,42],
[27840,58],
[27841,58],
[27842,66],
[27842,93],
[27843,33],
[27843,42],
[27843,58],
[27844,42],
[27845,66],
[27846,58],
[27847,8], 
[27849,8], 
[27850,35],
[27850,42],
[27850,93],
[27851,98],
[27852,33],
[27852,74],
[27852,98],
[27853,66],
[27854,66],
[27855,46],
[27855,66],
[27856,64],
[27857,58],
[27858,74],
[27860,7], 
[27861,58],
[27862,66],
[27863,40],
[27863,96],
[27864,33],
[27865,7], 
[27866,66],
[27867,66],
[27868,64],
[27869,66],
[27870,42],
[27871,58],
[27871,7], 
[27871,74],
[27872,8], 
[27873,98],
[27874,42],
[27875,48],
[27876,66],
[27876,74],
[27877,66],
[27878,64],
[27879,74],
[27880,64],
[27880,98],
[27881,33],
[27882,64],
[27883,40],
[27883,96],
[27883,98],
[27884,74],
[27885,48],
[27886,33],
[27887,42],
[27888,40],
[27888,74],
[27888,98],
[27889,7], 
[27889,74],
[27890,42],
[27891,33],
[27891,42],
[27891,64],
[27892,58],
[27892,7], 
[27893,98],
[27894,98],
[27895,98],
[27896,64],
[27896,98],
[27897,46],
[27897,66],
[27906,70],
[27907,70],
[27909,15],
[27909,70],
[27910,46],
[27915,28],
[27916,27],
[27917,27],
[27919,21],
[27919,37],
[27919,72],
[27920,28],
[27921,15],
[27922,46],
[27923,27],
[27924,46],
[27924,8], 
[27925,89],
[27926,37],
[27927,27],
[27928,89],
[27928,94],
[27929,27],
[27930,72],
[27932,21],
[27935,37],
[27936,28],
[27937,37],
[27938,37],
[27939,27],
[27941,27],
[27942,46],
[27943,28],
[27944,72],
[27946,21],
[27946,37],
[27946,72],
[27947,27],
[27948,28],
[27949,28],
[27950,27],
[27953,28],
[27954,28],
[27956,27],
[27957,8], 
[27958,27],
[27959,28],
[27960,48],
[27962,94],
[27964,27],
[27965,27],
[27966,27],
[27967,8], 
[27968,28],
[27969,37],
[27970,94],
[27972,28],
[27973,15],
[27973,27],
[27974,15],
[27976,15],
[27978,28],
[27979,37],
[27980,21],
[27980,72],
[27981,28],
[27982,28],
[27983,8], 
[27985,72],
[27986,46],
[28001,84],
[28002,84],
[28006,36],
[28007,4], 
[28009,84],
[28010,49],
[28012,36],
[28016,36],
[28017,23],
[28018,81],
[28019,81],
[28020,23],
[28020,81],
[28021,23],
[28021,36],
[28021,55],
[28023,80],
[28024,81],
[28025,13],
[28026,13],
[28027,13],
[28031,60],
[28032,36],
[28033,36],
[28033,55],
[28034,36],
[28035,60],
[28036,13],
[28036,49],
[28036,60],
[28037,18],
[28037,55],
[28038,23],
[28039,80],
[28040,23],
[28040,47],
[28040,81],
[28041,80],
[28042,23],
[28043,81],
[28052,36],
[28053,36],
[28054,36],
[28055,36],
[28056,36],
[28070,60],
[28071,13],
[28071,80],
[28071,84],
[28072,80],
[28073,23],
[28074,81],
[28075,13],
[28076,81],
[28077,36],
[28078,13],
[28078,36],
[28078,60],
[28079,90],
[28080,36],
[28080,55],
[28081,13],
[28081,80],
[28082,13],
[28083,13],
[28083,80],
[28086,23],
[28088,80],
[28089,23],
[28090,12],
[28090,18],
[28090,23],
[28090,55],
[28091,4], 
[28092,18],
[28092,36],
[28092,55],
[28093,55],
[28097,84],
[28098,36],
[28101,36],
[28102,4], 
[28103,4], 
[28103,90],
[28104,60],
[28104,90],
[28105,13],
[28105,60],
[28105,90],
[28106,60],
[28107,13],
[28107,60],
[28107,84],
[28107,90],
[28108,90],
[28109,84],
[28110,90],
[28111,90],
[28112,90],
[28114,23],
[28114,81],
[28115,13],
[28115,49],
[28115,80],
[28117,49],
[28117,80],
[28119,4], 
[28120,36],
[28123,49],
[28124,13],
[28124,84],
[28125,49],
[28125,80],
[28126,60],
[28127,29],
[28127,62],
[28127,76],
[28127,80],
[28127,84],
[28128,84],
[28129,84],
[28130,60],
[28133,4], 
[28133,90],
[28134,60],
[28135,4], 
[28136,23],
[28137,80],
[28137,84],
[28138,13],
[28138,80],
[28139,36],
[28139,75],
[28139,81],
[28144,80],
[28145,80],
[28146,80],
[28147,30],
[28147,80],
[28150,23],
[28150,81],
[28151,23],
[28152,23],
[28159,80],
[28160,81],
[28163,84],
[28164,36],
[28164,55],
[28166,49],
[28167,59],
[28167,81],
[28168,18],
[28168,23],
[28168,55],
[28169,23],
[28170,4], 
[28173,90],
[28174,90],
[28201,60],
[28202,60],
[28203,60],
[28204,60],
[28205,60],
[28206,60],
[28207,60],
[28208,60],
[28209,60],
[28210,60],
[28211,60],
[28212,60],
[28213,13],
[28213,60],
[28214,60],
[28215,13],
[28215,60],
[28216,60],
[28217,60],
[28218,60],
[28219,60],
[28220,60],
[28221,60],
[28222,60],
[28223,60],
[28224,60],
[28226,60],
[28227,60],
[28227,90],
[28228,60],
[28229,60],
[28230,60],
[28231,60],
[28232,60],
[28233,60],
[28234,60],
[28235,60],
[28236,60],
[28237,60],
[28241,60],
[28242,60],
[28243,60],
[28244,60],
[28246,60],
[28247,60],
[28250,60],
[28253,60],
[28254,60],
[28255,60],
[28256,60],
[28258,60],
[28260,60],
[28262,13],
[28262,60],
[28263,60],
[28265,60],
[28266,60],
[28269,60],
[28270,60],
[28271,60],
[28272,60],
[28273,60],
[28274,60],
[28275,60],
[28277,60],
[28278,60],
[28280,60],
[28281,60],
[28282,60],
[28284,60],
[28285,60],
[28287,60],
[28288,60],
[28289,60],
[28290,60],
[28296,60],
[28297,60],
[28299,60],
[28301,26],
[28301,9], 
[28302,26],
[28303,26],
[28304,26],
[28304,47],
[28305,26],
[28306,26],
[28306,47],
[28306,9], 
[28307,26],
[28308,26],
[28309,26],
[28310,26],
[28311,26],
[28312,26],
[28314,26],
[28315,47],
[28315,63],
[28318,26],
[28318,82],
[28319,78],
[28320,24],
[28320,9], 
[28323,43],
[28325,31],
[28326,43],
[28326,53],
[28326,63],
[28327,63],
[28328,82],
[28329,82],
[28330,77],
[28331,26],
[28332,9], 
[28333,96],
[28334,26],
[28334,43],
[28334,51],
[28334,82],
[28335,43],
[28337,9], 
[28338,77],
[28339,43],
[28340,78],
[28341,31],
[28341,82],
[28342,26],
[28343,83],
[28344,26],
[28344,82],
[28345,77],
[28345,83],
[28347,63],
[28347,77],
[28348,26],
[28349,31],
[28350,63],
[28351,83],
[28352,83],
[28353,83],
[28355,53],
[28356,26],
[28356,43],
[28357,47],
[28357,78],
[28358,78],
[28359,78],
[28360,78],
[28362,78],
[28363,77],
[28363,83],
[28364,78],
[28364,83],
[28365,31],
[28365,82],
[28365,96],
[28366,51],
[28366,82],
[28367,77],
[28368,43],
[28369,78],
[28370,63],
[28371,26],
[28371,78],
[28372,78],
[28373,47],
[28373,63],
[28374,63],
[28375,78],
[28376,47],
[28377,47],
[28377,78],
[28378,78],
[28379,77],
[28380,77],
[28382,26],
[28382,82],
[28382,9], 
[28383,78],
[28384,26],
[28384,78],
[28384,9], 
[28385,82],
[28386,47],
[28386,78],
[28387,63],
[28388,63],
[28390,26],
[28390,43],
[28391,26],
[28392,9], 
[28393,31],
[28393,82],
[28394,63],
[28395,26],
[28396,83],
[28398,31],
[28399,9], 
[28401,65],
[28401,71],
[28402,65],
[28403,65],
[28404,65],
[28405,65],
[28405,71],
[28406,65],
[28407,65],
[28408,65],
[28409,65],
[28410,65],
[28411,65],
[28411,71],
[28412,65],
[28420,10],
[28421,71],
[28422,10],
[28423,24],
[28423,9], 
[28424,24],
[28425,71],
[28428,65],
[28429,65],
[28430,24],
[28431,24],
[28432,24],
[28433,24],
[28433,9], 
[28434,24],
[28434,9], 
[28435,71],
[28435,9], 
[28436,10],
[28436,24],
[28438,24],
[28439,24],
[28441,26],
[28441,82],
[28441,9], 
[28442,24],
[28443,71],
[28444,31],
[28444,82],
[28444,9], 
[28445,67],
[28445,71],
[28447,71],
[28447,82],
[28447,9], 
[28448,9], 
[28449,65],
[28450,24],
[28451,10],
[28452,10],
[28453,31],
[28453,82],
[28454,67],
[28454,71],
[28455,24],
[28456,10],
[28456,24],
[28456,9], 
[28457,71],
[28458,31],
[28458,82],
[28459,10],
[28460,67],
[28461,10],
[28462,10],
[28463,24],
[28464,31],
[28465,10],
[28466,31],
[28466,71],
[28466,82],
[28467,10],
[28468,10],
[28469,10],
[28470,10],
[28472,24],
[28478,31],
[28478,71],
[28478,82],
[28479,10],
[28480,65],
[28501,52],
[28501,54],
[28502,54],
[28503,54],
[28504,52],
[28504,54],
[28508,31],
[28509,69],
[28510,69],
[28511,16],
[28512,16],
[28513,40],
[28513,74],
[28515,69],
[28516,16],
[28518,31],
[28518,67],
[28519,25],
[28520,16],
[28521,31],
[28521,67],
[28522,52],
[28523,25],
[28524,16],
[28525,31],
[28525,54],
[28526,25],
[28526,52],
[28526,54],
[28527,25],
[28528,16],
[28529,69],
[28530,25],
[28530,40],
[28530,54],
[28530,74],
[28531,16],
[28532,16],
[28532,25],
[28533,25],
[28537,69],
[28538,40],
[28538,54],
[28539,67],
[28540,67],
[28541,67],
[28542,67],
[28543,67],
[28544,67],
[28545,67],
[28546,67],
[28547,67],
[28551,40],
[28551,54],
[28551,96],
[28552,69],
[28553,16],
[28554,40],
[28555,52],
[28555,67],
[28556,69],
[28557,16],
[28560,25],
[28560,69],
[28561,25],
[28562,25],
[28562,52],
[28563,25],
[28564,25],
[28570,16],
[28571,69],
[28572,31],
[28572,52],
[28572,54],
[28572,67],
[28573,25],
[28573,52],
[28574,31],
[28574,52],
[28574,67],
[28575,16],
[28577,16],
[28578,31],
[28578,54],
[28578,96],
[28579,16],
[28580,40],
[28580,54],
[28581,16],
[28582,16],
[28582,67],
[28583,69],
[28584,16],
[28584,67],
[28585,52],
[28586,25],
[28586,7], 
[28586,74],
[28587,69],
[28589,16],
[28590,74],
[28594,16],
[28601,12],
[28601,14],
[28601,18],
[28601,2], 
[28602,12],
[28602,18],
[28603,18],
[28604,6], 
[28604,94],
[28604,95],
[28605,14],
[28605,6], 
[28605,95],
[28606,14],
[28606,97],
[28607,95],
[28608,95],
[28609,18],
[28609,95],
[28610,18],
[28611,14],
[28611,6], 
[28612,12],
[28612,14],
[28612,18],
[28613,18],
[28615,5], 
[28616,6], 
[28617,5], 
[28618,5], 
[28618,95],
[28618,97],
[28619,12],
[28621,86],
[28621,97],
[28622,6], 
[28623,3], 
[28624,97],
[28625,49],
[28626,5], 
[28627,3], 
[28628,12],
[28629,5], 
[28630,14],
[28630,2], 
[28631,5], 
[28633,14],
[28634,30],
[28634,49],
[28635,97],
[28636,2], 
[28636,49],
[28637,12],
[28638,14],
[28640,5], 
[28641,12],
[28642,99],
[28643,5], 
[28644,3], 
[28644,5], 
[28644,95],
[28644,97],
[28645,12],
[28645,14],
[28645,97],
[28646,6], 
[28647,12],
[28649,97],
[28650,18],
[28650,55],
[28651,97],
[28652,6], 
[28653,6], 
[28654,2], 
[28654,97],
[28655,12],
[28655,59],
[28656,97],
[28657,12],
[28657,6], 
[28658,18],
[28659,97],
[28660,49],
[28661,14],
[28662,6], 
[28663,3], 
[28664,6], 
[28665,97],
[28666,12],
[28667,14],
[28668,3], 
[28669,97],
[28670,97],
[28671,12],
[28672,5], 
[28673,18],
[28673,55],
[28674,97],
[28675,3], 
[28676,86],
[28676,97],
[28677,18],
[28677,49],
[28678,2], 
[28678,49],
[28679,95],
[28680,12],
[28681,2], 
[28682,18],
[28683,86],
[28683,97],
[28684,5], 
[28684,95],
[28685,97],
[28687,49],
[28688,49],
[28689,49],
[28689,97],
[28689,99],
[28690,12],
[28691,95],
[28692,95],
[28693,5], 
[28694,5], 
[28697,97],
[28698,5], 
[28698,95],
[28699,49],
[28701,11],
[28702,38],
[28702,87],
[28704,11],
[28704,45],
[28704,87],
[28705,61],
[28707,50],
[28708,88],
[28709,11],
[28709,45],
[28710,45],
[28711,11],
[28712,88],
[28713,87],
[28714,100],                   
[28715,11],
[28716,44],
[28717,50],
[28718,88],
[28719,50],
[28719,87],
[28720,81],
[28721,44],
[28722,75],
[28723,50],
[28724,45],
[28725,50],
[28726,45],
[28727,45],
[28728,11],
[28729,45],
[28730,11],
[28731,45],
[28732,1], 
[28732,11],
[28732,45],
[28733,38],
[28733,56],
[28734,56],
[28735,45],
[28736,11],
[28736,50],
[28737,59],
[28738,44],
[28739,45],
[28739,88],
[28740,100],                   
[28741,50],
[28741,56],
[28742,45],
[28743,57],
[28744,56],
[28745,44],
[28746,81],
[28747,88],
[28748,11],
[28749,59],
[28750,75],
[28751,44],
[28752,59],
[28752,81],
[28753,57],
[28754,100],                   
[28754,57],
[28755,100],                   
[28756,75],
[28757,11],
[28758,45],
[28759,45],
[28760,45],
[28761,1], 
[28761,12],
[28761,59],
[28761,75],
[28762,59],
[28763,44],
[28763,56],
[28765,61],
[28766,88],
[28768,88],
[28770,11],
[28771,38],
[28772,88],
[28773,1], 
[28773,45],
[28773,75],
[28774,50],
[28774,88],
[28775,56],
[28776,11],
[28777,61],
[28778,11],
[28779,50],
[28781,20],
[28781,56],
[28782,75],
[28783,50],
[28784,45],
[28785,44],
[28786,44],
[28787,11],
[28787,57],
[28788,50],
[28789,50],
[28789,87],
[28790,45],
[28791,45],
[28792,45],
[28792,75],
[28793,45],
[28801,11],
[28802,11],
[28803,11],
[28804,11],
[28805,11],
[28806,11],
[28810,11],
[28813,11],
[28814,11],
[28815,11],
[28816,11],
[28901,20],
[28902,20],
[28902,22],
[28903,20],
[28904,22],
[28905,20],
[28906,20],
[28909,22]
];

var countyCodes = [
[1,'Alamance'],
[2,'Alexander'],
[3,'Alleghany'],
[4,'Anson'],
[5,'Ashe'],
[6,'Avery'],
[7,'Beaufort'],
[8,'Bertie'],
[9,'Bladen'],
[10,'Brunswick'],
[11,'Buncombe'],
[12,'Burke'],
[13,'Cabarrus'],
[14,'Caldwell'],
[15,'Camden'],
[16,'Carteret'],
[17,'Caswell'],
[18,'Catawba'],
[19,'Chatham'],
[20,'Cherokee'],
[21,'Chowan'],
[22,'Clay'],
[23,'Cleveland'],
[24,'Columbus'],
[25,'Craven'],
[26,'Cumberland'],
[27,'Currituck'],
[28,'Dare'],
[29,'Davidson'],
[30,'Davie'],
[31,'Duplin'],
[32,'Durham'],
[33,'Edgecombe'],
[34,'Forsyth'],
[35,'Franklin'],
[36,'Gaston'],
[37,'Gates'],
[38,'Graham'],
[39,'Granville'],
[40,'Greene'],
[41,'Guilford'],
[42,'Halifax'],
[43,'Harnett'],
[44,'Haywood'],
[45,'Henderson'],
[46,'Hertford'],
[47,'Hoke'],
[48,'Hyde'],
[49,'Iredell'],
[50,'Jackson'],
[51,'Johnston'],
[52,'Jones'],
[53,'Lee'],
[54,'Lenoir'],
[55,'Lincoln'],
[56,'Macon'],
[57,'Madison'],
[58,'Martin'],
[59,'Mcdowell'],
[60,'Mecklenburg'],
[61,'Mitchell'],
[62,'Montgomery'],
[63,'Moore'],
[64,'Nash'],
[65,'New Hanover'],
[66,'Northampton'],
[67,'Onslow'],
[68,'Orange'],
[69,'Pamlico'],
[70,'Pasquotank'],
[71,'Pender'],
[72,'Perquimans'],
[73,'Person'],
[74,'Pitt'],
[75,'Polk'],
[76,'Randolph'],
[77,'Richmond'],
[78,'Robeson'],
[79,'Rockingham'],
[80,'Rowan'],
[81,'Rutherford'],
[82,'Sampson'],
[83,'Scotland'],
[84,'Stanly'],
[85,'Stokes'],
[86,'Surry'],
[87,'Swain'],
[88,'Transylvania'],
[89,'Tyrrell'],
[90,'Union'],
[91,'Vance'],
[92,'Wake'],
[93,'Warren'],
[94,'Washington'],
[95,'Watauga'],
[96,'Wayne'],
[97,'Wilkes'],
[98,'Wilson'],
[99,'Yadkin'],
[100,'Yancey']];

function fillCounty(zipCodeInput, selectControl) {
	var matches = 0;
	var foundCountyCodes = new Array();
	clear(selectControl);
	for(i=0; i<zipCodes.length; i++) {
		if(zipCodes[i][0] == zipCodeInput) {
			foundCountyCodes[matches++] = zipCodes[i][1];
		}
	}
	var initialOffset = 0;
	if(foundCountyCodes.length == 0) {
		selectControl.options[0] = getInvalidOption();
		initialOffset = 1;
	}
	else if(foundCountyCodes.length > 1) {
		selectControl.options[0] = getDefaultOption();
		initialOffset = 1;
	}
	for(i=0; i<foundCountyCodes.length; i++) {
		var foundCountyCode = foundCountyCodes[i];
		for(j=0; j<countyCodes.length; j++) {
			if(countyCodes[j][0] == foundCountyCode) {
				selectControl.options[i+initialOffset] = new Option(countyCodes[j][1], countyCodes[j][0]);
			}
		}
	}
}

function fillCountyWithName(zipCodeInput, selectControl) {
	var matches = 0;
	var foundCountyCodes = new Array();
	clear(selectControl);
	for(i=0; i<zipCodes.length; i++) {
		if(zipCodes[i][0] == zipCodeInput) {
			foundCountyCodes[matches++] = zipCodes[i][1];
		}
	}
	var initialOffset = 0;
	if(foundCountyCodes.length == 0) {
		selectControl.options[0] = getInvalidOption();
		initialOffset = 1;
	}
	else if(foundCountyCodes.length > 1) {
		selectControl.options[0] = getDefaultOption();
		initialOffset = 1;
	}
	for(i=0; i<foundCountyCodes.length; i++) {
		var foundCountyCode = foundCountyCodes[i];
		for(j=0; j<countyCodes.length; j++) {
			if(countyCodes[j][0] == foundCountyCode) {
				selectControl.options[i+initialOffset] = new Option(countyCodes[j][1], countyCodes[j][1]);
			}
		}
	}
}

function clear(selectControl) {
	while(selectControl.options.length > 0) {
		selectControl.options[0] = null;
	}
}

function getInvalidOption() {
	return new Option("-Enter valid NC zip-", "");
}

function getDefaultOption() {
	return new Option("-Select One-", "");
}

function removeLeadingZeros(value) {
	while(value.length > 1 && value.charAt(0) == '0') {
		value = value.substr(1);
	}
	return value;
}

function selectCounty(selControl, selValue) {
	if(selValue == "") {
		return;
	}
	selValue = removeLeadingZeros(selValue);
	for(var i=0; i<selControl.options.length; i++) {
		if(selControl.options[i].value == selValue) {
			selControl.options[i].selected = true;
		}
	}
}

function selectByName(selControl, selName) {
	for(var i=0; i<selControl.options.length; i++) {
		if(selControl.options[i].name == selName) {
			selControl.options[i].selected = true;
		}
	}
}

function populateCounties(zipField, selectControl) {
	fillCounty(zipField.value, selectControl);
}

function populateCountiesWithNameAsValue(zipField, selectControl) {
	fillCountyWithName(zipField.value, selectControl);
}

