function mb_getDiv(theDiv,nc4Lyr)
{
	if (document.all){return document.all(theDiv).style;}
	if (document.layers){return (nc4Lyr==null || nc4Lyr==false)?document.layers[theDiv]:eval('document.'+nc4Lyr).document.layers[theDiv];}
    return document.getElementById(theDiv).style;
}

//---------------------------------------------------------------------------------------------------------------------
// ch_getHeight
	function mb_getHeight(theDiv,nc4Layer){
		if(document.layers){ return ch_getDiv(theDiv,nc4Layer).clip.height; } // NN4
		else if(document.all){ var divHeight = (eval("document.all."+theDiv+".scrollHeight"));  // IE
			if(!(divHeight)){divHeight = ch_getDiv(theDiv,nc4Layer).pixelHeight; } // opera
			return(divHeight);
		} else { var divHeight = eval("document.getElementById('"+theDiv+"').offsetHeight"); // N6
			if(!(divHeight)){ var divHeight = ch_getDiv(theDiv,nc4Layer).pixelHeight; } // opera
			return(divHeight);
		}
	}
//------------------------------------------------------------------------------------------------------------------------

var holdingDiv = "scrollerHolder"; // global variable for holding Div
var scrollingDiv = "scrollerContent"; // global var for content Div
var scrollTimer;//global variable for timer

function mb_scroll(direction){ // starts scrolling
	if (direction == "up"){
		scrollTimer = setInterval("mb_scrollUp()",100);
	} else {
		scrollTimer = setInterval("mb_scrollDown()",100);
	}
}

/* - doesn't work :(
NN4 allows
  setTimeout(functionName, delay, arg0, arg1, arg2, ...)
I think IE is not supporting that here you need a global variable e.g.
  window.globalObject = argument;
  setInterval('functionName(globalObject)', delay)
*/

function mb_stopScroll(){ // stops scrolling
	clearInterval(scrollTimer);
}
// scrolls up and stops when the top of the scrolling div is reached.
function mb_scrollUp(){
	if(document.layers){ // NN4
		if(mb_getDiv(scrollingDiv,holdingDiv).top > 0){
			mb_stopScroll();
		} else {
			mb_getDiv(scrollingDiv,holdingDiv).top = mb_getDiv(scrollingDiv,holdingDiv).top + 2;
		}	
	} else if(document.all){ // IE
		if(mb_getDiv(scrollingDiv,"").pixelTop > 0){
			mb_stopScroll();
		} else {
			mb_getDiv(scrollingDiv,"").pixelTop = mb_getDiv(scrollingDiv,"").pixelTop + 2;
		}	
	} else { // N6 et al
		if(parseInt(mb_getDiv(scrollingDiv,"").top) > 0){
			mb_stopScroll();
		} else {
			if(mb_getDiv(scrollingDiv,"").top==""){
				mb_getDiv(scrollingDiv,"").top = "0pt";
			} else {
				mb_getDiv(scrollingDiv,"").top = (parseInt(mb_getDiv(scrollingDiv,"").top)+2);
			}	
		}
	}
}
// scrolls down - used ch_getHeight() to work out how high the div is and where to stop scrolling.
function mb_scrollDown() { 
	if(document.layers){ // NN4
		if (mb_getDiv(scrollingDiv,holdingDiv).top < -(mb_getHeight(scrollingDiv,holdingDiv)- 100)){
			bb_stopScroll();
		} else {
			mb_getDiv(scrollingDiv,holdingDiv).top = mb_getDiv(scrollingDiv,holdingDiv).top - 2;
		}
	} else if(document.all){ // IE
		if (mb_getDiv(scrollingDiv,"").pixelTop < -(mb_getHeight(scrollingDiv,holdingDiv)-100)){
			mb_stopScroll();
		} else {
			mb_getDiv(scrollingDiv,"").pixelTop = mb_getDiv(scrollingDiv,"").pixelTop - 2;
		}
	} else{ //N6
		if(parseInt(mb_getDiv(scrollingDiv,"").top) < -(mb_getHeight(scrollingDiv,holdingDiv)-100)){
			mb_stopScroll();
		} else {
			if(mb_getDiv(scrollingDiv,"").top==""){
				mb_getDiv(scrollingDiv,"").top = "0pt";
			} else {
				mb_getDiv(scrollingDiv,"").top = (parseInt(mb_getDiv("scrollerContent","").top)-2);
			}
		}   
	}
}