// 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_Markets	= new ypSlideOutMenu("menu_Markets", "down", -1000, iTop, 150, 500, "")
	var menu_Markets_Architecture		= new ypSlideOutMenu("menu_Markets_Architecture", "right", -1000, iTop, 150, 500, "menu_Markets")
	var menu_Markets_Building			= new ypSlideOutMenu("menu_Markets_Building", "right", -1000, iTop, 150, 500, "menu_Markets")
	var menu_Markets_Environmental		= new ypSlideOutMenu("menu_Markets_Environmental", "right", -1000, iTop, 150, 500, "menu_Markets")
	var menu_Markets_Land				= new ypSlideOutMenu("menu_Markets_Land", "right", -1000, iTop, 150, 500, "menu_Markets")
	var menu_Markets_Municipal			= new ypSlideOutMenu("menu_Markets_Municipal", "right", -1000, iTop, 150, 500, "menu_Markets")
	var menu_Markets_Transportation		= new ypSlideOutMenu("menu_Markets_Transportation", "right", -1000, iTop, 150, 500, "menu_Markets")
var menu_Services	= new ypSlideOutMenu("menu_Services", "down", -1000, iTop, 150, 500, "")
	var menu_Services_Architecture		= new ypSlideOutMenu("menu_Services_Architecture", "right", -1000, iTop, 150, 500, "menu_Services")
	var menu_Services_Building			= new ypSlideOutMenu("menu_Services_Building", "right", -1000, iTop, 150, 500, "menu_Services")
	var menu_Services_Environmental		= new ypSlideOutMenu("menu_Services_Environmental", "right", -1000, iTop, 150, 500, "menu_Services")
	var menu_Services_Land				= new ypSlideOutMenu("menu_Services_Land", "right", -1000, iTop, 150, 500, "menu_Services")
	var menu_Services_Municipal			= new ypSlideOutMenu("menu_Services_Municipal", "right", -1000, iTop, 150, 500, "menu_Municipal")
	var menu_Services_Transportation	= new ypSlideOutMenu("menu_Services_Transportation", "right", -1000, iTop, 150, 500, "menu_Services")
var menu_Careers	= new ypSlideOutMenu("menu_Careers", "down", -1000, iTop, 150, 500, "")
	var menu_Careers_Employment			= new ypSlideOutMenu("menu_Careers_Employment", "right", -1000, iTop, 150, 500, "menu_Careers")
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;
}	
