// JavaScript Document


function get_zoom_filename(pZoomCategory)
{
	switch (pZoomCategory)
		{
			case 'voie':               return "zoom_voie.html";
			case 'energie':            return "zoom_energie.html";
			case 'signalisation':      return "zoom_signalisation.html";
			case 'telecommunications': return "zoom_telecommunications.html";
			case 'controle_commande':  return "zoom_controle_commande.html";
			
			default:                   return "";
		}
}

function go_to_selected_zoom_with_parent(pSelectObject, pRelativeDirectory)
{
		if (pSelectObject.selectedIndex < 0)
			return;
		
		var anOptionObject = pSelectObject.options[pSelectObject.selectedIndex];
		var aFilename = get_zoom_filename(anOptionObject.value);
		if (aFilename.length > 0)
			location.href = pRelativeDirectory + aFilename;
}

function go_to_selected_zoom(pSelectedObject)
{
	go_to_selected_zoom_with_parent(pSelectedObject, "");
}

