function ajax_open_close(ptr, id_bloc, url) {

	// Récupération des champs :
	var data="id_bloc="+id_bloc;

	// Transfert Ajax :
	var xhr_object = null;   
	if(window.XMLHttpRequest) xhr_object = new XMLHttpRequest();   
	else if(window.ActiveXObject) xhr_object = new ActiveXObject("Microsoft.XMLHTTP");   
	else { alert("Error XMLHttpRequest"); return; }     

	xhr_object.open("POST", url, true);   
	xhr_object.onreadystatechange = function() { if(xhr_object.readyState == 4) eval(xhr_object.responseText); }   
	xhr_object.setRequestHeader("Content-type", "application/x-www-form-urlencoded");   
	xhr_object.send(data);  
}

function ajax_Bdd_Lst(path, form, nom_champ, valeur_champ, bloc) {
	// Récupération des champs :
	var data="nom_champ="+nom_champ+"&valeur_champ="+valeur_champ+"&form="+form+"&bloc="+bloc;
	var url=path+"actualites_ajax.php";

	// Transfert Ajax :
	var xhr_object = null;   
	if(window.XMLHttpRequest) xhr_object = new XMLHttpRequest();   
	else if(window.ActiveXObject) xhr_object = new ActiveXObject("Microsoft.XMLHTTP");   
	else { alert("Error XMLHttpRequest"); return; }     

	xhr_object.open("POST", url, true);   
	xhr_object.onreadystatechange = function() { if(xhr_object.readyState == 4) eval(xhr_object.responseText); }   
	xhr_object.setRequestHeader("Content-type", "application/x-www-form-urlencoded");   
	xhr_object.send(data);  
}
function ajax_Bdd_Lst_affect(nom_champ, bloc, valeur) {
	document.getElementById(nom_champ).value=valeur;
	document.getElementById(bloc).style.display='none';
}

function ajax_Actio(ptr, action) {
	// Récupération des champs :
	if (action=='membres') var data="form=f1&sesame="+document.getElementById('pass1').value;
	var url=ptr+"ajax1.php";

	// Transfert Ajax :
	var xhr_object = null;   
	if(window.XMLHttpRequest) xhr_object = new XMLHttpRequest();   
	else if(window.ActiveXObject) xhr_object = new ActiveXObject("Microsoft.XMLHTTP");   
	else { alert("Error XMLHttpRequest"); return; }     

	xhr_object.open("POST", url, true);   
	xhr_object.onreadystatechange = function() { if(xhr_object.readyState == 4) eval(xhr_object.responseText); }   
	xhr_object.setRequestHeader("Content-type", "application/x-www-form-urlencoded");   
	xhr_object.send(data);  
}


function ShowForm(bloc1, bloc2) {

	var larg = (document.body.clientWidth)/2-140;  var decal1 = larg+"px";
	var larg = (document.body.clientHeight)/2-100; var decal2 = larg+"px";

	document.getElementById(bloc1).style.position="absolute";
	document.getElementById(bloc1).style.display="block";
	document.getElementById(bloc1).style.left="0px";
	document.getElementById(bloc1).style.top="0px";
	document.getElementById(bloc1).style.zIndex="10";
	document.getElementById(bloc2).style.position="absolute";
	document.getElementById(bloc2).style.display="block";
	document.getElementById(bloc2).style.left=decal1;
	document.getElementById(bloc2).style.top=decal2;
	document.getElementById(bloc2).style.zIndex="11";
	document.getElementById(bloc2).focus();
}

function HideForm(bloc1, bloc2) {
	document.getElementById(bloc1).style.display="none";
	document.getElementById(bloc2).style.display="none";
}