var aboutusMenu = new ypSlideOutMenu("aboutus", "down", 0, 0, 170,200)
var productMenu = new ypSlideOutMenu("product", "right", 130, -22, 400,500)
var fruitsMenu = new ypSlideOutMenu("fruits", "right", 98, -18, 170,200, "product")
var meatMenu = new ypSlideOutMenu("meat", "right", 98, -17, 170,200, "product")
var foodMenu = new ypSlideOutMenu("food", "right", 98, -17, 170,200, "product")
var wineMenu = new ypSlideOutMenu("wine", "right", 98, -17, 170,200, "product")
var clothingMenu = new ypSlideOutMenu("clothing", "right", 98, -17, 170,200, "product")
var printerMenu = new ypSlideOutMenu("printer", "right", 98, -17, 170,200, "product")
var stationaryMenu = new ypSlideOutMenu("stationary", "right", 98, -17, 170,200, "product")
var electronicMenu = new ypSlideOutMenu("electronic", "right", 98, -17, 170,200, "product")
var specialityMenu = new ypSlideOutMenu("speciality", "right", 98, -17, 170,200, "product")
//var productMenu = new ypSlideOutMenu("product", "down", 0, 0, 210,200)
//var researchdivMenu = new ypSlideOutMenu("meddiv", "right",170,64,140, 150,"productdiv")
ypSlideOutMenu.writeCSS();

//MENU OPTIONS

// the number you pass to initLeft doesn't matter since it will get
// changed onactivate
/*
var aboutusMenu = new ypSlideOutMenu("aboutus", "down", 325, 40, 170,200)
var productsMenu = new ypSlideOutMenu("products", "right", 0, 0, 170,200)
var productsubMenu = new ypSlideOutMenu("productsub", "right", 130, -22, 170,200)
var fruitsMenu = new ypSlideOutMenu("fruits", "right", 10, 140, 170,200, "products")
var fruitsubMenu = new ypSlideOutMenu("fruitsub", "right", 10, 96, 170,200, "productsub")
var meatMenu = new ypSlideOutMenu("meat", "right", 10, 162, 170,200, "products")
var meatsubMenu = new ypSlideOutMenu("meatsub", "right", 10, 118, 170,200, "productsub")
var foodMenu = new ypSlideOutMenu("food", "right", 10, 182, 170,200, "products")
var foodsubMenu = new ypSlideOutMenu("foodsub", "right", 10, 138, 170,200, "productsub")
var wineMenu = new ypSlideOutMenu("wine", "right", 10, 202, 170,200, "products")
var winesubMenu = new ypSlideOutMenu("winesub", "right", 10, 158, 170,200, "productsub")
var clothingMenu = new ypSlideOutMenu("clothing", "right", 10, 222, 170,200, "products")
var clothingsubMenu = new ypSlideOutMenu("clothingsub", "right", 10, 188, 170,200, "productsub")
var printerMenu = new ypSlideOutMenu("printer", "right", 10, 242, 170,200, "products")
var printersubMenu = new ypSlideOutMenu("printersub", "right", 10, 198, 170,200, "productsub")
var stationaryMenu = new ypSlideOutMenu("stationary", "right", 10, 262, 170,200, "products")
var stationarysubMenu = new ypSlideOutMenu("stationarysub", "right", 10, 218, 170,200, "productsub")
var electronicMenu = new ypSlideOutMenu("electronic", "right", 10, 282, 170,200, "products")
var electronicsubMenu = new ypSlideOutMenu("electronicsub", "right", 10, 238, 170,200, "productsub")
var specialityMenu = new ypSlideOutMenu("speciality", "right", 10, 302, 170,200, "products")
var specialitysubMenu = new ypSlideOutMenu("specialitysub", "right", 10, 258, 170,200, "productsub")

//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
ypSlideOutMenu.writeCSS();
var browserName=navigator.appName; 
if (browserName=="Netscape")
{ 
	productsMenu.onactivate = function() { repositionMenu(productsMenu,-265); }
	productsubMenu.onactivate = function() { repositionMenu(productsubMenu,-265); }//difference of -15 in mozilla & IE
	fruitsMenu.onactivate = function() { repositionMenu(fruitsMenu,-155); }
	fruitsubMenu.onactivate = function() { repositionMenu(fruitsubMenu,-155); }
	meatMenu.onactivate = function() { repositionMenu(meatMenu,-155); }
	meatsubMenu.onactivate = function() { repositionMenu(meatsubMenu,-155); }
	foodMenu.onactivate = function() { repositionMenu(foodMenu,-155); }
	foodsubMenu.onactivate = function() { repositionMenu(foodsubMenu,-155); }
	wineMenu.onactivate = function() { repositionMenu(wineMenu,-155); }
	winesubMenu.onactivate = function() { repositionMenu(winesubMenu,-155); }
	clothingMenu.onactivate = function() { repositionMenu(clothingMenu,-155); }
	clothingsubMenu.onactivate = function() { repositionMenu(clothingsubMenu,-155); }
	printerMenu.onactivate = function() { repositionMenu(printerMenu,-155); }
	printersubMenu.onactivate = function() { repositionMenu(printersubMenu,-155); }
	stationaryMenu.onactivate = function() { repositionMenu(stationaryMenu,-155); }
	stationarysubMenu.onactivate = function() { repositionMenu(stationarysubMenu,-155); }
	electronicMenu.onactivate = function() { repositionMenu(electronicMenu,-155); }
	electronicsubMenu.onactivate = function() { repositionMenu(electronicsubMenu,-155); }
	specialityMenu.onactivate = function() { repositionMenu(specialityMenu,-155); }
	specialitysubMenu.onactivate = function() { repositionMenu(specialitysubMenu,-155); }
}
 
 if (browserName=="Microsoft Internet Explorer")
 {
	productsMenu.onactivate = function() { repositionMenu(productsMenu,-250); }
	productsubMenu.onactivate = function() { repositionMenu(productsubMenu,-250); }	
	fruitsMenu.onactivate = function() { repositionMenu(fruitsMenu,-140); }
	fruitsubMenu.onactivate = function() { repositionMenu(fruitsubMenu,-140); }
	meatMenu.onactivate = function() { repositionMenu(meatMenu,-140); }
	meatsubMenu.onactivate = function() { repositionMenu(meatsubMenu,-140); }
	foodMenu.onactivate = function() { repositionMenu(foodMenu,-140); }
	foodsubMenu.onactivate = function() { repositionMenu(foodsubMenu,-140); }
	wineMenu.onactivate = function() { repositionMenu(wineMenu,-140); }
	winesubMenu.onactivate = function() { repositionMenu(winesubMenu,-140); }
	clothingMenu.onactivate = function() { repositionMenu(clothingMenu,-140); }
	clothingsubMenu.onactivate = function() { repositionMenu(clothingsubMenu,-140); }
	printerMenu.onactivate = function() { repositionMenu(printerMenu,-140); }
	printersubMenu.onactivate = function() { repositionMenu(printersubMenu,-140); }
	stationaryMenu.onactivate = function() { repositionMenu(stationaryMenu,-140); }
	stationarysubMenu.onactivate = function() { repositionMenu(stationarysubMenu,-140); }
	electronicMenu.onactivate = function() { repositionMenu(electronicMenu,-140); }
	electronicsubMenu.onactivate = function() { repositionMenu(electronicsubMenu,-140); }
	specialityMenu.onactivate = function() { repositionMenu(specialityMenu,-140); }
	specialitysubMenu.onactivate = function() { repositionMenu(specialitysubMenu,-140); }

 }

//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;
}
*/
//-->