/**
* 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);
		}
	

	/**
	* Plays the specified video
	*
	* @param		id			The video to play
	*/
	this.playVideo = function(id)
		{
		// Inject the container html
		var viewer = document.createElement('div');
		viewer.id = 'viewer';
		viewer.innerHTML = '<div id="viewerBackground" onclick="document.body.removeChild(document.getElementById(\'viewer\'));"></div><div id="viewerFlash"><div id="flashPlayer"></div><a href="javascript:;" class="close" onclick="document.body.removeChild(document.getElementById(\'viewer\'));"></a></div>';
		document.body.appendChild( viewer );

		// Inject the flash player
		var so = new SWFObject("http://www.foreveryoung.net/flash/videoplayer.swf", "mediaVideo", "480", "407", "8", "#000000");
		so.addParam("wmode", "opaque");
		so.addParam("allowScriptAccess", "sameDomain");
		so.addParam("allowFullScreen", "true");
		so.addVariable("videoPaths","Rahimi Video PP.flv,kabc_tv_dr_rahimi_tuliplift.flv,rahimitulip.flv,rahimiethnic.flv,rahimihand.flv");
		so.addVariable("startIndex", ""+(--id));
		so.write('flashPlayer');
		}
	}
