+ var html = '';
+ var off;
+
+ for (off = offset - page_window * max;
+ off < hits && off < (offset + page_window * max);
+ off += max) {
+
+ var class = '';
+
+ if (off < 0)
+ off = 0;
+
+ var p = off / max + 1;
+
+ if ((offset >= off) && (offset < (off + max)))
+ class = ' class="select"';
+
+ html += '<a href="#" ' + class +
+ 'onclick="update_offset(' + off + ')">' + p + '</a>\n';
+ }
+
+ return html;
+}
+
+
+function update_offset (offset) {
+ document.search.startrec.value = offset;
+ update_action('page');
+ check_search();
+ update_history();
+ return false;