--- /sites/all/modules/contrib/cck_gallery/cck_gallery.module
+++ cck_gallery.module
@@ -60,7 +60,7 @@
 function cck_gallery_block($op = 'list', $delta = 0, $edit = array()) {
   if ($op == 'list') {
     $blocks[0]['info'] = t('CCK Gallery');
-    
+    $blocks[1]['info'] = t('CCK Gallery NextPrev Thumbs');
     return $blocks;
   
   } elseif ($op == 'view') {
@@ -86,12 +86,32 @@
         }
         return $block;
       break;
+      
+      case 1:
+        //make sure we're on a node page
+        if (arg(0) === 'node' && is_numeric(arg(1))) {
+          //load the node
+          $thisnode = node_load(arg(1));
+          //check the type is a CCK Image type
+          if ($thisnode->type == variable_get('cck_gallery_image_type', 'cck_image')) {
+            $view = variable_get('cck_gallery_contents_view', 'gallery_contents');
+            $display = variable_get('cck_gallery_contents_view_display', 'default');
+            $block['subject'] = t('Gallery NextPrev');
+            
+            // Create NextPrev Thumbs
+            $thumbs = cck_gallery_nextprev_thumbs($thisnode, $view, $display); 
+            $str = "<div class=\"nextprev_thumb %s\">%s</div>";       
+            $block['content'] = sprintf($str, $thumbs['prev'] ?  'previous' :  'empty', $thumbs['prev']);         
+            $block['content'] .= sprintf($str, $thumbs['next'] ?  'next' :  'empty', $thumbs['next']);
+         
+          }
+        }
+        return $block;
+      break;
     }
 
   }
-  
-
-  
+ 
 }
 
 /**
@@ -253,52 +273,12 @@
       //offer the gallery as a rendered view
       $vars['gallery'] =  views_embed_view($view, $display, $vars['field_gallery'][0]['nid']);
       $vars['template_file'] = 'node-cck_image.tpl.php';
-
-      //load the gallery view object
-      $data = views_get_view($view);
-      //configure the argumemts
-      $args = array($vars['field_gallery'][0]['nid']);
-      $offset = 0;
-      $limit = 10;
       
-      //load the gallery as an array of data rows
-      $data->set_arguments($args, FALSE);
-      $data->set_offset($offset);
-      $data->set_items_per_page($limit);
-      $data->set_display($display);
-      $data->execute();
-      
-      //calculate the row id of the last image in the gallery
-      $keys = array_keys($data->result);
-      $last = max($keys);
-
-      //find the current node in the result and set the next and previous rows
-      foreach ($data->result as $rid => $result) {
-        if ($result->nid == $vars['nid']) {
-
-          if ($rid > 0) {
-            $prev = $rid - 1;
-          }
-          if ($rid < $last) {
-            $next = $rid + 1;
-          }
-        }
-        
-      }
-      
-      //create the clickable "next" thumbnail as a template variable
-      if ($next) {
-        $next_node = node_load($data->result[$next]->nid);
-        $thumbnail = theme('imagecache', 'thumbnail', $next_node->field_image[0]['filepath'], t('Next picture.'), t('Next picture.'), array());
-        $vars['next_image'] = l($thumbnail . '<br />Next &gt;&gt;', 'node/'.$data->result[$next]->nid, array('html' => TRUE));
-      }
-      
-      //create the clickable "previous" thumbnail as a template variable
-      if ($prev || $prev === 0) {
-        $prev_node = node_load($data->result[$prev]->nid);
-        $thumbnail = theme('imagecache', 'thumbnail', $prev_node->field_image[0]['filepath'], t('Previous picture.'), t('Previous picture.'), array());
-        $vars['prev_image'] = l($thumbnail . '<br />&lt;&lt; Previous', 'node/'.$data->result[$prev]->nid, array('html' => TRUE));
-      }
+      // Create NextPrev Thumbs as template variables
+      $node = $vars['node'];
+      $thumbs = cck_gallery_nextprev_thumbs($node, $view, $display);
+      $vars['prev_image'] = $thumbs['prev'];
+      $vars['next_image'] = $thumbs['next'];
       
     }
   }
@@ -313,3 +293,58 @@
   $modulepath = drupal_get_path('module', 'cck_gallery');
   array_push($theme_registry[$theme_hook]['theme paths'], $modulepath.'/theme');
 }
+
+/**
+ * Create Gallery Next/Previous thumbnails related to current Image node
+ */
+function cck_gallery_nextprev_thumbs($node, $view, $display) {
+
+   //load the gallery view object
+   $data = views_get_view($view);
+   //configure the argumemts
+   $args = array($node->field_gallery[0]['nid']);
+   $offset = 0;
+   $limit = 10;
+
+   //load the gallery as an array of data rows
+   $data->set_arguments($args, FALSE);
+   $data->set_offset($offset);
+   $data->set_items_per_page($limit);
+   $data->set_display($display);
+   $data->execute();
+
+   //calculate the row id of the last image in the gallery
+   $keys = array_keys($data->result);
+   $last = max($keys);
+
+   //find the current node in the result and set the next and previous rows
+   foreach ($data->result as $rid => $result) {
+      if ($result->nid == $node->nid) {
+         if ($rid > 0) {
+            $prev = $rid - 1;
+         }
+         if ($rid < $last) {
+            $next = $rid + 1;
+         }
+      }
+   }
+   
+   $thumbs = array();
+   
+   //create the clickable "next" thumbnail
+   if ($next) {
+      $next_node = node_load($data->result[$next]->nid);
+      $thumbnail = theme('imagecache', 'thumbnail', $next_node->field_image[0]['filepath'], t('Next picture.'), t('Next picture.'), array());
+      $thumbs['next'] = l($thumbnail . '<br />Next &gt;&gt;', 'node/'.$data->result[$next]->nid, array('html' => TRUE));
+   }
+
+   //create the clickable "previous" thumbnail
+   if ($prev || $prev === 0) {
+      $prev_node = node_load($data->result[$prev]->nid);
+      $thumbnail = theme('imagecache', 'thumbnail', $prev_node->field_image[0]['filepath'], t('Previous picture.'), t('Previous picture.'), array());
+      $thumbs['prev'] = l($thumbnail . '<br />&lt;&lt; Previous', 'node/'.$data->result[$prev]->nid, array('html' => TRUE));
+   }
+
+   return $thumbs;
+
+}
