function ServerCall()
{
	var xmlhttp
	var IsComplete = false;

	try
	{
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch (e)
	{
		try
		{
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch (e)
		{
			try
			{
				xmlhttp = new XMLHttpRequest();
			}
			catch (e)
			{
				xmlhttp = false; 
			}
		}
	}

	if (!xmlhttp) return null;

	this.connect = function(URL, Method, Params, CallBack)
	{
		if (!xmlhttp) return false;
		IsComplete = false;
		Method = Method.toUpperCase();
		
		Params += ((Params != "") ? "&" : "") + "no-cache=" + Math.random();
	
		try 
		{
			if(Method == "GET")
			{
				xmlhttp.open(Method, URL + "?" + Params, true);
				sVars = "";
			}
			else
			{
				xmlhttp.open(Method, URL, true);
				xmlhttp.setRequestHeader("Method", "POST " + URL + " HTTP/1.1");
				xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
			}
			
			xmlhttp.onreadystatechange = function() {
				
				if (xmlhttp.readyState == 4 && !IsComplete)
				{
					IsComplete = true;

					if(xmlhttp.status == 200)
					{
						CallBack(xmlhttp);
					}
					else
					{
						if(confirm('Failed to retrieve data from server. Would you like me to display the error details?'))
						{
							alert(xmlhttp.responseText);
						}
					}
				}
			};

			xmlhttp.send(sVars);
		}
		catch(z)
		{
			return false;
		}
	
		return true;
	};
	
	return this;
}

