// JavaScript Document
num_actu = 123;
function affiche_news(objet){
	$("#presentation_info").show();
	if($("#presentation_info").width()>580)
	{
		$("#cadre_info").width(580);
	}
	else
	{
		$("#cadre_info").width($("#presentation_info").width());
	}
	donnees = 'position='+objet;
	num_actu = objet;
	$.ajax({
		type:'POST',
		url: 'la_news.php',
		data: donnees,
		dataType:'text',
		success: actualiser_page,
		error: function() {alert('Erreur serveur');}
	});
}
function actualiser_page(info){
	$("#cadre_info").html(info);
	$("#info").show();
	taille = 150 + $("#info_la_news").height() +$("#titre_la_news").height();
	$("#cadre_info").height(taille);
	$("#droite").click(function()
				{
					affiche_news(parseInt(num_actu)+1);
				}
	);
	$("#gauche").click(function()
				{
					affiche_news(parseInt(num_actu)-1);
				}
	);
	$("#sup").click(function()
				{
					$("#presentation_info").hide();
					$("#info").hide();
				}
	);
}
$(document).ready(function()
					{
						$(".puce_actu").click(function()
														{
															affiche_news(this.id);
														}
						);
						$(".titre_actu").click(function()
														{
															affiche_news(this.id.substring(this.id.indexOf("A")+1, this.id.length));
														}
						);
					}
);

