var comp;function form_load(){var a=document.getElementById("_idJsp1:ae_enforceRefresh");if(a!=null&&a.value=="true")a.value="false",(a=document.getElementById("_idJsp1:ae_refresh_button"))&&a.click();resizeui();window.errormsg&&errormsg!=null&&errormsg!=""&&(alert(errormsg),errormsg="")}
function resizeui(){if(window==window.parent&&window.restoreWinSize){if(window.pagewidth){window.resizeTo(pagewidth,pageheight);window.resizeTo(Number(pagewidth)+Number(pagewidth-document.body.clientWidth),Number(pageheight)+Number(pageheight-document.body.clientHeight));var a=(screen.height-pageheight)/2,b=(screen.width-pagewidth)/2;a<0&&(a=0);b<0&&(b=0);window.moveTo(b,a)}window.document.getElementById("_idJsp1:ae_reserved_field_restoreSize").value=!1}}
function loadpopcontent(){str=location.href.split("?")[1];if(str!=null)for(var a=str.split("&"),b=0;b<a.length;b++)if(paraName=a[b].split("=")[0],paraValue=a[b].split("=")[1],b==0&&(comp="_idJsp1:"+paraValue),b==1)popcontent.location=paraValue;if(window.titlename)window.document.title=titlename}function confirmPrompt(){pf=window.opener.document.getElementById("_idJsp1:promptField");var a=window.frames.popcontent.document.getElementById("_idJsp1:promptvalue");pf.value=a.value}
function openPop(a){window.open(a)}function submitToNewWin(a,b){var c=!0;arguments.length>=2&&(c=verifingBeforeButtonPerform(b));c&&document.getElementById(a).click()}function changeTableChecked(a,b){b?selectAll(a):unSelectAll(a)}function selectAll(a){a=document.getElementById(a).tBodies[0].rows;if(a.length>1)for(var b=0;b<a.length;b++)a[b].cells[0].firstChild.checked=!0}
function unSelectAll(a){a=document.getElementById(a).tBodies[0].rows;if(a.length>1)for(var b=0;b<a.length;b++)a[b].cells[0].firstChild.checked=!1}
function checkNum(a,b){var b=formatEvent(b),c=a.document.selection.createRange().text,d=a.document.selection.createRange();d.moveStart("character",-b.srcElement.value.length);var e="0123456789.-";if(!(a.value.length==0||a.value.length==c.length)){d.text.length<=0&&a.value.substr(0,1)=="-"&&(e=e.replace("0123456789.",""));if(d.text.length>0||a.value.substr(0,1)=="-")e=e.replace("-","");a.value.indexOf(".")>-1&&(e=e.replace(".",""))}if(window.event.keyCode==32)return!1;c=String.fromCharCode(b.charCode);
return e.indexOf(c)>-1||b.ctrlKey}
function checkInt(a,b){var b=formatEvent(b),c=a.document.selection.createRange().text,d=a.document.selection.createRange();d.moveStart("character",-b.srcElement.value.length);var e="0123456789-";if(!(a.value.length==0||a.value.length==c.length))if(d.text.length<=0&&a.value.substr(0,1)=="-"&&(e=e.replace("0123456789","")),d.text.length>0||a.value.substr(0,1)=="-")e=e.replace("-","");if(window.event.keyCode==32)return!1;c=String.fromCharCode(b.charCode);return e.indexOf(c)>-1||b.ctrlKey}
function formatEvent(a){a.charCode=a.type=="keypress"?a.keyCode:0;a.eventPhase=2;a.isChar=a.charCode>0;a.pageX=a.clientX+document.body.scrollLeft;a.pageY=a.clientY+document.body.scrollTop;a.preventDefault=function(){this.returnValue=!1};a.stopPropagating=function(){this.cancelBubble=!0};a.target=a.srcElement;a.time=(new Date).getTime();return a}function setZero(a){if((new String(a.value)).length==0)a.value=0}
function startEditingNum(a,b){var c=document.getElementById(b);if(c){if(c.value=="")c.value="0";if(a)a.style.visibility="hidden",a.style.display="none";c.style.visibility="visible";c.style.display="block";c.select();c.focus()}}function stopEditingNum(a,b){var c=document.getElementById(b);c.innerText=a.value==0?"":a.value;if(a)a.style.visibility="hidden",a.style.display="none";if(c)c.style.visibility="visible",c.style.display="block"}
function closeForm(a){window.top.moveTo(-200,-200);window.top.resizeTo(100,100);a!=null&&alert(a);window.top.close()}function startEditing(a,b){var c=document.getElementById(b);if(c){if(a)a.style.visibility="hidden",a.style.display="none";c.style.visibility="visible";c.style.display="block";c.select();c.focus()}}
function stopEditing(a,b){var c=document.getElementById(b);c.innerText=a.value;if(a)a.style.visibility="hidden",a.style.display="none";if(c)c.style.visibility="visible",c.style.display="block"}function changeTableStyle(a){var b=a.className,c=b.indexOf("_select");if(!(b.indexOf("_selected")>0))a.className=c<0?b+"_select":b.substring(0,c)}var oldRow=[],oldIndex=[];
function selectTableRow(a,b,c){if(oldRow[b]!=null)oldRow[b].className=oldIndex[b]%2==0?"aetableline":"aetableevenline";oldRow[b]=a;oldIndex[b]=c;a.className="aetableline_selected"}function invokeRowSelection(a){document.getElementById(a).click()}function selectRadio(a,b){document.getElementById("_idJsp1:"+a+":"+b+":"+a+"_selId").checked="checked"}
function selectCheckBox(a,b,c){var a=document.getElementById("_idJsp1:"+a),d=a.tBodies[0].rows,c=d[b%c];c.cells[0].firstChild.checked=!c.cells[0].firstChild.checked;b=!0;if(c.cells[0].firstChild.checked===!0)for(c=0;c<d.length;c++){if(d[c].cells[0].firstChild.checked===!1){b=!1;break}}else b=!1;a.rows[0].cells[0].firstChild.checked=b}function selectInput(a){document.getElementById("_idJsp1:"+a).select()}function stopBubble(a){a&&a.stopPropagation?a.stopPropagation():window.event.cancelBubble=!0}
function toSplitSggBoxValue(a,b,c){ss=document.getElementById("_idJsp1:"+a).value.split(c);document.getElementById("_idJsp1:"+a).value=ss[0];document.getElementById("_idJsp1:"+b).value=ss[1];return!0}function clearSggBoxValue(a,b){if(document.getElementById("_idJsp1:"+a).value=="")document.getElementById("_idJsp1:"+b).value=""}panelcollapse=function(){};panelexpand=function(){};extjspageInit=function(){};function collapseAll(a){collapse(window["Richfaces_Tree__idJsp1_"+a].childs)}
function expandAll(a){expand(window["Richfaces_Tree__idJsp1_"+a].childs)}function expandAllByTree(a){expand(a.childs)}function collapse(a){for(var b=0;b<a.length;b++){var c=a[b],d=c.childs;d.length!=0&&!c.isCollapsed()&&(collapse(d),c.eventCollapsionClick())}}function expand(a){for(var b=0;b<a.length;b++){var c=a[b],d=c.childs;d.length!=0&&c.isCollapsed&&(c.eventCollapsionClick(),expand(d))}}
function updateChildren(a){var b=a.checked,a=jQuery(a).parents("table")[0],a=jQuery(a).next("div");a.length>0&&jQuery(a[0]).contents().find(":checkbox").each(function(){this.checked=b})}function updateParent(a){var a=jQuery(a).parents("div")[0],b=!0,c=jQuery(a).prev("table"),d=0,e=0;jQuery(a).contents().find(":checkbox").each(function(){e++;this.checked?b=!0:d++});d==e&&(b=!1);if(c.length>0&&(a=jQuery(c[0]).find(":checkbox")[0],!(a==null||typeof a=="undefined")))a.checked=b,updateParent(a)};

