// JavaScript Document
//DESIGN: DIGITALTURTLE.CO.UK
//AUTHOR: MATT BENTLEY
//EMAIL: MATT@DIGITALTURTLE.CO.UK

window.onload = function()
{ //Wait for the page to load.
	if(document.getElementById)
	{
		var bathList = document.getElementById('bath_list').getElementsByTagName("a");
		//Put the below code in a loop
		bathList[0].onclick = function()
		{ 
			changeTab(0);
			return false;
		}
		bathList[1].onclick = function()
		{ 
			changeTab(1);
			return false;
		}
		bathList[2].onclick = function()
		{ 
			changeTab(2);
			return false;
		}
		bathList[3].onclick = function()
		{ 
			changeTab(3);
			return false;
		}
		bathList[4].onclick = function()
		{ 
			changeTab(4);
			return false;
		}
		bathList[5].onclick = function()
		{ 
			changeTab(5);
			return false;
		}
		bathList[6].onclick = function()
		{ 
			changeTab(6);
			return false;
		}
		bathList[7].onclick = function()
		{ 
			changeTab(7);
			return false;
		}
		bathList[8].onclick = function()
		{ 
			changeTab(8);
			return false;
		}
		bathList[9].onclick = function()
		{ 
			changeTab(9);
			return false;
		}
		bathList[10].onclick = function()
		{ 
			changeTab(10);
			return false;
		}
		
		
	}
};

function changeTab(objNum)
{
	if(document.getElementById)
	{
		var bathHeader = document.getElementById('bath_header');
		var bathImg = document.getElementById('bath_img');
		var bathText = document.getElementById('bath_text');
		var headers = new Array();
		headers[0] = "Roman Baths Museum";
		headers[1] = "Longleat";
		headers[2] = "The Royal Crescent";
		headers[3] = "Pitch &amp; Putt";
		headers[4] = "Bridge &amp; Weir";
		headers[5] = "Castle Coombe";
		headers[6] = "Bath Abbey";
		headers[7] = "Bristol Indoor Go-Karting";
		headers[8] = "Museum of Costume";
		headers[9] = "'Pride of Bath'";
		headers[10] = "Theatre Royal";
		var text = new Array();
		text[0] = "Built around the natural hot springs by the Romans, the remains are remarkably complete with many interesting artifacts on display. The waters may be taken in the 18th Century Georgian Pump Rooms next door. The Pump Rooms adjoin the Roman Baths and visitors may relax in these elegant surroundings whilst taking tea and listening to the Pump Room Trio.";
		text[1] = "A magnificent 16th Century house set in rolling parkland, priceless family heirlooms spanning four centuries, fascinating exhibitions, a Safari Park, exciting rides and amusements and the Worlds largest maze, all combine to provide a wonderful day out for the whole family.";
		text[2] = "Built by John Wood the Younger between 1767 to 1774, the Royal Crescent is the grandest of Baths many Georgian Crescent buildings, with magnificent views over Royal Victoria Park.";
		text[3] = "Pitch and Putt is available in beautiful Victoria Park, where you will also find a 12 and 18 hole approach course. Entry Hill Golf Course, with 9 holes, is the nearest full sized course.";
		text[4] = "Designed by Robert Adam in 1770 and lined with interesting shops and restaurants.";
		text[5] = "The picturesque town of Castle Coombe, which hosts the famous Go-Kart and Skid-Pan race track, is only 18 miles away.";
		text[6] = "The Abbey is open to visitors throughout the week.";
		text[7] = "Or, when the weathers not good, try Bristol Indoor Go-Karting.";
		text[8] = "The Assembly Rooms house the Museum of Costume, which has one of the most prestigious and extensive collections and tells the fashion over 400 years. 18 period rooms furnished from the 17th to the 19th Century, set in beautiful gardens on the outskirts of Bath.";
		text[9] = "An afternoon or evening cruise aboard the Pride of Bath will help you unwind after a days meeting. Or for the more adventurous, why not take out a Punt on the River Avon.";
		text[10] = "Built in 1805 and considered to one of the most beautiful in Britain, the Theatre offers a variety of excellent productions throughout the year.";
		bathHeader.innerHTML = headers[objNum];
		bathImg.src = "/images/bath/bath"+objNum+".jpg";
		bathText.innerHTML = text[objNum];
	}
}	