function CreateXMLHttpRequestObject()
{
	var xmlhttp = false;
	try
	{
		xmlhttp = new ActiveXObject("Msmx12.XMLHTTP");
	}
	catch(e)
	{
		try
		{
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch(e)
		{
			xmlhttp = false;
		}
	}

	if(!xmlhttp && typeof XMLHttpRequest!="undefined")
	{
		xmlhttp = new XMLHttpRequest();
	}
   	return xmlhttp;
}

function processajax(ServerPage,obj,GetOrPost,str)
{
	xmlhttp = CreateXMLHttpRequestObject();
	if(GetOrPost=="get")
	{
		xmlhttp.open("GET",ServerPage);
		xmlhttp.onreadystatechange = function()
		{
			if(xmlhttp.readyState == 4 && xmlhttp.status == 200)
			{
				obj.innerHTML = xmlhttp.responseText;
			}
		}
		xmlhttp.send(null);
	}
	else
	{
		xmlhttp.open("POST",ServerPage,true);
		xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8");
		xmlhttp.onreadystatechange = function()
		{
			if(xmlhttp.readyState == 4 && xmlhttp.status == 200)
			{
				obj.innerHTML = xmlhttp.responseText;
			}
		}
		xmlhttp.send(str);
	}
}