var course = new Array();
 		course[1] = new Array();
		
		course[1][1] = new Array();
		course[1][1][0] = new Array("","");
		course[1][1][1]=new Array("OSHA 10-Hour Outreach Training for Construction Course","46","/10hr-construction");
		course[1][1][2]=new Array("OSHA 30-Hour Outreach Training for Construction Course","45","/30hr-construction");
		course[1][1][3]=new Array("OSHA 510 Online ","44","/osha-510-online");
		
		course[1][2] = new Array();
		course[1][2][0] = new Array("","");
		course[1][2][1]=new Array("OSHA 10-Hour Outreach Training for General Industry Course","44","/10hr-general");
		course[1][2][2]=new Array("OSHA 30-Hour Outreach Training for General Industry Course","44","/30hr-general");
		course[1][2][3]=new Array("OSHA 511 Course","44","/osha-511-online");	
		
		course[1][3] = new Array();
		course[1][3][0] = new Array("","");
		course[1][3][1]=new Array("8-Hour HAZWOPER Refresher Training","44","/8hazwoper");
		course[1][3][2]=new Array("24-Hour HAZWOPER Training","44","/24hazwoper");
		
		course[2] = new Array();
		
		course[2][1] = new Array();
		course[2][1][0] = new Array("","");
		course[2][1][1]=new Array("EM-385 1-1","46","/em-385-1-1");
		course[2][1][2]=new Array("OSHA 510-OSHA Standards for the Construction Industry","45","/osha-510-2");
		course[2][1][3]=new Array("OSHA 3110-Fall Arrest Systems","44","osha-3110");
		course[2][1][4]=new Array("OSHA 5109-Cal/OSHA Standards for the Construction Industry","44","/osha-5109");
		course[2][1][5]=new Array("OSHA 7405-Fall Hazard Awareness for the Construction Industry","44","/osha-7405");
		course[2][1][6]=new Array("OSHA 7410-Managing Excavation Hazards","46","/osha-7410");
		course[2][1][7]=new Array("OSHA 7415-OSHA Construction Industry Requirements: Awareness of Major Hazards and Prevention Strategies","45","/osha-7415");
		course[2][1][8]=new Array("OSHA 7500-Introduction to Safety and Health Management","44","/osha-7500");
		course[2][1][9]=new Array("OTC 212-Cal OSHA Standards for the Construction Industry","44","/otc-7120");
		course[2][1][10]=new Array("OTC 301-Scaffolding Safety","44","/otc-301");
		course[2][1][11]=new Array("OSHA 500-Trainer Course in OSHA Standards for Construction","46","/osha-500");
		course[2][1][12]=new Array("OSHA 502-Update for Construction Industry Outreach Trainers","45","/osha-502");
		course[2][1][13]=new Array("OSHA 7400-Trainer Course in Construction Noise","44","/osha-7400");
		course[2][1][14]=new Array("OTC 401-Trainer Course in Forklift Safety","44","/otc-401");
		course[2][1][15]=new Array("OTC 402-Trainer Course in Trenching Safety","44","/otc-402");
		course[2][1][16]=new Array("OTC 404-Trainer Course for Forklift & Aerial Lift Safety","46","/otc-404");
		course[2][1][17]=new Array("OSHA 510-In Spanish","45","/osha-510-in-spanish");
		course[2][1][18]=new Array("OSHA 500-(In Spanish) Trainer Course","44","/osha-500-spanish");
		course[2][1][19]=new Array("OSHA 510-OSHA Standards for Construction","44","/osha-510");
		course[2][1][20]=new Array("OSHA 3010-Excavation, Trenching and Soil Mechanics","44","/osha-3010");
		course[2][1][21]=new Array("OSHA 3095-Electrical Standards","46","/osha-3095");
		course[2][1][22]=new Array("OTC 104-Update for the National Electrical Code (NEC)","45","/otc-104");
		course[2][1][23]=new Array("OSHA 5600-Disaster Site Worker Train-the-Trainer Course","44","/osha-5600");
		course[2][1][24]=new Array("OSHA 5602-Update for Disaster Site Worker Trainer Course","44","/osha-5602");
		course[2][1][25]=new Array("OSHA 2015-Hazardous Materials","44","/osha-2015");
		course[2][1][26]=new Array("OSHA 7505-Introduction to Accident Investigation","44","/osha-7505");
		course[2][1][27]=new Array("OSHA 7510-Introduction to OSHA for Small Business","44","/osha-7510");
		course[2][1][28]=new Array("OSHA 7845-Recordkeeping Rule Seminar","44","/osha-7845");
		course[2][1][29]=new Array("OTC 101-Voluntary Protection Programs (VPP) Overview","44","/otc-101");
		course[2][1][30]=new Array("OTC 102-Voluntary Protection Programs Application Requirements","44","/otc-102");
		course[2][1][31]=new Array("OTC 103-Electrical Safety Standards � NFPA 70E","44","/otc-103");
		course[2][1][32]=new Array("OTC 403-Trainer Course in Confined Space","44","/otc-403");
		course[2][1][33]=new Array("OSHA Construction 10‐Hour","44","/osha-10-hour-construction");
		course[2][1][34]=new Array("OSHA Construction 20‐Hour","44","/osha-20-hour-construction");
		course[2][1][35]=new Array("OSHA Construction 30‐Hour","44","/osha-30-hour-construction");
		course[2][1][36]=new Array("Temporary Traffic Control and Flagging","44","/otc-111-flagging");
		course[2][1][37]=new Array("Safety Standards for Cranes","44","/otc-302-cranes");
		
		course[2][2] = new Array();
		course[2][2][0] = new Array("","");
		course[2][2][1]=new Array("OSHA 2015-Hazardous Materials","46","/osha-2015");
		course[2][2][2]=new Array("OSHA 7505-Introduction to Accident Investigation","45","/osha-7505");
		course[2][2][3]=new Array("OSHA 7510-Introduction to OSHA for Small Business","44","/osha-7510");
		course[2][2][4]=new Array("OSHA 7845-Recordkeeping Rule Seminar","44","/osha-7845");
		course[2][2][5]=new Array("OTC 101-Voluntary Protection Programs (VPP) Overview","44","/otc-101");
		course[2][2][6]=new Array("OTC 102-Voluntary Protection Programs Application Requirements","44","/otc-102");
		course[2][2][7]=new Array("OTC 103-Electrical Safety Standards � NFPA 70E","44","/otc-103");
		course[2][2][8]=new Array("OTC 403-Trainer Course in Confined Space","46","/otc-403");
		course[2][2][9]=new Array("OSHA 511-OSHA Standards for General Industry","45","/osha-511");
		course[2][2][10]=new Array("OSHA 2045-Machinery and Machine Guarding Standards","44","/osha-2045");
		course[2][2][11]=new Array("OSHA 2225-Respiratory Protection","44","/osha-2225");
		course[2][2][12]=new Array("OSHA 2250-Ergonomics Applied to MSDs and Nerve Disorders","44","/osha-2250");
		course[2][2][13]=new Array("OSHA 2264-Permit-Required Confined Space Entry","44","/osha-2264");
		course[2][2][14]=new Array("OSHA 5119-Cal/OSHA Standards for General Industry","44","/osha-5119");
		course[2][2][15]=new Array("OSHA 6000-Collateral Duty Course for Other Federal Agencies","44","/osha-6000");
		course[2][2][16]=new Array("OSHA 7000-OSHA Ergonomic Guidelines for Nursing Homes","44","/osha-7000");
		course[2][2][17]=new Array("OSHA 7005-Public Warehousing and Storage","46","/osha-7005");
		course[2][2][18]=new Array("OSHA 7100-Introduction to Machinery and Machine Safeguarding","45","/osha-7100");
		course[2][2][19]=new Array("OSHA 7105-Evacuation and Emergency Preparedness","44","/osha-7105");
		course[2][2][20]=new Array("OSHA 7115-Lockout/Tagout","44","/osha-7115");
		course[2][2][21]=new Array("OSHA 7200-Bloodborne Pathogen Exposure Control for Healthcare Facilities","44","/osha-7200");
		course[2][2][22]=new Array("OSHA 7205-Health Hazard Awareness","44","/osha-7205");
		course[2][2][23]=new Array("OSHA 7300-OSHA's Permit-Required Confined Space Standar","44","/osha-7300");
		course[2][2][24]=new Array("OTC 211-Cal OSHA Standards for General Industry","46","/otc-211");
		course[2][2][25]=new Array("OSHA 501-Trainer Course in OSHA Standards for General Industry","45","/osha-501");
		course[2][2][26]=new Array("OSHA 503-Update for General Industry Outreach Trainers","44","/osha-503");
		course[2][2][27]=new Array("OTC 202-8-Hour HAZWOPER Refresher","44","/otc-202");
		course[2][2][28]=new Array("OTC 203- EPA Lead Renovation, Repair and Painting (RRP) Initial","44","/otc-203");
		course[2][2][29]=new Array("OSHA General Industry 10‐Hour","44","/osha-10-hour-general-industry");
		course[2][2][30]=new Array("OSHA General Industry 20‐Hour","44","/osha-20-hour-general-industry");
		course[2][2][31]=new Array("OSHA General Industry 30‐Hour","44","/osha-30-hour-general-industry");
		
		course[2][3] = new Array();
		course[2][3][0] = new Array("","");
		course[2][3][1]=new Array("OSHA 5400-Trainer Course in OSHA Standards for the Maritime Industry","46","/osha-5400");
		
		course[2][4] = new Array();
		course[2][4][0] = new Array("","");
		course[2][4][1]=new Array("OSHA 521-OSHA Guide to Industrial Hygiene","46","/osha-521");
		
		
		
		course[3] = new Array();
		
		course[3][1] = new Array();
		course[3][1][0] = new Array("","");
		course[3][1][1]=new Array("Custom Solutions Available","44","/customized-training");
		
		course[3][2] = new Array();
		course[3][2][0] = new Array("","");
		course[3][2][1]=new Array("Custom Solutions Available","44","/customized-training");
		
		course[3][3] = new Array();
		course[3][3][0] = new Array("","");
		course[3][3][1]=new Array("Custom Solutions Available","44","/customized-training");
		
		course[3][4] = new Array();
		course[3][4][0] = new Array("","");
		course[3][4][1]=new Array("Custom Solutions Available","44","/customized-training");
		
		
		var industry = new Array();

		industry[1] = new Array();
		industry[1][1]=new Array("Construction","1");
		industry[1][2]=new Array("General Industry ","2");
		industry[1][3]=new Array("HAZWOPER ","3");


		industry[2] = new Array();
		industry[2][1]=new Array("Construction","1");
		industry[2][2]=new Array("General Industry","2");
		industry[2][3]=new Array("Maritime","3");
		industry[2][4]=new Array("Industrial Hygiene","4");
		

		industry[3] = new Array();
		industry[3][1]=new Array("Construction","1");
		industry[3][2]=new Array("General Industry ","2");
		industry[3][3]=new Array("Maritime","3");
		industry[3][4]=new Array("Industrial Hygiene","4");

		
	
	
    function populate_elem_industry(load_parent_value,elem,elem_to_def ){
	
		
	var append_to = document.getElementById(elem);
	append_to.length=0 
	append_to.setAttribute('lang',load_parent_value); 
	var def_new_option = document.createElement('option');
	def_new_option.setAttribute('value',"");
	def_new_option.innerHTML = 'Select your Industry';
	append_to.rel =load_parent_value; 
	append_to.appendChild(def_new_option);
	
	var elem_to_def_append_to = document.getElementById(elem_to_def);
	elem_to_def_append_to.length=0 
	var def_new_option = document.createElement('option');
	def_new_option.setAttribute('value',"");
	def_new_option.innerHTML = 'Select your Course';
	elem_to_def_append_to.appendChild(def_new_option);
	
	
		for(var i=1; i < industry[load_parent_value].length ; i++){
		var new_option = document.createElement('option');
		new_option.setAttribute('value',industry[load_parent_value][i][1]);
		new_option.innerHTML = industry[load_parent_value][i][0];
		append_to.appendChild(new_option);		
		}
		
		
	}
    function populate_elem_course(load_prim_parent_value,load_parent_value,elem){


		
	var append_to = document.getElementById(elem);
	append_to.length=0 
	var def_new_option = document.createElement('option');
	def_new_option.setAttribute('value',"");
	def_new_option.innerHTML = 'Select your Course';
	append_to.appendChild(def_new_option);
	
		for(var i=1; i < course[load_prim_parent_value][load_parent_value].length ; i++){
		var new_option = document.createElement('option');
		//new_option.setAttribute('value',course[load_prim_parent_value][load_parent_value][i][1]);
		new_option.setAttribute('value',i);
		new_option.setAttribute('name',course[load_prim_parent_value][load_parent_value][i][2]);
		new_option.innerHTML = course[load_prim_parent_value][load_parent_value][i][0];
		append_to.appendChild(new_option);
		}
		
	}
	function generate_submit_link(load_prim_parent_value,load_parent_value,child_value){
	
	var form = document.getElementById('form');
	form.setAttribute ('action',course[load_prim_parent_value][load_parent_value][child_value][2]) ;
	}
