function init() { 
scrollWindow = new DivMaker('scrollWindowObj')
scrollContent = new DivMaker('scrollContentObj','scrollWindowObj')
scrollIndic = new DivMaker('scrollIndicObj')

pas = hauteurIndic / ((scrollContent.h - hauteurVisible + scrollIndic.h)/ MoveSpeed)
pas = roundFloat(pas,4)
dom = document.getElementById;

	ns = (navigator.appName == "Netscape")? true: false
	ns4 = (document.layers)? true:false
	ie4 = (document.all)? true:false
	var winW = (ns4)? window.innerWidth-16 : document.body.offsetWidth-20;
	var winH = (ns4)? window.innerHeight : document.body.offsetHeight;
	if(dom && ns){
		winW = window.innerWidth-16;
		winH = window.innerHeight;
	}
	if(winW > tabW) {
		depl = (winW-tabW)/2,
		scrollWindow.moveBy(depl,0);
		scrollIndic.moveBy(depl,0);			
	}
	if(winH > tabH){
		depl= (winH-tabH)/2;
		scrollWindow.moveBy(0,depl);
		scrollIndic.moveBy(0,depl);		
	}
	scrollWindow.show();
	window.onresize = re;
}
function re(){
	location.reload()
}

function roundFloat(x,y)
{
	x = x.toString();
	if (x.indexOf('.',0)!=-1)
		return parseFloat(x.substring(0,x.indexOf('.',0)+y+1));
	return parseFloat(x);
}
function up() { 
        if (scrollContent.y < 0) {
        scrollContent.moveBy(null,MoveSpeed);
        scrollIndic.moveBy(null,-pas);
        delai = setTimeout('up()',RecallSpeed)
        }
		else {
		scrollIndic.moveTo(scrollIndic.x,xPosIndic);
		}
}
var limite_bas;
function down() {
        if (scrollContent.y+scrollContent.h > scrollWindow.h) {
        scrollContent.moveBy(null,-MoveSpeed);
        scrollIndic.moveBy(null,pas);
        delai = setTimeout('down()',RecallSpeed)
        }
		else {
		scrollIndic.moveTo(scrollIndic.x,xPosIndic + hauteurIndic - 8);
		}
}

function stop() { clearTimeout(delai) }
