//
//	This script is used in the About Us page.
//

// set a global var used by the 'PopUpFactoid' fn below.
var current_name = '';

//
// Displays or hides the factoid popup, setting the contents for the appropriate person:
//
function PopupFactoid(name) {
	// do nothing on older browsers.
	if (document.getElementById) {

		// set the contents according to the name passed in.
		var contents = '';
		switch (name) {
			case 'tay':
				contents = '<strong>Caroline Tay</strong> - Interesting Fact<br />I am an identical twin and gave birth to twins!.';
				break;
			case 'brearley':
				contents = '<strong>Liza Brearley</strong> - Interesting Fact<br />If I wasn\'t a recruitment consultant, I would be .... very lazy.';
				break;
			case 'large':
				contents = '<strong>Jessica Large</strong> - Interesting Fact<br />When I was 10, I wanted to be an air stewardess.';
				break;
			case 'coghlan':
				contents = '<strong>Victoria Coghlan</strong> - Interesting Fact<br />When I was 10, I wanted to be a Blue Peter presenter.';
				break;
			case 'mackay':
				contents = '<strong>Clare Mackay</strong> - Interesting Fact<br />I\'ve climbed Mount Kilimanjaro.';
				break;
			case 'gillespie':
				contents = '<strong>Sam Gillespie n&eacute;e Estrin</strong> - Interesting Fact<br />When I was 10, I wanted to be a policewoman.';
				break;
			case 'mayhew':
				contents = '<strong>Joyce Mayhew</strong> - Interesting Fact<br />If I could be anywhere right now, I would be feeding the penguins.';
				break;
			case 'coleman':
				contents = '<strong>Katharine Coleman</strong> - Interesting Fact<br />I was once on the cover of The Creme - for being an excellent secretary.';
				break;
			case 'tait':
				contents = '<strong>Susanna Tait</strong> - Interesting Fact<br />When I was 10, I wanted to be a racing driver.';
				break;
			case 'judd':
				contents = '<strong>Vikki Judd</strong> - Interesting Fact<br />When I was 10, I wanted to be a pop star.';
				break;
			case 'stevens':
				contents = '<strong>Ashleigh Stevens</strong> - Interesting Fact<br />If I wasn\'t a recruitment consultant, I would be a hotel inspector.';
				break;
			case 'brewster':
				contents = '<strong>Tamsyn Brewster</strong> - Interesting Fact<br />I\'ve dived with great white sharks.';
				break;
			case 'hague':
				contents = '<strong>Karen Hague</strong> - Interesting Fact<br />If I could be anywhere right now, I would be on a hot beach with white sand, blue sea and a pina colada in my hand.';
				break;
			case 'dallas':
				contents = '<strong>Tracy Dallas</strong> - Interesting Fact<br />When I was 10, I wanted to be a boy (I lived on a farm and being a girl wasn\'t cool!).';
				break;
			case 'boaler':
				contents = '<strong>Kate Boaler</strong> - Interesting Fact<br />if I wasn\'t in recruitment, I would be a \'lady what lunches\'.';
				break;
			case 'hardcastle':
				contents = '<strong>Alice Hardcastle</strong> - Interesting Fact<br />I used to be an army cadet.';
				break;
			case 'jones':
				contents = '<strong>Rachel Jones</strong> - Interesting Fact<br />I used to keep pet sheep.';
				break;
		}
		// update the element with the contents.
		document.getElementById('about_factoid_content').innerHTML = contents;

		// if the window is hidden or is currently showing details for another person, display the popup.
		var el = document.getElementById('about_factoid_popup');
		if (el.style.visibility == 'hidden' || el.style.visibility == '' || name != current_name) {
			el.style.visibility = 'visible';
		}
		// otherwise, hide the popup.
		else {
			el.style.visibility = 'hidden';
		}
		// update the current name.
		current_name = name;
	} 
}

//
// Script end.
//
