<!--与分页有关的参数-->
<jsp:useBean id="pager" class="com.keyshop.pub.util.Pager" scope="request"/>
<input type="hidden" name="maxRecNoPerPage" value="<%=pager.getRowsPerPage()%>"/>
<input type="hidden" name="recordNumber" value="<%=pager.getTotalRow()%>"/>

<html:hidden property="orderbyType"/>
<!--用Bean标签得到一个Bean 对象，范围为request, id为pager-->


<script>
  function select(act) {
    currentPage = parseInt(document.all['currentPageNo'].value);
    var toPage;
    if(act == "jump") {
      toPage= parseInt(document.all.toPage.value);
    }else if(act == "prev") {
	    toPage = currentPage - 1;
    }else if(act == "next"){
	    toPage = currentPage + 1 ;
    }
    document.all.currentPageNo.value = toPage;
    document.all.actionType.value = "qiantailist";
    document.fgProductSearchForm.submit();
  }
  
  function jump(page) {
  	document.all.toPage.value=page;
  	document.all.currentPageNo.value=page;
  	document.fgProductSearchForm.submit();
  }
  
  function orderby(orderbyType) {
  	document.all.orderbyType.value=orderbyType;
  	document.fgProductSearchForm.submit();
  }
  
</script>
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0" class="midIndex_title00table">
  <tr> 
    <td width="600">
    		<%
				if(parentCategoryList != null && parentCategoryList.size()  >0 ) {
					for(int i=parentCategoryList.size()-1; i>=0; i--) {
						String[] cs = (String[])parentCategoryList.get(i);
			%>
					<%
						if(i != parentCategoryList.size()-1) {
					%>
						&gt;
					<%
						}
					%>
					
					<%
						if(i == 0 && !StringUtil.isEmpty(cs[1]) && !StringUtil.isEmpty(cs[0])) {
					%>
						<a href="<%=PRODUCTLIST%>&categoryId=<%=cs[0]%>">
							<span class="detail_titleN">
								<%=cs[1]%>
							</span>
						</a>
					<%
						} else if(!StringUtil.isEmpty(cs[1]) && !StringUtil.isEmpty(cs[0])){
							String url = PRODUCTLIST + "&categoryId=" + cs[0];
							
							if (!StringUtil.isEmpty(cs[2])) {
								url = CONTEXT + "/" + cs[2];
							}
					%>
						<a href="<%=url%>">
							<span class="detail_title">
								<%=cs[1]%>
							</span>
						</a>
					<%
						}
					%>
			<%
					}
				}
			%>
    </td>
  </tr>
</table>
<table width="600"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="list_tdline"></td>
  </tr>
  <tr>
    <td class="list_tdcenter" height="25">&nbsp;
    	共<%=pager.getTotalRow()%>条&nbsp;&nbsp;分<%=pager.getTotalPage()%>页显示&nbsp;&nbsp;<a href="javascript:jump('1')">首页</a>&nbsp;<% if(pager.getCurrentPage()>1){%><a href="javascript:select('prev')">上 一 页</a><%} else {%>上 一 页<%} %>&nbsp;<% if(pager.getTotalPage()>pager.getCurrentPage()){%><a href="javascript:select('next')">下 一 页</a><%} else {%> 下 一 页<%} %> &nbsp;<a href="javascript:jump('<%=pager.getTotalPage()%>')">末页</a>&nbsp;&nbsp;<input name="toPage" type="text" size="2" value="<%=fgProductSearchForm.getCurrentPageNo()%>" maxlength="5"/> <input type="button" onclick="javascript:jump(document.all['toPage'].value)"  value="GO"> 
      <select name="orderby1" onChange='javascript:orderby(this.value)'>
        <option value='1' <%="1".equals(fgProductSearchForm.getOrderbyType()) ? "selected":""%>>按价格由低至高</option>
        <option value='2' <%="2".equals(fgProductSearchForm.getOrderbyType()) ? "selected":""%>>按价格由高至低</option>
        <option value='3' <%="3".equals(fgProductSearchForm.getOrderbyType()) ? "selected":""%>>按名称正向</option>
        <option value='4' <%="4".equals(fgProductSearchForm.getOrderbyType()) ? "selected":""%>>按名称逆向</option>
      </select>
    </td>
  </tr>
  <tr>
    <td class="list_tdline"></td>
  </tr>
</table>
      

