function hideItem(elmnt, h, j){
	for(i = h; i <= j; i++){
		document.all(elmnt + i).style.display="none";
	}
}
function showItem(elmnt, h, j){
	for(i = h; i <= j; i++){
		document.all(elmnt + i).style.display="inline";
	}
}
function hideAllMap(){
	hideItem('about','1','5');
	hideItem('services','1','8');
	hideItem('training','1','1');
	hideItem('chstewards','1','16');
	hideItem('contact','1','2');
	hideItem('community','1','2');
	hideItem('safety','1','1');
	hideItem('apprenticeships','1','2');
	hideItem('hiring','1','3');
	hideItem('news','1','9');
}
function hideAllFields(){
	hideItem('ecm','1','2');
	hideItem('tct','1','2');
	hideItem('hem','1','2');
	hideItem('lplt','1','5');
	hideItem('ef','1','1');
	hideItem('mci','1','2');
	hideItem('pct','1','2');
	hideItem('efl','1','1');
	hideItem('welder','1','1');
	hideItem('meter_reader','1','1');
}
function getSiteMap(elmnt, last){
	hideAllMap();
	showItem(elmnt,'1',last);
}
function getFields(){
	hideAllFields();
	tradex = document.employee.trade.value;
	if(tradex == "Electrician, Construction and Maintenance"){
		elmnt = "ecm";
		trade_last = 2;
	} else if(tradex == "Truck and Coach Technician"){
		elmnt = "tct";
		trade_last = 2;
	} else if(tradex == "Heavy Equipment Mechanic"){
		elmnt = "hem";
		trade_last = 2;
	} else if(tradex == "Lineperson, Power Line Technician"){
		elmnt = "lplt";
		trade_last = 5;
	} else if(tradex == "Electrical Forester"){
		elmnt = "ef";
		trade_last = 1;
	} else if(tradex == "Millwright, Construction or Industrial"){
		elmnt = "mci";
		trade_last = 2;
	} else if(tradex == "Protection and Control Technologist"){
		elmnt = "pct";
		trade_last = 2;
	} else if(tradex == "Electrical Forester Labourer"){
		elmnt = "efl";
		trade_last = 1;
	} else if(tradex == "Welder"){
		elmnt = "welder";
		trade_last = 1;
	} else if(tradex == "Meter Reader"){
		elmnt = "meter_reader";
		trade_last = 1;
	}
	showItem(elmnt, "1", trade_last);	
}
