/*
 * Generated by the Jasper component of Apache Tomcat
 * Version: Apache Tomcat/7.0.27
 * Generated at: 2014-05-12 06:10:22 UTC
 * Note: The last modified time of this file was set to
 *       the last modified time of the source file after
 *       generation to assist with modification tracking.
 */
package org.apache.jsp.WEB_002dINF.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;

public final class search_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  private static final javax.servlet.jsp.JspFactory _jspxFactory =
          javax.servlet.jsp.JspFactory.getDefaultFactory();

  private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;

  private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fc_005furl_0026_005fvalue_005fnobody;

  private javax.el.ExpressionFactory _el_expressionfactory;
  private org.apache.tomcat.InstanceManager _jsp_instancemanager;

  public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
    return _jspx_dependants;
  }

  public void _jspInit() {
    _005fjspx_005ftagPool_005fc_005furl_0026_005fvalue_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
    _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
    _jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
  }

  public void _jspDestroy() {
    _005fjspx_005ftagPool_005fc_005furl_0026_005fvalue_005fnobody.release();
  }

  public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
        throws java.io.IOException, javax.servlet.ServletException {

    final javax.servlet.jsp.PageContext pageContext;
    javax.servlet.http.HttpSession session = null;
    final javax.servlet.ServletContext application;
    final javax.servlet.ServletConfig config;
    javax.servlet.jsp.JspWriter out = null;
    final java.lang.Object page = this;
    javax.servlet.jsp.JspWriter _jspx_out = null;
    javax.servlet.jsp.PageContext _jspx_page_context = null;


    try {
      response.setContentType("text/html");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write('\n');
      out.write('\n');
      org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "/WEB-INF/jsp/header.jsp", out, false);
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("<script type=\"text/javascript\" language=\"javascript\" src=\"");
      if (_jspx_meth_c_005furl_005f0(_jspx_page_context))
        return;
      out.write("\"></script>\n");
      out.write("\n");
      out.write("<script type=\"text/javascript\">\n");
      out.write("    $(function() {\n");
      out.write("        $(\"#searchForm\").submit(function() {\n");
      out.write("            var smiles = document.JME.smiles();\n");
      out.write("            document.getElementById('structure').value = smiles;\n");
      out.write("        });\n");
      out.write("    });\n");
      out.write("\n");
      out.write("    function jsmeOnLoad() {\n");
      out.write("        jsmeApplet = new JSApplet.JSME(\"structureEditor\", {\n");
      out.write("            //optional parameters\n");
      out.write("            \"options\" : \"query,hydrogens\"\n");
      out.write("        });\n");
      out.write("        document.JME = jsmeApplet;\n");
      out.write("    }\n");
      out.write("\n");
      out.write("</script>\n");
      out.write("<!-- Surrounding div required. JSME messes up html...\n");
      out.write("    Without it the structureEditor div will include the form and the\n");
      out.write("    editor will be drawn below the search button.\n");
      out.write("-->\n");
      out.write("<div>\n");
      out.write("    <div id=\"structureEditor\"/>\n");
      out.write("</div>\n");
      out.write("<form id=\"searchForm\" class=\"cssform\" action=\"searchResult\" method=\"get\">\n");
      out.write("    <div>\n");
      out.write("        <label for=\"searchType\">Structure Search Type</label>\n");
      out.write("        <select id=\"searchType\" name=\"searchType\" size=\"1\">\n");
      out.write("            <option value=\"exact\">Exact</option>\n");
      out.write("            <option value=\"substructure\">Substructure</option>\n");
      out.write("            <option value=\"tanimoto\">Similarity - Tanimoto</option>\n");
      out.write("        </select>\n");
      out.write("    </div>\n");
      out.write("    <div>\n");
      out.write("        <label for=\"sortBy\">Sort By</label>\n");
      out.write("        <select id=\"sortBy\" name=\"sortBy\" size=\"1\">\n");
      out.write("            <option value=\"compoundName\">Compound Name</option>\n");
      out.write("            <option value=\"cas\">CAS</option>\n");
      out.write("            <option value=\"compoundDescription\">Compound Description</option>\n");
      out.write("        </select>\n");
      out.write("    </div>\n");
      out.write("    <div>\n");
      out.write("        <label for=\"sortDirection\">Sort Direction</label>\n");
      out.write("        <select id=\"sortDirection\" name=\"sortDirection\" size=\"1\">\n");
      out.write("            <option value=\"ASC\">Ascending</option>\n");
      out.write("            <option value=\"DESC\">Descending</option>\n");
      out.write("        </select>\n");
      out.write("    </div>\n");
      out.write("    <div>\n");
      out.write("        <label for=\"compoundName\">Compound Name</label>\n");
      out.write("        <input type=\"text\" id=\"compoundName\" name=\"compoundName\"/>\n");
      out.write("    </div>\n");
      out.write("    <div>\n");
      out.write("        <label for=\"cas\">CAS</label>\n");
      out.write("        <input type=\"text\"  id=\"cas\" name=\"cas\"/>\n");
      out.write("    </div>\n");
      out.write("    <div>\n");
      out.write("        <label for=\"compoundDescription\">Description</label>\n");
      out.write("        <input type=\"text\"  id=\"compoundDescription\" name=\"compoundDescription\"/>\n");
      out.write("    </div>\n");
      out.write("    <div><input type=\"hidden\" id=\"structure\" name=\"structure\"></div>\n");
      out.write("    <div class=\"buttons\"><input id=\"searchButton\" class=\"submit\" type=\"submit\" value=\"Search\"/></div>\n");
      out.write("</form>\n");
      org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "/WEB-INF/jsp/footer.jsp", out, false);
      out.write('\n');
    } catch (java.lang.Throwable t) {
      if (!(t instanceof javax.servlet.jsp.SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try { out.clearBuffer(); } catch (java.io.IOException e) {}
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }

  private boolean _jspx_meth_c_005furl_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
          throws java.lang.Throwable {
    javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    //  c:url
    org.apache.taglibs.standard.tag.rt.core.UrlTag _jspx_th_c_005furl_005f0 = (org.apache.taglibs.standard.tag.rt.core.UrlTag) _005fjspx_005ftagPool_005fc_005furl_0026_005fvalue_005fnobody.get(org.apache.taglibs.standard.tag.rt.core.UrlTag.class);
    _jspx_th_c_005furl_005f0.setPageContext(_jspx_page_context);
    _jspx_th_c_005furl_005f0.setParent(null);
    // /WEB-INF/jsp/search.jsp(10,58) name = value type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
    _jspx_th_c_005furl_005f0.setValue("/resources/js/jsme/jsme.nocache.js");
    int _jspx_eval_c_005furl_005f0 = _jspx_th_c_005furl_005f0.doStartTag();
    if (_jspx_th_c_005furl_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      _005fjspx_005ftagPool_005fc_005furl_0026_005fvalue_005fnobody.reuse(_jspx_th_c_005furl_005f0);
      return true;
    }
    _005fjspx_005ftagPool_005fc_005furl_0026_005fvalue_005fnobody.reuse(_jspx_th_c_005furl_005f0);
    return false;
  }
}
