var selectedTab = null;
		
		function hideTabs(tabs)
		{
			for( var t in tabs){
				var currentTabLayer = document.getElementById(tabs[t]);
				currentTabLayer.style.display = 'none';
			}
		}
		
		function highlightTab(obj)
		{
			if (obj.style)
			{
				obj.style.textDecoration = 'none';
			}
		}

		function unhighlightTab(obj)
		{
			if (obj.style)
			{
				obj.style.textDecoration = 'none';
			}
		}
		
		function selectTab(obj)
		{
			if (obj)
			{
				//Change the highlighted tab if the user clicked on a new tab
				if(selectedTab != null)
				{
					var currentTab = selectedTab;
					var currentTabL = document.getElementById(selectedTab.id + 'l');
					var currentTabR = document.getElementById(selectedTab.id + 'r');
					var currentTabLayer = document.getElementById(selectedTab.id + 'Layer');
					var newTabLayer = document.getElementById(obj.id + 'Layer');
					currentTab.className = 'unselectedTab';
					currentTabL.className = 'unselectedLeft';
					currentTabR.className = 'unselectedRight';
					currentTabL.style.borderBottom = 'black 1px solid';
					currentTabR.style.borderBottom = 'black 1px solid';
					currentTab.style.borderBottom = 'black 1px solid';
					currentTabLayer.style.display = 'none';
					obj.className = 'selectedTab';
					newTabLayer.style.display = '';
					selectedTab = obj;
					var selectedTabL = document.getElementById(selectedTab.id + 'l');
					var selectedTabR = document.getElementById(selectedTab.id + 'r');
					selectedTabL.className = 'selectedLeft';
					selectedTabR.className = 'selectedRight';
					selectedTab.style.borderBottom = 'none';
					selectedTabL.style.borderBottom = 'none';
					selectedTabR.style.borderBottom = 'none';
				}
				else
				{
					selectedTab = obj;
					var newTabLayer = document.getElementById(obj.id + 'Layer');
					obj.className = 'selectedTab';
					var selectedTabL = document.getElementById(selectedTab.id + 'l');
					var selectedTabR = document.getElementById(selectedTab.id + 'r');
					selectedTabL.className = 'selectedLeft';
					selectedTabR.className = 'selectedRight';
					newTabLayer.style.display = '';
					selectedTab.value = obj.id;
					selectedTab.style.BorderBottom = 'none';
				}	
			}
		}		