// HighLiteTab dehighlights all the tabs & then highlights the correct tab
// this also includes a call to switch the tables
function HighLiteTab(objAnchor,strTab)
{
	var objPanel = document.getElementById(strTab);
	var objAnchors = objPanel.getElementsByTagName("a");
	
	for (var i = 0; i < objAnchors.length; i++)
	{
		objAnchors[i].className = "normal";
		SwitchTables(objAnchors[i].id, false);
	}	
	
	objAnchor.className = "selected";
	objAnchor.blur();
	
	SwitchTables(objAnchor.id, true);
}

function SwitchTables(strAnchor, bolDisplay)
{
	var strTable = strAnchor.replace("tab", "tbl");
	var objTable = document.getElementById(strTable);
	if (bolDisplay) objTable.className = "show";
	else  objTable.className = "hide";
}

// LoadTriggers finds the panel [pnlLinks] and the [a] elements inside it
// and attaches the HighLiteTab function to onclick of the [a] elements
function LoadTriggers()
{
	var objPanel = document.getElementById("pnlLinks");
	var imgPanel = document.getElementById("pnlBtn");

	var objAnchors1 = objPanel.getElementsByTagName("a");
	for (var i = 0; i < objAnchors1.length; i++)
		objAnchors1[i].onclick = function () { HighLiteTab(this,"pnlLinks"); }	
		
	var objAnchors2 = imgPanel.getElementsByTagName("a");
	for (var i = 0; i < objAnchors2.length; i++)
		objAnchors2[i].onclick = function () { HighLiteTab(this,"pnlBtn"); }
}

// attach/add the function [LoadTriggers] to [onload] event of the window
if (window.addEventListener) window.addEventListener("load", LoadTriggers, false); // Non IE Browsers
else window.attachEvent("onload", LoadTriggers); // IE

function display(spanid,conid)
{
	var st=document.getElementById(spanid);
	st.className="show";
	
	var arr=new Array();
	arr=document.getElementsByTagName("div");
	
	for(var i=0;i<arr.length;i++)
	{
		if(arr[i].title=="Customer Showcase")
		{
			if(spanid!=arr[i].id)
				{
					arr[i].className="hide";
				}
		}
	}
}


