var iens6;
var ns4;
iens6=document.all||document.getElementById;
ns4=document.layers;
var scrollspeed = 20
var step=5
var contentobj
var contentheight
var theobj
var theheight
var thename
var thecontainer
var theScroller
var timerup
var timerdown
var timerupname
var timerdownname
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
if (theobj) theheight=theobj.offsetHeight; else theheight=0;
if (document.getElementById&&!document.all){
step=5
}
}else if(ns4){
thename = "nscontent"+theScroller
thecontainer = "nscontainer"+theScroller
theobj = eval("document."+thecontainer+".document."+thename)
if (theobj) 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()
}else if(theFunction=="sb") {
shifttobottom()
}
}
function scrolldown() {
if (theobj)
{
var strtmp = (theheight*(-1.0)+100);
if(iens6&&parseInt(theobj.style.top)>=(theheight*(-1.0) + 380)){
theobj.style.top=parseInt(theobj.style.top)-step
}else if(ns4&&theobj.top>=(theheight*(-1.0)+380)){
theobj.top-=step
}
}
timerdownname = setTimeout("scrolldown()",scrollspeed)
}
function scrollup() {
if (theobj)
{
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 stopall() {
if(timerup){
clearTimeout(timerupname)
}
if(timerdown){
clearTimeout(timerdownname)
}
}
function shifttotop(){
stopall()
if (theobj)
{
if (iens6) {
theobj.style.top=0
}else{
theobj.top=0
}
}
}
function shifttobottom(){
stopall()
if (theobj)
{
if (iens6) {
theobj.style.top= (theheight*(-1.0) + 380);
}else{
theobj.top= (theheight*(-1.0)+380);
}
}
}