<%
page_first="img/page_first.gif"
page_previous="img/page_previous.gif"
page_next="img/page_next.gif"
page_last="img/page_last.gif"
page_next10="img/page_next10.gif"
if pages>1 then
response.write "
"
if now_pages<>1 and pages>1 then response.write "
第一頁 "
if now_pages<>1 then response.write "
上一頁 "
if pages<=10 then
firstValue=1
lastValue=pages
end if
if pages>10 then
if pages-now_pages>=5 then
if now_pages>=5 then
firstValue=now_pages-4
lastValue=now_pages+5
else
firstValue=1
lastValue=10
end if
else
firstValue=pages-9
lastValue=pages
end if
end if
for pageLoop=firstValue to lastValue
if int(pageLoop)<>int(now_pages) then
response.write "
"&pageLoop&" "
else
response.write " "&pageLoop&" "
end if
next
if now_pages=1 or (cint(now_pages)<>cint(pages) and cint(pages)<>1) then response.write "
下一頁"
if pages<>1 then response.write "
最末頁"
end if
%>