var timerzaehler = null;
function embedMediaPlayer(MPFile){
	if (timerzaehler!=null)
	{
		clearTimeout(timerzaehler);
		timerzaehler=null;
	}
	var MPint = MPFile.toLowerCase();
	if (MPint.indexOf(".jpg") > 0 || MPint.indexOf(".png") > 0 || MPint.indexOf(".gif") > 0) {
		document.getElementById('iVideo').innerHTML = "<img src='"+MPFile+"'>";
		//document.getElementById('sanduhr').style.display=block;window.setTimeout("document.getElementById('sanduhr').style.display=none", 30000);
	}
	else {
		if(MPFile!=null) {
			var oeTags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="342px" height="189px" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"><param name="movie" value="'+MPFile+'" /><embed src="'+MPFile+'" quality="high" bgcolor="#000000" width="342px" height="189px" name="player" align="middle" play="true" loop="false" quality="high" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></object>';

		//alert(oeTags);

		document.getElementById('iVideo').innerHTML=oeTags;
		//document.getElementById('sanduhr').style.display="block";
		//timerzaehler=window.setTimeout('timeoutfunktion();', 30000);
		}
	} 
}
//function timeoutfunktion (){
//			document.getElementById('sanduhr').style.display='none';
//		}
