var map;
var directionsPanel;
var directions;

function initialize() {
  if (GBrowserIsCompatible()) {
      // load the map
      map = new GMap2(document.getElementById("map_canvas"));
      map.setCenter(new GLatLng(41.474676, -74.613880), 12);
      map.setUIToDefault();

      // add the marker
      var point = new GLatLng(41.474676, -74.613880);
      map.addOverlay(new GMarker(point));
  }
}

function getDirections() {
  directionsPanel = document.getElementById("map_route");
  directionsPanel.innerHTML = "";
  directions = new GDirections(map,directionsPanel);
  directions.load("from: " + document.getElementById("inputFrom").value + " to:  305 Oakland Valley Rd. Cuddebackville, NY 12729 (Oakland Valley Race Park)");
}
