
var sections = new Array('front', 'center', 'rear');
var hullSections = new Array('1', '2', '3', '4', '5', '6');
var coreSection = 'core';
var habitatOptions = new Array('Standard Labs', 'Physics Labs', 'Science! Labs', 'Automeds', 'Teleporters', 'One-Way Teleporters', 'Minifacs', 'Less Control Stations', 'Less Medium Batteries', 'Less Secondary Batteries', 'Less Tertiary Batteries');
var designOptions = new Array('Artificial Gravity', 'Gravitic Compensators', 'Spin Gravity', 'Winged Hull', 'Stealth Hull', 'Chameleon Hull', 'Emergency Ejection', 'Genuine People Personality', 'High Automation', 'Total Automation', 'Ram-Rockets', 'NMP Drive', 'Singularity Drive', 'Hardened Front Armor', 'Hardened Center Armor', 'Hardened Rear Armor');

var sm = 5;

function print_init () {
	var getVars = getQsArgs();
	var systemListHTML = '';
	if (getVars['s'].length == 44) {
		// eat the sm first
		var serialCfg = getVars['s'];
		sm = parseInt(serialCfg.substring(0,2), 10)+5;
		document.getElementById('sm').value = sm;

		systemListHTML += '<h2>SM: ' + sm + '</h2>';

		// now do systems
		var systemCnt = 1;
		for (var i in sections) {
			systemListHTML += '<h2>'+ucFirst(sections[i])+'</h2>';
			for (j=0; j < hullSections.length; j++) {
				var sysSelectId = sections[i]+'_hull';
				var sysSelect = document.getElementById(sysSelectId);
				var selectedIndex = parseInt(serialCfg.substring(2*systemCnt, 2*systemCnt+2));
				var sysIndex = systemDesc[sections[i]]['hull'][selectedIndex];
				var firstHull = parseInt(hullSections[j]);
				var lastHull = firstHull;
				if ( selectedIndex > 0 ) {
					var power = getPowerBangs(sysIndex);
					while ( selectedIndex == parseInt(serialCfg.substring(2*systemCnt+2, 2*systemCnt+4) ) && lastHull < hullSections.length) {
						lastHull++;
						systemCnt++;
						j++;
					}
					var pluralSys = '';
					if ( lastHull != firstHull ) {
						systemListHTML += '['+firstHull+'-'+lastHull+power+'] ';
					} else {
						systemListHTML += '['+hullSections[j]+power+'] ';
					}
					systemListHTML += formatSystemIndex(sysIndex)+'<br/>';
				}
				systemCnt++;
			}
			var sysSelectId = sections[i]+'_core';
			var sysSelect = document.getElementById(sysSelectId);
			var selectedIndex = parseInt(serialCfg.substring(2*systemCnt, 2*systemCnt+2));
			systemCnt++;
			if (selectedIndex > 0 ) {
				var power = getPowerBangs(systemDesc[sections[i]]['core'][selectedIndex]);
				systemListHTML += '[core'+power+'] '+formatSystemIndex(systemDesc[sections[i]]['core'][selectedIndex])+'<br/>';
			}
		}
	
		//	Now do Habitat Options
		var habHTML = ''
		if ( getVars['h'].length > 1 ) {
			for (var i in habitatOptions) {
				var habitatOptionVal = parseInt(getVars['h'].substring(2*i, 2*i+2));
				if ( habitatOptionVal > 0 )
					habHTML += '<tr><td>'+habitatOptions[i]+'</td><td>'+habitatOptionVal+'</td></tr>';
			}
		}
		if ( habHTML != '' )
			systemListHTML += '<h2>Habitat Options</h2>'+'<table>'+habHTML+'</table>';

		// Now do Design Options
		var designHTML = ''
		if ( getVars['d'].length > 1 ) {
			for (var i in designOptions) {
				i = parseInt(i);
				var designOptionVal = parseInt(getVars['d'].substring(i, i+1));
				if ( designOptionVal > 0 )
					designHTML += '<li>'+designOptions[i]+'</li>';
			}
		}
		if ( designHTML != '' )
			systemListHTML += '<h2>Design Options</h2>'+'<ul>'+designHTML+'</ul>';

//		document.write(systemListHTML);
		document.getElementById('content').innerHTML = systemListHTML;

		// Now Set Cost:
		document.getElementById('finalCost').innerHTML = getVars['c'].replace('<','');
	}
}

function ucFirst (s) {
	return s.substr(0,1).toUpperCase()+s.substr(1);
}

function formatSystemIndex (si) {
	si = si.replace(',', ':_');
	var tokens = si.split('_');
	var ucTokens = new Array;
	for (var i in tokens) {
		ucTokens.push(ucFirst(tokens[i]));
	}
	return ucTokens.join(' ');
}

function getQsArgs () {
	var qs = window.location.search.split('?')[1]; // substr eats the '?'
	if (!qs) return false;
	var keyPairResult = new Object;
	keyPairResult['s'] = '';
	keyPairResult['h'] = '';
	keyPairResult['d'] = '';
	var q = qs.split('&');
	for (var i=0; i<q.length; i++) {
		var keyPair = q[i].split('=');
		keyPairResult[keyPair[0]]=keyPair[1];
	}
	return keyPairResult;
}

var sm = new Array;
sm[1] = '5';
sm[2] = '6';
sm[3] = '7';
sm[4] = '8';
sm[5] = '9';
sm[6] = '10';
sm[7] = '11';
sm[8] = '12';
sm[9] = '13';
sm[10] = '14';
sm[11] = '15';

var systemDesc = new Object;
for (var i in sections) {
	systemDesc[sections[i]] = new Object;
	systemDesc[sections[i]]['hull'] = new Array;
	systemDesc[sections[i]]['core'] = new Array;
}

systemDesc['center']['core'][1] = 'cargo_hold';
systemDesc['center']['core'][2] = 'cloaking_device';
systemDesc['center']['core'][3] = 'contragravity_lifter';
systemDesc['center']['core'][4] = 'control_room';
systemDesc['center']['core'][5] = 'defensive_ecm';
systemDesc['center']['core'][6] = 'engine_room';
systemDesc['center']['core'][7] = 'factory,fabricator';
systemDesc['center']['core'][8] = 'factory,robofac';
systemDesc['center']['core'][9] = 'factory,nanofactory';
systemDesc['center']['core'][10] = 'factory,replicator';
systemDesc['center']['core'][11] = 'force_screen,light';
systemDesc['center']['core'][12] = 'force_screen,heavy';
systemDesc['center']['core'][13] = 'fuel_tank';
systemDesc['center']['core'][14] = 'habitat';
systemDesc['center']['core'][15] = 'mining';
systemDesc['center']['core'][16] = 'refinery';
systemDesc['center']['core'][17] = 'open_space';
systemDesc['center']['core'][18] = 'passenger_seating';
systemDesc['center']['core'][19] = 'power_plant,chemical';
systemDesc['center']['core'][20] = 'power_plant,mhd_turbine';
systemDesc['center']['core'][21] = 'power_plant,fission';
systemDesc['center']['core'][22] = 'power_plant,fusion';
systemDesc['center']['core'][23] = 'power_plant,antimatter';
systemDesc['center']['core'][24] = 'power_plant,super_fusion';
systemDesc['center']['core'][25] = 'power_plant,total_conversion';
systemDesc['center']['core'][26] = 'stardrive';
systemDesc['center']['core'][27] = 'super_stardrive';
systemDesc['center']['core'][28] = 'stasis_web';
systemDesc['center']['core'][29] = 'weapons,spinal_battery';
systemDesc['center']['hull'][1] = 'armor,ice';
systemDesc['center']['hull'][2] = 'armor,rock';
systemDesc['center']['hull'][3] = 'armor,steel';
systemDesc['center']['hull'][4] = 'armor,light_alloy';
systemDesc['center']['hull'][5] = 'armor,metallic_laminate';
systemDesc['center']['hull'][6] = 'armor,adv_metallic_laminate';
systemDesc['center']['hull'][7] = 'armor,nanocomposite';
systemDesc['center']['hull'][8] = 'armor,organic';
systemDesc['center']['hull'][9] = 'armor,diamondoid';
systemDesc['center']['hull'][10] = 'armor,exotic_laminate';
systemDesc['center']['hull'][11] = 'armor,indestructable';
systemDesc['center']['hull'][12] = 'cargo_hold';
systemDesc['center']['hull'][13] = 'cloaking_device';
systemDesc['center']['hull'][14] = 'contragravity_lifter';
systemDesc['center']['hull'][15] = 'control_room';
systemDesc['center']['hull'][16] = 'defensive_ecm';
systemDesc['center']['hull'][17] = 'engine_room';
systemDesc['center']['hull'][18] = 'array,enhanced';
systemDesc['center']['hull'][19] = 'array,science';
systemDesc['center']['hull'][20] = 'array,tactical';
systemDesc['center']['hull'][21] = 'array,multipurpose';
systemDesc['center']['hull'][22] = 'external_clamp';
systemDesc['center']['hull'][23] = 'factory,fabricator';
systemDesc['center']['hull'][24] = 'factory,robofac';
systemDesc['center']['hull'][25] = 'factory,nanofactory';
systemDesc['center']['hull'][26] = 'factory,replicator';
systemDesc['center']['hull'][27] = 'force_screen,light';
systemDesc['center']['hull'][28] = 'force_screen,heavy';
systemDesc['center']['hull'][29] = 'fuel_tank';
systemDesc['center']['hull'][30] = 'habitat';
systemDesc['center']['hull'][31] = 'hangar_bay';
systemDesc['center']['hull'][32] = 'jump_gate';
systemDesc['center']['hull'][33] = 'mining';
systemDesc['center']['hull'][34] = 'refinery';
systemDesc['center']['hull'][35] = 'open_space';
systemDesc['center']['hull'][36] = 'passenger_seating';
systemDesc['center']['hull'][37] = 'power_plant,chemical';
systemDesc['center']['hull'][38] = 'power_plant,mhd_turbine';
systemDesc['center']['hull'][39] = 'power_plant,fission';
systemDesc['center']['hull'][40] = 'power_plant,fusion';
systemDesc['center']['hull'][41] = 'power_plant,antimatter';
systemDesc['center']['hull'][42] = 'power_plant,super_fusion';
systemDesc['center']['hull'][43] = 'power_plant,total_conversion';
systemDesc['center']['hull'][44] = 'robot_arm';
systemDesc['center']['hull'][45] = 'soft-landing_system';
systemDesc['center']['hull'][46] = 'solar_panel_array';
systemDesc['center']['hull'][47] = 'space_sails';
systemDesc['center']['hull'][48] = 'stardrive';
systemDesc['center']['hull'][49] = 'super_stardrive';
systemDesc['center']['hull'][50] = 'stasis_web';
systemDesc['center']['hull'][51] = 'weapons,major_battery';
systemDesc['center']['hull'][52] = 'weapons,medium_battery';
systemDesc['center']['hull'][53] = 'weapons,secondary_battery';
systemDesc['center']['hull'][54] = 'weapons,tertiary_battery';
systemDesc['center']['hull'][55] = 'weapons,spinal_battery';
systemDesc['front']['core'][1] = 'cargo_hold';
systemDesc['front']['core'][2] = 'cloaking_device';
systemDesc['front']['core'][3] = 'contragravity_lifter';
systemDesc['front']['core'][4] = 'control_room';
systemDesc['front']['core'][5] = 'defensive_ecm';
systemDesc['front']['core'][6] = 'engine_room';
systemDesc['front']['core'][7] = 'factory,fabricator';
systemDesc['front']['core'][8] = 'factory,robofac';
systemDesc['front']['core'][9] = 'factory,nanofactory';
systemDesc['front']['core'][10] = 'factory,replicator';
systemDesc['front']['core'][11] = 'force_screen,light';
systemDesc['front']['core'][12] = 'force_screen,heavy';
systemDesc['front']['core'][13] = 'fuel_tank';
systemDesc['front']['core'][14] = 'habitat';
systemDesc['front']['core'][15] = 'mining';
systemDesc['front']['core'][16] = 'refinery';
systemDesc['front']['core'][17] = 'open_space';
systemDesc['front']['core'][18] = 'passenger_seating';
systemDesc['front']['core'][19] = 'power_plant,chemical';
systemDesc['front']['core'][20] = 'power_plant,mhd_turbine';
systemDesc['front']['core'][21] = 'power_plant,fission';
systemDesc['front']['core'][22] = 'power_plant,fusion';
systemDesc['front']['core'][23] = 'power_plant,antimatter';
systemDesc['front']['core'][24] = 'power_plant,super_fusion';
systemDesc['front']['core'][25] = 'power_plant,total_conversion';
systemDesc['front']['core'][26] = 'ramscoop';
systemDesc['front']['core'][27] = 'stardrive';
systemDesc['front']['core'][28] = 'super_stardrive';
systemDesc['front']['core'][29] = 'stasis_web';
systemDesc['front']['core'][30] = 'weapons,spinal_battery';
systemDesc['front']['hull'][1] = 'armor,ice';
systemDesc['front']['hull'][2] = 'armor,rock';
systemDesc['front']['hull'][3] = 'armor,steel';
systemDesc['front']['hull'][4] = 'armor,light_alloy';
systemDesc['front']['hull'][5] = 'armor,metallic_laminate';
systemDesc['front']['hull'][6] = 'armor,adv_metallic_laminate';
systemDesc['front']['hull'][7] = 'armor,nanocomposite';
systemDesc['front']['hull'][8] = 'armor,organic';
systemDesc['front']['hull'][9] = 'armor,diamondoid';
systemDesc['front']['hull'][10] = 'armor,exotic_laminate';
systemDesc['front']['hull'][11] = 'armor,indestructable';
systemDesc['front']['hull'][12] = 'cargo_hold';
systemDesc['front']['hull'][13] = 'cloaking_device';
systemDesc['front']['hull'][14] = 'contragravity_lifter';
systemDesc['front']['hull'][15] = 'control_room';
systemDesc['front']['hull'][16] = 'defensive_ecm';
systemDesc['front']['hull'][17] = 'engine_room';
systemDesc['front']['hull'][18] = 'array,enhanced';
systemDesc['front']['hull'][19] = 'array,science';
systemDesc['front']['hull'][20] = 'array,tactical';
systemDesc['front']['hull'][21] = 'array,multipurpose';
systemDesc['front']['hull'][22] = 'external_clamp';
systemDesc['front']['hull'][23] = 'factory,fabricator';
systemDesc['front']['hull'][24] = 'factory,robofac';
systemDesc['front']['hull'][25] = 'factory,nanofactory';
systemDesc['front']['hull'][26] = 'factory,replicator';
systemDesc['front']['hull'][27] = 'force_screen,light';
systemDesc['front']['hull'][28] = 'force_screen,heavy';
systemDesc['front']['hull'][29] = 'fuel_tank';
systemDesc['front']['hull'][30] = 'habitat';
systemDesc['front']['hull'][31] = 'hangar_bay';
systemDesc['front']['hull'][32] = 'jump_gate';
systemDesc['front']['hull'][33] = 'mining';
systemDesc['front']['hull'][34] = 'refinery';
systemDesc['front']['hull'][35] = 'open_space';
systemDesc['front']['hull'][36] = 'passenger_seating';
systemDesc['front']['hull'][37] = 'power_plant,chemical';
systemDesc['front']['hull'][38] = 'power_plant,mhd_turbine';
systemDesc['front']['hull'][39] = 'power_plant,fission';
systemDesc['front']['hull'][40] = 'power_plant,fusion';
systemDesc['front']['hull'][41] = 'power_plant,antimatter';
systemDesc['front']['hull'][42] = 'power_plant,super_fusion';
systemDesc['front']['hull'][43] = 'power_plant,total_conversion';
systemDesc['front']['hull'][44] = 'ramscoop';
systemDesc['front']['hull'][45] = 'robot_arm';
systemDesc['front']['hull'][46] = 'soft-landing_system';
systemDesc['front']['hull'][47] = 'solar_panel_array';
systemDesc['front']['hull'][48] = 'space_sails';
systemDesc['front']['hull'][49] = 'stardrive';
systemDesc['front']['hull'][50] = 'super_stardrive';
systemDesc['front']['hull'][51] = 'stasis_web';
systemDesc['front']['hull'][52] = 'weapons,major_battery';
systemDesc['front']['hull'][53] = 'weapons,medium_battery';
systemDesc['front']['hull'][54] = 'weapons,secondary_battery';
systemDesc['front']['hull'][55] = 'weapons,tertiary_battery';
systemDesc['front']['hull'][56] = 'weapons,spinal_battery';
systemDesc['rear']['core'][1] = 'cargo_hold';
systemDesc['rear']['core'][2] = 'cloaking_device';
systemDesc['rear']['core'][3] = 'contragravity_lifter';
systemDesc['rear']['core'][4] = 'control_room';
systemDesc['rear']['core'][5] = 'defensive_ecm';
systemDesc['rear']['core'][6] = 'engine_room';
systemDesc['rear']['core'][7] = 'factory,fabricator';
systemDesc['rear']['core'][8] = 'factory,robofac';
systemDesc['rear']['core'][9] = 'factory,nanofactory';
systemDesc['rear']['core'][10] = 'factory,replicator';
systemDesc['rear']['core'][11] = 'force_screen,light';
systemDesc['rear']['core'][12] = 'force_screen,heavy';
systemDesc['rear']['core'][13] = 'fuel_tank';
systemDesc['rear']['core'][14] = 'habitat';
systemDesc['rear']['core'][15] = 'mining';
systemDesc['rear']['core'][16] = 'refinery';
systemDesc['rear']['core'][17] = 'open_space';
systemDesc['rear']['core'][18] = 'passenger_seating';
systemDesc['rear']['core'][19] = 'power_plant,chemical';
systemDesc['rear']['core'][20] = 'power_plant,mhd_turbine';
systemDesc['rear']['core'][21] = 'power_plant,fission';
systemDesc['rear']['core'][22] = 'power_plant,fusion';
systemDesc['rear']['core'][23] = 'power_plant,antimatter';
systemDesc['rear']['core'][24] = 'power_plant,super_fusion';
systemDesc['rear']['core'][25] = 'power_plant,total_conversion';
systemDesc['rear']['core'][26] = 'stardrive';
systemDesc['rear']['core'][27] = 'super_stardrive';
systemDesc['rear']['core'][28] = 'stasis_web';
systemDesc['rear']['core'][29] = 'weapons,spinal_battery';
systemDesc['rear']['core'][30] = 'reaction_engine,chemical';
systemDesc['rear']['core'][31] = 'reaction_engine,hedm_rocket';
systemDesc['rear']['core'][32] = 'reaction_engine,electric';
systemDesc['rear']['core'][33] = 'reaction_engine,fission';
systemDesc['rear']['core'][34] = 'reaction_engine,nuclear_pulse';
systemDesc['rear']['core'][35] = 'reaction_engine,fusion_pulse';
systemDesc['rear']['core'][36] = 'reaction_engine,advanced_fusion_pulse';
systemDesc['rear']['core'][37] = 'reaction_engine,super_fusion_pulse';
systemDesc['rear']['core'][38] = 'reaction_engine,fusion';
systemDesc['rear']['core'][39] = 'reaction_engine,fusion_torch';
systemDesc['rear']['core'][40] = 'reaction_engine,super_fusion_torch';
systemDesc['rear']['core'][41] = 'reaction_engine,antimatter';
systemDesc['rear']['core'][42] = 'reaction_engine,antimatter_plasma_torch';
systemDesc['rear']['core'][43] = 'reaction_engine,antimatter_pion';
systemDesc['rear']['core'][44] = 'reaction_engine,antimatter_pion_torch';
systemDesc['rear']['core'][45] = 'reaction_engine,super_antimatter_plasma_torch';
systemDesc['rear']['core'][46] = 'reaction_engine,total_conv_torch';
systemDesc['rear']['core'][47] = 'reaction_engine,super_conv_torch';
systemDesc['rear']['core'][48] = 'reactionless_engine,rotary';
systemDesc['rear']['core'][49] = 'reactionless_engine,standard';
systemDesc['rear']['core'][50] = 'reactionless_engine,hot';
systemDesc['rear']['core'][51] = 'reactionless_engine,super';
systemDesc['rear']['core'][52] = 'reactionless_engine,subwarp';
systemDesc['rear']['hull'][1] = 'armor,ice';
systemDesc['rear']['hull'][2] = 'armor,rock';
systemDesc['rear']['hull'][3] = 'armor,steel';
systemDesc['rear']['hull'][4] = 'armor,light_alloy';
systemDesc['rear']['hull'][5] = 'armor,metallic_laminate';
systemDesc['rear']['hull'][6] = 'armor,adv_metallic_laminate';
systemDesc['rear']['hull'][7] = 'armor,nanocomposite';
systemDesc['rear']['hull'][8] = 'armor,organic';
systemDesc['rear']['hull'][9] = 'armor,diamondoid';
systemDesc['rear']['hull'][10] = 'armor,exotic_laminate';
systemDesc['rear']['hull'][11] = 'armor,indestructable';
systemDesc['rear']['hull'][12] = 'cargo_hold';
systemDesc['rear']['hull'][13] = 'cloaking_device';
systemDesc['rear']['hull'][14] = 'contragravity_lifter';
systemDesc['rear']['hull'][15] = 'control_room';
systemDesc['rear']['hull'][16] = 'defensive_ecm';
systemDesc['rear']['hull'][17] = 'engine_room';
systemDesc['rear']['hull'][18] = 'array,enhanced';
systemDesc['rear']['hull'][19] = 'array,science';
systemDesc['rear']['hull'][20] = 'array,tactical';
systemDesc['rear']['hull'][21] = 'array,multipurpose';
systemDesc['rear']['hull'][22] = 'external_clamp';
systemDesc['rear']['hull'][23] = 'factory,fabricator';
systemDesc['rear']['hull'][24] = 'factory,robofac';
systemDesc['rear']['hull'][25] = 'factory,nanofactory';
systemDesc['rear']['hull'][26] = 'factory,replicator';
systemDesc['rear']['hull'][27] = 'force_screen,light';
systemDesc['rear']['hull'][28] = 'force_screen,heavy';
systemDesc['rear']['hull'][29] = 'fuel_tank';
systemDesc['rear']['hull'][30] = 'habitat';
systemDesc['rear']['hull'][31] = 'hangar_bay';
systemDesc['rear']['hull'][32] = 'jet_engine';
systemDesc['rear']['hull'][33] = 'jump_gate';
systemDesc['rear']['hull'][34] = 'mining';
systemDesc['rear']['hull'][35] = 'refinery';
systemDesc['rear']['hull'][36] = 'open_space';
systemDesc['rear']['hull'][37] = 'passenger_seating';
systemDesc['rear']['hull'][38] = 'power_plant,chemical';
systemDesc['rear']['hull'][39] = 'power_plant,mhd_turbine';
systemDesc['rear']['hull'][40] = 'power_plant,fission';
systemDesc['rear']['hull'][41] = 'power_plant,fusion';
systemDesc['rear']['hull'][42] = 'power_plant,antimatter';
systemDesc['rear']['hull'][43] = 'power_plant,super_fusion';
systemDesc['rear']['hull'][44] = 'power_plant,total_conversion';
systemDesc['rear']['hull'][45] = 'robot_arm';
systemDesc['rear']['hull'][46] = 'soft-landing_system';
systemDesc['rear']['hull'][47] = 'solar_panel_array';
systemDesc['rear']['hull'][48] = 'space_sails';
systemDesc['rear']['hull'][49] = 'stardrive';
systemDesc['rear']['hull'][50] = 'super_stardrive';
systemDesc['rear']['hull'][51] = 'stasis_web';
systemDesc['rear']['hull'][52] = 'weapons,major_battery';
systemDesc['rear']['hull'][53] = 'weapons,medium_battery';
systemDesc['rear']['hull'][54] = 'weapons,secondary_battery';
systemDesc['rear']['hull'][55] = 'weapons,tertiary_battery';
systemDesc['rear']['hull'][56] = 'weapons,spinal_battery';
systemDesc['rear']['hull'][57] = 'reaction_engine,chemical';
systemDesc['rear']['hull'][58] = 'reaction_engine,hedm_rocket';
systemDesc['rear']['hull'][59] = 'reaction_engine,electric';
systemDesc['rear']['hull'][60] = 'reaction_engine,fission';
systemDesc['rear']['hull'][61] = 'reaction_engine,nuclear_pulse';
systemDesc['rear']['hull'][62] = 'reaction_engine,fusion_pulse';
systemDesc['rear']['hull'][63] = 'reaction_engine,advanced_fusion_pulse';
systemDesc['rear']['hull'][64] = 'reaction_engine,super_fusion_pulse';
systemDesc['rear']['hull'][65] = 'reaction_engine,fusion';
systemDesc['rear']['hull'][66] = 'reaction_engine,fusion_torch';
systemDesc['rear']['hull'][67] = 'reaction_engine,super_fusion_torch';
systemDesc['rear']['hull'][68] = 'reaction_engine,antimatter';
systemDesc['rear']['hull'][69] = 'reaction_engine,antimatter_plasma_torch';
systemDesc['rear']['hull'][70] = 'reaction_engine,antimatter_pion';
systemDesc['rear']['hull'][71] = 'reaction_engine,antimatter_pion_torch';
systemDesc['rear']['hull'][72] = 'reaction_engine,super_antimatter_plasma_torch';
systemDesc['rear']['hull'][73] = 'reaction_engine,total_conv_torch';
systemDesc['rear']['hull'][74] = 'reaction_engine,super_conv_torch';
systemDesc['rear']['hull'][75] = 'reactionless_engine,rotary';
systemDesc['rear']['hull'][76] = 'reactionless_engine,standard';
systemDesc['rear']['hull'][77] = 'reactionless_engine,hot';
systemDesc['rear']['hull'][78] = 'reactionless_engine,super';
systemDesc['rear']['hull'][79] = 'reactionless_engine,subwarp';

function getPowerBangs (system) {
	if (system == 'reaction_engines,electric') {
		return '!';
	}
	var poweredSystems = new Array( 'cloaking_device', 'contragravity_lifter', 'factory', 'force_screen', 'jump_gate', 'mining', 'refinery', 'reaction_engines,electric', 'reactionless', 'stardrive', 'stasis_web', 'weapons');
	var systemType = system.split(',')[0];
	for (var i in poweredSystems) {
		if ( systemType == poweredSystems[i] ) {
			return '!';
		}
	}
	return '';
}
