if (GBrowserIsCompatible()) {
      
  // this variable will collect the html which will eventualkly 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) {
  // use a custom icon with letter A - Z
  var letter = String.fromCharCode("A".charCodeAt(0) + i);
  var myIcon = new GIcon(G_DEFAULT_ICON, "http://www.google.com/mapfiles/marker" + letter + ".png");
  myIcon.printImage = "http://maps.google.com/mapfiles/marker"+letter+"ie.gif"
  myIcon.mozPrintImage = "http://maps.google.com/mapfiles/marker"+letter+"ff.gif"
 
  var marker = new GMarker(point, {icon:myIcon});
  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 += '<b>'+letter+'</b>: <a href="javascript:myclick(' + i + ')">' + name + '</a>  ';
  i++;
  return marker;
  }

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

  // create the map
  var map = new GMap2(document.getElementById("map"));
  map.addControl(new GLargeMapControl());
  map.addControl(new GMapTypeControl());
  map.setCenter(new GLatLng(35.212316,-80.843088), 15);

  // add the points    
  var point = new GLatLng(35.212316,-80.843088);
  var marker = createMarker(point,"Charlotte, NC","<p>&nbsp;&nbsp;&nbsp;&nbsp;<strong>The Neighborhood Grille</strong><br />&nbsp;&nbsp;&nbsp;&nbsp;911 E Morehead St \#200<br />&nbsp;&nbsp;&nbsp;&nbsp;Charlotte, NC 28204<br />&nbsp;&nbsp;&nbsp;&nbsp;Phone\: (704) 377-3808<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;<a href='http://www.neighborhoodgrille.com/?cat=5' target='_top'>Contact Us</a> - <a href='http://www.mapquest.com/maps?form=directions&2a=911%20E%20Morehead%20St%20Ste%20200&2c=Charlotte&2s=NC&2z=28204-2856&2y=US&2l=35.213688&2g=-80.844476'>Directions</a></p>")
  map.addOverlay(marker);

  // put the assembled side_bar_html contents into the side_bar div
  document.getElementById("side_bar").innerHTML = side_bar_html;

} else {

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

}
