
		var research = new ypSlideOutMenu("research", "down", -1000, 135, 200, 125)
		var inventory = new ypSlideOutMenu("inventory", "down", -1000, 135, 180, 125)
		var financing = new ypSlideOutMenu("financing", "down", -1000, 135, 180, 100)
		var autobody = new ypSlideOutMenu("autobody", "down", -1000, 135, 180, 100)		
		var service = new ypSlideOutMenu("service", "down", -1000, 135, 180, 100)	
		var parts = new ypSlideOutMenu("parts", "down", -1000, 135, 180, 100)				
               
    // for each menu, we set up the onactivate event to call repositionMenu with the amount offset from center, in pixels
		research.onactivate = function() { repositionMenu(research, -240); }
		inventory.onactivate = function() { repositionMenu(inventory, -222); }
		financing.onactivate = function() { repositionMenu(financing, -142); }
		autobody.onactivate = function() { repositionMenu(autobody, -63); }	
		service.onactivate = function() { repositionMenu(service, 20); }		
		parts.onactivate = function() { repositionMenu(parts, 87); }		
					

    // 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;
		}	

    ypSlideOutMenu.writeCSS();