Dialog.js
上传用户:q2283699q
上传日期:2022-05-17
资源大小:10704k
文件大小:5k
- var qml=new Array();var sfcb=-1;var jpdb=(document.all!=undefined);var rvjb=(navigator.userAgent.indexOf("Opera")>=0);var sjrb=false;var ytlb="";var rvpb;function rxjb(hqrb,nl,rbd,whjb,lqmb,fcpb){this.m_Dialog=hqrb;this.m_sName=nl;this.m_nWidth=rbd;this.m_nHeight=whjb;this.m_sOpaqueLayer=lqmb;this.m_fnOnHide=fcpb;}function brh(mls){if(sjrb){var Event=((jpdb)?event:mls);var rxjb=qml[sfcb];var hqrb=rxjb.m_Dialog;var vzk=(parseInt(Event.clientX)+wqp);var qfpb=(parseInt(Event.clientY)+kcp);var phjb=(document.body.clientWidth-1);var jqk=(document.body.clientHeight-1);if((vzk+rxjb.m_nWidth)>=phjb)vzk=(phjb-(rxjb.m_nWidth+1));if((qfpb+rxjb.m_nHeight)>=jqk)qfpb=(jqk-(rxjb.m_nHeight+1));if(vzk<0)vzk=0;if(qfpb<0)qfpb=0;hqrb.style.left=vzk;hqrb.style.top=qfpb;}return(!sjrb);}function nhc(mls){if(sfcb>=0){var xyy=qml[sfcb].m_Dialog;var cftb=document.getElementById(xyy.id+"TitleBar");if(cftb!=undefined){var Event=((jpdb)?event:mls);if(document.getElementById(xyy.id+"TitleIcon")){var yvdb=document.getElementById(xyy.id+"TitleIcon");var nfd=parseInt(xyy.style.left);var sxtb=parseInt(xyy.style.top);wqp=(nfd-Event.clientX);kcp=(sxtb-Event.clientY);jlwb=(document.all)?document.body.scrollTop:window.pageYOffset;if((wqp<=0)&&(Event.clientX<=(nfd+qml[sfcb].m_nWidth))&&((kcp-jlwb)<=0)&&((Event.clientY+jlwb)<=(sxtb+yvdb.height+4))){sjrb=true;document.onmousemove=brh;}}}}document.onmousedown=function(){return(rvpb);};return(!sjrb);}function gjl(mls){var vnv=true;if(sjrb){sjrb=false;vnv=false;}if(sfcb>=0){var xyy=qml[sfcb].m_Dialog;xyy.onmousemove=function(){document.onmousedown=nhc;};}return(!sjrb);}function drrb(hqrb,rbd,whjb,lqmb,fcpb,zhqb,dyhb,lgv,dmc){var zyl;var bzc=document.getElementById(zhqb);if(bzc!=undefined){bydb=phn(bzc);yyk=bydb[0];lmtb=bydb[1];if(dyhb){zyl=((lmtb)+(dmc));yyk=((yyk)+(lgv));}else{zyl=((lmtb)-(whjb));if(rvjb)zyl=zyl-25;}if(zyl<0)zyl=0;hqrb.style.top=zyl;hqrb.style.left=((yyk));}else{zyl=((document.body.clientHeight/2)-(whjb/2));if(zyl<0)zyl=0;hqrb.style.top=zyl;hqrb.style.left=((document.body.clientWidth/2)-(rbd/2));}qml[++sfcb]=new rxjb(hqrb,hqrb.id,rbd,whjb,lqmb,fcpb);}function xk(lttb){if((sfcb>=0)&&(qml[sfcb].m_Dialog.id==lttb)){if(qml[sfcb].m_fnOnHide!=undefined)qml[sfcb].m_fnOnHide(qml[sfcb].m_sName);qml[sfcb].m_Dialog.style.display="none";if(qml[sfcb].m_sOpaqueLayer!=undefined)document.getElementById(qml[sfcb].m_sOpaqueLayer).style.display="none";qml[sfcb--]=undefined;}}function fmr(hqrb,lqmb){var gchb=sfcb;var yrm=document.getElementById(lqmb);while(gchb>0){--gchb;if(qml[gchb].m_sOpaqueLayer==lqmb){lqmb=(qml[gchb].m_Dialog.id+"OpaqueLayer");hqrb.m_sOpaqueLayer=lqmb;break;}}return(lqmb);}function dxs(lttb,gfpb,fcpb){xk(ytlb);var hqrb=document.getElementById(lttb);var gyz=document.getElementById(lttb+"Body");var rbd=parseInt(hqrb.style.width);var whjb=parseInt(hqrb.style.height);if(gyz!=undefined){if(!jpdb||rvjb){gyz.style.width=(rbd-2);}else gyz.style.width=rbd;}if(hqrb!=undefined){var jft=(8000+(sfcb*2));var lqmb=(lttb+"OpaqueLayer");drrb(hqrb,rbd,whjb,lqmb,fcpb);hqrb.style.display="block";hqrb.style.zIndex=(jft+1);if((gfpb==undefined)||(gfpb)){lqmb=fmr(qml[sfcb],lqmb);var yrm=document.getElementById(lqmb);if(yrm!=undefined){yrm.style.zIndex=jft;if(AW.ie){nplb=(document.body.scrollHeight>document.body.offsetHeight?document.body.scrollHeight:document.body.offsetHeight+'px');yrm.style.height=nplb;}yrm.style.display="block";}}var cftb=document.getElementById(lttb+"TitleBar");if(cftb!=undefined)cftb.style.cursor="move";rvpb=document.onmousedown;document.onmousedown=nhc;document.onmouseup=gjl;hqrb.onmouseover=function(){document.onmousedown=nhc;};}}function mqrb(lttb,gfpb,fcpb,zhqb,sgm,wrs,dyhb,lgv,dmc){var hqrb=document.getElementById(lttb);ytlb=lttb;var gyz=document.getElementById(lttb+"Body");var rbd,whjb=0;if(sgm==undefined)rbd=parseInt(hqrb.style.width);else rbd=parseInt(sgm);if(wrs==undefined)whjb=parseInt(hqrb.style.height);else whjb=parseInt(wrs);if(gyz!=undefined){if(!jpdb){gyz.style.width=(rbd-2);gyz.style.height=((whjb-102)-2);}else{gyz.style.width=rbd;gyz.style.height=(whjb-78);}}if(hqrb!=undefined){drrb(hqrb,rbd,whjb,undefined,fcpb,zhqb,dyhb,lgv,dmc);hqrb.style.display="block";hqrb.style.zIndex=((8000+(sfcb*2))+1);var tmnb=document.onmousedown;hqrb.onmouseover=function(){document.onmousedown=function(){return(tmnb);};};hqrb.onmouseout=function(){document.onmousedown=function(){if(sfcb>=0)xk(lttb);return(tmnb);};};hqrb.onmousedown=function(){return(false);};document.onmousedown=function(){if(sfcb>=0)xk(lttb);return(tmnb);};}}function yhd(ffp,qtlb,fcpb){var lqmb="",kprb="";var fddb,zldb;if((sfcb>=0)&&(qml[sfcb].m_Dialog.id==ffp)){if(qml[sfcb].m_fnOnHide!=undefined)qml[sfcb].m_fnOnHide(ffp);qml[sfcb].m_Dialog.style.display="none";lqmb=qml[sfcb].m_sOpaqueLayer;qml[sfcb--]=undefined;}dxs(qtlb,false,fcpb);fddb=document.getElementById(lqmb);zldb=document.getElementById(kprb=fmr(qml[sfcb],qtlb+"OpaqueLayer"));if((fddb!=undefined)&&(zldb!=undefined)){fddb.style.display="none";zldb.style.zIndex=fddb.style.zIndex;zldb.style.display="block";qml[sfcb].m_sOpaqueLayer=kprb;}}function kzkb(vtp,pvy,gbf,wkjb){var kc=fjy(vtp,pvy,gbf,70,undefined,wkjb);return(kc);}