
    var map;
var geocoder;
       function load(Lo,La,G) {
      map = new GMap2(document.getElementById("map"));
      map.addControl(new GSmallMapControl());
      map.setCenter(new GLatLng(Lo,La),G);
      geocoder = new GClientGeocoder();
    }

    function addAddressToMap(response) {
      map.clearOverlays();
      if (!response || response.Status.code != 200) {
        alert("L'indirizzo richiesto non è presente nei nostri dati");
      } else {
        place = response.Placemark[0];
        point = new GLatLng(place.Point.coordinates[1],
                            place.Point.coordinates[0]);
        marker = new GMarker(point);
        map.addOverlay(marker);
        marker.openInfoWindowHtml(place.address );
      }
    }
    
    function showLocation() {
      var address = document.forms[0].q.value;
      address = address + " it";
      geocoder.getLocations(address, addAddressToMap);
    }

    function findLocation(address) {
      document.forms[0].q.value = address;
      showLocation();
    }

