
var FlashController = Class.create();
FlashController.prototype = {
	player: null,
	videoID: null,
	streamID: null,
		
	playVideo: function(id) {
		if(id != this.videoID) {
			this.player.playByID(id);
			this.videoID = id;
			this.streamID = null;
			$('s-flash-large').scrollTo();
			//Effect.ScrollTo('s-flash-large');
		}
	},

	playStream: function(id) {
		if(id != this.streamID) {
			this.player.playStreamByID(id);
			this.videoID = null;
			this.streamID = id;
		}
	},
	
	playingByFlashVar: function(videoID) {
		this.videoID = videoID;
	},
	
	addToPlaylist: function(videoID) {
		this.player.addToPlaylist(videoID);
	},
		
	initialize: function() {
		this.player = $('s-flash-large').down().down();
	}
	
};

var flashController = null;
document.observe('dom:loaded', function() { flashController = new FlashController(); });