anchor.diff:      }
       $("#data_adapter_dialog").dialog("open");
       $("#data_adapter_message").text(message);
  -};
  +}
  +;
   
   function open_search_dialog() {
  -<%
  -    for (ServerConfiguration.TrackConfiguration track : serverConfig.getTracks().values()) {
  -        Integer permission = permissions.get(track.getName());
  -        if (permission == null) {
  -            permission = 0;
  -        }
  -        if ((permission & Permission.READ) == Permission.READ) {
  -            out.println("var trackName = '" + track.getName() + "'");
  -            break;
  -        }
  -
  -    }
  -%>
  +    <%
  +        for (ServerConfiguration.TrackConfiguration track : serverConfig.getTracks().values()) {
  +            Integer permission = permissions.get(track.getName());
  +            if (permission == null) {
  +                permission = 0;
  +            }
  +            if ((permission & Permission.READ) == Permission.READ) {
  +                out.println("var trackName = '" + track.getName() + "'");
  +                break;
  +            }
  +
  +        }
  +    %>
       var search = new SequenceSearch(".");
       var starts = new Object();
  -<%
  -    for (ServerConfiguration.TrackConfiguration track : serverConfig.getTracks().values()) {
  -        out.println(String.format("starts['%s'] = %d;", track.getSourceFeature().getUniqueName(), track.getSourceFeature().getStart()));
  -    }
  -%>
  -    search.setRedirectCallback(function(id, fmin, fmax) {
  -         var flank = Math.round((fmax - fmin) * 0.2);
  -         var url = 'jbrowse/?loc=' + id + ":" + (fmin-flank) + ".." + (fmax+flank)+"&highlight="+id+":"+(fmin+1) + ".." + fmax;
  -         window.open(url);
  -    });
  -    search.setErrorCallback(function(response) {
  +    <%
  +        for (ServerConfiguration.TrackConfiguration track : serverConfig.getTracks().values()) {
  +            out.println(String.format("starts['%s'] = %d;", track.getSourceFeature().getUniqueName(), track.getSourceFeature().getStart()));
  +        }
  +    %>
  +    search.setRedirectCallback(function (id, fmin, fmax) {
  +        var flank = Math.round((fmax - fmin) * 0.2);
  +        var url = 'jbrowse/?loc=' + id + ":" + (fmin - flank) + ".." + (fmax + flank) + "&highlight=" + id + ":" + (fmin + 1) + ".." + fmax;
  +        window.open(url);
  +    });
  +    search.setErrorCallback(function (response) {
           var error = eval('(' + response.responseText + ')');
           if (error && error.error) {
               alert(error.error);
  
positive.code: <%@ page import="java.io.InputStreamReader" %>
  <%@ page import="java.net.URL" %>
  <%@ page import="java.util.*" %>
  <%@ page import="org.apache.commons.collections.CollectionUtils" %>
  <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
      pageEncoding="ISO-8859-1"%>
  
  <%
  ServerConfiguration serverConfig = new ServerConfiguration(getServletContext());
  InputStream gbolMappingStream = getServletContext().getResourceAsStream(serverConfig.getGBOLMappingFile());
  
  Set<String> allStatusList = new TreeSet<String>();
  
  for(ServerConfiguration.AnnotationInfoEditorConfiguration annotationInfoEditorConfiguration : serverConfig.getAnnotationInfoEditor().values()){
      allStatusList.addAll(annotationInfoEditorConfiguration.getStatus());
  }
  
  BioObjectConfiguration bioObjectConfiguration = new BioObjectConfiguration(gbolMappingStream);
  if (!UserManager.getInstance().isInitialized()) {
      ServerConfiguration.UserDatabaseConfiguration userDatabase = serverConfig.getUserDatabase();
      UserManager.getInstance().initialize(userDatabase.getDriver(), userDatabase.getURL(), userDatabase.getUserName(), userDatabase.getPassword());
  }
  String databaseDir = serverConfig.getDataStoreDirectory();
  String username = (String)session.getAttribute("username");
  Map<String, Integer> permissions = UserManager.getInstance().getPermissionsForUser(username);
  %>
  
  <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  
negative.code: <div id="login_dialog" title="Login">
  </div>
  <div id="recent_changes_div">
      <table id="recent_changes"></table>
  </div>
  </body>
  </html>
  