iens6=document.all||document.getElementById;
ns4=document.layers;
var scrolldownn = new Image();
scrolldownn.src = "images/scrolldownn.gif";
scrolldowna = new Image();
scrolldowna.src = "images/scrolldowna.gif" ;
var scrollupn = new Image();
scrollupn.src = "images/scrollupn.gif" ;
scrollupa = new Image();
scrollupa.src = "images/scrollupa.gif" ;
//         
function act(imgName) {
	if (document.images) {
		document[imgName].src = eval(imgName + 'a.src');
	}
}

function inact(imgName) {
	if (document.images) {
		document[imgName].src = eval(imgName + 'n.src');
	}
}
var scrollspeed = 10;
var dragObject     = null;
var step=1;
if (iens6){
	//get content height
	var contentobj=document.getElementById? document.getElementById("contentScroll") : document.all.contentScroll ;


    //get scrol bar height (different css =/ )
	var barobj=document.getElementById? document.getElementById("bar") : document.all.bar;
         if(!barobj){
         var barobj=document.getElementById? document.getElementById("barText") : document.all.barText;
         }
          if(!barobj){
         var barobj=document.getElementById? document.getElementById("barTable") : document.all.barTable;
         }

        var liftobj=document.getElementById? document.getElementById("lift") : document.all.lift ;
	if (document.getElementById&&!document.all){
   		step=5;
	}
}
else if(ns4){
	var contentobj=document.nscontainerScroll.document.nscontentScroll;
	var contentheight=contentobj.clip.height ;
}



function scrolldown2() {


          //stop the interval if the another one is declare
        if(window.scrolltimerup){
		clearTimeout(scrolltimerup);
	}

	if(iens6&&parseInt(contentobj.style.top)>=(381-contentheight)){

                 //move the contents
		contentobj.style.top=parseInt(contentobj.style.top)-step+'px';
		//move the scroller
		liftobj.style.top=-(parseInt(contentobj.style.top)*(barheight-10))/(contentheight-381)+'px';
		//security
                 if(parseInt(liftobj.style.top)> barheight-10){

                    	liftobj.style.top=(barheight-10)+'px';
                   
                 }

	}else if(ns4&&contentobj.top>=(381-contentheight)){
		contentobj.top-=step+'px';
	}
	
	scrolltimerdown = setTimeout("scrolldown2()",scrollspeed);
}
<!-- scroll up function -->
function scrollup2() {
         //stop the interval if the another one is declare
	if(window.scrolltimerdown){
		clearTimeout(scrolltimerdown);
	}



	if(iens6&&parseInt(contentobj.style.top)<=-1){
                 //move the content
		contentobj.style.top=parseInt(contentobj.style.top)+step+'px';
		 //move the scroller
		  liftobj.style.top=-(parseInt(contentobj.style.top)*(barheight-10))/(contentheight-381)+'px';
		  
		  //security 
		if(parseInt(liftobj.style.top)< 0){

                    	liftobj.style.top=0+'px';
                   
                 }
	}else if(ns4&&contentobj.top<=-1){
		contentobj.top+=step+'px' ;
	}

	scrolltimerup = setTimeout("scrollup2()",scrollspeed) ;
}
<!-- function to stop all scroll timers -->


function stopall() {
         //stop the intervals
	if(window.scrolltimerup){
		clearTimeout(scrolltimerup);
	}
	if(window.scrolltimerdown){
		clearTimeout(scrolltimerdown);
	}
}


function getcontent_height(){
	if (iens6)
	contentheight=contentobj.offsetHeight;
  barheight=barobj.offsetHeight ;
}

window.onload=getcontent_height;



