function geoInitializer()
{	
	// ====== Create a Client Geocoder ======
    geo = new GClientGeocoder(new GGeocodeCache()); 
    // ====== Array for decoding the failure codes ======
	var reasons=[];
	reasons[G_GEO_SUCCESS]            = "Success";
	reasons[G_GEO_MISSING_ADDRESS]    = "Missing Address: The address was either missing or had no value.";
	reasons[G_GEO_UNKNOWN_ADDRESS]    = "Unknown Address:  No corresponding geographic location could be found for the specified address.";
	reasons[G_GEO_UNAVAILABLE_ADDRESS]= "Unavailable Address:  The geocode for the given address cannot be returned due to legal or contractual reasons.";
	reasons[G_GEO_BAD_KEY]            = "Bad Key: The API key is either invalid or does not match the domain for which it was given";
	reasons[G_GEO_TOO_MANY_QUERIES]   = "Too Many Queries: The daily geocoding quota for this site has been exceeded.";
	reasons[G_GEO_SERVER_ERROR]       = "Server error: The geocoding request could not be successfully processed.";
	reasons[G_GEO_BAD_REQUEST]        = "A directions request could not be successfully parsed.";
	reasons[G_GEO_MISSING_QUERY]      = "No query was specified in the input.";
	reasons[G_GEO_UNKNOWN_DIRECTIONS] = "The GDirections object could not compute directions between the points.";
	return geo;
}
//-----------------------------------------------------------------------      
function GDirectionsInitializer()
{
	return new GDirections(null, null);
}
//-----------------------------------------------------------------------      
function getPoint(address, funcName)      
{	
	if(null != address)
	{
		geo.getLatLng(address, eval(funcName));
	}
	else	
	{
		return null;
	}
}
//-----------------------------------------------------------------------
function createSimpleMarker(mapObj, point)
{
	if (GBrowserIsCompatible())
	{
		var Marker = new GMarker(point);
		mapObj.addOverlay(Marker);
		return Marker;
	}
	return null;
}
//-----------------------------------------------------------------------    
function findPointBetweenTwoPoints(point1, point2)
{		
	if(null != point1
	&& null != point2)
	{
		return new GLatLng(
							((parseFloat(point1.lat()) + parseFloat(point2.lat())) / 2) ,
							((parseFloat(point1.lng()) + parseFloat(point2.lng())) / 2)
						   );
	}	
	return null
}
//-----------------------------------------------------------------------    
function addPlace(lat, lng) {
    
    var point = new GLatLng (lat, lng);
    var marker = new GMarker (point);  
    map.addOverlay (marker);



    // Remember the range of coordinates that have been marked
    // so that we can make the map encompass all of them.
    var tmp_minLat = Math.min (y, lat);
    var tmp_maxLat = Math.max (y, lat);
    var tmp_minLng = Math.min (x, lng);
    var tmp_maxLng = Math.max (x, lng);

    // Recenter the map to the middle of all locations that
    // we have marked so far.
    map.setCenter (new GLatLng ((tmp_minLat + tmp_maxLat) / 2, (tmp_minLng + tmp_maxLng) / 2));

    // Find the maximum zoom level at which all of the requested addresses
    // will fit into the map (with a bit of margin), and zoom the map to
    // that level.  Note that it doesn't seem to work to specify the
    // corners of the bounding box when creating the GLatLngBounds
    // object, so we need to use the alternate approach of calling the
    // extend method instead.
    
    
    
    var bounds = new GLatLngBounds;
    bounds.extend (new GLatLng (tmp_minLat - ((tmp_maxLat - tmp_minLat) / 12),
                                tmp_minLng - ((tmp_maxLng - tmp_minLng) / 12)));
                                
    bounds.extend (new GLatLng (tmp_maxLat + ((tmp_maxLat - tmp_minLat) / 12),
                                tmp_maxLng + ((tmp_maxLng - tmp_minLng) / 12)));
                                
    map.setZoom (map.getBoundsZoomLevel (bounds));
        
    return marker;
}