<%
''''''''''''''''''''''''''''''''''''''''''''''
''                 分页显示                 ''
''       Powered By Jeansecool Studio       ''
''''''''''''''''''''''''''''''''''''''''''''''

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''分面开始
Function GetPagePath()
	Dim sName
	sName = Request.ServerVariables("Script_Name")
	If Left(sName,1) <> "/" Then
		sName = "/" & sName
	End If
	GetPagePath = sName
End Function

Function GetParams()
	Dim sParam,sPArray,sString(1),iTI
	sParam = Request.ServerVariables("Query_String")
	If sParam = "" Then
		sString(0) = ""
		sString(1) = ""
		GetParams = sString
		Exit Function
	End If
	sPArray = Split(sParam,"&")
	For iTI = 0 TO UBound(sPArray)
		If LCase(Split(sPArray(iTi),"=")(0)) <> "p" AND LCase(Split(sPArray(iTi),"=")(0)) <> "t" AND LCase(Split(sPArray(iTi),"=")(0)) <> "x" AND LCase(Split(sPArray(iTi),"=")(0)) <> "y" Then
		sString(0) = sString(0) & "&" & sPArray(iTi)
		sString(1) = sString(1) & "<input type=""hidden"" name=""" & Split(sPArray(iTi),"=")(0) & """ value=""" & Split(sPArray(iTi),"=")(1) & """>"
		End If
	Next
	GetParams = sString
End Function

Function PagerNumeric(PageIndex, PageSize, PageCount, TotalCount)
	Dim strBody,ParamsArray,PagePath,TempIIndex,PagerNoSize,PagerNoCount
	If TotalCount < 1 Then
		PagerNumeric = ""
		Exit Function
	End If
	If PageIndex >= 1000 Then
		PagerNumeric = PagerNumeric3(PageIndex, PageSize, PageCount, TotalCount)
		Exit Function
	ElseIf PageIndex >= 100 Then
		PagerNumeric = PagerNumeric2(PageIndex, PageSize, PageCount, TotalCount)
		Exit Function
	End If
	PagePath = GetPagePath
	ParamsArray = GetParams
	TempIIndex = 0
	PagerNoSize = 10
	strBody = "<table border=""0"" width=""100%"" cellpadding=""0"" cellspacing=""0""><form id=""PagerNumeric_Form"" method=""get"" action=""" & PagePath & """ onsubmit=""if (this.p.value=='') {alert('请输入页数！');this.p.focus();return false;} else {return true;}"">" & ParamsArray(1) & "<tr>"
	strBody = strBody & "<td align=""left"" width=""33%"" nowrap>&nbsp;共 " & TotalCount & " 条 第 " & PageIndex & " / " & PageCount & " 页</td><td align=""center"" width=""34%"" nowrap>"
	If PageIndex > 1 Then
		strBody = strBody & "<a href=""" & PagePath & "?p=1&t=" & TotalCount & ParamsArray(0) & """><img src=""../images/pager_first.gIf"" border=""0"" align=""absmiddle"" alt=""第一页""></a>&nbsp;<a href=""" & PagePath & "?p=" & (PageIndex - 1) & "&t=" & TotalCount & ParamsArray(0) & """><img src=""../images/pager_prev.gIf"" border=""0"" align=""absmiddle"" alt=""上一页""></a>&nbsp;"
	Else
		strBody = strBody & "<img src=""../images/pager_first.gIf"" border=""0"" align=""absmiddle"" alt=""第一页""></a>&nbsp;<img src=""../images/pager_prev.gIf"" border=""0"" align=""absmiddle"" alt=""上一页""></a>&nbsp;"
	End If
	If PageCount <= PagerNoSize Then
		FOR TempIIndex = 1 TO PageCount
			If TempIIndex = PageIndex Then
				strBody = strBody & "<b>" & TempIIndex & "</b>&nbsp;"
			Else
				strBody = strBody & "<a href=""" & PagePath & "?p=" & TempIIndex & "&t=" & TotalCount & ParamsArray(0) & """>" & TempIIndex & "</a>&nbsp;"
			End If
		Next
	Else
		PagerNoCount = PageIndex \ PagerNoSize
		If PageIndex MOD PagerNoSize = 0 Then
			PagerNoCount = PagerNoCount - 1
		End If
		If PageIndex > PagerNoSize Then
			strBody = strBody & "<a href=""" & PagePath & "?p=" & (PagerNoCount * PagerNoSize) & "&t=" & TotalCount & ParamsArray(0) & """>...</a>&nbsp;"
		End If
		FOR TempIIndex = PagerNoCount * PagerNoSize + 1 TO (PagerNoCount + 1) * PagerNoSize
			If TempIIndex <= PageCount Then
				If TempIIndex = PageIndex Then
					strBody = strBody & "<b>" & TempIIndex & "</b>&nbsp;"
				Else
					strBody = strBody & "<a href=""" & PagePath & "?p=" & TempIIndex & "&t=" & TotalCount & ParamsArray(0) & """>" & TempIIndex & "</a>&nbsp;"
				End If
			Else
				Exit FOR
			End If
		Next
		If PageCount - PageCount MOD PagerNoSize > 0 Then
			If PageIndex <= (PageCount - PageCount MOD PagerNoSize) Then
				strBody = strBody & "<a href=""" & PagePath & "?p=" & ((PagerNoCount + 1) * PagerNoSize + 1) & "&t=" & TotalCount & ParamsArray(0) & """>...</a>&nbsp;"
			End If
		Else
			If PageIndex - PagerNoSize <= (PageCount - PageCount MOD PagerNoSize) Then
				strBody = strBody & "<a href=""" & PagePath & "?p=" & ((PagerNoCount + 1) * PagerNoSize + 1) & "&t=" & TotalCount & ParamsArray(0) & """>...</a>&nbsp;"
			End If
		End If
	End If
	If PageIndex < PageCount Then
		strBody = strBody & "<a href=""" & PagePath & "?p=" & (PageIndex + 1) & "&t=" & TotalCount & ParamsArray(0) & """><img src=""../images/pager_next.gIf"" border=""0"" align=""absmiddle"" alt=""下一页""></a>&nbsp;<a href=""" & PagePath & "?p=" & PageCount & "&t=" & TotalCount & ParamsArray(0) & """><img src=""../images/pager_last.gIf"" border=""0"" align=""absmiddle"" alt=""最末页""></a>"
	Else
		strBody = strBody & "<img src=""../images/pager_next.gIf"" border=""0"" align=""absmiddle"" alt=""下一页""></a>&nbsp;<img src=""../images/pager_last.gIf"" border=""0"" align=""absmiddle"" alt=""最末页""></a>"
	End If
	strBody = strBody & "</td><td align=""right"" width=""33%"" nowrap>转到 <input type=""text"" onchange=""this.value=this.value.replace(/\D/gi,'')"" name=""p"" value=""" & PageIndex & """ size=""2"" class=""inbox""><input type=""hidden"" name=""t"" value=""" & TotalCount & """> <input type=""image"" src=""../images/go.gIf"" border=""0"" align=""absmiddle"">&nbsp;</td></tr></fORm></table>"
	PagerNumeric = strBody
End Function

Function PagerNumeric2(PageIndex, PageSize, PageCount, TotalCount)
	Dim strBody,ParamsArray,PagePath,TempIIndex,PagerNoSize,PagerNoCount
	If TotalCount < 1 Then
		PagerNumeric2 = ""
		Exit Function
	End If
	If PageIndex >= 1000 Then
		PagerNumeric2 = PagerNumeric3(PageIndex, PageSize, PageCount, TotalCount)
		Exit Function
	ElseIf PageIndex < 100 Then
		PagerNumeric2 = PagerNumeric(PageIndex, PageSize, PageCount, TotalCount)
		Exit Function
	End If
	PagePath = GetPagePath
	ParamsArray = GetParams
	TempIIndex = 0
	PagerNoSize = 10
	strBody = "<table border=""0"" width=""100%"" cellpadding=""0"" cellspacing=""0""><form id=""PagerNumeric_Form"" method=""get"" action=""" & PagePath & """ onsubmit=""if (this.p.value=='') {alert('请输入页数！');this.p.focus();return false;} else {return true;}"">" & ParamsArray(1) & "<tr>"
	strBody = strBody & "<td align=""left"">&nbsp;共<font class=""entxt""> " & TotalCount & " </font>条 第<font class=""entxt""> " & PageIndex & " / " & PageCount & " </font>页</td><td align=""center"" class=""entxt f12"">"
	If PageIndex > 1 Then
		strBody = strBody & "<a href=""" & PagePath & "?p=1&t=" & TotalCount & ParamsArray(0) & """><img src=""../images/pager_first.gIf"" border=""0"" align=""absmiddle"" alt=""第一页""></a>&nbsp;<a href=""" & PagePath & "?p=" & (PageIndex - 1) & "&t=" & TotalCount & ParamsArray(0) & """><img src=""../images/pager_prev.gIf"" border=""0"" align=""absmiddle"" alt=""上一页""></a>&nbsp;"
	Else
		strBody = strBody & "<img src=""../images/pager_first.gIf"" border=""0"" align=""absmiddle"" alt=""第一页""></a>&nbsp;<img src=""../images/pager_prev.gIf"" border=""0"" align=""absmiddle"" alt=""上一页""></a>&nbsp;"
	End If
	If PageCount <= PagerNoSize Then
		FOR TempIIndex = 1 TO PageCount
			If TempIIndex = PageIndex Then
				strBody = strBody & "<b>" & TempIIndex & "</b>&nbsp;"
			Else
				strBody = strBody & "<a href=""" & PagePath & "?p=" & TempIIndex & "&t=" & TotalCount & ParamsArray(0) & """>" & TempIIndex & "</a>&nbsp;"
			End If
		Next
	Else
		PagerNoCount = PageIndex \ PagerNoSize
		If PageIndex MOD PagerNoSize = 0 Then
			PagerNoCount = PagerNoCount - 1
		End If
		If PageIndex > PagerNoSize Then
			strBody = strBody & "<a href=""" & PagePath & "?p=" & (PagerNoCount * PagerNoSize) & "&t=" & TotalCount & ParamsArray(0) & """>...</a>&nbsp;"
		End If
		FOR TempIIndex = PagerNoCount * PagerNoSize + 1 TO (PagerNoCount + 1) * PagerNoSize
			If TempIIndex <= PageCount Then
				If TempIIndex = PageIndex Then
					strBody = strBody & "<b>" & TempIIndex & "</b>&nbsp;"
				Else
					strBody = strBody & "<a href=""" & PagePath & "?p=" & TempIIndex & "&t=" & TotalCount & ParamsArray(0) & """>" & TempIIndex & "</a>&nbsp;"
				End If
			Else
				Exit FOR
			End If
		Next
		If PageIndex <= (PageCount - PageCount MOD PagerNoSize) Then
			strBody = strBody & "<a href=""" & PagePath & "?p=" & ((PagerNoCount + 1) * PagerNoSize + 1) & "&t=" & TotalCount & ParamsArray(0) & """>...</a>&nbsp;"
		End If
	End If
	If PageIndex < PageCount Then
		strBody = strBody & "<a href=""" & PagePath & "?p=" & (PageIndex + 1) & "&t=" & TotalCount & ParamsArray(0) & """><img src=""../images/pager_next.gIf"" border=""0"" align=""absmiddle"" alt=""下一页""></a>&nbsp;<a href=""" & PagePath & "?p=" & PageCount & "&t=" & TotalCount & ParamsArray(0) & """><img src=""../images/pager_last.gIf"" border=""0"" align=""absmiddle"" alt=""最末页""></a>"
	Else
		strBody = strBody & "<img src=""../images/pager_next.gIf"" border=""0"" align=""absmiddle"" alt=""下一页""></a>&nbsp;<img src=""../images/pager_last.gIf"" border=""0"" align=""absmiddle"" alt=""最末页""></a>"
	End If
	strBody = strBody & "</td><td align=""right"">转到 <input type=""text"" onchange=""this.value=this.value.replace(/\D/gi,'')"" name=""p"" value=""" & PageIndex & """ size=""2"" class=""inbox""><input type=""hidden"" name=""t"" value=""" & TotalCount & """> <input type=""image"" src=""../images/go.gIf"" border=""0"" align=""absmiddle"">&nbsp;</td></tr></fORm></table>"
	PagerNumeric2 = strBody
End Function

Function PagerNumeric3(PageIndex, PageSize, PageCount, TotalCount)
	Dim strBody,ParamsArray,PagePath,TempIIndex,PagerNoSize,PagerNoCount
	If TotalCount < 1 Then
		PagerNumeric3 = ""
		Exit Function
	End If
	If PageIndex < 1000 And PageIndex >= 100 Then
		PagerNumeric3 = PagerNumeric2(PageIndex, PageSize, PageCount, TotalCount)
		Exit Function
	ElseIf PageIndex < 100 Then
		PagerNumeric3 = PagerNumeric(PageIndex, PageSize, PageCount, TotalCount)
		Exit Function
	End If
	PagePath = GetPagePath
	ParamsArray = GetParams
	TempIIndex = 0
	PagerNoSize = 10
	strBody = "<table border=""0"" width=""100%"" cellpadding=""0"" cellspacing=""0""><form id=""PagerNumeric_Form"" method=""get"" action=""" & PagePath & """ onsubmit=""if (this.p.value=='') {alert('请输入页数！');this.p.focus();return false;} else {return true;}"">" & ParamsArray(1) & "<tr>"
	strBody = strBody & "<td align=""left"">&nbsp;共<font class=""entxt""> " & TotalCount & " </font>条</td><td align=""center"" class=""entxt f12"">"
	If PageIndex > 1 Then
		strBody = strBody & "<a href=""" & PagePath & "?p=1&t=" & TotalCount & ParamsArray(0) & """><img src=""../images/pager_first.gIf"" border=""0"" align=""absmiddle"" alt=""第一页""></a>&nbsp;<a href=""" & PagePath & "?p=" & (PageIndex - 1) & "&t=" & TotalCount & ParamsArray(0) & """><img src=""../images/pager_prev.gIf"" border=""0"" align=""absmiddle"" alt=""上一页""></a>&nbsp;"
	Else
		strBody = strBody & "<img src=""../images/pager_first.gIf"" border=""0"" align=""absmiddle"" alt=""第一页""></a>&nbsp;<img src=""../images/pager_prev.gIf"" border=""0"" align=""absmiddle"" alt=""上一页""></a>&nbsp;"
	End If
	If PageCount <= PagerNoSize Then
		FOR TempIIndex = 1 TO PageCount
			If TempIIndex = PageIndex Then
				strBody = strBody & "<b>" & TempIIndex & "</b>&nbsp;"
			Else
				strBody = strBody & "<a href=""" & PagePath & "?p=" & TempIIndex & "&t=" & TotalCount & ParamsArray(0) & """>" & TempIIndex & "</a>&nbsp;"
			End If
		Next
	Else
		PagerNoCount = PageIndex \ PagerNoSize
		If PageIndex MOD PagerNoSize = 0 Then
			PagerNoCount = PagerNoCount - 1
		End If
		If PageIndex > PagerNoSize Then
			strBody = strBody & "<a href=""" & PagePath & "?p=" & (PagerNoCount * PagerNoSize) & "&t=" & TotalCount & ParamsArray(0) & """>...</a>&nbsp;"
		End If
		FOR TempIIndex = PagerNoCount * PagerNoSize + 1 TO (PagerNoCount + 1) * PagerNoSize
			If TempIIndex <= PageCount Then
				If TempIIndex = PageIndex Then
					strBody = strBody & "<b>" & TempIIndex & "</b>&nbsp;"
				Else
					strBody = strBody & "<a href=""" & PagePath & "?p=" & TempIIndex & "&t=" & TotalCount & ParamsArray(0) & """>" & TempIIndex & "</a>&nbsp;"
				End If
			Else
				Exit FOR
			End If
		Next
		If PageIndex <= (PageCount - PageCount MOD PagerNoSize) Then
			strBody = strBody & "<a href=""" & PagePath & "?p=" & ((PagerNoCount + 1) * PagerNoSize + 1) & "&t=" & TotalCount & ParamsArray(0) & """>...</a>&nbsp;"
		End If
	End If
	If PageIndex < PageCount Then
		strBody = strBody & "<a href=""" & PagePath & "?p=" & (PageIndex + 1) & "&t=" & TotalCount & ParamsArray(0) & """><img src=""../images/pager_next.gIf"" border=""0"" align=""absmiddle"" alt=""下一页""></a>&nbsp;<a href=""" & PagePath & "?p=" & PageCount & "&t=" & TotalCount & ParamsArray(0) & """><img src=""../images/pager_last.gIf"" border=""0"" align=""absmiddle"" alt=""最末页""></a>"
	Else
		strBody = strBody & "<img src=""../images/pager_next.gIf"" border=""0"" align=""absmiddle"" alt=""下一页""></a>&nbsp;<img src=""../images/pager_last.gIf"" border=""0"" align=""absmiddle"" alt=""最末页""></a>"
	End If
	strBody = strBody & "</td><td align=""right"">转到 <input type=""text"" onchange=""this.value=this.value.replace(/\D/gi,'')"" name=""p"" value=""" & PageIndex & """ size=""2"" class=""inbox""><input type=""hidden"" name=""t"" value=""" & TotalCount & """> <input type=""image"" src=""../images/go.gIf"" border=""0"" align=""absmiddle"">&nbsp;</td></tr></fORm></table>"
	PagerNumeric3 = strBody
End Function

Function PagerNumber(PageIndex, PageSize, PageCount, TotalCount)
	Dim strBody,ParamsArray,PagePath,TempIIndex,PagerNoSize,PagerNoCount
	If TotalCount < 1 Then
		PagerNumber = ""
		Exit Function
	End If
	If PageIndex >= 1000 Then
		PagerNumber = PagerNumber3(PageIndex, PageSize, PageCount, TotalCount)
		Exit Function
	ElseIf PageIndex >= 100 Then
		PagerNumber = PagerNumber2(PageIndex, PageSize, PageCount, TotalCount)
		Exit Function
	End If
	PagePath = GetPagePath
	ParamsArray = GetParams
	TempIIndex = 0
	PagerNoSize = 10
	strBody = "<table border=""0"" width=""100%"" cellpadding=""0"" cellspacing=""0""><form id=""PagerNumeric_Form"" method=""get"" action=""" & PagePath & """ onsubmit=""if (this.p.value=='') {alert('请输入页数！');this.p.focus();return false;} else {return true;}"">" & ParamsArray(1) & "<tr>"
	strBody = strBody & "<td align=""left"" width=""33%"" nowrap>&nbsp;共<font class=""entxt""> " & TotalCount & " </font>条 每页<font class=""entxt""> " & PageSize & " </font>条 第<font class=""entxt""> " & PageIndex & " / " & PageCount & " </font>页</td><td align=""center"" class=""entxt f12"" width=""34%"" nowrap>"
	If PageIndex > 1 Then
		strBody = strBody & "<a href=""" & PagePath & "?p=1&t=" & TotalCount & ParamsArray(0) & """ class=""a"">首页</a>&nbsp;<a href=""" & PagePath & "?p=" & (PageIndex - 1) & "&t=" & TotalCount & ParamsArray(0) & """ class=""a"">上页</a>&nbsp;"
	Else
		strBody = strBody & "首页&nbsp;上页&nbsp;"
	End If
	If PageCount <= PagerNoSize Then
		FOR TempIIndex = 1 TO PageCount
			If TempIIndex = PageIndex Then
				strBody = strBody & "<b>" & TempIIndex & "</b>&nbsp;"
			Else
				strBody = strBody & "<a href=""" & PagePath & "?p=" & TempIIndex & "&t=" & TotalCount & ParamsArray(0) & """ class=""a"">" & TempIIndex & "</a>&nbsp;"
			End If
		Next
	Else
		If PageIndex <= PagerNoSize \ 2 Then
			FOR TempIIndex = 1 TO PagerNoSize
				If TempIIndex = PageIndex Then
					strBody = strBody & "<b>" & TempIIndex & "</b>&nbsp;"
				Else
					strBody = strBody & "<a href=""" & PagePath & "?p=" & TempIIndex & "&t=" & TotalCount & ParamsArray(0) & """ class=""a"">" & TempIIndex & "</a>&nbsp;"
				End If
			Next
		Else
			PagerNoCount = PageIndex + PagerNoSize \ 2
			If PagerNoCount <= PageCount Then
				FOR TempIIndex = PageIndex - PagerNoSize \ 2 + 1 TO PagerNoCount
					If TempIIndex = PageIndex Then
						strBody = strBody & "<b>" & TempIIndex & "</b>&nbsp;"
					Else
						strBody = strBody & "<a href=""" & PagePath & "?p=" & TempIIndex & "&t=" & TotalCount & ParamsArray(0) & """ class=""a"">" & TempIIndex & "</a>&nbsp;"
					End If
				Next
			Else
				FOR TempIIndex = PageIndex - PagerNoSize \ 2 + 1 + PageCount - PagerNoCount TO PageCount
					If TempIIndex = PageIndex Then
						strBody = strBody & "<b>" & TempIIndex & "</b>&nbsp;"
					Else
						strBody = strBody & "<a href=""" & PagePath & "?p=" & TempIIndex & "&t=" & TotalCount & ParamsArray(0) & """ class=""a"">" & TempIIndex & "</a>&nbsp;"
					End If
				Next
			End If
		End If
	End If
	If PageIndex < PageCount Then
		strBody = strBody & "<a href=""" & PagePath & "?p=" & (PageIndex + 1) & "&t=" & TotalCount & ParamsArray(0) & """ class=""a"">下页&nbsp;<a href=""" & PagePath & "?p=" & PageCount & "&t=" & TotalCount & ParamsArray(0) & """ class=""a"">末页</a>"
	Else
		strBody = strBody & "下页&nbsp;末页"
	End If
	strBody = strBody & "</td><td align=""right"">转到 <input type=""text"" onchange=""this.value=this.value.replace(/\D/gi,'')"" name=""p"" value=""" & PageIndex & """ size=""2"" class=""inbox""><input type=""hidden"" name=""t"" value=""" & TotalCount & """> <input type=""image"" src=""../images/go.gIf"" border=""0"" align=""absmiddle"">&nbsp;</td></tr></fORm></table>"
	PagerNumber = strBody
End Function

Function PagerNumber2(PageIndex, PageSize, PageCount, TotalCount)
	Dim strBody,ParamsArray,PagePath,TempIIndex,PagerNoSize,PagerNoCount
	If TotalCount < 1 Then
		PagerNumber2 = ""
		Exit Function
	End If
	If PageIndex >= 1000 Then
		PagerNumber2 = PagerNumber3(PageIndex, PageSize, PageCount, TotalCount)
		Exit Function
	ElseIf PageIndex < 100 Then
		PagerNumber2 = PagerNumber(PageIndex, PageSize, PageCount, TotalCount)
		Exit Function
	End If
	PagePath = GetPagePath
	ParamsArray = GetParams
	TempIIndex = 0
	PagerNoSize = 10
	strBody = "<table border=""0"" width=""100%"" cellpadding=""0"" cellspacing=""0""><form id=""PagerNumeric_Form"" method=""get"" action=""" & PagePath & """ onsubmit=""if (this.p.value=='') {alert('请输入页数！');this.p.focus();return false;} else {return true;}"">" & ParamsArray(1) & "<tr>"
	strBody = strBody & "<td align=""left"" width=""33%"" nowrap>&nbsp;共<font class=""entxt""> " & TotalCount & " </font>条 第<font class=""entxt""> " & PageIndex & " / " & PageCount & " </font>页</td><td align=""center"" class=""entxt f12"" width=""34%"" nowrap>"
	If PageIndex > 1 Then
		strBody = strBody & "<a href=""" & PagePath & "?p=1&t=" & TotalCount & ParamsArray(0) & """ class=""a"">首页</a>&nbsp;<a href=""" & PagePath & "?p=" & (PageIndex - 1) & "&t=" & TotalCount & ParamsArray(0) & """ class=""a"">上页</a>&nbsp;"
	Else
		strBody = strBody & "首页&nbsp;上页&nbsp;"
	End If
	If PageCount <= PagerNoSize Then
		FOR TempIIndex = 1 TO PageCount
			If TempIIndex = PageIndex Then
				strBody = strBody & "<b>" & TempIIndex & "</b>&nbsp;"
			Else
				strBody = strBody & "<a href=""" & PagePath & "?p=" & TempIIndex & "&t=" & TotalCount & ParamsArray(0) & """ class=""a"">" & TempIIndex & "</a>&nbsp;"
			End If
		Next
	Else
		If PageIndex <= PagerNoSize \ 2 Then
			FOR TempIIndex = 1 TO PagerNoSize
				If TempIIndex = PageIndex Then
					strBody = strBody & "<b>" & TempIIndex & "</b>&nbsp;"
				Else
					strBody = strBody & "<a href=""" & PagePath & "?p=" & TempIIndex & "&t=" & TotalCount & ParamsArray(0) & """ class=""a"">" & TempIIndex & "</a>&nbsp;"
				End If
			Next
		Else
			PagerNoCount = PageIndex + PagerNoSize \ 2
			If PagerNoCount <= PageCount Then
				FOR TempIIndex = PageIndex - PagerNoSize \ 2 + 1 TO PagerNoCount
					If TempIIndex = PageIndex Then
						strBody = strBody & "<b>" & TempIIndex & "</b>&nbsp;"
					Else
						strBody = strBody & "<a href=""" & PagePath & "?p=" & TempIIndex & "&t=" & TotalCount & ParamsArray(0) & """ class=""a"">" & TempIIndex & "</a>&nbsp;"
					End If
				Next
			Else
				FOR TempIIndex = PageIndex - PagerNoSize \ 2 + 1 + PageCount - PagerNoCount TO PageCount
					If TempIIndex = PageIndex Then
						strBody = strBody & "<b>" & TempIIndex & "</b>&nbsp;"
					Else
						strBody = strBody & "<a href=""" & PagePath & "?p=" & TempIIndex & "&t=" & TotalCount & ParamsArray(0) & """ class=""a"">" & TempIIndex & "</a>&nbsp;"
					End If
				Next
			End If
		End If
	End If
	If PageIndex < PageCount Then
		strBody = strBody & "<a href=""" & PagePath & "?p=" & (PageIndex + 1) & "&t=" & TotalCount & ParamsArray(0) & """ class=""a"">下页&nbsp;<a href=""" & PagePath & "?p=" & PageCount & "&t=" & TotalCount & ParamsArray(0) & """ class=""a"">末页</a>"
	Else
		strBody = strBody & "下页&nbsp;末页"
	End If
	strBody = strBody & "</td><td align=""right"">转到 <input type=""text"" onchange=""this.value=this.value.replace(/\D/gi,'')"" name=""p"" value=""" & PageIndex & """ size=""2"" class=""inbox""><input type=""hidden"" name=""t"" value=""" & TotalCount & """> <input type=""image"" src=""../images/go.gIf"" border=""0"" align=""absmiddle"">&nbsp;</td></tr></fORm></table>"
	PagerNumber2 = strBody
End Function

Function PagerNumber3(PageIndex, PageSize, PageCount, TotalCount)
	Dim strBody,ParamsArray,PagePath,TempIIndex,PagerNoSize,PagerNoCount
	If TotalCount < 1 Then
		PagerNumber3 = ""
		Exit Function
	End If
	If PageIndex < 1000 And PageIndex >= 100 Then
		PagerNumber3 = PagerNumber2(PageIndex, PageSize, PageCount, TotalCount)
		Exit Function
	ElseIf PageIndex < 100 Then
		PagerNumber3 = PagerNumber(PageIndex, PageSize, PageCount, TotalCount)
		Exit Function
	End If
	PagePath = GetPagePath
	ParamsArray = GetParams
	TempIIndex = 0
	PagerNoSize = 10
	strBody = "<table border=""0"" width=""100%"" cellpadding=""0"" cellspacing=""0""><form id=""PagerNumeric_Form"" method=""get"" action=""" & PagePath & """ onsubmit=""if (this.p.value=='') {alert('请输入页数！');this.p.focus();return false;} else {return true;}"">" & ParamsArray(1) & "<tr>"
	strBody = strBody & "<td align=""left"">&nbsp;共<font class=""entxt""> " & TotalCount & " </font>条</td><td align=""center"" class=""entxt f12"">"
	If PageIndex > 1 Then
		strBody = strBody & "<a href=""" & PagePath & "?p=1&t=" & TotalCount & ParamsArray(0) & """ class=""a"">首页</a>&nbsp;<a href=""" & PagePath & "?p=" & (PageIndex - 1) & "&t=" & TotalCount & ParamsArray(0) & """ class=""a"">上页</a>&nbsp;"
	Else
		strBody = strBody & "首页&nbsp;上页&nbsp;"
	End If
	If PageCount <= PagerNoSize Then
		FOR TempIIndex = 1 TO PageCount
			If TempIIndex = PageIndex Then
				strBody = strBody & "<b>" & TempIIndex & "</b>&nbsp;"
			Else
				strBody = strBody & "<a href=""" & PagePath & "?p=" & TempIIndex & "&t=" & TotalCount & ParamsArray(0) & """ class=""a"">" & TempIIndex & "</a>&nbsp;"
			End If
		Next
	Else
		If PageIndex <= PagerNoSize \ 2 Then
			FOR TempIIndex = 1 TO PagerNoSize
				If TempIIndex = PageIndex Then
					strBody = strBody & "<b>" & TempIIndex & "</b>&nbsp;"
				Else
					strBody = strBody & "<a href=""" & PagePath & "?p=" & TempIIndex & "&t=" & TotalCount & ParamsArray(0) & """ class=""a"">" & TempIIndex & "</a>&nbsp;"
				End If
			Next
		Else
			PagerNoCount = PageIndex + PagerNoSize \ 2
			If PagerNoCount <= PageCount Then
				FOR TempIIndex = PageIndex - PagerNoSize \ 2 + 1 TO PagerNoCount
					If TempIIndex = PageIndex Then
						strBody = strBody & "<b>" & TempIIndex & "</b>&nbsp;"
					Else
						strBody = strBody & "<a href=""" & PagePath & "?p=" & TempIIndex & "&t=" & TotalCount & ParamsArray(0) & """ class=""a"">" & TempIIndex & "</a>&nbsp;"
					End If
				Next
			Else
				FOR TempIIndex = PageIndex - PagerNoSize \ 2 + 1 + PageCount - PagerNoCount TO PageCount
					If TempIIndex = PageIndex Then
						strBody = strBody & "<b>" & TempIIndex & "</b>&nbsp;"
					Else
						strBody = strBody & "<a href=""" & PagePath & "?p=" & TempIIndex & "&t=" & TotalCount & ParamsArray(0) & """ class=""a"">" & TempIIndex & "</a>&nbsp;"
					End If
				Next
			End If
		End If
	End If
	If PageIndex < PageCount Then
		strBody = strBody & "<a href=""" & PagePath & "?p=" & (PageIndex + 1) & "&t=" & TotalCount & ParamsArray(0) & """ class=""a"">下页&nbsp;<a href=""" & PagePath & "?p=" & PageCount & "&t=" & TotalCount & ParamsArray(0) & """ class=""a"">末页</a>"
	Else
		strBody = strBody & "下页&nbsp;末页"
	End If
	strBody = strBody & "</td><td align=""right"">转到 <input type=""text"" onchange=""this.value=this.value.replace(/\D/gi,'')"" name=""p"" value=""" & PageIndex & """ size=""2"" class=""inbox""><input type=""hidden"" name=""t"" value=""" & TotalCount & """> <input type=""image"" src=""../images/go.gIf"" border=""0"" align=""absmiddle"">&nbsp;</td></tr></fORm></table>"
	PagerNumber3 = strBody
End Function

Rem -------------------------------------------------------------------------------------------------------
Rem 获取当前页路径
Function GetCurrentPageUrl()
	Dim tmpUrl,tmpQuery
	tmpUrl = Request.ServerVariables("Script_Name")
	tmpQuery = Request.ServerVariables("Query_String")
	If Not isNull(tmpQuery) Or Trim(tmpQuery)<>"" Then tmpQuery = "?" & Trim(tmpQuery)
	GetCurrentPageUrl = tmpUrl & tmpQuery
End Function

Function GetCurrentPagerUrl()
	Dim tmpUrl,tmpQuery,tmpArray,tmpString,tmpIndex,tmpValue(2)
	tmpUrl = Request.ServerVariables("Script_Name")
	tmpQuery = Request.ServerVariables("Query_String")
	tmpString = ""
	If Not isNull(tmpQuery) Or Trim(tmpQuery)<>"" Then
		tmpArray = Split(tmpQuery,"&")
		For tmpIndex = 0 To Ubound(tmpArray)
			If tmpArray(tmpIndex)<>"" And UCase(Split(tmpArray(tmpIndex),"=")(0)) <> "P" And UCase(Split(tmpArray(tmpIndex),"=")(0)) <> "T" Then
				tmpString = tmpString & "&" & tmpArray(tmpIndex)
			End If
		Next
	End If
	tmpValue(0) = tmpUrl
	tmpValue(1) = tmpString
	GetCurrentPagerUrl = tmpValue
End Function






Rem  ---------------------------------------------- 分页显示 ------------------------------------------------
GLB_PagerCount = 10
Function FormatPagerStyle(PageIndex,PageCount,TotalCount,PageStyle,TextStyle)
	If PageCount < 1 Then
		FormatPagerStyle = ""
		Exit Function
	End If
	Select Case PageStyle
		Case 2:
			FormatPagerStyle = FormatPagerStyle2(PageIndex,PageCount,TotalCount,TextStyle)
		Case 3:
			FormatPagerStyle = FormatPagerStyle3(PageIndex,PageCount,TotalCount,TextStyle)
		Case 4:
			FormatPagerStyle = FormatPagerStyle4(PageIndex,PageCount,TotalCount,TextStyle)
		Case 5:
			FormatPagerStyle = FormatPagerStyle5(PageIndex,PageCount,TotalCount,TextStyle)
		Case 6:
			FormatPagerStyle = FormatPagerStyle6(PageIndex,PageCount,TotalCount,TextStyle)
		Case Else:
			FormatPagerStyle = FormatPagerStyle1(PageIndex,PageCount,TotalCount,TextStyle)
	End Select
End Function

Function FormatTextStyle(PageIndex,PageCount,TotalCount,TextStyle,PageUrl)
	Dim tmpArray(2)
	If TextStyle = 2 Then
		If PageIndex <= 1 Then
			tmpArray(0) = "<font face=""Webdings"" class=""f13"" style=""cursor:default"">9</font>&nbsp;<font face=""Webdings"" class=""f13"" style=""cursor:default"">7</font>&nbsp;"
		Else
			tmpArray(0) = "<a href=""" & PageUrl(0) & "?p=1&t=" & TotalCount & PageUrl(1) & """ class=""f13""><font face=""Webdings"">9</font></a>&nbsp;<a href=""" & PageUrl(0) & "?p=" & (PageIndex - 1) & "&t=" & TotalCount & PageUrl(1) & """ class=""f13""><font face=""Webdings"">7</font></a>&nbsp;"
		End If
		If PageIndex >= PageCount Then
			tmpArray(1) = "<font face=""Webdings"" class=""f13"" style=""cursor:default"">8</font>&nbsp;<font face=""Webdings"" class=""f13"" style=""cursor:default"">:</font>"
		Else
			tmpArray(1) = "<a href=""" & PageUrl(0) & "?p=" & (PageIndex + 1) & "&t=" & TotalCount & PageUrl(1) & """ class=""f13""><font face=""Webdings"">8</font></a>&nbsp;<a href=""" & PageUrl(0) & "?p=" & PageCount & "&t=" & TotalCount & PageUrl(1) & """ class=""f13""><font face=""Webdings"">:</font></a>"
		End If
	Else
		If PageIndex <= 1 Then
			tmpArray(0) = "<font style=""cursor:default"">首页&nbsp;上页&nbsp;</font>"
		Else
			tmpArray(0) = "<a href=""" & PageUrl(0) & "?p=1&t=" & TotalCount & PageUrl(1) & """>首页</a>&nbsp;<a href=""" & PageUrl(0) & "?p=" & (PageIndex - 1) & "&t=" & TotalCount & PageUrl(1) & """>上页</a>&nbsp;"
		End If
		If PageIndex >= PageCount Then
			tmpArray(1) = "<font style=""cursor:default"">下页&nbsp;末页</font>"
		Else
			tmpArray(1) = "<a href=""" & PageUrl(0) & "?p=" & (PageIndex + 1) & "&t=" & TotalCount & PageUrl(1) & """>下页</a>&nbsp;<a href=""" & PageUrl(0) & "?p=" & PageCount & "&t=" & TotalCount & PageUrl(1) & """>末页</a>"
		End If
	End If
	FormatTextStyle = tmpArray
End Function

Function FormatPagerNextTen(TmpIndex,TotalCount,PageUrl)
	FormatPagerNextTen = "<a href=""" & PageUrl(0) & "?p=" & TmpIndex & "&t=" & TotalCount & PageUrl(1) & """ class=""f12"">...</a>&nbsp;"
End Function

Function FormatPagerTen(PageIndex,PageCount,TotalCount,PageUrl)
	Dim tmpInnerHtml,tmpIndex
	tmpInnerHtml = ""
	For tmpIndex = 1 To PageCount
		If tmpIndex = PageIndex Then
			tmpInnerHtml = tmpInnerHtml & "<font class=""f12 b1"" style=""cursor:default"">" & tmpIndex & "</font>&nbsp;"
		Else
			tmpInnerHtml = tmpInnerHtml & "<a href=""" & PageUrl(0) & "?p=" & tmpIndex & "&t=" & TotalCount & PageUrl(1) & """ class=""f12"">" & tmpIndex & "</a>&nbsp;"
		End If
	Next
	FormatPagerTen = tmpInnerHtml
End Function

Function FormatPagerLinkNumber(TmpIndex,PageIndex,TotalCount,PageUrl)
	If TmpIndex = PageIndex Then
		FormatPagerLinkNumber = "<font class=""f12 b1"" style=""cursor:default"">" & TmpIndex & "</font>&nbsp;"
	Else
		FormatPagerLinkNumber = "<a href=""" & PageUrl(0) & "?p=" & TmpIndex & "&t=" & TotalCount & PageUrl(1) & """ class=""f12"">" & TmpIndex & "</a>&nbsp;"
	End If
End Function

Function FormatPagerStyle1(PageIndex,PageCount,TotalCount,TextStyle)
	Dim PageUrl,TextArray,tmpInnerHtml,tmpIndex,tmpBeginIndex,tmpEndIndex
	PageUrl = GetCurrentPagerUrl()
	TextArray = FormatTextStyle(PageIndex,PageCount,TotalCount,TextStyle,PageUrl)
	tmpInnerHtml = TextArray(0)
	If PageCount <= GLB_PagerCount Then
		tmpInnerHtml = tmpInnerHtml & FormatPagerTen(PageIndex,PageCount,TotalCount,PageUrl)
	Else
		tmpBeginIndex = ((PageIndex - 1) \ GLB_PagerCount) * GLB_PagerCount + 1
		If tmpBeginIndex < 1 Then tmpBeginIndex = 1
		tmpEndIndex = tmpBeginIndex + GLB_PagerCount - 1
		If tmpEndIndex > PageCount Then tmpEndIndex = PageCount
		If tmpEndIndex > GLB_PagerCount Then
			tmpInnerHtml = tmpInnerHtml & FormatPagerNextTen(tmpBeginIndex - 1,TotalCount,PageUrl)
		End If
		For tmpIndex = tmpBeginIndex To tmpEndIndex
			tmpInnerHtml = tmpInnerHtml & FormatPagerLinkNumber(tmpIndex,PageIndex,TotalCount,PageUrl)
		Next
		If tmpEndIndex < PageCount Then
			tmpInnerHtml = tmpInnerHtml & FormatPagerNextTen(tmpEndIndex + 1,TotalCount,PageUrl)
		End If
	End If
	tmpInnerHtml = tmpInnerHtml & TextArray(1)
	FormatPagerStyle1 = tmpInnerHtml
End Function

Function FormatPagerStyle2(PageIndex,PageCount,TotalCount,TextStyle)
	Dim PageUrl,TextArray,tmpInnerHtml,tmpIndex,tmpBeginIndex,tmpEndIndex
	PageUrl = GetCurrentPagerUrl()
	TextArray = FormatTextStyle(PageIndex,PageCount,TotalCount,TextStyle,PageUrl)
	tmpInnerHtml = TextArray(0)
	If PageCount <= GLB_PagerCount Then
		tmpInnerHtml = tmpInnerHtml & FormatPagerTen(PageIndex,PageCount,TotalCount,PageUrl)
	Else
		tmpBeginIndex = PageIndex - GLB_PagerCount \ 2
		If tmpBeginIndex < 1 Then tmpBeginIndex = 1
		tmpEndIndex = tmpBeginIndex + GLB_PagerCount
		If tmpEndIndex > PageCount Then tmpEndIndex = PageCount
		If tmpBeginIndex > 1 Then
			tmpInnerHtml = tmpInnerHtml & FormatPagerNextTen(tmpBeginIndex - 1,TotalCount,PageUrl)
		End If
		For tmpIndex = tmpBeginIndex To tmpEndIndex
			tmpInnerHtml = tmpInnerHtml & FormatPagerLinkNumber(tmpIndex,PageIndex,TotalCount,PageUrl)
		Next
		If tmpEndIndex < PageCount Then
			tmpInnerHtml = tmpInnerHtml & FormatPagerNextTen(tmpEndIndex + 1,TotalCount,PageUrl)
		End If
	End If
	tmpInnerHtml = tmpInnerHtml & TextArray(1)
	FormatPagerStyle2 = tmpInnerHtml
End Function
%>