netedit.player = {
	
    options:{
        containerId: 'mediaspace',
		width: '470',
		height: '320',
		background: '#ffffff',
		playlist: 'right',
		autostart: 'true',
		allowfullscreen: 'true',
		repeat: 'none', // list , always
		file: 'js/mediaplayer-5.2/video.flv',
		id: 'ply'
    },

	init: function(options){
    	this.options = $merge(this.options,options);
		
		this.lst = new Array();
		this.create();
	},
	
	create: function(){
		try{
			var s1 = new SWFObject('js/mediaplayer-5.2/player.swf', this.options.id, this.options.width, this.options.height,'9',this.options.background);
			s1.addParam('allowfullscreen',this.options.allowfullscreen);
			s1.addParam('allowscriptaccess','always');
			s1.addParam('wmode','opaque');
			s1.addVariable('repeat',this.options.repeat);
			s1.addParam('flashvars','file='+this.options.file+'&playlist='+this.options.playlist+'&autostart='+this.options.autostart);
			s1.write(this.options.containerId);	
		}catch(e){
			alert('ERROR in "netedit.player.create()":\n'+e);
		}
	},
	
	addToList: function(obj){
		try{
			var player = $(this.options.id);
			this.lst.unshift(obj);
			player.sendEvent('LOAD', this.lst);
		}catch(e){
			alert('ERROR in "netedit.player.addToList()":\n'+e);
		}
	}
};