var brq=new Array();var nglb=-1;var smqb=(document.all!=undefined);var ccqb=(navigator.userAgent.indexOf("Opera")>=0);var ctw=false;var fftb="";var bynb;function jhc(byg,cqsb,nvvb,ncg,bgmb,dbmb){this.m_Dialog=byg;this.m_sName=cqsb;this.m_nWidth=nvvb;this.m_nHeight=ncg;this.m_sOpaqueLayer=bgmb;this.m_fnOnHide=dbmb;}function dvd(wlq){if(ctw){var Event=((smqb)?event:wlq);var jhc=brq[nglb];var byg=jhc.m_Dialog;var xmt=(parseInt(Event.clientX)+ssj);var hvlb=(parseInt(Event.clientY)+ymy);var hfn=(document.body.clientWidth-1);var pyh=(document.body.clientHeight-1);if((xmt+jhc.m_nWidth)>=hfn)xmt=(hfn-(jhc.m_nWidth+1));
if(xmt<0)xmt=0;if(hvlb<0)hvlb=0;byg.style.left=xmt;byg.style.top=hvlb;}return(!ctw);}function mhcb(wlq){if(nglb>=0){var kts=brq[nglb].m_Dialog;var bchb=document.getElementById(kts.id+"TitleBar");if(bchb!=undefined){var Event=((smqb)?event:wlq);if(document.getElementById(kts.id+"TitleIcon")){var tcl=document.getElementById(kts.id+"TitleIcon");var nnpb=parseInt(kts.style.left);var qyz=parseInt(kts.style.top);ssj=(nnpb-Event.clientX);ymy=(qyz-Event.clientY);qbrb=(document.all)?document.body.scrollTop:window.pageYOffset;if((ssj<=0)&&(Event.clientX<=(nnpb+brq[nglb].m_nWidth))&&((ymy-qbrb)<=0)&&((Event.clientY+qbrb)<=(qyz+tcl.height+4))){ctw=true;document.onmousemove=dvd;}}}}document.onmousedown=function(){return(bynb);};return(!ctw);}function rksb(wlq){var svrb=true;if(ctw){ctw=false;svrb=false;}if(nglb>=0){var kts=document.getElementById(brq[nglb].m_sName+"TitleBar");kts.onmousemove=function(){document.onmousedown=mhcb;};}return(!ctw);}function twkb(byg,nvvb,ncg,bgmb,dbmb,fvmb,brg,glq,nzg){var ntdb;var dm=document.getElementById(fvmb);var qlh=document.body.scrollTop;if(qlh==0){if(window.pageYOffset)qlh=window.pageYOffset;else qlh=(document.body.parentElement)?document.body.parentElement.scrollTop:0;}if(dm!=undefined){mpj=ncpb(dm);hgdb=mpj[0];bfgb=mpj[1];if(brg){ntdb=((bfgb)+(nzg));hgdb=((hgdb)+(glq));}else{ntdb=((bfgb)-(ncg));if(ccqb)ntdb=ntdb-25;}if(ntdb<0)ntdb=0;byg.style.top=ntdb;byg.style.left=((hgdb));}else{ntdb=((document.body.clientHeight/2)-(ncg/2));if(ntdb<0)ntdb=0;if(qlh>0)ntdb+=qlh;byg.style.top=ntdb;byg.style.left=((document.body.clientWidth/2)-(nvvb/2));}brq[++nglb]=new jhc(byg,byg.id,nvvb,ncg,bgmb,dbmb);}function gjwb(lvr,znz){var nfg=nglb;if(znz){for(var scq=0;scq<brq.length;scq++){if(brq[scq]!=undefined&&brq[scq].m_Dialog.id==lvr){nglb=scq;break;}}}if((nglb>=0)&&(brq[nglb]!=undefined)&&(brq[nglb].m_Dialog.id==lvr||znz)){if(brq[nglb].m_fnOnHide!=undefined)brq[nglb].m_fnOnHide(brq[nglb].m_sName);brq[nglb].m_Dialog.style.display="none";if(brq[nglb].m_sOpaqueLayer!=undefined)document.getElementById(brq[nglb].m_sOpaqueLayer).style.display="none";if(znz){brq[nglb]=undefined;if(nglb==nfg)nglb--;else nglb=nfg;}else brq[nglb--]=undefined;}}function cyw(byg,bgmb){var bkg=nglb;var jlhb=document.getElementById(bgmb);while(bkg>0){--bkg;if(brq[bkg].m_sOpaqueLayer==bgmb){bgmb=(brq[bkg].m_Dialog.id+"OpaqueLayer");byg.m_sOpaqueLayer=bgmb;break;}}return(bgmb);}function cgtb(lvr,jbjb,dbmb){gjwb(fftb);var byg=document.getElementById(lvr);var lll=document.getElementById(lvr+"Body");var nvvb=parseInt(byg.style.width);var ncg=parseInt(byg.style.height);if(lll!=undefined){if(!smqb||ccqb){lll.style.width=(nvvb-2);}else lll.style.width=nvvb;}if(byg!=undefined){var ddp=(8000+(nglb*2));var bgmb=(lvr+"OpaqueLayer");twkb(byg,nvvb,ncg,bgmb,dbmb);byg.style.display="block";byg.style.zIndex=(ddp+1);if((jbjb==undefined)||(jbjb)){bgmb=cyw(brq[nglb],bgmb);var jlhb=document.getElementById(bgmb);if(jlhb!=undefined){jlhb.style.zIndex=ddp;if(smqb){ljy=(document.body.scrollHeight>document.body.offsetHeight?document.body.scrollHeight:document.body.offsetHeight+'px');jlhb.style.height=ljy;}jlhb.style.display="block";}}var bchb=document.getElementById(lvr+"TitleBar");if(bchb!=undefined)bchb.style.cursor="move";bynb=document.onmousedown;document.onmousedown=mhcb;document.onmouseup=rksb;bchb.onmouseover=function(){document.onmousedown=mhcb;};}}function zbpb(lvr,jbjb,dbmb,fvmb,vcbb,sks){var byg=document.getElementById(lvr);fftb=lvr;var lll=document.getElementById(lvr+"Body");var nvvb,ncg=0;if(vcbb==undefined)nvvb=parseInt(byg.style.width);else nvvb=parseInt(vcbb);if(sks==undefined)ncg=parseInt(byg.style.height);else ncg=parseInt(sks);if(lll!=undefined){if(!smqb){lll.style.width=(nvvb-2);lll.style.height=((ncg-102)-2);}else{lll.style.width=nvvb;lll.style.height=(ncg-78);}}if(byg!=undefined){twkb(byg,nvvb,ncg,undefined,dbmb,fvmb);byg.style.display="block";byg.style.zIndex=((8000+(nglb*2))+1);byg.onmouseover=function(){document.onmousedown=function(){return(false);};};byg.onmouseout=function(){document.onmousedown=function(){if(nglb>=0)gjwb(lvr);return(false);};};document.onmousedown=function(){if(nglb>=0)gjwb(lvr);return(false);};}}function gkk(ytbb,myv,dbmb){var bgmb="",xyy="";var dfqb,fbcb;if((nglb>=0)&&(brq[nglb].m_Dialog.id==ytbb)){if(brq[nglb].m_fnOnHide!=undefined)brq[nglb].m_fnOnHide(ytbb);brq[nglb].m_Dialog.style.display="none";bgmb=brq[nglb].m_sOpaqueLayer;brq[nglb--]=undefined;}cgtb(myv,false,dbmb);dfqb=document.getElementById(bgmb);fbcb=document.getElementById(xyy=cyw(brq[nglb],myv+"OpaqueLayer"));if((dfqb!=undefined)&&(fbcb!=undefined)){dfqb.style.display="none";fbcb.style.zIndex=dfqb.style.zIndex;fbcb.style.display="block";brq[nglb].m_sOpaqueLayer=xyy;}}var vkj=undefined;function ftb(fsw,nvvb,ncg,blh,nmnb,fdz){vkj=undefined;if(nmnb!=undefined)vkj=nmnb;if(fdz!=undefined)document.getElementById("ImageDialogTitleText").innerHTML=fdz;if((document.getElementById("ImageDialogText")!=undefined)&&(blh!=undefined))document.getElementById("ImageDialogText").innerHTML=blh;if(document.getElementById("ImageContainer")!=undefined&&fsw!=""&&fsw!=undefined){tpdb("ImageDialog","ImageContainer",fsw);}else cgtb("ImageDialog");}var blb=undefined;function qdcb(fsw,nvvb,ncg,blh,nmnb,fdz,xff){blb=undefined;if(nmnb!=undefined)blb=nmnb;if(fdz!=undefined)document.getElementById("AdDialogTitleText").innerHTML=fdz;if(xff!=undefined)document.getElementById("AdDialogBody").style.backgroundColor=xff;if((document.getElementById("AdDialogText")!=undefined)&&(blh!=undefined))document.getElementById("AdDialogText").innerHTML=blh;if(document.getElementById("AdImageContainer")!=undefined&&fsw!=""&&fsw!=undefined){tpdb("AdDialog","AdImageContainer",fsw);}else cgtb("AdDialog");}function rcb(){gjwb("AdDialog");if(blb!=undefined)blb();document.getElementById("AdDialog").style.width=0;document.getElementById("AdDialog").style.height=0;blb=undefined;}function vlnb(){gjwb("ImageDialog");if(vkj!=undefined)vkj();document.getElementById("ImageDialog").style.width=0;document.getElementById("ImageDialog").style.height=0;vkj=undefined;}function tpdb(trrb,ddqb,mwlb){var vqdb=document.createElement('img');var bFirstLoad=true;vqdb.onload=function(rql){if(document.getElementById(ddqb)){document.getElementById(ddqb).src=this.src;document.getElementById(ddqb).width=this.width;document.getElementById(ddqb).height=this.height;document.getElementById(trrb).style.width=(this.width+50);document.getElementById(trrb).style.height=(this.height+50);if(bFirstLoad){cgtb(trrb);bFirstLoad=false;}}};
vqdb.onerror=function(rql){document.getElementById(ddqb).src="";document.getElementById(ddqb).width="0";document.getElementById(ddqb).height="0";};vqdb.src="Images/"+mwlb;}function adtpdb(trrb,ddqb,mwlb){var advqdb=document.createElement('img');var bFirstLoad=true;advqdb.onload=function(rql){if(document.getElementById(ddqb)){document.getElementById(ddqb).src=this.src;document.getElementById(ddqb).width=this.width;document.getElementById(ddqb).height=this.height;if(bFirstLoad){cgtb(trrb);bFirstLoad=false;}}};advqdb.onerror=function(rql){document.getElementById(ddqb).src="";document.getElementById(ddqb).width="0";document.getElementById(ddqb).height="0";};advqdb.src="Images/"+mwlb;}