  // direction of menu, left position, top position, followed by width, height of animation DIV
var menus = [
	new ypSlideOutMenu("doctorMenu", "down", 100, 237, 140, 106),
	new ypSlideOutMenu("patientMenu", "down", 100, 237, 140, 196),
	new ypSlideOutMenu("specialMenu", "down", 100, 237, 140, 725),
	new ypSlideOutMenu("healthMenu", "down", 100, 237, 140, 230),
	new ypSlideOutMenu("aboutMenu", "down", 100, 237, 140, 140),
	new ypSlideOutMenu("joinMenu", "down", 100, 237, 140, 140), ];

function findPosX(obj,objWidth) {
	var curleft = 0;
	if (obj.offsetParent) {
		while (obj.offsetParent) {
			curleft += obj.offsetLeft;
			obj = obj.offsetParent; }
	} else if (obj.x) {
		curleft += obj.x; }
	//curleft = (curleft + objWidth) - 210;
	return curleft; }


function setMenuPos(menu, offset) { menu.container.style ? menu.container.style.left = offset + "px" : menu.container.left = offset; }

menus[0].onactivate = function() { setMenuPos(menus[0], findPosX(document.getElementById("liDoctor"),100)); }
menus[1].onactivate = function() { setMenuPos(menus[1], findPosX(document.getElementById("liPatient"),172)); }
menus[2].onactivate = function() { setMenuPos(menus[2], findPosX(document.getElementById("liSpecial"),197)); }
menus[3].onactivate = function() { setMenuPos(menus[3], findPosX(document.getElementById("liHealth"),220)); }
menus[4].onactivate = function() { setMenuPos(menus[4], findPosX(document.getElementById("liAbout"),240)); }
menus[5].onactivate = function() { setMenuPos(menus[5], findPosX(document.getElementById("liJoin"),260)); }