var _txtDialogResult=null;function Dialog(){var _C=this;this.ie=window.navigator.userAgent.indexOf("MSIE")!=-1;this.DialogFunc="";this._DOC="___DOC";this._IFRAME="___IFRAME";this._CONTEXT="___CONTEXT";this._CONTROL="___CONTROL";this._MAIN="___MAIN";this._BUTTON="___BUTTON";this._CTRLBTN="___CTRLBTN";this._BAR="___BAR";this._RESIZEBAR="___RESIZEBAR";this._PICPATH="/UI/dialog/";this.OffsX=0;this.OffsY=0;this.OffsDialog={ss:false,sx:0,sy:0,ss2:false,hh:0}
this.DialogArray=null;this.DialogType="panel";this.DialogResult="";this.DialogLock=false;this.DialogLockMode="iframe";this.DialogTitle="&nbsp;";this.DialogHtml="";this.DialogBakHtml="";this.DialogId="___DialogObject";this.DialogTag=0;this.DialogParent=null;this.DialogShadowFlag=false;this.DialogShadowDelay=5;this.DialogShadowInterval=this.ie?25:0.25;this.DialogAlpha=this.ie?100:1.0;this.DialogLockAlpha=this.ie?50:0.5;this.DialogDragAlpha=this.ie?75:0.75;this.ResizeIng=false;this.DialogResize=false;this.DragIng=false;this.DialogDrag=true;this.DialogDragPixel=5;this.DialogAlign="auto";this.DialogTop=-1;this.DialogLeft=-1;this.DialogWidth=-1;this.DialogHeight=-1;this.ScrollWidth=this.ie?0:20;this.DialogReAlign=true;this.DialogzIndex=100;this.DialogCtrl="-1";this.DialogBar=true;this.DialogObject="dialog1";this.DialogClose=".CloseDialog()";this.DialogOK=".OKDialog()";this.DialogShadow=".ShadowDialog()";this.DialogWinMax=".WinMaxDialog(this)";this.DialogWinMin=".WinMinDialog(this)";this.DialogSwitch=".SwitchDialogzIndex(___Dialog, true)";this.DialogCtrl0='<img src="'+this._PICPATH+'dialog-min.gif" title="最小化" style="cursor:default" onclick="{[___DialogWinMin]}" />';this.DialogCtrl1='<img src="'+this._PICPATH+'dialog-max.gif" title="最大化/还原" style="cursor:default" onclick="{[___DialogWinMax]}" />';this.DialogCtrl2='<img src="'+this._PICPATH+'dialog-close.gif" title="关闭" style="cursor:default" onclick="{[___DialogClose]}" />';this.DialogBox='\
    <div class="dialog_css1" onmousedown="{[___DialogSwitch]}">\
    <div class="dialog_css5">\
    <div class="dialog_css2" style="background-image:url('+this._PICPATH+'dialog-bg2.gif);background-repeat:repeat-x;" id="{[___DialogBar]}">\
      <table width="100%" border="0" cellspacing="0" cellpadding="0">\
                    <tr>\
       <td width="25" nowarp align="center"><img src="'+this._PICPATH+'dialog-ico.gif" /></td>\
                      <td align="left" nowarp onmouseover="{[___DialogSwitch]}" id="{[___DialogControl]}" class="dialog_css6">{[___DialogTitle]}</td>\
                      <td nowarp width="{[___DialogCtrlBtn_Width]}" align="right">\
       <span id="{[___DialogCtrlButton]}">{[___DialogCtrlBtn]}</span>\
       </td>\
                    </tr>\
                  </table>\
    </div>\
    <div class="dialog_css3" id="{[___DialogMain]}">\
    {[___DialogTypeHtml]}\
    </div>\
    <div id="{[___DialogResizeBar]}" class="dialog_css7" style="background-image:url('+this._PICPATH+'dialog-resize.gif);background-repeat:no-repeat;">&nbsp;</div>\
    </div>\
    </div>';this.DialogLoadIng='\
      <center><img src="'+this._PICPATH+'dialog-loading.gif" /></center>\
      <div style="padding:5px 0 0"><center>正在读取数据，请稍候......</center></div>';this.DialogPanel='\
       <div class="dialog_css4" id="{[___DialogContext]}"></div>';this.DialogAlert='\
       <div class="dialog_css4" id="{[___DialogContext]}"></div>\
       <div style="padding:10px 5px 5px" id="{[___DialogButton]}">\
       <center><img src="'+this._PICPATH+'dialog-cancel.gif" onclick="{[___DialogClose]}" /></center>\
       </div>';this.DialogOkAndCancel='\
       <div class="dialog_css4" id="{[___DialogContext]}"></div>\
       <div style="padding:10px 5px 5px" id="{[___DialogButton]}">\
       <center><img src="'+this._PICPATH+'dialog-ok.gif" onclick="{[___DialogOK]}" />  <img src="'+this._PICPATH+'dialog-cancel.gif" onclick="{[___DialogClose]}" /></center>\
       </div>';this.ShowDialog=function(ev,dl,parent){var bpos={sw:0,sh:0,cw:0,ch:0,sx:0,sy:0};var el=this.$(parent);if(el){this.DialogParent=parent;bpos={sw:parseInt(el.offsetWidth),sh:parseInt(el.offsetHeight),cw:parseInt(el.offsetWidth),ch:parseInt(el.offsetHeight),sx:parseInt(el.offsetLeft),sy:parseInt(el.offsetTop)};}else{bpos={sw:document.body.scrollWidth,sh:document.body.scrollHeight,cw:document.body.clientWidth,ch:document.body.clientHeight,sx:this.ie?document.body.scrollLeft:window.scrollX,sy:this.ie?document.body.scrollTop:window.scrollY};}
if(dl){this.DialogArray=dl;this.SwitchDialogzIndex(false);}
var dialog=false;var ___DialogDoc=this.$(this.DialogId+this._DOC);var ___Dialog=this.$(this.DialogId);if(___Dialog)dialog=true;if(!___DialogDoc)___DialogDoc=document.createElement("DIV");___DialogDoc.id=this.DialogId+this._DOC;if(this.DialogLock){with(___DialogDoc.style){position="absolute";zIndex=this.DialogzIndex+3;top="0";left="0";width=Math.max(document.body.scrollWidth,document.body.clientWidth)+"px";height=Math.max(document.body.scrollHeight,document.body.clientHeight)+"px";backgroundColor="#ffffff";if(this.ie){filter=this.DialogShadowFlag?"Alpha(Opacity=0)":"Alpha(Opacity="+this.DialogLockAlpha+")";}else{MozOpacity=this.DialogShadowFlag?0.0:this.DialogLockAlpha;}}}
if(!___Dialog)___Dialog=document.createElement("DIV");___Dialog.id=this.DialogId;with(___Dialog.style){position="absolute";zIndex=this.DialogzIndex+5;if(this.DialogWidth!=-1)width=this.DialogWidth+"px";backgroundColor="#ffffff";if(this.ie){filter=this.DialogShadowFlag?"Alpha(Opacity=0)":"Alpha(Opacity="+this.DialogAlpha+")";}else{MozOpacity=this.DialogShadowFlag?0.0:this.DialogAlpha;}}
___DialogTypeHtml=this.DialogBox;switch(this.DialogType){case"alert":___DialogTypeHtml=___DialogTypeHtml.replace(/\{\[___DialogTypeHtml\]\}/g,this.DialogAlert);break;case"okAndCancel":___DialogTypeHtml=___DialogTypeHtml.replace(/\{\[___DialogTypeHtml\]\}/g,this.DialogOkAndCancel);default:___DialogTypeHtml=___DialogTypeHtml.replace(/\{\[___DialogTypeHtml\]\}/g,this.DialogPanel);}
___DialogTypeHtml=___DialogTypeHtml.replace(/\{\[___DialogControl\]\}/g,this.DialogId+this._CONTROL);var ___DialogCtrlBtn="&nbsp;";var ___DialogCtrlBtn_Width=0;if(this.DialogCtrl.indexOf("0")!=-1){___DialogCtrlBtn+=this.DialogCtrl0+"&nbsp;";___DialogCtrlBtn_Width+=30;}
if(this.DialogCtrl.indexOf("1")!=-1){___DialogCtrlBtn+=this.DialogCtrl1+"&nbsp;";___DialogCtrlBtn_Width+=30;}
if(this.DialogCtrl.indexOf("2")!=-1){___DialogCtrlBtn+=this.DialogCtrl2+"&nbsp;";___DialogCtrlBtn_Width+=30;}
___DialogTypeHtml=___DialogTypeHtml.replace(/\{\[___DialogCtrlBtn\]\}/g,___DialogCtrlBtn);___DialogTypeHtml=___DialogTypeHtml.replace(/\{\[___DialogCtrlBtn_Width\]\}/g,___DialogCtrlBtn_Width);___DialogTypeHtml=___DialogTypeHtml.replace(/\{\[___DialogWinMin\]\}/g,this.DialogObject+this.DialogWinMin);___DialogTypeHtml=___DialogTypeHtml.replace(/\{\[___DialogWinMax\]\}/g,this.DialogObject+this.DialogWinMax);___DialogTypeHtml=___DialogTypeHtml.replace(/\{\[___DialogMain\]\}/g,this.DialogId+this._MAIN);___DialogTypeHtml=___DialogTypeHtml.replace(/\{\[___DialogContext\]\}/g,this.DialogId+this._CONTEXT);___DialogTypeHtml=___DialogTypeHtml.replace(/\{\[___DialogClose\]\}/g,this.DialogObject+this.DialogClose);___DialogTypeHtml=___DialogTypeHtml.replace(/\{\[___DialogOK\]\}/g,this.DialogObject+this.DialogOK);___DialogTypeHtml=___DialogTypeHtml.replace(/\{\[___DialogSwitch\]\}/g,this.DialogArray?this.DialogObject+this.DialogSwitch:"javascript:void(0)");___DialogTypeHtml=___DialogTypeHtml.replace(/\{\[___DialogCtrlButton\]\}/g,this.DialogId+this._BUTTON);___DialogTypeHtml=___DialogTypeHtml.replace(/\{\[___DialogButton\]\}/g,this.DialogId+this._CTRLBTN);___DialogTypeHtml=___DialogTypeHtml.replace(/\{\[___DialogBar\]\}/g,this.DialogId+this._BAR);___DialogTypeHtml=___DialogTypeHtml.replace(/\{\[___DialogResizeBar\]\}/g,this.DialogId+this._RESIZEBAR);___DialogTypeHtml=___DialogTypeHtml.replace(/\{\[___DialogTitle\]\}/g,this.DialogTitle);___Dialog.innerHTML=___DialogTypeHtml;document.body.appendChild(___Dialog);try{if(!this.DialogBar)this.$(this.DialogId+this._BAR).style.display="none";if(!this.DialogResize)this.$(this.DialogId+this._RESIZEBAR).style.display="none";}catch(e){}
this.OffsDialog.hh=___Dialog.offsetHeight-this.$(this.DialogId+this._MAIN).offsetHeight;if(this.DialogHtml==""){this.$(this.DialogId+this._CONTEXT).innerHTML=this.DialogLoadIng;}else{this.$(this.DialogId+this._CONTEXT).innerHTML=this.DialogHtml;}
if(this.DialogHeight==-2){if(this.$(this.DialogId+this._MAIN).offsetHeight>(document.body.clientHeight-this.OffsDialog.hh-this.ScrollWidth))
this.$(this.DialogId+this._MAIN).style.height=(document.body.clientHeight-this.OffsDialog.hh-this.ScrollWidth)+"px";}else if(this.DialogHeight==-3){this.$(this.DialogId+this._MAIN).style.height=(document.body.clientHeight-this.OffsDialog.hh-this.ScrollWidth)+"px";}else if(this.DialogHeight==-1){}else{this.$(this.DialogId+this._MAIN).style.height=this.DialogHeight+"px";}
if(this.ie)this.$(this.DialogId+this._MAIN).style.width="100%";if(this.ie)this.$(this.DialogId+this._CONTEXT).style.width="100%";if(!dialog||this.DialogReAlign){var ppos=this.GetDialogPos(ev,parent,___Dialog,bpos);with(___Dialog.style){if(this.DialogTop!=-1)top=this.DialogTop+"px";else top=ppos.y+"px";if(this.DialogLeft!=-1)left=this.DialogLeft+"px";else left=ppos.x+"px";}}
if(!this.DialogLock){with(___DialogDoc.style){position="absolute";zIndex=this.DialogzIndex+3;if(!dialog||this.DialogReAlign){top=___Dialog.style.top;left=___Dialog.style.left;}
width=___Dialog.offsetWidth+"px";height=___Dialog.offsetHeight+"px";if(this.ie){filter="Alpha(Opacity=0)";}else{MozOpacity=0.0;}}}
document.body.appendChild(___DialogDoc);if(this.ie){if(this.DialogLockMode=="iframe"){___DialogDoc.innerHTML=this.IframeDialog(___DialogDoc);}else{this.HideShowCovered();}}
if(this.DialogDrag)
this.$(this.DialogId+this._CONTROL).onmousedown=this.DragStart;if(this.DialogResize)
this.$(this.DialogId+this._RESIZEBAR).onmousedown=this.ResizeStart;if(this.DialogShadowFlag)this.ShadowDialog();}
this.IframeDialog=function(o){return'<iframe id="'+this.DialogId+this._IFRAME+'" src="about:blank" scrolling="no" frameborder="0" \
    style="position:absolute; filter:Alpha(Opacity=0); top:0; left:0; z-index:'+(parseInt(o.style.zIndex)+1)+';  width:'+o.offsetWidth+'px; \
    height:'+o.offsetHeight+'px;">\
    </iframe>';}
this.ShadowDialog=function(){var ___DialogDoc=this.$(this.DialogId+this._DOC);var ___Dialog=this.$(this.DialogId);try{if(this.ie){if(___DialogDoc.filters.alpha.opacity<this.DialogLockAlpha&&this.DialogLock)
___DialogDoc.filters.alpha.opacity=Number(___DialogDoc.filters.alpha.opacity)+this.DialogShadowInterval;else ___DialogDoc.filters.alpha.opacity=this.DialogLockAlpha;if(___Dialog.filters.alpha.opacity<this.DialogAlpha)
___Dialog.filters.alpha.opacity=Number(___Dialog.filters.alpha.opacity)+this.DialogShadowInterval;else ___Dialog.filters.alpha.opacity=this.DialogAlpha;if(___DialogDoc.filters.alpha.opacity<this.DialogLockAlpha||___Dialog.filters.alpha.opacity<this.DialogAlpha){setTimeout(this.DialogObject+this.DialogShadow,this.DialogShadowDelay);}}else{if(___DialogDoc.style.MozOpacity<this.DialogLockAlpha&&this.DialogLock)
___DialogDoc.style.MozOpacity=Number(___DialogDoc.style.MozOpacity)+this.DialogShadowInterval;else ___DialogDoc.style.MozOpacity=this.DialogLockAlpha;if(___Dialog.style.MozOpacity<this.DialogAlpha)
___Dialog.style.MozOpacity=Number(___Dialog.style.MozOpacity)+this.DialogShadowInterval;else ___Dialog.style.MozOpacity=this.DialogAlpha;if(___DialogDoc.style.MozOpacity<this.DialogLockAlpha||___Dialog.style.MozOpacity<this.DialogAlpha){setTimeout(this.DialogObject+this.DialogShadow,this.DialogShadowDelay);}}}catch(e){}}
this.OKDialog=function()
{var ___DialogDoc=this.$(this.DialogId+this._DOC);var ___Dialog=this.$(this.DialogId);try{if(this.DialogShadowFlag){if(this.ie){___DialogDoc.filters.alpha.opacity-=this.DialogShadowInterval;___Dialog.filters.alpha.opacity-=this.DialogShadowInterval;if(___DialogDoc.filters.alpha.opacity>0||___Dialog.filters.alpha.opacity>0){setTimeout(this.DialogObject+this.DialogClose,this.DialogShadowDelay);}else{document.body.removeChild(___DialogDoc);document.body.removeChild(___Dialog);this.DragEnd();if(this.DialogLockMode=="hidden")this.HideShowCovered(true);}}else{___DialogDoc.style.MozOpacity-=this.DialogShadowInterval;___Dialog.style.MozOpacity-=this.DialogShadowInterval;if(___DialogDoc.style.MozOpacity>0||___Dialog.style.MozOpacity>0){setTimeout(this.DialogObject+this.DialogClose,this.DialogShadowDelay);}else{document.body.removeChild(___DialogDoc);document.body.removeChild(___Dialog);this.DragEnd();}}}else{document.body.removeChild(___DialogDoc);document.body.removeChild(___Dialog);this.DragEnd();if(this.ie&&(this.DialogLockMode=="hidden"))this.HideShowCovered(true);}
if(this.DialogType=="okAndCancel"&&this.DialogFunc!=null&&this.DialogFunc!="")
eval(this.DialogFunc+"('OK')");}catch(e){}}
this.CloseDialog=function(){var ___DialogDoc=this.$(this.DialogId+this._DOC);var ___Dialog=this.$(this.DialogId);try{if(this.DialogShadowFlag){if(this.ie){___DialogDoc.filters.alpha.opacity-=this.DialogShadowInterval;___Dialog.filters.alpha.opacity-=this.DialogShadowInterval;if(___DialogDoc.filters.alpha.opacity>0||___Dialog.filters.alpha.opacity>0){setTimeout(this.DialogObject+this.DialogClose,this.DialogShadowDelay);}else{document.body.removeChild(___DialogDoc);document.body.removeChild(___Dialog);this.DragEnd();if(this.DialogLockMode=="hidden")this.HideShowCovered(true);}}else{___DialogDoc.style.MozOpacity-=this.DialogShadowInterval;___Dialog.style.MozOpacity-=this.DialogShadowInterval;if(___DialogDoc.style.MozOpacity>0||___Dialog.style.MozOpacity>0){setTimeout(this.DialogObject+this.DialogClose,this.DialogShadowDelay);}else{document.body.removeChild(___DialogDoc);document.body.removeChild(___Dialog);this.DragEnd();}}}else{document.body.removeChild(___DialogDoc);document.body.removeChild(___Dialog);this.DragEnd();if(this.ie&&(this.DialogLockMode=="hidden"))this.HideShowCovered(true);}
if(this.DialogType=="okAndCancel"&&this.DialogFunc!=null&&this.DialogFunc!="")
eval(this.DialogFunc+"('Cancel')");}catch(e){}}
this.DialogSetHtml=function(html,add){var ___DialogContext=this.$(this.DialogId+this._CONTEXT);if(___DialogContext){if(add){___DialogContext.innerHTML+=html;}else{___DialogContext.innerHTML=html;}}
this.UpdateDialogSize();}
this.DialogGetHtml=function(){var ___DialogContext=this.$(this.DialogId+this._CONTEXT);if(___DialogContext)return ___DialogContext.innerHTML;return"";}
this.DialogBakUpHtml=function(){this.DialogBakHtml=this.DialogGetHtml();}
this.DialogRestoreHtml=function(){this.DialogSetHtml(this.DialogBakHtml);}
this.DialogSetTitle=function(title,add){var ___DialogControl=this.$(this.DialogId+this._CONTROL);if(___DialogControl){if(add){___DialogControl.innerHTML+=title;}else{___DialogControl.innerHTML=title;}}}
this.DialogGetTitle=function(){var ___DialogControl=this.$(this.DialogId+this._CONTROL);if(___DialogControl)return ___DialogControl.innerHTML;return"";}
this.ShowHideButton=function(vl){var ___DialogBtn=this.$(this.DialogId+this._BUTTON);var ___DialogCtrBtn=this.$(this.DialogId+this._CTRLBTN);if(___DialogBtn)___DialogBtn.style.display=vl;if(___DialogCtrBtn)___DialogCtrBtn.style.display=vl;}
this.WinMinDialog=function(el){el.src=this.OffsDialog.ss2?this._PICPATH+"dialog-min.gif":this._PICPATH+"dialog-min2.gif";var ___CC=this.$(this.DialogId+this._MAIN);___CC.style.display=this.OffsDialog.ss2?"":"none";if(this.DialogResize)this.$(this.DialogId+this._RESIZEBAR).style.display=this.OffsDialog.ss2?"":"none";this.OffsDialog.ss2=!this.OffsDialog.ss2;this.UpdateDialogSize();}
this.WinMaxDialog=function(el){el.src=this.OffsDialog.ss?this._PICPATH+"dialog-max.gif":this._PICPATH+"dialog-max2.gif";postX=this.ie?document.body.scrollLeft:window.scrollX,postY=this.ie?document.body.scrollTop:window.scrollY
var ___C=this.$(this.DialogId);var ___CC=this.$(this.DialogId+this._MAIN);if(!this.OffsDialog.ss){this.OffsDialog.sx=this.DialogLeft==-1?___C.offsetLeft:this.DialogLeft;this.OffsDialog.sy=this.DialogTop==-1?___C.offsetTop:this.DialogTop;}
___C.style.top=this.OffsDialog.ss?this.OffsDialog.sy+"px":postY+"px";___C.style.left=this.OffsDialog.ss?this.OffsDialog.sx+"px":postX+"px";___C.style.width=this.OffsDialog.ss?(this.DialogWidth!=-1?this.DialogWidth+"px":""):"";var ___CC_Height="";if(this.OffsDialog.ss){if(this.DialogHeight==-2){___CC_Height="";}else if(this.DialogHeight==-3){___CC_Height=(document.body.clientHeight-this.OffsDialog.hh-this.ScrollWidth)+"px";}else if(this.DialogHeight==-1){___CC_Height="";}else{___CC_Height=this.DialogHeight+"px";}}else{___CC_Height=(document.body.clientHeight-this.OffsDialog.hh-this.ScrollWidth)+"px"}
___CC.style.height=___CC_Height;this.OffsDialog.ss=!this.OffsDialog.ss;this.UpdateDialogSize();}
this.UpdateDialogSize=function(){var ___C=this.$(this.DialogId);var ___CC=this.$(this.DialogId+this._MAIN);if(this.DialogHeight==-2){if(___CC.offsetHeight>(document.body.clientHeight-this.OffsDialog.hh-this.ScrollWidth))
___CC.style.height=(document.body.clientHeight-this.OffsDialog.hh-this.ScrollWidth)+"px";}else if(this.DialogHeight==-3){___CC.style.height=(document.body.clientHeight-this.OffsDialog.hh-this.ScrollWidth)+"px";}else if(this.DialogHeight==-1){___CC.style.height="";}else{___CC.style.height=this.DialogHeight+"px";}
if(this.DialogReAlign&&!this.OffsDialog.ss&&!this.OffsDialog.ss2){var ppos=this.GetDialogPos2(___C);___C.style.top=this.DialogTop==-1?ppos.y+"px":this.DialogTop;___C.style.left=this.DialogLeft==-1?ppos.x+"px":this.DialogLeft;}
if(this.DialogLock){var ___DC=this.$(this.DialogId+this._DOC);___DC.style.top="0";___DC.style.left="0";___DC.style.width=Math.max(document.body.scrollWidth,document.body.clientWidth)+"px";___DC.style.height=Math.max(document.body.scrollHeight,document.body.clientHeight)+"px";if(this.ie&&(this.DialogLockMode=="iframe")){var ___FC=this.$(this.DialogId+this._IFRAME);___FC.style.top="0";___FC.style.left="0";___FC.style.width=___DC.style.width;___FC.style.height=___DC.style.height;}}else{var ___DC=this.$(this.DialogId+this._DOC);___DC.style.height=___C.offsetHeight+"px";___DC.style.width=___C.offsetWidth+"px";if(this.ie&&(this.DialogLockMode=="iframe")){var ___FC=this.$(this.DialogId+this._IFRAME);___FC.style.width=___DC.style.width;___FC.style.height=___DC.style.height;}
if(this.DialogReAlign){___DC.style.top=___C.style.top;___DC.style.left=___C.style.left;}}
if(this.ie&&(this.DialogLockMode=="hidden"))this.HideShowCovered();}
this.HideShowCovered=function(op){var el=null;var epos=new Array();var p={x:0,y:0};if(this.DialogArray){for(var key in this.DialogArray){el=this.$(this.DialogArray[key].DialogId+this._DOC);if(el){p=this.GetAbsolutePos(el);epos[epos.length]={id:this.DialogArray[key].DialogId,EX1:p.x,EX2:el.offsetWidth+p.x,EY1:p.y,EY2:el.offsetHeight+p.y}}}}else{el=this.$(this.DialogId+this._DOC);if(el){p=this.GetAbsolutePos(el);epos[epos.length]={id:this.DialogId,EX1:p.x,EX2:el.offsetWidth+p.x,EY1:p.y,EY2:el.offsetHeight+p.y}}}
if(epos)this.HideShowCoveredObject(epos,op);}
this.HideShowCoveredObject=function(epos,op){var tags=new Array("object","applet","iframe","select");var cpos={el:null,CX1:0,CX2:0,CY1:0,CY2:0};var cp={x:0,y:0};for(var k=tags.length;k>0;){var ar=document.getElementsByTagName(tags[--k]);var cc=null;for(var i=ar.length;i>0;){cc=ar[--i];cp=this.GetAbsolutePos(cc);cpos={el:cc,CX1:cp.x,CX2:cc.offsetWidth+cp.x,CY1:cp.y,CY2:cc.offsetHeight+cp.y}
if(!cc.getAttribute("dialog_hideshow_object_visibility"))
if(cc.currentStyle.visibility)
cc.setAttribute("dialog_hideshow_object_visibility",cc.currentStyle.visibility);if(op&&!this.HideShowCoveredCheck(epos,cpos)){cc.style.visibility=cc.getAttribute("dialog_hideshow_object_visibility");}else if(!this.HideShowCoveredCheck(epos,cpos)){cc.style.visibility=cc.getAttribute("dialog_hideshow_object_visibility");}else{cc.style.visibility="hidden";}}}}
this.HideShowCoveredCheck=function(epos,cpos){var value=false;var el=null;for(var i=0;i<epos.length;i++){if((cpos.CX1>epos[i].EX2)||(cpos.CX2<epos[i].EX1)||(cpos.CY1>epos[i].EY2)||(cpos.CY2<epos[i].EY1)){}else{if(this.ParentIdCheck(cpos.el,epos[i].id)){el=this.$(epos[i].id);if(el){if((this.DialogzIndex+2)<el.style.zIndex)return false;}}else{value=true;}}}
return value;}
this.ParentIdCheck=function(el,pid){var pel=el.parentNode;while(true){if(!pel)break;if(pel.id)if(pel.id==pid)return true;pel=pel.parentNode;}
return false;}
this.GetAbsolutePos=function(el){var SL=0,ST=0;var is_div=/^div$/i.test(el.tagName);if(is_div&&el.scrollLeft)
SL=el.scrollLeft;if(is_div&&el.scrollTop)
ST=el.scrollTop;var r={x:el.offsetLeft-SL,y:el.offsetTop-ST};if(el.offsetParent){var tmp=this.GetAbsolutePos(el.offsetParent);r.x+=tmp.x;r.y+=tmp.y;}
return r;}
this.SwitchDialogzIndex=function(op){var ___C=null;for(var key in this.DialogArray){___C=this.$(this.DialogArray[key].DialogId+this.DialogArray[key]._DOC);if(___C)___C.style.zIndex=this.DialogArray[key].DialogzIndex;if(this.ie&&(this.DialogArray[key].DialogLockMode=="iframe")){___C=this.$(this.DialogArray[key].DialogId+this.DialogArray[key]._IFRAME);if(___C)___C.style.zIndex=this.DialogArray[key].DialogzIndex+1;}
___C=this.$(this.DialogArray[key].DialogId);if(___C)___C.style.zIndex=this.DialogArray[key].DialogzIndex+2;}
if(op){___C=this.$(this.DialogId+this._DOC);if(___C)___C.style.zIndex=this.DialogzIndex+3;if(this.ie&&(this.DialogLockMode=="iframe")){___C=this.$(this.DialogId+this._IFRAME);if(___C)___C.style.zIndex=this.DialogzIndex+4;}
___C=this.$(this.DialogId);if(___C)___C.style.zIndex=this.DialogzIndex+5;}
if(this.ie&&(this.DialogLockMode=="hidden"))this.HideShowCovered();}
this.GetDialogPos=function(ev,parent,ob,bpos){var eobj=null;if(parent){eobj=this.$(parent);}else if(ev){eobj=this.ie?ev.srcElement:ev.currentTarget;}
var ppos={x:0,y:0};if(eobj){var opos=this.GetAbsolutePos(eobj);ppos={x:opos.x,y:opos.y+eobj.offsetHeight};}
if(this.DialogAlign=="center"){ppos.x=Math.floor((bpos.cw-ob.offsetWidth)/2)+bpos.sx;ppos.y=Math.floor((bpos.ch-ob.offsetHeight)/2)+bpos.sy;}else{if(ppos.x+ob.offsetWidth>bpos.sx+bpos.cw)
ppos.x=ppos.x-(ob.offsetWidth-eobj.offsetWidth);if(ppos.y+ob.offsetHeight>bpos.sy+bpos.ch)
ppos.y=ppos.y-eobj.offsetHeight-ob.offsetHeight;}
if(ppos.x<bpos.sx)ppos.x=bpos.sx;if(ppos.y<bpos.sy)ppos.y=bpos.sy;return ppos;}
this.GetDialogPos2=function(el){var ppos={x:el.offsetLeft,y:el.offsetTop};var bpos={sw:0,sh:0,cw:0,ch:0,sx:0,sy:0};var pel=this.$(this.DialogParent);if(pel){bpos={sw:parseInt(pel.offsetWidth),sh:parseInt(pel.offsetHeight),cw:parseInt(pel.offsetWidth),ch:parseInt(pel.offsetHeight),sx:parseInt(pel.offsetLeft),sy:parseInt(pel.offsetTop)};}else{bpos={sw:document.body.scrollWidth,sh:document.body.scrollHeight,cw:document.body.clientWidth,ch:document.body.clientHeight,sx:this.ie?document.body.scrollLeft:window.scrollX,sy:this.ie?document.body.scrollTop:window.scrollY};}
if(this.DialogAlign=="center"){ppos.x=Math.floor((bpos.cw-el.offsetWidth)/2)+bpos.sx;ppos.y=Math.floor((bpos.ch-el.offsetHeight)/2)+bpos.sy;}else{if(ppos.x+el.offsetWidth>bpos.sx+bpos.cw)
ppos.x=bpos.sx+bpos.cw-el.offsetWidth;if(ppos.y+el.offsetHeight>bpos.sy+bpos.ch)
ppos.y=bpos.sy+bpos.ch-el.offsetHeight;}
if(ppos.x<bpos.sx)ppos.x=bpos.sx;if(ppos.y<bpos.sy)ppos.y=bpos.sy;return ppos;}
this.DragStart=function(ev){if(_C.DragIng)return;var posX;var posY;if(_C.ie){posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft;}else{posY=ev.clientY+window.scrollY;posX=ev.clientX+window.scrollX;}
var st=_C.$(_C.DialogId);if(!st)return;_C.OffsX=posX-parseInt(st.style.left);_C.OffsY=posY-parseInt(st.style.top);with(_C.$(_C.DialogId).style){if(_C.DialogDragAlpha!=-1){if(_C.ie){filter="Alpha(Opacity="+_C.DialogDragAlpha+")";}else{MozOpacity=_C.DialogDragAlpha;}}}
document.onmousemove=_C.DragIt;document.onmouseup=_C.DragEnd;_C.DragIng=true;return _C.StopEvent(ev);}
this.DragIt=function(ev){if(!_C.DragIng)return;var posX;var posY;if(_C.ie){posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft;}else{posX=ev.pageX;posY=ev.pageY;}
var st=_C.$(_C.DialogId);if(!st)return;with(st.style){if(Math.abs((parseInt(left)-(posX-_C.OffsX)))>=_C.DialogDragPixel)left=(posX-_C.OffsX)+"px";if(Math.abs((parseInt(top)-(posY-_C.OffsY)))>=_C.DialogDragPixel)top=(posY-_C.OffsY)+"px";}
if(!_C.DialogLock){var dt=_C.$(_C.DialogId+_C._DOC);if(!dt)return;with(dt.style){left=st.style.left;top=st.style.top;width=st.scrollWidth+"px";for(var i=0;i<dt.childNodes.length;i++){if(dt.childNodes[i].style){dt.childNodes[i].style.width=dt.style.width;}}}}
if(_C.ie&&(_C.DialogLockMode=="hidden"))_C.HideShowCovered();return _C.StopEvent(ev);}
this.DragEnd=function(ev){if(!_C.DragIng)return;if(_C.DialogDragAlpha!=-1){var st=_C.$(_C.DialogId);if(!st)return;if(_C.ie){st.style.filter="Alpha(Opacity="+_C.DialogAlpha+")";}else{st.style.MozOpacity=_C.DialogAlpha;}}
_C.RemoveEvent(document,"mousemove",_C.DragIt);_C.RemoveEvent(document,"mouseup",_C.DragEnd);_C.DragIng=false;}
this.ResizeStart=function(ev){if(_C.ResizeIng)return;ev=window.event||ev;var st=_C.$(_C.DialogId);var stp=_C.GetAbsolutePos(st);st.cx=stp.x;document.onmousemove=_C.ResizeIt;document.onmouseup=_C.ResizeEnd;_C.ResizeIng=true;return _C.StopEvent(ev);}
this.ResizeIt=function(ev){if(!_C.ResizeIng)return;ev=window.event||ev;var st=_C.$(_C.DialogId);st.style.width=(ev.clientX-st.cx)+"px";_C.UpdateDialogSize();}
this.ResizeEnd=function(ev){if(!_C.ResizeIng)return;_C.RemoveEvent(document,"mousemove",_C.ResizeIt);_C.RemoveEvent(document,"mouseup",_C.ResizeEnd);_C.ResizeIng=false;}
this.StopEvent=function(ev){ev||(ev=window.event);if(_C.ie){ev.cancelBubble=true;ev.returnValue=false;}else{ev.preventDefault();ev.stopPropagation();}
return false;}
this.RemoveEvent=function(el,evname,func){if(el.detachEvent){el.detachEvent("on"+evname,func);}else if(el.removeEventListener){el.removeEventListener(evname,func,true);}else{el["on"+evname]=null;}}
this.$=function(en){try{var el=document.getElementById(en);if(el)return el;return false;}catch(e){return false;}}}
var ___Dialog=new Array();function ShowDialog(title,msg,DialogCtrl,DialogType,_DialogWidth,func)
{var ev=null;var action="系统提示";___Dialog[action]=new Dialog();___Dialog[action].DialogFunc=func;___Dialog[action].DialogObject="___Dialog['"+action+"']";___Dialog[action].DialogId+=action;___Dialog[action].DialogLock=true;___Dialog[action].DialogShadowFlag=false;___Dialog[action].DialogResize=false;___Dialog[action].DialogDrag=true;___Dialog[action].DialogWidth=_DialogWidth;___Dialog[action].DialogTop=-1;___Dialog[action].DialogLeft=-1;___Dialog[action].DialogAlign="center";___Dialog[action].DialogCtrl=DialogCtrl;___Dialog[action].DialogTitle=title;___Dialog[action].DialogHtml="<div class='dialog_msg'><img src='"+___Dialog[action]._PICPATH+"dialog-cue.gif' width=30px><span>"+msg+"</span></div>";___Dialog[action].DialogType=DialogType;___Dialog[action].ShowDialog(ev,___Dialog);}