function imprimirLista(e,t){var a="";void 0!=t&&(a+=","+t.toLowerCase()),toNewFrame(null,"finalizar","encaminhar,/common/system/impressaoListaParam.jsp,"+e+a,"width=620,height=350,scrolling=no")}function restaurarMarcadas(e){for(var t,a=document.getElementsByName(e+"Selected"),c=0;cgetMaxTop(c)&&(r=c.scrollTop+(getTopVlr(e)+e.offsetHeight-getMaxTop(c))),c.scrollTop=r,c=document.getElementById(a);var o=c.scrollLeft;if(e.offsetWidth<=c.offsetWidth)e.offsetLeftgetMaxLeft(c)&&(o=c.scrollLeft+(e.offsetLeft+e.offsetWidth-getMaxLeft(c)));else{var l=!0;"right"==e.align&&(l=!1),o=l?e.offsetLeft:c.scrollLeft+(e.offsetLeft+e.offsetWidth-getMaxLeft(c))}c.scrollLeft=o;var i=document.getElementById("_cellFoco");i||(i=document.createElement("a"),i.id="_cellFoco",i.href="#",i.innerHTML=" ",i.style.cssText="position:absolute; font-size:1px;",i.onblur=new Function("this.parentNode.className = '';")),i.parentNode&&(i.parentNode.className="",i=i.parentNode.removeChild(i)),e.style.position="relative",e.appendChild(i),t?(i.focus(),e.className="celulaSelecionada"):setTimeout("document.getElementById('"+i.id+"').focus(); document.getElementById('"+e.id+"').className = 'celulaSelecionada';",0)}}function selectCell(e){var t=arguments[1];setFocusCell(e,t);var a=e.parentNode;if("linhaSelecionada"!=a.className){var c=e.id.substring(e.id.indexOf("_")+1);restaurarSelecionada(c),oRadio=getChild(a,"radio"),oRadio&&(oRadio.checked=!0),a.className="linhaSelecionada",null!=_selectEvent&&(clearTimeout(_selectEvent),_selectEvent=null),t?_selectEvent=setTimeout("execSelectEvent('"+c+"');",300):execSelectEvent(c)}}function checkCell(e,t){var a=t.keyCode,c=!1;if(a>=37&&40>=a){var r=parseInt(e.id.substring(0,e.id.indexOf(","))),o=parseInt(e.id.substring(e.id.indexOf(",")+1,e.id.indexOf("_")));switch(a){case 38:r--;break;case 40:r++;break;case 37:o--;break;case 39:o++}e=document.getElementById(r+","+o+"_"+e.id.substring(e.id.indexOf("_")+1)),e&&selectCell(e,!0)}else c=!0;return c}function marcarTodos(obj,sGrid){obj.checked?fastSubmit(null,"marcarTodos",sGrid,obj.id,checkUnCheck):(eval("document.form."+sGrid+'Marcados.value = "";'),unCheckAll(sGrid))}function checkUnCheck(req){var sCheck=trim(req.responseText);if(-1!=sCheck.indexOf(",")){var grid=sCheck.substring(0,sCheck.indexOf(",")),marcados=sCheck.substring(sCheck.indexOf(","));eval("document.form."+grid+'Marcados.value = "'+marcados+'";'),""==marcados?unCheckAll(grid):checkAll(grid)}}function checkAll(sGrid){for(var aCheck=document.getElementsByName(sGrid+"Check"),i=0;i