Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.420
diff -u -r1.420 common.inc
--- includes/common.inc	22 Jan 2005 11:15:24 -0000	1.420
+++ includes/common.inc	26 Jan 2005 02:54:52 -0000
@@ -59,6 +59,7 @@
 
   $output = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n";
   $output .= "<base href=\"$base_url/\" />\n";
+  $output .= '<script type="text/javascript" src="misc/drupal.js"></script>';
   $output .= theme('stylesheet_import', 'misc/drupal.css');
 
   return $output . drupal_set_html_head();
@@ -1000,11 +1001,13 @@
  *   The form items within the group, as an HTML string.
  * @param $description
  *   Explanatory text to display after the form item group.
+ * @param $collapsed
+ *   Boolean to specify if the group should be collapsed by default.
  * @return
  *   A themed HTML string representing the form item group.
  */
-function form_group($legend, $group, $description = NULL) {
-  return '<fieldset>' . ($legend ? '<legend>'. $legend .'</legend>' : '') . $group . ($description ? '<div class="description">'. $description .'</div>' : '') . "</fieldset>\n";
+function form_group($legend, $group, $description = NULL, $collapsed = FALSE) {
+  return '<fieldset class="'. ($collapsed ? 'collapsed':'expanded') .'">' . ($legend ? '<legend>'. $legend .'</legend>' : '') . $group . ($description ? '<div class="description">'. $description .'</div>' : '') . "</fieldset>\n";
 }
 
 /**
Index: misc/drupal.css
===================================================================
RCS file: /cvs/drupal/drupal/misc/drupal.css,v
retrieving revision 1.93
diff -u -r1.93 drupal.css
--- misc/drupal.css	25 Jan 2005 20:27:09 -0000	1.93
+++ misc/drupal.css	26 Jan 2005 02:59:23 -0000
@@ -5,7 +5,6 @@
 */
 fieldset {
   margin-bottom: 1em;
-  padding: .5em;
 }
 form {
   margin: 0;
@@ -150,6 +149,35 @@
 }
 .form-item label.option {
   font-weight: normal;
+}
+fieldset.collapsed {
+  border: none;
+  padding-bottom: 0;
+  padding-top: 0;
+}
+fieldset.expanded legend, fieldset.collapsed legend {
+  cursor: pointer;
+  color: #000;
+  background-repeat: no-repeat;
+  background-position: 4px 50%;
+}
+fieldset.expanded legend {
+  padding: 1px 4px 1px 15px;
+  background-image: url(menu-expanded.png);
+}
+fieldset.collapsed legend {
+  padding: 0px 4px 0px 16px;
+  background-image: url(menu-collapsed.png);
+  border: 1px solid #ccc;
+/*
+ * These settings look somewhat better in IE. The legend styles
+ * need more work to look decent in all browsers without hacks.
+  padding-left: 20px;
+  background-position: 8px 50%;
+*/
+}
+fieldset.collapsed .form-item {
+  display: none;
 }
 .form-submit {
   margin: 0.5em 0;
