  function LoadSimpleMap() {
    //if (GBrowserIsCompatible()) {
      //Get Lat, Long, Bubble HTML from document?
      var Lat = document.getElementById('mapLat').getAttribute('value');
      var Lng = document.getElementById('mapLong').getAttribute('value');
      var MarkerHtml = document.getElementById('mapHtml').getAttribute('value');
      
      //Create Map      
      var map = new GMap2(document.getElementById("lpMap"));
      map.addControl(new GLargeMapControl());
      map.addControl(new GMapTypeControl());
      map.setCenter(new GLatLng(Lat,Lng), 13);

      // 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.openInfoWindowHtml(MarkerHtml);
      });
      map.addOverlay(marker);
    //}
  }

function LoadKmlMap() {
  var KmlFilePath = document.getElementById('KmlPath').getAttribute('value');
  var Lat = document.getElementById('mapLat').getAttribute('value');
  var Lng = document.getElementById('mapLong').getAttribute('value');
  var Zm = parseInt(document.getElementById('mapZoom').getAttribute('value'));
  //Create Map with KML overlay
  // http://www.google.com/apis/maps/documentation/index.html#XML_Overlays
  var map = new GMap2(document.getElementById("KmlMap")); 
  var geoXml = new GGeoXml(KmlFilePath);  
  map.addControl(new GLargeMapControl());
  map.addControl(new GMapTypeControl());
  map.setCenter(new GLatLng(Lat,Lng), Zm,G_HYBRID_MAP); 
  map.addOverlay(geoXml);
}
  
// used to register onload events to the body 
// See: http://onlinetools.org/articles/unobtrusivejavascript/chapter4.html
function addEvent(obj, evType, fn){ 
 if (obj.addEventListener){ 
   obj.addEventListener(evType, fn, false); 
   return true; 
 } else if (obj.attachEvent){ 
   var r = obj.attachEvent("on"+evType, fn); 
   return r; 
 } else { 
   return false; 
 } 
}

