function removeAcentoEvtHandler(obj) { obj.value = removeAcento(obj.value); } function removeAcento(strToReplace) { strAcento = "ÁÀÃÂÄÉÈÊËÍÌÎÏÓÒÕÖÔÚÙÛÜÇÑ"; strSemAcento = "AAAAAEEEEIIIIOOOOOUUUUCN"; var strRetorno = ""; strToReplace = strToReplace.toUpperCase(); for (var i = 0; i < strToReplace.length; i++) { if (strAcento.indexOf(strToReplace.charAt(i)) != -1) { strRetorno += strSemAcento.substr(strAcento.search(strToReplace.substr(i, 1)), 1); } else { strRetorno += strToReplace.substr(i, 1); } } return strRetorno; } function radioButtonChange( radio, nomePrefixo, idHidden ) { var el = radio.form.elements; var nomeElemento = ''; for (var i = 0; i < el.length; i++) { // seta o valor no campo oculto if ( el[i].id.toUpperCase() == idHidden.toUpperCase() ) { el[i].value = radio.value; } // desmarca o radio antigo if ( el[i].type.toUpperCase() == 'radio'.toUpperCase() ) { nomeElemento = el[i].name.substring( el[i].name.lastIndexOf(':') ); if ( nomeElemento.indexOf(nomePrefixo) == 0 ) { if ( radio.name != el[i].name ){ if ( el[i].checked ) { el[i].checked = false; } } } } } } function showAjaxStatusDialog(data) { var ajaxStatus = data.status; // Can be "begin", "success" and "complete" switch (ajaxStatus) { case "begin": // This is called right before ajax request is been sent. ajaxStatusDialog.show(); break; case "complete": // This is called right after ajax response is received. ajaxStatusDialog.hide(); break; case "success": // This is called when ajax response is successfully processed. ajaxStatusDialog.hide(); break; } } PrimeFaces.locales['pt_BR'] = { closeText: 'Fechar', prevText: 'Anterior', nextText: 'Próximo', currentText: 'Começo', monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho','Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'], monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun', 'Jul','Ago','Set','Out','Nov','Dez'], dayNames: ['Domingo','Segunda','Terça','Quarta','Quinta','Sexta','Sábado'], dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'], dayNamesMin: ['D','S','T','Q','Q','S','S'], weekHeader: 'Semana', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: '', timeOnlyTitle: 'Só Horas', timeText: 'Tempo', hourText: 'Hora', minuteText: 'Minuto', secondText: 'Segundo', currentText: 'Data Atual', ampm: false, month: 'Mês', week: 'Semana', day: 'Dia', allDayText : 'Todo Dia' }; function setValueComponente( idComponente, value ) { var componente = document.getElementById(idComponente); componente.value = value; } function start() { ajaxStatusDialog.show(); } function stop() { ajaxStatusDialog.hide(); // Submete a página para atualizar as mensagen document.getElementById('hfMsg:submitHidden').click(); } function stopCrossTab() { ajaxStatusDialog.hide(); // Submete a página 235 e 252 para atualizar as mensagen var botao = document.getElementById('processaMensagemRelatorio'); botao.click(); } function stopCaptcha() { ajaxStatusDialog.hide(); atualizaCaptcha(); // Submete a página para atualizar as mensagen document.getElementById('hfMsg:submitHidden').click(); } // Bloco de implementação do captcha function setTextoCaptchaFocus() { document.getElementById('captcha_text').focus(); } function atualizaCaptcha() { if (document.getElementById('captcha_text') != null) { var ran_number = Math.random()*5; var captcha_image_servlet = CONTEXT_PATH + "/captcha.png?" + ran_number; document.getElementById('captcha_image').src = captcha_image_servlet; document.getElementById('captcha_text').value = ""; } } function escutaCaptcha() { document.location.href = CONTEXT_PATH + "/captcha.wav"; } function loadCaptcha() { atualizaCaptcha(); } function onLoadSijud() { loadCaptcha(); } window.onload = onLoadSijud; // Fim Bloco de implementação do captcha