var req;

function mostraquadro(quadro, id){
  
  req = null;
  url = "ctrlfinc_box.php";
  
  req = xajax.getRequestObject(); // pega o objeto do xajax
  
  req.onreadystatechange = RetornaAbrePagina;
  req.open("GET", url+'?teste='+pagina, true);
  req.send(null);
    /*}
	
	// Procura por uma versao ActiveX (IE)
	else if(window.ActiveXObject){
		   
		   req = new ActiveXObject("Microsoft.XMLHTTP");
		   
		   if(req){
			 
			 req.onreadystatechange = RetornaAbrePagina;
			 req.open("GET", url+'?teste='+pagina, true);
			 req.send();
			 }
		   }*/
  }


function RetornaAbrePagina(){
  
  // Testa se o REQUISIÇÂO do XML está Completa
  if(req.readyState == 4){
    
	// Testa se a REQUISIÇÃO retornou OK
	if(req.status == 200){
	  
	  // Lê o texto
	  var texto = req.responseText;
	  
	  // Desfaz o urlencode
	  texto = texto.replace(/\+/g," ");
	  texto = unescape(texto);
	  
	  // Exibe o texto no DIV MEIO
	  var conteudo = document.getElementById("cf_box");
	  conteudo.innerHTML = texto;
	  }
	  
	  
	  else
	    // Retorna uma ALERTA quando não hover CONEXÂO
	    {alert("Houve um problema ao obter os dados:\n" + req.statusText);}
    }
  } 