

 var base = $('#base').html();
 var gmap_location;
 var map_long;
 var map_lat;
 
 
$(function(){  
  gmap_location = $('#gmap_location').html();  
  gmap_split = gmap_location.split(','); 
  map_lat = parseFloat(gmap_split[0]);
  map_long = parseFloat(gmap_split[1]);
  showMap(); 
});


 function showMap()
        {
        
        
      if (GBrowserIsCompatible()) { 
        
      function createMarker(point,html) {
        var marker = new GMarker(point);
//         GEvent.addListener(marker, "click", function() {
//          // marker.openInfoWindowHtml(html);
//         });
        return marker;
      }

      // Display the map, with some controls and set the initial location 
      var map = new GMap2(document.getElementById("map"));
     map.addControl(new GSmallMapControl());	
     
   
     map.addControl(new GMapTypeControl());
     map.setCenter(new GLatLng(map_lat, map_long),15);
    
      // Set up three markers with info windows 
    
   

      var point = new GLatLng(map_lat, map_long);
      var marker = createMarker(point,'>');
      map.addOverlay(marker);
      
      
      GEvent.addListener(map, "moveend", function() {
          var center = map.getCenter();
          //document.getElementById("message").innerHTML = center.toString();
        });

    }
    
    // display a warning if the browser was not compatible
    else {
      alert("Sorry, the Google Maps API is not compatible with this browser");
    }
}


