	var openWeatherMenu; // Stores The Open Weather Menu
var whatWeatherTimer; // Stores Weather Menu Timer
var weather_menu = new Array("forecasts_navigation", "maps_navigation", "precipitation_navigation");
var weatherOffset = 0;
var subnav_menu_lefts = new Array(); // this array stores the orignal left posision of the menu and uses it as the offset



// This Function Shows the Weather Menu Object 'menu'
function showWeatherMenu(menu){



	if (whatWeatherTimer) clearTimeout(weatherTimer);


	
	
	for (i=0; i<weather_menu.length; i++) hideMenu(weather_menu[i]);

	if (menu!="none") {
	
		var menuObj = getObj(menu);	
		
		menuObj.visibility = visible;
		openWeatherMenu=menu;
	
		if (subnav_menu_lefts[menu]==null) {
		
			theLeft = getStyle(menu,"left");
			theLeft = parseInt(theLeft);
			subnav_menu_lefts[menu] = theLeft;
			//alert("left set to " + theLeft);
			
		} else theLeft = subnav_menu_lefts[menu];
	
		weatherOffset = theLeft
	
		
		Sleft = (browserWidth/2) - weatherOffset; 
		menuObj.left = Sleft + 'px';
		
	}  else openMenu="none";

	
}


function startWeatherMenuTimer(menu) {
	if (whatWeatherTimer == menu) clearTimeout(weatherTimer);
	
	what = "hideMenu('" + menu + "')";
	weatherTimer = setTimeout(what, 2000);
	
	whatWeatherTimer = menu;
}


