<%
  if(totalIndexes == void) { out.print("$text.page |<span class=\"current\"> 1 </span>|"); return; }
  int i, maxPages = indexLinksCount;
  if(maxPages <= 0) maxPages = 20;
  int start = (indexNum / maxPages) * maxPages;
  if (start <= 0) { start = 1; out.print("$text.page "); }
  else { out.print("<a href=\"" + firstIndexPage + "\" title=\"$text.firstPage\">&laquo;</a> | <a href=\"" + engine.getIndexPageName() + start + engine.getPageExtension() + "\" title=\"$text.previousPage\">&lt; </a>"); }
  out.print("|");
  for(i = start; i <= totalIndexes && i <= (start + maxPages - 1); i++) {
    if(i == indexNum) out.print("<span class=\"current\"> " + i + " </span>|");  // Emphasize current index page
    else out.print("<a href=\"" + engine.getIndexPageName() + (i==1? "":i) + engine.getPageExtension() + "\"> " + i + " </a>|");
  }
  if(totalIndexes >= (start + maxPages))
    out.print("<a href=\"" + engine.getIndexPageName() + i + engine.getPageExtension() + "\" title=\"$text.nextPage\"> &gt;</a> | <a href=\"" + lastIndexPage + "\" title=\"$text.lastPage\">&raquo;</a>");
%>