var wtdb=new Array();var vndb=-1;var qpbb=(document.all!=undefined);var cjfb=false;var cpf="";function ptsb(szm,ykr,nkf,ysd,ymq,ysrb){this.m_Dialog=szm;this.m_sName=ykr;this.m_nWidth=nkf;this.m_nHeight=ysd;this.m_sOpaqueLayer=ymq;this.m_fnOnHide=ysrb;}function xqk(vxp){if(cjfb){var Event=((qpbb)?event:vxp);var ptsb=wtdb[vndb];var szm=ptsb.m_Dialog;var xwm=(parseInt(Event.clientX)+gmkb);var nzf=(parseInt(Event.clientY)+tyhb);var qtt=(document.body.clientWidth-1);var lfn=(document.body.clientHeight-1);if((xwm+ptsb.m_nWidth)>=qtt)xwm=(qtt-(ptsb.m_nWidth+1));if((nzf+ptsb.m_nHeight)>=lfn)nzf=(lfn-(ptsb.m_nHeight+1));if(xwm<0)xwm=0;if(nzf<0)nzf=0;szm.style.left=xwm;szm.style.top=nzf;}return(!cjfb);}function skb(vxp){if(vndb>=0){var dvc=wtdb[vndb].m_Dialog;var ymbb=document.getElementById(dvc.id+"TitleBar");if(ymbb!=undefined){var Event=((qpbb)?event:vxp);var gzd=document.getElementById(dvc.id+"TitleIcon");var krt=parseInt(dvc.style.left);var ksrb=parseInt(dvc.style.top);gmkb=(krt-Event.clientX);tyhb=(ksrb-Event.clientY);if((gmkb<=0)&&(Event.clientX<=(krt+wtdb[vndb].m_nWidth))&&(tyhb<=0)&&(Event.clientY<=(ksrb+gzd.height+4))){cjfb=true;document.onmousemove=xqk;}}}return(!cjfb);}function skj(vxp){var kkkb=true;if(cjfb){cjfb=false;kkkb=false;}return(!cjfb);}function rccb(szm,nkf,ysd,ymq,ysrb,lzl){var qdcb;var nmdb=document.getElementById(lzl);
var iebody=(document.compatMode && document.compatMode != "BackCompat")? document.documentElement : document.body;
var dsoctop=document.all? iebody.scrollTop : pageYOffset;
if(nmdb!=undefined){wzz=zvdb(nmdb);kbg=wzz[0];zfj=wzz[1];qdcb=((zfj)-(ysd));if(qdcb<0)qdcb=0;szm.style.top=(qdcb + dsoctop);szm.style.left=((kbg));}else{qdcb=((document.body.clientHeight/2)-(ysd/2));if(qdcb<0)qdcb=0;szm.style.top=(qdcb + dsoctop);szm.style.left=((document.body.clientWidth/2)-(nkf/2));}wtdb[++vndb]=new ptsb(szm,szm.id,nkf,ysd,ymq,ysrb);}function yjd(yhh){if((vndb>=0)&&(wtdb[vndb].m_Dialog.id==yhh)){if(wtdb[vndb].m_fnOnHide!=undefined)wtdb[vndb].m_fnOnHide(wtdb[vndb].m_sName);wtdb[vndb].m_Dialog.style.display="none";if(wtdb[vndb].m_sOpaqueLayer!=undefined)document.getElementById(wtdb[vndb].m_sOpaqueLayer).style.display="none";wtdb[vndb--]=undefined;}}function vvnb(szm,ymq){var mnd=vndb;var zbd=document.getElementById(ymq);while(mnd>0){--mnd;if(wtdb[mnd].m_sOpaqueLayer==ymq){ymq=(wtdb[mnd].m_Dialog.id+"OpaqueLayer");szm.m_sOpaqueLayer=ymq;break;}}return(ymq);}function glv(yhh,cj,ysrb){yjd(cpf);var szm=document.getElementById(yhh);var gy=document.getElementById(yhh+"Body");var nkf=parseInt(szm.style.width);var ysd=parseInt(szm.style.height);if(gy!=undefined){if(!qpbb)gy.style.width=(nkf-2);else gy.style.width=nkf;}if(szm!=undefined){var mxt=(8000+(vndb*2));var ymq=(yhh+"OpaqueLayer");rccb(szm,nkf,ysd,ymq,ysrb);szm.style.display="block";szm.style.zIndex=(mxt+1);var iebody=(document.compatMode && document.compatMode != "BackCompat")? document.documentElement : document.body;var dsoctop=document.all? iebody.scrollTop : pageYOffset;if((cj==undefined)||(cj)){ymq=vvnb(wtdb[vndb],ymq);var zbd=document.getElementById(ymq);if(zbd!=undefined){zbd.style.zIndex=mxt;zbd.style.height=(document.body.clientHeight + dsoctop);
zbd.style.display="block";htbb(zbd);}}var ymbb=document.getElementById(yhh+"TitleBar");if(ymbb!=undefined)ymbb.style.cursor="move";document.onmousedown=skb;document.onmouseup=skj;}}function hkp(yhh,cj,ysrb,lzl,gs,qgd){var szm=document.getElementById(yhh);cpf=yhh;var gy=document.getElementById(yhh+"Body");var nkf,ysd=0;if(gs==undefined)nkf=parseInt(szm.style.width);else nkf=parseInt(gs);if(qgd==undefined)ysd=parseInt(szm.style.height);else ysd=parseInt(qgd);if(gy!=undefined){if(!qpbb){gy.style.width=(nkf-2);gy.style.height=((ysd-102)-2);}else{gy.style.width=nkf;gy.style.height=(ysd-78);}}if(szm!=undefined){rccb(szm,nkf,ysd,undefined,ysrb,lzl);szm.style.display="block";szm.style.zIndex=((8000+(vndb*2))+1);szm.onmouseover=function(){document.onmousedown=function(){return(false);};};szm.onmouseout=function(){document.onmousedown=function(){if(vndb>=0)yjd(yhh);return(false);};};document.onmousedown=function(){if(vndb>=0)yjd(yhh);return(false);};}}function gtw(fzfb,gksb,ysrb){var ymq="",zcn="";var jwb,zn;if((vndb>=0)&&(wtdb[vndb].m_Dialog.id==fzfb)){if(wtdb[vndb].m_fnOnHide!=undefined)wtdb[vndb].m_fnOnHide(fzfb);wtdb[vndb].m_Dialog.style.display="none";ymq=wtdb[vndb].m_sOpaqueLayer;wtdb[vndb--]=undefined;}glv(gksb,false,ysrb);jwb=document.getElementById(ymq);zn=document.getElementById(zcn=vvnb(wtdb[vndb],gksb+"OpaqueLayer"));if((jwb!=undefined)&&(zn!=undefined)){jwb.style.display="none";zn.style.zIndex=jwb.style.zIndex;zn.style.display="block";wtdb[vndb].m_sOpaqueLayer=zcn;}}var rcqb=undefined;function dljb(sclb,nkf,ysd,hpcb,zrv,dyk){rcqb=undefined;if(zrv!=undefined)rcqb=zrv;if(dyk!=undefined)document.getElementById("ImageDialogTitleText").innerHTML=dyk;if((document.getElementById("ImageDialogText")!=undefined)&&(hpcb!=undefined))document.getElementById("ImageDialogText").innerHTML=hpcb;if(document.getElementById("ImageContainer")!=undefined&&sclb!=""&&sclb!=undefined){qnl("ImageDialog","ImageContainer",sclb);}else glv("ImageDialog");}var vybb=undefined;function tdy(sclb,nkf,ysd,hpcb,zrv,dyk,mcc){vybb=undefined;if(zrv!=undefined)vybb=zrv;if(dyk!=undefined)document.getElementById("AdDialogTitleText").innerHTML=dyk;if(mcc!=undefined)document.getElementById("AdDialogBody").style.backgroundColor=mcc;if((document.getElementById("AdDialogText")!=undefined)&&(hpcb!=undefined))document.getElementById("AdDialogText").innerHTML=hpcb;if(document.getElementById("AdImageContainer")!=undefined&&sclb!=""&&sclb!=undefined){qnl("AdDialog","AdImageContainer",sclb);}else glv("AdDialog");}function wdr(){yjd("AdDialog");if(vybb!=undefined)vybb();document.getElementById("AdDialog").style.width=0;document.getElementById("AdDialog").style.height=0;vybb=undefined;}function kmq(){yjd("ImageDialog");if(rcqb!=undefined)rcqb();document.getElementById("ImageDialog").style.width=0;document.getElementById("ImageDialog").style.height=0;rcqb=undefined;}function qnl(tzr,fdhb,lsz){var hsc=document.createElement('img');var bFirstLoad = true;hsc.onload=function(njmb){if(document.getElementById(fdhb)){document.getElementById(fdhb).src=this.src;document.getElementById(fdhb).width=this.width;document.getElementById(fdhb).height=this.height;document.getElementById(tzr).style.width=(this.width+50);document.getElementById(tzr).style.height=(this.height+50);if(bFirstLoad){glv(tzr);bFirstLoad=false;}}this.onload = "";};hsc.onerror=function(njmb){document.getElementById(fdhb).src="";document.getElementById(fdhb).width="0";document.getElementById(fdhb).height="0";};hsc.src="Images/"+lsz;}
function adqnl(tzr,fdhb,lsz){var lmnop=document.createElement('img');var bFirstLoad = true;lmnop.onload=function(njmb){if(document.getElementById(fdhb)){document.getElementById(fdhb).src=this.src;document.getElementById(fdhb).width=this.width;document.getElementById(fdhb).height=this.height;if(bFirstLoad){glv(tzr);bFirstLoad=false;}}};lmnop.onerror=function(njmb){document.getElementById(fdhb).src="";document.getElementById(fdhb).width="0";document.getElementById(fdhb).height="0";};lmnop.src="Images/"+lsz;}