    var map;
    var geocoder = null;
    var addressMarker;

    function load() {
      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("map"));
        map.addControl(new GSmallMapControl());
        //map.addControl(new GMapTypeControl());
        map.setCenter(new GLatLng(54, -4.1), 5);
        map.setMapType(G_NORMAL_MAP);
        geocoder = new GClientGeocoder();
      }
    }

    function showAddress(address) {
      if (geocoder) {
        geocoder.getLatLng(address,
          function(point) {
            if (!point) {
               showFallbackAddress(address)
            } else {
              if (addressMarker) {
                map.removeOverlay(addressMarker);
              }
              addressMarker = new GMarker(point);
              map.setCenter(point, 15);
              map.addOverlay(addressMarker);
            }
          }
        );
      }
    }
	
	function showFallbackAddress(address) {
	
		newAddress=address.substr(address.lastIndexOf(",")+1);
		
		address=newAddress;
		jQuery("#mapWarning").show();
		//alert("Now searching for "+address);
		
      if (geocoder) {
        geocoder.getLatLng(address,
          function(point) {
            if (!point) {
              //showFallbackAddress("NE1");
            } else {
              if (addressMarker) {
                map.removeOverlay(addressMarker);
              }
              //addressMarker = new GMarker(point);
              map.setCenter(point, 14);
              map.addOverlay(addressMarker);
            }
          }
        );
      }
    }

