try{
    xmlhttp = new XMLHttpRequest();
    xmlhttp2 = new XMLHttpRequest();
    xmlhttp3 = new XMLHttpRequest();	
	xmlhttp4 = new XMLHttpRequest();
	xmlhttp5 = new XMLHttpRequest();
}catch(ee){
    try{
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
        xmlhttp2 = new ActiveXObject("Msxml2.XMLHTTP");		
        xmlhttp3 = new ActiveXObject("Msxml2.XMLHTTP");				
        xmlhttp4 = new ActiveXObject("Msxml2.XMLHTTP");		
        xmlhttp5 = new ActiveXObject("Msxml2.XMLHTTP");	
    }catch(e){
        try{
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
            xmlhttp2 = new ActiveXObject("Microsoft.XMLHTTP");			
            xmlhttp3 = new ActiveXObject("Microsoft.XMLHTTP");						
            xmlhttp4 = new ActiveXObject("Microsoft.XMLHTTP");			
            xmlhttp5 = new ActiveXObject("Microsoft.XMLHTTP");						

        }catch(E){
            xmlhttp = false;
            xmlhttp2 = false;			
            xmlhttp3 = false;						
            xmlhttp4 = false;			
            xmlhttp5 = false;						

        }
    }
}

atual=0
function carrega(n){

document.cookie = "pagina=" + n;
    //Exibe o texto carregando no div conteúdo
    var conteudo=document.getElementById("conteudo")
    conteudo.innerHTML='<div class="carregando">carregando...</div>'

    //Guarda a página escolhida na variável atual
    atual=n

    //Abre a url
    xmlhttp.open("GET", "funcoes.php?n="+n,true);

    //Executada quando o navegador obtiver o código
    xmlhttp.onreadystatechange=function() {

        if (xmlhttp.readyState==4){

            //Lê o texto
            var texto=xmlhttp.responseText

			
            //Desfaz o urlencode
            texto=texto.replace(/\+/g," ")
            texto=unescape(texto)

            //Exibe o texto no div conteúdo
            var conteudo=document.getElementById("conteudo")
            conteudo.innerHTML=texto


        }
    }
    xmlhttp.send(null)
}

function carrega2(n){

    //Exibe o texto carregando no div conteúdo
    var evento=document.getElementById("quadro_comac")
    evento.innerHTML='<div class="carregando">carregando...</div>'

    //Guarda a página escolhida na variável atual
  atual=n

    //Abre a url
    xmlhttp2.open("GET", "funcoes.php?n="+n,true);

    //Executada quando o navegador obtiver o código

    xmlhttp2.onreadystatechange=function() {
		
        if (xmlhttp2.readyState==4){
			
            //Lê o texto
            var texto2=xmlhttp2.responseText

			
            //Desfaz o urlencode
            texto2=texto2.replace(/\+/g," ")
        
			texto2=unescape(texto2)

            //Exibe o texto no div conteúdo
            var evento=document.getElementById("quadro_comac")
			evento.innerHTML=texto2
			

        }
    }
    xmlhttp2.send(null)

}

function carrega3(n){

    //Exibe o texto carregando no div conteúdo
    var noticia=document.getElementById("divmenunoticias")
    noticia.innerHTML='<div class="carregando">carregando...</div>'

    //Guarda a página escolhida na variável atual
    atual=n

    //Abre a url
    xmlhttp3.open("GET", "funcoes.php?n="+n,true);

    //Executada quando o navegador obtiver o código
    xmlhttp3.onreadystatechange=function() {

        if (xmlhttp3.readyState==4){

            //Lê o texto
            var texto3=xmlhttp3.responseText

			
            //Desfaz o urlencode
            texto3=texto3.replace(/\+/g," ")
            texto3=unescape(texto3)

            //Exibe o texto no div conteúdo
            var noticia=document.getElementById("divmenunoticias")
            noticia.innerHTML=texto3

        }
    }
    xmlhttp3.send(null)
}

function carrega4(n){

    //Exibe o texto carregando no div conteúdo
    var infotrator=document.getElementById("info_tratores")
    infotrator.innerHTML='<div class="carregando">carregando...</div>'

    //Guarda a página escolhida na variável atual
    atual=n

    //Abre a url
    xmlhttp4.open("GET", "funcoes.php?n="+n,true);

    //Executada quando o navegador obtiver o código
    xmlhttp4.onreadystatechange=function() {

        if (xmlhttp4.readyState==4){

            //Lê o texto
            var texto4=xmlhttp4.responseText

			
            //Desfaz o urlencode
            texto4=texto4.replace(/\+/g," ")
            texto4=unescape(texto4)

            //Exibe o texto no div conteúdo
            var infotrator=document.getElementById("info_tratores")
            infotrator.innerHTML=texto4

        }
    }
    xmlhttp4.send(null)
}
function carrega5(n){

    //Exibe o texto carregando no div conteúdo
    var infotrator=document.getElementById("info_retro")
    infotrator.innerHTML='<div class="carregando">carregando...</div>'

    //Guarda a página escolhida na variável atual
    atual=n

    //Abre a url
    xmlhttp5.open("GET", "funcoes.php?n="+n,true);

    //Executada quando o navegador obtiver o código
    xmlhttp5.onreadystatechange=function() {

        if (xmlhttp5.readyState==4){

            //Lê o texto
            var texto5=xmlhttp5.responseText

			
            //Desfaz o urlencode
            texto5=texto5.replace(/\+/g," ")
            texto5=unescape(texto5)

            //Exibe o texto no div conteúdo
            var infotrator=document.getElementById("info_retro")
            infotrator.innerHTML=texto5

        }
    }
    xmlhttp5.send(null)
}

function carregaseminovos(n){

    //Exibe o texto carregando no div conteúdo
    var evento=document.getElementById("quadro_comac")
    evento.innerHTML='<div class="carregando">carregando...</div>'

    //Guarda a página escolhida na variável atual
    atual=n

    //Abre a url
    xmlhttp2.open("GET", "funcoes.php?n="+n,true);

    //Executada quando o navegador obtiver o código
    xmlhttp2.onreadystatechange=function() {

        if (xmlhttp2.readyState==4){

            //Lê o texto
            var texto2=xmlhttp2.responseText

			
            //Desfaz o urlencode
            texto2=texto2.replace(/\+/g," ")
            texto2=unescape(texto2)

            //Exibe o texto no div conteúdo
            var evento=document.getElementById("quadro_comac")
            evento.innerHTML=texto2
			extraiScript(texto2)

        }
    }
    xmlhttp2.send(null)
	
}

