function createTabs()
{
	var most = new TabControl();
	var children = arguments[1].childNodes;
	var more = arguments[2];
	var index = isNaN(arguments[3]) ? 0 : parseInt(arguments[3], 10);
	var node = null;
	var item = null;
	var height = 0;

	tabs = arguments[0].getElementsByTagName("img");
	items = [];
	for (var i = 0; i < children.length; ++i)
	{
		item = children.item(i);
		if (item.nodeType == 1)
		{
			items[items.length] = item;
			height = Math.max(height, parseInt(item.offsetHeight, 10));
		}
	}
	for (var i = 0; i < items.length; ++i)
	{
		item = items[i];
		item.style.height = height + "px";
		item.style.display = "none";
	}
	for (var i = 0; i < tabs.length; ++i)
	{
		tabs[i].onmouseover = function()
		{
			this.src = this.src.replace(/_off\./, "_over.");
		}
		tabs[i].onmouseout = function()
		{
			this.src = this.src.replace(/_over\./, "_off.");
		}
		most.items.add(tabs[i], items[i]);
	}
	if (!more)
		;
	else if (!more.innerHTML.replace(/\s*/g, "").length)
		more.parentNode.removeChild(more);
	else
	{
		for (node = more.parentNode; node != null; node = node.parentNode)
			if (/most/.test(node.className))
				break;
		if (node)
			node.className += " moreon";
	}
	most.onbeforechange = function()
	{
		var idx = this.selectedIndex;

		if (-1 < idx)
			this.items[idx].tab.src = this.items[idx].tab.src.replace(/_on\./, "_off.");
	}
	most.onchange = function()
	{
		var idx = this.selectedIndex;

		if (-1 < idx)
			this.items[idx].tab.src = this.items[idx].tab.src.replace(/_(off|over)\./, "_on.");
	}
	if (index < most.items.length)
		most.select(index);
	else
		most.select(most.items.length - 1)
}
