function Req(){
this.loader = false;
this.request = false;
this.goodAns = true;
this.method = "GET";
this.receiveFunc = 'Result';
this.xml = false;
}

Req.prototype = {
Connect: function (){
	try {
		this.loader = new XMLHttpRequest();
		} catch (e) {}
	var classNames = [ 'MSXML2.XMLHTTP', 'Microsoft.XMLHTTP' ];
	for (var i in classNames) {
		try {
			this.loader = new ActiveXObject(classNames[i]);
			break;
			} catch (e) {}
	}
},

Request: function (url, par, postData){
	this.goodAns = false;
    this.servStamp = Math.random()*1000000000000000000;
    try {
    	var q = "http://"+url+"?r="+this.servStamp+par;
		this.loader.open(this.method, q, true);
        this.loader.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");

	    var it = this;
	    this.loader.onreadystatechange = function (){ it.RSChanged(); };
    } catch (e) { }
	
	if (this.method == 'POST' && postData) {
		this.loader.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");		
	    this.loader.send(postData);		
	} else {
	    this.loader.send(null);		
	}
},

RSChanged: function (){
	if (this.loader && (this.loader.readyState == 4))
    if (this.loader.status == 200){
    	this.goodAns = true;
        this.xml = this.loader.responseXML.documentElement;

    try {
        eval("this."+this.receiveFunc+"();");
    } catch (e) { }
    }
},

Result: function (){

}
}
