diff -ruw uc_addresses/uc_addresses.info uc_addresses_fix/uc_addresses.info
--- uc_addresses/uc_addresses.info	2009-02-15 20:18:46.000000000 +0800
+++ uc_addresses_fix/uc_addresses.info	2009-02-07 20:18:34.000000000 +0800
@@ -6,9 +6,9 @@
 package = "Ubercart - extra"
 
 core = 6.x
-; Information added by drupal.org packaging script on 2009-02-15
+; Information added by drupal.org packaging script on 2009-02-07
 version = "6.x-1.x-dev"
 core = "6.x"
 project = "uc_addresses"
-datestamp = "1234700326"
+datestamp = "1234009114"
 
diff -ruw uc_addresses/uc_addresses.js uc_addresses_fix/uc_addresses.js
--- uc_addresses/uc_addresses.js	2008-11-04 12:08:18.000000000 +0800
+++ uc_addresses_fix/uc_addresses.js	2009-02-19 17:17:38.000000000 +0800
@@ -14,11 +14,11 @@
   var zone_select = country_select.substr(0, country_select.length - 10) + '-zone' +
       country_select.substr(country_select.length -2 );
 
-  var options = { 'country_id' : $('#' + country_select).val() };
+  var options = { 'country_id' : $('#' + country_select).val(), 'form_build_id' : $('input[@name=form_build_id]').val() };
 
   $('#' + zone_select).parent().siblings('.zone-throbber').attr('style', 'background-image: url(' + Drupal.settings.basePath + 'misc/throbber.gif); background-repeat: no-repeat; background-position: 100% -20px;').html('&nbsp;&nbsp;&nbsp;&nbsp;');
 
-  $.post(Drupal.settings.basePath + '?q=uc_js_util/zone_select', options,
+  $.post(Drupal.settings.basePath + '?q=addresses_js_util', options,
          function (contents) {
            if (contents.match('value="-1"') != null) {
              $('#' + zone_select).attr('disabled', 'disabled');
diff -ruw uc_addresses/uc_addresses.module uc_addresses_fix/uc_addresses.module
--- uc_addresses/uc_addresses.module	2009-02-15 12:44:53.000000000 +0800
+++ uc_addresses_fix/uc_addresses.module	2009-02-19 17:17:38.000000000 +0800
@@ -1,5 +1,5 @@
 <?php
-// $Id: uc_addresses.module,v 1.27 2009/02/15 04:44:53 freixas Exp $
+// $Id: uc_addresses.module,v 1.26 2009/02/07 03:47:52 freixas Exp $
 
 /**
  * @file
@@ -164,6 +164,12 @@
     'type' => MENU_CALLBACK,
     );
 
+  $items['addresses_js_util'] = array(
+    'page callback' => 'uc_addresses_js_util',
+    'access arguments' => array('access content'),
+    'type' => MENU_CALLBACK,
+  );
+
   return $items;
 }
 
@@ -331,9 +337,9 @@
     // Might not have any shippable products so make sure the
     // delivery address exists before mucking with it
 
-    if ($form['panes']['delivery'] &&
-	((uc_cart_is_shippable() || !variable_get('uc_cart_delivery_not_shippable', TRUE)))) {
+    if ($form['panes']['delivery']) {
       if (variable_get('uc_pane_delivery_enabled', TRUE)) {
+        drupal_add_js(drupal_get_path('module', 'uc_addresses') .'/uc_addresses.js');
 	$form['panes']['delivery']['#description'] =
 	  (variable_get('uc_addresses_default_delivery_address', TRUE) ?
 	   t('Edit the address below or select an address from the list. ') :
@@ -373,10 +379,8 @@
     // Copy the default address to the delivery address fields if
     // the option is enabled and if the fields are empty
 
-    if ($form['panes']['delivery'] &&
-	((uc_cart_is_shippable() || !variable_get('uc_cart_delivery_not_shippable', TRUE)))) {
-      if (variable_get('uc_addresses_default_delivery_address', TRUE) &&
-	  variable_get('uc_pane_delivery_enabled', TRUE) &&
+    if ($form['panes']['delivery']) {
+	if (variable_get('uc_addresses_default_delivery_address', TRUE) && variable_get('uc_pane_delivery_enabled', TRUE) &&
 	  _uc_addresses_address_fields_empty($form['panes']['delivery'], 'delivery')) {
 	foreach ($addresses as $address) {
 	  if ($address->is_default) {
@@ -418,9 +422,9 @@
     // Copy the default address to the billing address fields if the
     // option is enabled and if the fields are empty
 
-    if (variable_get('uc_addresses_default_billing_address', TRUE) &&
-	variable_get('uc_pane_billing_enabled', TRUE) &&
+    if (variable_get('uc_addresses_default_billing_address', TRUE) && variable_get('uc_pane_billing_enabled', TRUE) &&
 	_uc_addresses_address_fields_empty($form['panes']['billing'], 'billing')) {
+      drupal_add_js(drupal_get_path('module', 'uc_addresses') .'/uc_addresses.js');
       foreach ($addresses as $address) {
 	if ($address->is_default) {
 	  if (uc_address_field_enabled('first_name')) {
@@ -567,8 +571,7 @@
       _uc_addresses_db_add_address($address, TRUE);
     }
 
-    if (variable_get('uc_pane_delivery_enabled', TRUE) &&
-	(uc_cart_is_shippable() || !variable_get('uc_cart_delivery_not_shippable', TRUE))) {
+    if (variable_get('uc_pane_delivery_enabled', TRUE)) {
       $address->address_name = '';
       $address->uid = $order->uid;
       $address->first_name = $order->delivery_first_name;
@@ -949,6 +952,35 @@
 }
 
 /**
+ * A handler for Javascript helper functions...
+ *  Fork from uc_store.module (705)
+ */
+function uc_addresses_js_util() {
+
+  $country_id = intval($_POST['country_id']) > 0 ? intval($_POST['country_id']) : uc_store_default_country();
+  $title = isset($_POST['title']) ? check_plain($_POST['title']) : NULL;
+  $display = isset($_POST['display']) ? check_plain($_POST['display']) : 'name';
+  $select = uc_zone_select($title, NULL, NULL, $country_id, $display);
+  $select['#parents'] = array();
+  $match = array('`<[/]*div[^>]*>`', '`<[/]*select[^>]*>`', '`\n|\r`');
+  $replace = array('', '', '');
+  $output = preg_replace($match, $replace, theme('select', $select));
+
+  //start
+  $form_state = array('storage' => NULL, 'submitted' => FALSE);
+  $form_build_id = $_POST['form_build_id'];
+  $form = form_get_cache($form_build_id, $form_state);
+
+  $form['panes']['address']['zone'] = uc_zone_select(uc_get_field_name('zone'), NULL, NULL, $_POST['country_id'], 'name', uc_address_field_required('zone'));
+
+  form_set_cache($form_build_id, $form, $form_state);
+  //end
+
+  print $output;
+
+}
+
+/**
  * Theme the add or edit address form.
  *
  * @param $form The form array to theme.
