var Hoffset=24; //Enter buttons' offset from right edge of window (adjust depending on images width)
var Voffset=4; //Enter buttons' offset from bottom edge of window (adjust depending on images height)
var thespeed=4; //Enter scroll speed in integer (Advised: 1-3)
var ieNOTopera=document.all&&navigator.userAgent.indexOf("Opera")==-1;
var myspeed=0;
var ieHoffset_extra=document.all?15:0;

var ps_scrollingdiv = document.all ? document.all.scrollingdiv : document.getElementById ? document.getElementById("scrollingdiv") : document.scrollingdiv;
var ps_staticbuttons = document.all ? document.all.staticbuttons : document.getElementById ? document.getElementById("staticbuttons") : document.staticbuttons;

function iecompattest() {
	return (document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;
}

function positionit() {
    var ps_offset_height = ps_scrollingdiv.offsetHeight - Hoffset;
    var ps_offset_width = ps_scrollingdiv.offsetWidth + Voffset;
	
	if (document.all || document.getElementById) {
	    ps_staticbuttons.style.left = ps_offset_width;
	    ps_staticbuttons.style.top = ps_offset_height;
	}
	else if (document.layers) {
	    ps_staticbuttons.left = ps_offset_width;
	    ps_staticbuttons.top = ps_offset_height;
    }
}

function scrollwindow() {
    ps_scrollingdiv.scrollTop += myspeed;
}

function initializeIT() {
	//positionit();
	if(myspeed!=0) {
		scrollwindow();
	}
}

if(document.all||document.getElementById||document.layers);
    setInterval("initializeIT()",20);
