var xhr = null;
 
// Fonction de creation de l'objet XMLHttpRequest qui resservira pour chaques fonctions AJAX
function getXhr()
 {
  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, veuillez le mettre à jour"); 
    xhr = false; 
   } 
 }

function ShowUne()
{
	Fonction="functions/ShowUne.aspx";
	
	
    getXhr();
  xhr.onreadystatechange = function()
   {
    if(xhr.readyState == 4 && xhr.status == 200)
     {
     alert(xhr.responseText);
       document.getElementById('content').innerHTML =  xhr.responseText ;
	 }
   }
  xhr.open("POST",Fonction,true);
  xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
  xhr.send("type=sans");
 
}


//affiche le choix du menu
function ShowArticles(Fonction)
{
	Fonction="functions/" + Fonction;
	
	
    getXhr();
  xhr.onreadystatechange = function()
   {
    if(xhr.readyState == 4 && xhr.status == 200)
     {
       document.getElementById('contenu').innerHTML = "<div>" + xhr.responseText + "</div>";
	 }
   }
  xhr.open("POST",Fonction,true);
  xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
  xhr.send("type=sans");
 
}
