// JavaScript Document

// the number you pass to initLeft doesn't matter since it will get changed onactivate
	var myMenu1 = new ypSlideOutMenu("menu1", "down", 0, 0, 180, 200);
	var myMenu2 = new ypSlideOutMenu("menu2", "down", 0, 0, 180, 200);
	var myMenu3 = new ypSlideOutMenu("menu3", "down", 0, 0, 180, 200);
	var myMenu4 = new ypSlideOutMenu("menu4", "down", 0, 0, 180, 200);
	var myMenu5 = new ypSlideOutMenu("menu5", "down", 0, 0, 180, 200);
	var myMenu6 = new ypSlideOutMenu("menu6", "down", 0, 0, 180, 200);
	var myMenu7 = new ypSlideOutMenu("menu7", "down", 0, 0, 180, 200);
	
	
	
	
	// this function calculates the window's width - different for IE and netscape
	function getWindowWidth() {
		return window.innerWidth ? window.innerWidth : document.body.offsetWidth;
	}
	hdrmenu1_off = new Image();
	hdrmenu1_off.src = "images/SB.gif";
	hdrmenu2_off = new Image();
	hdrmenu2_off.src = "images/MB.gif";
	hdrmenu3_off = new Image();
	hdrmenu3_off.src = "images/LB.gif";
	hdrmenu4_off = new Image();
	hdrmenu4_off.src = "images/FP.gif";
	hdrmenu5_off = new Image();
	hdrmenu5_off.src = "images/RT.gif";
	hdrmenu6_off = new Image();
	hdrmenu6_off.src = "images/WA.gif";
	hdrmenu7_off = new Image();
	hdrmenu7_off.src = "images/L.gif";
	
	hdrmenu1_on = new Image();
	hdrmenu1_on.src = "images/SB-over.gif";
	hdrmenu2_on = new Image();
	hdrmenu2_on.src = "images/MB-over.gif";
	hdrmenu3_on = new Image();
	hdrmenu3_on.src = "images/LB-over.gif";
	hdrmenu4_on = new Image();
	hdrmenu4_on.src = "images/FP-over.gif";
	hdrmenu5_on = new Image();
	hdrmenu5_on.src = "images/RT-over.gif";
	hdrmenu6_on = new Image();
	hdrmenu6_on.src = "images/WA-over.gif";
	hdrmenu7_on = new Image();
	hdrmenu7_on.src = "images/L-over.gif";
	
	ypSlideOutMenu.writeCSS();
	
	// this function repositions a menu to the speicified offset from center
	function repositionMenu(menu, offset) {
		// the new left position should be the center of the window + the offset
		var newLeft = getWindowWidth() / 2 + offset;
		// setting the left position in netscape is a little different than IE
		menu.container.style ? menu.container.style.left = newLeft + "px" : menu.container.left = newLeft;
	}