602a38b8cdc7346035c6ba85bfcb46cbdeee8775
kate
  Wed Oct 10 11:02:01 2012 -0700
Added 'Contact' link that jumps to Credits section so users can more easily locate lab contacts (reduce load on mailing list).  #9328
diff --git src/hg/hgFileUi/hgFileUi.c src/hg/hgFileUi/hgFileUi.c
index 6f48201..20f8d4b 100644
--- src/hg/hgFileUi/hgFileUi.c
+++ src/hg/hgFileUi/hgFileUi.c
@@ -98,30 +98,38 @@
 
 if (tdb->html != NULL && tdb->html[0] != 0)
     {
     char *browserVersion;
     if (btIE == cgiClientBrowser(&browserVersion, NULL, NULL) && *browserVersion < '8')
         htmlHorizontalLine();
     else // Move line down, since <H2>Description (in ->html) is proceded by too much space
         printf("<HR ALIGN='bottom' style='position:relative; top:1em;'>");
 
     printf("<table class='windowSize'><tr valign='top'><td rowspan=2>");
     puts("<A NAME='TRACK_HTML'></A>");    // include anchor for Description link
 
     // Add pennantIcon
     printPennantIconNote(tdb);
 
+    char *html = tdb->html;
+    if (trackDbSetting(tdb, "wgEncode"))
+        {
+        // add anchor to Credits section of ENCODE HTML page so contacts are easily found (on top menu)
+        html = replaceChars(tdb->html, "2>Credits", "2></H2><A NAME='TRACK_CREDITS'></A>\n<H2>Credits</H2>");
+        }
+    puts(html);
+
     puts(tdb->html);
     printf("</td><td nowrap>");
     cgiDown(0.7); // positions top link below line
     makeTopLink(tdb);
     printf("&nbsp</td></tr><tr valign='bottom'><td nowrap>");
     makeTopLink(tdb);
     printf("&nbsp</td></tr></table>");
     }
 }
 
 void doMiddle(struct cart *cart)
 /* Write body of web page. */
 {
 struct trackDb *tdb = NULL;
 char *track;