var Dom = YAHOO.util.Dom;
var Anim = YAHOO.util.Anim;
var Ev = YAHOO.util.Event;
var Cal = YAHOO.widget.Calendar;
var CalG = YAHOO.widget.CalendarGroup;

// hackValues
var isIE = navigator.userAgent.indexOf("MSIE")>(-1);
var isIE6 = (navigator.userAgent.indexOf("MSIE 6")>(-1) && navigator.userAgent.indexOf("MSIE 7")<(0) && navigator.userAgent.indexOf("MSIE 8")<(0));
var isOpera = navigator.userAgent.indexOf("Opera")>(-1);
var FormDecoratorObj = new FormDecorator();
var console = console || {log:function(){}}
Ev.onDOMReady(function(){
					   
					   	Ev.addListener(Dom.get("allMightyBackButton"),'click',function(e){Ev.stopEvent(e);window.history.back();});
						
						if (Dom.get("overlayPopup")) {
							
							function overlayPopup(){
								Dom.setStyle("overlayPopup","display","block");
								Dom.setStyle("overlayPopup","width",Dom.getDocumentWidth()+"px");
								Dom.setStyle("overlayPopup","height",Dom.getDocumentHeight()+"px");
								
								Dom.setStyle("overlayPopupOverlay","width",Dom.getDocumentWidth()+"px");
								Dom.setStyle("overlayPopupOverlay","height",Dom.getDocumentHeight()+"px");
								
								Dom.setStyle("overlayPopupPopup","top", Dom.getClientRegion().top+((Dom.getViewportHeight()-513)*0.15)+"px");
								Dom.setStyle("overlayPopupPopup","left", (Dom.getViewportWidth()/2)-(580/2)+"px");
								if (navigator.appName == "Microsoft Internet Explorer" && Dom.get("flashMiniBanner")){
                  Dom.get("flashMiniBanner").style.display = "none";
                  Dom.get("flashMidiBanner").style.display = "none";
                  Dom.get("leftColBanner").style.display = "none";
                 }
							}
							
							function overlayPopupClose(e){
								if (e) Ev.stopEvent(e);
								popupBanner(true);
								Dom.get("overlayPopup").parentNode.removeChild(Dom.get("overlayPopup"));
								if (navigator.appName == "Microsoft Internet Explorer" && Dom.get("flashMiniBanner")){
                  Dom.get("flashMiniBanner").style.display = "block";
                  Dom.get("flashMidiBanner").style.display = "block";
                  Dom.get("leftColBanner").style.display = "block";
                 }
							}
								
							Ev.on("closePopup","click",overlayPopupClose);
							Ev.on(window,"scroll",overlayPopup);
							Ev.on(window,"resize",overlayPopup);
							overlayPopup();
						}	
						
						
						});


