// There is anannoying bug with the tabstrip where IE can't render
// the Z order correctly. Therefore, this will use the dom to change the z-order

// Lewis Harvey (lewis.harvey@aws.net)
// 5 Oct 2007

// Called on OnClientLoad of the tabstrip
function ChangeZIndex(tabStrip)
{
	// Get the containing div of the tab strip
	//var containerDiv = $(tabStrip);
	//if(containerDiv != null)
	//{
	//	containerDiv.innerHTML = "<div id=\"tabStripContainer\">" + containerDiv.innerHTML;
	//	containerDiv.innerHTML = containerDiv.innerHTML + "</div>";
	//}
}

function LowerTabStrip()
{
	var tabStripContainer = document.getElementById("mainContent");
	if(tabStripContainer != typeof(undefined))
	{
		var listItems = tabStripContainer.getElementsByTagName("li");
		for(var j = 0; j < listItems.length; j++)
		{
			var anchors = listItems[j].getElementsByTagName("a");
			for(var i = 0; i < anchors.length; i++)
			{
				// get the anchor tag
				//if(listItems[i].childNodes[0].tagName = "a")
				anchors[i].style.zIndex = -4;
			}
		}
	}
}

function RaiseTabStrip()
{
	var tabStripContainer = document.getElementById("mainContent");
	if(tabStripContainer != typeof(undefined))
	{
		var listItems = tabStripContainer.getElementsByTagName("li");
		for(var j = 0; j < listItems.length; j++)
		{
			var anchors = listItems[j].getElementsByTagName("a");
			for(var i = 0; i < anchors.length; i++)
			{
				// get the anchor tag
				//if(listItems[i].childNodes[0].tagName = "a")
				anchors[i].style.zIndex = 9;
			}
		}
	}
}