//array of 2009 base pay rates	var basePay = new Array();	basePay[0] = new makeArray(17540,18126,18709,19290,19873,20216,20792,21373,21396,21944); 	basePay[1] = new makeArray(19721,20190,20842,21396,21635,22271,22907,23543,24179,24815);	basePay[2] = new makeArray(21517,22234,22951,23668,24385,25102,25819,26536,27253,27970);	basePay[3] = new makeArray(24156,24961,25766,26571,27376,28181,28986,29791,30596,31401);	basePay[4] = new makeArray(27026,27927,28828,29729,30630,31531,32432,33333,34234,35135);	basePay[5] = new makeArray(30125,31129,32133,33137,34141,35145,36149,37153,38157,39161);	basePay[6] = new makeArray(33477,34593,35709,36825,37941,39057,40173,41289,42405,43521);	basePay[7] = new makeArray(37075,38311,39547,40783,42019,43255,44491,45727,46963,48199);	basePay[8] = new makeArray(40949,42314,43679,45044,46409,47774,49139,50504,51869,53234);	basePay[9] = new makeArray(45095,46598,48101,49604,51107,52610,54113,55616,57119,58622);	basePay[10] = new makeArray(49544,51195,52846,54497,56148,57799,59450,61101,62752,64403);	basePay[11] = new makeArray(59383,61362,63341,65320,67299,69278,71257,73236,75215,77194);	basePay[12] = new makeArray(70615,72969,75323,77677,80031,82385,84739,87093,89447,91801);	basePay[13] = new makeArray(83445,86227,89009,91791,94573,97355,100137,102919,105701,108483);	basePay[14] = new makeArray(98156,101428,104700,107972,111244,114516,117788,121060,124332,127604);		var locality = new Array(); //array to hold locality percentages	locality[0] = .1855; //atlanta	locality[1] = .2398; //boston    locality[2] = .1639; //buffalo    locality[3] = .2447; //chicago    locality[4] = .1828; //cincinnati	locality[5] = .1816; //cleveland    locality[6] = .1662; //columbus    locality[7] = .1995; //dallas    locality[8] = .1590; //dayton    locality[9] = .2203; //denver    locality[10] = .2356; //detroit	locality[11] = .2508; //hartford	locality[12] = .2828; //houston    locality[13] = .1546; //huntsville    locality[14] = .1423; //indianapolis    locality[15] = .2651; //la    locality[16] = .2021; //miami    locality[17] = .1765; //milwaukee    locality[18] = .2036; //minneapolis    locality[19] = .2796; //NY    locality[20] = .2125; //Philadelphia    locality[21] = .1608; //phoenix    locality[22] = .1586; //pittsburgh	locality[23] = .1971; //portland    locality[24] = .1738; //raleigh    locality[25] = .1386; //rest of US    locality[26] = .1610; //richmond    locality[27] = .2153; //sacramento    locality[28] = .2344; //san diego	locality[29] = .3435; //san francisco    locality[30] = .2106; //seattle    locality[31] = .2310; //DC			//base pay and locality rates for previous year; used for computing total percentage increase	var basePayPrevious = new Array();	basePayPrevious[0] = new makeArray(17046,17615,18182,18746,19313,19646,20206,20771,20793,21324); 	basePayPrevious[1] = new makeArray(19165,19621,20255,20793,21025,21643,22261,22879,23497,24115);	basePayPrevious[2] = new makeArray(20911,21608,22305,23002,23699,24396,25093,25790,26487,27184);	basePayPrevious[3] = new makeArray(23475,24258,25041,25824,26607,27390,28173,28956,29739,30522);	basePayPrevious[4] = new makeArray(26264,27139,28014,28889,29764,30639,31514,32389,33264,34139);	basePayPrevious[5] = new makeArray(29276,30252,31228,32204,33180,34156,35132,36108,37084,38060);	basePayPrevious[6] = new makeArray(32534,33618,34702,35786,36870,37954,39038,40122,41206,42290);	basePayPrevious[7] = new makeArray(36030,37231,38432,39633,40834,42035,43236,44437,45638,46839);	basePayPrevious[8] = new makeArray(39795,41122,42449,43776,45103,46430,47757,49084,50411,51738);	basePayPrevious[9] = new makeArray(43824,45285,46746,48207,49668,51129,52590,54051,55512,56973);	basePayPrevious[10] = new makeArray(48148,49753,51358,52963,54568,56173,57778,59383,60988,62593);	basePayPrevious[11] = new makeArray(57709,59633,61557,63481,65405,67329,69253,71177,73101,75025);	basePayPrevious[12] = new makeArray(68625,70913,73201,75489,77777,80065,82353,84641,86929,89217);	basePayPrevious[13] = new makeArray(81093,83796,86499,89202,91905,94608,97311,100014,102717,105420);	basePayPrevious[14] = new makeArray(95390,98570,101750,104930,108110,111290,114470,117650,120830,124010);		var localityPrevious = new Array(); //array to hold locality percentages	localityPrevious[0] = .1730; //atlanta	localityPrevious[1] = .2251; //boston    localityPrevious[2] = .1537; //buffalo    localityPrevious[3] = .2316; //chicago    localityPrevious[4] = .1777; //cincinnati	localityPrevious[5] = .1711; //cleveland    localityPrevious[6] = .1580; //columbus    localityPrevious[7] = .1874; //dallas    localityPrevious[8] = .1526; //dayton    localityPrevious[9] = .2103; //denver    localityPrevious[10] = .2253; //detroit	localityPrevious[11] = .2397; //hartford	localityPrevious[12] = .2739; //houston    localityPrevious[13] = .1423; //huntsville    localityPrevious[14] = .1351; //indianapolis    localityPrevious[15] = .2526; //la    localityPrevious[16] = .1911; //miami    localityPrevious[17] = .1673; //milwaukee    localityPrevious[18] = .1943; //minneapolis    localityPrevious[19] = .2636; //NY    localityPrevious[20] = .2014; //Philadelphia    localityPrevious[21] = .1474; //phoenix    localityPrevious[22] = .1493; //pittsburgh	localityPrevious[23] = .1872; //portland    localityPrevious[24] = .1682; //raleigh    localityPrevious[25] = .1318; //rest of US    localityPrevious[26] = .1540; //richmond    localityPrevious[27] = .2025; //sacramento    localityPrevious[28] = .2200; //san diego	localityPrevious[29] = .3253; //san francisco    localityPrevious[30] = .1975; //seattle    localityPrevious[31] = .2089; //DC				function getResult(city){ //calculate the pay increase in this function            var base = basePay[document.payform.elements['gradeID'].selectedIndex][document.payform.elements['stepID'].selectedIndex];			document.payform.elements['basepay'].value = base; //output basepay to form						var localityindex = document.getElementById("regionID").value; //get locality percentage as array index						total = Math.round(base + (locality[localityindex] * base)); //take total from previoius calculation and increase by the locality percentage chosen              if (total >= 153200)total=153200; //pay cap            document.payform.elements['new2007'].value = total; //output to text field						//calculate hourly rate off of the total			hourly = Math.round((total/2087)*100)/100; //round to 2 decimal places			document.payform.elements['hourly'].value = hourly; //output hourly to text field									//calculate previous year's pay here			//calculate previous year's base			var basePrevious = basePayPrevious[document.payform.elements['gradeID'].selectedIndex][document.payform.elements['stepID'].selectedIndex];			totalPrevious = Math.round(basePrevious + (localityPrevious[localityindex] * basePrevious));						//now calculate the percentage increase from 2007 to 2008 total annual pay rates			percentIncrease = (((total - totalPrevious) / totalPrevious) * 100); //calculate initial figure			percentIncrease = Math.round(percentIncrease * 100) / 100; //round to 2 decimal places			percentIncrease = percentIncrease + '%';			document.payform.elements['percentIncrease'].value = percentIncrease;									        }                            function makeArray(){            for (var count = 0; count < makeArray.arguments.length; count++){                this[count] = makeArray.arguments[count];            }        }			function clearFields() {		document.payform.new2007.value='';		document.payform.basepay.value='';		document.payform.hourly.value='';		document.payform.percentIncrease.value='';	}	