overlay = {
	open : function(pageToOpen, pageTitle){
		if(parseInt($.browser.version) != 419){//Safari 2.0.4 workaround - ejl		
		$("select").css("visibility","hidden")
		overlay.buildOverlay();
		$('div.overlayContainerSearch').load(pageToOpen,function(){
			$('div.overlayContainerSearch').animate({opacity:'show'},'fast');
			var xScroll, yScroll;
		       if (self.pageYOffset) {
		           yScroll = self.pageYOffset;
		           xScroll = self.pageXOffset;
		       } else if (document.documentElement && document.documentElement.scrollTop){     // Explorer 6 Strict
		           yScroll = document.documentElement.scrollTop;
		           xScroll = document.documentElement.scrollLeft;
		       }
			if($.browser.msie){
				browserHeight = document.documentElement.clientHeight;
				
			}else{
				browserHeight = window.innerHeight;
			}
			var planifOffset = $("#page").offset().top + 170;
			if(browserHeight >= $('div.overlayContainerSearch').height()){
				$('.overlay').css({
					'height':$('html').height(),
					'width':$('body').width(),
					'z-index':'800'
				});
			}else{
				$('.overlay').css({
					'height':$('html').height(),
					'width':$('body').width(),
					'z-index':'800'
				});
			}
			$('div.overlayContainerSearch').css('margin-top',planifOffset);	

			$('.overlayContainerSearch').draggable({
					cursor:'move',
					handle:'div.countdownPopinWrapper'
			});
			
			$('#topBannerRight').bind('click',function(){
				overlay.close();
			});
			holidayCountdownBuilder();
		
		});
		}else{//Safari 2.0.4 workaround - ejl
			alert("This version of Safari does not support this function.");
		}
	},
	close : function(){
		$('div.overlayContainerSearch').fadeOut('fast',function(){
			$(this).remove();
			$('div.overlay').fadeOut('fast',function(){
				$(this).remove();
				$("select").css("visibility","visible")
			});
		});
	},
	buildOverlay : function(){
		// Build the background overlay div
		backgroundDiv = document.createElement('div');
		$(backgroundDiv).addClass('overlay');
		$(backgroundDiv).bind('click',function(){
			overlay.close();
		});
		$('body').append(backgroundDiv);
		// Build the content overlay divs
		overlayContainerSearch = document.createElement('div')
		$(overlayContainerSearch).addClass('overlayContainerSearch');	
		$('body').append(overlayContainerSearch);
		// Then fade it in
		$('div.overlay').css('background','transparent');
		$('div.overlay').droppable();
		$('div.overlay').show();
	}
}






