
	function ExecutaAJAX(arqConteudo, idDestino, queryString)
{
	if ((arqConteudo == "") || (idDestino == "") || (queryString == ""))
		return alert("Falta Parametros");

	var oHTTPRequest = createXMLHTTP();
	oHTTPRequest.open("post", arqConteudo, true);
	oHTTPRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	oHTTPRequest.onreadystatechange = function()
	{
		if (oHTTPRequest.readyState==1)
		{
			sLoading = "<div style=\"width: 100%;height: 100px;background: url(Image/Loader.gif) center center no-repeat;\"></div>"
			document.getElementById(idDestino).innerHTML = sLoading ;
		}
		if (oHTTPRequest.readyState==4)
		{
		    //if(oHTTPRequest.status == 200)
		    //{
			    document.getElementById(idDestino).innerHTML = oHTTPRequest.responseText;
			//}
			//else
			//{
			//    document.getElementById(idDestino).innerHTML = "A Página Não pode ser exibida, tente novamente."
			//}
		}
	}
	oHTTPRequest.send(queryString);
}
		
	function createXMLHTTP()
	{
		var Ajax;
		try
		{
			Ajax = new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch(e)
		{
			try
			{
				Ajax = new ActiveXObject("Msxml2.XMLHTTP");
				alert(Ajax);
			}
			catch(ex)
			{
				try
				{
					Ajax = new XMLHttpRequest();
				}
				catch(exc)
				{
					alert("Esse browser não tem recursos para uso do Ajax");
					Ajax = null;
				}
			}
			return Ajax;
		}

		var arrSignatures = ["MSXML2.XMLHTTP.5.0", "MSXML2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"];
		for (var i=0; i < arrSignatures.length; i++)
		{
			try
			{
				var oRequest = new ActiveXObject(arrSignatures[i]);
				return oRequest;
			}
			catch (oError)
			{}
		}
		throw new Error("MSXML não está instalado no seu sistema.");
	}
	
