doFindCitiesByState=function(B,D,A){var C=returnLinkForPaneSelected(insereTimeStamp(getURLToProfile(A))+"&eventSubmit_doFindcitiesbystate=ok&defaultAction=false&template=content&js_peid=POPUP_"+A+"&cmbState="+B+"&selectedCityId="+D);ajaxShowWarningMsgs=false;divContentAjax="divAjaxComboCitiesByState";divRedraw="divAjaxComboCitiesByState";viaHrefAjax(encodeURI(C),false);};doFindCitiesByAjax=function(B,C,A,D){if(B!=""){var E=returnLinkForPaneSelected(insereTimeStamp(getURLToProfile(A))+"&eventSubmit_doFindCitiesByAjax=ok&defaultAction=false&template=content&js_peid=POPUP_"+A+"&cmbPublic="+B+"&selectedId="+C+"&findType="+D);ajaxShowWarningMsgs=false;divContentAjax="contentAjaxComboCities";divRedraw="contentAjaxComboCities";viaHrefAjax(encodeURI(E),false);}};function logOutVerify(B){if(B){document.getElementById("authenticated").style.display="none";}else{document.getElementById("linkLogin").style.display="none";document.getElementById("authenticated").style.display="block";var A=new Date().getHours();if(A>=0&&A<12){document.getElementById("greeting").innerHTML="Bom dia";}else{if(A>=12&&A<18){document.getElementById("greeting").innerHTML="Boa tarde";}else{document.getElementById("greeting").innerHTML="Boa noite";}}}}function showSearchCep(){showPopupDialog(applicationURL+"/html/popupSearchCep.html","358px","370px",false);}function formatValidateCep(A,B){if(A.value.indexOf("-")>-1){A.value=A.value.replace("-","");}return formatCep(A,B);}var globalDocType="";function setDocNumberMaxLength(C,B,A){globalDocType=C;var D=document.getElementById(B);if(C=="RG"){D.maxLength=11;D.value="";}else{if(C=="CPF"){D.maxLength=11;D.value="";}}}function unFormatIfCPF(A){if(globalDocType=="CPF"&&(A.maxLength==11||A.maxLength==14)){unFormatCPF(A);}A.maxLength=11;}function formatIfCPF(A,B){if(globalDocType=="CPF"&&(A.maxLength==11||A.maxLength==14)){return formatCPF(A,B);}}function formatIfRG(B,A){if(globalDocType=="RG"&&B.maxLength==11){return formatRG(B,A);}}function doCancel(C,E,A){var B=C.participantId.value;var D="";if(B!=undefined&&B!=""){D="_doView=Ok";}if(A.indexOf("?")==-1){A+="?isCancelButton=1";}else{A+="&isCancelButton=1";}location.href=insereTimeStamp(A);}function doBack(A){if(A==undefined||A==""){history.back();}else{if(A.indexOf("?")==-1){A+="?isBackButton=1";}else{A+="&isBackButton=1";}location.href=encodeURI(insereTimeStamp(A));}}function doPrintUFV(){window.open(getSiteWebroot()+"/html/printParticipant.html","popUpPrint","width=700,height=540,resizable=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes");return false;}function limpaData(A){A.value="";}function doConsulta(A){showPopupDialog(getURLToPopupProfile(A)+"&defaultAction=true&timemilis="+(new Date()-1),500,400);}function doChangeProfile(B,A,C){B.action=returnLinkForPaneSelected(getProfileURL()+"?eventSubmit_doSetprofile=Ok&defaultAction=false&menuId0="+C+"&profileType="+A);B.submit();}function chooseDocumentType(B,C,A){setDocNumberMaxLength(B.form,B.value,A);formatDocumentId(C,document.getElementById(A));}function formatDocumentId(B,A){formatIfCPF(A,B);formatIfRG(A,B);}function removeCharsByExpression(B,D){var C="";for(var A=0;A<B.value.length;A++){carac=B.value.charAt(A);if((D).test(carac)){C+=carac;}}B.value=C;}function formatUsername(A){var B=/^[a-zA-Z_\d]+$/;removeCharsByExpression(A,B);}function validateLogin(D,B){var C=getKey(B);var A=String.fromCharCode(C);if(B.shiftKey&&A=="_"){return false;}return true;}function formatDecimalOnPaste(B,A){if(A){B.maxLength=A;}B.value=B.value.replace(/\D,/g,"");}function validatePassword(A){if(A.textLength<6||A.textLength>30||noHaveLether(A.value)||noHaveNumber(A.value)){document.getElementById("imgValidatePassword:"+A.id).src="images/validar_senha_2.gif";A.className="inputErro";return ;}else{document.getElementById("imgValidatePassword:"+A.id).src="images/validar_senha.gif";A.className="";}}function noHaveLether(B){var D=/[^0-9]/;for(var A=0;A<B.length;A++){var C=B.charAt(A);if(!D.test(C)){return false;}}return true;}function noHaveNumber(B){var D=/[^0-9]/;for(var A=0;A<B.length;A++){var C=B.charAt(A);if(D.test(C)){return false;}}return true;}function validateTextField(B,A){if(validateShowDivCaps(A)==false){return false;}return validateTextFieldImpl(B,A);}function formatTextFieldOnPaste(C,A){try{var D=document.getElementById("Div_Caps");document.getElementById("Div_Caps").style.display="none";document.getElementById("iframe_Div_Caps").style.display="none";C.className="";}catch(B){}formatTextFieldOnPasteImpl(C,A);}function isCharacterAcentUpper(A){if((A>=199&&A<=207)||(A>=210&&A<=214)||(A>=217&&A<=220)||(A>=192&&A<=193)||(A>=195&&A<=196)){return true;}else{return false;}}function validateShowDivCaps(H){var F=H||window.event;codigo_tecla=F.keyCode?F.keyCode:F.which;tecla_shift=F.shiftKey?F.shiftKey:((codigo_tecla==16)?true:false);var D;if(navigator.appName.indexOf("Internet Explorer")>0){D=H.srcElement;}else{D=H.currentTarget;}if(((codigo_tecla>=65&&codigo_tecla<=90)&&!tecla_shift)||((codigo_tecla>=97&&codigo_tecla<=122)&&tecla_shift)||(isCharacterAcentUpper(codigo_tecla)&&!tecla_shift)){D.className="inputDes";var G=false;var I;var E;try{I=document.getElementById("Div_Caps");I.style.display="";E=document.getElementById("iframe_Div_Caps");E.style.display="";}catch(F){G=true;var I=document.createElement("div");I.id="Div_Caps";I.innerHTML="Desative a tecla <b>Caps Lock</b> do teclado para prosseguir. Caso necessite utilizar uma letra em maiúsculo pressione a tecla <b>Shift</b>.";var E=document.createElement("iframe");E.id="iframe_Div_Caps";var A=document.createAttribute("src");A.nodeValue="html/iframe_transparent.html";E.setAttributeNode(A);}var C=6;var B=6;while(D){C+=D.offsetLeft;B+=D.offsetTop;D=D.offsetParent;}if(navigator.userAgent.indexOf("Mac")!=-1&&typeof document.body.leftMargin!="undefined"){C+=document.body.leftMargin;B+=document.body.topMargin;}I.style.left=(C)+"px";I.style.top=(B)+"px";E.style.left=(C)+"px";E.style.top=(B+13)+"px";if(G){document.body.appendChild(I);document.body.appendChild(E);}return false;}else{try{document.getElementById("Div_Caps").style.display="none";document.getElementById("iframe_Div_Caps").style.display="none";D.className="";}catch(F){}}}function setCookie(A,C){var B=A+"="+C+";";document.cookie=B;}function getCookie(A){var B=document.cookie.split(";").length;for(c=0;c<B;c++){chave=(document.cookie.split(";")[c].split("=")[0]).replace(" ","");if(chave==A){return document.cookie.split(";")[c].split("=")[1];}}}function Menupop(B,A){if(document.getElementById(B).className=="ItemMenu FlutAber"){document.getElementById(B).className="ItemMenu FlutFech";document.getElementById(A).style.display="none";setCookie("menu","0");}else{document.getElementById(B).className="ItemMenu FlutAber";document.getElementById(A).style.display="";setCookie("menu",B);}}function getElemtByPID(A){return document.getElementById(globalPortletId+":"+A);}function formatRG(A,B){if(parseInt(A)==false){B.returnValue=false;}if(A.value!=""&&A.value.length<11){A.value=lpad(A,11,"0");}return A.value;}