// the number you pass to initLeft doesn't matter since it will get changed onactivate
	var company = 	new ypSlideOutMenu("company", "down", -1000, 162, 162, 162)
	var products = new ypSlideOutMenu("products", "down", -1000, 162, 162, 162)
	var services = new ypSlideOutMenu("services", "down", -1000, 162, 162, 162)
	var forsale = new ypSlideOutMenu("forsale", "down", -1000, 162, 162, 162)
	var portfolio = new ypSlideOutMenu("portfolio", "down", -1000, 162, 162, 162)
	var partners = new ypSlideOutMenu("partners", "down", -1000, 162, 162, 162)	
	var support = new ypSlideOutMenu("support", "down", -1000, 162, 162, 162)	
	company.onactivate = function() { repositionMenu(company, -320); }
	products.onactivate = function() { repositionMenu(products, -228); }
	services.onactivate = function() { repositionMenu(services, -136); }
	forsale.onactivate = function() { repositionMenu(forsale, -44); }
	portfolio.onactivate = function() { repositionMenu(portfolio, 47); }
	partners.onactivate = function() { repositionMenu(partners, 139); }
	support.onactivate = function() { repositionMenu(support, 231); }

	// this function repositions a menu to the speicified offset from center
	function repositionMenu(menu, offsetW)
	{
		// IS added to adjust when the window is too small
		var maxWidth = 200;

		// the new left position should be the center of the window + the offset
		var newLeft = getWindowWidth() > maxWidth ? getWindowWidth() / 2 + offsetW : 0;
		
		// 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; }	

ypSlideOutMenu.writeCSS();