var CONTEXTO="/judice",SERVLET="Controller/",CORE_ENUM_ID_BANCOS={BANRISUL:3,ITAU:2},CORE_PecaIdOptions={CODIGO_PECA_PROCESSO_INTEGRAL:"56"},CORE_audienciaStatusOptions={ID_AUDIENCIA_STATUS_PEDIDO_REALIZADO:"7",ID_AUDIENCIA_STATUS_PEDIDO_LIBERADO:"8",ID_AUDIENCIA_STATUS_PEDIDO_INFO_PENDENTES:"11",ID_AUDIENCIA_STATUS_PEDIDO_AGENDADO:"4",ID_AUDIENCIA_STATUS_PEDIDO_VERIFICACAO_PENDENCIAS:"17",ID_AUDIENCIA_STATUS_PEDIDO_CONSULTADO:"18",ID_AUDIENCIA_STATUS_PEDIDO_EM_EXECUCAO:"6"},CORE_perfilOptions={PERFIL_SOLIC:"4",PERFIL_CLIEN:"5",PERFIL_USUAR:"6",PERFIL_ATEND:"3",PERFIL_VERIF:"2",PERFIL_DIRET:"10"};function coreGetObjectMethods(e){var t={};for(var n in e)if("function"==typeof e[n]){var o=e[n];t[n]=o}return t}function CORE_isPerfilCliente(e){return e==CORE_perfilOptions.PERFIL_SOLIC||(e==CORE_perfilOptions.PERFIL_CLIEN||e==CORE_perfilOptions.PERFIL_USUAR)}function fillDataFields(e,t){var n=new Date,o=n.getFullYear(),l=n.getMonth()+1,a=new Date(new Date(o,l,1)-1).getDate();new Date(o,l,1),new Date(o,l,a);l<10?(setTextValue(e,"01/0"+l+"/"+o),setTextValue(t,a+"/0"+l+"/"+o)):(setTextValue(e,"01/"+l+"/"+o),setTextValue(t,a+"/"+l+"/"+o))}function isset(e){return null!=e}function controlaTimeOut(e){1==e&&(alert("Não foi possível carregar informações de CEP, atualize a página e tente novamente."),document.getElementById("carregando").style.visibility="hidden")}function camadacep(e){alerta=!1,document.getElementById("carregando").style.visibility="visible",document.getElementById("carregando").style.display="block",""!=e&&(alerta=!0,setTimeout(function(){controlaTimeOut(alerta)},8e3)),""!=e?atualizacep(e):(document.getElementById("carregando").style.visibility="hidden",document.getElementById("carregando").style.display="none")}function atualizacep(e){e=e.replace(/\D/g,""),url="https://viacep.com.br/ws/"+e+"/json";var t=new XMLHttpRequest;t.onreadystatechange=function(){4==t.readyState&&200==t.status&&correiocontrolcep(JSON.parse(t.responseText))},t.open("GET",url,!0),t.send()}function correiocontrolcep(e){if(document.getElementById("carregando").style.visibility="hidden",document.getElementById("carregando").style.display="none",e.erro)return alert("Cep não encontrado"),alerta=!1,isset(document.getElementById("endereco"))&&(document.getElementById("endereco").value=""),isset(document.getElementById("bairro"))&&(document.getElementById("bairro").value=""),isset(document.getElementById("cidade"))&&(document.getElementById("cidade").value=""),isset(document.getElementById("cidadeAux"))&&(document.getElementById("cidadeAux").value=""),isset(document.getElementById("cidadeId"))&&(document.getElementById("cidadeId").value=""),isset(document.getElementById("uf"))&&(document.getElementById("uf").value=""),void(isset(document.getElementById("logradouroBairroAux"))&&(document.getElementById("logradouroBairroAux").value=""));isset(document.getElementById("endereco"))&&(document.getElementById("endereco").value=e.logradouro+", "),isset(document.getElementById("bairro"))&&(document.getElementById("bairro").value=e.bairro),isset(document.getElementById("cidade"))&&(document.getElementById("cidade").value=e.localidade.replace("D'","d`").replace("'","`")+" / "+e.uf),isset(document.getElementById("cidadeAux"))&&(document.getElementById("cidadeAux").value=e.localidade.replace("D'","d`").replace("'","`")),isset(document.getElementById("cidadeId"))&&(document.getElementById("cidadeId").value=""),isset(document.getElementById("uf"))&&(document.getElementById("uf").value=e.uf),isset(document.getElementById("logradouroBairroAux"))&&(document.getElementById("logradouroBairroAux").value=e.logradouro+", "+e.bairro+", "),isset(document.getElementById("endereco"))&&document.getElementById("endereco").focus(),alerta=!1}function permitirSomenteNumeros(e){e.value=removerCaracteresNaoNumericos(e.value)}function removerCaracteresNaoNumericos(e){return e=e.replace(/\D/g,"")}function permitirNumerosComDecimal(e){e.value=e.value.replace(/[^0-9.,]/g,"")}function convertToUSFloatValue(e){var t=e.replace(".","");return t=t.replace(",","."),parseFloat(t)}function setTextValue(e,t){return null!=e&&(e.value=t),!0}function setOptionValue(e,t){if(null!=e&&null!=e.options)for(var n=0;n<e.options.length;n++)e.options[n].value==t?e.options[n].selected=!0:e.options[n].selected=!1;return!0}function setSelectValue(e,t,n){if(""==t)return!1;null==n&&(n="|");for(var o=t.split(n),l=0;l<o.length;l++)addCombo(e,o[l],o[l],!0);return sortCombo(e),!0}function setReadOnlyField(e,t,n){var o=null==e[t]||void 0===e[t]?e:e[t];if(null==n&&(n=!0),n){if(null==o.classNameRO)switch(o.classNameRO=o.className,o.className){case"inputText":o.className="inputTextRO",o.readOnly=!0;break;case"inputValue":o.className="inputValueRO",o.readOnly=!0;break;case"inputSuggest ui-autocomplete-input":o.disabled=!0;case"inputSuggest":hiddenObject(t+"Link"),hiddenObject(t+"Button"),o.className="inputTextRO",o.readOnly=!0,o.onblurRO=o.onblur,o.onblur=null,o.onkeypressRO=o.onkeypress,o.onkeypress=null;break;case"comboSelect":o.className="comboSelectRO",o.disabled=!0;break;case"comboSelectNew":o.className="comboSelectNewRO",o.disabled=!0}}else if(null!=o.classNameRO)switch(o.className=o.classNameRO,o.classNameRO=null,o.className){case"inputSuggest ui-autocomplete-input":o.disabled=!1;case"inputSuggest":showObject(t+"Button"),o.readOnly=!1,o.onblur=o.onblurRO,o.onblurRO=null,o.onkeypress=o.onkeypressRO,o.onkeypressRO=null;break;case"inputText":case"inputValue":o.readOnly=!1;break;case"comboSelect":case"comboSelectNew":o.disabled=!1}}function setPage(e){-1!=e&&refresh(null,null,e)}function sort(e,t){return refresh(e,t),!0}function filter(e,t){return""!=t&&refresh(null,null,0,e,t),!0}function clearFilter(e,t){document.location.href="&selectFilter=null"!=t&&"&selectFilter="!=t?e+"?1=1"+t:e}function refresh(e,t,n,o,l,a){return null!=e&&(orderField=e),null!=t&&(order=t),null!=n&&(page=n),null!=o&&(filterField=o),null!=l&&(filterValue=l),null!=a&&(param=a),filterField=escape(filterField),filterValue=escape(filterValue),document.location.replace(url+"?orderField="+orderField+"&order="+order+"&page="+page+"&filterField="+filterField+"&filterValue="+filterValue+param),!0}function go(e,t){null==t&&(t=document),t.location.replace(CONTEXTO+"/"+e)}function goWindow(e,t,n,o){null==t&&(t=570),null==n&&(n=425),null==o&&(o=""),""!=o&&(o=","+o),window.open(e,"WndWindow","status=no,width="+t+",height="+n+",scrollbars=yes,dependent=yes,resizable=yes"+o).focus()}function goServlet(e,t){go(SERVLET+e,t)}function goServletTargetWindow(e,t){e=CONTEXTO+"/"+SERVLET+e;window.open(e,t)}function goServletWindow(e,t,n,o,l){e=CONTEXTO+"/"+SERVLET+e;null==t&&(t=570),null==n&&(n=425),null==o&&(o=""),""!=o&&(o=","+o),null==l&&(l="WndServletWindow"),"WndServletWindow"==top.window.name&&(l="WndServletWindowTwo"),window.open(e,l,"status=no,width="+t+",height="+n+",scrollbars=yes,dependent=yes,resizable=yes"+o).focus()}function goServletWindowModal(e,t,n){e=CONTEXTO+"/"+SERVLET+e;return null==t&&(t=570),null==n&&(n=425),window.showModalDialog(e,"WndServletWindow","status=no; dialogHeight:"+n+"px; dialogWidth:"+t+"px; resizable=yes;")}function createUrl(e){return e}function createUrlParam(e,t,n){return createUrl(e)+"?"+t+"="+n}function abreSelecao(e,t,n,o,l,a){t.value="",n.value="",janela=window.open(createUrlParam(o,l,a),e,"status=no,resizable=no,scrollbars=yes,menubar=no,width=400,height=420")}function submitForm(e){var t=e.action;0<=t.lastIndexOf("/")&&(t=t.substring(t.lastIndexOf("/")+1,t.length));var n=CONTEXTO+"/"+SERVLET+t;e.action=n,e.submit()}function sortCombo(e){for(var t=0;t<e.options.length-1;t++)for(var n=t;n<e.options.length;n++)if(e.options[n].text<e.options[t].text){var o=e.options[n].value;e.options[n].value=e.options[t].value,e.options[t].value=o,o=e.options[n].text,e.options[n].text=e.options[t].text,e.options[t].text=o}}function addCombo(e,t,n,o){if(0==o)for(var l=0;l<e.options.length;l++)if(e.options[l].value==n)return;e.options[e.options.length]=new Option(t,n)}function addComboOptGroup(e,t){var n=document.createElement("optgroup");n.label=t,e.appendChild(n)}function removeAllOptGroup(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function removeSelectedCombo(e){for(var t=0,n=0;n<e.length;n++)e.options[t].value=e.options[n].value,e.options[t].text=e.options[n].text,e.options[n].selected||t++,e.options[n].selected=!1;e.length=t}function selectAllCombo(e){for(i=0;i<e.options.length;i++)e.options[i].selected=!0}function valuesCombo(e,t){var n="";null==t&&(t="|");for(var o=0;o<e.length;o++)""!=n.length&&(n+=t),n+=e.options[o].value;return n}function valuesSelectedCombo(e,t){var n="";null==t&&(t="|");for(var o=0;o<e.length;o++)e.options[o].selected&&(""!=n.length&&(n+=t),n+=e.options[o].value);return n}function selectValueCombo(e,t){0<e.options.length&&(e.options[t].selected=!0)}function getTitleAndSubTitle(e,t){return"title="+(e||(titleDefault||""))+("&subTitle="+(t||(subTitleDefault||"")))}function openSelect(e,t,n,o){var l="",a=document.getElementById(t+"OpenSelectURLParameters");null!=a&&void 0!==a&&(l=a.value);var r=escape(CONTEXTO+"/"+SERVLET+e),i=CONTEXTO+"/module/selectFrm.jsp?url="+r+"&object="+t+l;"undefined"!=typeof selectFilter&&null!=selectFilter&&""!=selectFilter&&(i=i+"&selectFilter="+selectFilter),null==n&&(n=570),null==o&&(o=425),window.open(i,"wndSelect","width="+n+",height="+o+",scrollbars=no,resizable=yes,dependent=yes,toolbar=no").focus()}function coreEnviaCodigo(e,t,n,o){null!=top.window.opener&&null!=top.window.opener.component.setValues?(null!=n&&null!=o?top.window.opener.component.setValues(parent.object,e,t,n,o):top.window.opener.component.setValues(parent.object,e,t),top.window.opener.focus()):alert("Janela não é mais válida. Abra novamente!"),top.window.close()}function closeAction(){null!=top.window.opener&&top.window.opener.focus(),top.window.close()}function backAction(){go("module/stackPop.jsp")}function cancelAction(){go("module/stackPop.jsp")}function printAction(){printAction2()}function printAction2(){validMandatory(document.form)&&("XLS"==document.form.tipoRelatorio.value&&alert("Recomendamos o uso de relat�rios em formato PDF.\nRelat�rios em formato XLS somente existem para a possibilidade de manipula��o de dados, caso o usu�rio desejar."),submitForm(document.form))}function filterAction(e){""==document.formFilter.filterValue.value?(alert("O filtro deve possuir um valor."),document.formFilter.filterValue.focus()):-1!=document.formFilter.filterField.value.indexOf("&N")?(rExp=/\./gi,value=new String(document.formFilter.filterValue.value),document.formFilter.filterValue.value=value.replace(rExp,new String("")),isNumber(document.formFilter.filterValue,e)&&filter(document.formFilter.filterField[document.formFilter.filterField.selectedIndex].value,document.formFilter.filterValue.value)):filter(document.formFilter.filterField[document.formFilter.filterField.selectedIndex].value,document.formFilter.filterValue.value)}function clearFilterAction(){clearFilter(url,param)}function formataData(e,t){var n=document.all?t.keyCode:t.which;vr=document.form[e].value,vr=vr.replace(".",""),vr=vr.replace("/",""),vr=vr.replace("/",""),tam=vr.length,48<=n&&n<=57?2==tam?document.form[e].value=vr.substr(0,tam)+"/":4==tam&&(document.form[e].value=vr.substr(0,tam-2)+"/"+vr.substr(2,tam)+"/"):46!=n&&8!=n&&36!=n&&(document.all?t.keyCode=0:t.charKey=0)}function formataHora(e,t){var n=document.all?t.keyCode:t.which;vr=document.form[e].value,vr=vr.replace(".",""),vr=vr.replace(":",""),vr=vr.replace(":",""),tam=vr.length,48<=n&&n<=57?2==tam&&(document.form[e].value=vr.substr(0,tam)+":"):46!=n&&8!=n&&36!=n&&(document.all?t.keyCode=0:t.charKey=0)}function validaHora(e){var t=document.form[e].value;if(0<t.length&&5==t.length){var n=parseInt(t.substring(0,2)),o=parseInt(t.substring(3,5));if(24<n||60<o)return alert("Hora inv�lida."),document.form[e].value="",void document.form[e].focus()}else if(t.length<5&&0!=t.length)return alert("Hora inv�lida."),document.form[e].value="",void document.form[e].focus();return!0}function validaData(e){var t=document.form[e].value;if(0<t.length){var n=parseInt(t.substring(0,2),10),o=parseInt(t.substring(3,5),10),l=parseInt(t.substring(6,10),10);if(!(n<=31&&o<=12&&1e3<=l))return window.alert("Data inv�lida."),document.form[e].value="",void document.form[e].focus();if(("0"!=t.substring(0,1)||"0"==t.substring(1,2))&&"0"==t.substring(0,1))return window.alert("Data inv�lida."),document.form[e].value="",void document.form[e].focus();if("/"!=t.substring(2,3))return window.alert("Data inv�lida."),document.form[e].value="",void document.form[e].focus();if(("0"!=t.substring(3,4)||"0"==t.substring(4,5))&&"0"==t.substring(3,4))return window.alert("Data inv�lida."),document.form[e].value="",void document.form[e].focus();if("/"!=t.substring(5,6))return window.alert("Data inv�lida."),document.form[e].value="",void document.form[e].focus();if("0"==t.substring(6,7)||""==t.substring(6,7)&&"0"!=t.substring(7,8))return window.alert("O ano que voc� digitou n�o existe!"),document.form[e].value="",void ocument.form[e].focus();if(2==o){if(!(0<n&&n<=29))return window.alert("Data inv�lida."),document.form[e].value="",void document.form[e].focus();if(29==n)return l%4==0||(window.alert("Data inv�lida."),document.form[e].value="",void document.form[e].focus())}return 4==o||6==o||9==o||11==o?0<n&&n<=30||(window.alert("Data inv�lida."),document.form[e].value="",void document.form[e].focus()):1!=o&&3!=o&&5!=o&&7!=o&&8!=o&&10!=o&&12!=o||(0<n&&n<=31?void 0:(window.alert("Data inv�lida."),document.form[e].value="",void document.form[e].focus()))}return!0}function tiraVirgula(e){0<document.form[e].value.length&&(conteudo=new String(document.form[e].value),rExp=/,/gi,document.form[e].value=conteudo.replace(rExp,new String(".")))}function PontoToVirgula(e){0<document.form[e].value.length&&(conteudo=new String(document.form[e].value),document.form[e].value=conteudo.replace(".",new String(",")),document.form[e].select(),document.form[e].focus())}function VirgulaToPonto(e){0<document.form[e].value.length&&(conteudo=new String(document.form[e].value),rExp=/,/gi,document.form[e].value=conteudo.replace(rExp,new String(".")))}function isNumber(e){return""==e||(valor=document.form[e].value,tam=document.form[e].value.length,!(0<tam)||(tiraVirgula(e),valor=document.form[e].value,!isNaN(valor)||(alert("Valor digitado inv�lido."),document.form[e].value="",document.form[e].focus(),!1)))}function formatProcesso(e){for(var t="",n=e.value,o=0;o<n.length&&t.length<25;o++){var l=n.charAt(o);0<="0123456789".indexOf(l)&&(t+=l)}e.value=t}function formatProcessoCliente(e){for(var t="",n=e.value,o=0;o<n.length&&t.length<100;o++)t+=n.charAt(o);e.value=t}function formatPaginas(e){for(var t="",n=e.value,o=0;o<n.length;o++){var l=n.charAt(o);0<="0123456789v,-".indexOf(l)&&(t+=l)}e.value=t}function Formata_CEP(e){vr=document.form[e].value,vr=vr.replace("-",""),tam=vr.length,8==tam?document.form[e].value=vr.substr(0,5)+"-"+vr.substr(5,3):(tam<8&&0<tam||8<tam)&&(alert("Tamanho inv�lido de CEP"),document.form[e].focus(),document.form[e].select())}function verificaEmailOld(e){var t=document.form[e].value;if(""!=t){for(var n=!1,o=!1,l=0;l<t.length;l++)"@"==t.substring(l-1,l)&&(n=!0),"."==t.substring(l-1,l)&&(o=!0);0!=n&&0!=o||(alert("E-mail inv�lido"),document.form[e].focus(),document.form[e].select())}}function verificaMail(e){return!new RegExp("^[a-zA-Z0-9]+([-._][a-zA-Z0-9]*)*@[a-zA-Z0-9]+([-._][a-zA-Z0-9]+)*([.][a-zA-Z]{2,9})+$").test(e)}function verificaCPF(e){for(var t="",n=0;n<e.value.length;n++){var o=e.value.charAt(n);0<="0123456789".indexOf(o)&&(t+=o)}if(11!=t.length||"00000000000"==t||"11111111111"==t||"22222222222"==t||"33333333333"==t||"44444444444"==t||"55555555555"==t||"66666666666"==t||"77777777777"==t||"88888888888"==t||"99999999999"==t)return!1;var l=0,a=0;for(n=0;n<9;n++)a+=parseInt(t.charAt(n))*(10-n);if(10!=(l=11-a%11)&&11!=l||(l=0),l!=parseInt(t.charAt(9)))return!1;for(n=a=0;n<10;n++)a+=parseInt(t.charAt(n))*(11-n);return 10!=(l=11-a%11)&&11!=l||(l=0),l==parseInt(t.charAt(10))}function verificaCNPJ(e){for(var t="",n=0;n<e.value.length;n++){var o=e.value.charAt(n);0<="0123456789".indexOf(o)&&(t+=o)}if(14!=t.length||"00000000000000"==t||"11111111111111"==t||"22222222222222"==t||"33333333333333"==t||"44444444444444"==t||"55555555555555"==t||"66666666666666"==t||"77777777777777"==t||"88888888888888"==t||"99999999999999"==t)return!1;for(tamanho=t.length-2,numeros=t.substring(0,tamanho),digitos=t.substring(tamanho),soma=0,pos=tamanho-7,n=tamanho;1<=n;n--)soma+=numeros.charAt(tamanho-n)*pos--,pos<2&&(pos=9);if(resultado=soma%11<2?0:11-soma%11,resultado!=digitos.charAt(0))return!1;for(tamanho+=1,numeros=t.substring(0,tamanho),soma=0,pos=tamanho-7,n=tamanho;1<=n;n--)soma+=numeros.charAt(tamanho-n)*pos--,pos<2&&(pos=9);return resultado=soma%11<2?0:11-soma%11,resultado==digitos.charAt(1)}function copyValuesComboToText(e,t,n){null==n&&(n="|");for(var o=0;o<e.length;o++)""!=t.value&&(t.value+=n),t.value+=e.options[o].value}function copyValuesCheckToText(e,t){var n="";if(null==t&&(t="|"),null!=e){e.checked&&(n+=e.value);for(var o=0;o<e.length;o++)e[o].checked&&(""!=n&&(n+=t),n+=e[o].value)}return n}function copyAttributeCheckToText(e,t,n){var o="";if(null==n&&(n="|"),null!=e){e.checked&&(o+=e.getAttribute(t));for(var l=0;l<e.length;l++)e[l].checked&&(""!=o&&(o+=n),o+=e[l].getAttribute(t))}return o}function copyValuesNotCheckToText(e,t){var n="";if(null==t&&(t="|"),null!=e){null!=e.checked&&(e.checked||(n+=e.value));for(var o=0;o<e.length;o++)e[o].checked||(""!=n&&(n+=t),n+=e[o].value)}return n}function fixFloat(e,t){if(!e.value.length||e.disabled)return!0;var n=e.value;return void 0!==t&&(n=n.replace(new RegExp(t,"g"),"")),n=parseFloat(e.value),isNaN(n)?(e.value=0,!1):(e.value=n,!0)}function isNumber(e,t){return!(null!=e&&0<e.value.length&&(tiraVirgula(e),isNaN(e.value)))||(alert("Valor digitado inv�lido."),e.select(),e.focus(),document.all?(t.cancelBubble=!0,t.returnValue=!1):(t.preventDefault(),t.stopPropagation()),!1)}function tiraVirgula(e){0<e.value.length&&(conteudo=new String(e.value),rExp=/,/gi,e.value=conteudo.replace(rExp,new String(".")))}function setCheckValue(e,t){if(null!=e){null!=e.checked&&(e.checked=t);for(var n=0;n<e.length;n++)e[n].checked=t}}function setMandatoryText(e,t,n,o){var l;if(null!=e.name)e.mandatory=t,e.mandatoryLabel=o,e.mandatoryValues=n,l=document.getElementById(e.name+"Label");else{for(var a=0;a<e.length;a++)e[a].mandatory=t,e[a].mandatoryLabel=o,e[a].mandatoryValues=n;l=document.getElementById(e[0].name+"Label")}null!=l&&addClass(l,"dataLabelMandatory")}function removeMandatoryText(e){var t;if(null!=e.name)e.mandatory=null,e.mandatoryLabel=null,e.mandatoryValues=null,t=document.getElementById(e.name+"Label");else{for(var n=0;n<e.length;n++)e[n].mandatory=null,e[n].mandatoryLabel=null,e[n].mandatoryValues=null;t=document.getElementById(e[0].name+"Label")}null!=t&&removeClass(t,"dataLabelMandatory")}function validMandatory(e){for(var t=e.elements,n=0;n<t.length;n++)if(null!=t[n].mandatory){var o=t[n],l=o.mandatoryLabel;null==l&&(l=getTextContent(document.getElementById(o.name+"Label")));var a=o.mandatoryValues;switch(o.mandatory){case"list":o=e[o.name+"List"];for(var r=0;r<a.length;r++)if(o.options.length<a[r])return alert("A lista de "+l+" deve ter pelo menos "+a[r]+" item(ns)."),o.focus(),!1;break;case"checkbox":o=e[o.name];var i=!1;for(r=0;r<o.length;r++)if(o[r].checked){i=!0;break}if(!i)return alert("Pelo menos um item de "+l+" deve ser selecionado."),o.focus(),!1;break;case"text":default:for(r=0;r<a.length;r++)if(-1!=a[r].indexOf("|")){var u=a[r].split("|"),c=u[0],d=u[1],s=!0;if("="==c||"=="==c?s=o.value.length==d:"!="==c?s=o.value.length!=d:"<"==c?s=o.value.length<d:"<="==c?s=o.value.length<=d:">"==c?s=o.value.length>d:">="==c&&(s=o.value.length>=d),!s)return alert("O valor "+l+" deve ser "+c+d+" caracteres."),o.focus(),!1}else if(a[r]==trim(o.value))return alert("Deve ser preenchido o campo "+l),o.focus(),!1}}return!0}function getTextContent(e){return e.innerText?e.innerText:e.textContent?e.textContent:e.getAttribute("newAttr")}var selectedTab=null;function showPanel(e){selectedTab&&(selectedTab.className="tab"),(selectedTab=document.getElementById("bt_"+e)).className="tabSelected";for(var t=0;;){var n="panel"+t;if(null==document.getElementById(n))break;document.getElementById(n).style.display=e==n?"block":"none",document.getElementById(n).style.visibility=e==n?"visible":"hidden",t++}}function resizeAbas(){for(var e=0,t=window.innerHeight?window.innerHeight:document.body.clientHeight;;){var n="panel"+e;if(null==document.getElementById(n))break;document.all&&0==e&&(document.getElementById(n).style.top=-18),document.getElementById(n).style.height=t-108,document.body.scroll="no",document.body.style.overflow="hidden",e++}}function showObject(e){null!=document.getElementById(e)&&(document.getElementById(e).style.visibility="visible")}function hiddenObject(e){null!=document.getElementById(e)&&(document.getElementById(e).style.visibility="hidden")}function showObjectBlock(e){null!=document.getElementById(e)&&(document.getElementById(e).style.display="block",document.getElementById(e).style.visibility="visible")}function showObjectBlock2(e){null!=document.getElementById(e)&&(document.getElementById(e).style.display="",document.getElementById(e).style.visibility="visible")}function hideObjectBlock(e){null!=document.getElementById(e)&&(document.getElementById(e).style.display="none",document.getElementById(e).style.visibility="hidden")}function trim(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function addEvent(e,t){window.addEventListener?window.addEventListener(e,t,!1):window.attachEvent&&window.attachEvent("on"+e,t)}function hasClass(e,t){return e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}function addClass(e,t){this.hasClass(e,t)||(e.className+=" "+t)}function removeClass(e,t){if(hasClass(e,t)){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")}}function viewMap(e,t){return goWindow("http://maps.google.com/maps?f=q&source=s_q&hl=pt-BR&geocode=&t=h&z=16&q="+((e=unescape(encodeURIComponent(e)))+" - "+(t=unescape(encodeURIComponent(t)))+" - Brasil"),800,500),!1}function viewRastreio(e){return goWindow("https://www.linkcorreios.com.br/"+(e=unescape(encodeURIComponent(e))),1024,768),!1}function editUser(e){goServletWindow("EmpresaUsuarioViewAction?id="+e+"&"+getTitleAndSubTitle(null,"Alterações"),750,650,"resizable=yes")}function coreViewFile(e){goServletWindow(e,785,580,"resizable=yes")}function coreDownloadFile(e,t){-1!=e.toLowerCase().lastIndexOf(".pdf")?goServletWindow("FileDownloadAction?filePath="+e+"&strategyType=downloadPDF",785,580,"resizable=yes"):coreViewFile(t)}function coreDesativarBotoesAction(e){for(var t=document.getElementsByClassName("buttonAction"),n=0;n<t.length;n++){var o=t[n].title.trim();-1!=e.indexOf(o)&&(t[n].style.display="none")}}function coreAtivarBotoesAction(e){for(var t=document.getElementsByClassName("buttonAction"),n=0;n<t.length;n++){var o=t[n].title.trim();-1!=e.indexOf(o)&&(t[n].style.display="block")}}function truncateField(e,t){e.value=e.value.substring(0,t)}function addComportamentoCampoCpfCnpj(e,t){var n="000.000.000-009",o="00.000.000/0000-00",l=function(e){return 0==(e=removerCaracteresNaoNumericos(e)).length?o:e.length<=11?n:o},a={onKeyPress:function(e,t,n,o){n.mask(l.apply({},arguments),o)}};e(t).mask(l,a)}String.prototype.trim||(String.prototype.trim=function(){return trim(this)}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){var n;if(null==this)throw new TypeError('"this" é nulo (null) ou não foi definido (undefined');var o=Object(this),l=o.length>>>0;if(0===l)return-1;var a=+t||0;if(Math.abs(a)===1/0&&(a=0),l<=a)return-1;for(n=Math.max(0<=a?a:l-Math.abs(a),0);n<l;){if(n in o&&o[n]===e)return n;n++}return-1});