/* version 1 -- scrolling page d'accueil-->
var nInfoSpeed   = 2;   
var nInfoMinSpeed  = 2;   
var nInfoMaxSpeed  = 14;   
var nHeadlineHeight  = 35;  

function o_hGetById(id) 
{
hHandler = (document.getElementById(id))?document.getElementById(id):false;
return hHandler;
}

function infoMoveDown(){
try{
var crossobj = o_hGetById('liste_actus');
var contentheight=crossobj.offsetHeight;
if (parseInt(crossobj.style.top)>=(contentheight*(-1)+220)) crossobj.style.top=parseInt(crossobj.style.top)-nInfoSpeed;
hInfoMoveDown = setTimeout("infoMoveDown()",100);
return true;
} catch(e) {}
}
function infoMoveUp(){
try{
var crossobj = o_hGetById('liste_actus');
var contentheight=crossobj.offsetHeight;
if (parseInt(crossobj.style.top)<=0) crossobj.style.top=parseInt(crossobj.style.top)+nInfoSpeed;
hInfoMoveUp = setTimeout("infoMoveUp()",100);
return true;
} catch(e) {}
}*/

/* version 2 -- scrolling page d'accueil-->*/
function o_hGetById(id) 
{
hHandler = (document.getElementById(id))?document.getElementById(id):false;
return hHandler;
}

var nInfoMinSpeed = 2;    
var nInfoMaxSpeed = 14;    
var nInfoSpeed  = nInfoMinSpeed; 
var nInfoMarge  = 5;    


function infoMoveDown(iContenu){
try{
var hContenu = o_hGetById(iContenu);
var hContainer = hContenu.parentNode;
var iHauteurMax = hContenu.offsetHeight;
var iHauteurMin = hContainer.offsetHeight-nInfoMarge; 
if ((iHauteurMax + parseInt(hContenu.style.top) - nInfoSpeed) > iHauteurMin){
var iDeplacement = parseInt(hContenu.style.top) - nInfoSpeed;
hContenu.style.top = iDeplacement+"px";
} else hContenu.style.top = (iHauteurMin - iHauteurMax) + "px";
hInfoMoveDown = setTimeout("infoMoveDown('"+iContenu+"')",100);
return true;
} catch(e) {}
}
function infoMoveUp(iContenu){
try{
var hContenu = o_hGetById(iContenu);
if (parseInt(hContenu.style.top) + nInfoSpeed < 0){
var iDeplacement = parseInt(hContenu.style.top) + nInfoSpeed;
hContenu.style.top = iDeplacement+"px";
} else hContenu.style.top = "0px";
hInfoMoveUp = setTimeout("infoMoveUp('"+iContenu+"')",100);
return true;
} catch(e) {}
}
/*
document.getElementById('btnInfo').style.visibility = 'visible';
document.getElementById('infoDefil').style.overflow = 'hidden';
document.getElementById('infoDefil').style.height = '100px';
*/
  


