/**
* xml_http_request.js
*
* @package		HTML
* @version		Version 1.0 - 2005-01-18
* @author		Sebastien Garrouste
* @copyright	Imago - ? Copyright Metapages - All rights reserved.
*/

/**
* Send an HTTP POST request by javascript
*	NEED sniffer.js ti detect what is navigator
* 
* @param string url
* @param string param
* @return string
*/
function sendAPostRequest (url, param){
	detection_navigateur("");
	if(!is_ie){
		try {
			xhr = new XMLHttpRequest();
		} catch (e) {
			xhr = false
		}
	} else {
		try {
			xhr = new ActiveXObject("Msxml2.XMLHTTP")
		} catch (e) {
			try {
				xhr = new ActiveXObject("Microsoft.XMLHTTP")
			} catch (e) {
				xhr = false
			}
		}
	}

	xhr.open("POST", url, false);
	xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	xhr.onreadystatechange = function() {
		if (xhr.readyState == 4 && xhr.status == 200) {
			
		}
	}
	xhr.send(param);
	
	return xhr.responseText;
}
