

/*
GOOGLEMAPS
*/

var geocoder;
   var map;

   var restaurant = "Buffalo Rose";
   var address = "1119 Washington Ave., Golden, CO, 80401";

   // On page load, call this function

   function load()
   {
      // Create new map object
      map = new GMap2(document.getElementById("map_canvas"));
	  map.addControl(new GSmallMapControl());
      map.addControl(new GMapTypeControl());
      map.setCenter(new GLatLng(39.752601, -105.215979), 13);
	  // Create a base icon for all of our markers that specifies the
        // shadow, icon dimensions, etc.
        

     
   }

   // This function adds the point to the map

   function addToMap(response)
   {
	   
	   var baseIcon = new GIcon(G_DEFAULT_ICON);
        baseIcon.shadow = "dot.png";
		baseIcon.iconSize = new GSize(35, 35);
        baseIcon.shadowSize = new GSize(35, 35);
        baseIcon.iconAnchor = new GPoint(0, 0);
        baseIcon.infoWindowAnchor = new GPoint(16, 16); 
		
		
      // Retrieve the object
      place = response.Placemark[0];

      // Retrieve the latitude and longitude
      point = new GLatLng(place.Point.coordinates[1],
                          place.Point.coordinates[0]);

      // Center the map on this point
      map.setCenter(new GLatLng(39.752601, -105.215979), 13);


       function createMarker(point, index) {
          // Create a lettered icon for this point using our icon class
          var letter = String.fromCharCode("A".charCodeAt(0) + index);
          var letteredIcon = new GIcon(baseIcon);
          letteredIcon.image = "images/dot.png";

          // Set up our GMarkerOptions object
          markerOptions = { icon:letteredIcon };
          var marker = new GMarker(point, markerOptions);

          /*GEvent.addListener(marker, "click", function() {
            marker.openInfoWindowHtml('<table width="200" border="0" cellspacing="10"><tr><td width="114"><img src="imgs/merch1.jpg" width="114" height="78" align="left" /></td><td width="80"  valign="top"><p class="bodytextbold">Here is merchant '+index+'</p></td></tr></table>' );
          });*/
		   /*GEvent.addListener(marker, "mouseout", function() {
            marker.closeInfoWindow();
          });*/
          return marker;
        }

      // Add the marker to map
      map.addOverlay(createMarker(point, 1));


   }

