anchor.diff:              </h:outputLabel>
   
      <%
  -   
  +
      if (!MetadataUtils.isMetadataAvailable()) {
          MetadataUtils.initialize();
      }
  -   
  +
      Object obj = request.getSession().getAttribute("selectedSource");
      if (obj != null) {
  -   	String selectedSource = (String) obj;
  -   	String available_hierarchies = NCImBrowserProperties.getSourceHierarchies();
  -   	if (available_hierarchies != null && available_hierarchies.indexOf("|" + selectedSource + "|") != -1) {
  +    String selectedSource = (String) obj;
  +    String available_hierarchies = NCImBrowserProperties.getSourceHierarchies();
  +    if (available_hierarchies != null && available_hierarchies.indexOf("|" + selectedSource + "|") != -1) {
                      boolean isLicensed = DataUtils.checkIsLicensed(selectedSource);
  -   		boolean licenseAgreementAccepted = false;
  -   		String formal_name = MetadataUtils.getSABFormalName(selectedSource);
  -   		String view_source_hierarchy_label = "View " + selectedSource + " Hierarchy";
  -   
  -   		LicenseBean licenseBean = (LicenseBean) request.getSession().getAttribute("licenseBean");
  -   		if (licenseBean == null) {
  -   		    licenseBean = new LicenseBean();
  -   		    request.getSession().setAttribute("licenseBean", licenseBean);
  -   		}
  -   
  -   		licenseAgreementAccepted = licenseBean.licenseAgreementAccepted(formal_name);
  -   
  -   		if (!isLicensed || licenseAgreementAccepted) {
  -   
  -   	%>
  -   		      <a class="icon_blue" href="#" onclick="javascript:window.open('<%=request.getContextPath() %>/pages/source_hierarchy.jsf?sab=<%=selectedSource%>', '_blank','top=100, left=100, height=740, width=680, status=no, menubar=no, resizable=yes, scrollbars=yes, toolbar=no, location=no, directories=no');">
  -   			      <img src="<%=basePath%>/images/visualize.gif" width="16px" height="16px" alt="<%=view_source_hierarchy_label%>" title="<%=view_source_hierarchy_label%>" border="0"/>
  -   		      </a>         
  -   	<% 
  -   	        } else {
  +      boolean licenseAgreementAccepted = false;
  +      String formal_name = MetadataUtils.getSABFormalName(selectedSource);
  +      String view_source_hierarchy_label = "View " + selectedSource + " Hierarchy";
  +
  +      LicenseBean licenseBean = (LicenseBean) request.getSession().getAttribute("licenseBean");
  +      if (licenseBean == null) {
  +          licenseBean = new LicenseBean();
  +          request.getSession().setAttribute("licenseBean", licenseBean);
  +      }
  +
  +      licenseAgreementAccepted = licenseBean.licenseAgreementAccepted(formal_name);
  +
  +      if (!isLicensed || licenseAgreementAccepted) {
  +
  +    %>
  +            <a class="icon_blue" href="#" onclick="javascript:window.open('<%=request.getContextPath() %>/pages/source_hierarchy.jsf?sab=<%=selectedSource%>', '_blank','top=100, left=100, height=740, width=680, status=no, menubar=no, resizable=yes, scrollbars=yes, toolbar=no, location=no, directories=no');">
  +              <img src="<%=basePath%>/images/visualize.gif" width="16px" height="16px" alt="<%=view_source_hierarchy_label%>" title="<%=view_source_hierarchy_label%>" border="0"/>
  +            </a>
  +    <%
  +            } else {
              %>
  -   		      <a class="icon_blue" href="#" onclick="javascript:window.open('<%=request.getContextPath() %>/pages/accept_license.jsf?dictionary=<%=formal_name%>&sab=<%=selectedSource%>&type=browsehierarchy', '_blank','top=100, left=100, height=740, width=680, status=no, menubar=no, resizable=yes, scrollbars=yes, toolbar=no, location=no, directories=no');">
  -   		              <img src="<%=basePath%>/images/visualize.gif" width="16px" height="16px" alt="<%=view_source_hierarchy_label%>" title="<%=view_source_hierarchy_label%>"  border="0"/>
  -   		      </a>	        
  -   	<%         
  -   	        }
  -   	}
  +            <a class="icon_blue" href="#" onclick="javascript:window.open('<%=request.getContextPath() %>/pages/accept_license.jsf?dictionary=<%=formal_name%>&sab=<%=selectedSource%>&type=browsehierarchy', '_blank','top=100, left=100, height=740, width=680, status=no, menubar=no, resizable=yes, scrollbars=yes, toolbar=no, location=no, directories=no');">
  +                    <img src="<%=basePath%>/images/visualize.gif" width="16px" height="16px" alt="<%=view_source_hierarchy_label%>" title="<%=view_source_hierarchy_label%>"  border="0"/>
  +            </a>
  +    <%
  +            }
  +    }
      }
      %>
   
  
positive.code:   <table border="0" cellspacing="0" cellpadding="0" width="340px">
      <tr valign="top" align="left">
        <td align="left" class="textbody" colspan="2">
          <input type="radio" name="algorithm" value="exactMatch" alt="Exact Match" <%=check_e%>>Exact Match&nbsp; 
          <input type="radio" name="algorithm" value="startsWith" alt="Begins With" <%=check_s%>>Begins With&nbsp; 
          <input type="radio" name="algorithm" value="contains" alt="Containts" <%=check_c%>>Contains
        </td>
      </tr>
      <tr align="left">
        <td width="263px" height="1px" bgcolor="#2F2F5F"></td>
        <!-- The following lines are needed to make "Advanced Search" link flush right -->
        <% if (isIE) { %>
            <td width="77px"></td> 
        <% } else { %>
            <td></td>
        <% } %>
  
negative.code: <%@ page import="gov.nih.nci.evs.browser.utils.MetadataUtils" %>
  <%@ page import="gov.nih.nci.evs.browser.utils.HTTPUtils" %>
  <%@ page import="gov.nih.nci.evs.browser.bean.LicenseBean" %>
  
  <script type="text/javascript">
    function cursor_wait() {
       document.body.style.cursor = 'wait';
    }
  
    function disableAnchor(){
  
      var obj1 = document.getElementById("a_tpTab");
      if (obj1 != null) obj1.removeAttribute('href');
  
      var obj2 = document.getElementById("a_relTab");
      if (obj2 != null) obj2.removeAttribute('href');
  
      var obj3 = document.getElementById("a_synTab");
      if (obj3 != null) obj3.removeAttribute('href');
  
      var obj4 = document.getElementById("a_srcTab");
      if (obj4 != null) obj4.removeAttribute('href');
  
      var obj5 = document.getElementById("a_allTab");
      if (obj5 != null) obj5.removeAttribute('href');
  
      var obj6 = document.getElementById("a_hierBut");
      if (obj6 != null) obj6.removeAttribute('href');
    }
  