/*
Script made by Martial Boissonneault � 2001-2002 http://getElementById.com/
This script may be used and changed freely as long as this msg is intact
Visit http://getElementById.com/ for more free scripts and tutorials.
*/
timerID = null;
        
function ScrollUp(speed){
    	if(document.getElementById){
        	if(parseInt(txt.style.top) < 0){
        		txt.style.top = parseInt(txt.style.top) + speed + "px";
		}
        	timerID = setTimeout("ScrollUp("+speed+")",30);
    	}
}

function ScrollDown(speed){
    	if(document.getElementById){                        
        	if(parseInt(txt.style.top) > cnt.offsetHeight - txt.offsetHeight){ 
        		txt.style.top = parseInt(txt.style.top) - speed + "px";
		}
        	timerID = setTimeout("ScrollDown("+speed+")",30);
    	}
}
        
function RefScrollUp(speed){
    	if(document.getElementById){
        	if(parseInt(txtRef.style.top) < 0){
        		txtRef.style.top = parseInt(txtRef.style.top) + speed + "px";
		}
        	timerIDRef = setTimeout("RefScrollUp("+speed+")",30);
    	}
}

function RefScrollDown(speed){
    	if(document.getElementById){                        
        	if(parseInt(txtRef.style.top) > cntRef.offsetHeight - txtRef.offsetHeight){ 
        		txtRef.style.top = parseInt(txtRef.style.top) - speed + "px";
		}
        	timerIDRef = setTimeout("RefScrollDown("+speed+")",30);
    	}
}

function ScrollStop(){
    	if(document.getElementById){
        	clearTimeout(timerID);
    	}
}

function RefScrollStop(){
    	if(document.getElementById){
        	clearTimeout(timerIDRef);
    	}
}

function ScrollInit() {
   	if (document.getElementById("accueilLeftContent")) {
    	cnt = document.getElementById("accueilLeftContent");
    	txt = document.getElementById("text");
    	txt.style.top = 0;
    	if (cnt.offsetHeight<txt.offsetHeight){
    		//window.alert('Pas belle, la boîte !');
    		document.getElementById("up").src='/images/arrows/up-out.png';
    		document.getElementById("up").style.cursor="pointer";
    		document.getElementById("up").style.display="block";
    		document.getElementById("down").src='/images/arrows/down-out.png';
    		document.getElementById("down").style.cursor="pointer";
    		document.getElementById("down").style.display="block";
    	} else {
    		document.getElementById("up").onmouseover=null;
    		document.getElementById("up").onmouseout=null;
    		document.getElementById("down").onmouseover=null;
    		document.getElementById("down").onmouseout=null;      		
    	}
	}
   	if (document.getElementById("rightContentReference")) {
    	cntRef = document.getElementById("rightContentReference");
    	txtRef = document.getElementById("textRef");
    	txtRef.style.top = 0;
    	if (cntRef.offsetHeight<txtRef.offsetHeight){
    		//window.alert('Pas belle, la boîte !');
    		document.getElementById("upRef").src='/images/arrows/up-out.png';
    		document.getElementById("upRef").style.cursor="pointer";
    		document.getElementById("upRef").style.display="block";
    		document.getElementById("downRef").src='/images/arrows/down-out.png';
    		document.getElementById("downRef").style.cursor="pointer";
    		document.getElementById("downRef").style.display="block";
    	} else {
    		document.getElementById("upRef").onmouseover=null;
    		document.getElementById("upRef").onmouseout=null;
    		document.getElementById("downRef").onmouseover=null;
    		document.getElementById("downRef").onmouseout=null;      		
    	}
	}
   	if (document.getElementById("bigRightContent")) {
    	cnt = document.getElementById("bigRightContent");
    	txt = document.getElementById("text");
    	txt.style.top = 0;
    	if (cnt.offsetHeight<txt.offsetHeight){
    		//window.alert('Pas belle, la boîte !');
    		document.getElementById("up").src='/images/arrows/up-out.png';
    		document.getElementById("up").style.cursor="pointer";
    		document.getElementById("up").style.display="block";
    		document.getElementById("down").src='/images/arrows/down-out.png';
    		document.getElementById("down").style.cursor="pointer";
    		document.getElementById("down").style.display="block";
    	} else {
    		document.getElementById("up").onmouseover=null;
    		document.getElementById("up").onmouseout=null;
    		document.getElementById("down").onmouseover=null;
    		document.getElementById("down").onmouseout=null;      		
    	}
	}
}


