function getUpdate(obj){
		window["videos"][id].current.removeClassName('video'+obj.oldstate).addClassName('video'+obj.newstate)
};


FLVplayer = Class.create({
	initialize: function(player_id){
	   this.movie = player_id
	   this.playing = false;
	},

	/* Base functions */
	play : function(obj){
	  if(obj){this.load(obj)}
	  this.sendEvent('play');
	  this.playing = !this.playing;
	},

	stop : function(){
		this.sendEvent('stop');
		this.playing = false;
	},

	/* File / item functions */
	load: function(obj) {
		this.sendEvent("load", obj);
	},

	addItem: function(obj,idx) {
		this.movie.addItem(obj,idx);
	},

	removeItem: function(idx) {
		this.movie.removeItem(idx);
	},

	getLength: function(swf) {
		return this.movie.getLength();
	},

	getData: function(idx){
		this.movie.itemData(idx);
	},

	sendEvent: function(typ,prm){
		this.movie.sendEvent(typ,prm);
	}

})

