function load()
{
  if (GBrowserIsCompatible())
  {
	  
      function myclick(i)
	  {
        gmarkers[i].openInfoWindowHtml('<div style="white-space:nowrap;">'+gmarkers[i].my_html+'</div>');
	  }
	  
    var map = new GMap2(document.getElementById("map"));
    map.addControl(new GSmallMapControl());
    map.addControl(new GMapTypeControl());
	map.setCenter(new GLatLng(39.653742, -75.72677), 14);
      var gmarkers = [];
      
    // Read the data from example.xml
    var request = GXmlHttp.create();
    request.open("GET", "markers.xml", true);
    request.onreadystatechange = function() 
	{
      if (request.readyState == 4) 
	   {
		var xmlDoc = request.responseXML;
        // obtain the array of markers and loop through it
        var markers = xmlDoc.documentElement.getElementsByTagName("marker");
        for (var i = 0; i < markers.length; i++) 
		  {
			// obtain the attribues of each marker
            var lat = parseFloat(markers[i].getAttribute("lat"));
            var lng = parseFloat(markers[i].getAttribute("lng"));
            var point = new GPoint(lng,lat);
            var html = markers[i].getAttribute("html");
			var label = markers[i].getAttribute("label");
			var address1 = markers[i].getAttribute("address1");
			var address2 = markers[i].getAttribute("address2");
            // create the marker
            var marker = new GMarker(point);

            // Build the extra html that handles the directions links and forms
            //     The inactive version of the direction info
            marker.my_html = '<strong>' + html + '</strong><br/>' + address1 + '<br/>' + address2 + '<br/>';
            //     The version with the "to here" form open
            marker.my_name = label;
            map.addOverlay(marker);
            gmarkers.push(marker);
          }
          // this variable will collect the html which will eventually be placed in the sidebar
          var sidebar_html = "";
      
          // scan through the gmarkers[] array assembling the sidebar html
          for (var i=0; i < gmarkers.length; i++)
		   {
             if (gmarkers[i].my_name)
			  {
 		          sidebar_html += '<a href="javascript:myclick(' + i + ')">' + gmarkers[i].my_name + '</a><br>';
              }
           }        


          // put the assembled sidebar_html contents into the sidebar div
          <!--document.getElementById("sidebar").innerHTML = sidebar_html;-->
	   }
    }
    request.send(null);

    GEvent.addListener(map, "click", function(overlay, point) 
	  {
        if (overlay)
		  {
            if (overlay.my_html) 
			  {
	            overlay.openInfoWindowHtml('<div style="width:185px;">'+overlay.my_html+'</div>');
    	      }
          }
      });      
  }

   else
	{
	   alert("Sorry, the Google Maps API is not compatible with this browser");
	}

}
