function ajax_send(methode, uri, query){
	if(methode!='POST' && methode!='GET'){
		return false;
	}
	if(window.ActiveXObject){ // IE
		var req = new ActiveXObject('Microsoft.XMLHTTP') ;
	}else{ // Netscape
		var req = new XMLHttpRequest();
	}
	req.open(methode, uri+((query!='' && methode=='GET')? '?'+query : '' ), true);
	if(methode=='GET'){
		req.send('');
	}else{
		req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		req.send(query);
	}
	window.document.getElementById('localisation').innerHTML = '<img src="/images/loader.gif" style="vertical-align: middle;" alt=""/> '+loc_progress;

	req.onreadystatechange = function(){
		if(req.readyState==4) analyse(req);
	}
}

function analyse(obj){
	if(obj.status==200){
		var buffer = obj.responseText;
		if(buffer=='error'){
			window.document.getElementById('localisation').innerHTML = loc_impossible;
		}else{
			window.document.getElementById('localisation').innerHTML = buffer;
		}
	}else{
		window.document.getElementById('localisation').innerHTML = loc_impossible;
	}
}
