Thinking about this, you would probably want something like so:
Code:
var nPage, lPage,
pNum=window.location.href.replace(/.*\/(\d+)[^\/]*$/,'$1'),
lastP=24, //set to highest page number available
firstP=0; //set to lowest page number available
if(isNaN(pNum=pNum-0))
pNum=1; //default value
lPage=pNum-1<firstP? lastP : pNum-1;
nPage=pNum+1>lastP? firstP : pNum+1;
and:
Code:
["Backwards & Forwards", "", ""], //create header
["<<< Talk", "/" +lPage+ ".html", "", 1, "no"], //create two column row, requires d_colspan:2 (the default)
["Talk >>>", "/" +nPage+ ".html", "", 1] //no comma after last entry
Bookmarks