/**
* Assign the view handler
*/

viewHandler = Home;

/**
* Creates a new object with methods used by the Home page
*
* @author				Matt Gifford
* @copyright			2008 Timeshifting Interactive Limited
*/
function Home()
	{
	// Step 1. Define Properties

	var _instance = this;



	// Step 2. Define Public Methods

	/**
	* Sets up the initial page state and event handlers
	*/
	this.init = function()
		{
		// Call generic page init method
		this.base.init.call(this);

		// Add event handlers to intro samples
		try {
			var anchors = document.getElementById('homeIntroSamples');
			if (anchors) {
				anchors = anchors.getElementsByTagName('ul')[0].getElementsByTagName('a');
			}
			for (var x = 0; x < anchors.length; x++) {
				if (anchors[x].className != 'samples') {
					anchors[x].onmouseover = __eventHandlerChangeActiveSample;
				}
			}
		} catch (e) {
		}
	}


	/**
	* Changes the active sample displayed
	*/
	function __eventHandlerChangeActiveSample()
		{
		var id = this.parentNode.className.replace(/\D/g, '');

		// Set the map active
		for (var x = 1; x < 4; x++)
			{
			document.getElementById('homeIntroSamples' + x).className = 'hidden';
			}
		document.getElementById('homeIntroSamples' + id).className = '';
		}

	}

