function maj_liste_elt_diapo (niveau)
{
	if (niveau == 'prec')	{ first_diapo = first_diapo - 1; }
	if (niveau == 'suiv')	{ first_diapo = first_diapo + 1; }
	
	if(first_diapo<1)
	{
		first_diapo=total_diapo;
	}
	if(first_diapo> total_diapo)
	{
		first_diapo=1;
	}
	affiche_elt_diapo (first_diapo);

}
		
function affiche_elt_diapo (i, refactor_preview)
{
	document.getElementById("div_diapo").innerHTML = '<a href="#"><img src="'+img_elt_diapo[i]+'" alt="'+desc_elt_diapo[i]+'" title="'+txt_elt_diapo[i]+'" style="width:395px;" border="0" /></a>';
	document.getElementById("div_diapo_desc").innerHTML = desc_elt_diapo[i];
	reaffichage_elt_diapo(i);
}

function reaffichage_elt_diapo(id_first_img)
{
	var id_img_en_cours=0;
	if(id_first_img<(Math.ceil(nb_image_page/2)))
	{
		id_img_en_cours=total_diapo-Math.ceil(nb_image_page/2)+id_first_img;
	}
	else
	{
		id_img_en_cours=id_first_img-Math.ceil(nb_image_page/2);
	}
	for(var i=1;i<nb_image_page+1;i++)
	{
		if(id_img_en_cours==total_diapo){id_img_en_cours=1;}else{id_img_en_cours++;};
		if (id_img_en_cours == id_first_img) {classe = " style='border-width: 1px; border-style: solid; border-color: #FF0037;'"; }else{classe = ""; }
		if (img_elt_diapo[id_img_en_cours] != undefined)
		{
			var diapo = "<a href='#diapo' onclick='javascript:affiche_elt_diapo("+id_img_en_cours+");'><img src='"+ img_elt_diapo[id_img_en_cours] +"' alt='"+ txt_elt_diapo[id_img_en_cours] +"' style='width:60px;' "+classe+"/></a>";
		}
		else
		{
			diapo = "";	
		}
		document.getElementById('div_'+i).innerHTML = diapo;
	}
	first_diapo=id_first_img;
}