// Create our "tiny" marker icon

var icon = new GIcon();
icon.image = "http://labs.google.com/ridefinder/images/mm_20_green.png";
icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
icon.iconSize = new GSize(12, 20);
icon.shadowSize = new GSize(22, 20);
icon.iconAnchor = new GPoint(6, 20);
icon.infoWindowAnchor = new GPoint(5, 1);

function loadMap(pointY, pointX, zoomAmount)
{
  var map = new GMap2(document.getElementById("map"));
  map.addControl(new GSmallMapControl());
  map.addControl(new GMapTypeControl());
  map.setCenter(new GLatLng(pointY, pointX), zoomAmount);
  var mgr = new GMarkerManager(map);
  return map;
}

function loadBareMap(pointY, pointX, zoomAmount)
{
  var map = new GMap2(document.getElementById("map"));
  map.setCenter(new GLatLng(pointY, pointX), zoomAmount);
  var mgr = new GMarkerManager(map);
  return map;
}

function createMarker(map, pointY, pointX, toolTip, redirectURL)
{
  var point = new GLatLng(pointY, pointX);
  var marker = new GMarker(point, {
      icon: icon,
      title: toolTip
    });
  map.addOverlay(marker);
  GEvent.addListener(marker, 'click', function() {
	 window.location=redirectURL;
  });
  marker.title = toolTip;
}