Index: /trunk/gsdl/src/recpt/documentaction.cpp
===================================================================
--- /trunk/gsdl/src/recpt/documentaction.cpp	(revision 10872)
+++ /trunk/gsdl/src/recpt/documentaction.cpp	(revision 10873)
@@ -380,19 +380,18 @@
 
    if (!use_pulldown) {
-      navigationbar += "<nobr>\n";
+
+      navigationbar += "_navtabsearch_";
       if (has_search_button) {
 	 if (args["a"] == "q") {
-	    navigationbar += "_icontabsearchgreen_";
-	 } else {
-	    navigationbar += "_imagesearch_";
+	    navigationbar += "(selected)";
 	 }
       }
   
-      if (has_search_button || numc == 0) navigationbar += "_imagespacer_";
+      if (has_search_button || numc == 0) navigationbar += "_navbarspacer_";
   
       bool first = true;
       while (dochere != docend) {
 	date_extra = g_EmptyText;
-	 if (!first) navigationbar += "_imagespacer_";
+	 if (!first) navigationbar += "_navbarspacer_";
 	 
 	 text_t title = (*dochere).metadata["Title"].values[0];
@@ -402,37 +401,59 @@
 	     date_meta = "Date";
 	   }
-	   date_extra = "&dm="+date_meta;
+	   date_extra = "&amp;dm="+date_meta;
 	 }
 	 bool unknown = false;
 	 
-	 // test the _XXXwidth_ macro to see if image macros are
-	 // defined for this type of classification - if not we'll
-	 // just display the text
+	 // test if the _tabtext$FIELD_ macro is defined, which means
+	 // this is a "known" metadata type and we have a translation for it
 	 text_t tmpwidth;
-	 disp.expandstring ("document", "_" + title + "width_", tmpwidth);
-	 if (tmpwidth == ("_" + title + "width_")) unknown = true;
+	 text_t macroname="_tabtext" + title + "_";
+	 disp.expandstring ("document", macroname, tmpwidth);
+	 if (tmpwidth == macroname) // it wasn't expanded
+	   unknown = true;
 	 
 	 // if we're inside a document all the classification buttons should be enabled
-	 if (arg_d.empty() && ((*dochere).OID == topparent)) {
-	    if (unknown) navigationbar += " " + title + " ";
-	    else navigationbar += "_icontab" + title + "green_";
-	 } else {
-	    
-	    // set the _httpbrowseXXX_ macro for this classification
-	    if (unknown) navigationbar += " <a href=\"_httpdocument_&cl=" + 
-			    (*dochere).OID + date_extra+"\">" + title + "</a> ";
-	    else {
-	       navigationbar += "_image" + title + "_";
-	       disp.setmacro ("httpbrowse" + title, displayclass::defaultpackage, "_httpdocument_&cl=" + (*dochere).OID+date_extra);
-	    }
+	 text_t this_tab;
+	 bool is_top;
+
+	 is_top = ((*dochere).OID == topparent);
+
+	 // set default text fragment
+	 this_tab = "_navtab_(";
+
+	 if (unknown) { // just give the field name
+	   if (!is_top) {
+	     // work out the link for this classifier, as it isn't the
+	     // current page
+	     this_tab += "_httpdocument_&amp;cl=" + (*dochere).OID
+	       + date_extra;
+	   }
+	   this_tab += "," + title + ",";
+	 } else { // use the macro for this field so we get translations
+	   this_tab += "_httpbrowse" + title;
+	   this_tab += "_,_tabtext" + title;
+	   this_tab += "_,_textdescr" + title + "_";
 	 }
+
+	 if (arg_d.empty() && is_top) {
+	   // don't link to this classifier as it is the current one
+	   this_tab += ",selected";
+	 } else if (!unknown) {
+	   // set the _httpbrowseXXX_ macro for this classification
+	   // set the correct url for this link
+	   disp.setmacro ("httpbrowse" + title, displayclass::defaultpackage, "_httpdocument_&amp;cl=" + (*dochere).OID+date_extra);
+	 }
+
+	 this_tab += ")";
+
+	 navigationbar += this_tab;
+
 	 ++dochere;
 	 first = false;
       }
 
-      if (!has_search_button && numc == 1) navigationbar += "_imagespacer_";
-
-      navigationbar += "\n</nobr>\n";
-      navigationbar += "<!-- End of Navigation Bar -->\n";
+      if (!has_search_button && numc == 1) navigationbar += "_navbarspacer_";
+
+      navigationbar += "\n<!-- End of Navigation Bar -->\n";
 
    } else {
@@ -451,5 +472,5 @@
 	    navigationbar += " selected";
 	 }
-	 navigationbar += ">_texticontabsearchgreen_</option>\n";
+	 navigationbar += ">_tabtextsearch_</option>\n";
       }
 
@@ -461,8 +482,8 @@
 	     date_meta = "Date";
 	   }
-	   date_extra = "&dm="+date_meta;
+	   date_extra = "&amp;dm="+date_meta;
 	 }
 
-	 navigationbar += "<option value=\"_httpdocument_&cl=" + dochere->OID +date_extra+ "\"";
+	 navigationbar += "<option value=\"_httpdocument_&amp;cl=" + dochere->OID +date_extra+ "\"";
 	 if (topparent == dochere->OID) {
 	    navigationbar += " selected";
@@ -505,5 +526,4 @@
   // _httppagehome_      overridden home url if html collections have own homepage
 
-  // _usability_         a macro for remote usability reporting
 
   // must have a valid collection server to continue
@@ -549,5 +569,5 @@
       text_t httpdocument;
       disp.expandstring (displayclass::defaultpackage, "_httpdocument_", httpdocument);
-      httpdocument += "&f=1";
+      httpdocument += "&amp;f=1";
       disp.setmacro ("httpdocument", displayclass::defaultpackage, httpdocument);
       disp.setmacro ("gsdltop", displayclass::defaultpackage, "documenttop");
@@ -592,10 +612,4 @@
     }
   }
-  text_tmap::iterator usability = cinfo.format.find("Usability");
-  if(usability!=cinfo.format.end()){
-    disp.setmacro("usability",displayclass::defaultpackage,"_imageusab_");
-    disp.setmacro("usabinterface",displayclass::defaultpackage,("_usab"+(*usability).second+"_"));
-    disp.setmacro("usabilityscript", displayclass::defaultpackage, "_usabshowscript_");
-  }
 }
 
@@ -612,5 +626,5 @@
   if (get_info (inlink, args["c"], args["l"], metadata, false, collectproto, response, logout)) {
     if (!response.docInfo[0].metadata["section"].values[0].empty()) {
-      outlink = "_httpdocument_&d=" + response.docInfo[0].metadata["section"].values[0];
+      outlink = "_httpdocument_&amp;d=" + response.docInfo[0].metadata["section"].values[0];
       return true;
     }
@@ -635,5 +649,5 @@
       if (get_info (inlink, *col_here, args["l"], metadata, false, collectproto, response, logout)) {
 	if (!response.docInfo[0].metadata["section"].values[0].empty()) {
-	  outlink = "_httpdocument_&c=" + *col_here + "&d=" +
+	  outlink = "_httpdocument_&amp;c=" + *col_here + "&amp;d=" +
 	    response.docInfo[0].metadata["section"].values[0];
 	  return true;
@@ -869,10 +883,11 @@
 	bool unknown = false;
 
-	// test the _XXXwidth_ macro to see if image macros are
+	// test the _iconXXXpage_ macro to see if image macros are
 	// defined for this type of classification - if not we'll
 	// just display the text
 	text_t tmp;
-	disp.expandstring ("document", "_" + title + "width_", tmp);
-	if (tmp == ("_" + title + "width_")) unknown = true;
+	text_t macroname="_icon" + title + "page_";
+	disp.expandstring ("document", macroname, tmp);
+	if (tmp == macroname) unknown = true; // it wasn't expanded
 
 	if (unknown) {
@@ -1278,6 +1293,6 @@
   // work out values for next link
   if (haschildren) {
-    disp.setmacro ("httpnextarrow", "document", "_httpdocument_&cl=" + args["cl"] +
-		   "&d=" + arg_d + ".fc");
+    disp.setmacro ("httpnextarrow", "document", "_httpdocument_&amp;cl=" + args["cl"] +
+		   "&amp;d=" + arg_d + ".fc");
   } else {
     text_tarray::const_iterator h = next_siblings.begin();
@@ -1285,6 +1300,6 @@
     while (h != e) {
       if (!(*h).empty()) {
-	disp.setmacro ("httpnextarrow", "document", "_httpdocument_&cl=" + args["cl"] +
-		       "&d=" + *h);
+	disp.setmacro ("httpnextarrow", "document", "_httpdocument_&amp;cl=" + args["cl"] +
+		       "&amp;d=" + *h);
 	break;
       }
@@ -1295,10 +1310,10 @@
   // work out value for previous link
   if (!previous_sibling.empty()) {
-    disp.setmacro ("httpprevarrow", "document", "_httpdocument_&cl=" + args["cl"] +
-		   "&d=" + previous_sibling);
+    disp.setmacro ("httpprevarrow", "document", "_httpdocument_&amp;cl=" + args["cl"] +
+		   "&amp;d=" + previous_sibling);
   } else {
     if (countchar(arg_d.begin(), arg_d.end(), '.')) {
-      disp.setmacro ("httpprevarrow", "document", "_httpdocument_&cl=" + args["cl"] +
-		     "&d=" + get_parent(arg_d));
+      disp.setmacro ("httpprevarrow", "document", "_httpdocument_&amp;cl=" + args["cl"] +
+		     "&amp;d=" + get_parent(arg_d));
     }
   }
Index: /trunk/gsdl/src/recpt/hlistbrowserclass.cpp
===================================================================
--- /trunk/gsdl/src/recpt/hlistbrowserclass.cpp	(revision 10872)
+++ /trunk/gsdl/src/recpt/hlistbrowserclass.cpp	(revision 10873)
@@ -133,11 +133,11 @@
       link = "<a href=\"_httpdocument_";
       if (doctype == "classify") 
-	link += "&cl=" + (*tsibling).OID + "\">";
+	link += "&amp;cl=" + (*tsibling).OID + "\">";
       else {
-	link += "&cl=" + arg_cl + "&d=" + (*tsibling).OID;// + "\">";
+	link += "&amp;cl=" + arg_cl + "&amp;d=" + (*tsibling).OID;// + "\">";
 	// [modification to allow default document detach settings -- kjdon]
 	if (args["xx"]=="1") {
 	  // documents should be detached
-	  link += "&x=1\" target=\\_blank>";
+	  link += "&amp;x=1\" target=\\_blank>";
 	} else {
 	  link += "\">";
Index: /trunk/gsdl/src/recpt/pageaction.cpp
===================================================================
--- /trunk/gsdl/src/recpt/pageaction.cpp	(revision 10872)
+++ /trunk/gsdl/src/recpt/pageaction.cpp	(revision 10873)
@@ -177,5 +177,5 @@
 	    if (cinfo->isPublic && (cinfo->buildDate > 0)) {
 
-	      text_t coll_type = "&ct=";
+	      text_t coll_type = "&amp;ct=";
 	      if ((cinfo->buildType == "mgpp") || (cinfo->buildType == "lucene")) {
 
@@ -187,5 +187,5 @@
 		}
 
-		coll_type += "&qto=";
+		coll_type += "&amp;qto=";
 
 		// now we also want to check search types to set the qto arg 
@@ -210,5 +210,5 @@
 		    type_here = cinfo->searchTypes.begin();
 		    if (*type_here == "form") { 
-		      coll_type += "&qt=1"; // set the default to form
+		      coll_type += "&amp;qt=1"; // set the default to form
 		    }
 		  }
@@ -227,8 +227,8 @@
 	      text_t optsite = g_EmptyText;
 	      text_t site_name = (*rprotolist_here).p->get_site_name (err);
-	      if (!site_name.empty()) { optsite = "site="+site_name+"&"; }
-	      
-	      text_t link = "_gwcgi_?"+optsite+"a=p&p=about&c=" + *collist_here + coll_type;
-	      link += "&l=" + args["l"] + "&w=" + args["w"];
+	      if (!site_name.empty()) { optsite = "site="+site_name+"&amp;"; }
+	      
+	      text_t link = "_gwcgi_?"+optsite+"a=p&amp;p=about&amp;c=" + *collist_here + coll_type;
+	      link += "&amp;l=" + args["l"] + "&amp;w=" + args["w"];
 
 	      // We are "dynamically" overriding so to speak the
@@ -271,5 +271,5 @@
 			     ostream &logout) {
   
-  text_t homeextra = "<center><table width=_pagewidth_><tr valign=top>\n";
+  text_t homeextra = "<table class=\"collections\"><tr valign=\"top\">\n";
   bool found_valid_col = false;
   recptprotolistclass::iterator rprotolist_here = protos->begin();
@@ -293,5 +293,5 @@
 	    if (cinfo->isPublic && (cinfo->buildDate > 0)) {
 
-	      text_t coll_type = "&ct=";
+	      text_t coll_type = "&amp;ct=";
 	      if ((cinfo->buildType == "mgpp") || (cinfo->buildType == "lucene")) {
 
@@ -303,5 +303,5 @@
 		}
 
-		coll_type += "&qto=";
+		coll_type += "&amp;qto=";
 
 		// now we also want to check search types to set the qto arg 
@@ -326,5 +326,5 @@
 		    type_here = cinfo->searchTypes.begin();
 		    if (*type_here == "form") { 
-		      coll_type += "&qt=1"; // set the default to form
+		      coll_type += "&amp;qt=1"; // set the default to form
 		    }
 		  }
@@ -369,5 +369,5 @@
 		
 		collectionname 
-		  = "<img width=150 border=1 src=\"" + iconurl + "\" alt=\"" + alt + "\">";
+		  = "<img width=\"150\" border=\"1\" src=\"" + iconurl + "\" alt=\"" + alt + "\">";
 	      } else {
 		collectionname = alt;
@@ -375,13 +375,13 @@
 	      
 	      if ((count%configinfo.HomePageCols == 0) && (!first))
-		homeextra += "</tr><tr valign=top>\n";
+		homeextra += "</tr><tr valign=\"top\">\n";
 	      
 	      comerror_t err;
 	      text_t optsite = g_EmptyText;
 	      text_t site_name = (*rprotolist_here).p->get_site_name (err);
-	      if (!site_name.empty()) { optsite = "site="+site_name+"&"; }
-
-	      text_t link = "<a href=\"_gwcgi_?"+optsite+"a=p&p=about&c=" + *collist_here + coll_type;
-	      link += "&l=" + args["l"] + "&w=" + args["w"] + "\">";
+	      if (!site_name.empty()) { optsite = "site="+site_name+"&amp;"; }
+
+	      text_t link = "<a href=\"_gwcgi_?"+optsite+"a=p&amp;p=about&amp;c=" + *collist_here + coll_type;
+	      link += "&amp;l=" + args["l"] + "&amp;w=" + args["w"] + "\">";
 	      
 	      if (!cinfo->receptionist.empty()) 
@@ -400,5 +400,5 @@
       }
     }
-    homeextra += "</td></tr>\n<tr>\n";
+    homeextra += "</tr>\n<tr>\n";
     ++rprotolist_here;
   }
@@ -407,5 +407,5 @@
     homeextra += "<td>No valid (i.e. built and public) collections are available</td>\n";
   }
-  homeextra += "</tr></table></center>\n";
+  homeextra += "</tr></table>\n";
   disp.setmacro ("homeextra", "home", homeextra); 
 }
@@ -439,5 +439,5 @@
 	      ++count;
 
-	      text_t coll_type = "&ct=";
+	      text_t coll_type = "&amp;ct=";
 
 	      if ((cinfo->buildType == "mgpp") || (cinfo->buildType == "lucene")) {
@@ -450,5 +450,5 @@
 		}
 
-		coll_type += "&qto=";
+		coll_type += "&amp;qto=";
 
 		// now we also want to check search types to set the qto arg 
@@ -474,5 +474,5 @@
 		    type_here = cinfo->searchTypes.begin();
 		    if (*type_here == "form") { 
-		      coll_type += "&qt=1"; // set the default to form
+		      coll_type += "&amp;qt=1"; // set the default to form
 		    }
 		  }
@@ -490,5 +490,5 @@
 	      text_t optsite = g_EmptyText;
 	      text_t site_name = (*rprotolist_here).p->get_site_name (err);
-	      if (!site_name.empty()) { optsite = "site="+site_name+"&"; }
+	      if (!site_name.empty()) { optsite = "site="+site_name+"&amp;"; }
 
 	      text_t link = "<a href=\"_gwcgi_?"+optsite+"a=p&p=about&c=" + *collist_here + coll_type+"\">";
Index: /trunk/gsdl/src/recpt/queryaction.cpp
===================================================================
--- /trunk/gsdl/src/recpt/queryaction.cpp	(revision 10872)
+++ /trunk/gsdl/src/recpt/queryaction.cpp	(revision 10873)
@@ -1363,6 +1363,6 @@
 	text_t& arg_d = (*thissection).OID;
 	text_t doc_url = "_httpdocument_";
-	doc_url += "&c=" + collection;
-	doc_url += "&d=" + arg_d;
+	doc_url += "&amp;c=" + collection;
+	doc_url += "&amp;d=" + arg_d;
 
 	// location response (url may contain macros!!)
@@ -1375,9 +1375,9 @@
 	text_t query_url = "_gwcgi_";
 	query_url += "?e=" + args["e"];
-	query_url += "&h=" + args["h"];
-	query_url += "&q=" + args["q"];
-	query_url += "&r=" + args["r"];
-	query_url += "&t=" + args["t"];
-	query_url += "&hs=" + args["hs"];
+	query_url += "&amp;h=" + args["h"];
+	query_url += "&amp;q=" + args["q"];
+	query_url += "&amp;r=" + args["r"];
+	query_url += "&amp;t=" + args["t"];
+	query_url += "&amp;hs=" + args["hs"];
 
 	textout << outconvert << disp << "Location: " << query_url << "\n\n";
@@ -1600,17 +1600,17 @@
   }
   query += "c="+args["c"];
-  query += "&h="+args["h"];
-  query += "&t="+args["t"];
-  query += "&b="+args["b"];
-  query += "&j="+args["j"];
-  query += "&n="+args["n"];
-  query += "&s="+args["s"];
-  query += "&k="+args["k"];
-  query += "&g="+args["g"]; 
+  query += "&amp;h="+args["h"];
+  query += "&amp;t="+args["t"];
+  query += "&amp;b="+args["b"];
+  query += "&amp;j="+args["j"];
+  query += "&amp;n="+args["n"];
+  query += "&amp;s="+args["s"];
+  query += "&amp;k="+args["k"];
+  query += "&amp;g="+args["g"]; 
   
   text_t qstring = args["q"];
   //text_t formattedquery =cgi_safe(qstring);
-  //query += "&q="+formattedquery;
-  query += "&q="+qstring;
+  //query += "&amp;q="+formattedquery;
+  query += "&amp;q="+qstring;
   bool display=false;
   int hd = args.getintarg("hd");
Index: /trunk/gsdl/src/recpt/statusaction.cpp
===================================================================
--- /trunk/gsdl/src/recpt/statusaction.cpp	(revision 10872)
+++ /trunk/gsdl/src/recpt/statusaction.cpp	(revision 10873)
@@ -61,5 +61,5 @@
 	  << "_status:infoheader_(_titlewelcome_)\n"
 	  << "_status:welcome_"
-	  << "<center><table width=_pagewidth_>\n"
+	  << "<table>\n"
 	  << "<th align=left>abbrev.</th><th align=left>collection</th>"
 	  << "<th align=left>public?</th><th align=left>running?</th></tr>\n";
@@ -127,5 +127,5 @@
   }
 
-  textout << "</table></center>\n";
+  textout << "</table>\n";
   textout << outconvert << disp << "_status:infofooter_\n";
 }
Index: /trunk/gsdl/src/recpt/vlistbrowserclass.cpp
===================================================================
--- /trunk/gsdl/src/recpt/vlistbrowserclass.cpp	(revision 10872)
+++ /trunk/gsdl/src/recpt/vlistbrowserclass.cpp	(revision 10873)
@@ -74,5 +74,5 @@
 
   text_t collink = collection;
-  if (!collink.empty()) collink = "&c=" + collink;
+  if (!collink.empty()) collink = "&amp;c=" + collink;
 
   get_link_icon (section, args, collink, link, icon);
@@ -124,5 +124,5 @@
 
   text_t collink = collection;
-  if (!collink.empty()) collink = "&c=" + collink;
+  if (!collink.empty()) collink = "&amp;c=" + collink;
 
   if (colnumber > 0) {
@@ -209,5 +209,5 @@
   link = "<a href=\"_httpdocument_" + collink;
   text_t link_end = "\">";
-  text_t detach_link_end = "&x=1\" target=\\_blank>"; // to detach the link, and x=1 signifies it is a detached page
+  text_t detach_link_end = "&amp;x=1\" target=\\_blank>"; // to detach the link, and x=1 signifies it is a detached page
   icon = "_document:icontext_";
 
@@ -225,5 +225,5 @@
   if (args["a"] == "q") {
     // query results list
-    link += "&cl=search&d=" + section.OID;
+    link += "&amp;cl=search&amp;d=" + section.OID;
     
     if (args["xx"] == "1") {
@@ -243,5 +243,5 @@
 	link = "<a href=\"_httpquery_\">";
       }
-      else link += "&cl=" + arg_cl + "\">";
+      else link += "&amp;cl=" + arg_cl + "\">";
       
     } else if (haschildren == 1) {
@@ -250,14 +250,14 @@
 	  (section.OID == arg_d)) {
 	icon = "_document:iconopenfolder_";
-	link += "&cl=" + arg_cl + "&d=" + section.OID + ".pr\">";
+	link += "&amp;cl=" + arg_cl + "&amp;d=" + section.OID + ".pr\">";
       } else {
 	icon = "_document:iconclosedfolder_";
-	link += "&cl=" + arg_cl + "&d=" + section.OID + "\">";
+	link += "&amp;cl=" + arg_cl + "&amp;d=" + section.OID + "\">";
       }
     } else {
       if (args["gt"] == "0") {
-	link += "&cl=" + arg_cl + "&d=" + section.OID + "\">";
+	link += "&amp;cl=" + arg_cl + "&amp;d=" + section.OID + "\">";
       } else {
-	link += "&cl=" + arg_cl + "&d=" + section.OID + "#" + section.OID + "\">";
+	link += "&amp;cl=" + arg_cl + "&amp;d=" + section.OID + "#" + section.OID + "\">";
       }
     }
@@ -271,13 +271,13 @@
 	    (section.OID == arg_cl)) {
 	  icon = "_document:iconopenbookshelf_";
-	  link += "&cl=" + section.OID + ".pr\">";
+	  link += "&amp;cl=" + section.OID + ".pr\">";
 	} else {
 	  icon = "_document:iconclosedbookshelf_";
-	  link += "&cl=" + section.OID + "\">";
+	  link += "&amp;cl=" + section.OID + "\">";
 	}
       } else {
     
 	icon = "_document:iconclosedbook_";
-	link += "&cl=" + arg_cl + "&d=" + section.OID;
+	link += "&amp;cl=" + arg_cl + "&amp;d=" + section.OID;
 	if (args["xx"] == "1") {
 	  link +=  detach_link_end;
@@ -290,5 +290,5 @@
       if (doctype == "classify") link = "";
       else {
-	link += "&cl=" + arg_cl + "&d=" + section.OID;
+	link += "&amp;cl=" + arg_cl + "&amp;d=" + section.OID;
 	if (args["xx"] == "1") {
 	  link +=  detach_link_end;
