// the number you pass to initLeft doesn't matter since it will get
// changed onactivate

var bMacIE = (navigator.userAgent.toLowerCase().indexOf("mac")!=-1);
iRowHeight = (bMacIE ? 24 : 22);


// id, direction, left, top, width, height
var menu_WhatWeDo	= new ypSlideOutMenu("menu_WhatWeDo", "down", -1000, iTop, 150, 500, "")
var menu_Careers	= new ypSlideOutMenu("menu_Careers", "down", -1000, iTop, 150, 500, "")
var menu_Gallery	= new ypSlideOutMenu("menu_Gallery", "down", -1000, iTop, 150, 500, "")
var menu_About		= new ypSlideOutMenu("menu_About", "down", -1000, iTop, 150, 500, "")

// 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;

	// Account for everpresent right scrollbar in IE
	if (document.all) {
		newLeft -= 10;
	}

	// 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;
}
 
// this function calculates the window's width - different for IE and netscape
function getWindowWidth()
{
	return window.innerWidth ? window.innerWidth : document.body.offsetWidth;
}	
