-/* $Id: search.js,v 1.9 2007-01-10 08:14:11 sondberg Exp $
+/* $Id: search.js,v 1.11 2007-01-10 09:50:57 sondberg Exp $
* ---------------------------------------------------
* Javascript container
*/
xinitSession.onreadystatechange=session_started;
xinitSession.open("GET", url);
xinitSession.send(null);
-
- //url_surveillence = setInterval(session_check, 200);
}
function ping_session()
function make_pager (hits, offset, max) {
var html = '';
var off;
+ var start_offset = offset - page_window * max;
+
+ if (start_offset < 0) {
+ start_offset = 0;
+ }
- for (off = offset - page_window * max;
- off < hits && off < (offset + page_window * max);
+ for (off = start_offset;
+ off < hits && off < (start_offset + 2 * page_window * max);
off += max) {
var class = '';