function PrepareTabs()
{
	// Set onClick event for all anchors within the StudioTabs Div
	if (!document.getElementById) return false;
	if (!document.getElementById("studiotabs")) return false;
	if (!document.getElementsByTagName) return false;
	var StudioTabs = document.getElementById("studiotabs");
	var aryAnchors = StudioTabs.getElementsByTagName("a");
	for(ndx=0;ndx<aryAnchors.length;ndx++)
	{
		aryAnchors[ndx].onclick = function() {
			return ShowDiv(this);
		}
	}
}

//  Create arrays for the tab and associated div ids
var aryTabNames = new Array();
aryTabNames[0] = "tabci";
aryTabNames[1] = "tabmad";
var aryDivNames = new Array();
aryDivNames[0] = "cityinformation";
aryDivNames[1] = "mapsanddirections";

function ShowDiv(WhichDiv)
{
	// Determine the div associated with the clicked tab
	strTabName = WhichDiv.getAttribute("id");
	for(ndx=0;ndx<aryTabNames.length;ndx++)
	{
		if (aryTabNames[ndx] == strTabName) {
			strDivName = aryDivNames[ndx];
			break;
		}
	}
	// Set the correct tab state and show the div associated with the clicked tab while hiding all other divs
	for(ndx=0;ndx<aryDivNames.length;ndx++)
	{
		if (strDivName == aryDivNames[ndx])
		{
			document.getElementById(aryDivNames[ndx]).style.display = "block";
			document.getElementById(aryTabNames[ndx]).className = "on";
		}
		else {
			document.getElementById(aryDivNames[ndx]).style.display = "none";
			document.getElementById(aryTabNames[ndx]).className = "off";
		}
	}
	return false;
}