fila=[];ifila=0;function imagem(){var boImg=new Boolean(false);if(window.parent.frames.telaPrincipal){if(window.parent.frames.telaPrincipal.document.getElementById("carregando")){var loading=window.parent.frames.telaPrincipal.document.getElementById("carregando");boImg=true}}else{if(document.getElementById("carregando")){var loading=document.getElementById("carregando");boImg=true}}if(boImg==true){if(loading.style.display=="block"){loading.style.display="none"}else{loading.style.display="block"}}}function ajax(stPagina,stCtrl,stId){xmlhttp=new XMLHttpRequest();imagem();stCtrl="&stCtrl="+stCtrl;stLink=stPagina+stCtrl;xmlhttp.open("GET",stLink,true);xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=utf-8");xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){var texto=xmlhttp.responseText;var conteudo=window.parent.frames.telaPrincipal.document.getElementById(stId);conteudo.innerHTML=texto;imagem()}};xmlhttp.send(null)}function executaJavaScript(stJs){imagem();var d=(window.parent.frames.telaPrincipal)?window.parent.frames.telaPrincipal.document:document;var f=(window.parent.frames.telaPrincipal)?window.parent.frames.telaPrincipal.document.frm:document.frm;try{eval(stJs)}catch(err){if(window.parent.frames.telaPrincipal){window.parent.frames.telaPrincipal.document.getElementById("spnErro").innerHTML="
Erro:
"+err.name+": "+err.message+"
Erro ao executar o seguinte código:
"+stJs.htmlEntities()+"
Exindo página gerada pelo oculto:
"+stJs+"
Fim do Erro";window.parent.frames.telaPrincipal.document.getElementById("spnErro").style.display="block";eval(stJs)}}finally{imagem()}}function ajaxJavaScript(stPagina,stCtrl,parametrosGET){stCtrl="&stCtrl="+stCtrl;stLink=stPagina+stCtrl;if(typeof parametrosGET!="undefined"){stLink+=parametrosGET}fila[fila.length]=stLink;if((ifila+1)==fila.length){ajaxJavaScriptRun()}}function ajaxJavaScriptPOST(stPagina,parametrosPOST,stCtrl){stCtrl="&stCtrl="+stCtrl;stLink=stPagina+stCtrl;fila[fila.length]=stLink;if((ifila+1)==fila.length){ajaxJavaScriptRunPOST(parametrosPOST)}}function ajaxJavaScriptRun(){imagem();xmlhttp=new XMLHttpRequest();xmlhttp.open("GET",fila[ifila],true);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){var texto=xmlhttp.responseText;executaJavaScript(texto);ifila++;if(ifila