var scale=2;
var delta=1;
function animate() {
var lb = document.getElementById('littlebox');
lb.scrollLeft += delta*scale;
}
var animate_id = null;

function start_scroll() {
if (!animate_id) animate_id = window.setInterval(animate, 15);
return false;
}
function stop_scroll() {
if (animate_id) window.clearInterval(animate_id);
animate_id = null;
return false;
}
function do_scroll(e) {
if (this.id == 'go_right') delta = 1; else delta = -1;
if (!e) e = window.event;
if (e.preventDefault) e.preventDefault();
e.cancelBubble=true;
start_scroll();
return false;
}
function set_image() {
var h = this.href;
var j = h.indexOf('?');
if (j >= -1) h = h.substr(j+1, h.length-(j+1));

document.getElementById('i').src = '/' + h;

return false;
}
function setup() {
document.body.onmousemove = stop_scroll;
document.onmousemove = stop_scroll;
document.getElementById('go_left').onmousemove = do_scroll;
document.getElementById('go_right').onmousemove = do_scroll;
var nobr = document.getElementById('lb-nobr');
var x;
for (x = nobr.firstChild; x; x = x.nextSibling) {
if (x.tagName) {
x.onclick = set_image;

}
}

}