Index: trunk/ippMonitor/Makefile
===================================================================
--- trunk/ippMonitor/Makefile	(revision 8984)
+++ trunk/ippMonitor/Makefile	(revision 9003)
@@ -22,5 +22,9 @@
 $(DESTBIN)/DetrendSteps.php \
 $(DESTBIN)/ImfileTables.php \
-$(DESTBIN)/phptest.php
+$(DESTBIN)/phptest.php \
+$(DESTBIN)/flat_1_0.b1.jpeg \
+$(DESTBIN)/flat_1_0.b2.jpeg \
+$(DESTBIN)/pic.png
+
 
 DEFSRC = \
@@ -80,4 +84,12 @@
 	cp $< $@
 
+$(SRC)/%.png: $(RAW)/%.png
+	@if [ ! -d $(SRC) ]; then mkdir -p $(SRC); fi
+	cp $< $@
+
+$(SRC)/%.jpeg: $(RAW)/%.jpeg
+	@if [ ! -d $(SRC) ]; then mkdir -p $(SRC); fi
+	cp $< $@
+
 $(DESTBIN)/%.php: $(SRC)/%.php
 	@if [ ! -d $(DESTBIN) ]; then mkdir -p $(DESTBIN) || exit; fi
@@ -100,4 +112,14 @@
 	cp $(SRC)/$*.jpg $(DESTBIN)/$*.jpg || exit
 
+$(DESTBIN)/%.jpeg: $(SRC)/%.jpeg
+	@if [ ! -d $(DESTBIN) ]; then mkdir -p $(DESTBIN) || exit; fi
+	rm -f $(DESTBIN)/$*.jpeg || exit
+	cp $(SRC)/$*.jpeg $(DESTBIN)/$*.jpeg || exit
+
+$(DESTBIN)/%.png: $(SRC)/%.png
+	@if [ ! -d $(DESTBIN) ]; then mkdir -p $(DESTBIN) || exit; fi
+	rm -f $(DESTBIN)/$*.png || exit
+	cp $(SRC)/$*.png $(DESTBIN)/$*.png || exit
+
 # utilities #################################################
 
Index: trunk/ippMonitor/def/autocode.php
===================================================================
--- trunk/ippMonitor/def/autocode.php	(revision 8984)
+++ trunk/ippMonitor/def/autocode.php	(revision 9003)
@@ -5,5 +5,11 @@
 $ID = checkID ();
 
-menu('$MENU', '$TITLE', '$STYLE', $ID['link']);
+if ($ID['menu']) {
+  $myMenu = $ID['menu'];
+} else {
+  $myMenu = "$MENU";
+}
+
+menu($myMenu, '$TITLE', '$STYLE', $ID['link']);
 
 echo "<p> $TITLE </p>";
@@ -26,4 +32,6 @@
   menu_end();
 }
+
+// ** BODY HTML **
 
 // set up the table and form
@@ -58,7 +66,11 @@
 $pass = $ID['pass'];
 $proj = $ID['proj'];
+$menu = $ID['menu'];
 echo "<input type=\"hidden\" name=\"pass\" value=\"$pass\">\n";
 echo "<input type=\"hidden\" name=\"proj\" value=\"$proj\">\n";
+echo "<input type=\"hidden\" name=\"menu\" value=\"$menu\">\n";
 echo "</form>\n";
+
+// ** TAIL HTML **
 
 menu_end();
Index: trunk/ippMonitor/def/detInputExp.d
===================================================================
--- trunk/ippMonitor/def/detInputExp.d	(revision 8984)
+++ trunk/ippMonitor/def/detInputExp.d	(revision 9003)
@@ -4,7 +4,16 @@
 MENU  ipp.detrend.dat
 
-#     field     name     link to     extras
-FIELD det_id, det_id
+BODY.HTML  test 1 <br>
+BODY.HTML  test 2 <br>
+BODY.HTML  test 3 <br>
+
+#     field      name       show        link to                 extras
+FIELD det_id,    det_id
 FIELD iteration, iteration
-FIELD exp_id, exp_id
-FIELD include, include
+FIELD exp_id,    exp_id,    value,      rawImfile.php,          exp_id=$exp_id
+FIELD exp_id,    processed, value=proc, detProcessedImfile.php, exp_id=$exp_id,det_id=$det_id
+FIELD include,   include
+
+TAIL.HTML test tail 1 <br>
+TAIL.HTML test tail 2 <br>
+TAIL.HTML test tail 3 <br>
Index: trunk/ippMonitor/def/detMasterFrame.d
===================================================================
--- trunk/ippMonitor/def/detMasterFrame.d	(revision 8984)
+++ trunk/ippMonitor/def/detMasterFrame.d	(revision 9003)
@@ -4,5 +4,5 @@
 MENU  ipp.detrend.dat
 
-#     field     name     link to     extras
+#     field     name     show  link to     extras
 FIELD det_id, det_id
 FIELD iteration, iteration
Index: trunk/ippMonitor/def/detMasterImfile.d
===================================================================
--- trunk/ippMonitor/def/detMasterImfile.d	(revision 8984)
+++ trunk/ippMonitor/def/detMasterImfile.d	(revision 9003)
@@ -4,5 +4,5 @@
 MENU  ipp.imfiles.dat
 
-#     field     name     link to     extras
+#     field     name     show  link to     extras
 FIELD det_id, det_id
 FIELD class_id, class_id
Index: trunk/ippMonitor/def/detNormalizedImfile.d
===================================================================
--- trunk/ippMonitor/def/detNormalizedImfile.d	(revision 8984)
+++ trunk/ippMonitor/def/detNormalizedImfile.d	(revision 9003)
@@ -4,5 +4,5 @@
 MENU  ipp.imfiles.dat
 
-#     field     name     link to     extras
+#     field     name     show   link to     extras
 FIELD det_id, det_id
 FIELD iteration, iteration
Index: trunk/ippMonitor/def/detNormalizedStatImfile.d
===================================================================
--- trunk/ippMonitor/def/detNormalizedStatImfile.d	(revision 8984)
+++ trunk/ippMonitor/def/detNormalizedStatImfile.d	(revision 9003)
@@ -4,5 +4,5 @@
 MENU  ipp.imfiles.dat
 
-#     field     name     link to     extras
+#     field     name     show   link to     extras
 FIELD det_id, det_id
 FIELD iteration, iteration
Index: trunk/ippMonitor/def/detProcessedImfile.d
===================================================================
--- trunk/ippMonitor/def/detProcessedImfile.d	(revision 8984)
+++ trunk/ippMonitor/def/detProcessedImfile.d	(revision 9003)
@@ -4,5 +4,8 @@
 MENU  ipp.imfiles.dat
 
-#     field     name     link to     extras
+RESTRICT exp_id
+RESTRICT det_id
+
+#     field     name      show   link to     extras
 FIELD det_id, det_id
 FIELD exp_id, exp_id
Index: trunk/ippMonitor/def/detResidExp.d
===================================================================
--- trunk/ippMonitor/def/detResidExp.d	(revision 8984)
+++ trunk/ippMonitor/def/detResidExp.d	(revision 9003)
@@ -4,13 +4,13 @@
 MENU  ipp.detrend.dat
 
-#     field     name     link to     extras
-FIELD det_id, det_id
-FIELD iteration, iteration
-FIELD exp_id, exp_id
-FIELD recipe, recipe
-FIELD bg, bg
-FIELD bg_stdev, bg_stdev
-FIELD bg_mean_stdev, bg_mean_stdev
-FIELD b1_uri, b1_uri
-FIELD b2_uri, b2_uri
-FIELD accept, accept
+#     field      name       show            link to         extras
+FIELD det_id,    det_id,    value
+FIELD iteration, iteration, value
+FIELD accept,    accept,    value
+FIELD exp_id, 	 exp_id,    value,          rawImfile.php,  exp_id=$exp_id
+FIELD b1_uri, 	 b1_uri,    image=$b1_uri,  display.php,    image=$b2_uri
+FIELD recipe, 	 recipe,    image=pic.png
+FIELD bg,        backgnd,   value
+FIELD bg_stdev,  bg_stdev,  value
+FIELD b2_uri, 	 b2_uri,    none
+# FIELD bg_mean_stdev, bg_mean_stdev
Index: trunk/ippMonitor/def/detResidImfile.d
===================================================================
--- trunk/ippMonitor/def/detResidImfile.d	(revision 8984)
+++ trunk/ippMonitor/def/detResidImfile.d	(revision 9003)
@@ -4,5 +4,5 @@
 MENU  ipp.imfiles.dat
 
-#     field     name     link to     extras
+#     field     name        show  link to     extras
 FIELD det_id, det_id
 FIELD iteration, iteration
Index: trunk/ippMonitor/def/detRun.d
===================================================================
--- trunk/ippMonitor/def/detRun.d	(revision 8984)
+++ trunk/ippMonitor/def/detRun.d	(revision 9003)
@@ -4,5 +4,6 @@
 MENU  ipp.detrend.dat
 
-#     field     name     link to     extras
+#     field      name         show    link to              extras
+FIELD position,  det ID,      value,  detRunSummary.php,   det_id=$position
 FIELD iteration, iteration
-FIELD det_type, det_type
+FIELD det_type,  det_type
Index: trunk/ippMonitor/def/detRunSummary.d
===================================================================
--- trunk/ippMonitor/def/detRunSummary.d	(revision 8984)
+++ trunk/ippMonitor/def/detRunSummary.d	(revision 9003)
@@ -4,9 +4,10 @@
 MENU  ipp.detrend.dat
 
-#     field    name    link to     extras
-FIELD det_id, det_id
-FIELD iteration, iteration
-FIELD bg, bg
-FIELD bg_stdev, bg_stdev
-FIELD bg_mean_stdev, bg_mean_stdev
-FIELD accept, accept
+#     field      name           show         link to           extras
+FIELD det_id,    det_id
+FIELD iteration, iteration,	value,       detInputExp.php,  det_id=$det_id,iteration=$iteration
+FIELD iteration, iteration,	value=resid, detResidExp.php,  det_id=$det_id,iteration=$iteration
+FIELD accept,    accept
+FIELD bg,        bg
+FIELD bg_stdev,  bg_stdev
+# FIELD bg_mean_stdev, bg_mean_stdev
Index: trunk/ippMonitor/def/detStackedImfile.d
===================================================================
--- trunk/ippMonitor/def/detStackedImfile.d	(revision 8984)
+++ trunk/ippMonitor/def/detStackedImfile.d	(revision 9003)
@@ -4,5 +4,5 @@
 MENU  ipp.imfiles.dat
 
-#     field     name     link to     extras
+#     field     name                   show  link to     extras
 FIELD det_id, det_id
 FIELD iteration, iteration
Index: trunk/ippMonitor/def/newExp.d
===================================================================
--- trunk/ippMonitor/def/newExp.d	(revision 8984)
+++ trunk/ippMonitor/def/newExp.d	(revision 9003)
@@ -1,8 +1,8 @@
 TABLE newExp
-TITLE Raw Science Exposures
+TITLE New Exposures
 FILE  newExp.php
 MENU  ipp.copy.dat
 
-#        field          name           link to         extras
+#        field          name           show     link to         extras
 FIELD    exp_id,	exposure ID
 FIELD    camera,	camera
Index: trunk/ippMonitor/def/newImfile.d
===================================================================
--- trunk/ippMonitor/def/newImfile.d	(revision 8984)
+++ trunk/ippMonitor/def/newImfile.d	(revision 9003)
@@ -4,5 +4,5 @@
 MENU  ipp.imfiles.dat
 
-#        field          name           link to         extras
+#        field          name           show   link to         extras
 FIELD    exp_id,	exposure ID
 FIELD    class,		class
Index: trunk/ippMonitor/def/p1PendingExp.d
===================================================================
--- trunk/ippMonitor/def/p1PendingExp.d	(revision 8984)
+++ trunk/ippMonitor/def/p1PendingExp.d	(revision 9003)
@@ -4,6 +4,6 @@
 MENU  ipp.science.dat
 
-#     field       name         link to         extras
-FIELD exp_id,     exposure ID, rawImfile.php,  exp_id=$exp_id
+#     field       name         show     link to         extras
+FIELD exp_id,     exposure ID, value,   rawImfile.php,  exp_id=$exp_id
 FIELD recipe,	  recipe
 FIELD p1_version, p1 version
Index: trunk/ippMonitor/def/p2PendingExp.d
===================================================================
--- trunk/ippMonitor/def/p2PendingExp.d	(revision 8984)
+++ trunk/ippMonitor/def/p2PendingExp.d	(revision 9003)
@@ -4,6 +4,6 @@
 MENU  ipp.science.dat
 
-#     field       name         link to         extras
-FIELD exp_id,     exposure ID, rawImfile.php,  exp_id=$exp_id
+#     field       name         show    link to         extras
+FIELD exp_id,     exposure ID, value,  rawImfile.php,  exp_id=$exp_id
 FIELD recipe,	  recipe
 FIELD p1_version, p1 version
Index: trunk/ippMonitor/def/p2PendingImfile.d
===================================================================
--- trunk/ippMonitor/def/p2PendingImfile.d	(revision 8984)
+++ trunk/ippMonitor/def/p2PendingImfile.d	(revision 9003)
@@ -4,5 +4,5 @@
 MENU  ipp.imfiles.dat
 
-#     field     name     link to     extras
+#     field     name           show   link to     extras
 FIELD exp_id,	exposure ID
 FIELD class_id, class ID
Index: trunk/ippMonitor/def/p2ProcessedExp.d
===================================================================
--- trunk/ippMonitor/def/p2ProcessedExp.d	(revision 8984)
+++ trunk/ippMonitor/def/p2ProcessedExp.d	(revision 9003)
@@ -4,6 +4,6 @@
 MENU  ipp.science.dat
 
-#     field       name         link to                 extras
-FIELD exp_id,     exposure ID, p2ProcessedImfile.php,  exp_id=$exp_id
-FIELD p1_version, p1 version,  p1PendingExp.php        exp_id=$exp_id
+#     field       name         show   link to                 extras
+FIELD exp_id,     exposure ID, value, p2ProcessedImfile.php,  exp_id=$exp_id
+FIELD p1_version, p1 version,  value, p1PendingExp.php        exp_id=$exp_id
 FIELD p2_version, p2 version
Index: trunk/ippMonitor/def/p2ProcessedImfile.d
===================================================================
--- trunk/ippMonitor/def/p2ProcessedImfile.d	(revision 8984)
+++ trunk/ippMonitor/def/p2ProcessedImfile.d	(revision 9003)
@@ -4,5 +4,5 @@
 MENU  ipp.imfiles.dat
 
-#     field          name         link to     extras
+#     field          name          show  link to     extras
 FIELD exp_id,	     exposure ID
 FIELD class_id,	     class ID
Index: trunk/ippMonitor/def/p3PendingExp.d
===================================================================
--- trunk/ippMonitor/def/p3PendingExp.d	(revision 8984)
+++ trunk/ippMonitor/def/p3PendingExp.d	(revision 9003)
@@ -4,6 +4,6 @@
 MENU  ipp.science.dat
 
-#     field       name          link to                extras
-FIELD exp_id,	  exposure ID,  p2ProcessedImfile.php, exp_id=$exp_id
-FIELD p2_version, p2 version,   p2ProcessedExp.php,    exp_id=$exp_id
+#     field       name          show   link to                extras
+FIELD exp_id,	  exposure ID,  value, p2ProcessedImfile.php, exp_id=$exp_id
+FIELD p2_version, p2 version,   value, p2ProcessedExp.php,    exp_id=$exp_id
 FIELD p3_version, p3 version
Index: trunk/ippMonitor/def/pzPendingExp.d
===================================================================
--- trunk/ippMonitor/def/pzPendingExp.d	(revision 8984)
+++ trunk/ippMonitor/def/pzPendingExp.d	(revision 9003)
@@ -4,5 +4,5 @@
 MENU  ipp.copy.dat
 
-#        field        name           link to         extras
+#        field          name           show     link to         extras
 FIELD    exp_id,	exposures ID
 FIELD    camera, 	camera
Index: trunk/ippMonitor/def/pzPendingImfile.d
===================================================================
--- trunk/ippMonitor/def/pzPendingImfile.d	(revision 8984)
+++ trunk/ippMonitor/def/pzPendingImfile.d	(revision 9003)
@@ -4,9 +4,9 @@
 MENU  ipp.imfiles.dat
 
-#        field        name           link to         extras
-FIELD    exp_id,	exposure ID
-FIELD    bytes,		number of bytes
-FIELD    md5sum,	checksum
-FIELD    class,		class
-FIELD    class_id,	class ID 
-FIELD    uri,		URI
+#        field        name             show   link to         extras
+FIELD    exp_id,      exposure ID
+FIELD    bytes,	      number of bytes
+FIELD    md5sum,      checksum
+FIELD    class,	      class
+FIELD    class_id,    class ID 
+FIELD    uri,	      URI
Index: trunk/ippMonitor/def/rawDetrendExp.d
===================================================================
--- trunk/ippMonitor/def/rawDetrendExp.d	(revision 8984)
+++ trunk/ippMonitor/def/rawDetrendExp.d	(revision 9003)
@@ -4,7 +4,7 @@
 MENU  ipp.copy.dat
 
-#        field        name           link to         extras
-FIELD    exp_id,      exposure ID,   rawImfile.php,  exp_id=$exp_id
-FIELD    telescope,   Telescope,     telescopes.php
+#        field        name           show     link to         extras
+FIELD    exp_id,      exposure ID,   value,   rawImfile.php,  exp_id=$exp_id
+FIELD    telescope,   Telescope
 FIELD    camera,      Camera
 FIELD    exp_type,    Type    
Index: trunk/ippMonitor/def/rawImfile.d
===================================================================
--- trunk/ippMonitor/def/rawImfile.d	(revision 8984)
+++ trunk/ippMonitor/def/rawImfile.d	(revision 9003)
@@ -7,5 +7,5 @@
 RESTRICT class_id
 
-#        field        name           link to         extras
+#        field        name           show   link to         extras
 FIELD    exp_id,      Exposure ID
 FIELD    class,       Class
Index: trunk/ippMonitor/def/rawScienceExp.d
===================================================================
--- trunk/ippMonitor/def/rawScienceExp.d	(revision 8984)
+++ trunk/ippMonitor/def/rawScienceExp.d	(revision 9003)
@@ -4,7 +4,7 @@
 MENU  ipp.copy.dat
 
-#        field        name           link to         extras
-FIELD    exp_id,      exposure ID,   rawImfile.php,  exp_id=$exp_id,camera=$camera,foo=bar
-FIELD    telescope,   Telescope,     telescopes.php
+#        field        name           show    link to         extras
+FIELD    exp_id,      exposure ID,   value,   rawImfile.php,  exp_id=$exp_id,camera=$camera,foo=bar
+FIELD    telescope,   Telescope,     value,  telescopes.php
 FIELD    camera,      Camera
 FIELD    exp_type,    Type    
Index: trunk/ippMonitor/def/summitExp.d
===================================================================
--- trunk/ippMonitor/def/summitExp.d	(revision 8984)
+++ trunk/ippMonitor/def/summitExp.d	(revision 9003)
@@ -1,11 +1,11 @@
 TABLE summitExp
-TITLE Summit Exposures
+TITLE Pending Summit Exposures
 FILE  summitExp.php
 MENU  ipp.copy.dat
 
-#        field        name           link to         extras
-FIELD    exp_id, 	exposure ID
-FIELD    camera, 	camera
-FIELD    telescope,	telescope
-FIELD    exp_type,	type
-FIELD    uri,		URI
+#        field        name           show    link to         extras
+FIELD    exp_id,      exposure ID
+FIELD    camera,      camera
+FIELD    telescope,   telescope
+FIELD    exp_type,    type
+FIELD    uri,         URI
Index: trunk/ippMonitor/generate
===================================================================
--- trunk/ippMonitor/generate	(revision 8984)
+++ trunk/ippMonitor/generate	(revision 9003)
@@ -39,12 +39,24 @@
 	# list of the table fields
  	if ($key eq "FIELD") {
-	    ($field, $name, $link, $extras) = split (/,\s+/, $value, 4);
+	    ($field, $name, $show, $link, $extras) = split (/,\s+/, $value, 5);
 	    # ($field) = $field =~ m|\s*(\S+)\s*|;
 
-	    if ($VERBOSE) { printf "%-20s %-20s %-20s %-20s\n", $field, $name, $link, $extras; }
+	    if ($VERBOSE) { printf "%-20s %-20s %-20s %-20s %-20s\n", $field, $name, $show, $link, $extras; }
+	    if ($show eq "") {$show = "value";}
 	    push @field,   $field;
 	    push @name,    $name;
+	    push @show,    $show;
 	    push @link,    $link;
 	    push @extras,  $extras;
+	}
+
+	# list of the table fields
+ 	if ($key eq "BODY.HTML") {
+	    push @bodyhtml, $value;
+	}
+
+	# list of the table fields
+ 	if ($key eq "TAIL.HTML") {
+	    push @tailhtml, $value;
 	}
 
@@ -65,7 +77,31 @@
     &check_key ("TITLE", "");
     &check_key ("FILE", "");
+    
+    # these are used internally (not just a replacement)
+    for ($i = 0; $i < @key; $i++) {
+	if ($key[$i] eq "MENU") { $MENU = $value[$i]; }
+    }
 
     # define query string, add to keypairs
     &define_query_fields;
+
+    if (0) {
+	print STDERR "show: $show[0]\n";
+	($a, $b, $c) = &parse_label ($show[0]);
+	print STDERR "a: $a, b: $b, c: $c\n";
+
+	print STDERR "extras: $extras[0]\n";
+	($a, $b, $c) = &parse_label ($extras[0]);
+	print STDERR "a: $a, b: $b, c: $c\n";
+
+	print STDERR "show: $show[1]\n";
+	($a, $b, $c) = &parse_label ($show[1]);
+	print STDERR "a: $a, b: $b, c: $c\n";
+
+	print STDERR "extras: $extras[1]\n";
+	($a, $b, $c) = &parse_label ($extras[1]);
+	print STDERR "a: $a, b: $b, c: $c\n";
+	exit 0;
+    }
 }
 
@@ -102,11 +138,46 @@
 	    &write_table_restrict;
 	}
+
+	# fill in body HTML
+	if ($line =~ m|// \*\* BODY HTML \*\*|) {
+	    &write_body_html;
+	}
+
+	# fill in tail HTML
+	if ($line =~ m|// \*\* TAIL HTML \*\*|) {
+	    &write_tail_html;
+	}
     }
     close (FILE);
 }
 
+sub write_body_html {
+    my ($i);
+
+    if (@bodyhtml == 0) { return; }
+    printf FILE "?>\n";
+    
+    for ($i = 0; $i < @bodyhtml; $i++) {
+	printf FILE "$bodyhtml[$i]\n";
+    }
+    printf FILE "<?\n";
+}
+
+sub write_tail_html {
+    my ($i);
+
+    if (@tailhtml == 0) { return; }
+    printf FILE "?>\n";
+    
+    for ($i = 0; $i < @tailhtml; $i++) {
+	printf FILE "$tailhtml[$i]\n";
+    }
+    printf FILE "<?\n";
+}
+
 sub write_table_header {
 
     for ($i = 0; $i < @field; $i++) {
+	if ($show[$i] eq "none")  { next; }
 	printf FILE "echo \"<th class=\\\"list\\\"> $name[$i] </th>\\n\";\n";
     }
@@ -129,42 +200,45 @@
 
 sub write_table_data {
+    my ($i);
+    my ($label, $value, $string);
 
     for ($i = 0; $i < @field; $i++) {
+	($label, $value, $string) = &parse_label ($show[$i]);
+
 	# create the link variable if this entry should be linked
-	if ($link[$i]) {
+	if ($label eq "none")  { next; }
+
+	if (($label eq "value") && !$link[$i]) { 
+	    # print value without link or image
+	    if (! $value) { $value = "\$row[$i]"; }
+	    print FILE "  echo \"<td class=\\\"list\\\"> $value </td>\\n\";\n";
+	    next;
+	}
+
+	if (($label eq "value") && $link[$i]) {
+	    # create the basic link variable
+	    printf FILE "  \$link = \"$link[$i]\" . \"?menu=$MENU&\" . \$ID['link'];\n";
+	    # add extra GET data to target
+	    if ($extras[$i]) { &parse_extras ($extras[$i]); } 
+	    # print the actual table cell line with the link...
+	    if (! $value) { $value = "\$row[$i]"; }
+	    printf FILE "  echo \"<td class=\\\"list\\\"><a href=\\\"\$link\\\"> $value </a></td>\\n\";\n";
+	    next;
+	}
+
+	if (($label eq "image") && !$link[$i]) {
+	    # print the actual table cell line with the image...
+	    printf FILE "  echo \"<td class=\\\"list\\\"><img src=\\\"$value\\\"></td>\\n\";\n";
+	    next;
+	}
+
+	if (($label eq "image") && $link[$i]) {
 	    # create the basic link 
-	    printf FILE "  \$link = \"$link[$i]\" . \"?\" . \$ID['link'];\n";
-	    if ($extras[$i]) {
-		# examine the extras and parse the embedded fields
-		@extfields = split (/,/, $extras[$i]);
-		$N = @extfields;
-		if ($VERBOSE) { print STDERR "N extfields: $N\n"; }
-		for ($j = 0; $j < @extfields; $j++) {
-
-		    # search for embedded table fields and replace with row[N]
-		    $N = -1;
-		    $extline = $extfields[$j];
-		    if ($VERBOSE) { print STDERR "extfield: $extfields[$j]\n"; }
-		    for ($k = 0; ($k < @field) && ($N == -1); $k++) {
-			if ($extline =~ m|\$$field[$k]|) {
-			    $extline =~ s|\$$field[$k]||;
-			    $N = $k;
-			}
-		    }
-		    if ($N == -1) {
-			# no embedded field, print verbatim
-			printf FILE "  \$link = \$link . \"&$extline\";\n";
-		    } else {
-			# replace embedded field with row[N]
-			printf FILE "  \$link = \$link . \"&$extline\" . \$row[$N];\n";
-		    }
-		}
-
-	    } 
+	    printf FILE "  \$link = \"$link[$i]\" . \"?menu=$MENU&\" . \$ID['link'];\n";
+	    # add extra php data to target
+	    if ($extras[$i]) { &parse_extras ($extras[$i]); } 
 	    # print the actual table cell line with the link...
-	    printf FILE "  echo \"<td class=\\\"list\\\"><a href=\\\"\$link\\\"> \$row[$i] </a></td>\\n\";\n";
-	} else {
-	    # or without
-	    printf FILE "  echo \"<td class=\\\"list\\\"> \$row[$i] </td>\\n\";\n";
+	    printf FILE "  echo \"<td class=\\\"list\\\"><a href=\\\"\$link\\\"> <img src=\\\"$value\\\"> </a></td>\\n\";\n";
+	    next;
 	}
     }
@@ -174,4 +248,5 @@
 
     for ($i = 0; $i < @field; $i++) {
+	if ($show[$i] eq "none")  { next; }
 	printf FILE "echo \"<td class=\\\"list\\\"> <input type=\\\"text\\\" name=\\\"$field[$i]\\\"> </td>\\n\";\n";
     }
@@ -186,4 +261,49 @@
  
     set_keypair ("FIELDS", $FIELDS);
+}
+
+sub parse_extras {
+    my ($extras) = $_[0];
+    my (@extfields);
+    my ($label, $value, $outline);
+    my ($i);
+
+    # examine the extras and parse the embedded fields (comma-separated)
+    @extfields = split (/,/, $extras);
+    for ($i = 0; $i < @extfields; $i++) {
+	($label, $value, $outline) = &parse_label ($extfields[$i]);
+	printf FILE "  \$link = \$link . \"&$outline\";\n";
+    }
+}
+
+# parse strings of the form label=value
+# if 'value' is of the form $field, try to match with 
+# a supplied DB field, and replace with $row[$n] if found
+sub parse_label {
+    my ($string) = $_[0];
+    my ($label, $value, $outline);
+    my ($N, $i);
+
+    # unless we replace the value with the db row element, return the original string
+    $outline = $string;
+    $label = $string;
+    $value = "";
+
+    # search for embedded table fields and replace with row[N]
+    if ($VERBOSE) { print STDERR "string: $string\n"; }
+    if ($string =~ m|\S+=\S+|) {
+	($label, $value) = $string =~ m|(\S+)=(\S+)|;
+	if ($value =~ m|^\$|) {
+	  MATCH_LABEL:
+	    for ($i = 0; $i < @field; $i++) {
+		if ($value =~ m|^\$$field[$i]|) {
+		    $value = "\$row[$i]";
+		    last MATCH_LABEL;
+		}
+	    }
+	    $outline = "$label=$value";
+	} 
+    }
+    return ($label, $value, $outline);
 }
 
Index: trunk/ippMonitor/raw/ipp.copy.dat
===================================================================
--- trunk/ippMonitor/raw/ipp.copy.dat	(revision 8984)
+++ trunk/ippMonitor/raw/ipp.copy.dat	(revision 9003)
@@ -24,6 +24,6 @@
 menutop   | menutop      | plain   | &nbsp;                       | 
 menulink  | menuselect 	 | link    | Summit Exp                   | summitExp.php                         
+menulink  | menuselect 	 | link    | Copy Pending Exp             | pzPendingExp.php              
 menulink  | menuselect 	 | link    | New Exp                      | newExp.php                    
-menulink  | menuselect 	 | link    | Copy Pending Exp             | pzPendingExp.php              
 menulink  | menuselect 	 | link    | Raw Detrend Exp              | rawDetrendExp.php             
 menulink  | menuselect 	 | link    | Raw Science Exp              | rawScienceExp.php             
Index: trunk/ippMonitor/raw/ipp.detrend.dat
===================================================================
--- trunk/ippMonitor/raw/ipp.detrend.dat	(revision 8984)
+++ trunk/ippMonitor/raw/ipp.detrend.dat	(revision 9003)
@@ -25,5 +25,4 @@
 menulink  | menuselect 	 | link    | Det Run                      | detRun.php                    
 menulink  | menuselect 	 | link    | Det Run Summary              | detRunSummary.php             
-menulink  | menuselect 	 | link    | Det Master Frame             | detMasterFrame.php            
 menulink  | menuselect 	 | link    | Det Input Exp                | detInputExp.php                    
 menulink  | menuselect 	 | link    | Det Resid Exp                | detResidExp.php                       
Index: trunk/ippMonitor/raw/ipp.php
===================================================================
--- trunk/ippMonitor/raw/ipp.php	(revision 8984)
+++ trunk/ippMonitor/raw/ipp.php	(revision 9003)
@@ -78,4 +78,5 @@
     $ID['pass'] = $_GET[pass];
     $ID['proj'] = $_GET[proj];
+    $ID['menu'] = $_GET[menu];
     // echo "using GET: ", $ID['pass'], $ID['proj'];
   }
@@ -83,4 +84,5 @@
     $ID['pass'] = $_POST[pass];
     $ID['proj'] = $_POST[proj];
+    $ID['menu'] = $_POST[menu];
     // echo "using POST: ", $ID['pass'], $ID['proj'];
   }
