VoteEnCours=false;
CodeCollectionCourantAParaitre=-1;
LockClick=false;
/* ************************************************************* */   
function VoteOuvrageType1(RacineDiv,LeEAN,NomBloc,CodeBloc,IdCollection,DateRef)
{
	if(VoteEnCours)
		return false;
	$(document).ready(function () 
	{			
			VoteEnCours=true;
			LeNomDiv="#"+RacineDiv+LeEAN;
			$.ajax({
			  url: "vote_ouvrage.php",
			  cache: false,
			  type: "POST",
	      data: ({EAN:LeEAN,NB:NomBloc,CB:CodeBloc,IDC:IdCollection,DAT:DateRef}),
	      dataType: "text",
			  success: function(uneData){
			    $(LeNomDiv).html(uneData);
			    alert("Votre vote a été pris en compte.");
			    VoteEnCours=false;
					if(TableauRefBtnVote[LeEAN].length>0)
					{
						var NomCourtDiv=RacineDiv+LeEAN;
						for(var Ind=0;Ind<TableauRefBtnVote[LeEAN].length;Ind++)
						{
							if(TableauRefBtnVote[LeEAN][Ind]!=NomCourtDiv)
							{
								$("#"+TableauRefBtnVote[LeEAN][Ind]).html(uneData);
							}
						}
					}
			  }
			});
	});
}

/* ************************************************************* */   
function ChoixPageALaUne(NumPage)
{
	if(LockClick)
		return false;
	$(document).ready(function () 
	{			
			LeNomDiv="#DIVALAUNEACUEIL";
			LockClick=true;
			$("#TRACELOADALAUNE").html('<img src="images/spinner.gif" width="16" height="16"/>');
			$.ajax({
			  url: "prepare_draw_encart_a_la_une_accueil.php",
			  cache: false,
			  type: "POST",
	      data: ({PAG:NumPage}),
	      dataType: "text",
			  success: function(uneData){
			  	LockClick=false;
			    $(LeNomDiv).html(uneData);
			    
			    $("#TRACELOADALAUNE").html('<img src="images/giftransparent.gif" width="16" height="16"/>');
			  }
			});
	});
}

/* ************************************************************* */   
function ChoixPageNouveauteAccueil(NumPage)
{
	if(LockClick)
		return false;
	$(document).ready(function () 
	{			
			LeNomDiv="#DIVNOUVEAUTEACUEIL";
			LockClick=true;
			$("#TRACELOADNOUVAUTE").html('<img src="images/spinner.gif" width="16" height="16"/>');
			$.ajax({
			  url: "prepare_draw_encart_nouveaute_accueil.php",
			  cache: false,
			  type: "POST",
	      data: ({PAG:NumPage}),
	      dataType: "text",
			  success: function(uneData){
			    $(LeNomDiv).html(uneData);
			    LockClick=false;
			    $("#TRACELOADNOUVAUTE").html('<img src="images/giftransparent.gif" width="16" height="16"/>');
			  }
			});
	});
}

/* ************************************************************* */     
function Efface_Historique_Consultation()
{
	$(document).ready(function () 
	{			
			LeNomDiv="#ENCART_HISTORIQUE_CONSULATION";

			$.ajax({
			  url: "prepare_efface_historique.php",
			  cache: false,
			  type: "POST",
	      data: ({}),
	      dataType: "text",
			  success: function(uneData){
			    $(LeNomDiv).html(uneData);
			  }
			});
	});
}

/* ************************************************************* */   
function Efface_Historique_Consultation_Interieur()
{
	$(document).ready(function () 
	{			
			LeNomDiv="#ENCART_HISTORIQUE_CONSULATION";

			$.ajax({
			  url: "prepare_efface_historique_interieur.php",
			  cache: false,
			  type: "POST",
	      data: ({}),
	      dataType: "text",
			  success: function(uneData){
			    $(LeNomDiv).html(uneData);
			  }
			});
	});
}

/* ************************************************************* */ 
