//THIS JAVASCRIPT IS FOR FORM BUILD
//USE FOR LITERATURE REQUEST FORM & APPLICATION NOTES FORM
//CREATED ON 5/20/03 VWONG

//alert()
	//Build arrays for each person's contacts
	Apps=new Array(6);
	Apps[0]=new Array(16);
	Apps[1]=new Array(33);
	Apps[2]=new Array(19);
	Apps[3]=new Array(9);
	Apps[4]=new Array(11);
	Apps[5]=new Array(9);
	Apps[6]=new Array(5);
	Apps[7]=new Array(9);
	Apps[8]=new Array(0);
	Apps[9]=new Array(7);
	
	//Semiconductor
	Apps[0][0]="--Please select one--";
	Apps[0][1]="Advanced Semiconductor Packaging";
	Apps[0][2]="Flip Chip Packaging";
	Apps[0][3]="Laser Ablation & Drilling";
	Apps[0][4]="Laser Systems & Beam Delivery";
	Apps[0][5]="Lithography (DUV & EUV)";
	Apps[0][6]="Memory Repair";
	Apps[0][7]="Microwave & RF Packaging";
	Apps[0][8]="Multichip Module Packaging";
	Apps[0][9]="Optical Module Packaging";
	Apps[0][10]="Resistor Trimming";
	Apps[0][11]="Reticle & Mask Inspection";
	Apps[0][12]="Steppers & Scanners for Microlithography";
	Apps[0][13]="Thin Film Thickness Measurement";
	Apps[0][14]="Wafer Bump Inspection";
	Apps[0][15]="Wafer Handling";
	Apps[0][16]="Wafer Inspection";
	Apps[0][17]="Other";

	
	//Research
	Apps[1][0]="--Please select one--";
	Apps[1][1]="Agricultural and Food Analysis";
	Apps[1][2]="Anti-Terrorism";
	Apps[1][3]="Astronomy";
	Apps[1][4]="Atomic Lasers";
	Apps[1][5]="Biophotonics";
	Apps[1][6]="Color Measurement";
	Apps[1][7]="Diffractive Optics";
	Apps[1][8]="Displays";
	Apps[1][9]="Education";
	Apps[1][10]="Environment Analysis";
	Apps[1][11]="Fiber Optics";
	Apps[1][12]="Forensics";
	Apps[1][13]="Fourier Optics";
	Apps[1][14]="Holography";
	Apps[1][15]="Interferometry";
	Apps[1][16]="Laser Material Interaction";
	Apps[1][17]="Laser Tweezers";
	Apps[1][18]="Lasers";
	Apps[1][19]="Layer Thickness Measurement";
	Apps[1][20]="Lithography";
	Apps[1][21]="Materials Science";
	Apps[1][22]="NanoTechnology";
	Apps[1][23]="Nonlinear Optics";
	Apps[1][24]="Optical Design";
	Apps[1][25]="Organic LED's";
	Apps[1][26]="Photonics & OptoElectronics";
	Apps[1][27]="Quantum Optics";
	Apps[1][28]="Remote Sensing";
	Apps[1][29]="Sensors";
	Apps[1][30]="Spectroscopy";
	Apps[1][31]="Terahertz Science";
	Apps[1][32]="Thin Films";
	Apps[1][33]="Ultrafast Laser Studies";
	Apps[1][34]="Other";

	
	//Life & Health Sciences
	//modified on 3/15/04: added 3 more entries
	Apps[2][0]="--Please select one--";
	Apps[2][1]="Biomedical";
	Apps[2][2]="Biophotonics";
	Apps[2][3]="Cell probing";
	Apps[2][4]="Cell Sorters";
	Apps[2][5]="Chromatography";
	Apps[2][6]="DNA Sequencers and Scanners";
	Apps[2][7]="Education";
	Apps[2][8]="Environment Analysis";
	Apps[2][9]="Flow Cytometry";
	Apps[2][10]="Laser Tweezers";
	Apps[2][11]="Micro plate Readers";
	Apps[2][12]="Microscopy";
	Apps[2][13]="Nanotechnology (or Microfluidics)";
	Apps[2][14]="Optical Coherence Tomography (OCT)";
	Apps[2][15]="Particle Size Analyzers";
	Apps[2][16]="Patch Clamping";
	//modified on 2/26/04: correct Application ID mis-match in Pivotal problem
	//Apps[2][14]="Protein Sequencers and Scanners";
	Apps[2][17]="Protein Sequence AND Scanners";
	Apps[2][18]="Spectrometers";
	Apps[2][19]="Ultrafast Studies";
	Apps[2][20]="Other";

	
	//Computer Peripherals
	Apps[3][0]="--Please select one--";
	Apps[3][1]="3-D Optical Storage";
	Apps[3][2]="Computer Disk Drives";
	Apps[3][3]="Defect Measurement/Identification";
	Apps[3][4]="Displays";
	Apps[3][5]="DVD/CD Mastering";
	Apps[3][6]="Human Interface";
	Apps[3][7]="Laser Ablation";
	Apps[3][8]="Laser Disk Texturing";
	Apps[3][9]="Networking";
	Apps[3][10]="Other";

	//Aerospace & Defense
	Apps[4][0]="--Please select one--";
	Apps[4][1]="Display Test and Development";
	Apps[4][2]="Infrared Optics & Systems";
	Apps[4][3]="Lasers";
	Apps[4][4]="LIDAR and Remote Sensing";
	Apps[4][5]="NanoTechnology";
	Apps[4][6]="NIR & Visible Optics & Systems";
	Apps[4][7]="Optical Design";
	Apps[4][8]="Photonics";
	Apps[4][9]="Sensor Assy/Calibration";
	Apps[4][10]="Systems Integration";
	Apps[4][11]="WMD Detection";
	Apps[4][12]="Other";
	
	//Telecom/Datacom
	Apps[5][0]="--Please select one--";
	Apps[5][1]="Actives Characterization & Test";
	Apps[5][2]="Device Manufacturing & Packaging";
	Apps[5][3]="Fiber Optics";
	Apps[5][4]="Laser Diode Characterization";
	Apps[5][5]="NanoTechnology";
	Apps[5][6]="Network Systems Design";
	Apps[5][7]="Opto-Electronic Component Design";
	Apps[5][8]="Passives Characterization & Test";
	Apps[5][9]="Photonics";
	Apps[5][10]="Other";
	
	//Manufacturing & Transportation
	Apps[6][0]="--Please select one--";
	Apps[6][1]="Coordinate Measuring";
	Apps[6][2]="Materials Processing";
	Apps[6][3]="Position Tracking Systems";
	Apps[6][4]="Quality Control";
	Apps[6][5]="Other";
	
	//Commercial Laser & Electro-optics
	Apps[7][0]="--Please select one--";
	Apps[7][1]="Cosmetic Lasers";
	Apps[7][2]="Diode Lasers";
	Apps[7][3]="Gas Lasers";
	Apps[7][4]="Industrial Lasers";
	Apps[7][5]="Medical Lasers";
	Apps[7][6]="Opto-electronic devices";
	Apps[7][7]="Solid State Lasers";
	Apps[7][8]="Ultrafast Lasers";
	Apps[7][9]="Other";
	
	//Reset drop-down list
	Apps[8][0]="---";
	
	//Advanced Packaging
	Apps[9][0]="--Please select one--";
	Apps[9][1]="Advanced Semiconductor Packaging";
	Apps[9][2]="Flip Chip Bonding";
	Apps[9][3]="Flip Chip Underfill";
	Apps[9][4]="Microwave RF/Modules";
	Apps[9][5]="Multi Chip Modules";
	Apps[9][6]="Optical Modules";
	Apps[9][7]="Other";
	
	//===========================================================
	//user array to store object name in form
	chkListInt=new Array(8);
	chkListInt[0]=new Array(4); //catalog optics
	chkListInt[1]=new Array(5); //robotic automation
	chkListInt[2]=new Array(4); //robotic opto-mechanics
	chkListInt[3]=new Array(6); //custom optics
	chkListInt[4]=new Array(2); //test & characterization
	chkListInt[5]=new Array(8); //advanced packaging
	chkListInt[6]=new Array(10); //photonic instrumentation
	chkListInt[7]=new Array(7); //motion control
	chkListInt[8]=new Array(5); //vibration control
	chkListInt[9]=new Array(5); //Oriel Light Sources
	
	//catalog optics
	chkListInt[0][0]="beamsplitters";
	chkListInt[0][1]="filters";
	chkListInt[0][2]="lenses";
	chkListInt[0][3]="mirrors";
	chkListInt[0][4]="polarizers";
	
	//robotic automation
	chkListInt[1][0]="ado_load_ports";
	chkListInt[1][1]="controllers";
	chkListInt[1][2]="front_ends";
	chkListInt[1][3]="mulitlink_robots";
	chkListInt[1][4]="prealigners";
	chkListInt[1][5]="tracks";
	
	//robotic opto-mechanics
	chkListInt[2][0]="fiber_positioners";
	chkListInt[2][1]="manual_positioners";
	chkListInt[2][2]="optical_mount_interest";
	chkListInt[2][3]="bases_brackets";
	chkListInt[2][4]="rails_rail_systems";

	//custom optics
	chkListInt[3][0]="aspheres";
	chkListInt[3][1]="diamon_turned_optics";
	chkListInt[3][2]="duv_optics";
	chkListInt[3][3]="optical_systesm";
	chkListInt[3][4]="custom_lenses";
	chkListInt[3][5]="custom_mirrors";
	chkListInt[3][6]="windows";
	
	//test & characterization
	chkListInt[4][0]="ld_burn_In_systems"; //item 0 is top category
	chkListInt[4][1]="laser_diode_characteristics";
	chkListInt[4][2]="light_source_stations";
	
	//advanced packaging
	chkListInt[5][0]="autoalign";
	chkListInt[5][1]="epoxy_dispensing";
	chkListInt[5][2]="die_bonding";
	chkListInt[5][3]="flip_chip";
	chkListInt[5][4]="laser_soldering";
	chkListInt[5][5]="laser_welding";
	chkListInt[5][6]="packaging_engineering";
	chkListInt[5][7]="service_and_upgrade";
	chkListInt[5][8]="underfill_dispense";
	
	//photonic instrumentation
	chkListInt[6][0]="cuvette_cuvette_holder";
	chkListInt[6][1]="fibers_fiber_probes";
	chkListInt[6][2]="fiber_optic_components";
	chkListInt[6][3]="filter_filter_wheel";	
	chkListInt[6][4]="laser_diode_instrumentation";
	chkListInt[6][5]="light_sources";
	chkListInt[6][6]="optical_spectral_processor";	
	chkListInt[6][7]="power_meters";
	chkListInt[6][8]="spectrometer";
	chkListInt[6][9]="photonic_test_instrumentation";
	chkListInt[6][10]="tunable_light_sources";
	
	//motion control
	chkListInt[7][0]="air_bearing_systems";
	chkListInt[7][1]="manual_actuators";
	chkListInt[7][2]="motorized_acutators";
	chkListInt[7][3]="manual_positioning_stages";
	chkListInt[7][4]="motion_controllers_interest";
	chkListInt[7][5]="motorized_rotation_stages";
	chkListInt[7][6]="motorized_translation_stages";
	chkListInt[7][7]="multi_axis_systems";
	
	//vibration control
	chkListInt[8][0]="accessories_and_shelves";
	chkListInt[8][1]="active_isolation_interest";
	chkListInt[8][2]="custom_configure_and_doublers";
	chkListInt[8][3]="tables_and_breadboards";
	chkListInt[8][4]="passive_isoaltion_interest";
	chkListInt[8][5]="vibration_workstation_interest";
	
	//Oriel Light Sources
	chkListInt[9][0]="Light_Sources1";
	chkListInt[9][1]="Solar_Simulators";
	chkListInt[9][2]="Monochromators_Spectrographs";
	chkListInt[9][3]="FT_IR";
	chkListInt[9][4]="CCDs";
	chkListInt[9][5]="Spectrometers1";
	
	//===========================================================
	
	function ChangeApp(num)
	{
		//Select the first Contact
			var ctr = 0;
	    document.lit.Applications_ID.selectedIndex=0;
	      
	    //For every contact in the array for this person, add a new option
	    for(ctr=0;ctr<Apps[num].length;ctr++)
	    {
	    	document.lit.Applications_ID.options[ctr]=new Option(Apps[num][ctr],Apps[num][ctr]);
	    }
	    //Set the length of the select list
	    document.lit.Applications_ID.length=Apps[num].length;
	}
	
		function ChangeApp1(num,num1)
	{
		//Select the first Contact
			var ctr = 0;
	    document.lit.Applications_ID.selectedIndex=0;
	      
	    //For every contact in the array for this person, add a new option
	    for(ctr=0;ctr<Apps[num].length;ctr++)
	    {
	    	document.lit.Applications_ID.options[ctr]=new Option(Apps[num][ctr],Apps[num][ctr]);
	    }
	    //Set the length of the select list
	    document.lit.Applications_ID.length=Apps[num].length;
	    
	    document.lit.Applications_ID.selectedIndex=num1;
	}
	
	function fSwitchCheck(vItem,num) {
		
		var blnCheck = 0; //
		
		box = eval(vItem);
		for(ctr=0;ctr<chkListInt[num].length;ctr++)
	  {
			if (eval('document.lit.' + chkListInt[num][ctr]).checked == true)
			{//check to see if any of the array item got checked, then set value
				blnCheck = 1;				
			}
	  	//document.lit.Applications_ID.options[ctr]=new Option(Apps[num][ctr],Apps[num][ctr]);
	  }
		
		if (blnCheck == 1)
		{	
			box.checked = 'true';
		}
		else
		{
			box.checked = !box.checked;
		}
	}	
	
	function fSetAppDropBox(num) {
		alert()
		ChangeApp(num);
	
	}