function init_maj() {
	document.getElementById('zone_maj').innerHTML=scroll_maj[0];
	if (document.getElementById('zone_maj').offsetHeight>60) {
		verif_hauteur(0)
	}
	setTimeout("change_maj(1)",5000);
}
function verif_hauteur(num_maj) {
	first_br=scroll_maj[num_maj].indexOf('<br>');
	last_br=scroll_maj[num_maj].lastIndexOf('<br>');
	first_space=scroll_maj[num_maj].indexOf(' ');
	last_space=scroll_maj[num_maj].lastIndexOf(' ');
	if (first_br!=last_br) {
		position=last_br;
	} else {
		position=last_space;
	}
	i=0;
	var nouvelle_chaine='';
	do {
		nouvelle_chaine=nouvelle_chaine+scroll_maj[num_maj].charAt(i);
		i++;
	} while (i<position);
	scroll_maj[num_maj]=nouvelle_chaine+'...';
	document.getElementById('zone_maj').innerHTML=scroll_maj[num_maj];
	if (document.getElementById('zone_maj').offsetHeight>60) {
		verif_hauteur(num_maj)
	}
}
function change_maj(i) {
	if (i>=scroll_maj.length) i=0;
	document.getElementById('zone_maj').innerHTML=scroll_maj[i];
	if (document.getElementById('zone_maj').offsetHeight>60) {
		verif_hauteur(i)
	}
	i++;
	setTimeout("change_maj("+i+")",5000)
}

function show_maj(texte,action) {
	document.getElementById('zone_cache').innerHTML=texte;
	if (action==1) {
		document.getElementById('cache').style.visibility="visible";
	} else {
		document.getElementById('cache').style.visibility="hidden";
	}
}

function replace() {
	document.getElementById('cache').style.left=(document.body.clientWidth-748)/2+'px';
}
