
function fillIpForm(t) {
	$('ipField').value=t;
}

function gload(la,lo,leg) {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
		map.setCenter(new GLatLng(la,lo), 4);
		map.addControl(new GSmallMapControl());
        map.addControl(new GMapTypeControl());
    	map.addControl(new GScaleControl());
	    map.enableScrollWheelZoom();
		//map.addControl(new GLargeMapControl());
		//map.setMapType(G_SATELLITE_MAP); // Vue satelite
		//map.addControl(new GScaleControl()) ;
		var eiffel = new GPoint(lo,la);
		var marker = createMarker(eiffel, leg);
		map.addOverlay(marker);
      }
    }
/*
    function draw(lo,la) {
        map.setCenter(new GLatLng(lo,la), 4);				
		map.addControl(new GLargeMapControl());
		map.setMapType(G_SATELLITE_MAP); // Vue satelite
		map.addControl(new GScaleControl()) ;
	}*/
	// Fonction de cr	ation de point avec l	gende et utilisation des icones
	function createMarker(point, legende) {
	// Création de mini icones
		var icon = new GIcon();
		icon.image = "http://labs.google.com/ridefinder/images/mm_20_red.png";
		icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
		icon.iconSize = new GSize(12, 20);
		icon.shadowSize = new GSize(22, 20);
		icon.iconAnchor = new GPoint(6, 20);	
		icon.infoWindowAnchor = new GPoint(5, 1);			

		var marker = new GMarker(point, icon);
		GEvent.addListener(marker, 'click', function() {
			marker.openInfoWindowHtml(legende);
		});
		return marker;
	}