    var map;
    var gdir;
    var geocoder = null;
    var addressMarker;

    function setDirections(fromAddress, toAddress, locale) {
      gdir.load("from: " + fromAddress + " to: " + toAddress,
		{ "locale": locale });
    }

    function handleErrors(){
	   if (gdir.getStatus().code == G_GEO_UNKNOWN_ADDRESS)
	     AlertBox.alert(lng_g_geo_unknown_address);
	   else if (gdir.getStatus().code == G_GEO_SERVER_ERROR)
	     AlertBox.alert(lng_g_geo_server_error);

	   else if (gdir.getStatus().code == G_GEO_MISSING_QUERY)
	     AlertBox.alert(lng_g_geo_missing_query);

	//   else if (gdir.getStatus().code == G_UNAVAILABLE_ADDRESS)  <--- Doc bug... this is either not defined, or Doc is wrong
	//     alert("The geocode for the given address or the route for the given directions query cannot be returned due to legal or contractual reasons.");

	   else if (gdir.getStatus().code == G_GEO_BAD_KEY)
	     AlertBox.alert(lng_g_geo_bad_key);

	   else if (gdir.getStatus().code == G_GEO_BAD_REQUEST)
	     AlertBox.alert(lng_g_geo_bad_request);

	   else AlertBox.alert(lng_g_geo_unknown_error);

	}

	function onGDirectionsLoad(){
      // Use this function to access information about the latest load()
      // results.

      // e.g.
      // document.getElementById("getStatus").innerHTML = gdir.getStatus().code;
	  // and yada yada yada...
	}
	

