﻿

function loadPlayer(video, image, width, height, autoplay)
{
    autoplay = (autoplay == null) ? false : autoplay;
    document.write('<div id="media" style="width:' + width + 'px;height:' + height + 'px;"></div>');
    
    if (image+"" == "undefined") image = '';
    else image = 'url('+image+')';
    
    flowplayer("media", "/videos/flowplayer/flowplayer-3.1.5.swf", {
		plugins: {
			 controls: {    					
				buttonOverColor: '#6b9cbd',
				sliderColor: '',
				bufferColor: '#dddddd',
				sliderGradient: 'none',
				progressGradient: 'medium',
				durationColor: '',
				progressColor: '#284557',
				backgroundColor: '#242424',
				timeColor: '#6b9cbd',
				buttonColor: '#284557',
				backgroundGradient: 'none',
				bufferGradient: 'none',
				opacity:1.0
			}
		},
		clip: {
			url: video,
			onFinish: function(){this.getPlugin("play").hide()},
			autoPlay: autoplay,
			autoBuffering: false
		},
		canvas: {
			backgroundColor:'#ffffff',
			backgroundImage: image
		}
	});
}

