var flowplayerSetupDone=new Array;

function playFlv(flvFile, id){
	if (typeof(flowplayerSetupDone[id]) != 'undefined'){
		return;
	}
	flowplayerSetupDone[id]=true;

	var url='/'+flvFile;

	autoPlay=true;
	backgroundColor='#ffffff';
	
	if (typeof(id) == 'undefined'){ 
		id='player';
		autoPlay=false;
		backgroundColor='#f3eade';
	}

	var vp=document.getElementById(id);
	while(vp.childNodes.length > 0){
		vp.removeChild(vp.firstChild);
	}

	flowplayer(id, {
		src:"/themes/heidelberger-klinik/flowplayer/flowplayer.commercial-3.2.5.swf",
		wmode:"transparent"
			
	},{
		key:"#$617df1d90d6058d43b8",
		clip:{
			autoPlay: autoPlay, 
			url: url
		}, 
		canvas:{ 
			backgroundGradient: 'none',
			backgroundColor: backgroundColor
		},
		play:{ 
			width:"50px",
			height:"50px"
		},
		plugins:{ 
			controls: null
		}
	});
	
	
	
	if (id == 'player'){
		var div=document.createElement('div');
		div.className='player-controls';
		var imgPlay=document.createElement('img');
		imgPlay.setAttribute('src', '/themes/heidelberger-klinik/flowplayer/player-play-t.gif');
		imgPlay.className='player-play';
		imgPlay.setAttribute('onclick', '$f().play();');
		var imgStop=document.createElement('img');
		imgStop.setAttribute('src', '/themes/heidelberger-klinik/flowplayer/player-stop-t.gif');
		imgStop.className='player-stop';
		imgStop.setAttribute('onclick', '$f().pause();');
		div.appendChild(imgPlay);
		div.appendChild(imgStop);
		vp.appendChild(div);
	}
	
	
	
}

