//MENU OPTIONS

// the number you pass to initLeft doesn't matter since it will get
// changed onactivate

var aboutMenu = new ypSlideOutMenu("about", "down", 15, 160, 71,21)
var productMenu = new ypSlideOutMenu("product", "down", 15, 253, 369,171)
var product1Menu = new ypSlideOutMenu("product1", "down", 15, 253, 369,171)
var prodMenu = new ypSlideOutMenu("prod", "right", 15, 438, 550,400)
var prod2Menu = new ypSlideOutMenu("prod2", "right", 15, 438, 550,400)
var prod1Menu = new ypSlideOutMenu("prod1", "right", 15, 400, 550,300)
var preengMenu = new ypSlideOutMenu("preeng", "right", 15, 269, 369,231,"product")
var preeng1Menu = new ypSlideOutMenu("preeng1", "right", 15, 269, 369,231,"product1")
var customMenu = new ypSlideOutMenu("custom", "right", 15, 269, 369,231,"product")
var custom1Menu = new ypSlideOutMenu("custom1", "right", 15, 269, 369,231,"product1")
var customsMenu = new ypSlideOutMenu("customs", "right", 15, 471, 250,200)
var customs1Menu = new ypSlideOutMenu("customs1", "right", 15, 470, 250,200)
var intrMenu = new ypSlideOutMenu("intr", "down", 15, 152, 115,100)
//var dvrMenu = new ypSlideOutMenu("dvrs", "right", -1000, 153, 180, 82, "products")

//var monitorMenu = new ypSlideOutMenu("monitors", "right", -1000, 193, 180, 82, "products")
 
// for each menu, we set up hte onactivate event to call repositionMenu with the amount offset from center, in pixels

aboutMenu.onactivate = function() { repositionMenu(aboutMenu,-182); }
productMenu.onactivate = function() { repositionMenu(productMenu,-157); }
product1Menu.onactivate = function() { repositionMenu(product1Menu,-173); }
prodMenu.onactivate = function() { repositionMenu(prodMenu,-184); }
prod2Menu.onactivate = function() { repositionMenu(prod2Menu,-200); }
prod1Menu.onactivate = function() { repositionMenu(prod1Menu,-184); }

preengMenu.onactivate = function() { repositionMenu(preengMenu,60); }
preeng1Menu.onactivate = function() { repositionMenu(preeng1Menu,43); }
customMenu.onactivate = function() { repositionMenu(customMenu,63); }
custom1Menu.onactivate = function() { repositionMenu(custom1Menu,46); }
customsMenu.onactivate = function() { repositionMenu(customsMenu,-184); }
customs1Menu.onactivate = function() { repositionMenu(customs1Menu,-200); }
intrMenu.onactivate = function() { repositionMenu(intrMenu,-82); }

//dvrMenu.onactivate = function() { repositionMenu(dvrMenu, -110); }

//monitorMenu.onactivate = function() { repositionMenu(monitorMenu, -110); }

// 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;
}
 
// this function calculates the window's width - different for IE and netscape
function getWindowWidth()
{
	return window.innerWidth ? window.innerWidth : document.body.offsetWidth;
}

//-->