-/* $Id: search.js,v 1.8 2007-01-08 14:51:35 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 = '';
for (i = 0; i < hits.length; i++)
{
- var mk = hits[i].getElementsByTagName("title");
+ var mk = hits[i].getElementsByTagName("md-title");
var html = '<a href="#" class="record">';
var field = '';