/* auteur: Atelier 33 - Date de création: 16/06/2008 */
//---------------------------
function xmlhttpPost(strURL, strForm, strResult, strQs) 
{
	//alert("Ajax1");
    var xmlHttpReq = false;
    var self = this;
	
	//alert(strQs);
	
	
	
    // Mozilla/Safari
    if (window.XMLHttpRequest) {self.xmlHttpReq = new XMLHttpRequest();}
    // IE
    else if (window.ActiveXObject) {self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");}
	
    self.xmlHttpReq.open('POST', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
        if (self.xmlHttpReq.readyState == 4) {
            updatepage(self.xmlHttpReq.responseText, strResult);
        }
    }
	
	if(strQs!="")
		{
		//strQs=escape(strQs);
		self.xmlHttpReq.send(strQs);
		}
	else
		{
    	self.xmlHttpReq.send(getquerystring());
		}

}
//---------------------------
function getquerystring(strForm)
{
	//alert("Ajax2");
    //var form     = document.forms['f1'];
    //var word = form.word.value;
    qstr = 'w=' + escape(word);  // NOTE: no '?' before querystring
    return qstr;
}
//---------------------------
function updatepage(str, strResult)
{
	//alert("Ajax3");
    document.getElementById(strResult).innerHTML = str;
}
//---------------------------