function Player(mediaUri, displayEl) {		// create the control	var control = document.createElement('object');	control.setAttribute('height', 0);	control.setAttribute('width', 0);	control.setAttribute('classid', 'CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6');		document.body.appendChild(control);		// and configure it	control.settings.autoStart = false;	control.uiMode = 'invisible';	control.style.display = 'none';		control.Settings.volume = 100;		this.control = control;	this.displayEl = displayEl;	this.playing = false;	this.timer = null;		this.display('Gestopt');		var obj = this;		control.attachEvent(		"PlayStateChange"		,function() { 			switch (control.playState) {				case 10:	// Ready to begin playing.				case 1:		// Playback of the current media item is stopped.					obj.display("Gestopt");					break;									case 3:		// The current media item is playing.					obj.monitorTime();					break;									case 6:		// The current media item is getting additional data from the server.					obj.monitorBuffer();					break;									case 7:		// Connection is established, but the server is not sending data. Waiting for session to begin.					obj.display('Verbinden');					break;			}			}	);		control.attachEvent(		"OpenStateChange"		,function() {						switch (control.openState) {				case 10: // Connecting to the server that holds the media item.				case 12: // Media item has been retrieved and is now being opened.					obj.display("Verbinden");					break;				}		}	);		var Media = control.newMedia(mediaUri);	this.control.currentMedia = Media;	}Player.activePlayer = null;Player.setActivePlayer = function(player) {	Player.activePlayer = player;}Player.getActivePlayer = function() {	return Player.activePlayer;}Player.stop	= function() {	if (this.activePlayer)		this.activePlayer.stop();	}Player.prototype.monitorBuffer = function() {	this.updateBufferMonitor();}Player.prototype.updateBufferMonitor = function() {	if (this.control.playState != 6)		return;			this.display('Laden ' + this.control.network.bufferingProgress + '%');		// while buffering	if (this.control.playState == 6) {		var self = this;		this.timer = setTimeout(			function() { 				self.updateBufferMonitor(); 			}, 			300		);	}}Player.prototype.monitorTime = function() {	this.updateTimeMonitor();}Player.prototype.updateTimeMonitor = function() {		if (this.control.playState != 3)		return;		var posStr = this.control.controls.currentPositionString;	var durationStr = this.control.currentMedia.durationString;		if (! posStr)		posStr = '00:00';			var str = posStr + '/' + durationStr;					this.display(str);		// while playing	if (this.control.playState == 3)		var self = this;		this.timer = setTimeout(			function() {				self.updateTimeMonitor();			}, 			500		);}Player.prototype.play = function() {	Player.stop();	this.control.controls.play();	Player.setActivePlayer(this);}Player.prototype.stop = function() {	this.control.controls.stop();}Player.prototype.getControl = function() {	return this.control;}Player.prototype.display = function(str) {	if (this.displayEl)		this.displayEl.innerHTML = str;	}