
var yPosition = 118;

//new ypSlideOutMenu("number menu", "slide position", left, top, width, height)
var mProducts = new ypSlideOutMenu("products", "down", -1000, yPosition, 200, 550)

// for each menu, we set up the onactivate event to call repositionMenu with the amount offset from center, in pixels
mProducts.onactivate = function() { repositionMenu(mProducts, -220); }

// speed of the menus
ypSlideOutMenu.aniLen = 500

// delay time before the menus close
ypSlideOutMenu.hideDelay = 325


// 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;
    //alert(getWindowWidth());

// 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();
