<%-- 
  Copyright 2003 Sun Microsystems, Inc. All rights reserved 
  Use is subject to license terms.
 --%>
<%-- @(#)advancedSearch.jsp  --%>

<%@page language="java" import="com.sun.portal.search.providers.*,
				java.util.*" %>

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

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

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

<INPUT TYPE=HIDDEN NAME="browseCategory" VALUE="<%=SearchContext.htmlEncode(formbean.getBrowseCategory())%>">
<INPUT TYPE=HIDDEN NAME="scope" VALUE=" ">
<INPUT TYPE=HIDDEN NAME="mode" VALUE="adv">

<TABLE WIDTH=100% cellpadding=2 cellspacing=0 border=0>

    <TR>
	<td valign=middle align=right height=40>
		<FONT color=<%=tFontColor%> face=<%=tFontFace%>><nobr><LABEL FOR="advContain">Find</LABEL>
		<SELECT NAME ="wordsOp" ID="advContain">
		<OPTION VALUE=<%=SearchContext.ALL%> <%=formbean.wordsOpSelection(SearchContext.ALL)%>>all of the words</OPTION>
		<OPTION VALUE=<%=SearchContext.ANY%> <%=formbean.wordsOpSelection(SearchContext.ANY)%>>any of the words</OPTION>
		<OPTION VALUE=<%=SearchContext.EXACT%> <%=formbean.wordsOpSelection(SearchContext.EXACT)%>>the exact phrase</OPTION>
		<OPTION VALUE=<%=SearchContext.PASSAGE%> <%=formbean.wordsOpSelection(SearchContext.PASSAGE)%>>passage search</OPTION>
		</SELECT>
		&nbsp;</nobr></FONT></TD>
    	<td valign=middle align=left height=40>
    	 	<table border=0 cellspacing="0" cellpadding="0">
    		   <tr>
    			<td><INPUT TYPE="text" NAME="wordsVal"  ID="advContain" VALUE= "<%= SearchContext.htmlEncode(formbean.getWordsVal()) %>"></td>
 		 	<td>&nbsp;</td>
			<td><INPUT TYPE=SUBMIT NAME="Submit" VALUE="Search" style='background-color:<%=tTitleBarColor%>; color:<%=tTitleFontColor%>; font-family:<%=tFontFace%>'></td>
		   </tr>
	        </table></td>
    </TR>

  
<!--     -->
<!-- To disclude the "without the words" row, remark out the following section -->
<!--     -->
    <TR>
	<td valign=middle align=right height=40><FONT color=<%=tFontColor%> face=<%=tFontFace%>>
		<nobr><LABEL FOR="advWithout">without the words&nbsp;</LABEL></nobr></FONT></TD>
	<td valign=middle align=left height=40><INPUT TYPE="text" NAME="nowords" id="advWithout" VALUE= "<%=SearchContext.htmlEncode(formbean.getNowords())%>"></TD>
    </TR>

<!--     -->
<!-- To disclude the "title" row, remark out the following section -->
<!--     -->    
    <TR>
	<td valign=middle align=right height=40><FONT color=<%=tFontColor%> face=<%=tFontFace%>><nobr> <LABEL FOR="advTitle">Title</label> 
		<SELECT NAME="titleOp" ID="advTitle">
		    <OPTION VALUE=<%=SearchContext.CONTAIN%> <%=formbean.titleOpSelection(SearchContext.CONTAIN)%>>does</OPTION>
		    <OPTION VALUE=<%=SearchContext.NOTCONTAIN%> <%=formbean.titleOpSelection(SearchContext.NOTCONTAIN)%>>does not</OPTION>
		</SELECT>	
		contain&nbsp;</FONT></nobr></TD>
 	<td valign=middle align=left height=40><INPUT TYPE="text" NAME="titleVal" id="advTitle" VALUE= "<%=SearchContext.htmlEncode(formbean.getTitleVal())%>"></TD>
    </TR>

<!--     -->
<!-- To Include the "Keywords" row, unremark the following section -->
<!--        
    <TR>
	<td valign=middle align=right height=40><FONT color=<%=tFontColor%> face=<%=tFontFace%>><nobr> <LABEL FOR="advKeywords">Keywords</LABEL> 
		<SELECT NAME="keywordsOp">
		    <OPTION VALUE=<%=SearchContext.CONTAIN%> <%=formbean.keywordsOpSelection(SearchContext.CONTAIN)%>>does</OPTION>
		    <OPTION VALUE=<%=SearchContext.NOTCONTAIN%> <%=formbean.keywordsOpSelection(SearchContext.NOTCONTAIN)%>>does not</OPTION>
		</SELECT>	
		contain&nbsp;</FONT></nobr></TD>
 	<td valign=middle align=left height=40><INPUT TYPE="text" NAME="keywordsVal" id="advKeywords" VALUE= "<%=SearchContext.htmlEncode(formbean.getKeywordsVal())%>"></TD>
    </TR>
-->

<!--     -->
<!-- To disclude the "author" row, remark out the following section -->
<!--     -->
    <TR>
	<td valign=middle align=right height=40><FONT color=<%=tFontColor%> face=<%=tFontFace%>><nobr> <LABEL FOR="advAuthor">Author</LABEL> 
		<SELECT NAME="authorOp" ID="advAuthor">
		    <OPTION VALUE=<%=SearchContext.CONTAIN%> <%=formbean.authorOpSelection(SearchContext.CONTAIN)%>>does</OPTION>
		    <OPTION VALUE=<%=SearchContext.NOTCONTAIN%> <%=formbean.authorOpSelection(SearchContext.NOTCONTAIN)%>>does not</OPTION>
		</SELECT>	
		contain&nbsp;</FONT></nobr></TD>
 	<td valign=middle align=left height=40><INPUT TYPE="text" NAME="authorVal" id="advAuthor" VALUE= "<%=SearchContext.htmlEncode(formbean.getAuthorVal())%>"></TD>
    </TR>

<!--     -->
<!-- To disclude the "URL" row, remark out the following section -->
    <TR>
	<td valign=middle align=right height=40><FONT color=<%=tFontColor%> face=<%=tFontFace%>><nobr> <LABEL FOR="advUrl">URL</LABEL> 
		<SELECT NAME="urlOp" ID="advUrl">
		    <OPTION VALUE=<%=SearchContext.CONTAIN%> <%=formbean.urlOpSelection(SearchContext.CONTAIN)%>>does</OPTION>
		    <OPTION VALUE=<%=SearchContext.NOTCONTAIN%> <%=formbean.urlOpSelection(SearchContext.NOTCONTAIN)%>>does not</OPTION>
		</SELECT>	
		contain&nbsp;</FONT></nobr></TD>
	<td valign=middle align=left height=40><INPUT TYPE="text" NAME="urlVal" id="advUrl" VALUE= "<%=SearchContext.htmlEncode(formbean.getUrlVal())%>"></TD>
    </TR>

<!--     -->
<!-- To Include the "Expires" row, unremark the following section -->
<!-- 
    <TR>
	<td valign=middle align=right height=40><FONT color=<%=tFontColor%> face=<%=tFontFace%>><nobr> <LABEL FOR="advExpires">Expires</LABEL> 
		<SELECT NAME="expiresOp">
		    <OPTION VALUE=<%=SearchContext.GREATER%> <%=formbean.expiresOpSelection(SearchContext.GREATER)%>>after</OPTION>
		    <OPTION VALUE=<%=SearchContext.LESS%> <%=formbean.expiresOpSelection(SearchContext.LESS)%>>before</OPTION>
		    <OPTION VALUE=<%=SearchContext.EQUAL%> <%=formbean.expiresOpSelection(SearchContext.EQUAL)%>>on</OPTION>
		    <OPTION VALUE=<%=SearchContext.NOTEQUAL%> <%=formbean.expiresOpSelection(SearchContext.NOTEQUAL)%>>not on</OPTION>
		</SELECT>	
		the date&nbsp;</FONT></nobr></TD>
 	<td valign=middle align=left height=40><INPUT TYPE="text" NAME="expiresVal" id="advExpires" VALUE= "<%=SearchContext.htmlEncode(formbean.getExpiresVal())%>"></TD>
    </TR>
-->

    <%-- Discussions --%>
    <tr>
    <td valign=middle align=right height=40><FONT color=<%=tFontColor%> face=<%=tFontFace%>><LABEL FOR="rating">Rated&nbsp;</LABEL></font></td>
    <td valign=middle align=left height=40><FONT color=<%=tFontColor%> face=<%=tFontFace%>>
    <select name="rating" id="rating">
    <option value=-1 <%=formbean.ratingSelection("-1")%>>Irrelevant</option>
    <option value=0 <%=formbean.ratingSelection("0")%>>Routine</option>
    <option value=1 <%=formbean.ratingSelection("1")%>>Interesting</option>
    <option value=2 <%=formbean.ratingSelection("2")%>>Important</option>
    <option value=3 <%=formbean.ratingSelection("3")%>>Must read</option>
    </select> </font></td>
    </tr>
<!--     -->
<!-- To disclude the "Since" row, remark out the following section -->
<!--     -->
	<tr>
 	<td valign=middle align=right height=40><FONT color=<%=tFontColor%> face=<%=tFontFace%>><LABEL FOR="advSince">Since&nbsp;</LABEL> </font></td>
	<td valign=middle align=left height=40><FONT color=<%=tFontColor%> face=<%=tFontFace%>>
	<SELECT NAME="since" id="advSince" > 
	    <OPTION VALUE=0 <%=formbean.sinceSelection("0")%>>forever</OPTION> 
	    <OPTION VALUE=7 <%=formbean.sinceSelection("7")%>>last week</OPTION> 
	    <OPTION VALUE=30 <%=formbean.sinceSelection("30")%>>last month</OPTION> 
	    <OPTION VALUE=180 <%=formbean.sinceSelection("180")%>>last 6 months</OPTION> 
	    <OPTION VALUE=365 <%=formbean.sinceSelection("365")%>>last year</OPTION> 
	</SELECT></FONT></TD> 
    </TR>

    <%@ include file="dbMenu.jsp" %>

    <%@ include file="descMenu.jsp" %>

</TABLE>
