function $(a){return document.getElementById(a)}String.prototype.trim=function(){return this.replace(/^\s*/,"").replace(/\s*$/,"")};function submitOnEnter(a){var b;if(window.event){b=window.event.keyCode}else{if(a.which){b=a.which}else{return false}}if(b==13){return true}else{return false}}function getInputByEnding(d,a){var c=d.getElementsByTagName("input");var b;if(c!=null&&c.length>0){for(i=0;i=b.length&&a.substr(a.length-b.length)==b}function forceSubmit(b){var c=document.getElementsByTagName("input");var a;if(c!=null&&c.length>0){for(i=0;i0){for(i=0;ia){b.value=b.value.substring(0,a)}}function submitAndCheck(a){testPopUp();forceSubmit(a)}function forceCaptchaRefresh(a){document.getElementById("subViewContractDetails:iceForm:captchaRandomImage").src="/captcha?"+a;return false}function putWarning(b,a){if(b.value==null||b.value==""){b.value=a}}function removeWarning(b,a){if(b.value==a){b.value=""}}function matches(c,b){var d=new RegExp(b,"gi");var a=c.match(d);return a.split(",").lenght}function testPassword(c,a,d){var b=0;if(c.length>0){if(c.length<5){b=(b+3)}else{if(c.length>4&&c.length<8){b=(b+6)}else{if(c.length>7){b=(b+18)}}}if(c.match(/[a-z]/)){b=(b+1)}if(c.match(/[A-Z]/)){b=(b+5)}if(c.match(/\d+/)){b=(b+5)}if(c.match(/(.*[0-9].*[0-9].*[0-9])/)){b=(b+5)}if(c.match(/.[!,@,#,$,%,^,&,*,?,_,~]/)){b=(b+5)}if(c.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)){b=(b+5)}if(c.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)){b=(b+2)}if(c.match(/([a-zA-Z])/)&&c.match(/([0-9])/)){b=(b+2)}if(c.match(/([a-zA-Z0-9].*[!,@,#,$,%,^,&,*,?,_,~])|([!,@,#,$,%,^,&,*,?,_,~].*[a-zA-Z0-9])/)){b=(b+2)}}setProgressBar(b,a,d)}function setProgressBar(d,a,b){var e=document.getElementById(b);var c=document.getElementById(a);e.style.width=(d*2)+"%";if(d==0){e.style.display="none";c.style.display="none";return}else{e.style.display=null;c.style.display=null}if(d>39){e.style.backgroundColor="#3bce08";c.style.border="1px solid #ccc";return}if(d>29){e.style.backgroundColor="orange";c.style.border="1px solid #ccc";return}if(d<19&&d>0){e.style.backgroundColor="red";c.style.border="1px solid #ccc";return}}function toogleChildVisibility(b){var a=document.getElementById(b).childNodes[0];if(a.style.display=="none"){a.style.display="inline"}else{a.style.display="none"}}function toogleVisibility(b){var a=document.getElementById(b);if(a.style.display=="none"){a.style.display="inline"}else{a.style.display="none"}}function isVisible(b){var a=document.getElementById(b);return a.style.display!="none"}function toogleClass(d,a,b){var c=document.getElementById(d);if(c.className==a){c.className=b}else{c.className=a}}var tooltip=function(){var g="tt";var d=3;var f=-265;var m=300;var j=10;var q=20;var k=95;var n=0;var o,l,a,r,p;var e=document.all?true:false;return{show:function(c,b){if(o==null){o=document.createElement("div");o.setAttribute("id",g);l=document.createElement("div");l.setAttribute("id",g+"top");a=document.createElement("div");a.setAttribute("id",g+"cont");r=document.createElement("div");r.setAttribute("id",g+"bot");o.appendChild(l);o.appendChild(a);o.appendChild(r);document.body.appendChild(o);o.style.opacity=0;o.style.position="absolute;";o.style.filter="alpha(opacity=0)";document.onmousemove=this.pos}o.style.display="block";a.innerHTML=c;o.style.width=b?b+"px":"auto";if(!b&&e){l.style.display="block";r.style.display="block";o.style.width=o.offsetWidth;l.style.display="block";r.style.display="block"}if(o.offsetWidth>m){o.style.width=m+"px"}p=parseInt(o.offsetHeight)+d;clearInterval(o.timer);o.timer=setInterval(function(){tooltip.fade(1)},q)},pos:function(b){var h=e?event.clientY+document.documentElement.scrollTop:b.pageY;var c=e?event.clientX+document.documentElement.scrollLeft:b.pageX;o.style.top=(h-p)+"px";o.style.left=(c+f)+"px"},fade:function(b){var h=n;if((h!=k&&b==1)||(h!=0&&b==-1)){var c=j;if(k-h"+this.point.name+": "+this.y+" %"}},plotOptions:{pie:{allowPointSelect:true,cursor:"pointer",dataLabels:{enabled:true,formatter:function(){if(this.y>5){return""+this.point.name+""}},color:"#333333",style:{font:"12px Trebuchet MS, Verdana, sans-serif"}}}},legend:{enabled:false,layout:"vertical",style:{display:"none",left:"auto",bottom:"auto",right:"50px",top:"100px"}},series:[{type:"pie",name:"Perfil Estatistico",data:d}]})})}function doLogin(c,k,h,b,j){var f=document.getElementById("f_username");var d=document.getElementById("f_password");var e=document.getElementById("f_defaultFailureUrl");var a=document.getElementById("f_redirectSuccessUrl");f.value=c.value;d.value=k.value;e.value=h;a.value=b;var g=document.getElementById(j);g.submit()}function doLoginCaptcha(d,m,k,c,l,a){var g=document.getElementById("f_username");var e=document.getElementById("f_password");var f=document.getElementById("f_defaultFailureUrl");var b=document.getElementById("f_redirectSuccessUrl");var j=document.getElementById("f_captcha");g.value=d.value;e.value=m.value;f.value=k;b.value=c;j.value=a.value;var h=document.getElementById(l);h.submit()}function hasClass(a,b){var c;if(a&&a.className&&typeof b==="string"){c=a.getAttribute("class");c=" "+c+" ";return c.indexOf(" "+b+" ")>-1}else{return false}}function getTarget(a){if(a.target!=undefined){return a.target}else{return a.srcElement}}function outSideEvent(b,f,d){var g=false;if(b==undefined){return false}var a=getTarget(b);for(;a!=document.body||a==null;a=a.parentNode){if(f.length!=null){for(var e=0;e