//MENU OPTIONS

// the number you pass to initLeft doesn't matter since it will get
// changed onactivate

var aboutMenu = new ypSlideOutMenu("about", "down", 10, 147, 250,250)

var productMenu = new ypSlideOutMenu("products", "down", 10, 147, 300,320)

//var wineMenu = new ypSlideOutMenu("wine", "down", 10, 148, 250,200)

//var functionsMenu = new ypSlideOutMenu("functions", "down", 10, 148, 250,200)


aboutMenu.onactivate = function() { repositionMenu(aboutMenu,-269); }

productMenu.onactivate = function() { repositionMenu(productMenu,-200); }
//wineMenu.onactivate = function() { repositionMenu(wineMenu,-241); }

//functionsMenu.onactivate = function() { repositionMenu(functionsMenu,-57); }

// this function repositions a menu to the speicified offset from center
function repositionMenu(menu, offset)
{
	var browser= navigator.appName;
	
	// the new left position should be the center of the window + the offset
	var newLeft = getWindowWidth() / 2 + offset;
	if(browser=='Netscape'){
		newLeft = newLeft-11;
		menu.container.style ? menu.container.style.left = newLeft + "px" : menu.container.left = newLeft;
	}
	if(browser=="Microsoft Internet Explorer"){
	// 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;
}

//-->