var fees = new Array();
fees['AL'] = new Array();
fees['AK'] = new Array();
fees['AZ'] = new Array();
fees['AR'] = new Array();
fees['CA'] = new Array();
fees['CO'] = new Array();
fees['CT'] = new Array();
fees['DE'] = new Array();
fees['DC'] = new Array();
fees['FL'] = new Array();
fees['GA'] = new Array();
fees['HI'] = new Array();
fees['ID'] = new Array();
fees['IL'] = new Array();
fees['IN'] = new Array();
fees['IA'] = new Array();
fees['KS'] = new Array();
fees['KY'] = new Array();
fees['LA'] = new Array();
fees['ME'] = new Array();
fees['MD'] = new Array();
fees['MA'] = new Array();
fees['MI'] = new Array();
fees['MN'] = new Array();
fees['MS'] = new Array();
fees['MO'] = new Array();
fees['MT'] = new Array();
fees['NE'] = new Array();
fees['NV'] = new Array();
fees['NH'] = new Array();
fees['NJ'] = new Array();
fees['NM'] = new Array();
fees['NY'] = new Array();
fees['NC'] = new Array();
fees['ND'] = new Array();
fees['OH'] = new Array();
fees['OK'] = new Array();
fees['OR'] = new Array();
fees['PA'] = new Array();
fees['RI'] = new Array();
fees['SC'] = new Array();
fees['SD'] = new Array();
fees['TN'] = new Array();
fees['TX'] = new Array();
fees['UT'] = new Array();
fees['VT'] = new Array();
fees['VA'] = new Array();
fees['WA'] = new Array();
fees['WV'] = new Array();
fees['WI'] = new Array();
fees['WY'] = new Array();
fees['AL']['llc'] = 75;
fees['AK']['llc'] = 250;
fees['AZ']['llc'] = 50;
fees['AR']['llc'] = 50;
fees['CA']['llc'] = 70;
fees['CO']['llc'] = 150;
fees['CT']['llc'] = 120;
fees['DE']['llc'] = 90;
fees['DC']['llc'] = 150;
fees['FL']['llc'] = 125;
fees['GA']['llc'] = 100;
fees['HI']['llc'] = 50;
fees['ID']['llc'] = 100;
fees['IL']['llc'] = 500;
fees['IN']['llc'] = 88;
fees['IA']['llc'] = 50;
fees['KS']['llc'] = 160;
fees['KY']['llc'] = 40;
fees['LA']['llc'] = 75;
fees['ME']['llc'] = 175;
fees['MD']['llc'] = 100;
fees['MA']['llc'] = 520;
fees['MI']['llc'] = 50;
fees['MN']['llc'] = 170;
fees['MS']['llc'] = 50;
fees['MO']['llc'] = 50;
fees['MT']['llc'] = 70;
fees['NE']['llc'] = 100;
fees['NV']['llc'] = 75;
fees['NH']['llc'] = 100;
fees['NJ']['llc'] = 125;
fees['NM']['llc'] = 50;
fees['NY']['llc'] = 200;
fees['NC']['llc'] = 125;
fees['ND']['llc'] = 135;
fees['OH']['llc'] = 125;
fees['OK']['llc'] = 104;
fees['OR']['llc'] = 50;
fees['PA']['llc'] = 125;
fees['RI']['llc'] = 150;
fees['SC']['llc'] = 110;
fees['SD']['llc'] = 150;
fees['TN']['llc'] = 300;
fees['TX']['llc'] = 300;
fees['UT']['llc'] = 52;
fees['VT']['llc'] = 100;
fees['VA']['llc'] = 100;
fees['WA']['llc'] = 180;
fees['WV']['llc'] = 100;
fees['WI']['llc'] = 130;
fees['WY']['llc'] = 100;
fees['AL']['irallc'] = 75;
fees['AK']['irallc'] = 250;
fees['AZ']['irallc'] = 50;
fees['AR']['irallc'] = 50;
fees['CA']['irallc'] = 70;
fees['CO']['irallc'] = 150;
fees['CT']['irallc'] = 120;
fees['DE']['irallc'] = 90;
fees['DC']['irallc'] = 150;
fees['FL']['irallc'] = 125;
fees['GA']['irallc'] = 100;
fees['HI']['irallc'] = 50;
fees['ID']['irallc'] = 100;
fees['IL']['irallc'] = 500;
fees['IN']['irallc'] = 88;
fees['IA']['irallc'] = 50;
fees['KS']['irallc'] = 160;
fees['KY']['irallc'] = 40;
fees['LA']['irallc'] = 75;
fees['ME']['irallc'] = 175;
fees['MD']['irallc'] = 100;
fees['MA']['irallc'] = 520;
fees['MI']['irallc'] = 50;
fees['MN']['irallc'] = 170;
fees['MS']['irallc'] = 50;
fees['MO']['irallc'] = 50;
fees['MT']['irallc'] = 70;
fees['NE']['irallc'] = 100;
fees['NV']['irallc'] = 75;
fees['NH']['irallc'] = 100;
fees['NJ']['irallc'] = 125;
fees['NM']['irallc'] = 50;
fees['NY']['irallc'] = 200;
fees['NC']['irallc'] = 125;
fees['ND']['irallc'] = 135;
fees['OH']['irallc'] = 125;
fees['OK']['irallc'] = 104;
fees['OR']['irallc'] = 50;
fees['PA']['irallc'] = 125;
fees['RI']['irallc'] = 150;
fees['SC']['irallc'] = 110;
fees['SD']['irallc'] = 150;
fees['TN']['irallc'] = 300;
fees['TX']['irallc'] = 300;
fees['UT']['irallc'] = 52;
fees['VT']['irallc'] = 100;
fees['VA']['irallc'] = 100;
fees['WA']['irallc'] = 180;
fees['WV']['irallc'] = 100;
fees['WI']['irallc'] = 130;
fees['WY']['irallc'] = 100;
fees['AL']['seriesllc'] = 0;
fees['AK']['seriesllc'] = 0;
fees['AZ']['seriesllc'] = 0;
fees['AR']['seriesllc'] = 0;
fees['CA']['seriesllc'] = 0;
fees['CO']['seriesllc'] = 0;
fees['CT']['seriesllc'] = 0;
fees['DE']['seriesllc'] = 90;
fees['DC']['seriesllc'] = 0;
fees['FL']['seriesllc'] = 0;
fees['GA']['seriesllc'] = 0;
fees['HI']['seriesllc'] = 0;
fees['ID']['seriesllc'] = 0;
fees['IL']['seriesllc'] = 750;
fees['IN']['seriesllc'] = 0;
fees['IA']['seriesllc'] = 50;
fees['KS']['seriesllc'] = 0;
fees['KY']['seriesllc'] = 0;
fees['LA']['seriesllc'] = 0;
fees['ME']['seriesllc'] = 0;
fees['MD']['seriesllc'] = 0;
fees['MA']['seriesllc'] = 0;
fees['MI']['seriesllc'] = 0;
fees['MN']['seriesllc'] = 0;
fees['MS']['seriesllc'] = 0;
fees['MO']['seriesllc'] = 0;
fees['MT']['seriesllc'] = 0;
fees['NE']['seriesllc'] = 0;
fees['NV']['seriesllc'] = 75;
fees['NH']['seriesllc'] = 0;
fees['NJ']['seriesllc'] = 0;
fees['NM']['seriesllc'] = 0;
fees['NY']['seriesllc'] = 0;
fees['NC']['seriesllc'] = 0;
fees['ND']['seriesllc'] = 0;
fees['OH']['seriesllc'] = 0;
fees['OK']['seriesllc'] = 104;
fees['OR']['seriesllc'] = 0;
fees['PA']['seriesllc'] = 0;
fees['RI']['seriesllc'] = 0;
fees['SC']['seriesllc'] = 0;
fees['SD']['seriesllc'] = 0;
fees['TN']['seriesllc'] = 300;
fees['TX']['seriesllc'] = 300;
fees['UT']['seriesllc'] = 70;
fees['VT']['seriesllc'] = 0;
fees['VA']['seriesllc'] = 0;
fees['WA']['seriesllc'] = 0;
fees['WV']['seriesllc'] = 0;
fees['WI']['seriesllc'] = 0;
fees['WY']['seriesllc'] = 0;
fees['AK']['state'] = 'Alaska';
fees['AL']['state'] = 'Alabama';
fees['AR']['state'] = 'Arkansas';
fees['AZ']['state'] = 'Arizona';
fees['CA']['state'] = 'California';
fees['CO']['state'] = 'Colorado';
fees['CT']['state'] = 'Connecticut';
fees['DC']['state'] = 'D.C.';
fees['DE']['state'] = 'Delaware';
fees['FL']['state'] = 'Florida';
fees['GA']['state'] = 'Georgia';
fees['HI']['state'] = 'Hawaii';
fees['IA']['state'] = 'Iowa';
fees['ID']['state'] = 'Idaho';
fees['IL']['state'] = 'Illinois';
fees['IN']['state'] = 'Indiana';
fees['KS']['state'] = 'Kansas';
fees['KY']['state'] = 'Kentucky';
fees['LA']['state'] = 'Louisiana';
fees['MA']['state'] = 'Massachusetts';
fees['MD']['state'] = 'Maryland';
fees['ME']['state'] = 'Maine';
fees['MI']['state'] = 'Michigan';
fees['MN']['state'] = 'Minnesota';
fees['MO']['state'] = 'Missouri';
fees['MS']['state'] = 'Mississippi';
fees['MT']['state'] = 'Montana';
fees['NC']['state'] = 'North Carolina';
fees['ND']['state'] = 'North Dakota';
fees['NE']['state'] = 'Nebraska';
fees['NH']['state'] = 'New Hampshire';
fees['NJ']['state'] = 'New Jersey';
fees['NM']['state'] = 'New Mexico';
fees['NV']['state'] = 'Nevada';
fees['NY']['state'] = 'New York';
fees['OH']['state'] = 'Ohio';
fees['OK']['state'] = 'Oklahoma';
fees['OR']['state'] = 'Oregon';
fees['PA']['state'] = 'Pennsylvania';
fees['RI']['state'] = 'Rhode Island';
fees['SC']['state'] = 'South Carolina';
fees['SD']['state'] = 'South Dakota';
fees['TN']['state'] = 'Tennessee';
fees['TX']['state'] = 'Texas';
fees['UT']['state'] = 'Utah';
fees['VA']['state'] = 'Virginia';
fees['VT']['state'] = 'Vermont';
fees['WA']['state'] = 'Washington';
fees['WI']['state'] = 'Wisconsin';
fees['WV']['state'] = 'West Virginia';
fees['WY']['state'] = 'Wyoming';

function go() {
	with (document.llcform) {
		if (state.selectedIndex && llctype.selectedIndex)
			window.location = state[state.selectedIndex].text.replace(/ /g, '_').toLowerCase() + '/' + llctype[llctype.selectedIndex].value + '/step1';
	}
}
function updateState() {
	with (document.llcform) {
		var seriesllc = false;
		for (var i = 0; i < llctype.options.length; i++)
			if (llctype.options[i].value == 'seriesllc')
				seriesllc = true;
		switch (state[state.selectedIndex].value) {
			case 'DE':
			case 'IL':
			case 'IA':
			case 'NV':
			case 'OK':
			case 'TN':
			case 'TX':
			case 'UT':
						
				if (!seriesllc) 
					llctype.options[llctype.options.length] = new Option('Series LLC', 'seriesllc');
				break;

			default:
				if (seriesllc)
					llctype.options.length--;
		}
	}
	update();
}

function updateLLCType() {
	with (document.llcform) {
		var _state = state[state.selectedIndex].value;
		if (llctype[llctype.selectedIndex].value == 'seriesllc') {
			state.options.length = 0;
			state.options[0] = new Option("Select a State", "");
			for (var i in fees) {
				if (fees[i]['seriesllc'] != 0)
				state.options[state.options.length] = new Option(fees[i]['state'], i);
			}
			for (var i = 0; i < state.options.length; i++) {
				if (state[i].value == _state) {
					state.selectedIndex = i;
					break;
				}
			}
		} else if (state.options.length < 15) {
			state.options.length = 0;
			state.options[0] = new Option("Select a State", "");
			for (var i in fees) {
				state.options[state.options.length] = new Option(fees[i]['state'], i);
			}
			for (var i = 0; i < state.options.length; i++) {
				if (state[i].value == _state) {
					state.selectedIndex = i;
					break;
				}
			}
		}
	}
	update();
}

function update() {
  with (document.llcform) {
    if (state.selectedIndex && llctype.selectedIndex) {
      document.getElementById("statename").innerHTML = state[state.selectedIndex].text;
      document.getElementById("fee").innerHTML = fees[state[state.selectedIndex].value][llctype[llctype.selectedIndex].value];
      document.getElementById("total").innerHTML = fees[state[state.selectedIndex].value][llctype[llctype.selectedIndex].value];
    }
  }
} 
