function GetAjax(retornoID, strLink) {
	var callback = function() {
		//readyState
		//0 = uninitialized
		//1 = loading
		//2 = loaded
		//3 = interactive
		//4 = completess
		if (xmlhttp.readyState==4) {
			//Verifica se status de retorno indica que está tudo certo (200 = OK)
			if (xmlhttp.status == 200) {
				document.getElementById(retornoID).innerHTML = xmlhttp.responseText;
			}
		}
	}
	return getAjaxData("GET", strLink, callback, null);
}

var xmlhttp=false;
					
function ConfigureXMLHTTP() {
	/*@cc_on @*/
	/*@if (@_jscript_version >= 5)
	// JScript gives us Conditional compilation, we can cope with old IE versions.
	// and security blocked creation of the objects.
	 try {
	  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	 } catch (e) {
	  try {
	   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	  } catch (E) {
	   xmlhttp = false;
	  }
	 }
	@end @*/
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	  xmlhttp = new XMLHttpRequest();
	}
}
					
function getAjaxData(strMethod, strURL, callbackfunction, sendvalue) {
	try {
		ConfigureXMLHTTP();
						
		var now = new Date(); //Variavel utilizada para forçar o post da página e não deixá-la em cache
		var strURL = strURL;

		xmlhttp.open(strMethod, strURL, true);
		xmlhttp.onreadystatechange = callbackfunction;
		xmlhttp.send(sendvalue);
	} catch(E) {
		return false;
	} finally {
		return true;
	}
}

function Carrega(PAGINA){
    pagina = PAGINA;
    ajax = ajaxInit();
    if(ajax){
        ajax.open("GET", PAGINA + ".php", true);
        ajax.onreadystatechange = function(){
        var Parceiros = document.getElementById('divParceiro');
		var Apoio = document.getElementById('divApoio');
            if(ajax.readyState == 4){
                if(ajax.status == 200){
                    var ConteudoParceiros=ajax.responseText;
					var ConteudoApoio=ajax.responseText;
                    Parceiros.innerHTML=ConteudoParceiros;
					Apoio.innerHTML=ConteudoApoio;
                    }
                else {
                    alert(ajax.statusText);
                    }
                }
            }
        ajax.send(null);
        }
    }
