function getXhr(){
  var xhr = null; 
  
  if(window.XMLHttpRequest) // Firefox et autres
	xhr = new XMLHttpRequest(); 
  else if(window.ActiveXObject){ // Internet Explorer 
	try {
			xhr = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
			xhr = new ActiveXObject("Microsoft.XMLHTTP");
 	}
  }
  else { // XMLHttpRequest non supporté par le navigateur 
	alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest..."); 
	xhr = false; 
  } 
    return xhr;
}

function getInfos(type, bloc, file){
	
	// ****************AFFICHAGE DYNAMIQUE DES INFORMATIONS**********************

	var bloc = window.document.getElementById(bloc);		
	
	var xhr_object = getXhr();
	
	xhr_object.onreadystatechange = function(){			
				   
		if(xhr_object.readyState == 4 && xhr_object.status == 200){
			leselect = xhr_object.responseText;				
			bloc.innerHTML = leselect;			
			
			//IMPORTANT INTERPRETE BALISE SCRIPT
			var allscript = bloc.getElementsByTagName("script");
    		for(var i=0;i< allscript.length;i++){
      			window.eval(allscript[i].text);
			}		
		var global = this;
		global.eval();
		}
		var global = this;
		global.eval();
	};
			
	xhr_object.open("POST","elements/php/"+file,true); 
	xhr_object.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
		 
	xhr_object.send(type +"=true");
}

function getInfosRecup(type, bloc, file, arg){
	
	// ****************AFFICHAGE DYNAMIQUE DES INFORMATIONS**********************

	var bloc = window.document.getElementById(bloc);		

	var xhr_object = getXhr();
	
	xhr_object.onreadystatechange = function(){			
				   
		if(xhr_object.readyState == 4 && xhr_object.status == 200){
			leselect = xhr_object.responseText;				
			bloc.innerHTML = leselect;
		}
	};
			
	xhr_object.open("POST","../elements/php/"+file ,true); 
	xhr_object.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
		 
	xhr_object.send(type +"=true&arg="+arg);
}

	
	

