// JavaScript Document
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 ajax3()
{

var calcblock=false;
	if(document.getElementById('block'))
	{
	calcblock=true;
	}
	
	
	
	if(document.getElementById('invite')&&calcblock==false)
	
	{
			getXhr();
	  xhr.onreadystatechange = function()
	
		{
		if(xhr.readyState == 4 && xhr.status == 200)
		 {
		  // Nous remplacons le contenu du div iris par le retour de "ajax/ajaxiris.php"
			  if( document.getElementById('invite'))
			  {
			  document.getElementById('invite').innerHTML = xhr.responseText;
			  //grisage fond//
			  
			
			  ///////////
			  
			  }
		 }
	   }
		xhr.open("GET",'http://www.mariage-chretien.com/invitex.php',true);
		xhr.send(null);


	
	 
	}//fin if document.getElementById('invite')&&calcblock==false
	
	
	if(document.getElementById('visioblock'))
	{


		 getXhr();
		  xhr.onreadystatechange = function()
		
			{
			if(xhr.readyState == 4 && xhr.status == 200)
			 {
			  // Nous remplacons le contenu du div iris par le retour de "ajax/ajaxiris.php"
				  if( document.getElementById('visioblock'))
				  {
				  document.getElementById('visioblock').innerHTML = xhr.responseText;
				  }
			 }
		   }
			xhr.open("GET",'http://www.mariage-chretien.com/funcajax2.php',true);
			xhr.send(null);

	}//fin elsif
	

	 if(document.getElementById('block'))
	{


		 getXhr();
		  xhr.onreadystatechange = function()
		
			{
			if(xhr.readyState == 4 && xhr.status == 200)
			 {
			  // Nous remplacons le contenu du div iris par le retour de "ajax/ajaxiris.php"
				  if( document.getElementById('block'))
				  {
				  document.getElementById('block').innerHTML = xhr.responseText;
				  }
			 }
		   }
			xhr.open("GET",'http://www.mariage-chretien.com/funcajax.php',true);
			xhr.send(null);

	}//fin elsif

}


