function init(){
	if (document.getElementById){
		ProtObj = document.getElementById("commentaire_content");
		ProtObjl = document.getElementById("commentaire_loading");
		}
	else if (document.all){
		ProtObj = document.all["commentaire_content"];
		ProtObjl = document.all["commentaire_loading"];
		}
	}

function active(objet){
	objet.style.backgroundColor = "#ffffa0";
	}

function desactive(objet){
	objet.style.backgroundColor = "#ffffff";
	}

function getXhr(){
	var xhr = null; 
		if(window.XMLHttpRequest){
	  	xhr = new XMLHttpRequest(); 
			}
		else if(window.ActiveXObject){
			try {
       	xhr = new ActiveXObject("Msxml2.XMLHTTP");
         } catch (e) {
       	xhr = new ActiveXObject("Microsoft.XMLHTTP");
         }
			}
		else {
			alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest..."); 
			xhr = false; 
			} 
   return xhr
	}

function charge_comment(ide, depart, nb, filtre){
	init();
	ProtObj.visibility = "hidden";
	ProtObj.display = "none";
	ProtObjl.visibility = "visible";
	ProtObjl.display = "block";

	var xhr = getXhr()
	xhr.onreadystatechange = function(){
		if(xhr.readyState == 4 && xhr.status == 200){
			ProtObj.innerHTML = xhr.responseText;
			ProtObj.visibility = "visible";
			ProtObj.display = "block";
			ProtObjl.visibility = "hidden";
			ProtObjl.display = "none";
			}
		}
	xhr.open("GET","agenda-commentaire-actualise.php?id=" + ide + "&depart=" + depart + "&nb=" + nb + "&filtre=" + filtre + "",true);
	xhr.send(null);
	}
