--- C:/Documents and Settings/Tester/Skrivbord/ajaxify_regions/ajaxify_regions.module	Thu May 13 04:34:16 2010
+++ C:/xampp/htdocs/xnalarapressflow/sites/all/modules/ajaxify_regions/ajaxify_regions.module	Wed Jul 21 03:37:50 2010
@@ -102,13 +102,15 @@
           // build our ajax callback and pass region names to our ajax handler
           drupal_add_js(drupal_get_path('module', 'ajaxify_regions'). '/js/ajaxify_regions.js');
           $url = 'ajaxify_regions/ajax';
+		  /* New drupal_add_js */
           drupal_add_js('
           var blocks = "blocks='. implode('/', $ajax_blocks) .'";
+		  var qq = "qq=" + Drupal.settings.ajaxify.qq;
           $(function(){$.ajax({
             url: Drupal.settings.basePath + "'. $url .'",
             type: "GET",
             dataType: "json",
-            data: blocks,
+            data: blocks + "&" + qq ,
             success: function(data) { ajaxify_regions_success_block(data); }
           })});', 'inline');          
           
@@ -182,4 +184,26 @@
   // only if it is listed.
   $block_match = !($block_vis xor $block_match);
   return $block_match;
+}
+
+//Generate js for q
+
+function ajaxify_regions_init() {
+  // define variables
+  $qq = $_GET['q'];
+
+  // variables to insert in Drupal.settings
+  $page_js = array(
+    'ajaxify' => array('qq' => $qq),
+	);
+
+  // page specific variables. Add the values to Drupal.settings
+  drupal_add_js($page_js, 'setting');		  
+
+  // Set the context so blocks that use arg() will be correct.
+	if (isset($_GET['qq'])) {
+	$_GET['q'] = $_GET['qq'];
+	}
+  // Force arg to get "reset"
+	arg(0, $_GET['q']);
 }
\ No newline at end of file
