This hasn't been tested thoroughly, but I replaced the code with this and it seems to work:
As the poster above said, first remove this code:
if mypage = 1 then
Call GetFirst()
end if
Then find this code:
if intI = 2 then
intI = 0
end if
next
end if
Then replace with this code:
if intI = 2 then
intI = 0
end if
next
if mypage = maxpages then
Call GetFirst()
end if
end if
if maxpages = "" then
Call GetFirst()
end if
Please post your comments. Although this is working for now, I think there is a lot of room here for mistakes.<