	var wrapperDiv = null;

	function getFlashMovieObject(movieName)
	{
	  if (window.document[movieName]) 
	  {
	    return window.document[movieName];
	  }
	  if (navigator.appName.indexOf("Microsoft Internet")==-1)
	  {
	    if (document.embeds && document.embeds[movieName])
	      return document.embeds[movieName]; 
	  }
	  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
	  {
	    return document.getElementById(movieName);
	  }
	}

	function StopFlashMovie(movieName)
	{
		var flashMovie=getFlashMovieObject(movieName);
		if (flashMovie != null) {
			var oVideoParentDiv = document.getElementById(wrapperDiv);
			if (oVideoParentDiv != null) {
				document.body.removeChild(oVideoParentDiv);
			}
			//flashMovie.StopPlay();
		}
	}

	function playVideo(sDivVideoId, sStreamName, StreamWidth, StreamHeight, Title)	
	{	

		var FLVPlaverSkin = "/images/SteelExternalPlaySeekMute.swf";
		//FLVPlaverSkin = FLVPlaverSkin.slice(0, FLVPlaverSkin.length - 4);


		//First check that the video is not playing, if it is, stop it first
		StopFlashMovie("FLVPlayer");
		
				var oDivVideo = document.createElement("div");	
		wrapperDiv = sDivVideoId;		
		oDivVideo.id = sDivVideoId;
		oDivVideo.style.position = "absolute";
		oDivVideo.style.top = "190px";
		oDivVideo.style.left = "410px";
		StreamHeight = StreamHeight + "px";
		StreamWidth= StreamWidth+ "px";
		oDivVideo.style.width = StreamWidth;
		tmpHeight = 1*(StreamHeight.slice(0, StreamHeight.length - 2)); //remove PX
		tmpHeight+=-5;
		paramheight = tmpHeight;
		paramwidth = 1*(StreamWidth.slice(0, StreamWidth.length - 2)); //remove PX
		StreamHeight  = tmpHeight + "px";
		//oDivVideo.style.height = StreamHeight;
		oDivVideo.style.zIndex = 1;
		
		var sDivHtml = "";
		sDivHtml = sDivHtml	+ "<div style=\"background: none; padding: none; margin: none; margin-bottom: -7px; width: " + StreamWidth + "; \" align=\"right\">";
		sDivHtml = sDivHtml	+ "<table cellspacing=0 cellpadding=0 style=\"height: 45px; padding-top: 0px; width: " + StreamWidth + "; table-layout:fixed;\"><tr><td align=left style=\"background: url(/images/trespa-videoplayer-bg.gif); padding-top:0px;\" width=9><img src=\"/images/trespa-videoplayer-nw.gif\"></td><td  align=\"left\" width=* style=\"background: url(/images/trespa-videoplayer-bg.gif); padding-top: 0px; color: white; font-size: 11px; font-weight: bold; padding-top: 7px; text-transform:uppercase;\">" + Title +   "</td><td align=right width=27 style=\"background: url(/images/trespa-videoplayer-bg.gif); padding-top: 0px; \"><a style=\"background: none\" href=\"#\" onClick=\"StopFlashMovie('FLVPlayer');\"><img src=\"/images/trespa-videoplayer-close.gif\" border=0></a><img src=\"/images/trespa-videoplayer-ne.gif\"></td></tr></table>";
		sDivHtml = sDivHtml	+ "</div>";
		sDivHtml = sDivHtml	+ "<div style=\"background: none; padding: none; margin: none; width: " + StreamWidth + ";\" >";
		sDivHtml = sDivHtml	+ "		<object id=\"FLVPlayer\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"" + StreamWidth + "\" height=\"" + StreamHeight + "\" >";
		sDivHtml = sDivHtml	+ "		<param name=\"movie\" value=\"/images/trespa_videoplayer.swf\" />";
		sDivHtml = sDivHtml	+ "		<param name=\"salign\" value=\"lt\" />";
		sDivHtml = sDivHtml	+ "		<param name=\"quality\" value=\"high\" />";
		sDivHtml = sDivHtml	+ "		<param name=\"scale\" value=\"noscale\" />";
//		sDivHtml = sDivHtml	+ "		<param name=\"wmode\" value=\"transparent\" />";
		sDivHtml = sDivHtml	+ "		<param name=\"FlashVars\" value=\"&MM_ComponentVersion=1&skinname=" + FLVPlaverSkin + "&streamname=" + sStreamName + "&streamheight=" + paramheight + "&streamwidth=" + paramwidth + "&autoPlay=true&autoRewind=false\" />";
		sDivHtml = sDivHtml	+ "		<embed name=\"FLVPlayer\" src=\"/images/trespa_videoplayer.swf\" flashvars=\"&MM_ComponentVersion=1&skinname=" + FLVPlaverSkin + "&streamname=" + sStreamName + "&streamheight=" + paramheight + "&streamwidth=" + paramwidth + "&autoplay=true&autoRewind=false\" quality=\"high\" scale=\"noscale\" width=\"" + StreamWidth + "\" height=\"" + StreamHeight + "\" name=\"FLVPlayer\" salign=\"LT\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\" />";
		sDivHtml = sDivHtml	+ "		</object>";
		sDivHtml = sDivHtml	+ "</div>";
				
		oDivVideo.innerHTML = sDivHtml;
		document.body.appendChild(oDivVideo);
	
	}
			function showFlash(sDivVideoId, sStreamName, StreamWidth, StreamHeight, Title)	
	{	

		//var FLVPlaverSkin = "/images/SteelExternalPlaySeekMute.swf";
		//FLVPlaverSkin = FLVPlaverSkin.slice(0, FLVPlaverSkin.length - 4);


		//First check that the video is not playing, if it is, stop it first
		//StopFlashMovie("SWFApplicatie");
		
				var oDivVideo = document.createElement("div");	
		wrapperDiv = sDivVideoId;		
		oDivVideo.id = sDivVideoId;
		oDivVideo.style.position = "absolute";
		oDivVideo.style.top = "190px";
		oDivVideo.style.left = "410px";
		StreamHeight = StreamHeight + "px";
		StreamWidth= StreamWidth+ "px";
		oDivVideo.style.width = StreamWidth;
		tmpHeight = 1*(StreamHeight.slice(0, StreamHeight.length - 2)); //remove PX
		tmpHeight+=-5;
		paramheight = tmpHeight;
		paramwidth = 1*(StreamWidth.slice(0, StreamWidth.length - 2)); //remove PX
		StreamHeight  = tmpHeight + "px";
		//oDivVideo.style.height = StreamHeight;
		oDivVideo.style.zIndex = 1;
		
		var sDivHtml = "";
		sDivHtml = sDivHtml	+ "<div style=\"background: none; padding: none; margin: none; margin-bottom: -7px; width: " + StreamWidth + "; \" align=\"right\">";
		sDivHtml = sDivHtml	+ "<table cellspacing=0 cellpadding=0 style=\"height: 45px; padding-top: 0px; width: " + StreamWidth + "; table-layout:fixed;\"><tr><td align=left style=\"background: url(/images/trespa-videoplayer-bg.gif); padding-top:0px;\" width=9><img src=\"/images/trespa-videoplayer-nw.gif\"></td><td  align=\"left\" width=* style=\"background: url(/images/trespa-videoplayer-bg.gif); padding-top: 0px; color: white; font-size: 11px; font-weight: bold; padding-top: 7px; text-transform:uppercase;\">" + Title +   "</td><td align=right width=27 style=\"background: url(/images/trespa-videoplayer-bg.gif); padding-top: 0px; \"><a style=\"background: none\" href=\"#\" onClick=\"closeFlash('SWFApplicatie');\"><img src=\"/images/trespa-videoplayer-close.gif\" border=0></a><img src=\"/images/trespa-videoplayer-ne.gif\"></td></tr></table>";
		sDivHtml = sDivHtml	+ "</div>";
		sDivHtml = sDivHtml	+ "<div style=\"background: none; padding: none; margin: none; width: " + StreamWidth + "; height:" + StreamHeight + ";\" >";
		sDivHtml = sDivHtml	+ "		<object id=\"SWFApplicatie\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"" + StreamWidth + "\" height=\"" + StreamHeight + "\" >";
		sDivHtml = sDivHtml	+ "		<param name=\"movie\" value=\"" + sStreamName + "\" />";
		sDivHtml = sDivHtml	+ "		<!--[if !IE]>-->";
		sDivHtml = sDivHtml	+ "		<object type=\"application/x-shockwave-flash\" data=\"" + sStreamName + "\" width=\"" + StreamWidth + "\" height=\"" + StreamHeight + "\" >";
		sDivHtml = sDivHtml	+ "		<param name=\"movie\" value=\"" + sStreamName + "\"/>";
		sDivHtml = sDivHtml	+ "		</object>";
		sDivHtml = sDivHtml	+ "		<!--<![endif]-->";
		sDivHtml = sDivHtml	+ "		</object>";
		sDivHtml = sDivHtml	+ "</div>";
				
		oDivVideo.innerHTML = sDivHtml;
		document.body.appendChild(oDivVideo);
	
	}
	function closeFlash(movieName)
	{
			var oVideoParentDiv = document.getElementById(wrapperDiv);
			if (oVideoParentDiv != null) {
				document.body.removeChild(oVideoParentDiv);
		}
	}
