/*//if javascript is enabled, this function is called by the initialise.js
//this script is basically 2 functions to control the css class names used by the tabbed div's in the whats-on-details page

function tabLoad() {
	//set the tab bar class to 'tab-open'
    if (tabOpenIndex == null)
        tabOpenIndex = 1;
        
	var node = document.getElementById('emailcontrol');
	node.className="tab-open";

	//set the first tab class to 'sel'
	var firstTab = true;
	var x = document.getElementById('tab-bar');
	for (i=0;i<x.childNodes.length;i++)
		{
			if(x.childNodes[i].nodeName == 'LI')
			{
				if (tabOpenIndex == i)
				{
			
				x.childNodes[i].className=" current ";
				firstTab = false;
				}
			}
		}

	//set the first tab class to 'tab-open' so the content div is displayed.
	//class 'tab-headers' is used to hide the tab h3 headers, which are only shown when JavaScript is turned off
	var firstTab = true;
	var x = document.getElementById('tab-wrap');
	x.className="tab-headers";
	for (i=0;i<x.childNodes.length;i++)
		{
			if(x.childNodes[i].nodeName == 'DIV')
			{
				if (tabOpenIndex != i)
				{
				x.childNodes[i].className="tab-collapse";
				firstTab = false;
				}
			}
		}
}

function tabOpen(elementID) {

	//set the class of the current tab to 'tab-collapse'
	//set the class of the selected tab to 'tab-open'
	var x = document.getElementById('tab-wrap');
	for (i=0;i<x.childNodes.length;i++)
		{
			if(x.childNodes[i].nodeName == 'DIV')
				{
				if(x.childNodes[i].className == 'tab-open')
					{
						x.childNodes[i].className="tab-collapse";
					}
				}
		}

	var node = document.getElementById('tab-'+elementID);
	node.className="tab-open";

	//set the selected tab
	var x = document.getElementById('tab-bar');
	for (i=0;i<x.childNodes.length;i++)
		{ 
			if(x.childNodes[i].nodeName == 'LI')
				{
				
				if(x.childNodes[i].className == 'current')
					{
						x.childNodes[i].className='';
					}
				}
		}
 
	var node = document.getElementById(elementID);
	node.className='current';
}*/
