function Show(obj){$(obj).show('fast')}function Hide(obj){$(obj).hide('fast')}function Exibe(obj){$(obj).css({display:'block'})}function Oculta(obj){$(obj).css({display:'none'})}function FadeIn(obj){$(obj).fadeIn('slow')}function FadeOut(obj){$(obj).fadeOut('slow')}function FadeToggle(obj){$(obj).animate({opacity:'toggle'},'slow')}function SlideDown(obj){$(obj).slideDown('slow')}function SlideUp(obj){$(obj).slideUp('slow')}function SlideToggle(obj){$(obj).slideToggle('normal')}function Move(obj,t){var T=parseInt(t);$(obj).animate({top:T},500)}function Preenche(obj,valor){$(obj).val(valor)}function ChangeClass(obj,a,v){$(obj).css(a,v)}function ChangeAttr(obj,a,v){$(obj).attr(a,v)}function ShowHide(obj){$(obj).toggle()}function MudaClass(obj,classObj){$(obj).toggleClass(classObj)}function RemoveAddClass(obj,rc,ac){$(obj).removeClass(rc).addClass(ac)}function SlideToggleBtn(obj,btn,classBtn){$(obj).slideToggle('normal');$(btn).toggleClass(classBtn)}function SlideUpBtn(obj,btn,rc,ac){$(obj).slideUp('slow');$(btn).removeClass(rc).addClass(ac)}function RemoveAddClass(obj,rc,ac){$(obj).removeClass(rc).addClass(ac)}function MudaBtn(obj,classBtn){$(obj).toggleClass(classBtn)}function GrowLowerBox(obj){$(obj).toggle(function(){$(obj).animate({width:800},500)},function(){$(obj).animate({width:800},500)})}function GrowBox(obj,w){var w=parseInt(w);$(obj).animate({width:w},500)}function Link(obj,linkurl){$(obj).load(linkurl)}var mUserPassword=new Array();function AddPassword(vPartialPassword){mUserPassword.push(vPartialPassword);document.getElementById('ctl00_Header1_hdPass').value=mUserPassword.toString();if(mUserPassword.toString().length>=12){document.getElementById('ctl00_Header1_btnEntrar').disabled='';document.getElementById('ctl00_Header1_btnEntrar').setAttribute("class","INP_ok");document.getElementById('ctl00_Header1_btnEntrar').setAttribute("className","INP_ok")}var vtxtCount=document.getElementById('txtCountPass');vtxtCount.value=vtxtCount.value+'*'}function ClearPassword(vHide){mUserPassword=new Array();document.getElementById('ctl00_Header1_hdPass').value='';document.getElementById('ctl00_Header1_btnEntrar').disabled='disabled';document.getElementById('txtCountPass').value='';document.getElementById('ctl00_Header1_btnEntrar').setAttribute("class","INP_ok_off");document.getElementById('ctl00_Header1_btnEntrar').setAttribute("className","INP_ok_off")}function CarregaTecladoVirtual(){var vtxtLogin=window.document.getElementById('wcMenu1_wcMenu1_txtLogin');if(vtxtLogin==null){vtxtLogin=window.document.getElementById('ctl00_wcMenu1_wcMenu1_txtLogin')};if((vtxtLogin==undefined)||(vtxtLogin.value=='')||(vtxtLogin.value=='LOGIN')){alert('Infome seu login!');vtxtLogin.value='LOGIN';return false}else{return true}}function onDropWidget(sender,e){if(sender!=null){WidgetService.MoverWidget(parseInt(sender.getAttribute("InstanceId")),sender.offsetLeft,sender.offsetTop,sender.offsetWidth,sender.offsetHeight,sender.style.zIndex)}}function onMouseOver(vImagem){vImagem.src=vImagem.src.replace(".gif","_highlight.gif")}function onMouseOut(vImagem){vImagem.src=vImagem.src.replace("_highlight.gif",".gif")}function BringFront(div,o){if(o!=undefined){var vArraySplit=o.value.toString().split("!##!");var vHdnUltimoZIndex=document.getElementById(vArraySplit[2].toString());if(vHdnUltimoZIndex.value==null||vHdnUltimoZIndex.value==""||vHdnUltimoZIndex.value==undefined){vHdnUltimoZIndex.value=0}if(div!=undefined){div.display='block';div.style.zIndex=parseInt(vHdnUltimoZIndex.value)+1;vHdnUltimoZIndex.value=parseInt(div.style.zIndex)}}}function Popup(url){window.open(url,"Popup","width=400,height=500,left=200,top=100,toolbar=no,menubar=no,resizable=no,scrollbars=no")}var vhdnControlesMove;function DragStart(e,o){var vArraySplit=o.value.toString().split("!##!");var vTR=document.getElementById(vArraySplit[0].toString());e=DragFixE(e);vTR.lastMouseX=e.clientX;vTR.lastMouseY=e.clientY;vhdnControlesMove=o.id;document.onmousemove=Drag;document.onmouseup=DragEnd;return false}function Drag(e){var vArraySplit=document.getElementById(vhdnControlesMove).value.toString().split("!##!");var vTR=document.getElementById(vArraySplit[0].toString());var vPnl=document.getElementById(vArraySplit[1].toString());vPnl.style.zIndex=999999999999999999999999;e=DragFixE(e);var newX=parseInt(vPnl.style.left)+e.clientX-vTR.lastMouseX;var newY=parseInt(vPnl.style.top)+e.clientY-vTR.lastMouseY;vPnl.style.left=newX+"px";vPnl.style.top=newY+"px";vTR.lastMouseX=e.clientX;vTR.lastMouseY=e.clientY;return false}var MaxZindex;function DragEnd(e){var vArraySplit=document.getElementById(vhdnControlesMove).value.toString().split("!##!");var vPnl=document.getElementById(vArraySplit[1].toString());var vHdnUltimoZIndex=document.getElementById(vArraySplit[2].toString());var vHDNWidgetsToSave=document.getElementById('hdnWidgetsToSave');e=DragFixE(e);document.onmousemove=null;document.onmouseup=null;if(vHdnUltimoZIndex.value==null||vHdnUltimoZIndex.value==""||vHdnUltimoZIndex.value==undefined){vHdnUltimoZIndex.value=0}vPnl.style.zIndex=parseInt(vHdnUltimoZIndex.value)+1;vHdnUltimoZIndex.value=parseInt(vPnl.style.zIndex);if(vHDNWidgetsToSave.value.indexOf(vPnl.attributes.getNamedItem('InstanceId').value)==-1){vHDNWidgetsToSave.value=vHDNWidgetsToSave.value+vPnl.attributes.getNamedItem('InstanceId').value+';'}if(mCodTimeout!=0){clearInterval(mCodTimeout);mCodTimeout=setInterval("SaveWidgetsTime()",10000)}vhdnControlesMove=""}var mCodTimeout;function SaveWidgetsTime(){var vElements=document.getElementById('hdnWidgetsToSave').value.split(';');if(vElements.length>1){for(var i=0;i<vElements.length-1;i++){document.getElementById('hdnWidgetsToSave').value=document.getElementById('hdnWidgetsToSave').value.replace(vElements[i]+';','');if(document.getElementById('FWidgetContainer'+vElements[i]+'_pnlWidget')!=null){onDropWidget(document.getElementById('FWidgetContainer'+vElements[i]+'_pnlWidget'),null)}}if(document.getElementById('hdnWidgetsToSave').value==""|document.getElementById('hdnWidgetsToSave').value==";"){document.getElementById('hdnWidgetsToSave').value="";clearInterval(mCodTimeout);mCodTimeout=0}}}function DragFixE(e){if(typeof e=='undefined')e=window.event;return e}function ResizeStart(e,o){var vArraySplit=o.value.toString().split("!##!");var vDiv=document.getElementById(vArraySplit[2].toString());var vPnlBody=document.getElementById(vArraySplit[3].toString());e=ResizeFixE(e);vDiv.lastMouseX=e.clientX;vDiv.lastMouseY=e.clientY;vhdnControlesMove=o.id;document.onmousemove=Resize;document.onmouseup=ResizeEnd;vPnlBody.style.bgcolor="red";return false}function Resize(e){var vArraySplit=document.getElementById(vhdnControlesMove).value.toString().split("!##!");var vDiv=document.getElementById(vArraySplit[2].toString());var vPnlWidget=document.getElementById(vArraySplit[1].toString());var vPnlBody=document.getElementById(vArraySplit[3].toString());e=ResizeFixE(e);var vDefaultWidth=vPnlBody.getAttribute("DefaultWidth");var vDefaultHeight=vPnlBody.getAttribute("DefaultHeight");var newWidth=Math.max((parseInt(vPnlBody.style.width))+(e.clientX-vDiv.lastMouseX),vDefaultWidth);var newHeight=Math.max((parseInt(vPnlBody.style.height))+(e.clientY-vDiv.lastMouseY),vDefaultHeight);if(vPnlBody.getAttribute("EnableResizerX")=="True"){if(newWidth<vDefaultWidth){vPnlBody.style.width=vDefaultWidth+"px";vPnlWidget.style.width=vDefaultWidth+"px"}else{vPnlBody.style.width=newWidth+"px";vPnlWidget.style.width=newWidth+"px"}}if(vPnlBody.getAttribute("EnableResizerY")=="True"){if(newHeight<vDefaultHeight){vPnlBody.style.height=vDefaultHeight+"px";vPnlWidget.style.height=vDefaultHeight+"px"}else{vPnlBody.style.height=newHeight+"px";vPnlWidget.style.height=newHeight+"px"}}vDiv.lastMouseX=e.clientX;vDiv.lastMouseY=e.clientY;return false}var MaxZindex;function ResizeEnd(e){var vArraySplit=document.getElementById(vhdnControlesMove).value.toString().split("!##!");var vPnl=document.getElementById(vArraySplit[1].toString());var vHdnUltimoZIndex=document.getElementById(vArraySplit[2].toString());var vHDNWidgetsToSave=document.getElementById('hdnWidgetsToSave');var vPnlBody=document.getElementById(vArraySplit[3].toString());e=ResizeFixE(e);document.onmousemove=null;document.onmouseup=null;if(vHdnUltimoZIndex.value==null||vHdnUltimoZIndex.value==""||vHdnUltimoZIndex.value==undefined){vHdnUltimoZIndex.value=0}vPnl.style.zIndex=parseInt(vHdnUltimoZIndex.value)+1;vHdnUltimoZIndex.value=parseInt(vPnl.style.zIndex);if(vHDNWidgetsToSave.value.indexOf(vPnl.attributes.getNamedItem('InstanceId').value)==-1){vHDNWidgetsToSave.value=vHDNWidgetsToSave.value+vPnl.attributes.getNamedItem('InstanceId').value+';'}SaveWidgetsTime();vhdnControlesMove=""}function ResizeFixE(e){if(typeof e=='undefined')e=window.event;return e}function AbrirJanela(caminho){window.open(caminho)}function right(e){if(navigator.appName=='Netscape'&&(e.which==3||e.which==2))return false;else if(navigator.appName=='Microsoft Internet Explorer'&&(event.button==2||event.button==3)){}return true}document.onmousedown=right;if(document.layers)window.captureEvents(Event.MOUSEDOWN);window.onmousedown=right;function VerificarEnter(){var tecla=window.event.keyCode;if(tecla==13){event.keyCode=9}}function mascara(o,f){v_obj=o;v_fun=f;setTimeout("execmascara()",1)}function execmascara(){v_obj.value=v_fun(v_obj.value)}function checaNum(valor){return valor.replace(/[^a-zA-Z ]/,"")}function mascaraNumerica(o,f){v_obj=o;v_fun=f;setTimeout("execmascaraNumerica()",1)}function execmascaraNumerica(){v_obj.value=v_fun(v_obj.value)}function checaNumNumerica(valor){return valor.replace(/[^0-9 ]/,"")}function XPTVPlayVideo(vObjVideo,vVideo,vObjTitulo,vTitulo,vObjData,vData,vObjDescricao,vDescricao){if(vVideo!=""){document.getElementById(vObjVideo).innerHTML=('<object width="335px" height="277px">'+'<param name="movie" value="'+vVideo+'"></param>'+'<param name="allowFullScreen" value="true"></param>'+'<embed src="'+vVideo+'" type="application/x-shockwave-flash" allowfullscreen="true" width="335px" height="277px"></embed>'+'</object>');document.getElementById(vObjTitulo).innerHTML=vTitulo;document.getElementById(vObjData).innerHTML=vData;document.getElementById(vObjDescricao).innerHTML=vDescricao}else{document.getElementById(vObjVideo).innerHTML="Vídeo indisponível no momento";document.getElementById(vObjTitulo).innerHTML="";document.getElementById(vObjData).innerHTML="";document.getElementById(vObjDescricao).innerHTML=""}}function ValidarChekBoxList(vChk){var vChkList=document.getElementById(vChk);var aControls=vChkList.getElementsByTagName("input");var vRetorno=false;if(aControls){for(var i=0;i<aControls.length;i++){if(aControls[i].checked==true){vRetorno=true;break}vUltimoInput=aControls[i]}}return vRetorno}function retiraAcento(obj){var objText=document.getElementById(obj);var palavra=objText.value;var com_acento='áàãâäéèêëíìîïóòõôöúùûüçÁÀÃÂÄÉÈÊËÍÌÎÏÓÒÕÖÔÚÙÛÜÇ';var sem_acento='aaaaaeeeeiiiiooooouuuucAAAAAEEEEIIIIOOOOOUUUUC';var nova='';for(i=0;i<palavra.length;i++){if(com_acento.search(palavra.substr(i,1))>0){nova+=sem_acento.substr(com_acento.search(palavra.substr(i,1)),1)}else{nova+=palavra.substr(i,1)}}objText.value=nova}function chamar (ancora) {this.location = "#" + ancora;}

