function XMLHttp()
{
	xmlhttpOK = false;
	var xmlhttp=null;
	if (window.XMLHttpRequest){
		//firefox - mozilla - safari
		xmlhttp = new XMLHttpRequest();
	}
	else{
		//IE
		if (window.ActiveXObject){
			try {
				xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch(e) {
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
		}
	}
	return xmlhttp;
}

var xmlhttp=new XMLHttp();


function postURL(url,data,fonction) {
	if(xmlhttp)	{
		xmlhttp.open("POST",url,true);
		xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
		xmlhttp.onreadystatechange=function(){
			if (xmlhttp.readyState == 4) {
				if (xmlhttp.status == "200"){
					if (xmlhttp.responseText.charAt(0) == ";")
						eval(fonction+"(xmlhttp.responseText)");
					else {
						alert("Information gathering issue."+xmlhttp.responseText);
						return false;
					}
				}
			}
		}
		xmlhttp.send(data);
	}
	return true;
}


function postURLRet(url,data){
	if(xmlhttp)	{
		xmlhttp.open("POST",url,false);
		xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
		xmlhttp.send(data);
		return xmlhttp.responseText;
	}
	return "";
}
