		amounts1 = new Array (5);
		amounts2 = new Array (5);
		amounts3 = new Array (5);
		amounts4 = new Array (5);
		amounts5 = new Array (5);
		amounts6 = new Array (5);
		amounts7 = new Array (5);
		stopcontribs = new Array (7);
		
		var currentTime;
		var otherTime;
	
		function showHelp() {
			var help1 = document.getElementById('help1');
			help1.style.display = "block";
			var help2 = document.getElementById('help2');
			help2.style.display = "block";
			var help1b = document.getElementById('help1b');
			help1b.style.display = "block";
			var help2b = document.getElementById('help2b');
			help2b.style.display = "block";
			var help3 = document.getElementById('help3');
			help3.style.display = "block";
		}
		
		function helpCalc(){
			var option2 = document.getElementById('contributionAmount');
			var annualPay = document.getElementById('annualPay');
			var contribPercent= document.getElementById('contribPercent');
			
			if(annualPay.value.length != 0 && contribPercent.value.length > 0){
				if(contribPercent.value > 100){
					alert('Your contribution percent must be between 1 and 100');
					contribPercent.value = '';
					return;
				}
				var pay = parseFloat(annualPay.value);
				var contrib = parseFloat(contribPercent.value);
				var contribTotal;
				var employerTotal;
				var employerPercent;	
				
				contribTotal = pay * (contrib / 100);
				
				var opt2 = 0;
				if(contribTotal > 0 && contribTotal < 1001){
					opt2 = 1;
				}
				else if(contribTotal > 1000 && contribTotal < 2001){
					opt2 = 2;
				}
				else if(contribTotal > 2000 && contribTotal < 3001){
					opt2 = 3;
				}
				else if(contribTotal > 3000 && contribTotal < 4001){
					opt2 = 4;
				}
				else if(contribTotal > 4000 && contribTotal < 5001){
					opt2 = 5;
				}
				else if(contribTotal > 5000 && contribTotal < 10001){
					opt2 = 6;
				}
				else if(contribTotal > 10000 && contribTotal < 15001){
					opt2 = 7;
				}
				else if(contribTotal > 15000 && contribTotal < 20001){
					opt2 = 8;
				}
				else if(contribTotal > 20000 && contribTotal < 25001){
					opt2 = 9;
				}
				else{
					alert('Sorry, right now EBRI\'s data estimates rebuilding estimates for contribution amounts up to $25,000');
					return;
				}
				
				option2.value = opt2;
				
				contribTotal = contribTotal.toFixed(2);
				var actualamount = document.getElementById('actualamount');
				actualamount.innerHTML = '$' + addCommas(contribTotal);
				actualamount.style.display = "block";
			}
		}
		
		function addCommas(nStr) 
		{ 
		  nStr += ''; 
		  x = nStr.split('.'); 
		  x1 = x[0]; 
		  x2 = x.length > 1 ? '.' + x[1] : ''; 
		  var rgx = /(\d+)(\d{3})/; 
		  while (rgx.test(x1)) { 
		    x1 = x1.replace(rgx, '$1' + ',' + '$2'); 
		  } 
		  return x1 + x2; 
		}
		
		function clearHelp(){
			var help1 = document.getElementById('help1');
			help1.style.display = "none";
			var help2 = document.getElementById('help2');
			help2.style.display = "none";
			var help1b = document.getElementById('help1b');
			help1b.style.display = "none";
			var help2b = document.getElementById('help2b');
			help2b.style.display = "none";
			var help3 = document.getElementById('help3');
			help3.style.display = "none";
			var actualamount = document.getElementById('actualamount');
			actualamount.style.display = "none";
			
			var annualPay = document.getElementById('annualPay');
			var contribPercent= document.getElementById('contribPercent');
			
			annualPay.value = '';
			contribPercent.value = '';
		}
	
		function estimate() {
			var option1 = document.getElementById('currentBalance');
			var option2 = document.getElementById('contributionAmount');
			var option3 = document.getElementById('estimatedReturn');
			var stopTime;
			if(option1.value != 0 && option3.value != 0 && option2.value != 0){
				var opt1 = option1.value;
				var opt2 = option2.value;
				var opt3 = option3.value;				
				
				if(opt1 == 1){
					currentTime = amounts1[opt3 - 1][opt2 - 1];
					if(opt2 < 9){
						otherTime = amounts1[opt3 - 1][opt2];
						//if error situation, move up to next contrib range per Mike Crall
						//next range does not exist so do not display
						if(otherTime == 9999.9){
							otherTime = currentTime;
						}
					}
					else{
						otherTime = amounts1[opt3 - 1][opt2 - 1];
					}
					if(opt3 > 1){
						stopTime = stopcontribs[opt1 - 1][opt3 - 2];
					}
				}
				if(opt1 == 2){
					currentTime = amounts2[opt3 - 1][opt2 - 1];
					if(opt2 < 9){
						otherTime = amounts2[opt3 - 1][opt2];
						//if error situation, move up to next contrib range per Mike Crall
						if(otherTime == 9999.9){
							otherTime = amounts2[opt3 - 1][++opt2];;
							otherTimeError = true;
						}
					}
					else{
						otherTime = amounts2[opt3 - 1][opt2 - 1];
					}
					if(opt3 > 1){
						stopTime = stopcontribs[opt1 - 1][opt3 - 2];
					}
				}
				if(opt1 == 3){
					currentTime = amounts3[opt3 - 1][opt2 - 1];
					if(opt2 < 9){
						otherTime = amounts3[opt3 - 1][opt2];
						//if error situation, move up to next contrib range per Mike Crall
						if(otherTime == 9999.9){
							otherTime = amounts3[opt3 - 1][++opt2];
						}
					}
					else{
						otherTime = amounts3[opt3 - 1][opt2 - 1];
					}
					if(opt3 > 1){
						stopTime = stopcontribs[opt1 - 1][opt3 - 2];
					}
				}
				if(opt1 == 4){
					currentTime = amounts4[opt3 - 1][opt2 - 1];
					if(opt2 < 9){
						otherTime = amounts4[opt3 - 1][opt2];
						//if error situation, move up to next contrib range per Mike Crall
						if(otherTime == 9999.9){
							otherTime = amounts4[opt3 - 1][++opt2];;
							otherTimeError = true;
						}
					}
					else{
						otherTime = amounts4[opt3 - 1][opt2 - 1];
					}
					if(opt3 > 1){
						stopTime = stopcontribs[opt1 - 1][opt3 - 2];
					}
				}
				if(opt1 == 5){
					currentTime = amounts5[opt3 - 1][opt2 - 1];
					if(opt2 < 9){
						otherTime = amounts5[opt3 - 1][opt2];
						//if error situation, move up to next contrib range per Mike Crall
						if(otherTime == 9999.9){
							otherTime = amounts5[opt3 - 1][++opt2];
						}
					}
					else{
						otherTime = amounts5[opt3 - 1][opt2 - 1];
					}
					if(opt3 > 1){
						stopTime = stopcontribs[opt1 - 1][opt3 - 2];
					}
				}
				if(opt1 == 6){
					currentTime = amounts6[opt3 - 1][opt2 - 1];
					if(opt2 < 9){
						otherTime = amounts6[opt3 - 1][opt2];
						//if error situation, move up to next contrib range per Mike Crall
						if(otherTime == 9999.9){
							otherTime = amounts6[opt3 - 1][++opt2];
						}
					}
					else{
						otherTime = amounts6[opt3 - 1][opt2 - 1];
					}
					if(opt3 > 1){
						stopTime = stopcontribs[opt1 - 1][opt3 - 2];
					}
				}
				if(opt1 == 7){

					currentTime = amounts7[opt3 - 1][opt2 - 1];
					if(opt2 < 9){
						otherTime = amounts7[opt3 - 1][opt2];
						//if error situation, move up to next contrib range per Mike Crall
						if(otherTime == 9999.9){
							otherTime = amounts7[opt3 - 1][++opt2];
						}
					}
					else{
						otherTime = amounts7[opt3 - 1][opt2 - 1];
					}
					if(opt3 > 1){
						stopTime = stopcontribs[opt1 - 1][opt3 - 2];
					}
				}
				//Some values create error situations, these situtaions are represented as 9999.9
				if(currentTime == 9999.9){
					//show error section
					var errorsection = document.getElementById('errorsection');
					errorsection.style.display = "block";
					//hide other sections
					var section1 = document.getElementById('section1');
					section1.style.display = "none";
					var altsection1 = document.getElementById('altsection1');
					altsection1.style.display = "none";
					var section2 = document.getElementById('section2');
					section2.style.display = "none";
					var altsection2 = document.getElementById('altsection2');
					altsection2.style.display = "none";
					var section3 = document.getElementById('section3');
					section3.style.display = "none";
					return;
				}
				
				var currentYear = currentTime.toFixed(0);
				if(currentYear > currentTime){
					currentYear = currentYear - 1;
				}
				var otherYear = otherTime.toFixed(0);
				if(otherYear > otherTime){
					otherYear = otherYear - 1;
				}
				if(stopTime){
				var stopYear = stopTime.toFixed(0);
				if(stopYear > stopTime){
					stopYear = stopYear - 1;
				}
				}
				var currentMonth = currentTime - currentYear;
				currentMonth = currentMonth * 12;
				currentMonth = currentMonth.toFixed(0);
				var otherMonth = otherTime - otherYear;
				otherMonth = otherMonth * 12;
				otherMonth = otherMonth.toFixed(0);
				var stopMonth = stopTime - stopYear;
				if(stopTime){
				stopMonth = stopMonth * 12;
				stopMonth = stopMonth.toFixed(0);
				}
				
				var result1 = document.getElementById('result1');
				var result2 = document.getElementById('result2');
				var result3 = document.getElementById('result3');
				var result4 = document.getElementById('result4');
				if(currentYear != 0){
					result1.innerHTML = currentYear + ' ';
					if(currentYear == 1){
						result2.innerHTML = 'year ';
					}
					else{
						result2.innerHTML = 'years ';
					}
				}
				else{
					result1.innerHTML = '';
					result2.innerHTML = '';
				}
				if(currentMonth != 0){
					result3.innerHTML = currentMonth + ' ';
					if(currentMonth == 1){
						result4.innerHTML = 'month ';
					}
					else{
						result4.innerHTML = 'months ';
					}
				}
				else{
					result3.innerHTML = '';
					result4.innerHTML = '';
				}
				var other1 = document.getElementById('other1');
				var other2 = document.getElementById('other2');
				var other3 = document.getElementById('other3');
				var other4 = document.getElementById('other4');
				if(otherYear != 0){
				other1.innerHTML = otherYear + ' ';
					if(otherYear == 1){
						other2.innerHTML = 'year ';
					}
					else{
						other2.innerHTML = 'years ';
					}
				}
				else{
					other1.innerHTML = '';
					other2.innerHTML = '';
				}
				if(otherMonth != 0){
				other3.innerHTML = otherMonth + ' ';
					if(otherMonth == 1){
						other4.innerHTML = 'month ';
					}
					else{
						other4.innerHTML = 'months ';
					}
				}
				else{
					other3.innerHTML = '';
					other4.innerHTML = '';
				}
				
				if(stopTime){
				var stop1 = document.getElementById('stop1');
				var stop2 = document.getElementById('stop2');
				var stop3 = document.getElementById('stop3');
				var stop4 = document.getElementById('stop4');
				if(stopYear != 0){
				stop1.innerHTML = stopYear + ' ';
					if(stopYear == 1){
						stop2.innerHTML = 'year ';
					}
					else{
						stop2.innerHTML = 'years ';
					}
				}
				else{
					stop1.innerHTML = '';
					stop2.innerHTML = '';
				}
				if(stopMonth != 0){
				stop3.innerHTML = stopMonth + ' ';
					if(stopMonth == 1){
						stop4.innerHTML = 'month ';
					}
					else{
						stop4.innerHTML = 'months ';
					}
				}
				else{
					stop3.innerHTML = '';
					stop4.innerHTML = '';
				}
				}
				
				var otherAmounts = document.getElementById('otherAmounts');
				var otherAmounts2 = document.getElementById('otherAmounts2');
				
				//increased to next range if otherTime was an 9999.9 error situation, happened when ++opt2 above

				if(opt2 == 1){
					otherAmounts.innerHTML = '$1,001 and $2,000 ';
					otherAmounts2.innerHTML = '$1,001 and $2,000 ';
				}
				if(opt2 == 2){
					otherAmounts.innerHTML = '$2,001 and $3,000 ';
					otherAmounts2.innerHTML = '$2,001 and $3,000 ';
				}
				if(opt2 == 3){
					otherAmounts.innerHTML = '$3,001 and $4,000 ';
					otherAmounts2.innerHTML = '$3,001 and $4,000 ';
				}
				if(opt2 == 4){
					otherAmounts.innerHTML = '$4,001 and $5,000 ';
					otherAmounts2.innerHTML = '$4,001 and $5,000 ';
				}
				if(opt2 == 5){
					otherAmounts.innerHTML = '$5,001 and $10,000 ';
					otherAmounts2.innerHTML = '$5,001 and $10,000 ';
				}
				if(opt2 == 6){
					otherAmounts.innerHTML = '$10,001 and $15,000 ';
					otherAmounts2.innerHTML = '$10,001 and $15,000 ';
				}
				if(opt2 == 7){
					otherAmounts.innerHTML = '$15,001 and $20,000 ';
					otherAmounts2.innerHTML = '$15,001 and $20,000 ';
				}
				if(opt2 == 8){
					otherAmounts.innerHTML = '$20,001 and $25,000 ';
					otherAmounts2.innerHTML = '$20,001 and $25,000 ';
				}
				
				var errorsection = document.getElementById('errorsection');
				errorsection.style.display = "none";
				
				if(currentYear != 0 || currentMonth != 0){
					var altsection1 = document.getElementById('altsection1');
					altsection1.style.display = "none";
					var section1 = document.getElementById('section1');
					section1.style.display = "block";
				}
				else{
					var section1 = document.getElementById('section1');
					section1.style.display = "none";
					var altsection1 = document.getElementById('altsection1');
					altsection1.style.display = "block";
				}
				if(currentTime != otherTime){
					if(otherYear != 0 || otherMonth != 0){
						var altsection2 = document.getElementById('altsection2');
						altsection2.style.display = "none";
						var section2 = document.getElementById('section2');
						section2.style.display = "block";
					}
					else{
						var section2 = document.getElementById('section2');
						section2.style.display = "none";
					//	var altsection2 = document.getElementById('altsection2');
					//	altsection2.style.display = "block";
					}
				}
				else{
					var section2 = document.getElementById('section2');
					section2.style.display = "none";
					var altsection2 = document.getElementById('altsection2');
					altsection2.style.display = "none";
				}
				if(opt3 > 1){
					var section3 = document.getElementById('section3');
					section3.style.display = "block";
				}
				else{
					var section3 = document.getElementById('section3');
					section3.style.display = "none";
				}
				var takeaction= document.getElementById('takeaction');
				takeaction.style.display = "block";
			}
			else{
				var section1 = document.getElementById('section1');
				section1.style.display = "none";
				var altsection1 = document.getElementById('altsection1');
				altsection1.style.display = "none";
				var section2 = document.getElementById('section2');
				section2.style.display = "none";
				var altsection2 = document.getElementById('altsection2');
				altsection2.style.display = "none";
				var section3 = document.getElementById('section3');
				section3.style.display = "none";
				
				if(option1.value == 0){
					alert('Please select your 401(k) balance on 12/31/2008');
					return;
				}
				if(option2.value == 0){
					alert('Please select you amount contributed annually to 401(k)');
					return;
				}
				if(option3.value == 0){
					alert('Please select an estimated rte of return');
					return;
				} 
			}
		}
		
		function loadAmounts(){
			var option1 = document.getElementById('currentBalance');
			var option2 = document.getElementById('contributionAmount');
			var option3 = document.getElementById('estimatedReturn');
			
			option1.value = 0;
			option2.value = 0;
			option3.value = 0;
			
			for(i=0; i < amounts1.length; i++){
				amounts1 [i] = new Array(9);
			}
			for(i=0; i < amounts2.length; i++){
				amounts2 [i] = new Array(9);
			}
			for(i=0; i < amounts3.length; i++){
				amounts3 [i] = new Array(9);
			}
			for(i=0; i < amounts4.length; i++){
				amounts4 [i] = new Array(9);
			}
			for(i=0; i < amounts5.length; i++){
				amounts5 [i] = new Array(9);
			}
			for(i=0; i < amounts6.length; i++){
				amounts6 [i] = new Array(9);
			}
			for(i=0; i < amounts7.length; i++){
				amounts7 [i] = new Array(9);
			}
			for(i=0; i < stopcontribs.length; i++){
				stopcontribs [i] = new Array(4);
			}
			
			//0-24,999 range
			amounts1 [0] [0] = 13.7;
			amounts1 [0] [1] = 3.4;
			amounts1 [0] [2] = 2.5;
			amounts1 [0] [3] = 2.0;
			amounts1 [0] [4] = 1.5;
			amounts1 [0] [5] = 0.9;
			amounts1 [0] [6] = 0.3;
			amounts1 [0] [7] = 0.1;
			amounts1 [0] [8] = 9999.9;
			amounts1 [1] [0] = 8.9;
			amounts1 [1] [1] = 3.0;
			amounts1 [1] [2] = 2.3;
			amounts1 [1] [3] = 1.8;
			amounts1 [1] [4] = 1.4;
			amounts1 [1] [5] = 0.9;
			amounts1 [1] [6] = 0.3;
			amounts1 [1] [7] = 0.1;
			amounts1 [1] [8] = 9999.9;
			amounts1 [2] [0] = 6.7;
			amounts1 [2] [1] = 2.6;
			amounts1 [2] [2] = 2.1;
			amounts1 [2] [3] = 1.7;
			amounts1 [2] [4] = 1.3;
			amounts1 [2] [5] = 0.8;
			amounts1 [2] [6] = 0.3;
			amounts1 [2] [7] = 0.1;
			amounts1 [2] [8] = 9999.9;
			amounts1 [3] [0] = 5.5;
			amounts1 [3] [1] = 2.4;
			amounts1 [3] [2] = 1.9;
			amounts1 [3] [3] = 1.6;
			amounts1 [3] [4] = 1.2;
			amounts1 [3] [5] = 0.8;
			amounts1 [3] [6] = 0.3;
			amounts1 [3] [7] = 0.1;
			amounts1 [3] [8] = 9999.9;
			amounts1 [4] [0] = 4.6;
			amounts1 [4] [1] = 2.2;
			amounts1 [4] [2] = 1.7;
			amounts1 [4] [3] = 1.5;
			amounts1 [4] [4] = 1.2;
			amounts1 [4] [5] = 0.7;
			amounts1 [4] [6] = 0.3;
			amounts1 [4] [7] = 0.1;
			amounts1 [4] [8] = 9999.9;
			
			//25,000-49,999 range
			amounts2 [0] [0] = 194.7;
			amounts2 [0] [1] = 16.9;
			amounts2 [0] [2] = 8.8;
			amounts2 [0] [3] = 6.0;
			amounts2 [0] [4] = 4.7;
			amounts2 [0] [5] = 3.1;
			amounts2 [0] [6] = 1.5;
			amounts2 [0] [7] = .07;
			amounts2 [0] [8] = 0.3;
			amounts2 [1] [0] = 25.6;
			amounts2 [1] [1] = 11.1;
			amounts2 [1] [2] = 6.8;
			amounts2 [1] [3] = 4.9;
			amounts2 [1] [4] = 4.0;
			amounts2 [1] [5] = 2.8;
			amounts2 [1] [6] = 1.4;
			amounts2 [1] [7] = 0.6;
			amounts2 [1] [8] = 0.3;
			amounts2 [2] [0] = 14.5;
			amounts2 [2] [1] = 8.2;
			amounts2 [2] [2] = 5.5;
			amounts2 [2] [3] = 4.2;
			amounts2 [2] [4] = 3.5;
			amounts2 [2] [5] = 2.5;
			amounts2 [2] [6] = 1.3;
			amounts2 [2] [7] = 0.6;
			amounts2 [2] [8] = 0.3;
			amounts2 [3] [0] = 10.2;
			amounts2 [3] [1] = 6.6;
			amounts2 [3] [2] = 4.6;
			amounts2 [3] [3] = 3.6;
			amounts2 [3] [4] = 3.1;
			amounts2 [3] [5] = 2.3;
			amounts2 [3] [6] = 1.2;
			amounts2 [3] [7] = 0.6;
			amounts2 [3] [8] = 0.3;
			amounts2 [4] [0] = 7.9;
			amounts2 [4] [1] = 5.5;
			amounts2 [4] [2] = 4.0;
			amounts2 [4] [3] = 3.2;
			amounts2 [4] [4] = 2.8;
			amounts2 [4] [5] = 2.1;
			amounts2 [4] [6] = 1.1;
			amounts2 [4] [7] = 0.5;
			amounts2 [4] [8] = 0.3;
			
			//50,000-99,999 range
			amounts3 [0] [0] = 465.3;
			amounts3 [0] [1] = 32.9;
			amounts3 [0] [2] = 18.5;
			amounts3 [0] [3] = 11.8;
			amounts3 [0] [4] = 9.0;
			amounts3 [0] [5] = 5.9;
			amounts3 [0] [6] = 3.5;
			amounts3 [0] [7] = 2.4;
			amounts3 [0] [8] = 1.7;
			amounts3 [1] [0] = 28.4;
			amounts3 [1] [1] = 16.1;
			amounts3 [1] [2] = 11.6;
			amounts3 [1] [3] = 8.4;
			amounts3 [1] [4] = 6.8;
			amounts3 [1] [5] = 4.8;
			amounts3 [1] [6] = 3.1;
			amounts3 [1] [7] = 2.2;
			amounts3 [1] [8] = 1.6;
			amounts3 [2] [0] = 15.4;
			amounts3 [2] [1] = 10.8;
			amounts3 [2] [2] = 8.5;
			amounts3 [2] [3] = 6.5;
			amounts3 [2] [4] = 5.5;
			amounts3 [2] [5] = 4.1;
			amounts3 [2] [6] = 2.7;
			amounts3 [2] [7] = 2.0;
			amounts3 [2] [8] = 1.5;
			amounts3 [3] [0] = 10.6;
			amounts3 [3] [1] = 8.1;
			amounts3 [3] [2] = 6.7;
			amounts3 [3] [3] = 5.3;
			amounts3 [3] [4] = 4.6;
			amounts3 [3] [5] = 3.5;
			amounts3 [3] [6] = 2.5;
			amounts3 [3] [7] = 1.9;
			amounts3 [3] [8] = 1.4;
			amounts3 [4] [0] = 8.1;
			amounts3 [4] [1] = 6.5;
			amounts3 [4] [2] = 5.5;
			amounts3 [4] [3] = 4.5;
			amounts3 [4] [4] = 4.0;
			amounts3 [4] [5] = 3.1;
			amounts3 [4] [6] = 2.3;
			amounts3 [4] [7] = 1.7;
			amounts3 [4] [8] = 1.3;
			
			//100,000-149,999
			amounts4 [0] [0] = 770.3;
			amounts4 [0] [1] = 57.9;
			amounts4 [0] [2] = 30.6;
			amounts4 [0] [3] = 20.7;
			amounts4 [0] [4] = 15.5;
			amounts4 [0] [5] = 9.6;
			amounts4 [0] [6] = 5.8;
			amounts4 [0] [7] = 4.0;
			amounts4 [0] [8] = 3.0;
			amounts4 [1] [0] = 30.2;
			amounts4 [1] [1] = 21.1;
			amounts4 [1] [2] = 15.5;
			amounts4 [1] [3] = 12.4;
			amounts4 [1] [4] = 10.2;
			amounts4 [1] [5] = 7.1;
			amounts4 [1] [6] = 4.8;
			amounts4 [1] [7] = 3.4;
			amounts4 [1] [8] = 2.7;
			amounts4 [2] [0] = 15.9;
			amounts4 [2] [1] = 12.9;
			amounts4 [2] [2] = 10.4;
			amounts4 [2] [3] = 8.8;
			amounts4 [2] [4] = 7.6;
			amounts4 [2] [5] = 5.6;
			amounts4 [2] [6] = 4.1;
			amounts4 [2] [7] = 3.1;
			amounts4 [2] [8] = 2.5;
			amounts4 [3] [0] = 10.9;
			amounts4 [3] [1] = 9.3;
			amounts4 [3] [2] = 7.9;
			amounts4 [3] [3] = 6.9;
			amounts4 [3] [4] = 6.0;
			amounts4 [3] [5] = 4.7;
			amounts4 [3] [6] = 3.6;
			amounts4 [3] [7] = 2.7;
			amounts4 [3] [8] = 2.2;
			amounts4 [4] [0] = 8.3;
			amounts4 [4] [1] = 7.3;
			amounts4 [4] [2] = 6.3;
			amounts4 [4] [3] = 5.6;
			amounts4 [4] [4] = 5.0;
			amounts4 [4] [5] = 4.0;
			amounts4 [4] [6] = 3.2;
			amounts4 [4] [7] = 2.5;
			amounts4 [4] [8] = 2.1;
			
			//150,000-199,999 range
			amounts5 [0] [0] = 755.5;
			amounts5 [0] [1] = 72.4;
			amounts5 [0] [2] = 42.4;
			amounts5 [0] [3] = 28.8;
			amounts5 [0] [4] = 22.4;
			amounts5 [0] [5] = 13.1;
			amounts5 [0] [6] = 7.9;
			amounts5 [0] [7] = 5.7;
			amounts5 [0] [8] = 4.4;
			amounts5 [1] [0] = 29.2;
			amounts5 [1] [1] = 21.1;
			amounts5 [1] [2] = 18.1;
			amounts5 [1] [3] = 15.1;
			amounts5 [1] [4] = 12.8;
			amounts5 [1] [5] = 8.8;
			amounts5 [1] [6] = 6.2;
			amounts5 [1] [7] = 4.7;
			amounts5 [1] [8] = 3.7;
			amounts5 [2] [0] = 15.3;
			amounts5 [2] [1] = 12.4;
			amounts5 [2] [2] = 11.4;
			amounts5 [2] [3] = 10.2;
			amounts5 [2] [4] = 9.0;
			amounts5 [2] [5] = 6.7;
			amounts5 [2] [6] = 5.1;
			amounts5 [2] [7] = 4.0;
			amounts5 [2] [8] = 3.3;
			amounts5 [3] [0] = 10.3;
			amounts5 [3] [1] = 8.8;
			amounts5 [3] [2] = 8.3;
			amounts5 [3] [3] = 7.7;
			amounts5 [3] [4] = 6.9;
			amounts5 [3] [5] = 5.5;
			amounts5 [3] [6] = 4.3;
			amounts5 [3] [7] = 3.5;
			amounts5 [3] [8] = 3.0;
			amounts5 [4] [0] = 7.8;
			amounts5 [4] [1] = 6.9;
			amounts5 [4] [2] = 6.6;
			amounts5 [4] [3] = 6.2;
			amounts5 [4] [4] = 5.6;
			amounts5 [4] [5] = 4.6;
			amounts5 [4] [6] = 3.7;
			amounts5 [4] [7] = 3.1;
			amounts5 [4] [8] = 2.7;
			
			//200,000-249,999 range
			amounts6 [0] [0] = 996.4;
			amounts6 [0] [1] = 97.7;
			amounts6 [0] [2] = 59.7;
			amounts6 [0] [3] = 37.3;
			amounts6 [0] [4] = 29.8;
			amounts6 [0] [5] = 16.6;
			amounts6 [0] [6] = 9.9;
			amounts6 [0] [7] = 7.2;
			amounts6 [0] [8] = 5.6;
			amounts6 [1] [0] = 29.6;
			amounts6 [1] [1] = 25.1;
			amounts6 [1] [2] = 22.0;
			amounts6 [1] [3] = 16.2;
			amounts6 [1] [4] = 15.4;
			amounts6 [1] [5] = 10.3;
			amounts6 [1] [6] = 7.3;
			amounts6 [1] [7] = 5.7;
			amounts6 [1] [8] = 4.7;
			amounts6 [2] [0] = 15.4;
			amounts6 [2] [1] = 14.3;
			amounts6 [2] [2] = 13.5;
			amounts6 [2] [3] = 10.5;
			amounts6 [2] [4] = 10.5;
			amounts6 [2] [5] = 7.6;
			amounts6 [2] [6] = 5.8;
			amounts6 [2] [7] = 4.8;
			amounts6 [2] [8] = 4.0;
			amounts6 [3] [0] = 10.5;
			amounts6 [3] [1] = 9.9;
			amounts6 [3] [2] = 9.7;
			amounts6 [3] [3] = 7.8;
			amounts6 [3] [4] = 7.8;
			amounts6 [3] [5] = 6.0;
			amounts6 [3] [6] = 4.8;
			amounts6 [3] [7] = 4.1;
			amounts6 [3] [8] = 3.5;
			amounts6 [4] [0] = 8.0;
			amounts6 [4] [1] = 7.6;
			amounts6 [4] [2] = 7.5;
			amounts6 [4] [3] = 6.2;
			amounts6 [4] [4] = 9999.9;
			amounts6 [4] [5] = 5.0;
			amounts6 [4] [6] = 4.1;
			amounts6 [4] [7] = 3.6;
			amounts6 [4] [8] = 3.1;
			
			//250,000+ range
			amounts7 [0] [0] = 1916.8;
			amounts7 [0] [1] = 151.5;
			amounts7 [0] [2] = 77.5;
			amounts7 [0] [3] = 53.2;
			amounts7 [0] [4] = 45.2;
			amounts7 [0] [5] = 23.6;
			amounts7 [0] [6] = 14.6;
			amounts7 [0] [7] = 10.6;
			amounts7 [0] [8] = 8.5;
			amounts7 [1] [0] = 27.9;
			amounts7 [1] [1] = 25.6;
			amounts7 [1] [2] = 22.4;
			amounts7 [1] [3] = 18.6;
			amounts7 [1] [4] = 18.3;
			amounts7 [1] [5] = 12.5;
			amounts7 [1] [6] = 9.4;
			amounts7 [1] [7] = 7.7;
			amounts7 [1] [8] = 6.5;
			amounts7 [2] [0] = 14.5;
			amounts7 [2] [1] = 14.2;
			amounts7 [2] [2] = 13.0;
			amounts7 [2] [3] = 11.1;
			amounts7 [2] [4] = 9999.9;
			amounts7 [2] [5] = 8.6;
			amounts7 [2] [6] = 7.0;
			amounts7 [2] [7] = 6.0;
			amounts7 [2] [8] = 5.2;
			amounts7 [3] [0] = 9.8;
			amounts7 [3] [1] = 9.7;
			amounts7 [3] [2] = 9.2;
			amounts7 [3] [3] = 8.0;
			amounts7 [3] [4] = 9999.9;
			amounts7 [3] [5] = 6.6;
			amounts7 [3] [6] = 5.6;
			amounts7 [3] [7] = 5.0;
			amounts7 [3] [8] = 4.4;
			amounts7 [4] [0] = 7.4;
			amounts7 [4] [1] = 7.4;
			amounts7 [4] [2] = 7.1;
			amounts7 [4] [3] = 6.3;
			amounts7 [4] [4] = 9999.9;
			amounts7 [4] [5] = 5.3;
			amounts7 [4] [6] = 4.6;
			amounts7 [4] [7] = 4.2;
			amounts7 [4] [8] = 3.8;
			
			//For stopping contributions
			stopcontribs [0] [0] = 43.2;
			stopcontribs [0] [1] = 21.6;
			stopcontribs [0] [2] = 14.4;
			stopcontribs [0] [3] = 10.8;
			stopcontribs [1] [0] = 38.3;
			stopcontribs [1] [1] = 19.2;
			stopcontribs [1] [2] = 12.8;
			stopcontribs [1] [3] = 9.6;
			stopcontribs [2] [0] = 37.0;
			stopcontribs [2] [1] = 18.5;
			stopcontribs [2] [2] = 12.3;
			stopcontribs [2] [3] = 9.2;
			stopcontribs [3] [0] = 35.6;
			stopcontribs [3] [1] = 17.8;
			stopcontribs [3] [2] = 11.9;
			stopcontribs [3] [3] = 8.9;
			stopcontribs [4] [0] = 34.6;
			stopcontribs [4] [1] = 17.3;
			stopcontribs [4] [2] = 11.5;
			stopcontribs [4] [3] = 8.6;
			stopcontribs [5] [0] = 33.8;
			stopcontribs [5] [1] = 16.9;
			stopcontribs [5] [2] = 11.3;
			stopcontribs [5] [3] = 8.4;
			stopcontribs [6] [0] = 31.7;
			stopcontribs [6] [1] = 15.9;
			stopcontribs [6] [2] = 10.6;
			stopcontribs [6] [3] = 7.9;
		}
		
		function numbersonly(myfield, e)
		{
			var key;
			var keychar;
			
			if (window.event)
			   key = window.event.keyCode;
			else if (e)
			   key = e.which;
			else
			   return true;
			keychar = String.fromCharCode(key);
			
			// control keys
			if ((key==null) || (key==0) || (key==8) || 
			    (key==9) || (key==13) || (key==27) )
			   return true;
			
			// numbers
			if ((("0123456789").indexOf(keychar) > -1))
			   return true;
			
			//only one decimal
			if (((".").indexOf(keychar) > -1) && myfield.value.indexOf('.') == -1)
			   return true;
			
			   return false;
		}