//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 previous year's 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			//this is computed by taking the total increase for the locality (i.e. 3.75; taken off of the OPM site) and adding the % increase to it	/* var locality_increase = new Array(); //array to hold 2.9 percent increase figures of localities	locality_increase[0] =4.116;	locality_increase[1] = 4.2498;	locality_increase[2] = 3.9205;	locality_increase[3] = 4.1057;	locality_increase[4] = 3.4472;	locality_increase[5] = 3.93078;	locality_increase[6] = 3.73527;	locality_increase[7] = 4.06455;	locality_increase[8] = 3.57063;	locality_increase[9] = 3.85875;	locality_increase[10] = 3.86904;	locality_increase[11] = 3.93078;	locality_increase[12] = 3.72498;	locality_increase[13] = 4.12629;	locality_increase[14] = 3.65295;	locality_increase[15] = 4.04397;	locality_increase[16] = 3.96165;	locality_increase[17] = 3.81759;	locality_increase[18] = 3.8073;	locality_increase[19] = 4.3218;	locality_increase[20] = 3.96165;	locality_increase[21] = 4.2189;	locality_increase[22] = 3.83817;	locality_increase[23] = 3.86904;	locality_increase[24] = 3.48831;	locality_increase[25] = 3.62208;	locality_increase[26] = 3.62208;	locality_increase[27] = 4.116;	locality_increase[28] = 4.22919;	locality_increase[29] = 4.43499;	locality_increase[30] = 4.14687;	locality_increase[31] = 4.91862;	*/				function getResult(){ //calculate the pay increase in this function			var percentIncrease = .029; //amount of increase for the estimates									            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 >= 186600)total=186600; //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						//now perform calculations to get the new pay rates using the locality figures from each of the 2 arrays			//based on what the user selected for locality, perform calculations - the array indices correspond to the localities			//NOTE: need to divide the array figures by 100 because they are not in decimal format						//var increase35percent = Math.round((total * (locality_increase[localityindex]/100)) + total); //2009 pay figure times the 2.9% locality increase figure from array			var increase35percent = Math.round((total * percentIncrease) + total); //2009 pay figure with the specified percentage increase added to it						//compute user entered percent increase, if there is one			if (document.getElementById('userincrease').value) {				$userincrease = Math.round(total + (total * (document.getElementById('userincrease').value/100)));				document.getElementById('usercalculation').value = $userincrease; //output results			}						//output data to form			document.payform.elements['increasetotal35'].value = increase35percent;						        }                            function makeArray(){            for (var count = 0; count < makeArray.arguments.length; count++){                this[count] = makeArray.arguments[count];            }        }			function clearFields() {		document.payform.new2007.value='';		document.payform.increasetotal35.value='';		document.payform.basepay.value='';		document.payform.hourly.value='';		document.getElementById('userincrease').value = '';		document.getElementById('usercalculation').value = '';	}