	function getXmlHttpRequest()
{
	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 l'objet XMLHTTPRequest !");
		xhr = false;
	}
}



function envoyerPassword(clientEmailId)
{
	if(clientEmailId == ''){
		alert('Veuillez renseigner votre adresse email');
	} else {
		getXmlHttpRequest();
		xhr.onreadystatechange = function() {	
			if(xhr.readyState == 4 && xhr.status == 200)
			{
				menu = xhr.responseText;
				alert(menu);
				//document.getElementById('retourAjaxPasswrd').innerHTML = menu;
			}
		}
		xhr.open("post","/mplassur/envoyerPassword.php",true);
		xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
		xhr.send("clientEmailId="+clientEmailId);
	}
}

function supprimer(id,type)
{
	getXmlHttpRequest();
	xhr.onreadystatechange = function() {	
		if(xhr.readyState == 4 && xhr.status == 200)
		{
			menu = xhr.responseText;
			//alert(menu);
		}
	}
	xhr.open("post","/admin/ajax_functions/supprimer.php",true);
	xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
	xhr.send("champ_id="+id+"&type="+type);
}




