function GetGotoPageUrlString (nPageNumber,sUrlText) { return "" + sUrlText + ""; } function WritePagination(mypage,maxpages) { if (maxpages > 1 && mypage <= maxpages) { document.write("
"); var counterstart = mypage - 9; if (mypage%10) counterstart = mypage - (mypage%10) + 1; var counterend = counterstart + 9; if (counterend > maxpages) counterend = maxpages; if (counterstart != 1) document.write(GetGotoPageUrlString(1,"First")+" : "+GetGotoPageUrlString(counterstart - 1,"Previous")+" "); document.write("["); var pad=""; var counter = counterstart; for(;counter<=counterend;counter++) { if (counter != mypage) document.write(" " + GetGotoPageUrlString(counter,pad + counter)); else document.write(" " + pad + counter + ""); } document.write(" ]"); if (counterend != maxpages) document.write(" " + GetGotoPageUrlString (counterend + 1,"Next") + " : " + GetGotoPageUrlString(maxpages,"Last")) document.write(" |
"); document.write("Add new"); document.write(" | ");
document.write("Details found: " + recordCount + " Page " + mypage + " of " + maxpages); document.write(" |