var current_actu = 1;
var max_actus = 3;
var promoTimer;
//
function init_index() {
	/*var container = document.getElementById('main');
	var liens = container.getElementsByTagName('a');
	//
	var sContainer = document.getElementById('ind_actualites_scrollers');
	sContainer.innerHTML = 	"<div id=\"ind_actualites_scroll_up\"><a href=\"#\" onclick=\"return scrollIndActus('up')\" title=\"Voir l'actualit&eacute; pr&eacute;c&eacute;dente\"><img src=\"_img/home_actualites_scroll_U.gif\" alt=\"Remonter les actualit&eacute;s\" /></a></div>" +
							"<div id=\"ind_actualites_scroll_down\"><a href=\"#\" onclick=\"return scrollIndActus('down')\"><img src=\"_img/home_actualites_scroll_D.gif\" alt=\"Descendre les actualit&eacute;s\" /></a></div>";
	sContainer.style.display = "block";
	//
	var aContainer = document.getElementById('ind_actualites_fiches');
	aContainer.style.width = "228px";
	aContainer.style.height = "309px";
	aContainer.style.overflow = "hidden";
	aContainer.style.clip = "rect(0px, 218px, 309px, 0px)";
	//
	for (var i = 2; i <= max_actus; i++) {
		document.getElementById('cartoucheActu_1').style.display = "block";
		document.getElementById('cartoucheActu_' + i).style.display = "none";
	};
	//*/
	if (document.getElementById('ouvrage_promo')) {
		document.getElementById('ouvrage_promo').style.display = "block";
	}
}

//
function scrollIndActus(direction) {
	if (direction == "up") {
		document.getElementById('cartoucheActu_' + current_actu).style.display = "none";
		if (current_actu != 1) {
			current_actu--;
		} else {
			current_actu = 3;
		}
		document.getElementById('cartoucheActu_' + current_actu).style.display = "block";
	} else if (direction == "down") {
		document.getElementById('cartoucheActu_' + current_actu).style.display = "none";
		if (current_actu != 3) {
			current_actu++;
		} else {
			current_actu = 1;
		}
		document.getElementById('cartoucheActu_' + current_actu).style.display = "block";
	}
	//
	return false;
}
//
function switch_nav(target_id, img_name) {
	document.getElementById(target_id).src = "_img/btn_" + img_name + "_pushed.gif";
}
//
function revert_nav(target_id, img_name) {
	document.getElementById(target_id).src = "_img/btn_" + img_name + ".gif";
}
//
function closePromo() {
	var p = document.getElementById('ouvrage_promo');
	p.style.display = "none";
	clearTimeout(promoTimer);
	return false;
}
//
function fadePromo() {
	var o = document.getElementById('ouvrage_promo');
	o.style.display = "none";
	clearTimeout(promoTimer);
}