    var map = null;
    var geocoder = null;
    function load(el, lat, lng) {
      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("map"));
   //     map.setCenter(new GLatLng(-25.999891, 134.033203), 3);
        map.addControl(new GLargeMapControl());
        map.addControl(new GMapTypeControl());
        if (lat=="" | lng=="") {
        geocoder = new GClientGeocoder();
        showAddress(el);
        } else {
        showLatLng(lat, lng);
        }
           
      }
    }
  function showLatLng(lat, lng) {
              map.setCenter(new GLatLng(lat, lng), 16); 
              var icon = new GIcon();  
              icon.image = "cogred.gif";  
              icon.iconSize = new GSize(32, 32);
              icon.iconAnchor = new GPoint(16, 16);
              icon.infoWindowAnchor = new GPoint(16, 16);
              var marker = new GMarker(new GLatLng(lat, lng), icon);
              map.addOverlay(marker);
}
    function showAddress(address) {
      if (geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
            if (!point | address=="X") {   
          if (address=='X'){
          alert("This is a Mobile Service - Address not found on Map")}
  if (!point)
{
         alert(address + "not found");
}}
else {
              map.setCenter(point, 16);
              var icon = new GIcon();  
              icon.image = "cogred.gif";  
              //icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
              icon.iconSize = new GSize(32, 32);
              //icon.shadowSize = new GSize(22, 22);
              icon.iconAnchor = new GPoint(16, 16);
              icon.infoWindowAnchor = new GPoint(16, 16);
              var marker = new GMarker(point, icon);
              map.addOverlay(marker);
 //             marker.openInfoWindowHtml(address);
            }
          }
        );
      }
    }

