// Email obfuscator script 2.1 by Tim Williams, University of Arizona
// Random encryption key feature by Andrew Moulden, Site Engineering Ltd
// This code is freeware provided these four comment lines remain intact
// A wizard to generate this code is at http://www.jottings.com/obfuscator/
//
// Recoded by David Archer

function mailLink(display, coded, cipher)
{
	shift = coded.length;
	address = "";

	for (ind = 0; ind < shift; ind++)
	{
		chr = coded.charAt(ind);
		pos = cipher.indexOf(chr);

		if (pos > -1) chr = cipher.charAt((pos - shift + cipher.length) % cipher.length);

		address += chr;
	}

	document.write("<a href='mailto:" + address + "'>" + display + "</a>");
}

function homePage()
{
	var photo = new Array(
		"00 Playing Croquet at CCC.jpg",
		"01 CCC Club house.jpg",
		"02 A sidey hoop on the Fulford Lawn.JPG",
		"03 A long roquet attempt on Lawn 3.jpg",
		"04 Stan Hall, our mentor.jpg",
		"05 we play all games, mainly AC but also GC.jpg",
		"06 Alison attempting a long hoop.jpg",
		"07 Rob Fulford completing one of his 10 consecutive Sextuple Peels in the 2006 Australian National Championships.jpg",
		"08 Chris Clarke approaching 2-back in the Australian National Championships 2006.jpg",
		"09 John Prince with his gentle and accurate game.JPG",
		"10 Oliver the future World Champion running hoop 5.jpg",
		"11 We can also play Gateball at CCC.jpg",
		"12 Gateball, more like golf with a short mallet.jpg",
		"13 The Mad Hatters arrive in the Spring.jpg",
		"14 Alison, a Mad Hatter who plays in the NSW team.jpg",
		"15 Improving our swing with the Bamford Swing Trainer.jpg",
		"16 Showing off the new carpet.jpg",
		"17 Annual photo with the Willoughby Mayor and Lady Mayoress, our Patron.jpg",
		"18 Croquet, barbeque and a glass of red go very well together.jpg",
		"19 We love Antipasti... President's Day 2010.jpg",
		"20 Italian food is so nice at CCC... President's Day 2010.jpg",
		"21 CCC 2010 Christmas Luncheon - our Lady Mayoress doing the honours.jpg");

	var ind = Math.floor(Math.random() * photo.length)

	document.getElementById('photo').src = 'photo/' + photo[ind];
	document.getElementById('photo').title = photo[ind].substring(3, photo[ind].length - 4);

	setTimeout("document.getElementById('thankyou').style.display = 'block'", 2000);
}

