function Ajax(url,recvT,stringS,resultF) {
	this.url = url;
	this.stringS = stringS;
	this.xmlHttp = this.createXMLHttpRequest();
	if (this.xmlHttp == null) {
	    //alert("error");
        return;
    }
	var objxml = this.xmlHttp;
	objxml.onreadystatechange = function (){Ajax.handleStateChange(objxml,recvT,resultF)};
}

Ajax.prototype.createXMLHttpRequest = function() {
    try { return new ActiveXObject("Msxml2.XMLHTTP");    } catch(e) {}
    try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {}
    try { return new XMLHttpRequest();                   } catch(e) {}
    return null;
}

Ajax.prototype.createQueryString = function () {
	var queryString = this.stringS;
	return queryString;
}

Ajax.prototype.get = function () {
	url = this.url;
	var queryString = url+"?timeStamp=" + new Date().getTime() + "&" + this.createQueryString();
	this.xmlHttp.open("GET",queryString,true);
	this.xmlHttp.setRequestHeader("If-Modified-Since","0"); 
	this.xmlHttp.send(null);
}

Ajax.prototype.post = function() {
	url = this.url;
	var url = url + "?timeStamp=" + new Date().getTime();
	var queryString = this.createQueryString();
	this.xmlHttp.open("POST",url,true);
	this.xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	this.xmlHttp.send(queryString);
}
	
Ajax.handleStateChange = function (xmlHttp,recvT,resultF) {
	if (xmlHttp.readyState == 4) {
		if (xmlHttp.status == 200) {
		resultF(recvT?xmlHttp.responseXML:xmlHttp.responseText);
		//resultF(recvT?'999':'000');
		} 
	}
}


Ajax.loadXML = function(xmlFile)
{
    var xmlDoc;
    if(window.ActiveXObject)
    {
        xmlDoc    = new ActiveXObject('Microsoft.XMLDOM');
        xmlDoc.async    = false;
        xmlDoc.load(xmlFile);
    }
    else if (document.implementation&&document.implementation.createDocument)
    {
        xmlDoc    = document.implementation.createDocument('', '', null);
        xmlDoc.load(xmlFile);
    }
    else
    {
        return xmlDoc;
    }
    
    return xmlDoc;
}