// Bibliothèque de scripts 


//****************************************************************
// Affichage des sous-menus de sélection du site pays
//****************************************************************


sfHover1 = function() {
        if (document.getElementById('lang'))
                {
                var sfEls = document.getElementById('lang').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);
if (window.addEventListener) {
   window.addEventListener("load", sfHover1, false);
} else if (document.addEventListener) {
   document.addEventListener("load", sfHover1, false);
} else if (window.attachEvent) {
   window.attachEvent("onload", sfHover1);
}



//****************************************************************
// Affichage des 4 vies
//****************************************************************

sfHover2 = function() {
        if (document.getElementById('contentlive'))
                {
                var sfEls = document.getElementById('contentlive').getElementsByTagName("UL");
                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", 'gi'), "");
                        }
                }
                }
}
//if (window.attachEvent) window.attachEvent("onload", sfHover);
if (window.addEventListener) {
   window.addEventListener("load", sfHover2, false);
} else if (document.addEventListener) {
   document.addEventListener("load", sfHover2, false);
} else if (window.attachEvent) {
   window.attachEvent("onload", sfHover2);
}

var liActive=0;
sfHover3 = function() {
        if (document.getElementById('live'))
                {
                var sfEls = document.getElementById('live').getElementsByTagName("LI");
                for (var i=0; i<sfEls.length; i++) {
                        sfEls[i].idActive=i;
                        sfEls[i].onmouseover=function() {
                            var reg=new RegExp("sfHover", "gi");
                            if(!this.className.match(reg)){
                                this.className+=" sfhover";
                            }
                            for(var j=0; j<sfEls.length; j++){
                                if(j!=this.idActive) sfEls[j].className="item"+(j+1);
                            }
                            
                        }
                        sfEls[i].onmouseout=function() {
                            liActive=this.idActive;
                        }
                }
        }
}
//if (window.attachEvent) window.attachEvent("onload", sfHover);
if (window.addEventListener) {
   window.addEventListener("load", sfHover3, false);
} else if (document.addEventListener) {
   document.addEventListener("load", sfHover3, false);
} else if (window.attachEvent) {
   window.attachEvent("onload", sfHover3);
}



//****************************************************************
// Fonction d'import des animations Flash 
//****************************************************************

function RunFlash(swf, hauteur, largeur, nom) {
	document.write("<object width=\""+largeur+"\" height=\""+hauteur+"\" id=\""+nom+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\">\n");
	document.write("<param name=\"quality\" value=\"high\">\n");
	document.write("<param name=\"wmode\" value=\"transparent\">\n");
	document.write("<param name=\"movie\" value=\""+swf+"\">\n");
	document.write("<embed src=\""+swf+"\" quality=\"high\" wmode=\"transparent\" width=\""+largeur+"\" height=\""+hauteur+"\" name=\""+nom+"\" align=\"middle\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\">\n");
	document.write("</object>\n");
}


