//Page Scroller (aka custom scrollbar)- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for use

var Hoffset=40 //Enter buttons' offset from right edge of window (adjust depending on images width)
var Voffset_top=10 //Enter buttons' offset from bottom edge of window (adjust depending on images height)
var Voffset_bottom=35 //Enter buttons' offset from bottom edge of window (adjust depending on images height)
var thespeed=3 //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 cross_obj_up=document.all? document.all.staticbuttons_up : document.getElementById? document.getElementById("staticbuttons_up") : document.staticbuttons_up
var cross_obj_down=document.all? document.all.staticbuttons_down : document.getElementById? document.getElementById("staticbuttons_down") : document.staticbuttons_down
var cross_obj_line=document.all? document.all.staticbuttons_line : document.getElementById? document.getElementById("staticbuttons_line") : document.staticbuttons_line
var cross_obj_line_img=document.all? document.all.staticbuttons_line_img : document.getElementById? document.getElementById("staticbuttons_line_img") : document.staticbuttons_line_img

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function positionit(){
var dsocleft=document.all? iecompattest().scrollLeft : pageXOffset
var dsoctop=document.all? iecompattest().scrollTop : pageYOffset
var window_width=ieNOTopera? iecompattest().clientWidth+ieHoffset_extra : window.innerWidth+ieHoffset_extra
var window_height=ieNOTopera? iecompattest().clientHeight : window.innerHeight

if (document.all||document.getElementById){
cross_obj_up.style.left=parseInt(dsocleft)+parseInt(window_width)-Hoffset+"px"
cross_obj_up.style.top=dsoctop+Voffset_top+"px"

cross_obj_down.style.left=parseInt(dsocleft)+parseInt(window_width)-Hoffset+"px"
cross_obj_down.style.top=dsoctop+parseInt(window_height)-Voffset_bottom+"px"

cross_obj_line.style.left=parseInt(dsocleft)+parseInt(window_width)-Hoffset+"px"
cross_obj_line.style.top=dsoctop+Voffset_bottom-2+"px"

//cross_obj_line_img.style.height =dsoctop+Voffset_top-(dsoctop+Voffset_bottom)+"px"
}
else if (document.layers){
cross_obj_up.left=dsocleft+window_width-Hoffset
cross_obj_line.top=dsoctop+Voffset_top

cross_obj_down.left=dsocleft+window_width-Hoffset
cross_obj_down.top=dsoctop+window_height-Voffset_bottom

cross_obj_line.left=dsocleft+window_width-Hoffset
cross_obj_line.top=dsoctop+Voffset_top-2

//cross_obj_line_img.style.height =dsoctop+Voffset_top-(dsoctop+Voffset_bottom)
}
}

function scrollwindow(){
window.scrollBy(0,myspeed)
}

function initializeIT(){
positionit()
if (myspeed!=0){
scrollwindow()
}
}

if (document.all||document.getElementById||document.layers)
setInterval("initializeIT()",20)
