Sure, try replacing the original pagination links code:
Code:
<!--Below HTML code refers to the navigational links for the gallery-->
<div id="navlinks">
<script type="text/javascript">
for (i=1; i<Math.ceil(galleryarray.length/totalslots)+1; i++)
document.write('<a id="navlink'+i+'" href="javascript:jumptopage('+i+')\">Page'+i+'</a> ')
document.getElementById("navlink1").className="current"
</script>
</div>
with the below instead:
Code:
<!--Below HTML code refers to the navigational links for the gallery-->
<div id="navlinks">
<script type="text/javascript">
var itemsperpage=totalslots
for (i=1; i<Math.ceil(galleryarray.length/totalslots)+1; i++){
var start=(i==1)? i : itemsperpage*(i-1)+1
var end=(i==1)? itemsperpage : Math.min(galleryarray.length, start+itemsperpage-1)
document.write('<a id="navlink'+i+'" href="javascript:jumptopage('+i+')\">'+start+' to '+end+'</a> ')
}
document.getElementById("navlink1").className="current"
</script>
</div>
Bookmarks