try { xmlhttp = new XMLHttpRequest(); } catch(ee) { try{ xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch(E) { xmlhttp = false; } } } function carrega(idLoc,pag,carr,sib,retorno){ var textoRetorno = ''; if (idLoc != 'null') { var conteudo=document.getElementById(idLoc) if (carr == '1') { conteudo.innerHTML='Carregando...' } else if (carr == '2') { //TopPosition = event.clientY; //LeftPosition = event.clientX; //document.body.scrollTop; //document.body.clientHeight; //document.documentElement.clientHeight; //document.getElementById('loading').style.top = LeftPosition; //document.getElementById('loading').style.top = TopPosition; //document.getElementById('loading').style.display = 'block'; } } xmlhttp.open("GET", pag,true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { var texto=''; var textoErro=''; texto=xmlhttp.responseText if (xmlhttp.status == 200) { texto=xmlhttp.responseText } else if (xmlhttp.status == 404) { texto=''; textoErro = xmlhttp.status + ' - Página não Encontrada!
' alert('Página não Encontrada!'); } else if (xmlhttp.status == 500) { texto=''; textoErro = xmlhttp.status + ' - Página contém erro!
'+xmlhttp.responseText; alert('Página contém erro!'); } else if (xmlhttp.status == 503) { texto=''; textoErro = xmlhttp.status + ' - Página sem Permissão de Acesso!
'+xmlhttp.responseText; alert('Página sem Permissão de Acesso!'); } else if (xmlhttp.status == 12029) { texto=''; textoErro = xmlhttp.status + ' - Não foi possível conectar ao Servidor!
'+xmlhttp.responseText; alert('Não foi possível conectar ao Servidor!\nVerifique sua conexão e tente novamente.'); } else { texto=''; textoErro = xmlhttp.status + '- Página não pode ser Exibida!
'+xmlhttp.responseText; alert('Página não pode ser Exibida!'); } if (sib == '1') { texto=texto.replace(/\+/g," ") } texto=unescape(texto) if (idLoc == 'null') { if (retorno != 'null') { textoRetorno = texto var conteudo=document.getElementById(retorno) conteudo.value=textoRetorno } } else { var conteudo=document.getElementById(idLoc) conteudo.innerHTML=texto } } } xmlhttp.send(null) } function menuclick(idLoc,pag,carr,sib,retorno) { carrega(idLoc,pag,carr,sib,retorno) return false; }