var whp=new Array();var rtc=-1;var hqq=(document.all!=undefined);var wxy=(navigator.userAgent.indexOf("Opera")>=0);var pqp=false;var bkx="";var sbbb;function npqb(wrh,cgl,nmnb,pzb,xtmb,bgvb){this.m_Dialog=wrh;this.m_sName=cgl;this.m_nWidth=nmnb;this.m_nHeight=pzb;this.m_sOpaqueLayer=xtmb;this.m_fnOnHide=bgvb;}function dkwb(mfwb){if(pqp){var Event=((hqq)?event:mfwb);var npqb=whp[rtc];var wrh=npqb.m_Dialog;var kls=(parseInt(Event.clientX)+pdfb);var sghb=(parseInt(Event.clientY)+qjbb);var yjtb=(document.body.clientWidth-1);var wvq=(document.body.clientHeight-1);if((kls+npqb.m_nWidth)>=yjtb)kls=(yjtb-(npqb.m_nWidth+1));if((sghb+npqb.m_nHeight)>=wvq)sghb=(wvq-(npqb.m_nHeight+1));if(kls<0)kls=0;if(sghb<0)sghb=0;wrh.style.left=kls;wrh.style.top=sghb;}return(!pqp);}function gnf(mfwb){if(rtc>=0){var lsf=whp[rtc].m_Dialog;var kgv=document.getElementById(lsf.id+"TitleBar");if(kgv!=undefined){var Event=((hqq)?event:mfwb);if(document.getElementById(lsf.id+"TitleIcon")){var rbr=document.getElementById(lsf.id+"TitleIcon");var mpmb=parseInt(lsf.style.left);var pbk=parseInt(lsf.style.top);pdfb=(mpmb-Event.clientX);qjbb=(pbk-Event.clientY);wsv=(document.all)?document.body.scrollTop:window.pageYOffset;if((pdfb<=0)&&(Event.clientX<=(mpmb+whp[rtc].m_nWidth))&&((qjbb-wsv)<=0)&&((Event.clientY+wsv)<=(pbk+rbr.height+4))){pqp=true;document.onmousemove=dkwb;}}}}document.onmousedown=function(){return(sbbb);};return(!pqp);}function kgqb(mfwb){var bpgb=true;if(pqp){pqp=false;bpgb=false;}if(rtc>=0){var lsf=whp[rtc].m_Dialog;lsf.onmousemove=function(){document.onmousedown=gnf;};}return(!pqp);}function vjmb(wrh,nmnb,pzb,xtmb,bgvb,fdf,ngt,hyz,smh){var gfk;var djpb=document.getElementById(fdf);if(djpb!=undefined){xl=wdrb(djpb);gv=xl[0];mvpb=xl[1];if(ngt){gfk=((mvpb)+(smh));gv=((gv)+(hyz));}else{gfk=((mvpb)-(pzb));if(wxy)gfk=gfk-25;}if(gfk<0)gfk=0;wrh.style.top=gfk;wrh.style.left=((gv));}else{gfk=((document.body.clientHeight/2)-(pzb/2));if(gfk<0)gfk=0;wrh.style.top=gfk;wrh.style.left=((document.body.clientWidth/2)-(nmnb/2));}whp[++rtc]=new npqb(wrh,wrh.id,nmnb,pzb,xtmb,bgvb);}function chgb(tqkb){if((rtc>=0)&&(whp[rtc].m_Dialog.id==tqkb)){if(whp[rtc].m_fnOnHide!=undefined)whp[rtc].m_fnOnHide(whp[rtc].m_sName);whp[rtc].m_Dialog.style.display="none";if(whp[rtc].m_sOpaqueLayer!=undefined)document.getElementById(whp[rtc].m_sOpaqueLayer).style.display="none";whp[rtc--]=undefined;}}function bkdb(wrh,xtmb){var thv=rtc;var wgq=document.getElementById(xtmb);while(thv>0){--thv;if(whp[thv].m_sOpaqueLayer==xtmb){xtmb=(whp[thv].m_Dialog.id+"OpaqueLayer");wrh.m_sOpaqueLayer=xtmb;break;}}return(xtmb);}function gbp(tqkb,xwr,bgvb){chgb(bkx);var wrh=document.getElementById(tqkb);var gct=document.getElementById(tqkb+"Body");var nmnb=parseInt(wrh.style.width);var pzb=parseInt(wrh.style.height);if(gct!=undefined){if(!hqq||wxy){gct.style.width=(nmnb-2);}else gct.style.width=nmnb;}if(wrh!=undefined){var hhlb=(8000+(rtc*2));var xtmb=(tqkb+"OpaqueLayer");vjmb(wrh,nmnb,pzb,xtmb,bgvb);wrh.style.display="block";wrh.style.zIndex=(hhlb+1);if((xwr==undefined)||(xwr)){xtmb=bkdb(whp[rtc],xtmb);var wgq=document.getElementById(xtmb);if(wgq!=undefined){wgq.style.zIndex=hhlb;if(AW.ie){nnp=(document.body.scrollHeight>document.body.offsetHeight?document.body.scrollHeight:document.body.offsetHeight+'px');wgq.style.height=nnp;}wgq.style.display="block";}}var kgv=document.getElementById(tqkb+"TitleBar");if(kgv!=undefined)kgv.style.cursor="move";sbbb=document.onmousedown;document.onmousedown=gnf;document.onmouseup=kgqb;wrh.onmouseover=function(){document.onmousedown=gnf;};}}function zrgb(tqkb,xwr,bgvb,fdf,kgkb,jsn,ngt,hyz,smh){var wrh=document.getElementById(tqkb);bkx=tqkb;var gct=document.getElementById(tqkb+"Body");var nmnb,pzb=0;if(kgkb==undefined)nmnb=parseInt(wrh.style.width);else nmnb=parseInt(kgkb);if(jsn==undefined)pzb=parseInt(wrh.style.height);else pzb=parseInt(jsn);if(gct!=undefined){if(!hqq){gct.style.width=(nmnb-2);gct.style.height=((pzb-102)-2);}else{gct.style.width=nmnb;gct.style.height=(pzb-78);}}if(wrh!=undefined){vjmb(wrh,nmnb,pzb,undefined,bgvb,fdf,ngt,hyz,smh);wrh.style.display="block";wrh.style.zIndex=((8000+(rtc*2))+1);var rqqb=document.onmousedown;wrh.onmouseover=function(){document.onmousedown=function(){return(rqqb);};};wrh.onmouseout=function(){document.onmousedown=function(){if(rtc>=0)chgb(tqkb);return(rqqb);};};wrh.onmousedown=function(){return(false);};document.onmousedown=function(){if(rtc>=0)chgb(tqkb);return(rqqb);};}}function pffb(rzkb,cqkb,bgvb){var xtmb="",yntb="";var ngvb,zxz;if((rtc>=0)&&(whp[rtc].m_Dialog.id==rzkb)){if(whp[rtc].m_fnOnHide!=undefined)whp[rtc].m_fnOnHide(rzkb);whp[rtc].m_Dialog.style.display="none";xtmb=whp[rtc].m_sOpaqueLayer;whp[rtc--]=undefined;}gbp(cqkb,false,bgvb);ngvb=document.getElementById(xtmb);zxz=document.getElementById(yntb=bkdb(whp[rtc],cqkb+"OpaqueLayer"));if((ngvb!=undefined)&&(zxz!=undefined)){ngvb.style.display="none";zxz.style.zIndex=ngvb.style.zIndex;zxz.style.display="block";whp[rtc].m_sOpaqueLayer=yntb;}}function wmcb(qnbb,msy,tgqb,cthb){var xcbb=wfz(qnbb,msy,tgqb,70,undefined,cthb);return(xcbb);}