Function.prototype.inherit = function (p)
{
	for (i in p.prototype)
	{
		this.prototype[i] = p.prototype[i];
	}
};
Function.prototype.augment = function (p)
{
	for (var o, i = 1; o = arguments[i]; i++)
	{
		this.prototype[o] = p.prototype[o];
	}
};
function MenuItem2 (parent, index, args)
{
	if (arguments.length)
	{
		MenuItem.apply (this, arguments);
	}
}
MenuItem2.inherit (MenuItem);
MenuItem2.prototype.$c = MenuItem2;
MenuItem2.prototype.args = ['text', 'href', 'target', 'styleId', 'state'];
MenuItem2.prototype.getHTML = function ()
{
	MenuItem.prototype.getHTML.apply (this, []);
	if (this.getDepth () > 0)
	{
		this.div.style.display = "none";
	}
	for (var o, i = 0, a = this.getChildren (); o = a[i]; i++)
	{
		o.getHTML ();
	}
};
MenuItem2.prototype.setOff = function ()
{
	MenuItem.prototype.setOff.apply (this, []);
	for (var o, i = 0, a = this.getChildren (); o = a[i]; i++)
	{
		o.setOff ();
		o.vis (0);
	}
};
MenuItem2.prototype.setOn = function ()
{
	MenuItem.prototype.setOn.apply (this, []);
	for (var o, i = 0, a = this.getChildren (); o = a[i]; i++)
	{
		o.vis (1);
	}
};
MenuItem2.prototype.vis = function (t)
{
	this.div.style.display = t ? "" : "none";
};
function MenuMulti (div, basetarget)
{
	if (arguments.length)
	{
		Menu.apply (this, arguments);
	}
}
MenuMulti.prototype = new MenuItem2 ();
MenuMulti.augment (Menu, "addStyle", "build");
