function createXMLHttpRequest() {
   try{ return new ActiveXObject("Msxml2.XMLHTTP"); }catch(e){}
   try{ return new ActiveXObject("Microsoft.XMLHTTP"); }catch(e){}
   try{ return new XMLHttpRequest(); }catch(e){}
   alert("XMLHttpRequest não suportado");
   return null;
}
//-------------------------------------------------------------------------------------------------------
var xhReq = createXMLHttpRequest();
var xhReq2 = createXMLHttpRequest();
var xhReq3 = createXMLHttpRequest();
var xhReq4 = createXMLHttpRequest();
var xhReq5 = createXMLHttpRequest();
var xhReq6 = createXMLHttpRequest();

function geraJS(texto){
        
          var ini = 0;
          while (ini!=-1){
              ini = texto.indexOf('<script', ini);
              if (ini >=0){
                  ini = texto.indexOf('>', ini) + 1;
                  var fim = texto.indexOf('</script>', ini);
                  codigo = texto.substring(ini,fim);
                  eval(codigo);
              }
          }
 }
//-------------------------------------------------------------------------------------------------------
function geraJS2(texto){
        
          var ini = 0;
          while (ini!=-1){
              ini = texto.indexOf('<script', ini);
              if (ini >=0){
                  ini = texto.indexOf('>', ini) + 1;
                  var fim = texto.indexOf('</script>', ini);
                  codigo = texto.substring(ini,fim);
                  eval(codigo);
              }
          }
 }
//-------------------------------------------------------------------------------------------------------
function geraJS3(texto){
        
          var ini = 0;
          while (ini!=-1){
              ini = texto.indexOf('<script', ini);
              if (ini >=0){
                  ini = texto.indexOf('>', ini) + 1;
                  var fim = texto.indexOf('</script>', ini);
                  codigo = texto.substring(ini,fim);
                  eval(codigo);
              }
          }
 }
//-------------------------------------------------------------------------------------------------------
function geraJS4(texto){
        
          var ini = 0;
          while (ini!=-1){
              ini = texto.indexOf('<script', ini);
              if (ini >=0){
                  ini = texto.indexOf('>', ini) + 1;
                  var fim = texto.indexOf('</script>', ini);
                  codigo = texto.substring(ini,fim);
                  eval(codigo);
              }
          }
 }
//-------------------------------------------------------------------------------------------------------
function geraJS5(texto){
        
          var ini = 0;
          while (ini!=-1){
              ini = texto.indexOf('<script', ini);
              if (ini >=0){
                  ini = texto.indexOf('>', ini) + 1;
                  var fim = texto.indexOf('</script>', ini);
                  codigo = texto.substring(ini,fim);
                  eval(codigo);
              }
          }
 }
//-------------------------------------------------------------------------------------------------------
function geraJS6(texto){
        
          var ini = 0;
          while (ini!=-1){
              ini = texto.indexOf('<script', ini);
              if (ini >=0){
                  ini = texto.indexOf('>', ini) + 1;
                  var fim = texto.indexOf('</script>', ini);
                  codigo = texto.substring(ini,fim);
                  eval(codigo);
              }
          }
 }
//-------------------------------------------------------------------------------------------------------
function ajax(url,div){
				//alert('funcao ajax com '+url+' - '+div);
               var div = document.getElementById(div);
               div.innerHTML = "<img src='../ajax/espera.gif' width='16' height='16'><img src='../ajax/aguarde_azul.gif'>"; 

               xhReq.open("GET",url,true);
               
               xhReq.onreadystatechange=function() {
                    if(xhReq.readyState == 4) {
                         div.innerHTML = xhReq.responseText ;
                         geraJS(xhReq.responseText);
                    }
               }
               xhReq.send(null);
          }
//-------------------------------------------------------------------------------------------------------		  
function ajax2(url2,div2){
               var div2 = document.getElementById(div2);
               div2.innerHTML = "<img src='../ajax/espera.gif' width='16' height='16'><img src='../ajax/aguarde_azul.gif'>";

               xhReq2.open("GET",url2,true);
               
               xhReq2.onreadystatechange=function() {
                    if(xhReq2.readyState == 4) {
                         div2.innerHTML = xhReq2.responseText ;
                         geraJS2(xhReq2.responseText);
                    }
               }
               xhReq2.send(null);
          }
		  
//-------------------------------------------------------------------------------------------------------		  
function ajax3(url3,div3){
               var div3 = document.getElementById(div3);
               div3.innerHTML = "<img src='../ajax/espera.gif' width='16' height='16'><img src='../ajax/aguarde_azul.gif'>";

               xhReq3.open("GET",url3,true);
               
               xhReq3.onreadystatechange=function() {
                    if(xhReq3.readyState == 4) {
                         div3.innerHTML = xhReq3.responseText ;
                         geraJS3(xhReq3.responseText);
                    }
               }
               xhReq3.send(null);
          }
//-------------------------------------------------------------------------------------------------------
function ajax4(url4,div4){
               var div4 = document.getElementById(div4);
               div4.innerHTML = "<img src='../ajax/espera.gif' width='16' height='16'><img src='../ajax/aguarde_azul.gif'>";

               xhReq4.open("GET",url3,true);
               
               xhReq4.onreadystatechange=function() {
                    if(xhReq4.readyState == 4) {
                         div4.innerHTML = xhReq4.responseText ;
                         geraJS4(xhReq4.responseText);
                    }
               }
               xhReq4.send(null);
          }
//-------------------------------------------------------------------------------------------------------
function ajax5(url5,div5){
               var div5 = document.getElementById(div5);
               div5.innerHTML = "<img src='../ajax/espera.gif' width='16' height='16'><img src='../ajax/aguarde_azul.gif'>";

               xhReq5.open("GET",url5,true);
               
               xhReq5.onreadystatechange=function() {
                    if(xhReq5.readyState == 4) {
                         div5.innerHTML = xhReq5.responseText ;
                         geraJS5(xhReq5.responseText);
                    }
               }
               xhReq5.send(null);
          }

//-------------------------------------------------------------------------------------------------------
function ajax6(url6,div6){
    var div6 = document.getElementById(div6);
    div6.innerHTML = "<img src='../ajax/espera.gif' width='16' height='16'><img src='../ajax/aguarde_azul.gif'>";
    xhReq6.open("GET",url6,true);      
    xhReq6.onreadystatechange=function() {
    	if(xhReq6.readyState == 4) {
      	  div6.innerHTML = xhReq6.responseText ;
      	  geraJS6(xhReq6.responseText);
    	}
    }
    xhReq6.send(null);
}
