--- switchtheme.module	2008-04-20 22:33:34.000000000 +0200
+++ switchtheme_patch.module	2008-05-18 22:03:52.531250000 +0200
@@ -23,7 +23,7 @@ function switchtheme_help($section) {
  * Implementation of hook_perm().
  */
 function switchtheme_perm() {
-  return array('administer switch', 'switch theme');
+  return array('administer switch', 'switch theme','switch to non-enabled theme');
 }
 
 /**
@@ -116,14 +116,23 @@ function switchtheme_display_random_bloc
 function switchtheme_switch_form() {
   global $user, $custom_theme;
 
+  if (user_access('switch to non-enabled themes')) {
+    $note = t('Non-enabled themes available!');
+	}
   $form = array();
   $form['theme'] = array(
     '#type' => 'select',
     '#default_value' => !empty($custom_theme) ? $custom_theme : $user->theme,
     '#attributes' => array('title' => t('Change the way this site looks.')),
-    '#options' => switchtheme_select()
+    '#options' => switchtheme_select(),
+	'#description' => $note, 
+  );
+  $form['submit'] = array(
+    '#id' =>'switchtheme-submit', 
+	'#type' => 'submit', 
+	'#value' => t('Switch'),
+	'#suffix' => '<br /><br />',
   );
-  $form['submit'] = array('#id'=>'switchtheme-submit', '#type' => 'submit', '#value' => t('Switch'));
   return $form;
 }
 
@@ -164,7 +173,9 @@ function switchtheme_options() {
   $options = array();
   $themes = list_themes();
   foreach ($themes as $name => $attr) {
-    if ($attr->status) {
+    if (user_access('switch to non-enabled themes')) {
+	  $options[] = $attr->name;
+	  } else if ($attr->status) { 
       $options[] = $attr->name;
     }
   }
