//<![CDATA[
   // Google Maps API 

   function load(address, div_id)
   {
      // Create geocoding object
      var geocoder = new GClientGeocoder();
      // Retrieve location information, pass it to addToMap()
      geocoder.getLocations(address, addToMap);
	  
	  // Remove the "this" class from all a tags
	  var x = document.getElementsByTagName('a');
	  for (var i=0;i<x.length;i++)
	  {
		if (x[i].className == "this")
			x[i].className = "none";
	  }
	  
	  // Change style of div_id to class="this"
	  eventbox = document.getElementById(div_id);
	  eventbox.className = "this";
	  
   }

   // This function creates the map from the response from getLocations

   function addToMap(response)
   {
      if (response.Status.code == G_GEO_SUCCESS) {
	  // Retrieve the object
      place = response.Placemark[0];
      // Retrieve the latitude and longitude
      point = new GLatLng(place.Point.coordinates[1],
                          place.Point.coordinates[0]);
      // Create map object
      var map = new GMap2(document.getElementById("map"));
	  // Map controls
	  map.addControl(new GSmallMapControl());
	  map.addControl(new GMapTypeControl());
	  map.addControl(new GScaleControl()); 
      // Center the map on this point
      map.setCenter(point, 13);
      // Create a marker
      marker = new GMarker(point);
      // Add the marker to map
      map.addOverlay(marker); 
	  }
	  else {
	  	// remove previous map overlay
		var map = new GMap2(document.getElementById("map"));
		map.removeOverlay();
	  }  
   }
       
    //]]>


