var isIE = (navigator.appName == "Microsoft Internet Explorer") ? true : false;

  var dropDownTop = (isIE) ? 180 : 180;
  
  var dropDownWidth1 = (isIE) ? 170 : 170;
  var dropDownWidth2 = (isIE) ? 140 : 140;
  var dropDownWidth3 = (isIE) ? 150 : 150;
  var dropDownWidth4 = (isIE) ? 150 : 150;
  var dropDownWidth5 = (isIE) ? 150 : 150;
		// the number you pass to initLeft doesn't matter since it will get
		// changed onactivate
		var myMenu1 = new ypSlideOutMenu("menu1", "down", -1000, dropDownTop, dropDownWidth1, 80)
		var myMenu2 = new ypSlideOutMenu("menu2", "down", -1000, dropDownTop, dropDownWidth2, 60)
		var myMenu3 = new ypSlideOutMenu("menu3", "down", -1000, dropDownTop, dropDownWidth3, 60)
		var myMenu4 = new ypSlideOutMenu("menu4", "down", -1000, dropDownTop, dropDownWidth4, 40)
		var myMenu5 = new ypSlideOutMenu("menu5", "down", -1000, dropDownTop, dropDownWidth5, 100)
		     
  var menuLeft1 = (isIE ) ? -350 : -356;   
  myMenu1.onactivate = function() { repositionMenu(myMenu1, menuLeft1); } 

  var menuLeft2 = (isIE) ? -183  : -189; 
  myMenu2.onactivate = function() { repositionMenu(myMenu2, menuLeft2); } 
  
  var menuLeft3 = (isIE) ? -85  : -91; 
  myMenu3.onactivate = function() { repositionMenu(myMenu3, menuLeft3); } 
  
  var menuLeft4 = (isIE) ? 70  : 64; 
  myMenu4.onactivate = function() { repositionMenu(myMenu4, menuLeft4); } 
  
  var menuLeft5 = (isIE) ? 210  : 204; 
  myMenu5.onactivate = function() { repositionMenu(myMenu5, menuLeft5); } 
	 
      // 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();