var jhvb=new Array();var mlqb=-1;var gzw=(document.all!=undefined);var trnb=(navigator.userAgent.indexOf("Opera")>=0);var spf=false;var vxg="";var nhm;function bvd(vpqb,hlw,dps,hdz,ssfb,bfy){this.m_Dialog=vpqb;this.m_sName=hlw;this.m_nWidth=dps;this.m_nHeight=hdz;this.m_sOpaqueLayer=ssfb;this.m_fnOnHide=bfy;}function wkx(pjjb){if(spf){var Event=((gzw)?event:pjjb);var bvd=jhvb[mlqb];var vpqb=bvd.m_Dialog;var ql=(parseInt(Event.clientX)+jlx);var tctb=(parseInt(Event.clientY)+wnnb);var dz=(document.body.clientWidth-1);var fsbb=(document.body.clientHeight-1);if((ql+bvd.m_nWidth)>=dz)ql=(dz-(bvd.m_nWidth+1));if((tctb+bvd.m_nHeight)>=fsbb)tctb=(fsbb-(bvd.m_nHeight+1));if(ql<0)ql=0;if(tctb<0)tctb=0;vpqb.style.left=ql;vpqb.style.top=tctb;}return(!spf);}function gsv(pjjb){if(mlqb>=0){var wcw=jhvb[mlqb].m_Dialog;var qfjb=document.getElementById(wcw.id+"TitleBar");if(qfjb!=undefined){var Event=((gzw)?event:pjjb);if(document.getElementById(wcw.id+"TitleIcon")){var wrc=document.getElementById(wcw.id+"TitleIcon");var wf=parseInt(wcw.style.left);var nqhb=parseInt(wcw.style.top);jlx=(wf-Event.clientX);wnnb=(nqhb-Event.clientY);nxf=(document.all)?document.body.scrollTop:window.pageYOffset;if((jlx<=0)&&(Event.clientX<=(wf+jhvb[mlqb].m_nWidth))&&((wnnb-nxf)<=0)&&((Event.clientY+nxf)<=(nqhb+wrc.height+4))){spf=true;document.onmousemove=wkx;}}}}document.onmousedown=function(){return(nhm);};return(!spf);}function hcr(pjjb){var wfdb=true;if(spf){spf=false;wfdb=false;}if(mlqb>=0){var wcw=jhvb[mlqb].m_Dialog;wcw.onmousemove=function(){document.onmousedown=gsv;};}return(!spf);}function fgd(vpqb,dps,hdz,ssfb,bfy,pkv,wrb,mvr,zwz){var swh;var xqtb=document.getElementById(pkv);if(xqtb!=undefined){zgz=xxf(xqtb);ptg=zgz[0];jzx=zgz[1];if(wrb){swh=((jzx)+(zwz));ptg=((ptg)+(mvr));}else{swh=((jzx)-(hdz));if(trnb)swh=swh-25;}if(swh<0)swh=0;vpqb.style.top=swh;vpqb.style.left=((ptg));}else{swh=((document.body.clientHeight/2)-(hdz/2));if(swh<0)swh=0;vpqb.style.top=swh;vpqb.style.left=((document.body.clientWidth/2)-(dps/2));}jhvb[++mlqb]=new bvd(vpqb,vpqb.id,dps,hdz,ssfb,bfy);}function qmmb(bnsb){if((mlqb>=0)&&(jhvb[mlqb].m_Dialog.id==bnsb)){if(jhvb[mlqb].m_fnOnHide!=undefined)jhvb[mlqb].m_fnOnHide(jhvb[mlqb].m_sName);jhvb[mlqb].m_Dialog.style.display="none";if(jhvb[mlqb].m_sOpaqueLayer!=undefined)document.getElementById(jhvb[mlqb].m_sOpaqueLayer).style.display="none";jhvb[mlqb--]=undefined;}}function thf(vpqb,ssfb){var xrj=mlqb;var jthb=document.getElementById(ssfb);while(xrj>0){--xrj;if(jhvb[xrj].m_sOpaqueLayer==ssfb){ssfb=(jhvb[xrj].m_Dialog.id+"OpaqueLayer");vpqb.m_sOpaqueLayer=ssfb;break;}}return(ssfb);}function slmb(bnsb,pfr,bfy){qmmb(vxg);var vpqb=document.getElementById(bnsb);var scwb=document.getElementById(bnsb+"Body");var dps=parseInt(vpqb.style.width);var hdz=parseInt(vpqb.style.height);if(scwb!=undefined){if(!gzw||trnb){scwb.style.width=(dps-2);}else scwb.style.width=dps;}if(vpqb!=undefined){var bpr=(8000+(mlqb*2));var ssfb=(bnsb+"OpaqueLayer");fgd(vpqb,dps,hdz,ssfb,bfy);vpqb.style.display="block";vpqb.style.zIndex=(bpr+1);if((pfr==undefined)||(pfr)){ssfb=thf(jhvb[mlqb],ssfb);var jthb=document.getElementById(ssfb);if(jthb!=undefined){jthb.style.zIndex=bpr;if(AW.ie){ddlb=(document.body.scrollHeight>document.body.offsetHeight?document.body.scrollHeight:document.body.offsetHeight+'px');jthb.style.height=ddlb;}jthb.style.display="block";}}var qfjb=document.getElementById(bnsb+"TitleBar");if(qfjb!=undefined)qfjb.style.cursor="move";nhm=document.onmousedown;document.onmousedown=gsv;document.onmouseup=hcr;vpqb.onmouseover=function(){document.onmousedown=gsv;};}}function kjz(bnsb,pfr,bfy,pkv,wys,psnb,wrb,mvr,zwz){var vpqb=document.getElementById(bnsb);vxg=bnsb;var scwb=document.getElementById(bnsb+"Body");var dps,hdz=0;if(wys==undefined)dps=parseInt(vpqb.style.width);else dps=parseInt(wys);if(psnb==undefined)hdz=parseInt(vpqb.style.height);else hdz=parseInt(psnb);if(scwb!=undefined){if(!gzw){scwb.style.width=(dps-2);scwb.style.height=((hdz-102)-2);}else{scwb.style.width=dps;scwb.style.height=(hdz-78);}}if(vpqb!=undefined){fgd(vpqb,dps,hdz,undefined,bfy,pkv,wrb,mvr,zwz);vpqb.style.display="block";vpqb.style.zIndex=((8000+(mlqb*2))+1);var dkg=document.onmousedown;vpqb.onmouseover=function(){document.onmousedown=function(){return(dkg);};};vpqb.onmouseout=function(){document.onmousedown=function(){if(mlqb>=0)qmmb(bnsb);return(dkg);};};vpqb.onmousedown=function(){return(false);};document.onmousedown=function(){if(mlqb>=0)qmmb(bnsb);return(dkg);};}}function wvfb(glm,yhnb,bfy){var ssfb="",jdz="";var ghbb,dsb;if((mlqb>=0)&&(jhvb[mlqb].m_Dialog.id==glm)){if(jhvb[mlqb].m_fnOnHide!=undefined)jhvb[mlqb].m_fnOnHide(glm);jhvb[mlqb].m_Dialog.style.display="none";ssfb=jhvb[mlqb].m_sOpaqueLayer;jhvb[mlqb--]=undefined;}slmb(yhnb,false,bfy);ghbb=document.getElementById(ssfb);dsb=document.getElementById(jdz=thf(jhvb[mlqb],yhnb+"OpaqueLayer"));if((ghbb!=undefined)&&(dsb!=undefined)){ghbb.style.display="none";dsb.style.zIndex=ghbb.style.zIndex;dsb.style.display="block";jhvb[mlqb].m_sOpaqueLayer=jdz;}}function ghr(dfj,pxz,qqj,gtz){var rtl=tnpb(dfj,pxz,qqj,70,undefined,gtz);return(rtl);}