var globalFormFieldsType;var globalRegExpPhone=/\(\d{2}\)\ \d{4}\-\d{4}/;var globalRegExpCep=/\d{2}\.\d{3}\-\d{3}/;var globalRegExpDate=/\d{2}\/\d{2}\/\d{4}/;var globalRegExpSpecialCaractersEmail=/^([0-9a-zA-Z._@])+$/;var globalRegExpSpecialCaracters="[\\w\\d\\s\\.\\?-@!,;]+";var globalRegExpUsername=/^[a-z]([a-z\d])+$/;var globalRegExpEmail=/^[\w-]+(\.[\w-]+)*@(([A-Za-z\d][A-Za-z\d-]{0,61}[A-Za-z\d]\.)+[A-Za-z]{2,6}|\[\d{1,3}(\.\d{1,3}){3}\])$/;var globalRegExpLdapEmail=/[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\\.[a-z]{2,6}/;var globalRegExpRemoveAccents=/[\~\^\x22\x27\xB4\+\`]/g;var globarRegExpRemoveSpaces=/^\s*|\B\s|\s*$/g;var globalPortletId="";var globalInvalidCaracters=/([\#\{\}\[\]\!\|\¹\²\³\£\¢\ª\º\§\°\²\³\£\¬\´\`\~\^\¨\<\>])+/;var globalMinSizeSearch=3;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"");};function addLoadEvent(A){var B=window.onload;if(typeof window.onload!="function"){window.onload=A;}else{window.onload=function(){if(B){B();}A();};}}function initializeFieldsType(A){globalFormFieldsType=new Array(3);globalFormFieldsType[0]=A.getElementsByTagName("input");globalFormFieldsType[1]=A.getElementsByTagName("textarea");globalFormFieldsType[2]=A.getElementsByTagName("select");}function getForm(A){return $Base("Form_PID_"+A);}function getElementByName(B){var A=document.getElementsByName(B);return A[0];}function doCleanForm(E){initializeFieldsType(E);for(var D=0;D<globalFormFieldsType.length;D++){if(globalFormFieldsType[D].length!=undefined){var A=globalFormFieldsType[D];for(var B=0;B<A.length;B++){if(A[B].getAttribute("type")!="hidden"){if(A[B].getAttribute("type")!="button"&&A[B].getAttribute("type")!="radio"){if(A[B].getAttribute("name")!=null){if(A[B].type!="select-one"){A[B].value="";}else{A[B].selectedIndex=0;}A[B].className="input";}}if(A[B].getAttribute("type")=="file"){var C=A[B].cloneNode(true);A[B].parentNode.replaceChild(C,A[B]);}}}}}}function disableFormFields(C){if(!document.getElementsByTagName){return ;}initializeFieldsType("");for(var D=0;D<globalFormFieldsType.length;D++){if(globalFormFieldsType[D].length!=undefined){var A=globalFormFieldsType[D];for(var B=0;B<A.length;B++){if(A[B].getAttribute("name").indexOf("close")==-1){A[B].disabled=C;}}}}}function disableField(B,A){$Base(B).disabled=A;}function rpad(D,A,C){var B=A-D.value.length;var E=String(C).charAt(0);for(i=0;i<B;i++){D.value=D.value+E;}return(D.value);}function lpad(D,A,C){var B=A-D.value.length;var E=String(C).charAt(0);for(;B>0;B--){D.value=E+D.value;}return(D.value);}function getKey(A){if(typeof (A)=="undefined"){var A=window.event;}return A?(A.which?A.which:(A.keyCode?A.keyCode:A.charCode)):null;}function $Base(A){return document.getElementById(A);}function show(A){$Base(A).style.display="";}function hide(A){$Base(A).style.display="none";}function selectCombo(C,B){var A=$Base(C).options;for(i=0;i<A.length;i++){if(A[i].value==B){A[i].selected=true;break;}}}function selectAll(C,A){for(var B=0;B<C.length;B++){C[B].selected=A;}}function deselectCombo(B){var A=$Base(B).options;for(i=0;i<A.length;i++){A[i].selected=false;}}function replaceAll(F,E,D){var A="";var B="";var C=false;for(i=0;i<F.length;i++){B=F.substring(i,i+1);C=false;for(j=0;j<E.length;j++){if(B==E[j]){A+=B.replace(E[j],D);C=true;continue;}}if(!C){A+=B;}}return A;}function limitSize(B,A){if(B.value.length>A){B.value=B.value.substring(0,A);}}function changeOrder(E,B){if(E!=null&&E.length>0){var D=E.selectedIndex;if(!(D==0&&B==-1||D==(E.length-1)&&B==1)){var C=E[D+B].value;var A=E[D+B].text;E[D+B]=new Option(E[D].text,E[D].value);E[D]=new Option(A,C);E[D+B].selected=true;}}}function addOptionCmb(C,B){if(C.value!=""){var D=document.createElement("option");D.text=C.value;D.value=C.value;try{B.add(D,null);}catch(A){B.add(D);}}}function addOptionCmbValueAndName(D,B,C){if(C.value!=""){var E=document.createElement("option");E.text=C;E.value=B;try{D.add(E,null);}catch(A){D.add(E);}}}function deleteOptionCmb(A){if(A!=null&&A.length>0){A.remove(A.selectedIndex);}}function getRadioValue(A){for(i=0;i<A.length;i++){if(A[i].checked){return A[i].value;}}return"";}function checkRadioValue(B,A){for(i=0;i<B.length;i++){if(B[i].value==A){B[i].checked=true;}else{B[i].checked=false;}}}function disableRadio(A){for(i=0;i<A.length;i++){A[i].disabled=true;}}function deleteElementArray(A,C){var B=A.slice(0,C);return B.concat(A.slice(C+1));}function replaceUnicode(C,A){var B=C;if(A=="decode"){while(B.indexOf("Ux39")>-1||B.indexOf("Ux34")>-1){B=B.replace("Ux39","'");B=B.replace("Ux34",'"');}}else{if(A=="code"){while(B.indexOf("'")>-1||B.indexOf('"')>-1){B=B.replace("'","Ux39");B=B.replace('"',"Ux34");}}}return B;}function replaceUnicodeJSP(B){var A=B;while(A.indexOf("'")>-1){A=A.replace("'","\\'");}return A;}function cleanEmptySpaces(A){A.value=A.value.replace(globarRegExpRemoveSpaces,"");}function retiraAspas(A){A=A.replace(/\'/g,"\\u0027");A=A.replace(/\"/g,"\\u0022");return A;}function colocaAspas(A){A=A.replace(/\\u0027/g,"'");A=A.replace(/\\u0022/g,'"');return A;}function cleanSpaces(B){var A=/\s{2,}/g;B=B.replace(A," ");A=/^\s*|\s*$/g;B=B.replace(A,"");return B;}function cleanSpecialCharacters(A){var B=getKey(A);if((globalRegExpSpecialCaracters).test(String.fromCharCode(B))){return false;}return true;}function wait(C){var B=new Date();var A=null;do{A=new Date();}while(A-B<C);}function sugestionUsername(A,C){var D=$Base(C);if(D.value==""&&!D.readOnly){var A=$Base(A);var B=A.value.split(" ");if(B.length>1){D.value=B[0]+B[B.length-1];}}removeAccents(D).toLowerCase();}function updatePageTitle(B){try{$Base("tagTitulo").innerHTML=B;}catch(A){}}function getIEVersion(){var A=0;if(navigator.appVersion.indexOf("MSIE")!=-1){temp=navigator.appVersion.split("MSIE");A=parseFloat(temp[1]);}return A;}function backToIgnoreNavHist(C,A){var D=getSiteWebroot()+"/sicredi/psmlId/"+C;if(D.indexOf("?")>-1){D+="&";}else{D+="?";}try{D=D+otherParamBackToIgnoreNavHist();}catch(B){}document.location=D+"ignoreForNavHist="+A+"&timemilis="+(new Date()-1)+"&paneSelected="+getSelectedPaneField();}function putTimemilisOnLink(A){if(A){var B=A.href;if(B.indexOf("?")>-1){B+="&";}else{B+="?";}A.href=B+"timemilis="+(new Date()-1);}}function prepareLinkForNavHist(A){var B=$Base("idxMaxNavHistory");if(B){A.href+="&idxMaxNavHistory="+B.value;}putTimemilisOnLink(A);}function returnLinkForNavHist(A){var B=$Base("idxMaxNavHistory");if(B){if(A.indexOf("?")>-1){A+="&";}else{A+="?";}A+="idxMaxNavHistory="+B.value;}return A;}function returnLinkForBackNavHist(A){var B=$Base("idxMaxNavHistory");if(B){if(A.indexOf("?")>-1){A+="&";}else{A+="?";}A+="idxMaxNavHistory="+(B.value-1);}return A;}function returnLinkForPaneSelected(A){var B=$Base("sitePaneSelected");if(B){if(A.indexOf("?")>-1){A+="&";}else{A+="?";}A+="paneSelected="+B.value;}return A;}function openPsml(A,B){location.href=returnURL2OpenPsml(A,B);}function openDocument(E,D,C,F,B,A){location.href=returnURL2OpenDocument(E,D,C,F,B,A);}function returnURL2OpenPsml(B,C){var A=getURLToProfile(B)+"?menuId="+C;return returnLinkForPaneSelected(returnLinkForNavHist(A));}function returnURL2OpenDocument(F,E,C,G,B,A){if(A){var D=getURLToProfile(F)+"?documentId="+E+"&content_cacheable="+B;D+="&prevEntryId="+C+"&menuId="+G+"&timemilis="+(new Date()-1)+"&viewPortletTitle=false";}else{var D=getURLToProfile(F)+"?documentId="+E+"&content_cacheable="+B;D+="&prevEntryId="+C+"&menuId="+G+"&timemilis="+(new Date()-1);}return returnLinkForPaneSelected(returnLinkForNavHist(D));}function CreateControl(C,B,A,F){try{var E=$Base(C);E.innerHTML='<embed src="'+B+'" WIDTH="'+A+'" height="'+F+'"       pluginspage="http://www.macromedia.com/go/getflashplayer" loop="false" menu="false" quality="high"       type="application/x-shockwave-flash" wmode="transparent"></embed>';}catch(D){}}function callDocViewerFromSearch(G,B,D,C,H){var A=$Base("pgListSelectedQuantity");var E="0";if(A){E=A.value;}var F=getSiteWebroot()+"/sicredi/psmlId/"+G+"?pageCaller=DCSR&siteSearchTxtField=";F+="&pgListSelectedQuantity=";F+=E;F+="&pageRowOffset=";F+=B;F+="&menuId=";F+=H;F+="&documentId=";F+=C;F+="&prevEntryId=";F+=D;F+="&timemilis=";F+=(new Date()-1);location.href=returnLinkForNavHist(F);}function prepareLinkToDocViewer(E,C,B,F,A){var D=getSiteWebroot()+"/sicredi/psmlId/"+E+"?";D+="menuId=";D+=F;D+="&paneSelected=";D+=A;D+="&documentId=";D+=B;D+="&prevEntryId=";D+=C;return D;}function callDocViewer(E,C,B,F,A){var D=prepareLinkToDocViewer(E,C,B,F,A);D+="&timemilis=";D+=(new Date()-1);location.href=returnLinkForNavHist(D);}function popOff(A){popOffLine=window.open(A,"popOffLine","width=604, height=400, statusbar=yes, top=20, left=20, resizable=no, scrollbars=yes");popOffLine.focus();}function openItemMenu(A,B){switch(B){case 1:openURLSelf(A);break;case 2:openURL(A);break;case 3:case 4:location.href=A;break;}}function getURLToEditPsml(A,C){var B=getProfileURL()+"/js_peid/"+A;B+="/reset/1/action/controls.Customize";if(C!=null){B+="/menuId/"+C;}startProcessing();location.href=returnLinkForPaneSelected(returnLinkForNavHist(insereTimeStamp(B)));}function openURLSelf(A){try{window.location=A;}catch(B){window.location="http://pagenotfounderror/";}}function openURL(A){try{window.open(A,"","");}catch(B){window.open("http://pagenotfounderror/","","");}}function insereTimeStamp(B){var A=(new Date())-0;if(B.indexOf("?")==-1){B+="?hdnTimeStamp="+A;}else{B+="&hdnTimeStamp="+A;}return B;}function viaHref(B,A){if(A!=null){if(B.indexOf("?")==-1){B+="?menuId="+A;}else{B+="&menuId="+A;}}location.href=insereTimeStamp(B);}var applicationURL;function setApplicationURL(A){applicationURL=A;}function loadFunctions(A){disableProcessingMessage();setFocus();markSelectedPane();}function sessionLogout(){var A=applicationURL+"SessionInvalidateServlet?timeMilis="+(new Date()-1);freeDOMAjax.addRequest(A,doNothing);}function sessionValidate(A){var B=A+"sessionValidate.jsp?timeMilis="+(new Date()-1);freeDOMAjax.addRequest(B,doNothing);}function doNothing(){}function haveTags(B){var A=/<.*?>/g;return A.test(B);}function verificaEnter(B){var A=B.keyCode||B.which;if(A==13){return true;}return false;}function getSiteWebroot(){return $Base("siteWebroot").value;}function getProfilePsmlId(){return $Base("profilePsmlId").value;}function getProfileURL(){return applicationURL+"sicredi/psmlId/"+getProfilePsmlId();}function getProfileURLToPopup(B){var A=applicationURL;A+="sicredi/psmlId/"+getProfilePsmlId();A+="?template=content&js_peid="+B;return A;}function getURLToProfile(A){return applicationURL+"sicredi/psmlId/"+A;}function getURLToPopupProfile(B){var A=applicationURL;A+="sicredi/psmlId/"+B;A+="?template=content&js_peid=POPUP_"+B;return A;}function getURLToPopupProfileWithPortletId(C,B){var A=applicationURL;A+="sicredi/psmlId/"+C;A+="?template=content&js_peid="+B;return A;}function geraTimeStamp(B){var A=(new Date())-0;B=B+parseInt((Math.random()*A));return B;}var type=1;var argument="";var animBuffer="";function openLinkAnimation(B,A){switch(Number(A)){case 1:openURL(B);break;case 2:case 4:B=B.replace(/\|\*\|/g,"&");openURLSelf(B);break;case 3:B=B.replace(/\|\*\|/g,"&");openURLSelf(B);}}function setFocus(A){try{$Base(A).focus();}catch(B){}}function unselectAllPanes(){var B;var C=true;var A=0;while(C){B=$Base("sitePane"+A);if(B){B.className="ItemTab";}else{C=false;}A=A+1;}}function markSelectedPane(C){var E;if(!(C)){var B=$Base("sitePaneSelected");if(B&&B.value!=""){C=B.value;}else{C=-1;}}if(C!=-1){var A=$Base("sitePane"+C);if(A){var G=A.href;if(G.indexOf("&timemilis=")>-1){A.href=G.substring(0,A.href.indexOf("&timemilis="))+"&timemilis="+(new Date()-1);}else{A.href=G+"&timemilis="+(new Date()-1);}}}var D=0;var F=true;while(F){E=$Base("sitePane"+D);if(E){if(D==C){E.className="TabSelect";}else{E.className="ItemTab";}}else{F=false;}D=D+1;}}function unmarkSelectedPaneField(){var A=$Base("sitePaneSelected");if(A){A.value=-1;}}function getSelectedPaneField(){return $Base("sitePaneSelected").value;}function fntTamTexto(B,C){var D=$Base(B);var A=D.style.fontSize;if(A==""){A="100%";}if(C){switch(A){case"100%":D.style.fontSize="120%";break;case"120%":D.style.fontSize="127%";break;default:D.style.fontSize="127%";break;}}else{switch(A){case"127%":D.style.fontSize="120%";break;case"120%":D.style.fontSize="100%";break;default:D.style.fontSize="100%";break;}}}function createExternalLinks(){if(!document.getElementsByTagName){return ;}var B=document.getElementsByTagName("a");for(var A=0;A<B.length;A++){if((B[A].getAttribute("href"))&&(B[A].getAttribute("rel")=="external")){B[A].onclick=function(){window.open(this.href);return false;};}}}function showPopupDialog(D,G,H,A){var B=screen.width;var E=screen.height;posTop=(E-H)/2;posLeft=((B-G)/2);var C=(new Date())-0;var F="scrollbars=";if(A){F=F+"yes";}else{F=F+"no";}popupDialogWindow=window.open(D,C,"width="+G+",height="+H+",left="+posLeft+",top="+posTop+", "+F);popupDialogWindow.focus();return popupDialogWindow;}function showSearchCep(){showPopupDialog(applicationURL+"/html/popupSearchCep.html","358px","370px",false);}var paramId="";var formDivContentAjax="";var divRedraw="";var showProcessing=false;var isExecuteViaAjax=false;var psmlIdForOpenPage;function doActionDefault(portletId,actionType,validateMandatory,valid){globalPortletId=portletId;showProcessing=true;formDivContentAjax=$Base("Form_PID_"+portletId).name;divRedraw="divForm_"+portletId;var actionMethod="";hiddenDivMessage(portletId);psmlIdForOpenPage=getProfilePsmlId();if(validateMandatory){valid=true;try{valid=eval("additionalValidation"+portletId+"('"+portletId+"')");}catch(e){}if(!defaultValidationForm(portletId)||!valid){return false;}}switch(actionType){case"SAVE":isExecuteViaAjax=true;actionMethod=eval("setActiondoSave"+portletId+"('"+portletId+"')");break;case"BACK":isExecuteViaAjax=false;actionMethod=eval("setActiondoBack"+portletId+"('"+portletId+"')");break;case"CLEAN":isExecuteViaAjax=true;try{actionMethod=eval("setActiondoClean"+portletId+"('"+portletId+"')");}catch(e){}try{doExtraFunction();}catch(e){}doCleanForm(getForm(portletId));if(""+actionMethod=="undefined"||actionMethod==""){return true;}break;case"SEARCH":isExecuteViaAjax=false;actionMethod=eval("setActiondoSearch"+portletId+"('"+portletId+"')");if(valid!="false"){if(!validateSize(portletId)){return false;}}break;case"NEW":isExecuteViaAjax=false;actionMethod=eval("setActiondoNew"+portletId+"('"+portletId+"')");break;case"DELETE":isExecuteViaAjax=true;actionMethod=eval("setActiondoDelete"+portletId+"('"+portletId+"')");break;case"VIEW":isExecuteViaAjax=false;actionMethod=eval("setActiondoView"+portletId+"('"+portletId+"')");break;case"EDIT":isExecuteViaAjax=false;actionMethod=eval("setActiondoEdit"+portletId+"('"+portletId+"')");break;case"CLOSE":isExecuteViaAjax=false;actionMethod=eval("setActiondoClose"+portletId+"('"+portletId+"')");break;case"RESULT":isExecuteViaAjax=false;actionMethod=eval("setActiondoResult"+portletId+"('"+portletId+"')");break;}if($Base(portletId+":isPopup").value=="true"){paramId+="&template=content&js_peid="+portletId;startPopupProcessing(portletId);}else{startProcessing();}if(isExecuteViaAjax){var url=encodeURI(insereTimeStamp(getURLToPopupProfileWithPortletId(psmlIdForOpenPage,portletId)+"&timemilis="+(new Date()-1)+"&eventSubmit_"+actionMethod+"=Ok")+paramId);freeDOMAjax.addRequest(url,populateDivContentAjax,$(formDivContentAjax));}else{document.getElementById("Form_PID_"+portletId).action=encodeURI(insereTimeStamp(returnLinkForPaneSelected(getURLToProfile(psmlIdForOpenPage)+"?eventSubmit_"+actionMethod+"=Ok"+paramId)));document.getElementById("Form_PID_"+portletId).submit();}paramId="";}function doSaveDefault(A){doActionDefault(A,"SAVE",true);}function doBackDefault(A){doActionDefault(A,"BACK",false);}function doCloseDefault(B){try{doActionDefault(B,"CLOSE",false);}catch(A){}window.close();}function doSearchDefault(A,B){paramId+="&pageRowOffset=0";doActionDefault(A,"SEARCH",true,B);}function doNewDefault(A){doActionDefault(A,"NEW",false);}function doCleanDefault(A){doActionDefault(A,"CLEAN",false);}function doDeleteDefault(A,B){if(B!=undefined&&B!=""){paramId+="&paramId="+B;}doActionDefault(A,"DELETE",false);}function doViewDefault(A,B){paramId+="&paramId="+B;doActionDefault(A,"VIEW",false);}function doResultDefault(A,B){paramId+="&paramId="+B;doActionDefault(A,"RESULT",false);}function doEditDefault(B,A){if(A!=undefined&&A!=""){paramId+="&paramId="+A;}doActionDefault(B,"EDIT",false);}function disableBuildNormalContext(A){$Base(A+":executeBuildNormalContext").value="false";}function enableBuildNormalContext(A){$Base(A+":executeBuildNormalContext").value="true";}var openerSearchWindow;function validatePopupBlur(){if(openerSearchWindow){openerSearchWindow.self.focus();}}function openDefaultSearchPopup(popupToOpen,addParam){var pWitdh="500";var pHeigth="450";try{pWitdh=eval("pWitdhLocal"+popupToOpen);pHeigth=eval("pHeigthLocal"+popupToOpen);}catch(e){}openerSearchWindow=showPopupDialog(insereTimeStamp(getURLToPopupProfile(popupToOpen))+addParam,pWitdh,pHeigth);}function populateOpenerFields(portletId,pHiddenName,pFieldName,hiddenValue,fieldValue){$Base(portletId+":"+pFieldName).value=fieldValue;$Base(portletId+":"+pHiddenName).value=hiddenValue;try{eval("doAnotherThings"+portletId+"('"+portletId+"')");}catch(e){}$Base(portletId+":"+pFieldName).focus();}function execJS(node){var bSaf=(navigator.userAgent.indexOf("Safari")!=-1);var bOpera=(navigator.userAgent.indexOf("Opera")!=-1);var bMoz=(navigator.appName=="Netscape");var st=node.getElementsByTagName("SCRIPT");var strExec;for(var i=0;i<st.length;i++){if(bSaf){strExec=st[i].innerHTML;}else{if(bOpera){strExec=st[i].text;}else{if(bMoz){strExec=st[i].textContent;}else{strExec=st[i].text;}}}try{eval(strExec);}catch(e){}}}function populateDivContentAjax(){try{if(freeDOMAjax.currentRequest.readyState==4){if(freeDOMAjax.currentRequest.status==200){obj=freeDOMAjax.currentRequest.responseText;document.getElementById(divRedraw).innerHTML=getElementById(divRedraw,obj).innerHTML;execJS(document.getElementById(divRedraw));}else{document.getElementById(divRedraw).innerHTML="<p>Opera&ccedil;&atilde;o falhou. Tente novamente.</p>";}}}catch(A){}divRedraw="";}function getElementById(D,B){var C=document.createElement("div");C.innerHTML=B;var A=C.getElementsByTagName("div");for(i=0;i<A.length;i++){if(A[i].getAttribute("id")==D){return A[i];}}return C;}function doPrint(A){window.open(getSiteWebroot()+A,"popUpPrint","width=700,height=540,scrollbars=1");return false;}function cleanField(A){A.value="";}function disableProcessingMessage(){document.getElementById("DivProcessing").style.display="none";}function viaHrefAjax(A){showProcessing=false;freeDOMAjax.addRequest(A,populateDivContentAjax);}var psmlIdValue;var nameFieldCityValue;var cmbStateValue;var oldPsmlId;function doComboCitiesByState(B,A,F,D,C){psmlIdValue=D;nameFieldCityValue=B;cmbStateValue=A;oldPsmlId=getProfilePsmlId();var E=insereTimeStamp(getURLToPopupProfile(D))+"&eventSubmit_doCompoCitiesByState=ok&defaultAction=false&cmbState="+A+"&selectedCityId="+F+"&nameFieldCity="+B+"&mandatory="+C;divRedraw="div"+B;freeDOMAjax.addRequest(E,functionCallBackAjax);}function functionCallBackAjax(){populateDivContentAjax();$Base("profilePsmlId").value=oldPsmlId;var C="POPUP_"+psmlIdValue+":"+nameFieldCityValue;var B=document.getElementById(C);if(cmbStateValue!=""&&cmbStateValue!="-1"){B.removeAttribute("disabled");return ;}else{var A=document.createAttribute("disabled");A.nodeValue="true";B.setAttributeNode(A);}}function doOtherPageDefault(pagingControlName,pgNumber,portletId,menuId,divToUpdate){if(pagingControlName==""){pagingControlName="pageRowOffset";}var url=insereTimeStamp(getProfileURLToPopup(portletId)+"&timemilis="+(new Date()-1)+"&"+pagingControlName+"="+pgNumber+"&eventSubmit_doOtherPage=Ok&"+portletId+":executeBuildNormalContext=false&isPagging=true");try{url+=eval("setOtherPageParams"+portletId+"('"+portletId+"')");}catch(e){}divRedraw=divToUpdate;viaHrefAjax(encodeURI(url));}function deleteItemList(H,F,A){if(document.getElementById(H).selectedIndex>=0){var E=document.getElementById(H);var C=E.selectedIndex;var D=E[C].value;var G=E[C].text;var B="doDeleteDefault('"+A+"' , '"+D+"','1');";confirm(F+" "+G+" ?",B);}}function alterarOrdem(F,B){B=parseInt(B);var E=document.getElementById(F);var D=E.selectedIndex;if(D!=-1){if(!(D==0&&B==-1||D==(E.length-1)&&B==1)){var C=E[D+B].value;var A=E[D+B].text;E[D+B]=new Option(E[D].text,E[D].value);E[D]=new Option(A,C);E[D+B].selected=true;}}}function updateButtonLabel(B,A){$Base("btn"+B).value=A;}function openPopupImageSearch(B,A){showPopupDialog(getURLToPopupProfile(B)+"&defaultAction=true&popup=true&timemillis="+new Date()+A,510,380);}function getCaretPos(A){if(typeof A.selectionEnd!="undefined"){return A.selectionEnd;}else{if(document.selection){return Math.abs(document.selection.createRange().moveStart("character",-1000000));}}}function removeAspasField(B){var A=B.value;A=A.replace(/\'/g,"");A=A.replace(/\"/g,"");B.value=A;}function removeAll(C){var A=C.length;for(var B=0;B<=A;B++){C.remove(A-B);}}function removeAccents(F){var D="çÇáéíóúýÁÉÍÓÚÝàèìòùÀÈÌÒÙãõñäëïöüÿÄËÏÖÜÃÕÑâêîôûÂÊÎÔÛ´`^~¨";var E="cCaeiouyAEIOUYaeiouAEIOUaonaeiouyAEIOUAONaeiouAEIOU     ";var A;var C;var G="";for(var B=0;B<F.value.length;B++){C=F.value.charAt(B);A=D.indexOf(C);if(A>-1){G+=E.charAt(A);}else{G+=F.value.charAt(B);}}F.value=G;return G;}function documentContentSearch(D,A,E){var C=$Base("P_SEARCH_RESULT:siteSearchTxtField").value;if(C.trim()!=""&&C.trim().length>=globalMinSizeSearch){unselectAllPanes();startProcessing();var B=getSiteWebroot()+"/sicredi/psmlId/"+D+"?isContentSearch=true&defaultAction=false&eventSubmit_doSearch=Ok&menuId="+E+"&timemilis="+(new Date()-1);B=B+"&siteSearchTxtField="+encodeURIComponent(C);location.href=B+"&paneSelected=N";}else{A=A+".";alert(A,"POPUP_ALERT");}}function removeAttributeHref(){var A=document.links;var B=A.length;for(n=0;n<B;n++){l=A[0];l.removeAttribute("href");}}function goToInitialPage(){location.href=getSiteWebroot()+"index.jsp";}function hideComboBox(){if(typeof document.body.style.maxHeight=="undefined"){var C=document.getElementsByTagName("select");var B;for(var D=0;D<C.length;D++){B=C[D];try{var A=B.owner.calendar;}catch(E){B.style.display="none";}}}}function showComboBox(){if(typeof document.body.style.maxHeight=="undefined"){var C=document.getElementsByTagName("select");var B;for(var D=0;D<C.length;D++){B=C[D];try{var A=B.owner.calendar;}catch(E){B.style.display="";}}}}function doBackGeneric(A,C){if(A=="false"){var B=getElementByName("psmlToBack").value;if(B==""){history.back(-1);}else{backToIgnoreNavHist(B,"0");}}else{doBackDefault(C);}}
