Index: /gs3-extensions/html-to-expeditee/trunk/src/perllib/CssStyleToExpAttr.pm
===================================================================
--- /gs3-extensions/html-to-expeditee/trunk/src/perllib/CssStyleToExpAttr.pm	(revision 24943)
+++ /gs3-extensions/html-to-expeditee/trunk/src/perllib/CssStyleToExpAttr.pm	(revision 24944)
@@ -357,4 +357,31 @@
     return $exp_font_size;
 }
+
+
+sub convert_color
+{
+    my ($css_color) = @_;
+
+    my $exp_color;
+
+    if ($css_color =~ m/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/) {
+
+	my $r = int(100*$1/255);
+	my $g = int(100*$2/255);
+	my $b = int(100*$3/255);
+
+	print STDERR "*** r = $r, g = $g, b = $b\n";
+
+	$exp_color = "$r $g $b";
+
+	print STDERR "*** exp color = $exp_color\n";
+
+    }
+    elsif ($css_color =~ m/^transparent/i) {
+	$exp_color = undef;
+    }
+
+    return $exp_color;
+}
     
 1;
Index: /gs3-extensions/html-to-expeditee/trunk/src/perllib/ExpediteeFrameIO.pm
===================================================================
--- /gs3-extensions/html-to-expeditee/trunk/src/perllib/ExpediteeFrameIO.pm	(revision 24943)
+++ /gs3-extensions/html-to-expeditee/trunk/src/perllib/ExpediteeFrameIO.pm	(revision 24944)
@@ -74,8 +74,4 @@
     my $exp_attr = {};
 
-    if (defined $css_attr->{'background-color'}) {
-	$exp_attr->{'e'} = $css_attr->{'background-color'};
-    }
-
     # load up some defaults for font information
     my $exp_font_family = "s"; # t
@@ -97,4 +93,15 @@
 
 #    $exp_attr->{'f'} = $exp_font_family.$exp_font_face.$exp_font_size;
+
+    # background color
+
+
+    if (defined $css_attr->{'background-color'}) {
+	my $css_color = $css_attr->{'background-color'};
+
+	my $exp_color = CssStyleToExpAttr::convert_color($css_color);
+
+	$exp_attr->{'e'} = $exp_color;
+    }
 
     return $exp_attr;
@@ -447,5 +454,5 @@
 
 	    my $img_url = $html_node->{'img'};
-	    $img_url =~ s/^http:\/\/www\.nzdl\.org\/greenstone3-showcase\///;
+	    $img_url =~ s/^http:\/\/(.*?)\/greenstone3(.*?)\///;
 	    if ($img_url =~ m/^interfaces\//) {
 		$img_url = "images/$img_url";
Index: /gs3-extensions/html-to-expeditee/trunk/src/src/cgi-bin/html-to-expeditee.pl.in
===================================================================
--- /gs3-extensions/html-to-expeditee/trunk/src/src/cgi-bin/html-to-expeditee.pl.in	(revision 24943)
+++ /gs3-extensions/html-to-expeditee/trunk/src/src/cgi-bin/html-to-expeditee.pl.in	(revision 24944)
@@ -108,5 +108,8 @@
 	      docOIDs = [];
 	      var outstandingURLs = [];
+	      var visitedURLs = {};
+
 	      outstandingURLs.push(url);
+	      visitedURLs[url] = 1;
 
 	      while (outstandingURLs.length>0) {
@@ -121,9 +124,9 @@
 		  
 		  
-		  /* any links with a=d ... cl=??? => outstandingURLS */
+		  /* any links with a=(b|d) ... cl=??? => outstandingURLS */
 		  /* any links with a=d ... d=???  => docOIDS */
 	      
 		  var actionRE = new RegExp("(\\\\?|&)a=(?:d|b)(&|\$)");
-		  var clRE     = new RegExp("(\\\\?|&)cl=" + cl + "\\\\.");
+		  var clRE     = new RegExp("(\\\\?|&)cl=" + cl + "(\\\\.\\\\d+)+(&|\$)");
 		  var docRE    = new RegExp("(?:\\\\?|&)d=(.*?)(?:&|\$)");
 
@@ -133,5 +136,9 @@
 		      if (href && href.match(actionRE)) {
 			  if (href.match(clRE)) {
-			      outstandingURLs.push(href);
+			      if (!visitedURLs[href]) {	     
+			          // console.log("found a new CL line: " + href);
+			          outstandingURLs.push(href);
+				  visitedURLs[href] = 1;
+			      } 
 			  }
 			  else if (href.match(docRE)) {
@@ -139,4 +146,6 @@
 			      var docMatch = docRE.exec(href);
 			      var docOID = docMatch[1];
+
+			      // console.log("found a new doc line: " + docOID);
 
 			      docOIDs.push(docOID);
@@ -151,5 +160,5 @@
 
 	      var docOID = docOIDs.shift();
-	      console.log("doc oid = " + docOID);
+	      //console.log("doc oid = " + docOID);
 	      
 	      var url;
Index: /gs3-extensions/html-to-expeditee/trunk/src/src/js/html-to-expeditee.js
===================================================================
--- /gs3-extensions/html-to-expeditee/trunk/src/src/js/html-to-expeditee.js	(revision 24943)
+++ /gs3-extensions/html-to-expeditee/trunk/src/src/js/html-to-expeditee.js	(revision 24944)
@@ -171,4 +171,6 @@
 	    style["background-color"] = getStyle(node,"background-color");
 
+	    // console.log("background color = " + style["background-color"]);
+
 	    // console.log("font size = " + style["font-size"]);
  
