var ua=navigator.userAgent.toLowerCase();var isIE=(document.all)?1:0;var isO=ua.indexOf("opera")!=-1;var isNS6=(document.getElementById&&!document.all)?1:0;var isIE4Mac=((navigator.appVersion.indexOf("Mac")!=-1)&&(document.all)&&!(document.getElementById))?1:0;
var gebi=(document.getElementById)?1:0;var isNav=(navigator.appName.indexOf("Netscape")!=-1);function PutToFrame(F,C){if(window.name!=C){var E=new String(self.document.location);var G=E.lastIndexOf("/")+1;
var A=self.document.location.pathname;A=A.replace(/(\/)/g,"%2f").replace(/(\\)/g,"%5c");var D="";if(self.document.location.search!=null){D=new String(self.document.location.search);if(D.length>0){D="&"+D.substring(1,D.length)
}}var B=F+((F.indexOf("?")==-1&&F.indexOf("&")==-1)?"?":"&")+"_file="+A+"&_frame="+C+D;top.location.replace(B)}return }function LoadFrame(){if(self.location.search==null){return }srch=new String(self.location.search);
if(srch.length>0){srch=srch.substring(1,srch.length)}var a=srch.split("&");if(a.length<2){return }var file;var frame;var search="";var itm;itm=a[0].split("=");if(itm[0]=="_file"){file=itm[1].replace(/(%2f)/g,"/").replace(/(%5c)/g,"\\");
frame=a[1].split("=")[1];var len=a.length;for(var i=2;i<len;i++){search=search+"&"+a[i]}if(search.length>0){search="?"+search.substring(1,search.length)}}if(file&&frame){var s="top."+frame+".location.replace('"+file+search+"')";
eval(s)}return }function PutToFrameServer(F,C){if(window.name!=C){var E=new String(self.document.location);var G=E.lastIndexOf("/")+1;var A=self.document.location.pathname;A=A.replace(/(\/)/g,"%2f").replace(/(\\)/g,"%5c");
var D="";if(self.document.location.search!=null){D=new String(self.document.location.search);if(D.length>0){D="&"+D.substring(1,D.length)}}var B=F+((F.indexOf("?")==-1&&F.indexOf("&")==-1)?"?":"&")+"goto="+A+"&_frame="+C+D;
top.location.replace(B)}return }function DeleteClick(msg,btnID,postBackCode){if(btnID!=null){if(btnID=="btnDel"){if(HandleDeleteClick(msg)){eval(postBackCode)}return true}else{return false}}var oButton=window.event.srcNode;
if(oButton!=null){if(oButton.getAttribute("disabled")!=true&&oButton.getAttribute("ID")=="btnDel"){window.event.ret=HandleDeleteClick(msg);return true}}return false}function HandleDeleteClick(B){var A=confirm(B);
oHidden=findObj("dlgRet");if(oHidden!=null){if(A==true){oHidden.value="1"}else{oHidden.value=""}}return A}function PrintClick(D,C,B){if(C!=null){if(C=="btnPrint"){HandlePrintClick(D,B);return true}else{return false
}}var A=window.event.srcNode;if(A!=null){if(A.getAttribute("disabled")!=true&&A.getAttribute("ID")=="btnPrint"){HandlePrintClick(D,B);window.event.ret=false;return true}}return false}function HandlePrintClick(B,A){if(A==null){A=""
}InWindow(A+"printSetup.aspx?pk="+B,"prntStp","toolbar=1,location=1,status=1,menubar=1,scrollbars=1,resizable=1")}function EvalClick(code,btnID,handleBtn){if(btnID!=null){if(btnID==handleBtn){eval(code);
return true}else{return false}}var oButton=window.event.srcNode;if(oButton!=null){if(oButton.getAttribute("disabled")!=true&&oButton.getAttribute("ID")==handleBtn){eval(code);window.event.ret=false;return true
}}return false}function ButtonClick(D,B,C,H,G,I,E,A,J){if(H!=null){if(D==H){HandleButtonClick(D,B,C,G,I,E,A,J);return true}else{return false}}var F=window.event.srcNode;if(F!=null){if(F.getAttribute("disabled")!=true&&F.getAttribute("ID")==D){HandleButtonClick(D,B,C,G,I,E,A,J);
window.event.ret=false;return true}}return false}function HandleButtonClick(H,D,C,F,B,G,E,A){if(F){ShowModalUrl(D,B,G,E,A)}else{InWindow(D,C,"toolbar=1,location=1,status=1,menubar=1,scrollbars=1,resizable=1")
}}function SetHidden(btnID,hid,postBackCode){if(btnID!=null){hid.value="btnID";eval(postBackCode);return true}var oButton=window.event.srcNode;if(oButton!=null){if(oButton.getAttribute("disabled")!=true){hid.value=oButton.getAttribute("ID");
window.event.ret=true;return true}}return false}function CheckAll(A){if(!SetCheckboxes(A,true)){SetCheckboxes(A,false)}}function SetCheckboxes(F,A){var E=false;if(A==null){A=false}var B=document.Form1.getElementsByTagName("input");
var D;for(var C=0;C<B.length;C++){D=B[C];if(D.type.toLowerCase()=="checkbox"){if(D.checked!=A){if(D.name.substring(0,F.length)==F){D.checked=A;E=true}}}}return E}function findObj(B){var A;if(gebi){A=document.getElementById(B)
}else{A=document.all[B]}return A}function findObjInParent(C){var B;var A;if(window.opener){A=window.opener}else{A=parent}if(gebi){B=A.document.getElementById(C)}else{B=A.document.all[C]}return B}function HandleCheckBox(D,B,E,C){if(!D){return 
}var A=findObj(B);if(!A){return }if(D.checked==true){A.disabled=false;if(!C){A.focus();A.select()}}else{A.disabled=true;A.value=E}}function HandleCheckBox2(F,E,D,G,C){var B=findObj(E);var A=findObj(D);
B.disabled=A.disabled=!F.checked;if(F.checked==true){if(!C){B.focus();B.select()}}else{B.value=A.value=G}}function HandleCheckBox3(I,F,D,C,A,H){var G=findObj(F);var E=findObj(D);var B=findObj(C);G.disabled=E.disabled=B.disabled=!I.checked;
if(I.checked==true){if(!H){G.focus();G.select()}}else{G.value=E.value=B.value=A}}function HandleCheckBoxX(E,B,F,D){var G=B.length;for(var C=0;C<G;C++){var A=findObj(B[C]);B[C]=A;A.disabled=!E.checked}if(E.checked==true){if(!D){B[0].focus();
B[0].select()}}else{for(var C=0;C<G;C++){B[C].value=F}}}function PresetCheckBox(B,A,D){var C=findObj(B);if(!C){return }HandleCheckBox(C,A,D,true)}function PresetCheckBox3(A,D,C,B,F){var E=findObj(A);if(!E){return 
}HandleCheckBox3(E,D,C,B,F,true)}function setDisplay(B,A){chb=findObj(B);setDisplay2(chb.checked,A)}function setDisplay2Obj(A,B){if(A==false){B.style.visibility="hidden";B.style.display="none"}else{B.style.display="block";
B.style.visibility="visible"}}function setDisplay2(A,B){obj=findObj(B);if(obj!=null){if(A==false){obj.style.visibility="hidden";obj.style.display="none"}else{obj.style.display="block";obj.style.visibility="visible"
}}}function setDisplayTblRow(A,B){obj=findObj(B);if(A==false){obj.style.visibility="hidden";obj.style.display="none"}else{obj.style.display=(isIE&&!isO?"block":"table-row");obj.style.visibility="visible"
}}function setRblDisplay(A,B){rbl=findObj(A);obj=findObj(B);if(rbl==null||obj==null){return }if(rbl.checked==true){obj.style.display="block";obj.style.visibility="visible"}else{obj.style.visibility="hidden";
obj.style.display="none"}}function setButtonState(B,A){chb=findObj(B);obj=findObj(A);if(chb.checked){obj.disabled=false}else{obj.disabled=true}}function InWindow(D,A,B,E){if(B==null){B="toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1"
}var C;if(E==null){E=""}C=window.open(E,A,B);C.document.open();C.document.write("");C.document.close();C.document.location=D;if(parseInt(navigator.appVersion)>=4){C.window.focus()}return C}function IsValidNum(A){A=A.replace(/( )/g,"");
if(A==""){return false}return !isNaN(1*A)}function ToFixedNum(E,G,A){value=1*E;if(isNaN(value)){return E}if(G==null){G=2}var C=""+Math.round(value*Math.pow(10,G));while(C.length<=G){C="0"+C}var F=C.length-G;
var D=C.substring(F);if(A){while(D.charAt(D.length-1)=="0"){D=D.substring(0,D.length-1)}}var B=C.substring(0,F)+(D==""?"":"."+D);return B}function GroupDigits(D){var E=".";var A=".";var C=",";D+="";var F=D.indexOf(E);
var G="";if(F!=-1){G=A+D.substring(F+1,D.length);D=D.substring(0,F)}var B=/(\d+)(\d{3})/;while(B.test(D)){D=D.replace(B,"$1"+C+"$2")}return D+G}function ToNumeric(B,A){B=B.replace(/(,)/g,"");if(!IsValidNum(B)){return B
}return GroupDigits(ToFixedNum(B,A))}function Highlight(E,A){var C=findObjInParent(E);if(C==null){return }var D=C.className;var B=D.substring(D.length-2,D.length);if(A&&B!="Hl"){C.className=D+"Hl"}if(!A&&B=="Hl"){C.className=D.substring(0,D.length-2)
}}function getCurrentStyleProp(o,propIE,propNIE){if(o.currentStyle){return eval("o.currentStyle."+propIE)}else{if(window.getComputedStyle){return document.defaultView.getComputedStyle(o,"").getPropertyValue((propNIE!=null?propNIE:propIE))
}}return"undefined"}function setFocusToParent(){if(window.opener){p=window.opener}else{p=parent}p.focus()}function scrollParentToObj(C,A){if(window.opener){p=window.opener}else{p=parent}var B=findObjInParent(C);
if(!A||B.offsetTop<p.document.body.scrollTop){p.scrollTo(0,B.offsetTop)}}function Disable(B,A){if(B.disabled==A){return }if(!B.disabled){B.className="d_"+B.className}else{if(B.className.substring(0,2)=="d_"){B.className=B.className.substring(2,B.className.length)
}}B.disabled=A}function SelectDDL(D,B){var C=D.length;for(var A=0;A<C;A++){if(D.options[A].value==B){D.options[A].selected=true;return }}}function SelectLBItems(D,E){var A=E.split(",");var F=D.length;var C;
for(var B=0;B<F;B++){C=D.options[B];C.selected=Contains(A,C.value)}}function Contains(A,B){var D=A.length;for(var C=0;C<D;C++){if(A[C]==B){return true}}return false};