--- location.inc	2007-08-02 03:57:26.000000000 +0200
+++ location_new.inc	2007-09-25 16:45:31.819086400 +0200
@@ -62,7 +62,7 @@ function location_get_postalcode_data($l
   $location['country'] = isset($location['country']) ? trim($location['country']) : NULL;
   $location['postal_code'] = isset($location['postal_code']) ? trim($location['postal_code']) : NULL;
   if (is_null($location['postal_code']) || is_null($location['country']) || empty($location['country']) || empty($location['postal_code']) || $location['postal_code'] == 'xx') {
-    return NULL;   
+    return NULL;
   }
   $country_specific_function = 'location_get_postalcode_data_'. $location['country'];
   if (function_exists($country_specific_function)) {
@@ -96,7 +96,7 @@ function _location_nothing_to_show($loca
  * Given two points in lat/lon form, returns the distance between them.
  *
  * @param $latlonA
- *   An associative array where 
+ *   An associative array where
  *      'lon' => is a floating point of the longitude coordinate for the point given by latlonA
  *      'lat' => is a floating point of the latitude coordinate for the point given by latlonB
  *
@@ -110,7 +110,7 @@ function _location_nothing_to_show($loca
  * @return
  *    NULL if sense can't be made of the parameters.
  *    An associative array where
- *      'scalar' => Is the distance between the two lat/lon parameter points 
+ *      'scalar' => Is the distance between the two lat/lon parameter points
  *      'distance_unit' => Is the unit of distance being represented by 'scalar'.
  *                         This will be 'km' unless 'mile' is passed for the $distance_unit param
  */
@@ -118,15 +118,15 @@ function location_distance_between($latl
   if (!isset($latlonA['lon']) || !isset($latlonA['lat']) || !isset($latlonB['lon']) || !isset($latlonB['lat'])) {
     return NULL;
   }
-  
+
   if ($distance_unit != 'km' && $distance_unit != 'mile') {
     return NULL;
   }
-  
+
   // $conversion_factor = number to divide by to convert meters to $distance_unit
   // At this point, $distance_unit == 'km' or 'mile' and nothing else
   //$conversion_factor = ($distance_unit == 'km') ? 1000.0 : 1609.347;
-  
+
   $meters = earth_distance($latlonA['lon'], $latlonA['lat'], $latlonB['lon'], $latlonB['lat']);
   return array('scalar' => round($meters/(($distance_unit == 'km') ? 1000.0 : 1609.347), 1), 'distance_unit' => $distance_unit);
 }
@@ -148,7 +148,7 @@ function location_distance_between($latl
  * @param $required_fields
  *   An array of values that are required.  Each string can be one of 'street', 'city', 'postal_code', 'province', or 'country'.
  *   The presence of values in this array determines which fields will be marked as 'required'.  Validation (i.e., making sure
- *   a required value is actually filled in is the responsibility of the caller)   
+ *   a required value is actually filled in is the responsibility of the caller)
  *
  * @param $suppressed_values
  *   An array of values that are to be automatically filled and hidden from user view.  These will be indicated in this
@@ -162,20 +162,20 @@ function location_distance_between($latl
  *
  * @param $form_name
  *   An additional parameter to help prevent HTML input name collisions.  If the caller is using this
- *   function to generate more than 1 location form on a page, then the generated name for each HTML input's 
- *   "name" attribute will go by the value supplied for $form_name.  This parameter is defaulted to 'location' 
- *   For example, if $form_name == 'xyz' and there is a 'street' field in the form to be served, 
+ *   function to generate more than 1 location form on a page, then the generated name for each HTML input's
+ *   "name" attribute will go by the value supplied for $form_name.  This parameter is defaulted to 'location'
+ *   For example, if $form_name == 'xyz' and there is a 'street' field in the form to be served,
  *   the "name" attribute for the HTML <input> will be "edit[xyz][street]"
  *
  * @param $function
  *   A string that tells location_form() which location API function will be using the location submitted via the
  *   generated form.  For example, if $function == 'latlon_rough', then the returned location_form (if it includes
  *   a country field) will only generate a list of countries in the HTML select for which function location_latlon_rough()
- *   is supported.  To figure out which countries these are, we check to see which of the configured countries have existing 
+ *   is supported.  To figure out which countries these are, we check to see which of the configured countries have existing
  *   functions to support the call.  In this case, we would check to see if there existed a function called "location_latlon_rough_us()"
  *   before listing the United States in the HTML SELECT for the generated location form.  $function is defaulted to NULL.
  *   If $function is NULL, the HTML SELECT that is generated will list all countries.
- * 
+ *
  * @return
  *   An location form based on the parameters specified.  If the $fields array is empty, then the
  *   function returns a form in which all possible fields are served as optional form items.
@@ -185,7 +185,7 @@ function location_distance_between($latl
  *
  *    -> The following call returns a form that only contains fields for a postal_code and country where
  *       the postal_code is required:
- *            ---  
+ *            ---
  *            $form = location_form(array('postal_code', 'country'), array(), array('postal_code', 'country'), 'Permanent location')
  *            ---
  *       The form returned by this call is generated with calls to Drupal's 'form_' functions:
@@ -312,9 +312,9 @@ function location_form($fields = array()
       $form['country'] = _location_country_select_options(isset($prefilled_values['country']) ? $prefilled_values['country'] : '', in_array('country', $required_fields), $function);
     }
   }
-  
+
   $form['#theme'] = 'location_form';
-  
+
   return $form;
 }
 
@@ -327,7 +327,7 @@ function location_latlon_form($descripti
   if ($usegmap) {
     $form['map'] = array();  //reserve spot at top of form for map
   }
-  
+
   $form['latitude'] = array(
       '#type' => 'textfield',
       '#title' => t('Latitude'),
@@ -343,12 +343,12 @@ function location_latlon_form($descripti
       '#maxlength' => 64,
       '#description' => $description,
       );
-      
+
   if ($usegmap) {
     $map_macro = variable_get('gmap_user_map', '[gmap|id=usermap|center=0,30|zoom=16|width=100%|height=400px]');
     $form['map']['gmap']['#value'] = gmap_set_location($map_macro, $form, array('latitude'=>'latitude','longitude'=>'longitude'));
   }
-  
+
   return $form;
 }
 
@@ -419,29 +419,29 @@ function location_api2form($location = a
 
 /**
  * This function generates a form for doing proximity searches within a certain distance
- * of a specified point.  
+ * of a specified point.
  *
  * Depending on the context within which this function is called, the search-point can either
- * be user-supplied via the location form that is passed (if one is available) or done within 
- * a search-point extracted from a contact table or some other location source specified by 
+ * be user-supplied via the location form that is passed (if one is available) or done within
+ * a search-point extracted from a contact table or some other location source specified by
  * the programmer calling this function.
  *
  * @param $prefilled_values
- *   An associative array for prefilled values for the proximity search parameters, where 
+ *   An associative array for prefilled values for the proximity search parameters, where
  *     'distance' => is the prefilled int value to be selected for the distance scalar
  *     'distance_unit' => is 'km' or 'mile'
- * 
+ *
  * @param $suppressed_values
  *   An associative array for values you wish to force the selection of rather than pre-fill as a default.
  *   The value will be passed as a hidden form input.  The passed values will be taken in as an associative
- *   array where 
+ *   array where
  *     'distance' => a preselected positive integer for the distance
  *     'distance_unit' => a preselected unit for the distance, one of either 'km' or 'mile'
  *
  * @return
  *   An HTML form (generated by Drupal form functions) that lets users specify proximity search parameters that include distance,
  *   the unit of distance, and a search-point if the optional $location_form parameter is passed.  If one is not passed,
- *   the caller of this function will be assumed to already have one.  
+ *   the caller of this function will be assumed to already have one.
  *
  */
 function location_proximity_form($prefilled_values = array(), $suppressed_values = array()) {
@@ -460,7 +460,7 @@ function location_proximity_form($prefil
       '#options' => drupal_map_assoc(array(5, 10, 25, 50, 100, 250)),
     );
   }
-  
+
   if (in_array('unit', array_keys($suppressed_values))) {
     $form['unit'] = array(
       '#type' => 'hidden',
@@ -474,9 +474,9 @@ function location_proximity_form($prefil
       '#options' => array('mile' => 'miles', 'km' => 'km'),
     );
   }
-  
+
   $form['#theme'] = 'location_proximity_form';
-  
+
   return $form;
 }
 
@@ -496,29 +496,29 @@ function _location_is_full($location = a
   if (!isset($location['street']) && trim($location['street']) != '') {
     return FALSE;
   }
-  
+
   if (!isset($location['city']) && trim($location['city']) != '') {
     return FALSE;
   }
-  
+
   if (!isset($location['province']) && trim($location['province']) != '') {
     return FALSE;
   }
-  
+
   if (!isset($location['postal_code']) && trim($location['postal_code']) != '') {
     return FALSE;
   }
-  
+
   if (!isset($location['country']) && trim($location['country']) != '') {
     return FALSE;
   }
-  
+
   return TRUE;
 }
 
 
 /**
- * Takes two locationes and tries to return a deep-link to driving directions. 
+ * Takes two locationes and tries to return a deep-link to driving directions.
  *
  * Parameters:
  * @param $locationA
@@ -529,7 +529,7 @@ function _location_is_full($location = a
  *      'province'     => the province, state, or territory
  *      'country'      => lower-cased two-letter ISO code (REQUIRED)
  *      'postal_code'  => the postal code
- * 
+ *
  * @param $locationB
  *   An associative array that represents an location in the same way that
  *   parameter $locationA does.
@@ -537,7 +537,7 @@ function _location_is_full($location = a
  * @param $link_text
  *   The text of the HTML link that is to be generated.
  *
- * @return 
+ * @return
  *   A deep-link to driving directions on Yahoo! or some other mapping service, if enough fields are filled in the parameters.
  *   A deep-link to a form for driving directions with information pre-filled if not enough, but some fields are filled in the parameters.
  *   The empty string if no information is provided (or if so little information is provided that there is no function to which to delegate
@@ -545,7 +545,7 @@ function _location_is_full($location = a
  *
  *   We dispatch the call to a country-specific function.  The country-specific function, in this case,
  *   will be the one reflected by the country parameter of the first function.  We require that
- *   both locationes supplied have a country field at the minimum.  
+ *   both locationes supplied have a country field at the minimum.
  *
  *   The country-specific functions will ultimately decide, with the parameters given, whether to
  *   to link to a form for driving directions is provided, where this form will be
@@ -556,15 +556,15 @@ function location_driving_directions_lin
   if (!isset($locationA['country']) || !isset($locationB['country'])) {
     return '';
   }
-  
+
   // For now, return empty string if starting-point and destinations are in different countries
   //if ($locationA['country'] != $locationB['country']) {
   //  return '';
   //}
   // Lines above commented out because I want to let the country-specific function of the departure point decide
-  // what it will do with driving destination locationes from other countries.  As an example, Yahoo! Maps supports driving 
-  // direction queries for locationes between the U.S. and Canada. 
-  
+  // what it will do with driving destination locationes from other countries.  As an example, Yahoo! Maps supports driving
+  // direction queries for locationes between the U.S. and Canada.
+
   $driving_direction_function = 'location_driving_directions_link_'. $locationA['country'];
   if (function_exists($driving_direction_function)) {
     $http_link = $driving_direction_function($locationA, $locationB);
@@ -575,7 +575,7 @@ function location_driving_directions_lin
       return '';
     }
   }
-  
+
   return '';
 }
 
@@ -583,7 +583,7 @@ function location_driving_directions_lin
  * Takes an location and a distance and returns an array of all postal-codes (from all countries that are supported)
  * within the specified distance of the specified location.
  *
- * @param $location 
+ * @param $location
  *   An associative array where
  *     'street'       => the street location
  *     'additional'   => extra street location or building name or hall or something like that.\
@@ -594,24 +594,24 @@ function location_driving_directions_lin
  *
  * @param $distance
  *   The number portion of the distance; it is forced to an integer ceiling
- * 
- * @param $distance_unit 
+ *
+ * @param $distance_unit
  *   The unit of distance being used for the distance being submitted.
  *   Valid arguments for $distance_unit are 'mile' and 'km'.  If something other than one of
  *   these unit types is submitted for this argument, it is forced to 'km'.
  *
- * @return 
- *   An array where 
+ * @return
+ *   An array where
  *     -> the keys are a postive integer ranking of the search result's closeness to the parameter $postal_code
  *        with 1 being assigned to the nearest postal code
- *     -> the values are an associative array where 
+ *     -> the values are an associative array where
  *          'postal_code'   => A postal code that fell within the search-radius given by $distance and $distance_unit.
  *          'country'       => The two-letter ISO code for the home-country of this particular postal_code search result.
  *          'city'          => The city to which this postal code belongs.
  *          'province'      => The province to which this postal code belongs.
  *          'lon'           => The longitude coordinate of the approximate center of the area covered by 'postal_code'
  *          'lat'           => The latitude coordinate of the approximate center of the area covered by 'postal_code'
- *          'distance'      => The number of 'km's or 'mile's that are between the approximate center of the area of 
+ *          'distance'      => The number of 'km's or 'mile's that are between the approximate center of the area of
  *                             the $postal_code parameter and that of the 'postal_code' in this subarray
  *          'distance_unit' => The unit of distance specified by 'scalar'
  */
@@ -620,12 +620,12 @@ function location_nearby_postalcodes_byl
   //$start_time = microtime();
 
   $latlon = location_latlon_rough($location);
-  
+
   // If we could not get lat/lon coordinates for the given location, return an empty search result set.
   if (!isset($latlon['lat']) || !isset($latlon['lon'])) {
     return array();
   }
-  
+
   // If the distance parameters did not make sense, return an empty search result set.
   if (!($distance_float = _location_convert_distance_to_meters($distance, $distance_unit))) {
     return array();
@@ -635,46 +635,46 @@ function location_nearby_postalcodes_byl
 
   //DEBUG: commented code is for testing/debugging
   //$format_start_time = microtime();
-  
+
   _location_format_search_result_distances($search_results, $distance_unit);
-  
+
   //$format_end_time = microtime();
   //print 'Time for FORMATTING to complete: '. _location_time_difference($format_end_time, $format_start_time) ."<br/>\n";
-  
+
   // DEBUG: commented code is for testing/debugging purposes
   //$end_time = microtime();
   //print 'Time for this search to complete: '. _location_time_difference($end_time, $start_time) ."<br/>\n";
-  
+
   return $search_results;
 }
 
 /**
- * Takes a latitude, longitude, and a distance, and returns all postal_codes within 
+ * Takes a latitude, longitude, and a distance, and returns all postal_codes within
  *
  * @param $lon
  *   A floating point of the longitude coordinate of the search point
- * 
+ *
  * @param $lat
  *   A floating point of the latitude coordinate of the search point
  *
- * @param $distance 
- *   The number portion of the distance; it is forced to an integer ceiling 
+ * @param $distance
+ *   The number portion of the distance; it is forced to an integer ceiling
  *
  * @param $distance_unit
  *   The unit of distance being used for the distance being submitted.
  *   Valid arguments for $distance_unit are 'mile' and 'km'.  If something other than one of
  *   these unit types is submitted for this argument, it is forced to 'km'.
  *
- * @return 
- *   An array where 
- *     -> the keys are a contatenation of the country's ISO code and the postal code.  For example, if 
+ * @return
+ *   An array where
+ *     -> the keys are a contatenation of the country's ISO code and the postal code.  For example, if
  *        one of the search results is for postal code "94803" in the United States, the key is then "us94803"
- *     -> the values are an associative array where 
+ *     -> the values are an associative array where
  *          'postal_code'   => A postal code that fell within the search-radius given by $distance and $distance_unit.
  *          'country'       => The two-letter ISO code for the home-country of this particular postal_code search result.
  *          'lon'           => The longitude coordinate of the approximate center of the area covered by 'postal_code'
  *          'lat'           => The latitude coordinate of the approximate center of the area covered by 'postal_code'
- *          'distance'      => The number of 'km's or 'mile's that are between the approximate center of the area of the 
+ *          'distance'      => The number of 'km's or 'mile's that are between the approximate center of the area of the
  *                             $postal_code parameter and that of the 'postal_code' in this array
  *          'distance_unit' => The unit of distance specified by 'distance'
  */
@@ -686,16 +686,16 @@ function location_nearby_postalcodes_byl
   if (!is_numeric($lon) || !is_numeric($lat)) {
     return array();
   }
-  
+
   // If the distance parameters did not make sense, return an empty search result set.
   $distance_float = _location_convert_distance_to_meters($distance, $distance_unit);
   if (is_null($distance_float)) {
     return array();
   }
-  
+
   $search_results = _location_nearby_postalcodes($lon, $lat, $distance_float);
   _location_format_search_result_distances($search_results, $distance_unit);
-  
+
   // DEBUG: commented code is for testing/debugging purposes
   //$end_time = microtime();
   //print 'Time for this search to complete: '. _location_time_difference($end_time, $start_time)."<br/>\n";
@@ -714,12 +714,12 @@ function _location_time_difference($end_
 
 /**
  * @param $distance
- *   A number in either miles or km. 
+ *   A number in either miles or km.
  *
- * @param $distance_unit 
+ * @param $distance_unit
  *   Either 'km' or 'mile'
  *
- * @return 
+ * @return
  *   A floating point number where the number in meters after the initially passed scalar has been ceil()'d
  *   This is done after the $distance_unit parmeter is forced to be 'km' or 'mile'
  */
@@ -727,22 +727,22 @@ function _location_convert_distance_to_m
   if (!is_numeric($distance)) {
     return NULL;
   }
-  
+
   // Force an integer version of distance, just in case anyone wants to add a caching mechanism
   // for postal code proximity searches.
-  
+
   if (is_float($distance)) {
     $distance = intval(ceil($distance));
   }
-  
+
   if ($distance < 1) {
     return NULL;
   }
-  
+
   if ($distance_unit != 'km' && $distance_unit != 'mile') {
     $distance_unit = 'km';
   }
-  
+
   // Convert distance to meters
   //$distance_float = floatval($distance) * (($distance_unit == 'km') ? 1000.0 : 1609.347);
   //return round($distance_float, 2);
@@ -773,7 +773,7 @@ function location_latlon_rough($location
   if (!isset($location['country']) || !isset($location['postal_code'])) {
     return NULL;
   }
-  
+
   $latlon_function = 'location_latlon_rough_'. $location['country'];
   if (function_exists($latlon_function)) {
     return $latlon_function($location);
@@ -782,9 +782,9 @@ function location_latlon_rough($location
     return NULL;
   }
 }
- 
 
- 
+
+
 /**
  * This is the main logic-level function for performing proximity postal-code searches.
  * It calls a number of helper functions for finding postal_code results in each country,
@@ -793,20 +793,20 @@ function location_latlon_rough($location
  * of a previous search's results on the same search-point.
  *
  * @param $lon
- *   A floating point of the longitude coordinate about which the search is being executed 
+ *   A floating point of the longitude coordinate about which the search is being executed
  *
  * @param $lat
  *   A floating point of the latitude coordinate about which the search is being executed
  *
- * @param $distance 
+ * @param $distance
  *   A floating point of the distance in meters; it is forced to an integer ceiling, but
  *   kept as a float
  *
  * @return
- *   An array where 
+ *   An array where
  *     -> the keys are a concatenation of the lower-case two-letter ISO country code and the postal code
  *        For example, 94063 in the United States would be 'us94063'
- *     -> the values are an associative array where 
+ *     -> the values are an associative array where
  *          'postal_code' => A postal code that fell within the search-radius given by $distance and $distance_unit.
  *          'country'     => The two-letter ISO code for the home-country of this particular postal_code search result.
  *          'lon'         => The longitude coordinate of the approximate center of the area covered by 'postal_code'
@@ -817,7 +817,7 @@ function location_latlon_rough($location
  */
 function _location_nearby_postalcodes($lon, $lat, $distance) {
   $search_results = _location_search_results_from_cache($lon, $lat, $distance);
-  
+
   // If there were usable cached search_results then return those and go no further... awwwww yeah.
   if (count($search_results)) {
     return $search_results;
@@ -832,31 +832,31 @@ function _location_nearby_postalcodes($l
   // The value of the cached item will be a serialize($result_array)
   //
   // The cache will be cleared of proximity searches when there is a change in countries that have
-  // been configured into the system.  
+  // been configured into the system.
   //------------------------------------------------------------------------------------------
-  
+
   $search_results = array();
-    
+
   $latrange = earth_latitude_range($lon, $lat, $distance);
-  $lonrange = earth_longitude_range($lon, $lat, $distance);  
+  $lonrange = earth_longitude_range($lon, $lat, $distance);
 
   //$query_start_time = microtime();
-  
+
   $result = db_query('SELECT zip, city, state, country, '. earth_distance_sql($lon, $lat) .' as distance  FROM {zipcodes} WHERE latitude > %f AND latitude < %f AND longitude > %f AND longitude < %f AND '. earth_distance_sql($lon, $lat) .' < %f ORDER by distance', $latrange[0], $latrange[1], $lonrange[0], $lonrange[1], $distance);
-  
+
   while ($result_row = db_fetch_object($result)) {
     $search_results[$result_row->country . $result_row->zip] = array('city' => $result_row->city, 'province' => $result_row->state, 'distance' => $result_row->distance);
   }
-  
+
   //DEBUG: commented code for testing/debugging purposes
   //$query_end_time = microtime();
-  
+
   //print 'TOTAL TIME FOR _location_nearby_postalcodes() '. _location_time_difference($query_end_time, $query_start_time) ."<br/>\n";
   //--------------------------------------------------------------------------------------------
   // This is the spot where search results are cached
-  
+
   cache_set('location_prox_search:'. round($lon, 3) .':'. round($lat, 3) .':'. $distance, 'cache', serialize($search_results));
-  
+
   // DEBUG: commented code is for testing/debugging purposes
   //print 'POSTAL CODE SEARCH CACHING: Wrote new search results to cache'."<br/>\n";
   //--------------------------------------------------------------------------------------------
@@ -867,11 +867,11 @@ function _location_nearby_postalcodes($l
  * Helper function: this function is intended ONLY for use by _location_nearby_postalcodes().
  * It checks the cache for search-results on a given point and returns the appropriate subset
  * if one exists.
- * 
+ *
  * @param $lon
  *   A floating point of the longitude coordinate of the search point
  *
- * @param $lat 
+ * @param $lat
  *   A floating point of the latitude coordinate of the search point
  *
  * @param $distance
@@ -887,26 +887,26 @@ function _location_nearby_postalcodes($l
  */
 function _location_search_results_from_cache($lon, $lat, $distance) {
   $cache_id_prefix = 'location_prox_search:'. round($lon, 3) .':'. round($lat, 3) .':';
-  
+
   $result = db_query("SELECT cid FROM {cache} WHERE cid LIKE '%s%%'", $cache_id_prefix);
-  
+
   if ($result_row = db_fetch_object($result)) {
     // A previous search has been done on the same search point, possibily with the an equal or different
     // search radius.
     $cached_key_fields = explode(':', $result_row->cid);
     $previous_search_radius = $cached_key_fields[3];
-    
+
     // If the search-radius is less than or equal to the previous search-radius, then just use
     // the appropriate subset of the previous search result.
     // This is very convenient since previous search results are sorted in ascending order
-    // by their distance from the search point.    
+    // by their distance from the search point.
     if ($distance <= $previous_search_radius) {
 
       $cached_search_results = cache_get($result_row->cid);
       $cached_search_results = unserialize($cached_search_results->data);
       // If the cached-search had the exact same search-radius, just return the entire search result's
       // array from before,
-      // otherwise, go through the distance-sorted search results and pick them out until the distances 
+      // otherwise, go through the distance-sorted search results and pick them out until the distances
       // of each search result start being something greater than the current search-radius
       if ($distance == $previous_search_radius) {
         // DEBUG: commented code is for testing/debugging purposes
@@ -933,13 +933,13 @@ function _location_search_results_from_c
       // then delete the previous search from the cache to make way in the cache for the results of
       // the current, more comprehensive search being done on the same point, but on a larger radius.
       // Return an empty array to let the calling function know that it will have to do a new search.
-      
+
       // DEBUG: commented code is for testing/debugging purposes
       //print 'POSTAL CODE SEARCH CACHING: Throwing out old search on a point because new search uses larger search-radius'."<br/>\n";
       cache_clear_all($result_row->cid, 'cache');
       return array();
     }
-    
+
   }
   else {
     // This else-clause ties back to the first if-clause in this function.
@@ -955,7 +955,7 @@ function _location_search_results_from_c
  *                  _location_sort_proximity_search_results()
  *
  * @param $results_array
- *   An array of proximity search results where 
+ *   An array of proximity search results where
  *      -> the keys are integer rankings starting from 1 for the closest postal_code search result
  *      -> the values are associative arrays where
  *           'postal_code' => is the postal code of the search result
@@ -972,36 +972,36 @@ function _location_search_results_from_c
  *
  * @return
  *   Returns nothing.
- *   Modifies parameter $results_array so that 'distance' (mentioned above) now points to a string representation 
+ *   Modifies parameter $results_array so that 'distance' (mentioned above) now points to a string representation
  *   of distance that goes to 1 decimal place, AFTER it has been converted
  *   from the original meters to the distance unit specified by $distance_unit.
  *   Also adds a key 'distance_unit' => 'mile' or 'km' which reflects the $distance_unit parameter.
- *    
+ *
  */
 function _location_format_search_result_distances(&$results_array, $distance_unit = 'km') {
   if ($distance_unit != 'km' && $distance_unit != 'mile') {
     $distance_unit = 'km';
   }
-  
+
   // $conversion_factor = number to divide by to convert meters to $distance_unit
   // At this point, $distance_unit == 'km' or 'mile' and nothing else
   $conversion_factor = ($distance_unit == 'km') ? 1000.0 : 1609.347;
-  
+
   foreach ($results_array as $index => $single_result) {
     $results_array[$index]['distance'] = round($single_result['distance']/$conversion_factor, 1);
   }
 }
 
 /**
- * Currently, this is not a priority until there is an implementable use for exact longitude, 
+ * Currently, this is not a priority until there is an implementable use for exact longitude,
  * latitude coordinates for an location.  The idea is that this call will eventually retrieve
  * information through a web-service.  Whereas location_latlon_rough() returns an approximate
  * lat/lon pair based strictly on the postal code where this lat/lon pair is pulled from a
- * database table, this function is intended to send the entire location to a web-service and 
+ * database table, this function is intended to send the entire location to a web-service and
  * to retrieve exact lat/lon coordinates.
  *
  * @param $location
- *   An array where  
+ *   An array where
  *     -> the key values are 'street', 'additional', 'province', 'country', 'postal_code'
  *     -> the values are:
  *         'street'         => the string representing the street location (REQUIRED)
@@ -1040,7 +1040,7 @@ function location_latlon_exact($location
 
 /**
  * @param $location
- *   An array where  
+ *   An array where
  *     -> the key values are 'street', 'additional', 'province', 'country', 'postal_code'
  *     -> the values are:
  *         'street'         => the string representing the street location
@@ -1085,25 +1085,25 @@ function location_geocode_meta_tags($loc
  * The array is sorted by the values.
  *
  * Please note the difference between "supported" countries and "configured"
- * countries: A country being "supported" means that there is an include file 
- * to support the country while "configured" implies that the site admin has 
- * configured the site to actually use that country's include file. 
+ * countries: A country being "supported" means that there is an include file
+ * to support the country while "configured" implies that the site admin has
+ * configured the site to actually use that country's include file.
  */
 function location_configured_countries() {
   static $configured_countries_associative;
   if (!count($configured_countries)) {
       $configured_countries = variable_get('location_configured_countries', array('us' => 'us')); // <integer index> => <ISO code>
-    
-    $configured_countries = is_array($configured_countries) ? $configured_countries : array(); 
+
+    $configured_countries = is_array($configured_countries) ? $configured_countries : array();
     $supported_countries = _location_supported_countries(); // <ISO code> => <English name>
-    
+
     $configured_countries_associative = array();
     foreach ($configured_countries as $country_code) {
       if (array_key_exists($country_code, $supported_countries)) {
         $configured_countries_associative[$country_code] = $supported_countries[$country_code];
       }
     }
-    
+
     asort($configured_countries_associative);
   }
   return $configured_countries_associative;
@@ -1118,9 +1118,9 @@ function location_configured_countries()
  * The array is sorted the index (i.e., by the short English name of the country).
  *
  * Please note the different between "supported" countries and "configured"
- * countries: A country being "supported" means that there is an include file 
- * to support the country while "configure" implies that the site admin has 
- * configured the site to actually use that country. 
+ * countries: A country being "supported" means that there is an include file
+ * to support the country while "configure" implies that the site admin has
+ * configured the site to actually use that country.
  */
 function _location_supported_countries() {
   static $supported_countries = array();
@@ -1150,7 +1150,7 @@ function _location_supported_countries()
       }
     }
     $supported_countries = array_flip($supported_countries);
-    // In the foreach, here, $index is just an integer that we want to 
+    // In the foreach, here, $index is just an integer that we want to
     // replace with the name of the country, where the key pointing to it
     // is the two-letter ISO code for the country
     foreach ($supported_countries as $code => $index) {
@@ -1179,7 +1179,7 @@ function _location_supported_countries()
  *   The HTML "name" attribute assigned to the generated form element.  Defaults to 'location' if none is specified
  *
  * @return
- *   A form_select where the labels are the English names of the countries and the corresponding value 
+ *   A form_select where the labels are the English names of the countries and the corresponding value
  *   attributes for the options are the two-letter ISO code for the countries.
  *   If 'location' is passed as the $form_name, then the HTML "name" attribute for the generated form element
  *   will be "edit[location][country]".
@@ -1214,7 +1214,7 @@ function _location_country_select_option
  * The array that is returned is a complete list of state/provinces
  * that belong to the countries enabled by the site's location system.
  *
- * @param $value 
+ * @param $value
  *   A preselected value for the HTML select form item that is returned.
  *
  * @param $required
@@ -1232,8 +1232,8 @@ function _location_country_select_option
  *
  * @return
  *   An associative array where
- *     -> the keys are a contatenation of the countrycode and a three 
- *        digit positive integer unique to each province within a 
+ *     -> the keys are a contatenation of the countrycode and a three
+ *        digit positive integer unique to each province within a
  *        country's provinces
  *     -> the values are the full name of the province
  *
@@ -1317,47 +1317,47 @@ function location_address2singleline($lo
   if (!empty($location['street'])) {
     $address .= $location['street'];
   }
-  
+
   if (!empty($location['city'])) {
     if (!empty($location['street'])) {
       $address .= ', ';
     }
-    
+
     $address .= $location['city'];
   }
-  
+
   if (!empty($location['province'])) {
     if (!empty($location['street']) || !empty($location['city'])) {
       $address .= ', ';
     }
-    
+
     $address .= $location['province'];
   }
-  
+
   if (!empty($location['postal_code'])) {
     if (!empty($address)) {
       $address .= ' ';
     }
       $address .= $location['postal_code'];
   }
-  
+
   if (!empty($location['country'])) {
     $address .= ', '. $location['country'];
   }
-  
+
   return $address;
 }
 
 function location_get_general_geocoder_list() {
   static $list;
-  
+
   if (!count($list)) {
     $files = file_scan_directory(LOCATION_PATH .'/geocoding', '\.inc$', array('.', '..', 'CVS', '.svn'));
     foreach ($files as $full_path_name => $fileinfo) {
       $list[] = $fileinfo->name;
     }
   }
-  
+
   return $list;
 }
 
@@ -1368,248 +1368,250 @@ function location_get_iso3166_list() {
 // The following is an array of all countrycode => country-name pairs as layed out in
 // ISO 3166-1 alpha-2
 function _location_get_iso3166_list() {
-  return array('ad' => 'Andorra',
-               'ac' => 'Ascension Island',
-               'ae' => 'United Arab Emirates',
-               'af' => 'Afghanistan',
-               'ag' => 'Antigua and Barbuda',
-               'ai' => 'Anguilla',
-               'al' => 'Albania',
-               'am' => 'Armenia',
-               'an' => 'Netherlands Antilles',
-               'ao' => 'Angola',
-               'aq' => 'Antarctica',
-               'ar' => 'Argentina',
-               'as' => 'American Samoa',
-               'at' => 'Austria',
-               'au' => 'Australia',
-               'aw' => 'Aruba',
-               'ax' => 'Aland Islands',
-               'az' => 'Azerbaijan',
-               'ba' => 'Bosnia and Herzegovina',
-               'bb' => 'Barbados',
-               'bd' => 'Bangladesh',
-               'be' => 'Belgium',
-               'bf' => 'Burkina Faso',
-               'bg' => 'Bulgaria',
-               'bh' => 'Bahrain',
-               'bi' => 'Burundi',
-               'bj' => 'Benin',
-               'bm' => 'Bermuda',
-               'bn' => 'Brunei Darussalam',
-               'bo' => 'Bolivia',
-               'br' => 'Brazil',
-               'bs' => 'Bahamas',
-               'bt' => 'Bhutan',
-               'bv' => 'Bouvet Island',
-               'bw' => 'Botswana',
-               'by' => 'Belarus',
-               'bz' => 'Belize',
-               'ca' => 'Canada',
-               'cc' => 'Cocos (Keeling) Islands',
-               'cd' => 'Democratic Republic of the Congo (formerly Zaire)',
-               'cf' => 'Central African Republic',
-               'cg' => 'Congo (Republic of the Congo)',
-               'ch' => 'Switzerland (Confoederatio Helvetica)',
-               'ci' => 'Cote d\'Ivoire (Ivory Coast)',
-               'ck' => 'Cook Islands',
-               'cl' => 'Chile',
-               'cm' => 'Cameroon',
-               'cn' => 'China',
-               'co' => 'Colombia',
-               'cr' => 'Costa Rica',
-               'cs' => 'Serbia and Montenegro',
-               'cu' => 'Cuba',
-               'cv' => 'Cape Verde',
-               'cx' => 'Christmas Island',
-               'cy' => 'Cyprus',
-               'cz' => 'Czech Republic',
-               'de' => 'Germany (Deutschland)',
-               'dj' => 'Djibouti',
-               'dk' => 'Denmark',
-               'dm' => 'Dominica',
-               'do' => 'Dominican Republic',
-               'dz' => 'Algeria',
-               'ec' => 'Ecuador',
-               'ee' => 'Estonia',
-               'eg' => 'Egypt',
-               'eh' => 'Western Sahara (formerly Spanish Sahara)',
-               'er' => 'Eritrea',
-               'es' => 'Spain (Espana)',
-               'et' => 'Ethiopia',
-               'fi' => 'Finland',
-               'fj' => 'Fiji',
-               'fk' => 'Falkland Islands',
-               'fm' => 'Federated States of Micronesia',
-               'fo' => 'Faroe Islands',
-               'fr' => 'France',
-               'ga' => 'Gabon',
-               //'gb' => 'United Kingdom',
-               'gd' => 'Grenada',
-               'ge' => 'Georgia',
-               'gf' => 'French Guiana',
-               'gh' => 'Ghana',
-               'gi' => 'Gibraltar',
-               'gl' => 'Greenland',
-               'gm' => 'Gambia',
-               'gn' => 'Guinea',
-               'gp' => 'Guadeloupe',
-               'gq' => 'Equatorial Guinea',
-               'gr' => 'Greece',
-               'gs' => 'South Georgia and the South Sandwich Islands',
-               'gt' => 'Guatemala',
-               'gu' => 'Guam',
-               'gw' => 'Guinea-Bissau',
-               'gy' => 'Guyana',
-               'hk' => 'Hong Kong',
-               'hm' => 'Heard Island and McDonald Islands',
-               'hn' => 'Honduras',
-               'hr' => 'Croatia (Hrvatska)',
-               'ht' => 'Haiti',
-               'hu' => 'Hungary',
-               'id' => 'Indonesia',
-               'ie' => 'Ireland',
-               'il' => 'Israel',
-               'in' => 'India',
-               'io' => 'British Indian Ocean Territory (including Diego Garcia)',
-               'iq' => 'Iraq',
-               'ir' => 'Iran',
-               'is' => 'Iceland',
-               'it' => 'Italy',
-               'jm' => 'Jamaica',
-               'jo' => 'Jordan',
-               'jp' => 'Japan',
-               'ke' => 'Kenya',
-               'kg' => 'Kyrgyzstan',
-               'kh' => 'Cambodia',
-               'ki' => 'Kiribati',
-               'km' => 'Comoros',
-               'kn' => 'Saint Kitts and Nevis',
-               'kp' => 'North Korea',
-               'kr' => 'South Korea',
-               'kw' => 'Kuwait',
-               'ky' => 'Cayman Islands',
-               'kz' => 'Kazakhstan',
-               'la' => 'Laos',
-               'lb' => 'Lebanon',
-               'lc' => 'Saint Lucia',
-               'li' => 'Liechtenstein',
-               'lk' => 'Sri Lanka',
-               'lr' => 'Liberia',
-               'ls' => 'Lesotho',
-               'lt' => 'Lithuania',
-               'lu' => 'Luxembourg',
-               'lv' => 'Latvia',
-               'ly' => 'Libya',
-               'ma' => 'Morocco',
-               'mc' => 'Monaco',
-               'md' => 'Moldova',
-               'mg' => 'Madagascar',
-               'mh' => 'Marshall Islands',
-               'mk' => 'Former Yugoslav Republic of Macedonia',
-               'ml' => 'Mali',
-               'mm' => 'Myanmar (Burma)',
-               'mn' => 'Mongolia',
-               'mo' => 'Macao (Macau)',
-               'mp' => 'Northern Mariana Islands',
-               'mq' => 'Martinique',
-               'mr' => 'Mauritania',
-               'ms' => 'Montserrat',
-               'mt' => 'Malta',
-               'mu' => 'Mauritius',
-               'mv' => 'Maldives',
-               'mw' => 'Malawi',
-               'mx' => 'Mexico',
-               'my' => 'Malaysia',
-               'mz' => 'Mozambique',
-               'na' => 'Namibia',
-               'nc' => 'New Caledonia',
-               'ne' => 'Niger',
-               'nf' => 'Norfolk Island',
-               'ng' => 'Nigeria',
-               'ni' => 'Nicaragua',
-               'nl' => 'Netherlands',
-               'no' => 'Norway',
-               'np' => 'Nepal',
-               'nr' => 'Nauru',
-               'nu' => 'Niue',
-               'nz' => 'New Zealand',
-               'om' => 'Oman',
-               'pa' => 'Panama',
-               'pe' => 'Peru',
-               'pf' => 'French Polynesia',
-               'pg' => 'Papua New Guinea',
-               'ph' => 'Philippines',
-               'pk' => 'Pakistan',
-               'pl' => 'Poland',
-               'pm' => 'Saint-Pierre and Miquelon',
-               'pn' => 'Pitcairn Islands',
-               'pr' => 'Puerto Rico',
-               'ps' => 'Palestinian Territories (West Bank and Gaza Strip)',
-               'pt' => 'Portugal',
-               'pw' => 'Palau',
-               'py' => 'Paraguay',
-               'qa' => 'Qatar',
-               're' => 'Reunion',
-               'ro' => 'Romania',
-               'ru' => 'Russia',
-               'rw' => 'Rwanda',
-               'sa' => 'Saudi Arabia',
-               'sb' => 'Solomon Islands',
-               'sc' => 'Seychelles',
-               'sd' => 'Sudan',
-               'se' => 'Sweden',
-               'sg' => 'Singapore',
-               'sh' => 'Saint Helena',
-               'si' => 'Slovenia',
-               'sj' => 'Svalbard and Jan Mayen Islands',
-               'sk' => 'Slovakia',
-               'sl' => 'Sierra Leone',
-               'sm' => 'San Marino',
-               'sn' => 'Senegal',
-               'so' => 'Somalia',
-               'sr' => 'Suriname',
-               'st' => 'Sao Tome and Principe',
-               'sv' => 'El Salvador',
-               'sw' => 'Sweden',
-               'sy' => 'Syria',
-               'sz' => 'Swaziland',
-               'tc' => 'Turks and Caicos Islands',
-               'td' => 'Chad (Tchad)',
-               'tf' => 'French Southern Territories',
-               'tg' => 'Togo',
-               'th' => 'Thailand',
-               'tj' => 'Tajikistan',
-               'tk' => 'Tokelau',
-               'tl' => 'Timor-Leste (East Timor)',
-               'tm' => 'Turkmenistan',
-               'tn' => 'Tunisia',
-               'to' => 'Tonga',
-               'tr' => 'Turkey',
-               'tt' => 'Trinidad and Tobago',
-               'tv' => 'Tuvalu',
-               'tw' => 'Taiwan',
-               'tz' => 'Tanzania',
-               'ua' => 'Ukraine',
-               'ug' => 'Uganda',
-               'uk' => 'United Kingdom',
-               'um' => 'United States Minor Outlying Islands',
-               'us' => 'United States',
-               'uy' => 'Uruguay',
-               'uz' => 'Uzbekistan',
-               'va' => 'Vatican City',
-               'vc' => 'Saint Vincent and the Grenadines',
-               've' => 'Venezuela',
-               'vg' => 'British Virgin Islands',
-               'vi' => 'U.S. Virgin Islands',
-               'vn' => 'Vietnam',
-               'vu' => 'Vanuatu',
-               'wf' => 'Wallis and Futuna',
-               'ws' => 'Samoa',
-               'ye' => 'Yemen',
-               'yt' => 'Mayotte',
-               'za' => 'South Africa',
-               'zm' => 'Zambia',
-               'zw' => 'Zimbabwe'
+  $list = array('ad' => t('Andorra'),
+               'ac' => t('Ascension Island'),
+               'ae' => t('United Arab Emirates'),
+               'af' => t('Afghanistan'),
+               'ag' => t('Antigua and Barbuda'),
+               'ai' => t('Anguilla'),
+               'al' => t('Albania'),
+               'am' => t('Armenia'),
+               'an' => t('Netherlands Antilles'),
+               'ao' => t('Angola'),
+               'aq' => t('Antarctica'),
+               'ar' => t('Argentina'),
+               'as' => t('American Samoa'),
+               'at' => t('Austria'),
+               'au' => t('Australia'),
+               'aw' => t('Aruba'),
+               'ax' => t('Aland Islands'),
+               'az' => t('Azerbaijan'),
+               'ba' => t('Bosnia and Herzegovina'),
+               'bb' => t('Barbados'),
+               'bd' => t('Bangladesh'),
+               'be' => t('Belgium'),
+               'bf' => t('Burkina Faso'),
+               'bg' => t('Bulgaria'),
+               'bh' => t('Bahrain'),
+               'bi' => t('Burundi'),
+               'bj' => t('Benin'),
+               'bm' => t('Bermuda'),
+               'bn' => t('Brunei Darussalam'),
+               'bo' => t('Bolivia'),
+               'br' => t('Brazil'),
+               'bs' => t('Bahamas'),
+               'bt' => t('Bhutan'),
+               'bv' => t('Bouvet Island'),
+               'bw' => t('Botswana'),
+               'by' => t('Belarus'),
+               'bz' => t('Belize'),
+               'ca' => t('Canada'),
+               'cc' => t('Cocos (Keeling) Islands'),
+               'cd' => t('Democratic Republic of the Congo (formerly Zaire)'),
+               'cf' => t('Central African Republic'),
+               'cg' => t('Congo (Republic of the Congo)'),
+               'ch' => t('Switzerland (Confoederatio Helvetica)'),
+               'ci' => t('Cote d\'Ivoire (Ivory Coast)'),
+               'ck' => t('Cook Islands'),
+               'cl' => t('Chile'),
+               'cm' => t('Cameroon'),
+               'cn' => t('China'),
+               'co' => t('Colombia'),
+               'cr' => t('Costa Rica'),
+               'cs' => t('Serbia and Montenegro'),
+               'cu' => t('Cuba'),
+               'cv' => t('Cape Verde'),
+               'cx' => t('Christmas Island'),
+               'cy' => t('Cyprus'),
+               'cz' => t('Czech Republic'),
+               'de' => t('Germany'),
+               'dj' => t('Djibouti'),
+               'dk' => t('Denmark'),
+               'dm' => t('Dominica'),
+               'do' => t('Dominican Republic'),
+               'dz' => t('Algeria'),
+               'ec' => t('Ecuador'),
+               'ee' => t('Estonia'),
+               'eg' => t('Egypt'),
+               'eh' => t('Western Sahara (formerly Spanish Sahara)'),
+               'er' => t('Eritrea'),
+               'es' => t('Spain (Espana)'),
+               'et' => t('Ethiopia'),
+               'fi' => t('Finland'),
+               'fj' => t('Fiji'),
+               'fk' => t('Falkland Islands'),
+               'fm' => t('Federated States of Micronesia'),
+               'fo' => t('Faroe Islands'),
+               'fr' => t('France'),
+               'ga' => t('Gabon'),
+               //'gb' => t('United Kingdom'),
+               'gd' => t('Grenada'),
+               'ge' => t('Georgia'),
+               'gf' => t('French Guiana'),
+               'gh' => t('Ghana'),
+               'gi' => t('Gibraltar'),
+               'gl' => t('Greenland'),
+               'gm' => t('Gambia'),
+               'gn' => t('Guinea'),
+               'gp' => t('Guadeloupe'),
+               'gq' => t('Equatorial Guinea'),
+               'gr' => t('Greece'),
+               'gs' => t('South Georgia and the South Sandwich Islands'),
+               'gt' => t('Guatemala'),
+               'gu' => t('Guam'),
+               'gw' => t('Guinea-Bissau'),
+               'gy' => t('Guyana'),
+               'hk' => t('Hong Kong'),
+               'hm' => t('Heard Island and McDonald Islands'),
+               'hn' => t('Honduras'),
+               'hr' => t('Croatia (Hrvatska)'),
+               'ht' => t('Haiti'),
+               'hu' => t('Hungary'),
+               'id' => t('Indonesia'),
+               'ie' => t('Ireland'),
+               'il' => t('Israel'),
+               'in' => t('India'),
+               'io' => t('British Indian Ocean Territory (including Diego Garcia)'),
+               'iq' => t('Iraq'),
+               'ir' => t('Iran'),
+               'is' => t('Iceland'),
+               'it' => t('Italy'),
+               'jm' => t('Jamaica'),
+               'jo' => t('Jordan'),
+               'jp' => t('Japan'),
+               'ke' => t('Kenya'),
+               'kg' => t('Kyrgyzstan'),
+               'kh' => t('Cambodia'),
+               'ki' => t('Kiribati'),
+               'km' => t('Comoros'),
+               'kn' => t('Saint Kitts and Nevis'),
+               'kp' => t('North Korea'),
+               'kr' => t('South Korea'),
+               'kw' => t('Kuwait'),
+               'ky' => t('Cayman Islands'),
+               'kz' => t('Kazakhstan'),
+               'la' => t('Laos'),
+               'lb' => t('Lebanon'),
+               'lc' => t('Saint Lucia'),
+               'li' => t('Liechtenstein'),
+               'lk' => t('Sri Lanka'),
+               'lr' => t('Liberia'),
+               'ls' => t('Lesotho'),
+               'lt' => t('Lithuania'),
+               'lu' => t('Luxembourg'),
+               'lv' => t('Latvia'),
+               'ly' => t('Libya'),
+               'ma' => t('Morocco'),
+               'mc' => t('Monaco'),
+               'md' => t('Moldova'),
+               'mg' => t('Madagascar'),
+               'mh' => t('Marshall Islands'),
+               'mk' => t('Former Yugoslav Republic of Macedonia'),
+               'ml' => t('Mali'),
+               'mm' => t('Myanmar (Burma)'),
+               'mn' => t('Mongolia'),
+               'mo' => t('Macao (Macau)'),
+               'mp' => t('Northern Mariana Islands'),
+               'mq' => t('Martinique'),
+               'mr' => t('Mauritania'),
+               'ms' => t('Montserrat'),
+               'mt' => t('Malta'),
+               'mu' => t('Mauritius'),
+               'mv' => t('Maldives'),
+               'mw' => t('Malawi'),
+               'mx' => t('Mexico'),
+               'my' => t('Malaysia'),
+               'mz' => t('Mozambique'),
+               'na' => t('Namibia'),
+               'nc' => t('New Caledonia'),
+               'ne' => t('Niger'),
+               'nf' => t('Norfolk Island'),
+               'ng' => t('Nigeria'),
+               'ni' => t('Nicaragua'),
+               'nl' => t('Netherlands'),
+               'no' => t('Norway'),
+               'np' => t('Nepal'),
+               'nr' => t('Nauru'),
+               'nu' => t('Niue'),
+               'nz' => t('New Zealand'),
+               'om' => t('Oman'),
+               'pa' => t('Panama'),
+               'pe' => t('Peru'),
+               'pf' => t('French Polynesia'),
+               'pg' => t('Papua New Guinea'),
+               'ph' => t('Philippines'),
+               'pk' => t('Pakistan'),
+               'pl' => t('Poland'),
+               'pm' => t('Saint-Pierre and Miquelon'),
+               'pn' => t('Pitcairn Islands'),
+               'pr' => t('Puerto Rico'),
+               'ps' => t('Palestinian Territories (West Bank and Gaza Strip)'),
+               'pt' => t('Portugal'),
+               'pw' => t('Palau'),
+               'py' => t('Paraguay'),
+               'qa' => t('Qatar'),
+               're' => t('Reunion'),
+               'ro' => t('Romania'),
+               'ru' => t('Russia'),
+               'rw' => t('Rwanda'),
+               'sa' => t('Saudi Arabia'),
+               'sb' => t('Solomon Islands'),
+               'sc' => t('Seychelles'),
+               'sd' => t('Sudan'),
+               'se' => t('Sweden'),
+               'sg' => t('Singapore'),
+               'sh' => t('Saint Helena'),
+               'si' => t('Slovenia'),
+               'sj' => t('Svalbard and Jan Mayen Islands'),
+               'sk' => t('Slovakia'),
+               'sl' => t('Sierra Leone'),
+               'sm' => t('San Marino'),
+               'sn' => t('Senegal'),
+               'so' => t('Somalia'),
+               'sr' => t('Suriname'),
+               'st' => t('Sao Tome and Principe'),
+               'sv' => t('El Salvador'),
+               'sw' => t('Sweden'),
+               'sy' => t('Syria'),
+               'sz' => t('Swaziland'),
+               'tc' => t('Turks and Caicos Islands'),
+               'td' => t('Chad (Tchad)'),
+               'tf' => t('French Southern Territories'),
+               'tg' => t('Togo'),
+               'th' => t('Thailand'),
+               'tj' => t('Tajikistan'),
+               'tk' => t('Tokelau'),
+               'tl' => t('Timor-Leste (East Timor)'),
+               'tm' => t('Turkmenistan'),
+               'tn' => t('Tunisia'),
+               'to' => t('Tonga'),
+               'tr' => t('Turkey'),
+               'tt' => t('Trinidad and Tobago'),
+               'tv' => t('Tuvalu'),
+               'tw' => t('Taiwan'),
+               'tz' => t('Tanzania'),
+               'ua' => t('Ukraine'),
+               'ug' => t('Uganda'),
+               'uk' => t('United Kingdom'),
+               'um' => t('United States Minor Outlying Islands'),
+               'us' => t('United States'),
+               'uy' => t('Uruguay'),
+               'uz' => t('Uzbekistan'),
+               'va' => t('Vatican City'),
+               'vc' => t('Saint Vincent and the Grenadines'),
+               've' => t('Venezuela'),
+               'vg' => t('British Virgin Islands'),
+               'vi' => t('U.S. Virgin Islands'),
+               'vn' => t('Vietnam'),
+               'vu' => t('Vanuatu'),
+               'wf' => t('Wallis and Futuna'),
+               'ws' => t('Samoa'),
+               'ye' => t('Yemen'),
+               'yt' => t('Mayotte'),
+               'za' => t('South Africa'),
+               'zm' => t('Zambia'),
+               'zw' => t('Zimbabwe')
               );
+  asort($list);
+  return $list;
 }
