var conexoes=new Array();function openAjax(){try{xmlhttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(Ex){xmlhttp=false}}if(!xmlhttp&&typeof XMLHttpRequest!='undefined'){xmlhttp=new XMLHttpRequest()}return xmlhttp}function ReqHeader(method,index){conexoes[index].open(method,URL,true);xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");xmlhttp.setRequestHeader("Cache-Control","no-store, no-cache, must-revalidate");xmlhttp.setRequestHeader("Cache-Control","post-check=0, pre-check=0");xmlhttp.setRequestHeader("Pragma","no-cache")}function Response(dv,index){conexoes[index].onreadystatechange=function(){if(conexoes[index].readyState==4){if(conexoes[index].status==200){resp=conexoes[index].responseText;switch(dv){case'alert':alert(resp);break;case'conect':break;case'manchete':getElmt(dv).innerHTML=resp;manchete();break;case'dvmanchete':getElmt('manchete').innerHTML=resp;break;case'recado':getElmt(dv).innerHTML=resp;recado();break;default:getElmt(dv).innerHTML=resp}}}}}function getElmt(id){return document.getElementById(id)}function getv(id){return document.getElementById(id).value}function buscarConteudo(dv,dst,param1,param2){idx=conexoes.push(openAjax());idx-=1;URL="conteudo.php";ReqHeader('post',idx);if(dv!='alert'&&dv!=null&&dv!=undefined&&dv!='conect'&&dv!='dvmanchete')getElmt(dv).innerHTML='<b>Aguarde, carregando...<img src="imagens/carregando.gif" border="0"></b>';conexoes[idx].send("acao="+escape(dst)+"&param1="+escape(param1)+"&param2="+escape(param2));Response(dv,idx)}function buscarURL(dv,dst,param){idx=conexoes.push(openAjax());idx-=1;URL=dst;if(dst=='')URL='conteudo.php';ReqHeader('post',idx);if(dv!='alert'&&dv!=null&&dv!=undefined)getElmt(dv).innerHTML='<b>Aguarde, carregando...<img src="imagens/carregando.gif" border="0"></b>';conexoes[idx].send(param);Response(dv,idx)}