//Variables pour le scrolling horizontal des menus
var idx_actualnews = 0;
var flag_html_tag = 0;
var idx_char = 0;
var txt_news="";

function news_onair() {
    if(document.getElementById){
        if(idx_actualnews >= arr_news.length){
			idx_actualnews = 0;
			txt_news = "";
		}
		news_display(idx_actualnews)
    }        
}
function news_display(idx_news) {
    var pix = arr_news[idx_news].charAt(idx_char);
    if(pix == "<") flag_html_tag = 1;
    if(pix == ">") flag_html_tag = 0;
    if(idx_char < arr_news[idx_news].length){
        idx_char++;
        if ((flag_html_tag == 1) || (pix == ">")){ 
			news_display(idx_news);
		}else{
			txt_news = txt_news + pix; 
			document.getElementById("newsbloc").innerHTML = "<a class=\"scrollmenu\" href=\"index.php?sec=1&cat=2\">" + txt_news + "</a>";			
            setTimeout("news_display("+idx_news+")",50)
        }
	}else{
		txt_news = txt_news + "&nbsp;&nbsp;|&nbsp;&nbsp;";
		idx_char = 0;
		idx_actualnews++;
        setTimeout("news_onair()",2000)
	}
}
// fonction pour cacher un element de bloc et rendre visible un autre en changeant l'attribut de style 'display' 	
function switchdisplay(idtohide, idtoshow, showtype){
	document.getElementById(idtohide).style.display = "none";
	document.getElementById(idtoshow).style.display = showtype;
}
// fonction pour ouvrir une nouvelle fenêtre avec
// fichier à afficher, nom de la fenêtre, largeur, hauteur et position de la fenêtre passés en variable
function popupmodulo(url, name, x, y, top, left) {
	window.open(url,name,'location=no,toolbar=no,directories=no,menubar=no,resizable=no,scrollbars=no,status=no,width='+x+',height='+y+'screenY='+top+',screenX='+left);
}