--- dhtml_menu_old.module	2006-12-09 16:12:11.000000000 -0600
+++ dhtml_menu.module	2007-03-10 09:39:15.000000000 -0600
@@ -8,6 +8,50 @@
  */
 
 /**
+ * Creating a menu so that the speed at which the menus drop down can be selected.
+ *
+ */
+
+function dhtml_menu_menu(){
+  $items = array();
+    
+    $items[] = array(
+      'path' => 'admin/settings/dhtml_menu',
+      'title' => t('Dhtml Menu Administration'),
+      'callback' => 'drupal_get_form',
+      'callback arguments' => 'dhtml_menu_admin',
+      'access' => user_access('access content'),
+      'type' => MENU_NORMAL_ITEM
+    );
+
+  return $items;
+}
+
+/*
+ * I'd ultimately really like to add in an extra feature to the admin that determined
+ * whether the menu should be a drop down, or a mouseover popup style navigation.
+ */
+
+
+function dhtml_menu_admin(){
+
+	 $form['variable_speed'] = array(
+		'#type' => 'select',
+		'#title' => t('Dhtml Menu Speed'),
+		'#default_value' => variable_get('variable_speed', ''),
+		'#options' => array(
+		'' => t('Instant (default)'),
+		'slow' => t('Slow'),
+		'fast' => t('Fast'),
+		),
+		'#description' => t('Select the speed at which you wish your menus to expand and collapse.')
+	);
+
+	return system_settings_form($form);
+	
+}
+
+/**
  * Basically a copy of menu_block() -- we're providing our own version
  * of each menu.
  */
@@ -99,6 +143,7 @@ function theme_dhtml_menu_tree($pid = 1,
 
     if ($toplevel) {
       $path = drupal_get_path('module', 'dhtml_menu');
+      drupal_add_js("var speed = " . drupal_to_js(variable_get('variable_speed', '')) . ";", 'inline');
       drupal_add_js("$path/dhtml_menu.js");
     }
     return "\n<ul class=\"menu\">\n". $tree ."\n</ul>\n";
