/********************************************************************************
* Dynamic Ajax Content- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
********************************************************************************/
//--*-> function's ajustadas para os padrões adotados em ASPFunctions/JSFunctions...
//--*-> Ajax_XMLHTTPRequest -> Server Side equivalente -> XMLHTTPRequest
function Ajax_XMLHTTPRequest(PRM_URL, PRM_ContainerID)
{
	var XMLHTTP = false;
	if (window.XMLHttpRequest)
	{ // Se o navegador for Mozilla, Safari, etc...
		XMLHTTP = new XMLHttpRequest();
	}
	else if (window.ActiveXObject)
	{ // Se for Internet Explorer...
		try 
		{
			XMLHTTP = new ActiveXObject("Msxml2.XMLHTTP");
			//window.alert("Msxml2.XMLHTTP")
		} 
		catch(e)
		{
			try
			{
				XMLHTTP = new ActiveXObject("Microsoft.XMLHTTP");
				//window.alert("Microsoft.XMLHTTP")				
			}
			catch(e)
			{
				//window.alert("IE Excessão...");
			}
		}
	}
	else
	{
		//window.alert("XMLHTTP não gerado...");
		return null;
	}
	//--*->
	XMLHTTP.onreadystatechange = function()
	{
		if (XMLHTTP.readyState == 4 && (XMLHTTP.status == 200 || window.location.href.indexOf("http") == -1))
		{
			window.document.getElementById(PRM_ContainerID).innerHTML = XMLHTTP.responseText;
		}
		else
		{
			return null;
		}
		
	}
	//--*->
	XMLHTTP.open('GET', PRM_URL, true);
	XMLHTTP.send(null);

}