google.load("maps","2.x");var map=null;var geocoder=null;var bounds=null;var customIcon=null;function initialize(){map=new google.maps.Map2(document.getElementById("map"));geocoder=new google.maps.ClientGeocoder();bounds=new google.maps.LatLngBounds();var a=map.getDefaultUI();a.zoom.scrollwheel=false;map.setUI(a);customIcon=new google.maps.Icon(G_DEFAULT_ICON);customIcon.image="http://www.amge.ch/site/wp-content/themes/amge/images/pointeur_gmap.png";markerOptions={icon:customIcon};var b=adresses.length;if(b){for(var i=0;i<b;i++){placeMarker(i,b)}}zoomToBounds()}function placeMarker(i,b){var c=adresses[i].split(",");var d=new google.maps.LatLng(c[0],c[1]);var e=new google.maps.Marker(d,markerOptions);bounds.extend(e.getPoint());map.addOverlay(e);google.maps.Event.addListener(e,"click",function(){var a=infos[i];map.openInfoWindowHtml(d,a)})}function zoomToBounds(){if(bounds.isEmpty()){map.setCenter(new google.maps.LatLng(46.170194,6.130371),9)}else{map.setCenter(bounds.getCenter(),map.getBoundsZoomLevel(bounds)-1)}}function zoomToPoint(i){var a=adresses[i].split(",");var b=new google.maps.LatLng(a[0],a[1]);map.setCenter(b,15);var c=infos[i];map.openInfoWindowHtml(b,c)}