
	
	// Toggles the Domain Selector window open and close with a smooth transition.
	function toggleAllProductsDropDown(e){
	
		// In case something else ever gets linked to the same event.
		e.stop();
		
		if(!window.allProductsDropDownIsOpenFlag){
			showProductMenuSlider();
		}
		else{
			hideProductMenuSlider();
		}
	}
	

	// When the domain door has either finished openeing or closing this should get called.
	function allProductsMenudSlideEventFinished() {
	
		if(window.allProductsDropDownIsOpenFlag){
			window.allProductsDropDownIsOpenFlag = false;
		}
		else{
			window.allProductsDropDownIsOpenFlag = true;
		}
	}
	
	
	function hideProductMenuSlider(){
		
		if(!window.allProductsDropDownIsOpenFlag)
			return;
		
		var allProductsDropDown = $('allProductsDropDownMenu');
		var allProductsVerticalSlide = new Fx.Slide('allProductsDropDownMenu');
		
		// When Vertical Slide ends its transition, we check for its status
		allProductsVerticalSlide.addEvent('complete', window.allProductsMenudSlideEventFinished);
		
		allProductsDropDown.fade(0.7);
		allProductsVerticalSlide.slideOut();
	}
	
	function showProductMenuSlider(){
		
		var allProductsDropDown = $('allProductsDropDownMenu');
		var allProductsVerticalSlide = new Fx.Slide('allProductsDropDownMenu');
		
		// When Vertical Slide ends its transition, we check for its status
		allProductsVerticalSlide.addEvent('complete', window.allProductsMenudSlideEventFinished);
		
		allProductsVerticalSlide.slideIn();
		allProductsDropDown.fade(1);
	}
	

	
	
	function mouseMoveOverProductMenu(){
		productMouseLeaveInterval = window.clearInterval(productMouseLeaveInterval);
	}
	
	function mouseMoveOutsideProductMenu(){
		productMouseLeaveInterval = window.setInterval('hideProductMenuSlider()', 1000);
	}
	
	
	// Global variable tracking if the mouse has moved off of the menu.
	var productMouseLeaveInterval = 0;

	
	// Global variable telling us if the All Products Drop Down is open.
	var allProductsDropDownIsOpenFlag = false;
	

	// This runs one time, like the "onLoad" function.
	// We don't attach to the Click Events until the whole page has loaded.  That will keep people from doing any harm until the browser is ready.
	window.addEvent('domready', function() {

		var allProductsVerticalSlide = new Fx.Slide('allProductsDropDownMenu');

		// Start off hidden and transparent
		$('allProductsDropDownMenu').fade(0.7);
		allProductsVerticalSlide.hide();
		
		// The Outer Shell DIV starts out hidden. So there is no flicker.
		// Make it visible, now that the Vertical Slide is hidden.
		$('allProductsDropDownMenuOuterShell').setStyle('visbility', 'visible');
		
		// Add the click event to the All Products Button
		$('NavAllProducts').addEvent('click', window.toggleAllProductsDropDown);

	});
	
	



