<%--
  Copyright 2003 Sun Microsystems, Inc. All rights reserved 
  Use is subject to license terms.
 --%>
<%-- @(#)browseResults.jsp  --%>
<%@page language= "java" import="com.sun.portal.search.providers.*,
				 com.sun.portal.search.util.Encoder,
				 java.util.*" %>

<%@ page import="com.iplanet.sso.SSOTokenManager,
		 com.iplanet.sso.SSOToken, 
		 com.iplanet.am.sdk.AMStoreConnection, 
		 com.iplanet.sso.SSOException, 
		 com.iplanet.am.sdk.AMUser" %>

<%@ taglib uri="/tld/search.tld" prefix="search" %>
<%@ taglib uri="/tld/desktop.tld" prefix="dt" %>
<%@ taglib uri="/tld/jx.tld" prefix="jx" %>

<jsp:useBean id="formbean" scope="request" class="SearchRequestBean">
<jsp:setProperty name="formbean" property= "*"/>
</jsp:useBean>

<%-- declare all UI related variables --%>
<jx:declare id="tFontColor" type="java.lang.String"/>
<jx:declare id="tFontFace" type="java.lang.String"/>

<search:getHeader attribute="taxonomy-id" escape="true" id="taxid"/>
<jx:if test='$taxid == ""'><jx:set var="taxid" value="Home"/></jx:if>
<%@ include file="browseHeader.jsp" %>

<search:getNoHits id="noHits"/>

<jx:if test="$noHits == false"> 
<BR>
<!-- Beginning of about search results -->
<FONT color="<%=tFontColor%>" face="<%=tFontFace%>" size="-1"><b>Subcategories <search:getFirstHit/> - <search:getToHit/> (of <search:getHitCount/>)</b></FONT><br>
<!-- End of about search results -->

<TABLE width=100% cellpadding=0 cellspacing=0>
<TR><TD>

<!-- Beginning of display results --> 
<% int location = 0; %>
<search:getResult id="resultstream"/> 
<search:getNextResult input="$resultstream"> 
    <search:getValue attribute="id" id="idvalue" escape="true"/>
    <jx:declare id="catValue" type="java.lang.String"/>

    <% if (++location == 1) { %>

    <!-- skip the taxonomy header -->

    <% } else { %>

	<% 
	// Remove the ':' in the id and display just the sibling name
	String idv = (String)pageContext.getAttribute("idvalue");
	int l_ind = idv.lastIndexOf(':');
	if (l_ind > 0)
	    idv = idv.substring(l_ind+1, idv.length());
	%>
	<nobr><img src="<dt:scontent/>/static/search/images/blank.gif" alt="" width=60 height=1>
	<search:getValue attribute="id" escape="true" id="browseCategory"/>
	<jx:declare id="browseCategory" type="java.lang.String"/>
	<A class="noUnderline" HREF="javascript:document.searchform.browseCategory.value=&quot;<search:getValue attribute="id" escape="true"/>&quot;;document.searchform.scope.value='';document.searchform.mode.value='browse';document.searchform.submit();"><font face="<%=tFontFace%>"><b><%=idv%></b></A><FONT color=#707070 face=<%=tFontFace%>> 
	<search:getValue attribute="subclassification-count" id="subclasscountvalue"/>
	<jx:if test = "$subclasscountvalue != '0'">
	(<search:getValue attribute="subclassification-count"/>)</font>
	</jx:if>
	<%}%>
	</nobr><br>

</search:getNextResult> 
</TD></TR> 
</TABLE>
<!-- End of display results -->

</jx:if>
<HR>
