<%
function jk_pagecute(maxpage,thepages,viewpage,pageurl,pp,font_color)
  if int(thepages)=0 then
    jk_pagecute="<font color=" & font_color & ">[1]</font>"
    exit function
  end if
  dim pn,pi,page_num,ppp,pl,pr
  pi=1
  ppp=pp\2
  if pp mod 2 = 0 then ppp=ppp-1
  pl=viewpage-ppp
  pr=pl+pp-1
  if pl<1 then
    pr=pr-pl+1
    pl=1
    if pr>thepages then pr=thepages
  end if
  if pr>int(thepages) then
    pl=pl+thepages-pr
    pr=thepages
    if pl<1 then pl=1
  end if
  if pl>1 then
    jk_pagecute=jk_pagecute&" <a href='"& pageurl &"' title='第一页'>[|<]</a> " & _
		" <a href='"& pageurl &"page="&pl-1&"' title='上一页'>[<]</a> "
  end if
  for pi=pl to pr
    if cint(viewpage)=cint(pi) then
      jk_pagecute=jk_pagecute&" <font color=" & font_color & ">[" & pi & "]</font> "
    else
      jk_pagecute=jk_pagecute&" <a href='"& pageurl &"page="& pi &"' title='第 " & pi & " 页' clases=0>[" & pi & "]</a> "
    end if
  next
  if pr<thepages then
    jk_pagecute=jk_pagecute&" <a href='"& pageurl &"page="&pi&"' clases=0 title='后一页'>[>]</a> " & _
		   " <a href='"& pageurl &"page="& thepages &"' title='最后一页'>[>|]</a> "
  end if
end function

function pagecute_fun(viewpage,thepages,pagecuteurl)
  dim pf0,pf1,pf2,pf3,pf4,pf5
  pf0="已是第一页"
  pf1="第一页"
  pf2="上一页"
  pf3="下一页"
  pf4="最后一页"
  pf5="已是最后一页"
  pagecute_fun=VbCrLf & "<table border=0 cellspacing=0 cellpadding=0><tr><form action='"&pagecuteurl&"' method=post><td>"
  if cint(viewpage)=1 then
    pagecute_fun=pagecute_fun&vbcrlf&"<font class=gray>"&pf0&"</font>&nbsp;"
  else
    pagecute_fun=pagecute_fun&vbcrlf&"<a href='"&pagecuteurl&"page=1' alt='"&pf1&"'>"&pf1&"</a>┋<a href='"&pagecuteurl&"page="&cint(viewpage)-1&"' alt='"&pf2&"' clases=0>"&pf2&"</a>&nbsp;"
  end if
  if cint(viewpage)=cint(thepages) or cint(thepages)=0 then
    pagecute_fun=pagecute_fun&vbcrlf&"<font class=gray>"&pf5&"</font>"
  else
    pagecute_fun=pagecute_fun&vbcrlf&"<a href='"&pagecuteurl&"page="&cint(viewpage)+1&"' alt='"&pf3&"' clases=0>"&pf3&"</a>┋<a href='"&pagecuteurl&"page="&cint(thepages)&"' alt='"&pf4&"'>"&pf4&"</a>"
  end if
  if cint(thepages)<>1 then
    pagecute_fun=pagecute_fun&vbcrlf&"&nbsp;<input type=text name=page value='"&viewpage&"' size=2>&nbsp;<input type=submit value='GO'>"
  end if
  pagecute_fun=pagecute_fun&vbcrlf&"</td></form></tr></table>"
end function
%>