function doNothing() {}

function fillVideoWindowWithContent(id, mediaurl, width, height, closeText) {
	var playerFile = dev_folder + "/mcmediaplayer/mcmp_0.8.swf";
	var fpFileURL = mediaurl;
	var playerSize = String(width) + "x" + String(height);
	var playerBackgroundColor = "0";
	var fpAction = "play";
	var defaultEndAction = "pauseAtEnd";
	var cpHidePanel = "mouseout";
	var cpHideDelay = "0";
	var tooltipBackgroundColor = "ffffe1";

	//if (typeof playerFile == 'undefined') { playerFile = 'mcmp.swf'; }
	if (typeof fpFileURL != 'undefined') { mcflashvars = 'fpFileURL='+fpFileURL; }
	//if (typeof playerSize == 'undefined') { playerSize = '480x270'; }
	//var psep = playerSize.indexOf("x");
	var playerWidth = width;//playerSize.substring(0,psep);
	var playerHeight = height;//playerSize.substring(psep+1);
	if (typeof streamingServerURL != 'undefined') { mcflashvars += '&streamingServerURL='+streamingServerURL; }
	if (typeof fpAction != 'undefined') { mcflashvars += '&fpAction='+fpAction; }
	if (typeof fpPreviewImageURL != 'undefined') { mcflashvars += '&fpPreviewImageURL='+fpPreviewImageURL; }
	if (typeof colorScheme != 'undefined') { mcflashvars += '&colorScheme='+colorScheme; }// New in v0.8
	if (typeof cpBackgroundColor != 'undefined') { mcflashvars += '&cpBackgroundColor='+cpBackgroundColor; }
	if (typeof cpBackgroundOpacity != 'undefined') { mcflashvars += '&cpBackgroundOpacity='+cpBackgroundOpacity; }
	if (typeof cpButtonsOpacity != 'undefined') { mcflashvars += '&cpButtonsOpacity='+cpButtonsOpacity; }
	if (typeof cpCounterPosition != 'undefined') { mcflashvars += '&cpCounterPosition='+cpCounterPosition; }
	if (typeof cpFullscreenBtnPosition != 'undefined') { mcflashvars += '&cpFullscreenBtnPosition='+cpFullscreenBtnPosition; }
	if (typeof cpHideDelay != 'undefined') { mcflashvars += '&cpHideDelay='+cpHideDelay; }
	if (typeof cpHidePanel != 'undefined') { mcflashvars += '&cpHidePanel='+cpHidePanel; }
	if (typeof cpInfoBtnPosition != 'undefined') { mcflashvars += '&cpInfoBtnPosition='+cpInfoBtnPosition; }
	if (typeof cpPlayBtnPosition != 'undefined') { mcflashvars += '&cpPlayBtnPosition='+cpPlayBtnPosition; }
	if (typeof cpPlayBtnColor != 'undefined') { mcflashvars += '&cpPlayBtnColor='+cpPlayBtnColor; }// New in v0.8
	if (typeof cpPosition != 'undefined') { mcflashvars += '&cpPosition='+cpPosition; }
	if (typeof cpRepeatBtnPosition != 'undefined') { mcflashvars += '&cpRepeatBtnPosition='+cpRepeatBtnPosition; }
	if (typeof cpScrubberPosition != 'undefined') { mcflashvars += '&cpScrubberPosition='+cpScrubberPosition; }
	if (typeof cpScrubberColor != 'undefined') { mcflashvars += '&cpScrubberColor='+cpScrubberColor; }// New in v0.8
	if (typeof cpScrubberLoadedColor != 'undefined') { mcflashvars += '&cpScrubberLoadedColor='+cpScrubberLoadedColor; }// New in v0.8
	if (typeof cpScrubberElapsedColor != 'undefined') { mcflashvars += '&cpScrubberElapsedColor='+cpScrubberElapsedColor; }// New in v0.8
	if (typeof cpVolumeStart != 'undefined') { mcflashvars += '&cpVolumeStart='+cpVolumeStart; }
	if (typeof cpStopBtnPosition != 'undefined') { mcflashvars += '&cpStopBtnPosition='+cpStopBtnPosition; }
	if (typeof cpStopBtnColor != 'undefined') { mcflashvars += '&cpStopBtnColor='+cpStopBtnColor; }// New in v0.8
	if (typeof cpVolumeBtnPosition != 'undefined') { mcflashvars += '&cpVolumeBtnPosition='+cpVolumeBtnPosition; }
	if (typeof cpVolumeCtrlColor != 'undefined') { mcflashvars += '&cpVolumeCtrlColor='+cpVolumeCtrlColor; }// New in v0.8
	if (typeof cpSize != 'undefined') { mcflashvars += '&cpSize='+cpSize; }
	if (typeof defaultBufferLength != 'undefined') { mcflashvars += '&defaultBufferLength='+defaultBufferLength; }
	if (typeof defaultEndAction != 'undefined') { mcflashvars += '&defaultEndAction='+defaultEndAction; }
	if (typeof defaultStopAction != 'undefined') { mcflashvars += '&defaultStopAction='+defaultStopAction; }
	if (typeof fpButtonOpacity != 'undefined') { mcflashvars += '&fpButtonOpacity='+fpButtonOpacity; }
	if (typeof fpButtonPosition != 'undefined') { mcflashvars += '&fpButtonPosition='+fpButtonPosition; }
	if (typeof fpButtonSize != 'undefined') { mcflashvars += '&fpButtonSize='+fpButtonSize; }
	if (typeof fpButtonColor != 'undefined') { mcflashvars += '&fpButtonColor='+fpButtonColor; }// New in v0.8
	if (typeof fpPreviewImageSize != 'undefined') { mcflashvars += '&fpPreviewImageSize='+fpPreviewImageSize; }
	if (typeof msgBackgroundColor != 'undefined') { mcflashvars += '&msgBackgroundColor='+msgBackgroundColor; }
	if (typeof msgBackgroundOpacity != 'undefined') { mcflashvars += '&msgBackgroundOpacity='+msgBackgroundOpacity; }
	if (typeof playerBackgroundColor != 'undefined') { mcflashvars += '&playerBackgroundColor='+playerBackgroundColor; }
	if (typeof playerAutoResize != 'undefined') { mcflashvars += '&playerAutoResize='+playerAutoResize; }// New in 0.7
	if (typeof playerSize != 'undefined') { mcflashvars += '&playerSize='+playerSize; }
	if (typeof videoScreenSize != 'undefined') { mcflashvars += '&videoScreenSize='+videoScreenSize; }
	if (typeof videoScreenPosition != 'undefined') { mcflashvars += '&videoScreenPosition='+videoScreenPosition; }
	if (typeof tooltipTextColor != 'undefined') { mcflashvars += '&tooltipTextColor='+tooltipTextColor; }// New in 0.7
	if (typeof tooltipBackgroundColor != 'undefined') { mcflashvars += '&tooltipBackgroundColor='+tooltipBackgroundColor; }// New in 0.7
	
	var str = '';
	str += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=7,0,19,0" width="'+playerWidth+'" height="'+playerHeight+'">\n';
	str += '<param name="movie" value="'+playerFile+'">';
	str += '<param name="allowScriptAccess" value="always">';
	str += '<param name="quality" value="high">';
	str += '<param name="bgcolor" value="#000000">';
	str += '<param name="allowFullScreen" value="true">';
	str += '<param name="FlashVars" value="'+mcflashvars+'">\n';
	str += '<embed src="'+playerFile+'" width="'+playerWidth+'" height="'+playerHeight+'" quality="high" allowFullScreen="true" allowscriptaccess="always" pluginspage="http:\/\/www.macromedia.com\/go\/getflashplayer" type="application\/x-shockwave-flash" FlashVars="'+mcflashvars+'"><\/embed>\n';
	str += '<\/object>\r\n';
	str += "&nbsp;<a href=\"javascript:doNothing();\" class=\"vtop\" onClick=\"javascript:document.getElementById('" + id + "').style.width='0px'; javascript:document.getElementById('" + id + "').style.height='0px'; javascript:document.getElementById('" + id + "').innerHTML='';\">" + closeText + "</a>";
	document.getElementById(id).style.width = "100%";
	document.getElementById(id).style.height = String(height) + "px";
	document.getElementById(id).innerHTML = str;
}
