<!--
	// Browser Detection
	function BrowserCheck() {
		var b = navigator.appName;
		if (b=="Netscape") this.b = "ns";
		else if (b=="Microsoft Internet Explorer") this.b = "ie";
		else this.b = b;
		this.version = navigator.appVersion;
		//if (this.version.indexOf('Win')>0) this.os = "PC";
		//else if (this.version.indexOf('Mac')>0) this.os = "Mac";
		this.WinOs = (this.version.indexOf('Win')>0);
		this.v = parseInt(this.version);
		this.ns = (this.b=="ns" && this.v>=4);
		this.ns4 = (this.b=="ns" && this.v==4);
		this.ns5 = (this.b=="ns" && this.v==5);
		this.ie = (this.b=="ie" && this.v>=4);
		this.ie4 = (this.version.indexOf('MSIE 4')>0);
		this.ie5 = (this.version.indexOf('MSIE 5')>0);
		this.ie6 = (this.version.indexOf('MSIE 6')>0);
		this.min = (this.ns||this.ie);
	}
	var browser = new BrowserCheck();

	var topPosition = 155;
	if (!browser.WinOs && browser.ie){
		topPosition -= 1;
	} else if (browser.ns){
		topPosition -= 7;
	}


	function getWindowWidth()
	{
		return window.innerWidth ? window.innerWidth : document.body.offsetWidth;
	}


	//var windowWidth = getWindowWidth;
	//var menu1Left = ((windowWidth - 728) / 2) + myOffset;
	//alert("menu1left: "+menu1Left);

var menuItemsAr = new Array(8,6,7,5,4);

// -->
	

	// the number you pass to initLeft doesn't matter since it will get
		// changed onactivate
		var menu1 = new ypSlideOutMenu("menu1", "down", 0, topPosition, 172, menuItemsAr[0] * 27)
		var menu2 = new ypSlideOutMenu("menu2", "down", 0, topPosition, 92, menuItemsAr[1] * 18)
		var menu3 = new ypSlideOutMenu("menu3", "down", 0, topPosition, 95, menuItemsAr[2] * 18)
		var menu4 = new ypSlideOutMenu("menu4", "down", 0, topPosition, 97, menuItemsAr[3] * 18)
		var menu5 = new ypSlideOutMenu("menu5", "down", 0, topPosition, 77, menuItemsAr[4] * 18)
    // for each menu, we set up the onactivate event to call repositionMenu with the amount offset from center, in pixels

	
		menu1.onactivate = function() { repositionMenu(menu1, -262); }
		menu2.onactivate = function() { repositionMenu(menu2, -269); }
		menu3.onactivate = function() { repositionMenu(menu3, -186); }
		menu4.onactivate = function() { repositionMenu(menu4, -115); }
		menu5.onactivate = function() { repositionMenu(menu5, -25); }


    // 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;
		}	