function $(l_element) {
  return element = document.getElementById(l_element);
}

function getXmlHttpRequest() {
	if (window.XMLHttpRequest) {
		return new XMLHttpRequest();
	} else if (window.ActiveXObject) { 
		return new ActiveXObject("Microsoft.XMLHTTP");
	}
}

// onclick="getUrl('pagina.html');
function getUrl(p_url) {
	//alert(p_url);
	$("divLoading").innerHTML = "Cargando...";
	xmlhttp.open("POST", p_url, true);
	xmlhttp.onreadystatechange = function() {
		// 0 - Não iniciado (Uninitialised).
		// 1 - Carregando (Loading).
		// 2 - Carregado (Loaded).
		// 3 - Interativo (Interactive).
		// 4 - Concluído (Completed).
		if (xmlhttp.readyState == 4) {
			$("divContent").innerHTML = xmlhttp.responseText;
			$("divLoading").innerHTML = "";
		}	
	}
	xmlhttp.send(null);
}
var xmlhttp = getXmlHttpRequest();