// JavaScript Document

function play_video(aFile, aSize)
{
	if (aSize == 'big')
	{
		var videoWidth = 800;
		var videoHeight = 386;
	}
	else
	{
		var videoWidth = 524;
		var videoHeight = 296;
	}
	
	var params = {
		allowfullscreen:'true',
		allowscriptaccess:'always',
		wmode:'opaque'
	}
	
	var flashvars = {
		backcolor:'000000',
		frontcolor:'FFFFFF',
		lightcolor:'00ACE5',
		screencolor:'000000',
		bufferlength:'5',
		volume:'50',
		controlbar:'over',
		autostart:'true',
		repeat:'always',
		stretching:'fill'
	}
	re_playlist = /\.xml$/
	if (aFile.search(re_playlist) >= 0) flashvars['playlistfile'] = aFile;
	else flashvars['file'] = '../video/'+aFile;
	
	var attributes = {
		id:'video_player1',
		name:'video_player1'
	}
	
	swfobject.embedSWF('swf/player.swf', 'mediaspace', videoWidth, videoHeight, '9.0.115', false, flashvars, params, attributes);
}