Index: /trunk/protemix/etc/collect.cfg
===================================================================
--- /trunk/protemix/etc/collect.cfg	(revision 3185)
+++ /trunk/protemix/etc/collect.cfg	(revision 3186)
@@ -3,13 +3,20 @@
 public        true
 
-buildtype     mgpp
-indexes       text,metadata
-levels        Section
-defaultindex  text,metadata
+#buildtype     mgpp
+#indexes       text,metadata
+#levels        Section
+#defaultindex  text,metadata
 
-collectionmeta .text,metadata    "all"
+#collectionmeta .text,metadata    "all"
+
+indexes section:text
+defaultindex section:text
 
 plugin        GAPlug
 plugin        ProtemixPlug
+plugin        HTMLPlug
+plugin        PDFPlug
+plugin        RTFPlug
+plugin        WordPlug
 plugin        ArcPlug
 plugin        RecPlug
@@ -21,8 +28,8 @@
 
 format CL1VList \
-  '<p>[Title]<br><small>\[ [link]text</a> \]\[ <a href="_httpcollection_/index/assoc/[archivedir]/[pdf]">pdf</a> \]</small></p>'
+  '<p>[Title]<br><small>\[ [link]text</a> \]{If}{[pdf],\\[ <a href="_httpcollection_/index/assoc/[archivedir]/[pdf]">pdf</a> \\]}</small></p>'
 
 format SearchVList \
-  '<p>{If}{[parent:Title],[parent:Title] <small><i>(page [Title])</i>,[Title]}<br>\[ [link]text</a> \]\[ <a href="_httpcollection_/index/assoc/[parent:archivedir]/[pdf]">page</a> \]\[ <a href="_httpcollection_/index/assoc/[parent:archivedir]/[parent:pdf]">article</a> \]</small></p>'
+  '<p>{If}{[parent:Title],[parent:Title] <small><i>(page [Title])</i></small>,[Title]}<br><small>\[ [link]text</a> \]{If}{[pdf],\\[ <a href="_httpcollection_/index/assoc/[parent:archivedir]/[pdf]">page</a> \\]\\[ <a href="_httpcollection_/index/assoc/[parent:archivedir]/[parent:pdf]">article</a> \\]}</small></p>'
 
 collectionmeta collectionname      "Protemix FDA Submission"
Index: /trunk/protemix/macros/base.dm
===================================================================
--- /trunk/protemix/macros/base.dm	(revision 3185)
+++ /trunk/protemix/macros/base.dm	(revision 3186)
@@ -124,4 +124,6 @@
 #######################################################################
 
+_httppagesubdocs_ {_httppagex_(subdocs)}
+
 _httpcollimg_ {_httpcollection_/index/assoc}
 _httpdocimg_ {_httpcollimg_/_thisOID_}
@@ -145,5 +147,5 @@
 _httpbuild_ {_gwcgi_?e=_compressedoptions_&a=bc}
 
-_httpiconchalk_ {_httpcollection_/images/bottombgnd.gif}
+_httpiconchalk_ {_httpcollection_/images/bg.gif}
 _widthchalk_ {2000}
 _heightchalk_ {10}
@@ -261,5 +263,5 @@
 src="_httpiconttitlgr_" width=_widthttitlx_ border=0>}
 
-_iconblankbar_ {<center><img src="_httpcollection_/images/bar.gif"></center>}
+_iconblankbar_ {<center><img src="_httpcollection_/images/bar2.gif"></center>}
 
 _icontext_ {<img border=0 align=absmiddle src="_httpiconitext_" width=_widthitext_ height=_heightitext_ alt="_texticontext_">}
Index: /trunk/protemix/macros/style.dm
===================================================================
--- /trunk/protemix/macros/style.dm	(revision 3185)
+++ /trunk/protemix/macros/style.dm	(revision 3186)
@@ -87,10 +87,8 @@
 
 <tr valign="top">
-<td><table border="0" cellpadding="0" cellspacing="0" width="638">
+<td><center><table border="0" cellpadding="0" cellspacing="0" width="100%">
 <tr valign="top">
 
-<td><img name="greydot1" src="_httpcollection_/images/greydot1.gif" width="26" height="11" border="0"></td>
-
-<td>
+<td align="center" width="25%">
 <a href="_httpquery_"
 onMouseOut="MM_nbGroup('out');"
@@ -100,7 +98,5 @@
 </td>
 
-<td><img name="greydot2" src="_httpcollection_/images/greydot2.gif" width="96" height="11" border="0"></td>
-
-<td>
+<td align="center" width="25%">
 <a href="_httpdocument_&cl=CL1"
 onMouseOut="MM_nbGroup('out');"
@@ -110,18 +106,22 @@
 </td>
 
-<td><img name="greydot4" src="_httpcollection_/images/greydot2.gif" width="96" height="11" border="0"></td>
-
-<td>
+<td align="center" width="25%">
 <a href="_httpdocument_&cl=CL2"
 onMouseOut="MM_nbGroup('out');"
-onMouseOver="MM_nbGroup('over','phrases','_httpcollection_/images/phraseon.gif','_httpcollection_/images/phrase.gif',1);"
+onMouseOver="MM_nbGroup('over','phrases','_httpcollection_/images/phraseon.gif','_httpcollection_/images/phraseon.gif',1);"
 onClick="MM_nbGroup('down','navbar1','phrases','_httpcollection_/images/phraseon.gif',1);"><img
 name="phrases" src="_httpcollection_/images/phraseoff.gif" width="52" height="11" border="0" alt="phrase browser"></a>
 </td>
 
-<td><img name="greydot5" src="_httpcollection_/images/greydot5.gif" width="25" height="11" border="0"></td>
+<td align="center" width="25%">
+<a href="_httppagesubdocs_"
+onMouseOut="MM_nbGroup('out');"
+onMouseOver="MM_nbGroup('over','subdocs','_httpcollection_/images/sdocson.gif','_httpcollection_/images/sdocson.gif',1);"
+onClick="MM_nbGroup('down','navbar1','subdocs','_httpcollection_/images/sdocson.gif',1);"><img
+name="subdocs" src="_httpcollection_/images/sdocsoff.gif" width="110" height="11" border="0" alt="view submission documents"></a>
+</td>
 
 </tr>
-</table></td>
+</table></center></td>
 </tr>
 </table>
Index: /trunk/protemix/macros/subdocs.dm
===================================================================
--- /trunk/protemix/macros/subdocs.dm	(revision 3186)
+++ /trunk/protemix/macros/subdocs.dm	(revision 3186)
@@ -0,0 +1,17 @@
+package subdocs
+
+_content_ {
+<br>
+<p>
+<center>
+<img src="_httpcollection_/images/subdochead.gif">
+</center>
+</p>
+
+<p><a href="_httpcollection_/docs/IB/HTML/IB%20HTML.htm">Investigators Brocure</a>
+<br><a href="_httpcollection_/docs/IB/DOC/IB_vs3.9_31May02.doc">Investigators Brocure (Word document)</a></p>
+
+<p><a href="_httpcollection_/docs/Protocol/HTML/Protocol%20HTML.htm">Protocol</a>
+<br><a href="_httpcollection_/docs/Protocol/DOC/Prot005-31May02.doc">Protocol (Word document)</a></p>
+
+}
Index: /trunk/protemix/perllib/plugins/ProtemixPlug.pm
===================================================================
--- /trunk/protemix/perllib/plugins/ProtemixPlug.pm	(revision 3185)
+++ /trunk/protemix/perllib/plugins/ProtemixPlug.pm	(revision 3186)
@@ -58,5 +58,6 @@
     $filename = &util::filename_cat ($base_dir, $file) if $base_dir =~ /\w/;
 
-    return 0 if $filename =~ /\.(pdf|html?|jpe?g)$/i;
+    my $basename = File::Basename::basename($filename);
+    return 0 if $basename =~ /^\d+(-(all|\d+))?\.(html?|pdf)/;
     return undef unless $filename =~ /meta\.xml$/;
     
@@ -76,4 +77,8 @@
 
     my $dir = File::Basename::dirname($filename);
+
+    my $outhandle = $self->{'outhandle'};
+    print $outhandle "ProtemixPlug: processing $dir\n";
+
 
     # associate article level pdf file
Index: /trunk/protemix/src/recpt/browsetools.cpp
===================================================================
--- /trunk/protemix/src/recpt/browsetools.cpp	(revision 3185)
+++ /trunk/protemix/src/recpt/browsetools.cpp	(revision 3186)
@@ -33,11 +33,20 @@
 
 void output_controls (cgiargsclass &args, const text_tarray &ibuttons,
-		      recptproto * /*collectproto*/, displayclass &disp, 
+		      recptproto *collectproto, displayclass &disp, 
 		      outconvertclass &outconvert, ostream &textout, 
-		      ostream &/*logout*/) {
-
+		      ostream &logout) {
+
+  FilterResponse_t response;
+  text_tset metadata;
+  metadata.insert("pdf");
+
+  if (!get_info (args["d"], args["c"], metadata, false, collectproto, response, logout)) return;
+
+  if (!response.docInfo[0].metadata["pdf"].values[0].empty()) {
+    textout << outconvert << disp
+	    << "_document:imagepagepdf_"
+	    << "_document:imagearticlepdf_";
+  }
   textout << outconvert << disp
-	  << "_document:imagepagepdf_"
-	  << "_document:imagearticlepdf_"
 	  << "_document:imagedetach_";
   if (args["hl"] == "1") {
