//<![CDATA[
function load() {
  if (GBrowserIsCompatible()) {
    var map = new GMap2(document.getElementById("map"));
    map.enableScrollWheelZoom();
    map.enableContinuousZoom();
    map.addControl(new GSmallMapControl());
    var location = new GLatLng(35.439151, -80.57773);
    map.setCenter(new GLatLng(location.lat() + 0.007, location.lng()), 13); //set the center slightly higher than the church's location
    
    var marker = new GMarker(location);
    var overlay_caption = "<div class='location_title'>Concord Bible Church</div>" +
                          "<div class='location_desc'>711 Williamsburg Court<br />" +
                          "Concord, NC &nbsp;28025<br />" +
                          "(704) 786-7311<br />" +
                          "<form class='directions' method='get' action='http://maps.google.com/maps'>" +
                            "<b>Get Directions</b><br />" +
                            "<input type='hidden' name='daddr' value='711 Williamsburg CT NE, Concord, NC 28025 (Concord Bible Church)' />" +
                            "<input type='hidden' name='geocode' value='7093851673893115838,35.440035,-80.579998' />" +
                            "<input type='text' name='saddr' title='Your address' tabindex='1' style='width:16.0em; margin-right:0.5em;' />" +
                            "<input type='submit' value='Go!' tabindex='2' />" +
                          "</form>" +
                          "</div>";
    //Note to self: http://www.alistapart.com/articles/makingcompactformsmoreaccessible
    GEvent.addListener(marker, "click", function() {
      marker.openInfoWindowHtml(overlay_caption);
    });
    
    map.addOverlay(marker);
    marker.openInfoWindowHtml(overlay_caption);
  }
}
//]]>
