var qftb=new Array();var mbkb=-1;var lqr=(document.all!=undefined);var wgd=(navigator.userAgent.indexOf("Opera")>=0);var pzkb=false;var bsmb="";var fpqb;function lydb(vrw,fjm,nmx,xvf,lhj,rnt){this.m_Dialog=vrw;this.m_sName=fjm;this.m_nWidth=nmx;this.m_nHeight=xvf;this.m_sOpaqueLayer=lhj;this.m_fnOnHide=rnt;}function snj(jnn){if(pzkb){var Event=((lqr)?event:jnn);var lydb=qftb[mbkb];var vrw=lydb.m_Dialog;var btn=(parseInt(Event.clientX)+wwcb);var bfd=(parseInt(Event.clientY)+jzy);var llt=(document.body.clientWidth-1);var zbrb=(document.body.clientHeight-1);if((btn+lydb.m_nWidth)>=llt)btn=(llt-(lydb.m_nWidth+1));if((bfd+lydb.m_nHeight)>=zbrb)bfd=(zbrb-(lydb.m_nHeight+1));if(btn<0)btn=0;if(bfd<0)bfd=0;vrw.style.left=btn;vrw.style.top=bfd;}return(!pzkb);}function mbmb(jnn){if(mbkb>=0){var mtc=qftb[mbkb].m_Dialog;var rwq=document.getElementById(mtc.id+"TitleBar");if(rwq!=undefined){var Event=((lqr)?event:jnn);if(document.getElementById(mtc.id+"TitleIcon")){var pzlb=document.getElementById(mtc.id+"TitleIcon");var tjh=parseInt(mtc.style.left);var hygb=parseInt(mtc.style.top);wwcb=(tjh-Event.clientX);jzy=(hygb-Event.clientY);hqnb=(document.all)?document.body.scrollTop:window.pageYOffset;if((wwcb<=0)&&(Event.clientX<=(tjh+qftb[mbkb].m_nWidth))&&((jzy-hqnb)<=0)&&((Event.clientY+hqnb)<=(hygb+pzlb.height+4))){pzkb=true;document.onmousemove=snj;}}}}document.onmousedown=function(){return(fpqb);};return(!pzkb);}function bbk(jnn){var gbn=true;if(pzkb){pzkb=false;gbn=false;}if(mbkb>=0){var mtc=qftb[mbkb].m_Dialog;mtc.onmousemove=function(){document.onmousedown=mbmb;};}return(!pzkb);}function nvmb(vrw,nmx,xvf,lhj,rnt,wcd,brlb,kml,byb){var glw;var ywz=document.getElementById(wcd);if(ywz!=undefined){jlv=fcq(ywz);jmz=jlv[0];hlbb=jlv[1];if(brlb){glw=((hlbb)+(byb));jmz=((jmz)+(kml));}else{glw=((hlbb)-(xvf));if(wgd)glw=glw-25;}if(glw<0)glw=0;vrw.style.top=glw;vrw.style.left=((jmz));}else{glw=((document.body.clientHeight/2)-(xvf/2));if(glw<0)glw=0;vrw.style.top=glw;vrw.style.left=((document.body.clientWidth/2)-(nmx/2));}qftb[++mbkb]=new lydb(vrw,vrw.id,nmx,xvf,lhj,rnt);}function bjtb(zdlb){if((mbkb>=0)&&(qftb[mbkb].m_Dialog.id==zdlb)){if(qftb[mbkb].m_fnOnHide!=undefined)qftb[mbkb].m_fnOnHide(qftb[mbkb].m_sName);qftb[mbkb].m_Dialog.style.display="none";if(qftb[mbkb].m_sOpaqueLayer!=undefined)document.getElementById(qftb[mbkb].m_sOpaqueLayer).style.display="none";qftb[mbkb--]=undefined;}}function xkbb(vrw,lhj){var ybz=mbkb;var syt=document.getElementById(lhj);while(ybz>0){--ybz;if(qftb[ybz].m_sOpaqueLayer==lhj){lhj=(qftb[ybz].m_Dialog.id+"OpaqueLayer");vrw.m_sOpaqueLayer=lhj;break;}}return(lhj);}function mxv(zdlb,fnrb,rnt){bjtb(bsmb);var vrw=document.getElementById(zdlb);var ryp=document.getElementById(zdlb+"Body");var nmx=parseInt(vrw.style.width);var xvf=parseInt(vrw.style.height);if(ryp!=undefined){if(!lqr||wgd){ryp.style.width=(nmx-2);}else ryp.style.width=nmx;}if(vrw!=undefined){var mry=(8000+(mbkb*2));var lhj=(zdlb+"OpaqueLayer");nvmb(vrw,nmx,xvf,lhj,rnt);vrw.style.display="block";vrw.style.zIndex=(mry+1);if((fnrb==undefined)||(fnrb)){lhj=xkbb(qftb[mbkb],lhj);var syt=document.getElementById(lhj);if(syt!=undefined){syt.style.zIndex=mry;if(AW.ie){gxc=(document.body.scrollHeight>document.body.offsetHeight?document.body.scrollHeight:document.body.offsetHeight+'px');syt.style.height=gxc;}syt.style.display="block";}}var rwq=document.getElementById(zdlb+"TitleBar");if(rwq!=undefined)rwq.style.cursor="move";fpqb=document.onmousedown;document.onmousedown=mbmb;document.onmouseup=bbk;vrw.onmouseover=function(){document.onmousedown=mbmb;};}}function jzcb(zdlb,fnrb,rnt,wcd,vcfb,gdp,brlb,kml,byb){var vrw=document.getElementById(zdlb);bsmb=zdlb;var ryp=document.getElementById(zdlb+"Body");var nmx,xvf=0;if(vcfb==undefined)nmx=parseInt(vrw.style.width);else nmx=parseInt(vcfb);if(gdp==undefined)xvf=parseInt(vrw.style.height);else xvf=parseInt(gdp);if(ryp!=undefined){if(!lqr){ryp.style.width=(nmx-2);ryp.style.height=((xvf-102)-2);}else{ryp.style.width=nmx;ryp.style.height=(xvf-78);}}if(vrw!=undefined){nvmb(vrw,nmx,xvf,undefined,rnt,wcd,brlb,kml,byb);vrw.style.display="block";vrw.style.zIndex=((8000+(mbkb*2))+1);var lvtb=document.onmousedown;vrw.onmouseover=function(){document.onmousedown=function(){return(lvtb);};};vrw.onmouseout=function(){document.onmousedown=function(){if(mbkb>=0)bjtb(zdlb);return(lvtb);};};vrw.onmousedown=function(){return(false);};document.onmousedown=function(){if(mbkb>=0)bjtb(zdlb);return(lvtb);};}}function rjw(zmtb,vxlb,rnt){var lhj="",xxhb="";var fcw,ccp;if((mbkb>=0)&&(qftb[mbkb].m_Dialog.id==zmtb)){if(qftb[mbkb].m_fnOnHide!=undefined)qftb[mbkb].m_fnOnHide(zmtb);qftb[mbkb].m_Dialog.style.display="none";lhj=qftb[mbkb].m_sOpaqueLayer;qftb[mbkb--]=undefined;}mxv(vxlb,false,rnt);fcw=document.getElementById(lhj);ccp=document.getElementById(xxhb=xkbb(qftb[mbkb],vxlb+"OpaqueLayer"));if((fcw!=undefined)&&(ccp!=undefined)){fcw.style.display="none";ccp.style.zIndex=fcw.style.zIndex;ccp.style.display="block";qftb[mbkb].m_sOpaqueLayer=xxhb;}}function jql(rpc,wkz,xvm,pr){var nnmb=sqr(rpc,wkz,xvm,70,undefined,pr);return(nnmb);}