var ModalDialogWindow;var ModalDialogInterval;var ModalDialog=new Object;ModalDialog.value="";ModalDialog.eventhandler="";function ShowModal(I,G,H,J,K,M,F){ModalDialog.arg=M;var A=(window.showModalDialog)?1:0;
var B="";if(J!=null){if(A){for(var D=0;D<J.length;D++){B+='&nbsp;&nbsp;&nbsp;<input type=button class=btn style="width:70px" value="'+J[D]+'" onclick=\'javascript:returnValue="'+J[D]+"\";self.close();'>"
}}else{for(var D=0;D<J.length;D++){B+='<input type=button class=btn style="width:70px" value="'+J[D]+'" onclick=\'javascript:CloseForm("'+J[D]+"\");'>&nbsp;&nbsp;&nbsp;"}}}var E="<html><head><title>"+G+"</title>";
if(!A){if(F==null){F=I+"admin/style/global15.css"}E+='<LINK href="'+F+'" type="text/css" rel=STYLESHEET><script language=JavaScript>function CloseForm(Response) {  window.opener.ModalDialog.value = Response;  window.close(); } <\/script>'
}else{if(F==null){F="../admin/style/global15.css"}E+='<LINK href="'+F+'" type="text/css" rel=STYLESHEET><script>function setDim(){var o=document.getElementById("tbl");var w=o.clientWidth+40; if(w>(screen.width-100))w=(screen.width-100);var h=o.clientHeight+60; if(h>(screen.height-100))h=(screen.height-100);var t=(screen.height-h)/2;var l=(screen.width-w)/2;window.self.dialogLeft=l+"px";window.self.dialogTop=t+"px";window.self.dialogWidth=w+"px";window.self.dialogHeight=h+"px";window.self.scrollTo(0,0);}<\/script>'
}E+="</head><body";if(!A){E+=' onblur="window.focus();"'}else{E+=' onload="setDim();"'}E+="><table name=tbl id=tbl border=0 width='100%' height='100%' cellspacing=0 cellpadding=12 class=frame><tr><td align=left nowrap>"+H+"</td></tr><tr><td align=center valign=bottom nowrap>"+B+"</td></tr></table></body></html>";
if(window.showModalDialog){ModalDialogRemoveWatch();ModalDialog.eventhandler=K;var L=(screen.height-135)/2;var C=(screen.width-350)/2;ModalDialog.value=showModalDialog(I+"script/dialog.htm",E,"dialogWidth:350px;dialogHeight:135px;dialogTop:"+L+"px;dialogLeft:"+C+"px;status:0;help:0");
ReturnMethod(M)}else{ModalDialogRemoveWatch();ModalDialog.eventhandler=K;ModalDialogShow(E)}}function ShowModalUrl(D,C,G,F,A){if(window.showModalDialog){if(C==null){C=450}if(G==null){G=150}var E=(screen.height-G)/2;
var B=(screen.width-C)/2;if(F==null){F="0"}ModalDialog.value=showModalDialog(AppendRandomParam(D),A,"dialogWidth:"+C+"px;dialogHeight:"+G+"px;dialogTop:"+E+"px;dialogLeft:"+B+"px;status:1;help:0;resizable:"+F)
}else{ModalDialogShowUrl(D,C,G,F)}}function AppendRandomParam(A){if(A.indexOf("?")==-1){A+="?rnd="+Math.random()}else{A+="&rnd="+Math.random()}return A}function ShowModalUrlWithRet(C,I,K,H,E,B,F,G){ModalDialog.arg=K;
if(F==null||F==true){C=AppendRandomParam(C)}var A=(window.showModalDialog)?1:0;if(window.showModalDialog){if(H==null){H=450}if(E==null){E=150}ModalDialogRemoveWatch();ModalDialog.eventhandler=I;var J=(screen.height-E)/2;
var D=(screen.width-H)/2;if(B==null){B="0"}ModalDialog.value=showModalDialog(C,G,"dialogWidth:"+H+"px;dialogHeight:"+E+"px;dialogTop:"+J+"px;dialogLeft:"+D+"px;status:1;help:0;resizable:"+B);ReturnMethod(K)
}else{ModalDialogRemoveWatch();ModalDialog.eventhandler=I;ModalDialogShowUrl(C,H,E,B)}}function ReturnMethod(arg){if(ModalDialog.eventhandler!=null){eval(ModalDialog.eventhandler+'("'+ModalDialog.value+'","'+arg+'")')
}ModalDialogRemoveWatch()}function ModalDialogMaintainFocus(){try{if(ModalDialogWindow.closed){window.clearInterval(ModalDialogInterval);ReturnMethod(ModalDialog.arg);return }ModalDialogWindow.focus()}catch(A){}}function ModalDialogRemoveWatch(){ModalDialog.value="";
ModalDialog.eventhandler=""}function ModalDialogShow(C){var D=(screen.height-150)/2;var A=(screen.width-450)/2;var B="width=450,height=150,left="+A+",top="+D+",toolbar=0,";B+="location=0,status=0,menubar=0,scrollbars=1,resizable=0";
ModalDialogWindow=window.open("","",B);ModalDialogWindow.document.open();ModalDialogWindow.document.write(C);ModalDialogWindow.document.close();ModalDialogWindow.focus();ModalDialogInterval=window.setInterval("ModalDialogMaintainFocus()",5)
}function ModalDialogShowUrl(D,B,G,F){if(B==null){B=450}if(G==null){G=150}if(F==null){F="0"}var E=(screen.height-G)/2;var A=(screen.width-B)/2;var C="width="+B+",height="+G+",left="+A+",top="+E+",toolbar=0,";
C+="location=0,status=0,menubar=0,scrollbars=1,resizable="+F;ModalDialogWindow=window.open(D,D,C);ModalDialogWindow.focus();ModalDialogInterval=window.setInterval("ModalDialogMaintainFocus()",5)};