function showTrack(show)
{
	for(i=1; i<=5; i++)
	{
		if(theTab  = document.getElementById("Tab" + i))
			theTab.style.borderColor = i==show ? "#3d6699" : "#fff";
		if(showTab = document.getElementById("Track" + i + "Div"))
			showTab.style.display = i==show ? "block" : "none";
	}
	//hide Agenda
	theTab  = document.getElementById("AgendaTab");
	showTab = document.getElementById("AgendaContents");
	showTab.style.display = "none";
	theTab.style.borderColor = "#fff";
	//hide Registration
	theTab  = document.getElementById("RegistrationTab");
	showTab = document.getElementById("RegistrationContents");
	showTab.style.display = "none";
	theTab.style.borderColor = "#fff";
}
function showAgenda()
{
	theTab  = document.getElementById("AgendaTab");
	showTab = document.getElementById("AgendaContents");
	showTab.style.display = "block";
	theTab.style.borderColor = "#cfdf47";
	//hide tracks:
	for(i=1; i<=5; i++)
	{
		if(theTab  = document.getElementById("Tab" + i))
			theTab.style.borderColor = "#fff";
		if(showTab = document.getElementById("Track" + i + "Div"))
			showTab.style.display = "none";
	}
	//hide Registration
	theTab  = document.getElementById("RegistrationTab");
	showTab = document.getElementById("RegistrationContents");
	showTab.style.display = "none";
	theTab.style.borderColor = "#fff";
}
function showRegistration()
{
	theTab  = document.getElementById("RegistrationTab");
	showTab = document.getElementById("RegistrationContents");
	showTab.style.display = "block";
	theTab.style.borderColor = "#cfdf47";
	//hide tracks:
	for(i=1; i<=5; i++)
	{
		if(theTab  = document.getElementById("Tab" + i))
			theTab.style.borderColor = "#fff";
		if(showTab = document.getElementById("Track" + i + "Div"))
			showTab.style.display = "none";
	}
	//hide Agenda
	theTab  = document.getElementById("AgendaTab");
	showTab = document.getElementById("AgendaContents");
	showTab.style.display = "none";
	theTab.style.borderColor = "#fff";
}
function openTab(tab, count)
{
	if(tab > 0 && tab <= count)
		showTrack(tab);
	else if(tab == 6)
		showAgenda();
	else if(tab == 7)
		showRegistration();
	else
		showTrack(1);
}