function get(strObj) {
    document.getElementById(strObj);
}
var AJAXMaster = function (){
	this.spName = "";
	this.xmlStr = "";
	this.filePath = "../CommonServices/DBMiddle.aspx";
}
AJAXMaster.prototype.add = function (paramName,paramValue){
	this.xmlStr += "<RECORD " + paramName + " = '" + paramValue + "' />"
}
AJAXMaster.prototype.xmlGetData = function (){
	var httpObj = this.getHttpObj();
	httpObj.open("POST",this.filePath,false);
	httpObj.send("<ROOT>" + this.xmlStr + "<SP spName='" + this.spName + "' spType='3' /></ROOT>");
	return httpObj.responseText;
}
AJAXMaster.prototype.postData = function (){
	var httpObj = this.getHttpObj();
	httpObj.open("POST",this.filePath,false);
	httpObj.send("<ROOT>" + this.xmlStr + "<SP spName='" + this.spName + "' spType='1' /></ROOT>");
	return httpObj.responseText;
}
AJAXMaster.prototype.getData = function (recIndex, pageCount){
	var httpObj = this.getHttpObj();
	httpObj.open("POST",this.filePath,false);
	httpObj.send("<ROOT>" + this.xmlStr + "<SP spName='" + this.spName + "' spType='2' recIndex='" + recIndex + "' pageCount='" + pageCount + "' /></ROOT>");
	return httpObj.responseText;
}
AJAXMaster.prototype.getDataOnly = function (){
	var httpObj = this.getHttpObj();
	httpObj.open("POST",this.filePath,false);
	httpObj.send("<ROOT>" + this.xmlStr + "<SP spName='" + this.spName + "' spType='4' /></ROOT>");
	return httpObj.responseText;
}
AJAXMaster.prototype.getXMLObj = function (xmlStr){
	if (document.implementation && document.implementation.createDocument){
		var parser = new DOMParser();
		xmlDoc = parser.parseFromString(xmlStr,"text/xml");
	}
	else{
		xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
		xmlDoc.loadXML(xmlStr);
	}
	return xmlDoc;
}
AJAXMaster.prototype.getHttpObj = function (){
	var myXMLHTTPRequest;
	if (document.implementation && document.implementation.createDocument)
		myXMLHTTPRequest = new XMLHttpRequest();
	else
		myXMLHTTPRequest = new ActiveXObject("Microsoft.XMLHTTP");
	return myXMLHTTPRequest;
}
AJAXMaster.prototype.isNextPage = function (xDoc){
	if (xDoc.getElementsByTagName("RECORD").length>0)
		return true;
	else
		return false;
}