0601238e0258b0ae247f8c1aefe85bf50c039405
kate
  Fri Jan 17 17:25:34 2014 -0800
Make cell abbrev table into a collapsible section to reduce clutter on details page
diff --git src/hg/lib/web.c src/hg/lib/web.c
index e22f172..005bd40 100644
--- src/hg/lib/web.c
+++ src/hg/lib/web.c
@@ -358,55 +358,63 @@
 
 
 static void webEndSection()
 /* Close down a section */
 {
 puts(
     "" "\n"
     "	</TD><TD WIDTH=15></TD></TR></TABLE>" "\n"
 //    "<BR>"
     "	</TD></TR></TABLE>" "\n"
     "	</TD></TR></TABLE>" "\n"
     "	" );
 puts("</div>");
 }
 
-void webNewSection(char* format, ...)
-/* create a new section on the web page */
+void webNewSectionHeaderStart()
+/* Start the header for a new section on the web page */
 {
-va_list args;
-va_start(args, format);
-
 webEndSection();
 puts("<div>");
 puts("<!-- +++++++++++++++++++++ START NEW SECTION +++++++++++++++++++ -->");
 puts(  // TODO: Replace nested tables with CSS (difficulty is that tables are closed elsewhere)
     "<BR>\n\n"
     "   <!--outer table is for border purposes-->\n"
     "   <TABLE WIDTH='100%' BGCOLOR='#" HG_COL_BORDER
         "' BORDER='0' CELLSPACING='0' CELLPADDING='1'><TR><TD>\n"
     "    <TABLE BGCOLOR='#" HG_COL_INSIDE
          "' WIDTH='100%'  BORDER='0' CELLSPACING='0' CELLPADDING='0'><TR><TD>\n"
     "     <div class='subheadingBar' class='windowSize'>");
+}
 
-vprintf(format, args);
-
+void webNewSectionHeaderEnd()
+/* Properly close header of collapsible section on web page */
+{
 puts("     </div>\n"
      "     <TABLE BGCOLOR='#" HG_COL_INSIDE "' WIDTH='100%' CELLPADDING=0>"
           "<TR><TH HEIGHT=10></TH></TR>\n"
      "     <TR><TD WIDTH=10>&nbsp;</TD><TD>\n\n");
+}
 
+void webNewSection(char* format, ...)
+/* create a new section on the web page */
+{
+va_list args;
+va_start(args, format);
+webNewSectionHeaderStart();
+vprintf(format, args);
+webNewSectionHeaderEnd();
 va_end(args);
 }
 
 void webEndSectionTables()
 /* Finish with section tables (but don't do /BODY /HTML like
  * webEnd does. */
 {
 webEndSection();
 puts("</TD></TR></TABLE>\n");
 }
 
 void webEnd()
 /* output the footer of the HTML page */
 {
 if(!webInTextMode)