document.write('<input type="hidden" name="market_interest" value="Other">')
  
if ( document.form_1.primary_field.id == 'required') {
/* Education forms */
if (document.form_1.edu) { document.writeln('<tr><td colspan=2>* Which of the following best describes your primary field of instruction?</td></tr>'); }
/* Regular Aprimo forms */
else { document.writeln('<tr><td colspan=2>* Which of the following best describes your primary field?</td></tr>'); }

document.writeln('<tr><td colspan=2><select name="field" onChange="id_select();" class="single">'
+ '<option value="" selected="selected">Please Select</option>'
+ '<option value="Aerospace/Automotive Comp Dsgn" id="MSD">Aerospace and Automotive Component Design</option>'
+ '<option value="Architectural Design" id="BSD">Architectural Design</option>'
+ '<option value="Building and Facility Mgmnt" id="ACS">Building and Facility Management</option>'
+ '<option value="Building Constr: Commercial" id="ACS">Building Construction: Commercial</option>'
+ '<option value="Building Constr: Residential" id="ACS">Building Construction: Residential</option>'
+ '<option value="Building Equipment Mfg" id="MSD">Building Equipment Manufacturing </option>'
+ '<option value="Civil Eng / Land Planning" id="ISD">Civil Engineering / Land Planning</option>'
+ '<option value="Computer/ Medical/ Office Dsgn" id="MSD">Computer / Medical / Office Equipment Design</option>'
+ '<option value="Consumer Products Design" id="MSD">Consumer Products Design</option>'
+ '<option value="Corporate Building Ownership" id="BSD">Corporate Building Ownership</option>'
+ '<option value="Defense" id="MSD">Defense </option>'
+ '<option value="Electrical Controls Design" id="MSD">Electrical Controls Design</option>'
+ '<option value="Electrical Systems Engineering" id="BSD">Electrical Systems Engineering</option>'
+ '<option value="Environmental Engineering" id="ISD">Environmental Engineering</option>'
+ '<option value="Fabricated Metal Products" id="MSD">Fabricated Metal Products</option>'
+ '<option value="Interior Design" id="BSD">Interior Design</option>'
+ '<option value="Machinery Design" id="MSD">Machinery Design</option>'
+ '<option value="Mfg Procurement / Sales / Mkt" id="MSD">Manufacturing Procurement / Sales / Marketing</option>'
+ '<option value="Mapping and Geospatial Design" id="ISD">Mapping & Geospatial Design</option>'
+ '<option value="Mech Syst Eng (HVAC / Piping)" id="MSD">Mechanical Systems Engineering (HVAC & Piping)</option>'
+ '<option value="Plumbing/ Fire Protection Syst" id="BSD">Plumbing and / or Fire Protection Systems Engineering</option>'
+ '<option value="Process and Power Plant Design" id="MSD">Process and Power Plant Design</option>'
+ '<option value="Real Estate Development" id="BSD">Real Estate Development</option>'
+ '<option value="Structural Engineering" id="BSD">Structural Engineering</option>'
+ '<option value="Telecommunications" id="ISD">Telecommunications</option>'
+ '<option value="Tool and Die / Machine Shop" id="MSD">Tool and Die / Machine Shop</option>'
+ '<option value="Transportation Design" id="ISD">Transportation Design</option>'
+ '<option value="Utilities: Electric, Oil, Gas" id="ISD">Utilities: Electric, Oil, & Gas</option>'
+ '<option value="Utilities: Water and Sewer" id="ISD">Utilities: Water & Sewer</option>'
+ '<option value="Other" id="Other">Other</option></select></td></tr><tr><td class="spacer" colspan="2"></td></tr><tr><td class="spacer" colspan="2"></td></tr>');

document.writeln('<tr><td colspan="2">If "Other", which of the following best describes your industry?</b><br>'
+ '<select name="field_other" disabled="true" onChange="field_select();"  class="single">'
+ '<option value="" selected="selected">Please Select</option>'
+ '<option value="Other" id="BSD">Building, Design, Construction and Management</option>'
+ '<option value="Other" id="MSD">Manufacturing Design and Process Management</option>'
+ '<option value="Other" id="ISD">Mapping, Civil Engineering, and Infrastructure Management</option></select></td></tr><tr><td class="spacer" colspan="2"></td></tr><tr><td class="spacer" colspan="2"></td></tr>');

}
else {
document.writeln('<input name="field" type="hidden" value="Other" id="Other">');
}

function id_select() {
 	window.document.form_1.market_interest.value = window.document.form_1.field.options[window.document.form_1.field.selectedIndex].id;
  	if (window.document.form_1.field.options[window.document.form_1.field.selectedIndex].value == "Other")  {
	window.document.form_1.field_other.disabled = false; 
	} 
  	else  {
  	window.document.form_1.field_other.disabled = true;  
	window.document.form_1.field_other.selectedIndex = 0;
	}
	if (document.form_1.alt_activity_id){
	var aid_test = "|Architectural Design||Electrical Systems Engineering||Interior Design||Mech Syst Eng (HVAC / Piping)||Plumbing/ Fire Protection Syst||Structural Engineering|";
	if ( (aid_test.indexOf(document.form_1.field.value)) > 0 )
	{
		document.form_1.activity_id.value = document.form_1.alt_activity_id.value;
	}
	}
}
function field_select() {
 	window.document.form_1.field.options[window.document.form_1.field.selectedIndex].value  = window.document.form_1.field_other.options[window.document.form_1.field_other.selectedIndex].value; 
	window.document.form_1.market_interest.value = window.document.form_1.field_other.options[window.document.form_1.field_other.selectedIndex].id;
}

