<%
function pageList()
	dim p,i
	if page<1 then
		page=1
	end if
	if pagecount<1 then
		pagecount=1
	end if
	pageList="<table border=0 width=650 cellspacing=0 cellpadding=3 align=center>"
	pageList=pageList & "<tr><td width=200 style='letter-spacing: 1'>共有记录 <font color=#FF0000>"& RecordCount &"</font> 个，共 <font color=#FF0000>"& pageCount &"</font> 页 </td>"
	pageList=pageList & "<td width=100 style='letter-spacing: 1' align=center>"
	if page=1 then
		pageList=pageList & " <img border=0 src=images/pt.gif alt=留言首页 align=absmiddle>"
	else
		pageList=pageList & " <a href=?><img border=0 src=images/pt.gif alt=第一页 align=absmiddle></a>"
	end if
	
	if page=1 then
		pageList=pageList & " <img border=0 src=images/pb.gif alt=前一页 align=absmiddle>"
	else
		pageList=pageList & " <a href=?page="& (page-1) &"><img border=0 src=images/pb.gif alt=前一页 align=absmiddle></a>"
	end if
	
	if pagecount-page=0 then
		pageList=pageList & " <img border=0 src=images/pn.gif alt=下一页 align=absmiddle>"
	else
		pageList=pageList & " <a href=?page="& (page+1) &"><img border=0 src=images/pn.gif alt=下一页 align=absmiddle></a>"
	end if
	
	pageList=pageList & "</td><td width=350 style='letter-spacing: 1'>"

'pagecount=2
	p=int(page/pageLinkNum)
	if page mod pageLinkNum>0 then
		p=p+1
	end if
	p=(p-1)*pageLinkNum+1
'response.write p
'response.end
	i=p+(pageLinkNum-1)
	if i> pagecount then
		i=pagecount
	end if

	if p>pageLinkNum then
		pageList=pageList & "<a href='?page="&p-1&"'>[<<]</a>"
	end if

	do while p<=i
		if p=page then
			pageList=pageList & "["&p&"]"
		else
			pageList=pageList & "<a href='?page="&p&"'>["&p&"]</a>"
		end if
		p=p+1
	loop

	p=p-1
	if p< pagecount then
		pageList=pageList & "<a href='?page="&(p+1)&"'>[>>]</a>"
	end if

	pageList=pageList & "</td></tr></table>"
end function 
%>