 // this variable will collect the html which will eventually be placed in the side_bar
      var side_bar_html = "";
    
      // arrays to hold copies of the markers and html used by the side_bar
      // because the function closure trick doesnt work there
      var gmarkers = [];
      var i = 0;


      // A function to create the marker and set up the event window
      function createMarker(point,name,html) {
        var marker = new GMarker(point);
        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(html);
        });
        // save the info we need to use later for the side_bar
        gmarkers[i] = marker;
        // add a line to the side_bar html
        side_bar_html += '<a href="javascript:myclick(' + i + ')">' + name + '</a><br>';
        i++;
        return marker;
      }


      // This function picks up the click and opens the corresponding info window
      function myclick(i) {
        GEvent.trigger(gmarkers[i], "click");
      }

    function load() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
        map.addControl(new GSmallMapControl());
        map.setCenter(new GLatLng(52.37184477255471, 9.759725779294968), 15,G_HYBRID_MAP);
        map.addControl(new GMapTypeControl());
    
        
 
 // add the points    
      var point = new GLatLng(52.37184477255471, 9.759725779294968);
      var marker = createMarker(point," Bultstraße"," Bultstraße 5 A<br /> 30159 Hannover");
      map.addOverlay(marker);

      var point = new GLatLng(52.369711,9.753606, 0.00357,0.011759);
      var marker = createMarker(point,"Henriettenstiftung","Henriettenstiftung<br />Marienstraße 72 - 90<br />30171 Hannover");
      map.addOverlay(marker);

      var point = new GLatLng(52.361922,9.828853);
      var marker = createMarker(point,"Kirchrode","Kirchrode<br />Schwemannstraße 19<br />30559 Hannover");
      map.addOverlay(marker);
 
 document.getElementById("side_bar").innerHTML = side_bar_html;
        
        
      }
    }
    

