window.onload = gm_load;
function gm_load()
{

  if (GBrowserIsCompatible())
  {

    //
    // step 1: create the map and add controls
    //
    var map = new GMap2(document.getElementById("map"));
    map.addControl(new GSmallMapControl());
    map.setCenter(new GLatLng(37.6009, -77.5616), 15);

    // Our info window content
    var infoTabs =
    [
      new GInfoWindowTab("Address", "<table border='0' cellspacing='7px'><tr><td></td><td><div id='oodow'><b>Regency Self Storage</b><br>8500 Jesse Senior Dr.<br>Richmond, VA 23229</td></tr></div></table>"),
      new GInfoWindowTab("Directions", "<table border='0'><tr><td nowrap align='left'><div id='ooin'><form action='http://maps.google.com/maps' method='get'><b>Get Directions From:&nbsp;</b><br><input type='text' name='saddr' id='saddr' value='' style='width: 150px; border: solid 1px black;' />&nbsp;<input style='border: solid 1px black;font-size: 10pt;' type='submit' value='Go!' /><input type='hidden' name='daddr' value='4118 Nine Mile Road, Richmond, VA 23223' /><input type='hidden' name='hl' value='en' /></p></form></div></td></tr></table>")
    ];

    //
    // Place a marker in the center of the map and open the info window
    // automatically
    //
    var marker = new GMarker(map.getCenter());
    GEvent.addListener(marker, "click", function() {
    marker.openInfoWindowTabsHtml(infoTabs);
    });
    map.addOverlay(marker);
    marker.openInfoWindowTabsHtml(infoTabs);

    var icon        = new GIcon();
    icon.image      = "http://www.Rt3simplystorage.com/images/sign.png";
    icon.shadow     = "http://www.google.com/mapfiles/shadow50.png";
    icon.iconSize   = new GSize(26, 25);
    icon.shadowSize = new GSize(37, 34);

    GEvent.addListener
    (
      map, "moveend",
      function()
      {
        var center = map.getCenter();
//            document.getElementById("message").innerHTML = center.toString();
      }
    );


  } // end compatibility if statement
}