	var showing = null;
			function initMenus(className)
	{
		var allButtons = $$(className);
		for(var i=0;i<allButtons.length;i++)
		{
			attachMenu(allButtons[i]);
		}
	}
	function attachMenu(input)
	{
		Event.observe(input, "mouseover", showDropDown, false);
		Event.observe(input, "mouseout", checkDropDown,false);
		if($(input.id + "_dd")){
			//alert("adding on mouseout");
			//Event.observe($(input.id + "_dd"),"mouseout",hideThis);
			$(input.id + "_dd").style.display = "none";
		}
	}
	function showDropDown(event)
	{
		if(showing) return;
		var debug = false;
		var e = Event.element(event);
		var pos = Position.cumulativeOffset(e);
		var n = document.getElementById(e.id + "_dd");
		showing = n;
		n = $(n);
		if(n){
			if(debug) alert(n.id + " (" + pos[0] + "," + pos[1] + ")");
			//n.style.display = "block";
			n.style.width = e.style.width;
			n.style.left = pos[0] + "px";
			n.style.top = (pos[1] + 28) + "px";
			//new Effect.BlindDown(n.id, {duration:.5});
			n.style.display = "";
			showing = true;
		}
		//alert("("+pos[0] + ","+pos[1]+")");
	}
	function isWithinMenu1(allButtons,x,y)
	{
		var out = -1;
		
		for(var i=0;i<allButtons.length;i++)
		{
			var e = allButtons[i];
			var dd = $(e.id + "_dd");
			if(dd)
			{
				if(Position.within(dd,x,y) || Position.within(e,x,y)) return i;
			}
		}
		
		return out;
	}
	function isWithinMenu(event)
	{
		var elt = Event.findElement(event, 'SPAN');
		if (elt.id != "")
			return 1;
		return 0;
	}
	function checkDropDown(event)
	{
		if(!showing) return;
		var mx = Event.pointerX(event);
		var my = Event.pointerY(event);
		var allButtons = $$(".menuItem");
		var element = Event.element(event);
		var num = isWithinMenu1(allButtons,mx,my);
		var num2 = isWithinMenu(event);
		if(num2 > 0)
		{
			//dont hide
		}
		else
		{
			hideDropDown(element, allButtons[num]);
		}
		
	}
	function hideThis(test)
	{
		alert((Event.element(arguments[1])).id);
	}
	function hideDropDown(event,id)
	{
		var e = event;
		var x = Event.pointerX(e);
		var y = Event.pointerY(e);
		var main = $(id.replace(/_dd/,""));
		if(!Position.within($(id),x,y) && !Position.within(main,x,y))
		{
			$(id).style.display = "none";
		}
		showing = false;
	}
	function hideDropDown1(e)
	{
		if(!showing) return;
		var dd = $(e.id + "_dd");
		alert(e.id + "_dd");
		//new Effect.BlindUp(t.id,{duration: .5});
		if(dd)
			dd.style.display = "none";
		showing = null;
		//alert("hiding drop down" + t.id);
	}
