Index: rotor.module
===================================================================
--- rotor.module	(revision 254)
+++ rotor.module	(working copy)
@@ -120,6 +120,12 @@
     '#size' => 2,
     '#description' => t('The time in seconds that will be shown every rotor item before change to the next one.'),
   );
+  $form['random_items'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Randomize nodes'),
+    '#default_value' => variable_get('rotor_random_items', FALSE),
+    '#description' => t('Enables/Disables random selection of nodes that will be present in the rotor block.'),
+  );
   $form['show_tab'] = array(
     '#type' => 'checkbox',
     '#title' => t('Enable tabs'),
@@ -157,6 +163,7 @@
   if ($values['op'] == $values['submit']) {
     variable_set('rotor_max_items', $values['max_items']);
     variable_set('rotor_seconds', $values['time']);
+    variable_set('rotor_random_items', $values['random_items']);
     variable_set('rotor_show_tabs', $values['show_tab']);
     variable_set('rotor_group_tabs', $values['group_tabs']);
     variable_set('rotor_imagecache_preset', $values['imagecache']);
@@ -165,6 +172,7 @@
   else {
     variable_set('rotor_max_items', 3);
     variable_set('rotor_seconds', 10);
+    variable_set('rotor_random_items', FALSE);
     variable_set('rotor_show_tabs', TRUE);
     variable_set('rotor_group_tabs', ROTOR_GROUP_TABS);
     variable_set('rotor_imagecache_preset', 0);
@@ -300,8 +308,10 @@
  */
 function rotor_block_content() {
   $limit = variable_get('rotor_max_items', 3);
+  $random = variable_get('rotor_random_items', FALSE)? "ORDER BY RAND()" : "";
   $items = array();
-  $result = db_query("SELECT nid FROM {node} WHERE type = 'rotor_item' LIMIT %d", $limit);
+  
+  $result = db_query("SELECT nid FROM {node} WHERE type = 'rotor_item' $random LIMIT %d", $limit);
   if ($result) {
     while ($node = db_fetch_array($result)) {
       $items[] = node_load($node);
Index: rotor.install
===================================================================
--- rotor.install	(revision 254)
+++ rotor.install	(working copy)
@@ -16,6 +16,7 @@
   drupal_uninstall_schema('rotor');
   variable_del('rotor_max_items');
   variable_del('rotor_seconds');
+  variable_del('rotor_random_items');
   variable_del('rotor_show_tabs');
   variable_del('rotor_group_tabs');
   drupal_set_message(t('Rotor unistalled'));
