function startVideo(str, id, title) {
	new Ajax.Request('/home/show_new_video/' + id, {asynchronous:true, evalScripts:true});
	
	//load_video(str, title);
}

function startVideoFromHome(str, id, title) {
	new Ajax.Request('/home/show_new_video_home/' + id, {asynchronous:true, evalScripts:true});
	
	//load_video(str, title);
}


function load_video(str, title) {
	new Ajax.Request('/home/show_new_video/', {asynchronous:true, evalScripts:true});
	// thisMovie('video_player').SetVariable("/:videoURL", str);
	// 	thisMovie('video_player').SetVariable("/:videoTitle", title);
	// 	thisMovie('video_player').SetVariable("/:posterFrameURL", '');
	// 	thisMovie('video_player').TCallFrame("/", 1);
	document.getElementById('video_teaser').innerHTML = ''
}

function load_demo_reel() {
	new Ajax.Request('/home/show_demo_reel/', {asynchronous:true, evalScripts:true});
	document.getElementById('video_teaser').innerHTML = ''
}

// function start_promo_reel() {
// 	thisMovie('videoPlayer').SetVariable("/:videoURL", "http://s3.amazonaws.com/cineflix/VTS_01_1.flv");
// 	thisMovie('videoPlayer').SetVariable("/:videoTitle", "Demo Reel");
// 	thisMovie('videoPlayer').SetVariable("/:posterFrameURL", '');
// 	thisMovie('videoPlayer').TCallFrame("/", 1);
// 	
// }

function thisMovie(movieName) {
	// IE and Netscape refer to the movie object differently.
	// This function returns the appropriate syntax depending on the browser.
	if (navigator.appName.indexOf ("Microsoft") !=-1) {
		return window[movieName];
	} else {
		return document[movieName];
	}
}