Index: trunk/gsdl/macros/collect.dm
===================================================================
--- trunk/gsdl/macros/collect.dm	(revision 2396)
+++ trunk/gsdl/macros/collect.dm	(revision 2401)
@@ -169,5 +169,5 @@
 <ul>
 <input type=radio name=p value=new checked>
-create an entirely new collection 
+create a new collection 
 <br>
 <input type=radio name=p value=existing>
@@ -444,58 +444,11 @@
 
 _srcescriptextra_ {
-var cloneval = _cgiargbc1clone_;
+var selectedindex = _selectedindex_;
 
 function check\_submit (gotopage) \{
   var form = document.collectorform;
-  var found = 0;
-  var i = 0;
-  if (!form.bc1inputdir1.value.match(/^\\s*$/)) \{
-    if (!form.bc1inputdir1.value.match(/^\(http|ftp|file\):/)) \{
-      i = form.sel1.selectedIndex;
-      form.bc1inputdir1.value = form.sel1.options[i].value + form.bc1inputdir1.value;
-    \}
-    found = 1;
-  \}
-  if (!form.bc1inputdir2.value.match(/^\\s*$/)) \{
-    if (!form.bc1inputdir2.value.match(/^\(http|ftp|file\):/)) \{
-      i = form.sel2.selectedIndex;
-      form.bc1inputdir2.value = form.sel2.options[i].value + form.bc1inputdir2.value;
-    \}
-    found = 1;
-  \}
-  if (!form.bc1inputdir3.value.match(/^\\s*$/)) \{
-    if (!form.bc1inputdir3.value.match(/^\(http|ftp|file\):/)) \{
-      i = form.sel3.selectedIndex;
-      form.bc1inputdir3.value = form.sel3.options[i].value + form.bc1inputdir3.value;
-    \}
-    found = 1;
-  \}
-  if (!form.bc1inputdir4.value.match(/^\\s*$/)) \{
-    if (!form.bc1inputdir4.value.match(/^\(http|ftp|file\):/)) \{
-      i = form.sel4.selectedIndex;
-      form.bc1inputdir4.value = form.sel4.options[i].value + form.bc1inputdir4.value;
-    \}
-    found = 1;
-  \}
-
-  if (!found)
-  \{
-    alert("At least one input source must be specified");
-    form.bc1inputdir1.focus();
-    return;
-  \}
-
   form.p.value = gotopage;
+  form.bc1fromsrce.value = "1";
   form.submit();
-\}
-
-function clone\_changed (changedto) \{
-  var form = document.collectorform;
-  if (changedto != cloneval) \{
-    form.bc1clonechanged.value = 1;
-  \} else \{
-    form.bc1clonechanged.value = 0;
-  \}
-  menuchange();
 \}
 
@@ -510,4 +463,29 @@
            "work properly.");
   \}
+
+  if (form.bc1clonecol.selectedIndex == 0) \{
+    form.bc1clone.value = "0";
+  \} else \{
+    form.bc1clone.value = "1";
+  \}
+
+  if (form.bc1clonecol.selectedIndex == selectedindex) \{
+    form.bc1clonechanged.value = "0";
+  \} else \{
+    form.bc1clonechanged.value = "1";
+  \}
+\}
+
+function more (type) \{
+  var form = document.collectorform;
+  if (type == "file") \{
+    form.bc1filenum.value = form.bc1filenum.value * 2;
+  \} else if (type == "http") \{
+    form.bc1httpnum.value = form.bc1httpnum.value * 2;
+  \} else if (type == "ftp") \{
+    form.bc1ftpnum.value = form.bc1ftpnum.value * 2;
+  \}
+  form.p.value = "srce";
+  form.submit();
 \}
 }
@@ -518,18 +496,26 @@
 </center>
 <p>_iconblankbar_
-
-<p>You can either create a completely new collection, or "clone" an existing one
--- that is, base the structure of your new collection on one that exists already.
-<ul>
-<input type=radio onClick="clone_changed(0);" name=bc1clone value=0
-_If_("_cgiargbc1clone_" eq "0",checked)><b>Create new collection</b>
-<br><font color="#909090">
-Create a completely new collection. The collection may contain html documents (.htm, .html), plain text
-documents (.txt, .text), or email documents (.email).
-</font>
-</ul>
-<ul>_If_("_fullnamemenu_" eq "",
-No collections available for cloning.,_srcemenu_)
-</ul>
+_If_("_badsources_" eq "1",_srcebadsources_,_srcenewcontent_)
+}
+
+_srcebadsources_ {
+<p>One or more of the input sources you specified is unavailable.
+}
+
+_srcenewcontent_ {
+<p>Either use the default structure for your new collection, or base its
+structure on a collection that exists already.
+
+<p>If you use the default structure, the new collection may contain html
+documents (.htm, .html), plain text documents (.txt, .text), MS Word
+documents (.doc), PDF documents (.pdf) or email documents (.email).
+
+<p>If you base the structure on an existing collection, the files in your
+new collection must be exactly the same type as those used to build the
+existing one.
+
+<p>Base the collection on
+_fullnamemenu_
+<p>_iconblankbar_
 }
 
@@ -550,7 +536,10 @@
 <input type=hidden name="e" value="_decodedcompressedoptions_">
 <input type=hidden name="p" value="_cgiargp_">
+<input type=hidden name="bc1fromsrce" value="0">
 <input type=hidden name="bc1clonechanged" value="0">
-<input type=hidden name="bc1aboutdesc" value="_cgiargbc1aboutdesc_">
-<input type=hidden name="bc1contactemail" value="_cgiargbc1contactemail_">
+<input type=hidden name="bc1clone" value="_cgiargbc1clone_">
+<input type=hidden name="bc1filenum" value="_cgiargbc1filenum_">
+<input type=hidden name="bc1httpnum" value="_cgiargbc1httpnum_">
+<input type=hidden name="bc1ftpnum" value="_cgiargbc1ftpnum_">
 
 <center>
@@ -561,28 +550,31 @@
 
 <h4>Input source:</h4>
-<nobr>_typeselect_(1,file)<input type=text name="bc1inputdir1" value="_cgiargbc1inputdir1_" size=60></nobr>
-<br>
-<nobr>_typeselect_(2,http)<input type=text name="bc1inputdir2" value="_cgiargbc1inputdir2_" size=60></nobr>
-<br>
-<nobr>_typeselect_(3,ftp)<input type=text name="bc1inputdir3" value="_cgiargbc1inputdir3_" size=60></nobr>
-<br>
-<nobr>_typeselect_(4,file)<input type=text name="bc1inputdir4" value="_cgiargbc1inputdir4_" size=60></nobr>
-<br>
-<font color="#909090">
-These specify where the source data is located.  There are three kinds of
-location:
-<ul>
-<li> a directory name on your computer system (beginning with "file://"),
-<li> an address beginning with "http://" for files to be downloaded from the
-Web,
-<li> an address beginning with "ftp://" for files to be downloaded using FTP
-(file transfer protocol).
-</ul>
-In each case, the collection will include all files of the appropriate type in
-the specified directory, in any directories it contains, in any directories
-they contain, and so on.  
-<p>You can specify up to four different input sources.  If you specify a
-filename, just that file will be included.
-</font>
+
+<table border=0>
+<tr valign=top><td><b>file://</b></td>
+<td>_filelist_</td>
+</tr>
+<tr valign=top><td><b>http://</b></td>
+<td>_httplist_</td>
+</tr>
+<tr valign=top><td><b>ftp://</b></td>
+<td>_ftplist_</td>
+</tr></table>
+
+<p>If you use file:// or ftp:// to specify a file, that file will be
+downloaded.
+
+<p>If you use http:// it depends on whether the URL gives you a normal web
+page in your browser, or a list of files.  If a page, that page will be
+downloaded -- and so will all pages it links to, and all pages they link
+to, etc. -- provided they reside on the same site, below the URL.
+
+<p>If you use file:// or ftp:// to specify a folder or directory, or give a
+http:// URL that leads to a list of files, everything in the folder and all
+its sub-folders will be included in the collection.
+
+<p>You can specify sources of more than one type.  To specify several
+sources of the same type, just click the &quot;more&quot; button to get
+more input boxes.
 
 <p>_iconblankbar_
@@ -600,20 +592,4 @@
 
 </form>
-}
-
-_typeselect_ {<select name="sel_1_">
-<option value="file://" _If_("_2_" eq "file",selected)>file://
-<option value="http://" _If_("_2_" eq "http",selected)>http://
-<option value="ftp://" _If_("_2_" eq "ftp",selected)>ftp://
-</select>}
-
-_srcemenu_ {<input type=radio name=bc1clone onClick="clone_changed(1);" value=1 
-_If_("_cgiargbc1clone_" eq "1",checked)><b>Clone existing collection</b>
-<br>_fullnamemenu_<br>
-<font color=#909090>
-This pull-down menu specifies which collection you want to clone.  The files in
-your new collection must be exactly the same type as those used to build
-the existing one.
-</font>
 }
 
@@ -644,6 +620,4 @@
 <input type=hidden name="p" value="_cgiargp_">
 <input type=hidden name="bc1cfgchanged" value="_cgiargbc1cfgchanged_">
-<input type=hidden name="bc1aboutdesc" value="_cgiargbc1aboutdesc_">
-<input type=hidden name="bc1contactemail" value="_cgiargbc1contactemail_">
 
 <center>
@@ -702,11 +676,9 @@
 // -->
 </script>
+</head>
+
 <form name="collectorform" method=post action="_gwcgi_">
 <input type=hidden name="e" value="_decodedcompressedoptions_">
 <input type=hidden name="p" value="_cgiargp_">
-<input type=hidden name="bc1aboutdesc" value="_cgiargbc1aboutdesc_">
-<input type=hidden name="bc1contactemail" value="_cgiargbc1contactemail_">
-
-</head>
 
 <frameset rows="*,160" border=0>
@@ -764,6 +736,4 @@
 <input type=hidden name="e" value="_decodedcompressedoptions_">
 <input type=hidden name="p" value="bildcancel">
-<input type=hidden name="bc1aboutdesc" value="_cgiargbc1aboutdesc_">
-<input type=hidden name="bc1contactemail" value="_cgiargbc1contactemail_">
 
 <center>
@@ -813,6 +783,4 @@
 <input type=hidden name="e" value="_decodedcompressedoptions_">
 <input type=hidden name="p" value="_cgiargp_">
-<input type=hidden name="bc1aboutdesc" value="_cgiargbc1aboutdesc_">
-<input type=hidden name="bc1contactemail" value="_cgiargbc1contactemail_">
 
 </form>
@@ -870,6 +838,4 @@
 <form name="collectorform" method=post action="_gwcgi_">
 <input type=hidden name="e" value="_decodedcompressedoptions_">
-<input type=hidden name="bc1aboutdesc" value="_cgiargbc1aboutdesc_">
-<input type=hidden name="bc1contactemail" value="_cgiargbc1contactemail_">
 
 <center>
@@ -924,6 +890,4 @@
 <input type=hidden name="e" value="_decodedcompressedoptions_">
 <input type=hidden name="p" value="_cgiargp_">
-<input type=hidden name="bc1aboutdesc" value="_cgiargbc1aboutdesc_">
-<input type=hidden name="bc1contactemail" value="_cgiargbc1contactemail_">
 
 </form>
@@ -959,6 +923,4 @@
 <form name="collectorform" method=post action="_gwcgi_">
 <input type=hidden name="e" value="_decodedcompressedoptions_">
-<input type=hidden name="bc1aboutdesc" value="_cgiargbc1aboutdesc_">
-<input type=hidden name="bc1contactemail" value="_cgiargbc1contactemail_">
 
 <center>
