function $ParaPair()
{
	this.text = "&@TEXT_NAME=@TEXT_VALUE";
	
	this.add = function(name, value)
	{
		this.text = this.text.replace("@TEXT_NAME", name);
		this.text = this.text.replace("@TEXT_VALUE", value + "&@TEXT_NAME=@TEXT_VALUE");
	}
	
	this.output = function()
	{
		return this.text = this.text.replace("&@TEXT_NAME=@TEXT_VALUE", name);
	}
}

function $Jax()
{
	this.xmlHttp = null;
	
	this.getXMLHttpObj = function() {
		if (window.ActiveXObject)
		{
			this.xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
		}
		else if (window.XMLHttpRequest)
		{
			this.xmlHttp = new XMLHttpRequest();
		}
	}
	
	this.request = function(url, para, success, failure, sync) {
		// Create a new XMLHttml Object (Fix IE bug)
		this.getXMLHttpObj();
		
		// Register call-back function
		var xmlHttpObj = this.xmlHttp;
		
		if (sync == true)
		{
			xmlHttpObj.onreadystatechange = function() {
				// 4 = finish
				if (xmlHttpObj.readyState == 4)
				{
					//alert(xmlHttpObj.readyState);
					success();
				}
			}
		}
		
		// Send request
		url = url + "?Timestamp=" + getTimeStamp();
		
		if (para != null)
		{
			url = url + para.output();
		}
		
		url = encodeURI(url);

		//alert(url);
		this.xmlHttp.open("GET", url, sync);
		this.xmlHttp.send(null);
			
		return this.xmlHttp.responseXML;
	}
}

