
function LoadMapSearchControl(adr,elementId) {

var options = {
	zoomControl : GSmapSearchControl.ZOOM_CONTROL_ENABLE_ALL,
	title : "plan",
	url : "http://www.acryom.com",
	idleMapZoom : GSmapSearchControl.ACTIVE_MAP_ZOOM,
	activeMapZoom : GSmapSearchControl.ACTIVE_MAP_ZOOM,
	mapTypeControl : true
	}

new GSmapSearchControl(
	document.getElementById("plan"+elementId),
	adr,
	options
	);
}


$(document).ready(function()
{
	// ouverture depuis article
	$("a.codeButtonC").click(function()
	{
		var adresse;
		adresse=$(this).attr("title");

		var mapElementId;
		mapElementId=$(this).attr("name");

// experimental
      	// Create a search control
      	//var searchControl = new GSearchControl();

      	// Add in a full set of searchers
      	//var localSearch = new GlocalSearch();
      	//searchControl.addSearcher(localSearch);

      	// Set the Local Search center point
      	//localSearch.setCenterPoint(adresse);

      	// tell the searcher to draw itself and tell it where to attach
      	//searchControl.draw(document.getElementById("localsearch"));

      	// execute an inital search
      	//searchControl.execute(adresse);
	//get result ?
//experimetal

		//$("#mapnotice").html("<br><br>Note : si la carte n'affiche pas l'adresse recherch&eacute;e pour diverses raisons (orthographe incorrecte, adresse incompl&egrave;te, etc ... ), vous pouvez affiner la localisation dans la barre de recherche figurant sous la carte.");

		$("div#note" + mapElementId).html("Note : si la carte n'affiche pas l'adresse recherch&eacute;e pour diverses raisons (orthographe incorrecte, adresse incompl&egrave;te, etc ... ), vous pouvez affiner la localisation dans la barre de recherche figurant sous la carte.");
		$("div#note" + mapElementId).toggle();
		$("div#plan" + mapElementId).toggle();

		LoadMapSearchControl(adresse,mapElementId);
		return false;
	});
});
