function showMovie(Id, DivId, Type, Width, Height, Preview)
{
  var File = '/service/downloads.aspx?id=' + Id;

  if (Preview == true)
    File += "&action=vorschau";
 
  var Height = Height; 

  if (Type == "flv")
  {
    File = encodeURIComponent(File);
    Height += 20;
	
			var flashvars = {
				file:File,
				type:Type,
				//image:Preview,
				image:'/img/content/dummy.jpg',
				autostart:false,
				width:Width,
				height:Height
			};
			var params = {
				//bgcolor : "#ffffff",
				wmode : "transparent",
				allowfullscreen : "true"
			};
			var attributes = {};
			//swfobject.embedSWF("/swf/mediaplayer.swf", DivId, "100%", "100%", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
			swfobject.embedSWF("/swf/mediaplayer.swf", DivId, Width, Height, "9.0.0", "expressInstall.swf", flashvars, params, attributes);

  }
  else if (Type == "swf")
  {
    File = encodeURIComponent(File);
			var flashvars = {};
			var params = {
				//bgcolor : "#ffffff",
				wmode : "transparent"
			};
			var attributes = {};
			swfobject.embedSWF(File, DivId, Width, Height, "9.0.0", "expressInstall.swf", flashvars, params, attributes);
  }
  else if (Type == "wmv" || Type == "mpg" || Type == "avi")
  {
    Height += 45;
    document.write('<object id="MediaPlayer" classid="CLSID:22d6f312-b0f6-11d0-94ab-80c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" width="' + Width + '" height="' + Height + '" type="application/x-mplayer2"><param name="FileName" value="' + File + '"><embed src="' + File + '" width="' + Width + '" height="' + Height + '" type="application/x-mplayer2" /></object>');
  }
  else if (Type == "mov")
  {
    Height += 16;
    document.write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="' + Width + '" height="' + Height + '"><param name="src" value="' + File + '"><param name="autoplay" value="true"><param name="type" value="video/quicktime" width="' + Width + '" height="' + (Height + 16) + '"><embed src="' + File + '" width="' + Width + '" height="' + Height + '" autoplay="true" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></object>');
  }
}

