function pesq_site(pesq_txt){
	resultado = "";
	for (i = 0; i < pesq_txt.length; i++) {
		if (pesq_txt.charAt(i) == " ") resultado += "+";
		else resultado += pesq_txt.charAt(i);
	}
	
	pesq_txt = escape(resultado);
	
	ff = '';
	if (document.getElementById('f1').checked) ff = ff+'&f1=f1';
	if (document.getElementById('f2').checked) ff = ff+'&f2=f2';
	if (document.getElementById('f3').checked) ff = ff+'&f3=f3';
	if (document.getElementById('f4').checked) ff = ff+'&f4=f4';
	
	document.location = 'http://www.earquivos.com.br/pesquisar.php?pesq='+pesq_txt+ff;	
}

/////////////////////////////////////
var req;

function loadXMLDoc(url,valor)
{
    document.getElementById('div_enviando').className = 'aparecer';
	req = null;
    if (window.XMLHttpRequest) {
        req = new XMLHttpRequest();
        req.onreadystatechange = processReqChange;
        req.open("GET", url+'?antispam='+valor, true);
        req.send(null);
    } else if (window.ActiveXObject) {
        req = new ActiveXObject("Microsoft.XMLHTTP");
        if (req) {
            req.onreadystatechange = processReqChange;
            req.open("GET", url+'?antispam='+valor, true);
            req.send();
        }
    }
}

function processReqChange()
{
    if (req.readyState == 4) {
        if (req.status == 200) {
			///---------------
				if (req.responseText=='antispam:81278'){
					window.location = 'http://www.earquivos.com.br/mensagem.php';
				} else {
					document.getElementById('mens_div').innerHTML = req.responseText;
					if (req.responseText=='<span class="style23 style6"><strong><span class="style24">D</span>ownload autorizado.<br /><br /><a href="javascript:efetuar();">Se o download n&atilde;o iniciar automaticamente clique aqui</a> || <a href="javascript:retorna();">Fechar</a></strong></span>'){
						document.getElementById('ifram').src = 'http://www.earquivos.com.br/eng.efetuadownload.php';
						document.getElementById('img_carr').innerHTML = '<img src="down.gif" width="70" height="70" />';
					} else {
						document.getElementById('img_carr').innerHTML = '<img src="downerror.gif" width="70" height="70" />';
					}
				}
			///---------------
        } else {
            alert("Houve um problema ao obter os dados:\n" + req.statusText);
        }
    }
}

function Atualiza(valor)
{
    loadXMLDoc("eng.download.php",valor);
}




<!-- Grupo 2 ----><!-- Grupo 2 ---->




function loadXMLDoc2(url,valor,id)
{
	if (document.getElementById('status_vot').innerHTML =='<font color="#23a300">Voto enviado com sucesso! Muito obrigado!</font>'){
		document.getElementById('status_vot').innerHTML = 'Alterando voto...';
	} else {
		document.getElementById('status_vot').innerHTML = 'Votando...';
	}
	req = null;
    if (window.XMLHttpRequest) {
        req = new XMLHttpRequest();
        req.onreadystatechange = processReqChange2;
        req.open("GET", url+'?nota='+valor+'&id='+id, true);
        req.send(null);
    } else if (window.ActiveXObject) {
        req = new ActiveXObject("Microsoft.XMLHTTP");
        if (req) {
            req.onreadystatechange = processReqChange2;
            req.open("GET", url+'?nota='+valor+'&id='+id, true);
            req.send();
        }
    }
}

function processReqChange2()
{
    if (req.readyState == 4) {
        if (req.status == 200) {
            document.getElementById('status_vot').innerHTML = '<font color="#23a300">Voto enviado com sucesso! Muito obrigado!</font>';
			document.getElementById('votos_num').innerHTML = req.responseText;
        } else {
            alert("Houve um problema ao obter os dados:\n" + req.statusText);
        }
    }
}

function votacao(valor,id)
{
    loadXMLDoc2("eng.votar.php",valor,id);
}

