var PopupVariables=[0.5,0.6,"#000000",true,350,350];var PopupClass=Class.create({initialize:function(a){this.FadeDuration=a[0];this.FadeVal=a[1];this.MaskColor=a[2];this.UseAutoPopupPos=a[3];this.PopupWidth=a[4];this.PopupHeight=a[5];this.CurrentPopup=null;this.CurrentPopupW=null;this.CurrentPopupH=null;this.createMask(a[2])},createMask:function(c){var a=document.getElementsByTagName("body").item(0);var b=document.createElement("div");b.setAttribute("id","popFadeO");b.style.zIndex=100;b.style.position="absolute";b.style.lineHeight="0px";b.style.left="0px";b.style.backgroundColor=c;b.style.display="none";b.style.top="0px";a.appendChild(b);$("popFadeO").style.width=getPageSize()[0]+"px";$("popFadeO").style.height=getPageSize()[1]+"px"},togglePopup:function(e,a,c,d){if(a){PopupControl.CurrentPopup=e;PopupControl.CurrentPopupW=c;PopupControl.CurrentPopupH=d;$(e).style.top=this.setPopPos(c,d)[0]+"px";$(e).style.left=this.setPopPos(c,d)[1]+"px";this.togMask(true);$(e).style.zIndex=101;new Effect.Appear(e,{duration:PopupControl.FadeDuration,from:0,to:1})}else{this.togMask(false);this.CurrentPopup=null;new Effect.Fade(e,{duration:PopupControl.FadeDuration,from:1,to:0})}},setPopPos:function(a,b){var d=(((getPageSize()[3]-b)/2)<0)?0:((getPageSize()[3]-b)/2);d+=getPageSize()[5];var c=(((getPageSize()[2]-a)/2)<0)?0:((getPageSize()[2]-a)/2);c+=getPageSize()[4];return[d,c]},autoPosFix:function(){if(PopupControl.CurrentPopup!=null&&PopupControl.UseAutoPopupPos){$(PopupControl.CurrentPopup).style.top=PopupControl.setPopPos(PopupControl.CurrentPopupW,PopupControl.CurrentPopupH)[0]+"px";$(PopupControl.CurrentPopup).style.left=PopupControl.setPopPos(PopupControl.CurrentPopupW,PopupControl.CurrentPopupH)[1]+"px"}$("popFadeO").style.width=getPageSize()[0]+"px";$("popFadeO").style.height=getPageSize()[1]+"px"},togMask:function(a){if(a){new Effect.Appear("popFadeO",{duration:PopupControl.FadeDuration,from:0,to:PopupControl.FadeVal})}else{new Effect.Fade("popFadeO",{duration:PopupControl.FadeDuration,from:PopupControl.FadeVal,to:0})}},report:function(){alert("Reporting popup class object variables:\nFadeDuration="+PopupControl.FadeDuration+"\nFadeVal="+PopupControl.FadeVal+"\nMaskColor="+PopupControl.MaskColor+"\nUseAutoPopupPos="+PopupControl.UseAutoPopupPos+"\nPopupWidth="+PopupControl.PopupWidth+"\nPopupHeight="+PopupControl.PopupHeight)}});var PopupControl=null;function showPop(c,a,b){if(PopupControl==null){PopupControl=new PopupClass(PopupVariables);SetEventHandler("resize",PopupControl.autoPosFix);SetEventHandler("scroll",PopupControl.autoPosFix)}a=(a==null)?PopupControl.PopupWidth:a;b=(b==null)?PopupControl.PopupHeight:b;PopupControl.togglePopup(c,true,a,b)}function hidePop(a){if(PopupControl==null){PopupControl=new PopupClass(PopupVariables);SetEventHandler("resize",PopupControl.autoPosFix);SetEventHandler("scroll",PopupControl.autoPosFix)}PopupControl.togglePopup(a,false)}function getPageSize(){var c,a;var d,f;if(window.innerHeight&&window.scrollMaxY){c=window.innerWidth+window.scrollMaxX;a=window.innerHeight+window.scrollMaxY;d=window.pageXOffset;f=window.pageYOffset}else{if(document.body.scrollHeight>document.body.offsetHeight){c=document.body.scrollWidth+20;a=document.body.scrollHeight+28;d=document.documentElement.scrollLeft;f=document.documentElement.scrollTop}else{c=document.body.offsetWidth+20;a=document.body.offsetHeight+28;d=document.documentElement.scrollLeft;f=document.documentElement.scrollTop}}var b,e;if(self.innerHeight){if(document.documentElement.clientWidth){b=document.documentElement.clientWidth}else{b=self.innerWidth}e=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){b=document.documentElement.clientWidth;e=document.documentElement.clientHeight}else{if(document.body){b=document.body.clientWidth+20;e=document.body.clientHeight+28}}}if(a<e){pageHeight=e}else{pageHeight=a}if(c<b){pageWidth=c}else{pageWidth=b}return[pageWidth,pageHeight,b,e,d,f]}function SetEventHandler(b,a){if(window.addEventListener){window.addEventListener(b,a,false)}else{if(window.attachEvent){window.attachEvent("on"+b,a)}}};