/**
 * Create Windows Media Object
 * 
 * @param	movieURL  Movie URL
 * @param	width     HTML Object width
 * @param	height    HTML Object height
 */

function writeWindowsMediaPlayer( movieURL, width, height )
{
    var autoPlay = 'true';
	width = 470;
	height = 422;
  
    var windowsMedia =  ' <object id="mediaPlayer" 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="false" /> ' +
                            ' <param name="ShowControls" value="true" /> ' +
                            ' <param name="ShowStatusBar" value="true" /> ' +
                            ' <param name="AutoSize" value="true" /> ' +
							' <param name="stretchToFit" value="true"> ' +
                        
                            ' <embed type="application/x-mplayer2" ' +
                                ' pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" ' +
                                ' width="' + width + '" ' +
                                ' height="' + height + '" ' +
                                ' src="' + movieURL + '" ' +
                                ' AutoStart="' + autoPlay + '" ' +
                                ' ShowDisplay="false" ' +
                                ' ShowControls="true" ' +
                                ' ShowStatusBar="true" ' +
								' stretchToFit="1" ' +
                                ' AutoSize="1" >' +
                            ' </embed> ' +
                        ' </object> ';
                
    document.write(windowsMedia);
}