
	
	function sendData(data, page, method, where)
	{
		if(document.all)
		{
			//Internet Explorer
			var XhrObj = new ActiveXObject("Microsoft.XMLHTTP") ;
		}
		else
		{
		    //Mozilla
			var XhrObj = new XMLHttpRequest();
		}
		
		//définition de l'endroit d'affichage:
		var content = document.getElementById(where);
		
		
		if(method == "GET")
		{
			if(data == 'null')
			{
				
				XhrObj.open("GET", page);
			}
			else
			{
				
				XhrObj.open("GET", page+"?"+data);
			}
		}
		else if(method == "POST")
		{
			
			XhrObj.open("POST", page);
		}
	
		
		XhrObj.onreadystatechange = function() 
		{
			if (XhrObj.readyState == 4 && XhrObj.status == 200)
				content.innerHTML = XhrObj.responseText ;
		}	
	
		if(method == "GET")
		{
			XhrObj.send(null);
		}
		else if(method == "POST")
		{
			XhrObj.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
			XhrObj.send(data);
		}
	}
	
	
	function getFile(page)
	{
		sendData('null', page, 'GET')
	} 

	function remove_content(where){
	var content = document.getElementById(where);
	content.innerHTML = '';
	}
	
