var map; var id_current=null; var geocoder = null; function show(id) { areal=document.getElementById(id); if (areal) { if (areal.className != 'onglet onglet-actif') { if (id_current==null) id_current='tendance'; areal_current=document.getElementById(id_current); if (areal_current) { areal_current.className="onglet"; } areal.className="onglet onglet-actif"; showm=document.getElementById(id + '_show'); if (showm) { showm.style.display="block"; } showic=document.getElementById(id_current + '_show'); if (showic) { showic.style.display="none"; } id_current=id; } } else { id_current=null; } } function load() { if (GBrowserIsCompatible()) { map = new GMap2(document.getElementById("map")); geocoder = new GClientGeocoder(); map.addControl(new GLargeMapControl()); map.addControl(new GMapTypeControl()); map.enableScrollWheelZoom(); map.enableContinuousZoom(); GEvent.addDomListener(map.getContainer(), "DOMMouseScroll", function (oEvent) { if (oEvent.preventDefault) oEvent.preventDefault(); }); geocoder.getLocations(' france', function(response) { if (!response || response.Status.code != 200) { map.clearOverlays(); var point = new GLatLng(27.994401, 13.164063); map.setCenter(point, 1, G_HYBRID_MAP); } else { map.clearOverlays(); place = response.Placemark[0]; var point = new GLatLng(place.Point.coordinates[1], place.Point.coordinates[0]); map.setCenter(point, 14, G_HYBRID_MAP); } }); } }