 // ---	div scrolling functions
//		set variables that are used by scrollDiv function
var scrollTimeout;
var maskId 		= "content_language";		// ---	id of the <div> container that masks the scroll content
var scrollId 	= "content_language_scroll";		// ---	id of the <div> containing the content to be scrolled
var btnId 		= "scroll_btn";			// ---	id of the <div> that has the buttons used to call scrollDiv function
function scrollDiv ( dir, incr ) {
	clearTimeout ( scrollTimeout );
	scrollTimeout 	= null;
	if ( dir != "stop" ) {
		// ---	get the mask height... the window that the content scrolls in
		var oMask 	= document.getElementById ( maskId );
		var maskH 	= oMask.clientHeight;
		// ---	get the content height and y position of the scrolling layer
		var oScroll 	= document.getElementById ( scrollId );
		var scrollY 	= Number ( oScroll.style.top.replace ( "px", "" ) );
		var scrollH 	= oScroll.clientHeight;
		// ---	buttons
		var oBtns 	= document.getElementById ( "news_btns" );
		switch ( dir ) {
			case "init" :
				// ---	if there isn't anything to scroll, hide the buttons
				if ( maskH > scrollH ) 	oBtns.style.display 	= "none";
				break;
			case "up" :
				if ( scrollY < 0 ) 	oScroll.style.top = ( scrollY + incr ) + "px";
				else 				oScroll.style.top = "0px";
				break;
			case "down" :
				if ( scrollY > ( maskH - scrollH ) ) 	oScroll.style.top = ( scrollY - incr ) + "px";
				else 									oScroll.style.top = ( maskH - scrollH ) + "px";
				break;
		}
		if ( dir != "init" ) {
			// ---	keep the scroll going until dir = "stop"
			funct 			= "scrollDiv('" + dir + "'," + incr + ");";
			scrollTimeout 	= setTimeout ( funct, 10 );
		}
	}
}