var wtf=new Array();var vhp=-1;var jllb=(document.all!=undefined);var jgs=(navigator.userAgent.indexOf("Opera")>=0);var ytjb=false;var lck="";var qssb;function gcc(vvt,jvz,mxm,tdpb,ymv,cndb){this.m_Dialog=vvt;this.m_sName=jvz;this.m_nWidth=mxm;this.m_nHeight=tdpb;this.m_sOpaqueLayer=ymv;this.m_fnOnHide=cndb;}function jzd(qjrb){if(ytjb){var Event=((jllb)?event:qjrb);var gcc=wtf[vhp];var vvt=gcc.m_Dialog;var pbfb=(parseInt(Event.clientX)+xgs);var jhm=(parseInt(Event.clientY)+mng);var prb=(document.body.clientWidth-1);var frm=(document.body.clientHeight-1);if((pbfb+gcc.m_nWidth)>=prb)pbfb=(prb-(gcc.m_nWidth+1));if((jhm+gcc.m_nHeight)>=frm)jhm=(frm-(gcc.m_nHeight+1));if(pbfb<0)pbfb=0;if(jhm<0)jhm=0;vvt.style.left=pbfb;vvt.style.top=jhm;}return(!ytjb);}function nxt(qjrb){if(vhp>=0){var dydb=wtf[vhp].m_Dialog;var fjx=document.getElementById(dydb.id+"TitleBar");if(fjx!=undefined){var Event=((jllb)?event:qjrb);if(document.getElementById(dydb.id+"TitleIcon")){var mdqb=document.getElementById(dydb.id+"TitleIcon");var czh=parseInt(dydb.style.left);var grb=parseInt(dydb.style.top);xgs=(czh-Event.clientX);mng=(grb-Event.clientY);fvm=(document.all)?document.body.scrollTop:window.pageYOffset;if((xgs<=0)&&(Event.clientX<=(czh+wtf[vhp].m_nWidth))&&((mng-fvm)<=0)&&((Event.clientY+fvm)<=(grb+mdqb.height+4))){ytjb=true;document.onmousemove=jzd;}}}}document.onmousedown=function(){return(qssb);};return(!ytjb);}function prk(qjrb){var fnk=true;if(ytjb){ytjb=false;fnk=false;}if(vhp>=0){var dydb=document.getElementById(wtf[vhp].m_sName+"TitleBar");dydb.onmousemove=function(){document.onmousedown=nxt;};}return(!ytjb);}function pqfb(vvt,mxm,tdpb,ymv,cndb,zqj,mrqb,rxc,mz){var tkvb;var fmkb=document.getElementById(zqj);var hfl=document.body.scrollTop;if(hfl==0){if(window.pageYOffset)hfl=window.pageYOffset;else hfl=(document.body.parentElement)?document.body.parentElement.scrollTop:0;}if(fmkb!=undefined){kcjb=ypp(fmkb);qmj=kcjb[0];ztv=kcjb[1];if(mrqb){tkvb=((ztv)+(mz));qmj=((qmj)+(rxc));}else{tkvb=((ztv)-(tdpb));if(jgs)tkvb=tkvb-25;}if(tkvb<0)tkvb=0;vvt.style.top=tkvb;vvt.style.left=((qmj));}else{tkvb=((document.body.clientHeight/2)-(tdpb/2));if(tkvb<0)tkvb=0;if(hfl>0)tkvb+=hfl;vvt.style.top=tkvb;vvt.style.left=((document.body.clientWidth/2)-(mxm/2));}wtf[++vhp]=new gcc(vvt,vvt.id,mxm,tdpb,ymv,cndb);}function srz(vmn,fvrb){var stjb=vhp;if(fvrb){for(var vww=0;vww<wtf.length;vww++){if(wtf[vww]!=undefined&&wtf[vww].m_Dialog.id==vmn){vhp=vww;break;}}}if((vhp>=0)&&(wtf[vhp]!=undefined)&&(wtf[vhp].m_Dialog.id==vmn||fvrb)){if(wtf[vhp].m_fnOnHide!=undefined)wtf[vhp].m_fnOnHide(wtf[vhp].m_sName);wtf[vhp].m_Dialog.style.display="none";if(wtf[vhp].m_sOpaqueLayer!=undefined)document.getElementById(wtf[vhp].m_sOpaqueLayer).style.display="none";if(fvrb){wtf[vhp]=undefined;if(vhp==stjb)vhp--;else vhp=stjb;}else wtf[vhp--]=undefined;}}function rfd(vvt,ymv){var hkfb=vhp;var ktnb=document.getElementById(ymv);while(hkfb>0){--hkfb;if(wtf[hkfb].m_sOpaqueLayer==ymv){ymv=(wtf[hkfb].m_Dialog.id+"OpaqueLayer");vvt.m_sOpaqueLayer=ymv;break;}}return(ymv);}function vws(vmn,wky,cndb){srz(lck);var vvt=document.getElementById(vmn);var glfb=document.getElementById(vmn+"Body");var mxm=parseInt(vvt.style.width);var tdpb=parseInt(vvt.style.height);if(glfb!=undefined){if(!jllb||jgs){glfb.style.width=(mxm-2);}else glfb.style.width=mxm;}if(vvt!=undefined){var cdpb=(8000+(vhp*2));var ymv=(vmn+"OpaqueLayer");pqfb(vvt,mxm,tdpb,ymv,cndb);vvt.style.display="block";vvt.style.zIndex=(cdpb+1);if((wky==undefined)||(wky)){ymv=rfd(wtf[vhp],ymv);var ktnb=document.getElementById(ymv);if(ktnb!=undefined){ktnb.style.zIndex=cdpb;if(AW.ie){wpjb=(document.body.scrollHeight>document.body.offsetHeight?document.body.scrollHeight:document.body.offsetHeight+'px');ktnb.style.height=wpjb;}ktnb.style.display="block";}}var fjx=document.getElementById(vmn+"TitleBar");if(fjx!=undefined)fjx.style.cursor="move";qssb=document.onmousedown;document.onmousedown=nxt;document.onmouseup=prk;fjx.onmouseover=function(){document.onmousedown=nxt;};}}function qlf(vmn,wky,cndb,zqj,sny,wlp,mrqb,rxc,mz,zms){var vvt;if(zms!=undefined){lck=zms;vvt=document.getElementById(zms);}else{lck=vmn;vvt=document.getElementById(vmn);}var glfb=document.getElementById(vmn+"Body");var mxm,tdpb=0;if(sny==undefined)mxm=parseInt(vvt.style.width);else mxm=parseInt(sny);if(wlp==undefined)tdpb=parseInt(vvt.style.height);else tdpb=parseInt(wlp);if(glfb!=undefined){if(!jllb){glfb.style.width=(mxm-2);glfb.style.height=((tdpb-102)-2);}else{glfb.style.width=mxm;glfb.style.height=(tdpb-78);}}if(vvt!=undefined){pqfb(vvt,mxm,tdpb,undefined,cndb,zqj,mrqb,rxc,mz);vvt.style.display="block";vvt.style.zIndex=((8000+(vhp*2))+1);var hcm=document.onmousedown;vvt.onmouseover=function(){document.onmousedown=function(){return(hcm);};};vvt.onmouseout=function(){document.onmousedown=function(){if(vhp>=0)srz(vmn,true);return(hcm);};};vvt.onmousedown=function(){return(false);};document.onmousedown=function(){if(vhp>=0)srz(vmn,true);return(hcm);};}}function hjq(qjk,hqz,cndb){var ymv="",djmb="";var vzv,wcjb;if((vhp>=0)&&(wtf[vhp].m_Dialog.id==qjk)){if(wtf[vhp].m_fnOnHide!=undefined)wtf[vhp].m_fnOnHide(qjk);wtf[vhp].m_Dialog.style.display="none";ymv=wtf[vhp].m_sOpaqueLayer;wtf[vhp--]=undefined;}vws(hqz,false,cndb);vzv=document.getElementById(ymv);wcjb=document.getElementById(djmb=rfd(wtf[vhp],hqz+"OpaqueLayer"));if((vzv!=undefined)&&(wcjb!=undefined)){vzv.style.display="none";wcjb.style.zIndex=vzv.style.zIndex;wcjb.style.display="block";wtf[vhp].m_sOpaqueLayer=djmb;}}function svnb(sff,gmbb,cdw,jhw){var bndb=syq(sff,gmbb,cdw,75,undefined,jhw);return(bndb);}