// JavaScript Document
//
//
//
// SCROLLER
//
var Timer;
var Pas = 10;
function moveLayer(Sens) {
	Objet=document.getElementById("texte-contenu");
    if(parseInt(Objet.style.top) + (Pas*Sens)>0)  {
		clearTimeout(Timer);
	}
	else if(parseInt(Objet.style.top) + (Pas*Sens)<-(Objet.offsetHeight-document.getElementById("texte-support").offsetHeight)) {
		clearTimeout(Timer);
	}
    else {
        Objet.style.top = (parseInt(Objet.style.top) + (Pas*Sens)) + "px";
	}
	Timer = setTimeout("moveLayer(" + Sens + ");", 30);
}
//
function moveLayerHoriz(Sens) {
	ObjetHoriz=document.getElementById("contenuHoriz");
    if(parseInt(ObjetHoriz.style.left) + (Pas*Sens)>0)  {
		clearTimeout(Timer);
	}
	else if(parseInt(ObjetHoriz.style.left) + (Pas*Sens)<-(ObjetHoriz.offsetWidth-document.getElementById("supportHoriz").offsetWidth)) {
		clearTimeout(Timer);
	}
    else {
        ObjetHoriz.style.left = (parseInt(ObjetHoriz.style.left) + (Pas*Sens)) + "px";
	}
	Timer = setTimeout("moveLayerHoriz(" + Sens + ");", 30);
}
//
//
//
// POPUP
function popupcentree(page,largeur,hauteur,options) {
	var top=(screen.height-hauteur)/2;
	var left=(screen.width-largeur)/2;
	window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
} 
