
    //<![CDATA[

    var map;
    var geocoder;

    function load() {
      map = new GMap2(document.getElementById("map"));
      map.setCenter(new GLatLng(0, 0), 1);
      geocoder = new GClientGeocoder();
    }

    // addAddressToMap() is called when the geocoder returns an answer.  It adds a marker to the map with an open info window showing the nicely formatted version of the address and the country code.
	
    function addAddressToMap(response) {
      map.clearOverlays();
      if (!response || response.Status.code != 200) {
        alert("Sorry, we were unable to geocode that address");
      } else {
        place = response.Placemark[0];
        point = new GLatLng(place.Point.coordinates[1],
                            place.Point.coordinates[0]);
        marker = new GMarker(point);
		
// start cata
		map.setCenter(point, 16);
		map.addControl(new GSmallZoomControl());
// end cata

// start cata control
//       map.addControl(new GSmallMapControl());
        map.addControl(new GMapTypeControl());
// end cata control

// start cata icon      
		var tiny = new GIcon();
		tiny.image = "http://www.dentpedia.us/map/images/mini-WHITE-BLANK.png";
		tiny.shadow = "http://www.dentpedia.us/map/images/shadow.png";
		tiny.iconSize = new GSize(32, 39);
		tiny.shadowSize = new GSize(50, 40);
		tiny.iconAnchor = new GPoint(15, 0);
		tiny.infoWindowAnchor = new GPoint(0, 0);	
		tiny.infoShadowAnchor = new GPoint(0, 0);
		
		map.addOverlay(new GMarker(point, { icon: tiny }));
		map.openInfoWindow(map.getCenter(),
//             document.createTextNode(place.address + 'Placement on map is approximate.'));
		       document.createTextNode('Placement on map is approximate.'));


// end cata icon 

       // map.addOverlay(marker);
       // marker.openInfoWindowHtml('<br>' + place.address);
      }
    }

// showLocation() is called when you click on the Search button in the form. It geocodes the address entered into the form and adds a marker to the map at that location.
    function showLocation() {
      var address = document.forms[0].q.value;
      geocoder.getLocations(address, addAddressToMap);
    }

   // findLocation() is used to enter the sample addresses into the form.
    function findLocation(address) {
      document.forms[0].q.value = address;
      showLocation();
    }
    //]]>
