var nTabs = 4;

function ResetTabs()
{
	if (document.getElementById)
	{
		document.write ("<style>#tabs .tab { display: none }</style>");
	}
}
function SwitchTab(tab)
{
	if (document.getElementById)
	{
		for (var i = 1; i < nTabs + 1; i++)
		{
			var tabbtn = document.getElementById("tabbtn" + i);
			if (tabbtn)
			{
				if (i != tab)
					tabbtn.className = "";
				else
					tabbtn.className = "selected";
			}
			var tabcontent = document.getElementById("tab" + i);
			if (tabcontent)
			{
				if (i != tab)
					tabcontent.style.display = "none";
				else
					tabcontent.style.display = "block";
			}
		}
	}
	var abheight = 0;
	jQuery("#tab" + tab + " .topPickAbs").each(function(){
		if ( abheight < jQuery(this).height() )
		{
			abheight = jQuery(this).height();
		}

		jQuery("#tab" + tab + " .topPickAbs").height( abheight );
	});
}

var nTabs2 = 4;

function ResetTabs2()
{
	if (document.getElementById)
	{
		document.write ("<style>#tabs2 .tab { display: none }</style>");
	}
}
function SwitchTab2(tab)
{
	if (document.getElementById)
	{
		for (var i = 1; i < nTabs2 + 1; i++)
		{
			var tab2btn = document.getElementById("tab2btn" + i);
			if (tab2btn)
			{
				if (i != tab)
					tab2btn.className = "";
				else
					tab2btn.className = "selected";
			}
			var tab2content = document.getElementById("tab2" + i);
			if (tab2content)
			{
				if (i != tab)
					tab2content.style.display = "none";
				else
					tab2content.style.display = "block";
			}
		}
	}
	var abheight = 0;
	jQuery("#tab" + tab + " .topPickAbs").each(function(){
		if ( abheight < jQuery(this).height() )
		{
			abheight = jQuery(this).height();
		}

		jQuery("#tab" + tab + " .topPickAbs").height( abheight );
	});
}
