function MenuMultiA (div, basetarget, dtop, spacing)
{
	if (arguments.length)
	{
		Menu.apply (this, arguments);
		this.defaultTop = arguments.length > 2 ? dtop : 12;
		this.menuSpacing = arguments.length > 3 ? spacing : 1;
		this.isMoving = -1;
		this.lastOpened = null;
	}
}
MenuMultiA.prototype = new MenuItem2a ();
MenuMultiA.augment (MenuMulti, "addStyle", "build");
MenuMultiA.prototype.build = function ()
{
	this.div.innerHTML = '';
	for (var o, i = 0, a = this.getChildren (); o = a[i]; i++)
	{
		o.getHTML ();
	}
	for (var o, i = 0, r = this.getRoot (), a = this.getChildrenRec (); o = a[i]; i++)
	{
		if (o.state == 1)
		{
			o.instantOpen ();
		}
	}
};
function MenuItem2a (parent, index, args)
{
	if (arguments.length)
	{
		MenuItem.apply (this, arguments);
		var rid = MI2aObjReg.push (this) - 1;
		this.regId = 'MI2aObjReg[' + rid + ']';
		this.lastOpened = null;
	}
}
MenuItem2a.inherit (MenuItem2);
MenuItem2a.prototype.$c = MenuItem2a;
MI2aObjReg = new Array ();
MenuItem2a.prototype.instantOpen = function ()
{
	for (var o = this, r = this.getRoot (), pa = [], q; o != r; o = o.getParent ())
	{
		for (var q = o.getSiblings (), j = 0, jl = q.length; j < jl; j++)
		{
			q[j].div.style.top = q[j].defaultTop + "px";
			q[j].hideChildren ();
		}
		pa.push (o);
		o.div.style.top = o.defaultTop + "px";
		o.showChildren ();
	}
	for (var p, i = 0; p = pa[i]; i++)
	{
		MenuItem.prototype.setOn.apply (p, []);
		p.changeClass (2);
		p.getParent ().lastOpened = p;
		for (var t, j = 0, a = p.getAfter (); t = a[j]; j++)
		{
			t.div.style.top = t.getCurrentDefTop () + "px";
		}
	}
};
MenuItem2a.prototype.getHTML = function ()
{
	MenuItem.prototype.getHTML.apply (this, []);
	var prevItem = this.getIndex () > 0 ? this.getParent ().getChildren ()[this.getIndex () - 1] : this.getParent ();
	var newTop = prevItem.getLayerHeight () + this.getRoot ().menuSpacing + prevItem.getLayerTop ();
	this.defaultTop = newTop;
	this.div.style.position = "absolute";
	this.div.style.top = newTop + "px";
	for (var o, i = 0, a = this.getChildren (); o = a[i]; i++)
	{
		o.getHTML ();
	}
	for (var o, i = 0, a = this.getChildren (); o = a[i]; i++)
	{
		o.vis (0);
	}
};
MenuItem2a.prototype.getLayerHeight = function ()
{
	if (this.getParent () != null)
	{
		return parseInt (this.div.offsetHeight);
	}
	return 0;
};
MenuItem2a.prototype.getLayerTop = function ()
{
	if (this.getParent () != null)
	{
		return parseInt (this.div.style.top);
	}
	else
	{
		return this.defaultTop;
	}
};
MenuItem2a.prototype.getSubsHeight = function ()
{
	var ms = this.getRoot ().menuSpacing;
	for (var o, n = 0, i = 0, a = this.getChildren (); o = a[i]; i++)
	{
		var os = o.div.style.display;
		o.div.style.display = "";
		n += ms + o.getLayerHeight ();
		o.div.style.display = os;
	}
	if (this.lastOpened != null)
	{
		if (this.lastOpened.state == 1)
		{
			n += this.lastOpened.getSubsHeight ();
		}
	}
	return n;
};
MenuItem2a.prototype.setOff = function ()
{
	if (this.getRoot ().isMoving == -1)
	{
		MenuItem.prototype.setOff.apply (this, []);
	}
};
MenuItem2a.prototype.changeClass = function (s)
{
	if (this.getRoot ().isMoving == -1)
	{
		var tmp = this.div.style.top;
		MenuItem.prototype.changeClass.apply (this, arguments);
		this.div.style.top = 0 + "px";
		this.div.style.top = tmp;
	}
};
MenuItem2a.prototype.setOn = function ()
{
	if (this.getRoot ().isMoving == -1)
	{
		MenuItem.prototype.setOn.apply (this, []);
		var p = this.getParent ();
		if (p.lastOpened != null)
		{
			p.lastOpened.animClose (this.regId, 'animOpen');
		}
		else if (this.hasChildren ())
		{
			this.animOpen ();
		}
		p.lastOpened = this;
	}
};
MenuItem2a.prototype.showChildren = function ()
{
	for (var o, i = 0, a = this.getChildren (); o = a[i]; i++)
	{
		o.vis (1);
	}
};
MenuItem2a.prototype.hideChildren = function ()
{
	for (var o, i = 0, a = this.getChildren (); o = a[i]; i++)
	{
		o.div.style.top = o.defaultTop + "px";
		o.hideChildren ();
		o.setOff ();
		o.vis (0);
	}
};
MenuItem2a.prototype.animOpen = function ()
{
	if (this.getRoot ().isMoving == -1 && this.hasChildren ())
	{
		this.getRoot ().isMoving = 0;
		for (var o, i = 0, sh = this.getSubsHeight (), a = this.getAfter (); o = a[i]; i++)
		{
			o.animInit (o.getLayerTop () + sh);
		}
		this.animWatch (this.regId, 'showChildren');
	}
};
MenuItem2a.prototype.animClose = function (o, m)
{
	if (this.getRoot ().isMoving == -1)
	{
		this.getParent ().lastOpened = null;
		if (this.hasChildren ())
		{
			this.hideChildren ();
			this.getRoot ().isMoving = 0;
			for (var t, i = 0, a = this.getAfter (); t = a[i]; i++)
			{
				t.animInit (t.getCurrentDefTop ());
			}
			this.animWatch (o, m);
		}
		if (!this.hasChildren ())
		{
			eval (o + "." + m + "()");
		}
	}
};
MenuItem2a.prototype.animInit = function (a)
{
	this.aDest = a;
	if (this.getLayerTop () != this.aDest)
	{
		var mf = this.aDest > this.getLayerTop () ? Math.ceil : Math.floor;
		this.aStep = mf ((this.aDest - this.getLayerTop ()) / 10);
		this.getRoot ().isMoving++;
		this.aIntr = setTimeout (this.regId + '.animStep()', 5);
	}
};
MenuItem2a.prototype.animStep = function ()
{
	var ct = this.getLayerTop ();
	if (ct != this.aDest)
	{
		var mf = this.aStep > 0 ? Math.min : Math.max;
		this.div.style.top = mf (ct + this.aStep, this.aDest) + "px";
		this.aIntr = setTimeout (this.regId + '.animStep()', 5);
	}
	else
	{
		clearTimeout (this.aIntr);
		this.getRoot ().isMoving--;
	}
};
MenuItem2a.prototype.animWatch = function (o, m)
{
	this.wIntr = setTimeout (this.regId + '.watchAnim ("' + o + '", "' + m + '")', 5);
};
MenuItem2a.prototype.watchAnim = function (o, m)
{
	if (this.getRoot ().isMoving == 0)
	{
		this.getRoot ().isMoving = -1;
		clearTimeout (this.wIntr);
		eval (o + "." + m + "()");
	}
	else
	{
		this.wIntr = setTimeout (this.regId + '.watchAnim ("' + o + '", "' + m + '")', 5);
	}
};
MenuItem2a.prototype.getCurrentDefTop = function ()
{
	if (this.getParent ().lastOpened != null)
	{
		return this.defaultTop + this.getParent ().lastOpened.getSubsHeight ();
	}
	return this.defaultTop;
};
