var myMenu1 = new ypSlideOutMenu("menu1", "down", 0, 43, 590, 160) // ypSlideOutMenu("menu1", "right", left, top, width, height)		



myMenu1.onactivate = function() {	// dla każdego obiektu ustawiamy pozycję
	repositionMenu(myMenu1, -491);
}


function repositionMenu(menu, offset) // ustawienia przesunięcia
{
	var newLeft = getWindowWidth() / 2 + offset; // dla IE lewa pozycja to środek plus przesuniecie

	menu.container.style ? menu.container.style.left = newLeft + "px" : menu.container.left = newLeft; // dla innych przeglądarek niż IE
}


function getWindowWidth()	// obliczanie szerokości okna
{
	return window.innerWidth ? window.innerWidth : document.body.offsetWidth;
}	


ypSlideOutMenu.writeCSS();
