diff -up popups_reference/popups_reference.js workspace/driving-force/trunk/www/sites/all/modules/contrib/popups_reference/popups_reference.js
--- popups_reference/popups_reference.js	2009-03-06 02:54:08.000000000 +0100
+++ workspace/driving-force/trunk/www/sites/all/modules/contrib/popups_reference/popups_reference.js	2009-12-04 20:23:24.000000000 +0100
@@ -29,7 +29,11 @@ Drupal.behaviors.popups_reference = func
   $('.popups-reference', context).not('.popups-reference-processed').each(function() {
     $(this).addClass('popups-reference-processed'); // Don't re-add to processed links.
     $(this).click(function() {
-      var rel = $(this).attr('rel'); // Rel attribute of the clicked link is the wrapper id.
+			
+			// Save our taxonomy data from the parent.
+      popups_reference_store_parent_data();
+      
+			var rel = $(this).attr('rel'); // Rel attribute of the clicked link is the wrapper id.
       var $wrapper = $('#' + rel);
       // Unbind namespaced event, so bindings don't pile up every click.
       $(document).unbind('popups_form_success.popups_reference');
@@ -47,13 +51,37 @@ Drupal.behaviors.popups_reference = func
           return !$(this).val();
         });
         if ($emptyAutos.length) {
-          $emptyAutos.eq(0).val(title);
+          $emptyAutos.eq(0).val(title + ' [nid:' + nid + ']');
         }
         else { // There are no empty fields, use the first one.
-          $wrapper.find('input.form-autocomplete:first').val(title);
+          $wrapper.find('input.form-autocomplete:first').val(title + ' [nid:' + nid + ']');
         }
       });
     });
   });
 };
 
+/**
+ * Saves taxonomy data in cookie for popup to use.
+ * Requires Jookie jQuery plugin (see README).
+ */
+function popups_reference_store_parent_data() {
+	var taxonomy = new Array();
+	
+	// For each taxonomy vocab, push the term ID in to an array.
+	$('#taxonomy-fieldset .form-item').each (
+    function(i) {
+			$('.form-select :selected', this).each (
+			  function (i, selected) {
+					taxonomy.push($(selected).val());
+				}
+			);
+    }
+  );
+
+	// Initialise a cookie that lives for 1 minute.
+  $.Jookie.Initialise("PopupParentTaxonomy", 1);	
+	// Save our array of term IDs to the cookie.
+  $.Jookie.Set("PopupParentTaxonomy", "taxonomy", taxonomy);
+}
+
diff -up popups_reference/popups_reference.module workspace/driving-force/trunk/www/sites/all/modules/contrib/popups_reference/popups_reference.module
--- popups_reference/popups_reference.module	2009-03-07 07:54:25.000000000 +0100
+++ workspace/driving-force/trunk/www/sites/all/modules/contrib/popups_reference/popups_reference.module	2009-12-04 20:24:59.000000000 +0100
@@ -13,6 +13,7 @@
  * Modifies the nodereference setting form and the basic node form. 
  */
 function popups_reference_form_alter(&$form, $form_state, $form_id) {
+  //print_r($form['taxonomy']);
   if ($form_id == 'content_field_edit_form' && $form['#field']['type'] == 'nodereference') {
     // Add a checkbox to the nodereference settings page.
     $field_name = $form['#field']['field_name'];
@@ -44,6 +45,29 @@ function popups_reference_form_alter(&$f
         
       }
     }
+    
+    // Add a wrapper around taxonomy fieldset so we can select it with jQuery.
+    $form['taxonomy']['#attributes']['id'] = 'taxonomy-fieldset';
+    
+    // Decode the JSON string in the cookie.
+    $decoded = json_decode($_COOKIE['PopupParentTaxonomy']);
+    $taxonomy = $decoded->taxonomy;
+    
+    // Clean up the decoded array.
+    $taxonomy_clean = array();
+    foreach ($taxonomy as $tid) {
+      if (is_numeric($tid)) {
+        $taxonomy_clean[] = $tid;
+      }
+    }
+    
+    // Put the stored taxonomy in the default values.
+    foreach ($form['taxonomy'] as $key => $vocab) {
+      if (is_numeric ($key)) {
+        $form['taxonomy'][$key]['#default_value'] = $taxonomy_clean;
+      }
+    }
+    
   }
 }
 
@@ -54,12 +78,19 @@ function popups_reference_form_alter(&$f
  *   to select the newly created node in the reference widget.
  */ 
 function popups_reference_nodeapi($node, $op) {
+  // Load in the "jookie" plugin for jQuery.
+  // See: http://plugins.jquery.com/project/Jookie + README
+  if (module_exists('jquery_plugin')) {
+    jquery_plugin_add('jookie');
+  }
+  
   if ($op == 'insert') {
       $five = time()+300; // 5 minutes in the future.
       setcookie("PopupRefNid", $node->nid, $five, '/'); 
 //      setcookie("PopupRefTitle", $node->title, $five, '/');
       setrawcookie("PopupRefTitle", rawurlencode($node->title), $five, '/');
   }
+  
 }
 
 /**
@@ -93,8 +124,8 @@ function popups_reference_alter_item(&$f
     if ($links) {
       // Put the nodereference widget and links in an wrapper.
       // Makes it easy to find for Ahah targeting, and popups_reference behavior selecting.
-      $form[$key]['#prefix'] = '<div id="'. $wrapper_id .'">';
-      $form[$key]['#suffix'] = '<div>Add New: ' . implode(', ', $links) .'</div></div>';
+      $form[$key]['#prefix'] = '<div id="'. $wrapper_id .'">' . $form[$key]['#prefix'];
+      $form[$key]['#suffix'] = $form[$key]['#suffix'] .'<div>Add New: ' . implode(', ', $links) .'</div></div>';
     }
   }
 }
diff -up popups_reference/README.txt workspace/driving-force/trunk/www/sites/all/modules/contrib/popups_reference/README.txt
--- popups_reference/README.txt	2009-03-06 02:54:08.000000000 +0100
+++ workspace/driving-force/trunk/www/sites/all/modules/contrib/popups_reference/README.txt	2009-12-04 20:09:14.000000000 +0100
@@ -7,4 +7,22 @@ TODO 
 LIMITATIONS
  * http://drupal.org/node/378988 - conflicts with Hierarchical Select.
 
- 
\ No newline at end of file
+PASSING TAXONOMY
+
+If you want to use the feature which passes parent taxonomy to child nodes,
+you need to install the jquery_plugin module:
+http://drupal.org/project/jquery_plugin
+
+Once installed, you need to add the Jookie plugin to the module's directory
+and rename it jquery.jookie.min.js so we can load it. See:
+http://plugins.jquery.com/project/Jookie
+
+When these two components are in place, your Popups should inherit taxonomy
+data from the parent node.
+
+Please note, it is not safe to have more than one browser window or tab
+open at once with popups using this feature. The most recently opened popup
+will over-write the cookie required to pass the data.
+
+If you use Hierarchical Select then the weight of this module must be
+greater than 16 in the Drupal system table. (Tested with weight of 20.)
Only in workspace/driving-force/trunk/www/sites/all/modules/contrib/popups_reference/: .svn
