﻿function PlayMovie(videoFile, autoPlayInd, title)
{
    var strHTML = "<b><font style='font-size: 16pt'>" + title + "</font></b><br /><object id='MediaPlayer1' width='550' height='448'" +
				    "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' align='middle'>";
    if (autoPlayInd == "true") {
        strHTML += "<PARAM NAME='AutoStart' VALUE='true'>";
    }
    else {
        strHTML += "<PARAM NAME='AutoStart' VALUE='false'>";
    }
    strHTML += "<PARAM NAME='Balance' VALUE='False'>" +
				    "<PARAM NAME='DisplaySize' VALUE='True'>" +
				    "<PARAM NAME='Filename' VALUE=''>" +
				    "<PARAM NAME='Mute' VALUE='False'>" +
				    "<PARAM NAME='SelectionStart' VALUE='False'>" +
				    "<PARAM NAME='SelectionEnd' VALUE='False'>" +
				    "<PARAM NAME='ShowControls' VALUE='True'>" +
				    "<PARAM NAME='ShowAudioControls' VALUE='True'>" +
				    "<PARAM NAME='ShowDisplay' VALUE='false'>" +
				    "<PARAM NAME='ShowPositionControls' VALUE='false'>" +
				    "<param name='ShowGotoBar' value='false'>" +
				    "<PARAM NAME='Volume' VALUE='1'>" +
				    "<PARAM NAME='AudioStream' VALUE='true'>" +
				    "<PARAM NAME='AutoSize' VALUE='false'>" +
				    "<PARAM NAME='AnimationAtStart' VALUE='False'>" +
				    "<PARAM NAME='AllowScan' VALUE='true'>" +
				    "<PARAM NAME='AllowChangeDisplaySize' VALUE='False'>" +
				    "<PARAM NAME='AutoRewind' VALUE='true'>" +
				    "<PARAM NAME='BaseURL' VALUE=''>" +
				    "<PARAM NAME='CaptioningID' VALUE=''>" +
				    "<PARAM NAME='ClickToPlay' VALUE='True'>" +
				    "<PARAM NAME='BufferingTime' VALUE='0'>" +
				    "<PARAM NAME='CursorType' VALUE='0'>" +
				    "<PARAM NAME='CurrentPosition' VALUE='True'>" +
				    "<PARAM NAME='CurrentMarker' VALUE='false'>" +
				    "<PARAM NAME='DefaultFrame' VALUE='mainframe'>" +
				    "<PARAM NAME='DisplayMode' VALUE='false'>" +
				    "<PARAM NAME='Enabled' VALUE='true'>" +
				    "<PARAM NAME='EnableContextMenu' VALUE='true'>" +
				    "<PARAM NAME='EnablePositionControls' VALUE='true'>" +
				    "<PARAM NAME='EnableFullScreenControls' VALUE='False'>" +
				    "<PARAM NAME='EnableTracker' VALUE='true'>" +
				    "<PARAM NAME='InvokeURLs' VALUE='False'>" +
				    "<PARAM NAME='Language' VALUE='False'>" +
				    "<PARAM NAME='PlayCount' VALUE='1'>" +
				    "<PARAM NAME='PreviewMode' VALUE='false'>" +
				    "<PARAM NAME='ShowStatusBar' VALUE='True'>" +
				    "<PARAM NAME='TransparentAtStart' VALUE='False'>" +
				    "<PARAM NAME='Src' Value='" + videoFile + "'>" +
				    "<embed type='application/x-mplayer2'" +
				    "pluginspage = 'http://www.microsoft.com/Windows/MediaPlayer/'" +
				    "autoStart='1'" +
				    "src='" + videoFile + "'" +
				    "align='middle'" +
				    "width='550'" +
			    "height='448'" +
				    "defaultframe='rightFrame'" +
				    "showstatusbar='true'" +
				    " volume='10'" +
				    " showcontrols='1'" +
				    " showstatusbar='0'" +
				    " showaudiocontrols='1'" +
				    " showpositioncontrols='0'" +
				    " EnablePositionControls='1'" +
				    " BufferingTime='0'" +
				    " AudioStream='1'>" +
				    "</embed>" +
				    "</object><br />";
    document.getElementById("divMovie").innerHTML = strHTML;
}
