// Simple script to write a video player (suitable for MSIE and Firefox) into a web page
// sra  16 March 2007
// Revised 20 Oct 2009 for new wide-screen vid


function WritePlayer(fileName, fileWidth, fileHeight) {
	var playerScript = 
		'<object \n' +
		'	id="MediaPlayer" \n' +
		'	width="' + fileWidth + '" \n' +
		'	height="' + fileHeight + '" \n' +
		'	classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" \n' +
		'	standby="Loading Windows Media Player components..." \n' +
		'	type="application/x-oleobject" \n' +
		'	codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112" \n' +
		'	> \n' +
		'	<param name="filename" value="' + fileName + '"> \n' +
		'	<param name="Showcontrols" value="True"> \n' +
		'	<param name="autoStart" value="True"> \n' +
		'	<embed \n' +
		'		type="application/x-mplayer2" \n' +
		'		name="MediaPlayer" \n' +
		'		width="' + fileWidth + '" \n' +
		'		height="' + fileHeight + '" \n' +
		'		src="' + fileName + '" \n' +
		'		autosize="0" \n' +
		'		showcontrols="1" \n' +
		'		showtracker="1" \n' +
		'		showdisplay="1" \n' +
		'		showstatusbar="1" \n' +
		'		videoborder3d="0" \n' +
		'		autostart="1" \n' +
		'		animationAtStart="0" \n' +
		'		> \n' +
		'	</embed> \n' +
		'</object> \n';
	document.write(playerScript);
}


