function CHttpRequest(url, ctrl)
{
    this.url = url;
    this.ctrl = ctrl;  
    var chttp_xmlDoc;  
    
    this.onFinish = onFinish;
    
	try { chttp_xmlDoc = new XMLHttpRequest(); }
    catch(e)
    {
    	var XmlHttpVersions = new Array("MSXML2.XMLHTTP.6.0", "MSXML2.XMLHTTP.5.0", "MSXML2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP");
        for (var i=0; i<XmlHttpVersions.length && !chttp_xmlDoc; i++) 
        {
            try { chttp_xmlDoc = new ActiveXObject(XmlHttpVersions[i]); }
            catch (e) {}
        }    
	}

    chttp_xmlDoc.onreadystatechange = function() { onFinish(ctrl); };    
    chttp_xmlDoc.open("POST", this.url, true);
    chttp_xmlDoc.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8"); 
    chttp_xmlDoc.send(null);
    
    //return chttp_xmlDoc;
    
    function onFinish(ctrl)
    {
        var response;
        if (chttp_xmlDoc.readyState == 4) 
        {
    	    if (chttp_xmlDoc.status == 200) // only if OK
    	    {	        
    		    response = chttp_xmlDoc.responseText;    		     	 
            } 
    	    else 
    	    {
    		    response = "can't retrieving the data:\n" + chttp_xmlDoc.statusText;
    	    }    	    
			ctrl.innerHTML = trim(response); 
			
			return	    
        }           
    }   
}