// JavaScript Document

	function criaXMLHttpRequest(){

	var XMLHTTPREQUEST_IE = new Array(
  		"Msxml2.XMLHTTP.6.0",
  		"Msxml2.XMLHTTP.5.0",
  		"Msxml2.XMLHTTP.4.0",
  		"Msxml2.XMLHTTP.3.0",
  		"Msxml2.XMLHTTP",
  		"Microsoft.XMLHTTP"
	);

  	var oXMLhttp = null;

 	 // Cria o HttpRequest para o respectivo navegador.
  	if (window.XMLHttpRequest != null)
    	oXMLhttp = new window.XMLHttpRequest();
  	else if (window.ActiveXObject != null)
  	{
	// Percorre no IE a procura do objeto ActiveX na biblioteca mais recente
    	var bCriado = false;
    	for (var ind = 0;
         	ind < XMLHTTPREQUEST_IE.length && ! bCriado; ind++)		
    	{
      	try
      		{
       	 	oXMLhttp = new ActiveXObject(XMLHTTPREQUEST_IE[ind]);
       	 	bCriado = true;
      		}
     		 catch (ex)
      		{}
   		 }
	}

 	// Tratamento de erro caso não encontre nenhum.
  	if (oXMLhttp == null)
    	alert("Falha no HttpRequest():\n\n"
     	 + "Objeto XMLHttpRequest não foi criado.");

  		// Retorna o objeto instanciado ou não
  		return oXMLhttp;
	}
	
	
	
	var ajax = criaXMLHttpRequest();
	
	

	function pagina(url){
		
		
		ajax.open("GET",url,true); // envia por GET, passando a url, sincronizando
		ajax.onreadystatechange = conteudo; // 
		ajax.send(null);
		
		function conteudo(){
			if (ajax.readyState == 1){
				document.getElementById("conteudo").innerHTML = 'Carregando';
			}else if(ajax.readyState == 4){
				document.getElementById("conteudo").innerHTML = ajax.responseText;
			}
		}
	}
	
// original até aqui

