/* * js/search-tool.js */

var globs = "apikey=nicowebv3";
var map = null;
var uriBase = document.getElementById("urlIdentifier").getAttribute("content");
var uriWs = uriBase+"ws/";
var urlImg = uriBase+"images/";
var urls = new Array();
urls['hsr'] = uriWs+"fre/hsr-0.2.php";
urls['hsl'] = uriWs+"fre/hsl-0.2.php";
urls['hss'] = uriWs+"fre/hss-0.1.php";
urls['hsp'] = uriWs+"fre/hsp-0.1.php";
urls['gpfn'] = uriWs+"fre/gpfn-0.1.php";


/* * initBoxes () */
function initBoxes() {
	getHSPays();
	
	return true;
}

/* * getHSPays () */
function getHSPays () {
	
	// # enclenchement de img load
	//$('boxTPLoad').style.display='inline';
	// # byTP
	var opts = { method : 'post' , parameters : globs,
		onSuccess : function (r) { 
			//$('boxTPLoad').style.display='none'; 
			}
		/*onFailure : function (r) { alert(r.responseText); }, 
		onComplete : function (r) { alert(r.responseText); }*/
	}
	new Ajax.Updater("containerPays",urls['hsp'],opts);
}


/* * getHSReseau () */
function getHSReseau () {
	
	// # enclenchement de img load
	//$('boxTPLoad').style.display='inline';
	// # byTP
	var opts = { method : 'post' , parameters : globs+"&pays="+$F('pays'),
		onSuccess : function (r) { 
			//$('boxTPLoad').style.display='none'; 
			}
		/*onFailure : function (r) { alert(r.responseText); }, 
		onComplete : function (r) { alert(r.responseText); }*/
	}
	new Ajax.Updater("containerReseau",urls['hsr'],opts);
}


/* * loadMapPlans ( string domID2Update ) */
function loadMapPlans (zoneToUpdate) {
	
	// # enclenchement de img load
	//$('boxTPLoad').style.display='inline';
	// # byTP
	var opts = { method : 'post' , parameters : globs+"&nid="+$F('reseau'),
		onSuccess : function (r) { 
			//$('boxTPLoad').style.display='none'; 
			}
		/*onFailure : function (r) { alert(r.responseText); }, 
		onComplete : function (r) { alert(r.responseText); }*/
	}
	new Ajax.Updater(zoneToUpdate,urls['gpfn'],opts);
}