{% load i18n js %}

<div id="flash-plugin-{{ object.id }}">{% trans 'Missing flash plugin. Download <a href="http://adobe.com/flashplayer">here</a>.' %}</div>

<script type="text/javascript">
//<![CDATA[
	var flashvars = {};
	flashvars.movie = "{{ object.get_movie }}";
	{% if object.image %}
	flashvars.image = "{{ object.image.url }}";
	{% endif %}
	
	flashvars.autoplay = "{{ object.auto_play|bool }}";			
	flashvars.loop = "{{ object.loop|bool }}";
	flashvars.autohide = "{{ object.auto_hide|bool }}";
	flashvars.fullscreen = "{{ object.fullscreen|bool }}";
	
	flashvars.color_text = "0x{{ object.textcolor }}";
	flashvars.color_seekbar = "0x{{ object.seekbarcolor }}";
	flashvars.color_loadingbar = "0x{{ object.loadingbarcolor }}";
	flashvars.color_seekbarbg = "0x{{ object.seekbarbgcolor }}";
	
	flashvars.color_button_out = "0x{{ object.buttonoutcolor }}";
	flashvars.color_button_over = "0x{{ object.buttonovercolor }}";
	flashvars.color_button_highlight = "0x{{ object.buttonhighlightcolor }}";
	
	var params = {};
	params.allowfullscreen = "true";
	params.allowscriptaccess = "always";
	params.bgcolor = "#{{ object.bgcolor }}";
        params.wmode = "transparent";
	
	var attributes = {};
	attributes.align = "middle";
	
	swfobject.embedSWF("{{ CMS_MEDIA_URL }}swf/player.swf", "flash-plugin-{{ object.id }}", "{{ object.get_width }}", "{{ object.get_height }}", "9.0.45", "{{ CMS_MEDIA_URL }}swf/expressInstall.swf", flashvars, params, attributes);
//]]></script>
