var the_player = null; 

function playerReady(thePlayer) {
	the_player = window.document[thePlayer.id];
}


function video_open(content_id, video_file) {
//	if(the_player != null) the_player.sendEvent('PLAY');
	preview = document.getElementById('video_preview_div_' + content_id);
	player = document.getElementById('video_player_div_' + content_id);
	player_flash = document.getElementById('video_player_div_flash_' + content_id);
	
	preview.style.display = "none";
	player.style.display = "block";
	
	var so = new SWFObject("flash/mediaplayer/player.swf", "play", "470", "287", "9", "#FFFFFF");
	so.addParam("allowfullscreen","true");
	so.addParam("allowscriptaccess","always");
	so.addParam("wmode", "transparent");
	so.addParam("flashvars","file=../../" + video_file + '&autostart=true"' );
	so.write(player_flash.id);
}


function video_caption_over(content_id) {
	caption = document.getElementById('video_caption_player_' + content_id);
	
	if (caption.style.display != "block") {
		caption.style.display = "block";
	}

}

function video_caption_out(content_id) {
	caption = document.getElementById('video_caption_player_' + content_id);
	
	if (caption.style.display != "none") {
		caption.style.display = "none";
	}
}
