/**
 * Added a helper function to add windowsonload events 
 * http://blog.firetree.net/2005/07/17/javascript-onload/
 *
 * Flowplayer Clip attribute configuration
 * http://flowplayer.org/documentation/configuration/clips.html
 *
 */
function WindowOnload(f) {var prev=window.onload;window.onload=function(){ if(prev)prev(); f(); }}

function flowembed(div_name, video_url, auto_play, width, height) {
	auto_play = auto_play || false;
	width = width || 425;
	height = height || 344;

	WindowOnload(
		function() {
			flashembed(div_name,
				{
					src:'http://www.opennicta.com.au/__data/assets/file/0006/18096/FlowPlayerDark.swf',
					width: width,
					height: height
				},
				{config: {   
					autoPlay:	auto_play,
					autoBuffering:	true,
					initialScale:	'fit',
					loop:		false,
					videoFile:	video_url
				}} 
			);
		}
	);
}



function flowembedSplash(div_name, video_url, splash_image_url) {

	WindowOnload(
		function() {
			flashembed(div_name,
				{
					src:'http://www.opennicta.com.au/__data/assets/file/0006/18096/FlowPlayerDark.swf',
					width: 425,
					height: 344
				},
				{config: {   
					autoPlay:		auto_play,
					autoBuffering:		true,
					initialScale:		'fit',
					loop:			false,
					videoFile:		video_url,
					splashImageFile:	splash_image_url
				}} 
			);
		}
	);
}

