var myDivID,divInternoSRC,returnXML; function Jconteudo(URL,myPost,myGet,myDiv){ myDivID=myDiv.id; var sURL = URL + "?data="+ Date(); if (myGet != null) sURL += "&"+myGet; if(window.XMLHttpRequest) oRequest = new XMLHttpRequest(); else if(window.ActiveXObject) oRequest = new ActiveXObject("Microsoft.XMLHTTP"); oRequest.open("POST",sURL,false); oRequest.onreadystatechange = Jshowcontent; oRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); oRequest.send(myPost); } function JconteudoConf(URL,myPost,myGet,myDiv,MSM){ if (confirm(MSM)){ Jconteudo(URL,myPost,myGet,myDiv); } } function Jshowcontent(){ if(oRequest.readyState == 4){ if(oRequest.status == 200){ document.getElementById(myDivID).innerHTML = oRequest.responseText; if (divInternoSRC != ""){ var myVar = divInternoSRC; divInternoSRC =""; Jconteudo(myVar,null,null,DivConteudoInterno); } }else{ document.getElementById(myDivID).innerHTML = " ERRO TENTE NOVAMENTE "; } } } function changeDivVar(prefix,id,myDiv){ if (arguments.length>3) var tipoExtencao = arguments[3]; else var tipoExtencao = "htm"; var URL= 'dados/'+prefix+'.'+id+'.'+tipoExtencao; if (id == '') URL= 'dados/blank.htm'; Jconteudo(URL,null, null,myDiv); } function Jspan(txt){ var mySpan = document.getElementById("spanTXT"); mySpan.innerHTML=txt; } function checkUnchek(obj,nome){ var objs = document.getElementsByName(nome); for(x=0;xRemove'; tr.appendChild(td); document.getElementById('files-root').appendChild(tr); gFiles++; } function removeFile(aId) { var obj = document.getElementById(aId); obj.parentNode.removeChild(obj); } function Trim(txt){ return txt.replace(/^\s+|\s+$/g,""); } function loadIframe(iframeID,src){ var obj = document.getElementById(iframeID); obj.src=src; } function fillCEP(cep){ cep = cep.replace('.','').replace('-',''); document.getElementById('iframeOP').src='fillCEP.php?cep='+cep; return true; }