var asxmlhttp = function()
{
	this.getXMLHttpRequest = function()
	{
		try
		{
			return new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch (e)
		{
			try
			{
				return new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (e)
			{
				try
				{
					return new XMLHttpRequest();
				}
				catch (e)
				{
					top.document.location.href = "/";
				}
			}
		}

		return null;
	}

	this.go = function(callerObj, actionURL, sendmethod, datatosend)
	{
	    datatosend = datatosend + "&___t___=" + (new Date()).getTime();
		try
		{
			var xmlhttp = this.getXMLHttpRequest();

			xmlhttp.onreadystatechange = function()
			{
				if (xmlhttp.readyState==4 && xmlhttp.status==200)
				{
					callerObj.doready(xmlhttp);
				}
			}

			if (sendmethod.toUpperCase() == "POST")
			{
				xmlhttp.open("POST", actionURL, true); // false = wait // true = don't wait
				xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
			}
			else
			{
				xmlhttp.open("GET", actionURL, true); // false = wait // true = don't wait
			}

			xmlhttp.send(datatosend);
			return true;
		}
		catch (e)
		{
			return false;
		}
	}
}

