function comajxuCreateHTTPRequest()
{	
	var lResult;
 	try 
	{
		lResult = new XMLHttpRequest();
	} 
	catch (e) 
	{
		try 
		{
			lResult = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e) 
		{
			try 
			{
				lResult = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e) 
			{
				return false;
			}
		}
	}
	
	return lResult;
}

function comajxuSendGetWithCallback(AURI, AOnSuccess, AOnFail)
{
	var lhttpReq = comajxuCreateHTTPRequest();  	
	lhttpReq.onreadystatechange = function()
	{
		if (this.readyState == 4)
		{
			if(this.status == 200) 
			{
				AOnSuccess(this);
			} 
			else 
			{
				AOnFail(this);
			}
		}
	}
	try
	{
		lhttpReq.open("GET", AURI, true);
		lhttpReq.send();
	}
	catch (e)
	{
		AOnFail(lhttpReq);
	}
}

function SetInnerHTML(AElementID, AHTML)
{
	var lContainer = document.getElementById(AElementID);
	if (lContainer)
	{
		lContainer.innerHTML = AHTML;
	}
}
