var locations = {};

    function load() {
      var map = new GMap2(document.getElementById("map"));
      map.setCenter(new GLatLng(42.47292,-83.180752), 9);

      GDownloadUrl("/js/markers.xml", function(data, responseCode) {
  // To ensure against HTTP errors that result in null or bad data,
  // always check status code is equal to 200 before processing the data
  if(responseCode == 200) {
    var xml = GXml.parse(data);
    var markers = xml.documentElement.getElementsByTagName("marker");
    for (var i = 0; i < markers.length; i++) {
          var name = markers[i].getAttribute("name");
          var address = markers[i].getAttribute("address");
          var href = markers[i].getAttribute("href");
          var latlng = new GLatLng(parseFloat(markers[i].getAttribute("lat")),
                              parseFloat(markers[i].getAttribute("lng")));
	  var store = {latlng: latlng, name: name, address: address, href: href};
      //map.addOverlay(new GMarker(point));
      map.addOverlay(createMarker(store));
    }
  } 
});

    }

    function createMarker(store) {
      //var store = store[0];
      var newIcon = MapIconMaker.createMarkerIcon({width: 32, height: 32, primaryColor: "#00ff00"});
      var marker = new GMarker(store.latlng, {icon: newIcon});
      var html = "<a href='"+ store.href +"' style='font-size: 16px;'>"+ store.name + "</a> <br/>" + store.address;
      GEvent.addListener(marker, 'click', function() {
        marker.openInfoWindowHtml(html);
      });
      return marker;
    }

