
//Fonction de javacript pour defilement vertical
var pos;
var speed = 1;
var pos_initial;
 
function startAnim() {
	var e = document.getElementById('newsbox1');
	pos_initial = e.clientHeight + 10;
	pos = pos_initial;
	setInterval('anim()', 20);
}
function anim() {
	var e = document.getElementById('newslist1');
	e.style.visibility = 'visible';
	e.style.top = Math.floor(pos) + 'px';
	pos = pos - speed;
	if(pos < -e.clientHeight) pos = pos_initial;
}
window.onload = function() {
  var e = document.getElementById('newsbox1');
  e.onmouseover = function() { speed = 0; };
  e.onmouseout = function() { speed = 1; };
  startAnim()
};
//ouverture/fermeture/controle simple d'un popup
function openPopup(txtUrl,nbHauteur,nbLargeur)
{
	var nbTop=(screen.height-nbHauteur)/2;
	var nbLeft=(screen.width-nbLargeur)/2;
	window.open(txtUrl,"","top="+nbTop+",left="+nbLeft+",width="+nbLargeur+",height="+nbHauteur);
}

// Gestion de l'affichage des menus déroulants
sfHover = function() {
        var sfEls = document.getElementById("nav_link_ul").getElementsByTagName("LI");
        for (var i=0; i<sfEls.length; i++) {
                sfEls[i].onmouseover=function() {
                        this.className+=" sfhover";
                }
                sfEls[i].onmouseout=function() {
                        this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
                }
        }
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
