if (window.Event) 
document.captureEvents(Event.MOUSEUP); 

function nocontextmenu() 
{ 
event.cancelBubble = true 
event.returnValue = false; 

return false; 
} 
/*
function norightclick(e) 
{ 
	if (window.Event) 
	{ 
	if (e.which == 2 || e.which == 3) 
	return false; 
	} 
	else 
	if (event.button == 2 || event.button == 3) 
	{ 
	event.cancelBubble = true 
	event.returnValue = false; 
	return false; 
	} 

} 
if (document.layers) { 
document.captureEvents(Event.MOUSEDOWN); 
} 
document.oncontextmenu = nocontextmenu; 
document.onmousedown = norightclick; 
document.onmouseup = norightclick; 
//--> 
*/
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=no'+scroll+',+resizable+'
win = window.open(mypage,myname,settings)
}

<!-- Browser Check -->
iens6=document.all||document.getElementById
ns4=document.layers

<!--GLOBAL SCROLLER VARIABLES-->

var scrollspeed = 30 <!-- scrollspeed, lower is faster -->

var step=1
var contentobj
var contentheight
var theobj
var theheight
var thename
var thecontainer
var theScroller
var timerup
var timerdown
var timerupname
var timerdownname
<!--END GLOBAL SCROLLER VARIABLES-->

<!--GLOBAL SCROLLER FUNCTIONS-->
function director(incomingScroller,theFunction) {
stopall()
theScroller=incomingScroller
theobj = "contentobj"+theScroller
theheight = "contentheight"+theScroller
if(iens6){
	thename = "content"+theScroller
	theobj=document.getElementById? document.getElementById(thename):document.all.thename
	theheight=theobj.offsetHeight
	if (document.getElementById&&!document.all){
   		step=5
	}
}else if(ns4){
	thename = "nscontent"+theScroller
	thecontainer = "nscontainer"+theScroller
	theobj = eval("document."+thecontainer+".document."+thename)
	theheight=theobj.clip.height
}
	if(theFunction=="sd") {
		timerdown="window.down"+theScroller
		timerdownname="down"+theScroller
		scrolldown()
	}else if(theFunction=="su") {
		timerup="window.up"+theScroller
		timerupname="up"+theScroller
		scrollup()
	}else if(theFunction=="sa") {
		stopall()
	}else if(theFunction=="st") {
		shifttotop()
	}
}
<!-- scroll down function -->
function scrolldown() {
	if(iens6&&parseInt(theobj.style.top)>=(theheight*(-1)+100)){
		theobj.style.top=parseInt(theobj.style.top)-step
	}else if(ns4&&theobj.top>=(theheight*(-1)+100)){
		theobj.top-=step
	}
	timerdownname = setTimeout("scrolldown()",scrollspeed)
}
<!-- scroll up function -->
function scrollup() {
	if(iens6&&parseInt(theobj.style.top)<=0){
		theobj.style.top=parseInt(theobj.style.top)+step
	}else if(ns4&&theobj.top<=0){ 
		theobj.top+=step
	}
	timerupname = setTimeout("scrollup()",scrollspeed)	
}
<!-- function to stop all scroll timers -->
function stopall() {
	if(timerup){
		clearTimeout(timerupname)
	}
	if(timerdown){
		clearTimeout(timerdownname)
	}
}
<!-- function that shifts the object to top -->
function shifttotop(){
	stopall()
	if (iens6) {
		theobj.style.top=0
	}else{
		theobj.top=0
	}
}

<!--END GLOBAL SCROLLER FUNCTIONS-->

