	function playerReady(obj) {
		var id = obj['id'];
		var version = obj['version'];
		var client = obj['client'];
		//alert('player '+id+' has been instantiated');
	};

	function getPlayer(gid) {
		if(navigator.appName.indexOf("Microsoft") != -1) {
			return window[gid];
		} else {
			return document[gid];
		}
	};
	
	function createPlayer(mediatype,story_id,story_media_id,height,width,playtime,WriteNow)
	{
		//var so = new SWFObject('mediaplayer/player-4.1.54.swf','PID_' + story_media_id,'256','276','9');
		var so = "";
		if (mediatype=="x") 
		{
			var so = new SWFObject('mediaplayer_4.6/player-licensed.swf','PID_' + story_media_id,'256','212','9');
		}
		else
		{
			var so = new SWFObject('mediaplayer_4.6/player-licensed.swf','PID_' + story_media_id,'256','256','9');
		}
		so.addParam('allowscriptaccess','always');
		so.addParam('allowfullscreen','true');
		//so.addParam('wmode','opaque');
		//so.addVariable('controlbar','bottom');
		//so.addVariable('stretching','uniform');
		so.addVariable('enablejs','true');
		so.addVariable('javascriptid','PID' + story_media_id);
		if (mediatype=="v") {so.addVariable('bufferlength','7'); }
		so.addVariable('duration',playtime);
		if (mediatype=="v") 
		{	so.addVariable('fullscreen','true');
		}
		if (mediatype=="a") 
		{	//so.addVariable('height',height);
		}
		else
		{	//so.addVariable('height',(height+20));
		}
		//so.addVariable('width',width);
		//so.addVariable('screencolor','0x26284b');
		so.addVariable('screencolor','0x000000');
		if (mediatype=="a") 
		{	
			so.addVariable('plugins','revolt');
		}
		if (mediatype=="a")
		{	so.addVariable('type','mp3'); }
		else
		{	so.addVariable('type','video'); }
		
		if (mediatype=="a")
		{
			so.addVariable('file',encodeURIComponent('/stamberg.php?p=882D5F0BE1F9BE89A9369DB70437929947D34789B6C02F20B6D214EECF351220&id=' + story_id + '&media_id=' + story_media_id));
		}
		else
		{
			so.addVariable('file',encodeURIComponent('/stamberg.php?p=882D5F0BE1F9BE89A9369DB70437929947D34789B6C02F20B6D214EECF351220&id=' + story_id + '&media_id=' + story_media_id));
				//so.addVariable('streamer','rtmp://192.168.0.66/oflaDemo');		
				//so.addVariable('file', 'DarkKnight.flv');
		}		
		
		if (mediatype=="v")
		{
			//so.addVariable('streamer','/xmoov-php-9.3beta.php');
			//so.addVariable('file','S004679_V_012_200808251943_LONG.flv');
		}		
		
		if (mediatype=="a")
		{	so.addVariable('image','/bilder/audiofile.gif'); }
		else
		{	so.addVariable('image',encodeURIComponent('/stamberg.php?p=95A08F2C998C1665DBF552B4515E2A08E40CFE8DFA8A784957C5E106D0828B30&id=' + story_id + '&media_id=' + story_media_id + '&tmp=' + Math.random() )); }

		if (WriteNow=="1")
		{	so.write('IMAGE' + story_media_id); }
		else
		{	return so; }
	};