	  var map = null;
      var geocoder = null;

      // because the function closure trick doesnt work there
      var gmarkers = [];
      var htmls = [];
	  // ===== Start with an empty GLatLngBounds object =====     
      var bounds = new GLatLngBounds();

function setMultipleMarkers(lats, lons, info) {
		map = new GMap2(document.getElementById("map"));
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		for (var i = 0; i<lons.length; ++i) {
			createMarker(i, lats[i], lons[i], info[i]);
		};
		
		
      // ===== determine the zoom level from the bounds =====
              map.setZoom(map.getBoundsZoomLevel(bounds));
  //          map.setZoom(13);

          // ===== determine the centre from the bounds ======
          var clat = (bounds.getNorthEast().lat() + bounds.getSouthWest().lat()) /2;
          var clng = (bounds.getNorthEast().lng() + bounds.getSouthWest().lng()) /2;
          map.setCenter(new GLatLng(clat,clng));
   //map.setCenter(new GLatLng(40, -80));
    }
    


function createMarker(num, lat, lon, info) {
		var point = new GLatLng(lat,lon);
        map.setCenter(point, 13);
        var marker = new GMarker(point);
        GEvent.addListener(marker, "click", function() {
			marker.openInfoWindowHtml(info);
			});
        // ==== Each time a point is found, extent the bounds ato include it =====
            bounds.extend(point);        
        
        // save the info we need to use later for the side_bar
        gmarkers[num] = marker;
        htmls[num] = info;
               
        map.addOverlay(marker);
        }
       
      function myclick(i) {
        gmarkers[i].openInfoWindowHtml(htmls[i]);
      }
