<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Document sans nom</title>
<link rel="stylesheet" style="text/css" href="styleSheet_vert_02.css">
<script src="lib.js"></script>

<script language="JavaScript" type="text/JavaScript">


function go(val)
{
        if (checkForm())
            window.document.gen_info_search.redirection.value =val;
        window.document.gen_info_search.submit();
}

function forward(val)
{
        
        window.document.gen_info_search.redirection.value =val;
        window.document.gen_info_search.submit();
}


function section (param, obj){
        obj.value = param;
        window.document.gen_info_search.submit();  
}


function checkForm()
{
        if ( (window.document.gen_info_search.keywords_timeperiod.value == '') &
        (window.document.gen_info_search.Collector.value == '') &
        (window.document.gen_info_search.terrestrialSiteCountry.value == '') &
        (window.document.gen_info_search.terrestrialSiteLocality.value == '') &
        (window.document.gen_info_search.Scientific_Name.value == '') &
        (window.document.gen_info_search.CommonName.value == '') &
        (window.document.gen_info_search.timePeriodList.value == '0') &

        (window.document.gen_info_search.HigherTaxon.value == '') )
        {
            alert ('Define more criteria. The more criteria you define, the more directed your search results will be.');
            window.document.gen_info_search.redirection.value ="Reset";
            return false;
        }
        return true;
        
}

function reloadQuery(){
     var ID =window.document.reload.querySelection.options.selectedIndex;
     window.document.reload.ID.value = ID;
     if (ID > 0)
        window.document.reload.submit();     

}


</script>

<title>BIOCASE User Interface</title> 
</head>

<%@ page import="gui.common.query.UnitLevelQuery" %>
<%@ page import="java.util.*" %>

<%@ page import="gui.common.settings.UIConst" %>
<%@ page import="gui.common.management.UIManager" %>



<jsp:useBean id="manager" scope="session" class="gui.common.management.UIManager"/> 
<jsp:useBean id="ULQuery" scope="session" class="gui.common.query.UnitLevelQuery"/>
<%manager.setSearchType(UIConst.UL_ADVANCED_SEARCH);%>
<%manager.setScreenID(UIConst.UL_ADVANCED_SEARCH);%>
<%manager.setAdditionalTitle("");%>
<body  topmargin="0">

<div align="center">

<jsp:include page="top.jsp">
	<jsp:param name="Header" value="1" />
</jsp:include>


<%-- **********Main frame table-*********** --%> 
<table width="100%"  border="0" cellpadding="0" cellspacing="0" id="mainframe">
<jsp:include page="title_top.jsp">
	<jsp:param name="Section" value="" />
</jsp:include>
   
 
<%HttpSession currSession = request.getSession();%>


<%String prevAction=request.getParameter("PreviousAction");%>
<%if (prevAction != null){ %>
<%if (prevAction.compareTo("TIME_PERIOD_TABLE") == 0) {%>
<%String [] theListOfStratigraphicKeywords= request.getParameterValues("strati");%>
<%ULQuery.setStratigraphicKeywords(theListOfStratigraphicKeywords);
}
}%>

<%String red=request.getParameter("redirection");
if (red == null)
    red = "displayScreen";
  
if (red.compareTo("Reset") == 0)
{
    ULQuery = new UnitLevelQuery();
    currSession.setAttribute("ULQuery",ULQuery );
    red = "displayScreen";
 }

 if (red.compareTo("ReloadQuery")==0)
  { 
      String idx = request.getParameter("ID");
      ULQuery =  manager.getCurrentULQuery(idx);
      if (idx != null)
        currSession.setAttribute("ULQuery", ULQuery);
      red = "displayScreen";
  }
%>
<%
if (red.compareTo("specimenSearch") == 0)
{
    ULQuery.setKeywordTimeperiod (request.getParameter("keywords_timeperiod"));
    ULQuery.setSpecimenType (request.getParameter("ULTypes"));
    ULQuery.setBoolOperator(request.getParameter("operator1"));
    ULQuery.setCollectorName(request.getParameter("Collector"));
    ULQuery.setterrestrialSiteCountry(request.getParameter("terrestrialSiteCountry"));
    ULQuery.setterrestrialSiteLocality(request.getParameter("terrestrialSiteLocality"));
    ULQuery.setgatheringDateYearFrom (request.getParameter("gatheringDateYearFrom"));
    ULQuery.setgatheringDateYearTo(request.getParameter("gatheringDateYearTo"));
    ULQuery.setkeywordTaxonomic(request.getParameter("Scientific_Name"));
    ULQuery.setkeywordCommon(request.getParameter("CommonName"));
    ULQuery.sethigherTaxon(request.getParameter("HigherTaxon"));
    ULQuery.setImageOnlyOption(request.getParameter("Image"));
    ULQuery.setNbRec(request.getParameter("nbRec"));
    currSession.setAttribute("ULQuery", ULQuery);
    manager.addULQuery(ULQuery);
    manager.dispatch(red,response, request,getServletContext());
 }
%>
    <td width="4" rowspan="2" valign="top">&nbsp;</td>
      <td colspan="2" valign="top">


<form  METHOD= "GET" name="gen_info_search">
<INPUT TYPE = "hidden" value= "<%=ULQuery.getStratigraphicKeywords().size()%>" NAME= "timePeriodList">
<INPUT TYPE = "hidden" value= "vide" NAME= "redirection">
<INPUT TYPE = "hidden" value= "empty" NAME= "ID">





  <%
if (red.compareTo("displayScreen") == 0)  
{
%>



<table width="100%"  border="0" cellpadding="0" cellspacing="2">
<tr>
<TD COLSPAN=6 CLASS= "titre" bgcolor="#F5F7C3" >
<div align="left"><%=manager.getText("ul_adv_search_taxon")%></DIV>
<TR bgcolor="#FFFFEE" VALIGN = "MIDDLE">
<td CLASS="texte"  align=right width="200">
<%=manager.getText("ul_adv_search_taxon_name")%>
<td ALIGN= "LEFT">
<a href="#"><img src="img/picto_Help__vert_02.gif" 
alt="<%=manager.getText("ul_adv_search_h_scient_name")%>" 
width="15" height="15" border="0" align="left" onClick="<%=manager.openHelpFile("HELP_SEARCH_UL_ADVANCED_SEARCH_TAXON_NAME")%>"></a></td>
<td CLASS="texte"  align="LEFT">
<INPUT NAME= "Scientific_Name" SIZE="40" 
VALUE="<%=ULQuery.getkeywordTaxonomic()%>" class="queryLill2">			
</TD>
<td CLASS="texte"  align=right STYLE ="width: 9%;">
<%=manager.getText("ul_adv_search_taxon_higher_name")%>

<td ALIGN= "LEFT"><a href="#"><img src="img/picto_Help__vert_02.gif" 
alt="<%=manager.getText("ul_adv_search_h_higher_taxon")%>" 
width="15" height="15" border="0" align="left" onClick="<%=manager.openHelpFile("HELP_SEARCH_UL_ADVANCED_SEARCH_HIGHER_TAXON")%>"></a></td>
<td ALIGN= "LEFT"><INPUT NAME= "HigherTaxon" SIZE="40" VALUE="<%=ULQuery.gethigherTaxon()%>" 
class="queryLill2">
</td><BR>
<tr bgcolor="#FFFFEE"><td COLSPAN=6>&nbsp;
<TR bgcolor="#FFFFEE" VALIGN = "MIDDLE">
<td CLASS="texte"  align=right width="200">
<%=manager.getText("ul_adv_search_common_name_label")%>
<td ALIGN= "LEFT"><a href="#"><img src="img/picto_Help__vert_02.gif" 
alt="<%=manager.getText("ul_adv_search_h_common_name")%>" 
onClick="<%=manager.openHelpFile("HELP_SEARCH_UL_ADVANCED_SEARCH_COMMON_NAME")%>" width="15" height="15" border="0" align="left"></a></td>
<td ALIGN= "LEFT"><INPUT type = "text" name="CommonName" SIZE="40" class="queryLill2" 
VALUE="<%=ULQuery.getkeywordCommon()%>"><td><td><td>
<tr bgcolor="#FFFFEE"><td COLSPAN=6>&nbsp;
<TR ALIGN= "LEFT" VALIGN = "MIDDLE"><TD COLSPAN=6  CLASS= "titre" bgcolor="#F5F7C3" >
<%=manager.getText("ul_adv_search_description")%></font>
<TR bgcolor="#FFFFEE" VALIGN = "MIDDLE">
<td CLASS="texte" align=right 
width="200" class="queryLill"><%=manager.getText("ul_adv_search_timeperiod")%>
<td><a href="#">
<img src="img/picto_Help__vert_02.gif" 
alt="<%=manager.getText("ul_adv_search_h_timeperiod")%>" 
onClick="<%=manager.openHelpFile("HELP_SEARCH_UL_ADVANCED_SEARCH_TIMEPERIOD")%>" width="15" height="15" border="0" align="right"></a></td>
<TD CLASS="texte" ALIGN= "LEFT"><INPUT TYPE="TEXT" SIZE="40"
NAME="keywords_timeperiod" class="queryLill2" 
VALUE="<%=ULQuery.getKeywordTimeperiod()%>"> 
<INPUT TYPE="button" class = "btn" onClick="javascript:forward('TimeStrati')" 
VALUE= "Time scale">
<td CLASS="texte" align=right STYLE ="width: 9%;">
<%=manager.getText("ul_adv_search_status")%>
<td ALIGN= "LEFT"><a href="#"><img src="img/picto_Help__vert_02.gif" 
onClick="<%=manager.openHelpFile("HELP_SEARCH_UL_ADVANCED_SEARCH_INCLUDES_TYPES")%>" alt="<%=manager.getText("ul_adv_search_h_status")%>" 
width="15" height="15" border="0" align="left"></a></td>
<td CLASS="texte" ALIGN= "LEFT"><input type="CHECKBOX" 
CLASS = "radio_form_elem" NAME="ULTypes" 
VALUE="yes" <%=manager.specimen_typeCheckBoxState("yes", ULQuery)%> >yes
<tr bgcolor="#FFFFEE"><td COLSPAN=6>&nbsp;
<TR VALIGN = "MIDDLE">
<TD COLSPAN=6 CLASS= "titre" bgcolor="#F5F7C3" ALIGN= "LEFT">
<%=manager.getText("ul_adv_search_gathering_info")%>
<tr bgcolor="#FFFFEE" VALIGN = "MIDDLE">
<td  width="200"CLASS="texte" align=right>
<%=manager.getText("ul_adv_search_country")%>
<td ALIGN= "LEFT"><a href="#"><img src="img/picto_Help__vert_02.gif" 
onClick="<%=manager.openHelpFile("HELP_SEARCH_UL_ADVANCED_SEARCH_CONTRY")%>" alt="<%=manager.getText("ul_adv_search_h_country")%>" width="15" 
height="15" border="0" align="left">
</a></td>
 <td ALIGN= "LEFT"><%=manager.displayCountriesInput(ULQuery.getterrestrialSiteCountry())%>
<td CLASS="texte" align=right>
    <%=manager.getText("ul_adv_search_locality")%>
<td ALIGN= "LEFT">
<a href="#"><img src="img/picto_Help__vert_02.gif" 
onClick="<%=manager.openHelpFile("HELP_SEARCH_UL_ADVANCED_SEARCH_LOCALITY")%>" alt="<%=manager.getText("ul_adv_search_h_locality")%>" 
width="15" height="15" border="0" align="left"></a></td>
<td ALIGN= "LEFT">   
<INPUT TYPE="TEXT" SIZE="40" NAME="terrestrialSiteLocality" class="queryLill2" 
VALUE="<%=ULQuery.getterrestrialSiteLocality()%>">
<tr bgcolor="#FFFFEE"><td COLSPAN=6>&nbsp;
<TR bgcolor="#FFFFEE" VALIGN = "MIDDLE">               
<td CLASS="texte" align=right STYLE ="width: 9%;">
<%=manager.getText("ul_adv_search_date_from")%><td ALIGN= "LEFT">
 <a href="#"><img src="img/picto_Help__vert_02.gif" 
onClick="<%=manager.openHelpFile("HELP_SEARCH_UL_ADVANCED_SEARCH_DATES")%>" alt="<%=manager.getText("ul_adv_search_h_date")%>" 
width="15" height="15" border="0" align="left"></a></td>
<td CLASS="texte" ALIGN= "LEFT">
<INPUT TYPE="TEXT" SIZE = "4" MAXLENGTH="4" NAME="gatheringDateYearFrom" 
VALUE="<%=ULQuery.getgatheringDateYearFrom()%>" 
onKeyUp="verifNum(this)" class="queryLill2"> 
<%=manager.getText("ul_adv_search_date_to")%> 
<INPUT TYPE="TEXT" SIZE = "4" MAXLENGTH="4" onKeyUp="verifNum(this)" 
NAME="gatheringDateYearTo" VALUE="<%=ULQuery.getgatheringDateYearTo()%>" class="queryLill2">
<td width="200" CLASS="texte" align="right"><%=manager.getText("ul_adv_search_collector_name")%>
<td ALIGN= "LEFT">
<a href="#"><img src="img/picto_Help__vert_02.gif" 
onClick="<%=manager.openHelpFile("HELP_SEARCH_UL_ADVANCED_SEARCH_COLLECTOR")%>" alt="<%=manager.getText("ul_adv_search_h_collector")%>" 
width="15" height="15" border="0" align="left"></a></td>
<td ALIGN= "LEFT"><INPUT TYPE="TEXT" NAME="Collector" SIZE = "40" class="queryLill2">
<tr bgcolor="#FFFFEE"><td COLSPAN=6>&nbsp;
<TR VALIGN = "MIDDLE">
<TD COLSPAN=6 CLASS= "titre" bgcolor="#F5F7C3" ALIGN= "LEFT">
<%=manager.getText("options")%>
<tr bgcolor="#FFFFEE" VALIGN = "MIDDLE">
<td  width="200"CLASS="texte" align=right>
<%=manager.getText("records_with_image_only")%>
<td ALIGN= "LEFT"><a href="#"><img src="img/picto_Help__vert_02.gif" 
onClick="<%=manager.openHelpFile("HELP_SEARCH_UL_ADVANCED_SEARCH_IMAGES")%>" alt="<%=manager.getText("records_with_image_only")%>" width="15" 
height="15" border="0" align="left">
</a></td>
 <td ALIGN= "LEFT">
<INPUT TYPE=CHECKBOX CLASS = "radio_form_elem" NAME="Image" VALUE="yes">
<tr bgcolor="#FFFFEE"><td COLSPAN=6>&nbsp;
<tr VALIGN = "MIDDLE">
<td height="15" colspan="6" background="img/degrade__vert_02.gif"></td></tr>


<TR bgcolor="#F5F7C3" VALIGN = "MIDDLE">
<TD CLASS="texte"bgcolor="#F5F7C3" COLSPAN=6>
<DIV ALIGN ="LEFT"><%=manager.getText("corm_adv_search.operator")%>
<%out.println (manager.getOperatorCheckBox(ULQuery.getBoolOperator()));%>
&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
<%=manager.getText("record_number")%>
<SELECT class="queryLill2" Name="nbRec">
<OPTION VALUE=10>10
<OPTION VALUE=20>20
<OPTION VALUE=50>50
<OPTION VALUE=100>100
</SELECT>
</DIV>
<INPUT TYPE="button" CLASS = "btn" VALUE= "<%=manager.getText("btn_Search")%>" 
onClick='go("specimenSearch")' TITLE= "<%=manager.getText("btn_Search_t")%>" 
onMouseOver="BtnOver(this)" onMouseOut="BtnOut(this)"
NAMe="Submit">
<INPUT TYPE="button" CLASS = "btn" VALUE= "<%=manager.getText("btn_New_Query")%>" TITLE= "<%=manager.getText("btn_New_Query_t")%>"
onClick='resetQuery(document.gen_info_search.redirection,document.gen_info_search)' onMouseOver="BtnOver(this)" onMouseOut="BtnOut(this)">

</table>
<jsp:include page="bottom.jsp">
	<jsp:param name="Header" value="1" />
</jsp:include>

<% }
else manager.dispatch(red,response, request,getServletContext());
    %>


</FORM>
</div>
</body>
</html>