anchor.diff:            </div>
           </td>
           <script type="text/javascript">
  -        	(function() {
  -		          /** show more */
  -		          function moreDescription() {
  -		            var t = jQuery('table.fields td.description div.text span.text').html();
  -		            if (t.length > 120) {
  -		                jQuery('table.fields td.description div.text p').html('')
  -		                .append(jQuery('<span/>', {
  -		                    'class': 'text',
  -		                    'text': t.substring(0, 100)
  -		                }))
  -		                .append(jQuery('<span/>', {
  -		                    'class': 'ellipsis',
  -		                    'html': '&hellip;'
  -		                }))
  -		                .append(jQuery('<span/>', {
  -		                    'class': 'hidden',
  -		                    'text': t.substring(100, t.length)
  -		                }))
  -		                .append(jQuery('<a/>', {
  -		                    'class': 'more',
  -		                    'text': 'more'
  -		                }));
  -		            } else {
  -		            	jQuery('<span/>', {
  -		            	    'class': 'text',
  -		            	    'text': t
  -		            	}).appendTo('table.fields td.description div.text p');
  -		            	
  -		                // toggler
  -		                jQuery('table.fields td.description div.text a.more').remove();
  -		            }
  -		          }
  -		          moreDescription();
  -
  -		          /** description edit toggler */
  -		          jQuery('table.fields td.description a.more').live('click', function() {
  -		            jQuery(this).parent().find('span.text').html(
  -		                jQuery(this).parent().find('span.text').html() + jQuery(this).parent().find('span.hidden').html()
  -		            );
  -		            jQuery(this).parent().find('span').not('span.text').remove();
  -		            jQuery(this).remove();
  -		          });
  -
  -		          /** description edit toggler */
  -		          jQuery('table.fields td.description a.edit').click(function() {
  -		            // hide the div
  -		            jQuery('table.fields td.description div.text').hide();
  -		            // show the form
  -		            jQuery('table.fields td.description div.form').show();
  -		            // focus, make it usable
  -		            jQuery('table.fields td.description input.text').focus();
  -		          });
  -
  -		          /** Save description */
  -		          function saveDescription() {
  -		            var newDescription = jQuery('table.fields td.description input.text').val().replace(/[\n\r]+/g, "\n\r<br/>");
  -		            AjaxServices.saveBagDescription('${bag.name}', newDescription, function(returnedDescription){
  -		                // populate the value
  -		                jQuery('table.fields td.description div.text span.text').html(returnedDescription);
  -		                // switch the visibility
  -		                jQuery('table.fields td.description div.text').show();
  -		                jQuery('table.fields td.description div.form').hide();
  -
  -		                // set the link name based on whether we've cleared or not
  -		                if (returnedDescription.length > 0) {
  -		                  jQuery('table.fields td.description div.text a.edit').html('Edit');
  -		                }
  -		                else {
  -		                  jQuery('table.fields td.description div.text a.edit').html('Set');
  -		                }
  -
  -		                moreDescription();
  -		            });
  -		          }
  -		          jQuery('table.fields td.description input.text').bind('keyup', function(e) {
  -		             if((e.keyCode ? e.keyCode : e.which) == 13) {
  -		               saveDescription();
  -		             }
  -		          });
  -		          jQuery('table.fields td.description input.save').click(function() {
  -		             saveDescription();
  -		          });
  -        	})();
  +          (function() {
  +              /** show more */
  +              function moreDescription() {
  +                var t = jQuery('table.fields td.description div.text span.text').html();
  +                if (t.length > 120) {
  +                    jQuery('table.fields td.description div.text p').html('')
  +                    .append(jQuery('<span/>', {
  +                        'class': 'text',
  +                        'text': t.substring(0, 100)
  +                    }))
  +                    .append(jQuery('<span/>', {
  +                        'class': 'ellipsis',
  +                        'html': '&hellip;'
  +                    }))
  +                    .append(jQuery('<span/>', {
  +                        'class': 'hidden',
  +                        'text': t.substring(100, t.length)
  +                    }))
  +                    .append(jQuery('<a/>', {
  +                        'class': 'more',
  +                        'text': 'more'
  +                    }));
  +                } else {
  +                  jQuery('<span/>', {
  +                      'class': 'text',
  +                      'text': t
  +                  }).appendTo('table.fields td.description div.text p');
  +
  +                    // toggler
  +                    jQuery('table.fields td.description div.text a.more').remove();
  +                }
  +              }
  +              moreDescription();
  +
  +              /** description edit toggler */
  +              jQuery('table.fields td.description a.more').live('click', function() {
  +                jQuery(this).parent().find('span.text').html(
  +                    jQuery(this).parent().find('span.text').html() + jQuery(this).parent().find('span.hidden').html()
  +                );
  +                jQuery(this).parent().find('span').not('span.text').remove();
  +                jQuery(this).remove();
  +              });
  +
  +              /** description edit toggler */
  +              jQuery('table.fields td.description a.edit').click(function() {
  +                // hide the div
  +                jQuery('table.fields td.description div.text').hide();
  +                // show the form
  +                jQuery('table.fields td.description div.form').show();
  +                // focus, make it usable
  +                jQuery('table.fields td.description input.text').focus();
  +              });
  +
  +              /** Save description */
  +              function saveDescription() {
  +                var newDescription = jQuery('table.fields td.description input.text').val().replace(/[\n\r]+/g, "\n\r<br/>");
  +                AjaxServices.saveBagDescription('${bag.name}', newDescription, function(returnedDescription){
  +                    // populate the value
  +                    jQuery('table.fields td.description div.text span.text').html(returnedDescription);
  +                    // switch the visibility
  +                    jQuery('table.fields td.description div.text').show();
  +                    jQuery('table.fields td.description div.form').hide();
  +
  +                    // set the link name based on whether we've cleared or not
  +                    if (returnedDescription.length > 0) {
  +                      jQuery('table.fields td.description div.text a.edit').html('Edit');
  +                    }
  +                    else {
  +                      jQuery('table.fields td.description div.text a.edit').html('Set');
  +                    }
  +
  +                    moreDescription();
  +                });
  +              }
  +              jQuery('table.fields td.description input.text').bind('keyup', function(e) {
  +                 if((e.keyCode ? e.keyCode : e.which) == 13) {
  +                   saveDescription();
  +                 }
  +              });
  +              jQuery('table.fields td.description input.save').click(function() {
  +                 saveDescription();
  +              });
  +          })();
           </script>
         </tr>
       </table>
  
positive.code: 
      </div>
  
  	<div class="clear"></div>
  
  	<div class="grid_8">
  	
  	    <%-- preview table will be populated by JS here --%>
  		<div id="preview-table" class="box grid_12 last collection-table nowrap nomargin results">
  		  <script type="text/javascript">if (showTable) jQuery("#preview-table").hide();</script>
  		  <div class="gradient-wrap">
  		      <table>
  		        <tbody></tbody>
  		      </table>
  		      <div class="gradient"></div>
  	      </div>
  	      <div class="toggle">
  	      	<a class="more" title="Show the results list">Show the list</a>
  	      </div>
  	    </div>	
  	
  	      <script type="text/javascript">
  	      	(function() {
  	      		<%-- give me the columns in the table in order --%>
  	      		var columns = Array();
  	      		jQuery("#list-table table thead th").each(function(index) {
  	      			columns.push(jQuery(this).attr('title'));
  	      		});
  	      		
  	      		<%-- only valid columns --%>
  	      		var previewColumns = Array();
  	      		jQuery.each('${showInPreviewTable}'.replace(/\[|\]/g, '').split(', '), function(index, value) { 
  	      		  if (jQuery("#list-table table thead th[title='"+value+"']").exists()) {
  	      			previewColumns.push(value);
  	      		  }
  	      		});
  	      		
  	      		<%-- no config, add the "first" two columns --%>
  	      		if (previewColumns.length == 0) {
  	      			previewColumns.push(columns[1]);
  	      			if (columns.length > 2) {
  	      				previewColumns.push(columns[2]);
  	      			}
  	      		}
  	      		
        			var limit = 3;
        			jQuery("#list-table table tbody tr").each(function(index) {
        				limit--;
        				var sourceTr = this;
        				<%-- copy over the relevant row columns --%>
        				jQuery('<tr/>', {
        					'html': function() {
        						var tr = this;
        	      				jQuery.each(previewColumns, function(index, value) {
        	      					jQuery('<td/>', {
        	      						'text': function() {
        	      							return jQuery(sourceTr).find("td:nth-child("+(columns.indexOf(value)+1)+")").text();
        	      						}
        	      					}).appendTo(tr);
        	      				});
        					}
        				}).appendTo("#preview-table table tbody");
        				
        				if (limit <= 0) return false;
        			});
  	      		
  		      // will show/hide the results table and toolbox & change the link appropriately (text, ico)
  		      function toggleResults() {
  		    	if (jQuery('#preview-table:visible').length > 0) {
  		    		// show the full list, hide preview table
  			    	jQuery('#preview-table').hide();
  			        jQuery('#ListArea').slideDown().scrollTo('slow', 'linear', -25);
  		    	} else {
  		    		// hide the full list, show preview table
  		    		jQuery('#ListArea').slideUp();
  		    		jQuery('#preview-table').show();
  		    		jQuery('#ListCategory').scrollTo('slow', 'linear', -15);
  		    	}
  		      }
  
  		      // shuffle "selected" around:
  		      jQuery("#results b").not("table.results b").remove();
  		      var s = jQuery.trim(jQuery("#results span#selectedIdFields").first().html());
  		      jQuery("#results span#selectedIdFields").first().remove();
  		      jQuery("#results span#selectedIdFields").html(s);
  
  		      if (s.length == 0) { // hide when we have not selected anything before reload
  		        jQuery('#results div.selected span.desc').hide();
  		      }
  
  		      // monitor checkboxes for changes
  		      jQuery('#results input').each(function(index) {
  		        jQuery(this).click(function() {
  		          if (jQuery('#results div.selected span.desc').is(':visible')) {
  		            if (jQuery('#results div.selected #selectedIdFields').html().length == 0) {
  		                jQuery('#results div.selected span.desc').hide();
  		                window.location.hash = '';
  		            }
  		          } else {
  		            if (jQuery('#results div.selected #selectedIdFields').html().length > 0) {
  		                jQuery('#results div.selected span.desc').show();
  		            }
  		            // append a param so that we keep table expanded upon reload
  		            window.location.hash = 'hasHighlighted';
  		          }
  		        });
  		      });
  
  		      // apply highlight class to rows that were selected before reload
  		      jQuery('#results input:checked').each(function(index) {
  		        jQuery(this).parent().parent().find('td').not('th td').addClass('highlightCell');
  		      });
  
  		      // toggler events
  		      jQuery('#preview-table').click(function() {
  		        toggleResults();
  		      });
  		      jQuery('#list-table div.toggle a.less').click(function() {
  			    toggleResults();
  			  });
  	      	})();
  	      </script>	
  	
  	    <%-- convert to a different type & orthologues --%>
  	    <div class="box grid_6" id="convertList">
  	      <div class="feature convert">
  	        <html:form action="/modifyBagDetailsAction" styleId="bagDetailsForm">
  	        <html:hidden property="bagName" value="${bag.name}"/>
  	          <tiles:insert name="convertBag.tile">
  	            <tiles:put name="bag" beanName="bag" />
  	            <tiles:put name="idname" value="cp" />
  	            <tiles:put name="orientation" value="h" />
  	          </tiles:insert>
  	        </html:form>
  	      </div>
  	    </div>
  	
  	    <%-- download list --%>
  	    <div class="box grid_6" id="download">
  	      <div class="feature">
  	        <h3 class="goog">Download</h3>
  	        <c:set var="tableName" value="bag.${bag.name}" scope="request"/>
  	        <c:set var="pagedTable" value="${pagedResults}" scope="request"/>
  	        <tiles:get name="export.tile"/>
  	      </div>
  	    </div>
      </div>
  
      <%-- external links --%>
  
negative.code:         </tiles:insert>
        </div>
        <div class="clear"></div>
  
      <div id="list-table" class="collection-table nowrap results">
        <div style="overflow-x:auto;">
            <tiles:insert name="resultsTable.tile">
              <tiles:put name="pagedResults" beanName="pagedResults" />
                <tiles:put name="currentPage" value="bagDetails" />
                <tiles:put name="bagName" value="${bag.name}" />
                <tiles:put name="highlightId" value="${highlightId}"/>
            </tiles:insert>
          </div>
          <div class="toggle">
            <a class="less" title="Hide the list">Hide the list</a>
          </div>
  
          <div class="selected">
            <span class="desc">Selected:</span>
            <span id="selectedIdFields"></span>
          </div>
        </div>
      </div>
  
  