function MakeAllTabsNonActive(divID)
{
	var tabCollection = document.getElementById(divID)
	
	for (i=0; i<tabCollection.childNodes.length; i++)
	{
	tabCollection.childNodes[i].className = 'tab'
	//alert(tabCollection.childNodes[i].className)
	}		
}

function HideAllTabContent(tab_content_container_ID)
{
	
	var tabContentCollection = document.getElementById(tab_content_container_ID)
	//alert(tabContentCollection.childNodes.length)
	for (i=0; i<tabContentCollection.childNodes.length; i++)
	{
	tabContentCollection.childNodes[i].className = 'tab_Content hide'
	}		
	
}

function TabContentChange(tab_bar_id,tab_id,IMG) {
		
		var tabID = tab_id.split("_");
		var tabCount = tab_bar_id.split("_");
		
		//alert(tab_id)
		
		current_tab_class=document.getElementById(tab_id);
		
		current_tab_Content_class=document.getElementById('tab_Content_'+tabID[1]+'_'+tabID[2]);
		
		//document.location.href = "about.asp";
		//alert(current_tab_class.className)
		document.getElementById('PageCatImg_'+tabID[1]+'_'+tabID[2]).src = 'Page_Category_Images/'+IMG;
		
		//alert(tab_Content_3.className)
		
		MakeAllTabsNonActive(tab_bar_id);
		HideAllTabContent('tab_Content_Container_'+tabCount[2]);	
			
		if (current_tab_class.className == 'tab')
		{
			//alert(current_tab_class.className)
			current_tab_class.className = 'tab active' ;
			//alert(current_tab_class.className)
			
			//HideAllTabContent();
			current_tab_Content_class.className = 'tab_Content show'
			//alert(current_tab_content_class.className)
			//remortgages_1_content.className = 'tab_Content hide'
			
		}
}

