// JavaScript Document 
//FONCTIONS pour AJAX form http://fr.wikibooks.org/
var xhr = null; 
/**/
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..."); 
  xhr = false; 
  } 
}

/* Affiche page sous ajax */
function ShowPage(page)
{
getXhr();
xhr.onreadystatechange = function()
    {
     if(xhr.readyState == 4 && xhr.status == 200)
     {
     document.getElementById('page').innerHTML=xhr.responseText;
     }
    }
xhr.open("GET","ajax.php?page="+page,true);
xhr.send(null);
}




//
/*Onrollover affiche descritpion*/

function afficheDescription(endroit,contenu) 
  {
  if (document.getElementById)
    {
    document.getElementById(endroit).innerHTML = contenu;
    }
  else if (document.all) 
    {
    document.all[endroit].innerHTML = contenu;
    }
  }
rien = "";




/* remplace contenu */

function remplaceContenu(endroit) 
  {
  if (document.getElementById)
    {
    document.getElementById(endroit).innerHTML = 'index.php?a=2';
	
    }
  else if (document.all) 
    {
    document.all[endroit].innerHTML ='index.php?a=2';
    }
  }



