/**
* Create Windows Media Object
* 
* @param	movieURL        Movie URL
* @param	width           HTML Object width
* @param	height          HTML Object height
* @param	autoPlay        Autostart play
* @param	showDisplay     Whether show display
* @param	showControls    Whether show control bar
* @param	showStatusBar   Whether show status bar
* @param	mute            Mute state
* @param	fullScreenMode  Whether to expand
* @param    transparentAtStart

 * Modified by: Martin Mat��ka
 * Modified: 18.11.2008
 * WI: 3261, TvMediaPlayer
*/

function writeWindowsMediaPlayerInternal(objectId, movieURL, width, height, autoPlay, showDisplay, showControls, showStatusBar, autoSize, mute, fullScreenMode, transparentAtStart, enableContextMenu) {
    var windowsMedia = ' <object id="' + objectId + '" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" ' +
                            ' codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" ' +
                            ' standby="Loading Microsoft Windows Media Player components..." ' +
                            ' type="application/x-oleobject" ' +
                            ' width="' + width + '" ' +
                            ' height="' + height + '"> ' +
                            ' <param name="FileName" value="' + movieURL + '" />' +
                            ' <param name="AutoStart" value="' + autoPlay + '" /> ' +
                            ' <param name="ShowDisplay" value="' + showDisplay + '" /> ' +
                            ' <param name="ShowControls" value="' + showControls + '" /> ' +
                            ' <param name="ShowStatusBar" value="' + showStatusBar + '" /> ' +
                            ' <param name="AutoSize" value="' + autoSize + '" /> ' +
							' <param name="stretchToFit" value="true"> ' +
							' <param name="Mute" value="' + mute + '"> ' +
							' <param name="FullScreenMode" value="' + fullScreenMode + '"> ' +
							' <param name="TransparentAtStart" value="' + transparentAtStart + '"> ' +
							' <param name="EnableContextMenu" value="' + enableContextMenu + '"> ' +

                            ' <embed type="application/x-mplayer2" ' +
                                ' pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" ' +
                                ' width="' + width + '" ' +
                                ' height="' + height + '" ' +
                                ' src="' + movieURL + '" ' +
                                ' AutoStart="' + autoPlay + '" ' +
                                ' ShowDisplay="' + showDisplay + '" ' +
                                ' ShowControls="' + showControls + '" ' +
                                ' ShowStatusBar="' + showStatusBar + '" ' +
								' stretchToFit="1" ' +
                                ' AutoSize="' + autoSize + '" ' +
                                ' Mute="' + mute + '" ' +
                                ' FullScreenMode="' + fullScreenMode + '"' +
                                ' TransparentAtStart="' + transparentAtStart + '"' +
                                ' EnableContextMenu="' + enableContextMenu + '">' +
                            ' </embed> ' +
                        ' </object> ';

    document.write(windowsMedia);
}

function writeWindowsMediaPlayer(movieURL, width, height) {
    writeWindowsMediaPlayerInternal('mediaPlayer', movieURL, width, height, 'true', 'false', 'true', 'true', 'true', 'false', 'true', 'false', 'true');
}