/**
 * Microsoft ActiveX & Flash Patch 
 */
function getMovieHTML(filepath, width, height, movieWidth, movieHeight)
{
	var objHTML = "";

	objHTML += "<object id='mplayer' onfocus='this.blur();' codeBase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' type='application/x-oleobject' width='" + width + "' height='" + height + "' classid='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6' VIEWASTEXT>"; 
	objHTML += "<PARAM NAME='URL' VALUE='" + filepath + "'> ";
	objHTML += "<PARAM NAME='balance' VALUE='0'> ";
	objHTML += "<PARAM NAME='currentPosition' VALUE='0'> ";
	objHTML += "<PARAM NAME='defaultFrame' VALUE=''> ";
	objHTML += "<PARAM NAME='playCount' VALUE='1'> ";
	objHTML += "<PARAM NAME='autoStart' VALUE='true'>"; 
	objHTML += "<PARAM NAME='currentMarker' VALUE='0'> ";
	objHTML += "<PARAM NAME='invokeURLs' VALUE='0'> ";
	objHTML += "<PARAM NAME='baseURL' VALUE=''> ";
	objHTML += "<PARAM NAME='volume' VALUE='100'> ";
	objHTML += "<PARAM NAME='mute' VALUE='0'> ";
	objHTML += "<PARAM NAME='uiMode' VALUE='full'> ";
	objHTML += "<PARAM NAME='windowlessVideo' VALUE='0'> ";
	objHTML += "<PARAM NAME='enabled' VALUE='-1'> ";
	objHTML += "<PARAM NAME='enableContextMenu' VALUE='0'> ";
	objHTML += "<PARAM NAME='fullScreen' VALUE='0'> ";
	objHTML += "<PARAM NAME='SAMIStyle' VALUE=''> ";
	objHTML += "<PARAM NAME='SAMILang' VALUE=''> ";
	objHTML += "<PARAM NAME='SAMIFilename' VALUE=''> ";
	objHTML += "<PARAM NAME='captioningID' VALUE=''> ";
	objHTML += "<PARAM NAME='ShowStatusBar' VALUE='1'>";
	objHTML += "<PARAM NAME='enableErrorDialogs' VALUE='0'> ";
	objHTML += "<PARAM NAME='_cx' VALUE='8467'> ";
	objHTML += "<PARAM NAME='_cy' VALUE='8255'> ";
	objHTML += "<PARAM NAME='Quality' VALUE='High'> ";
	objHTML += "<PARAM NAME='Bgcolor' VALUE=''>";
	objHTML += "<PARAM NAME='TransparentAtStart' VALUE='1'>";
	objHTML += "<PARAM NAME='AnimationAtStart' VALUE='0'>";
	objHTML += "</object>";

	return objHTML;
}

function movieHTML(filepath, width, height, movieWidth, movieHeight)
{
	document.write("<object id='mplayer' onfocus='this.blur();' codeBase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' type='application/x-oleobject' width='" + width + "' height='" + height + "' classid='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6' VIEWASTEXT>"); 
	document.write("<PARAM NAME='URL' VALUE='" + filepath + "'> ");
	document.write("<PARAM NAME='balance' VALUE='0'> ");
	document.write("<PARAM NAME='currentPosition' VALUE='0'> ");
	document.write("<PARAM NAME='defaultFrame' VALUE=''> ");
	document.write("<PARAM NAME='playCount' VALUE='1'> ");
	document.write("<PARAM NAME='autoStart' VALUE='false'>"); 
	document.write("<PARAM NAME='currentMarker' VALUE='0'> ");
	document.write("<PARAM NAME='invokeURLs' VALUE='0'> ");
	document.write("<PARAM NAME='baseURL' VALUE=''> ");
	document.write("<PARAM NAME='volume' VALUE='100'> ");
	document.write("<PARAM NAME='mute' VALUE='0'> ");
	document.write("<PARAM NAME='uiMode' VALUE='full'> ");
	document.write("<PARAM NAME='windowlessVideo' VALUE='0'> ");
	document.write("<PARAM NAME='enabled' VALUE='-1'> ");
	document.write("<PARAM NAME='enableContextMenu' VALUE='0'> ");
	document.write("<PARAM NAME='fullScreen' VALUE='0'> ");
	document.write("<PARAM NAME='SAMIStyle' VALUE=''> ");
	document.write("<PARAM NAME='SAMILang' VALUE=''> ");
	document.write("<PARAM NAME='SAMIFilename' VALUE=''> ");
	document.write("<PARAM NAME='captioningID' VALUE=''> ");
	document.write("<PARAM NAME='ShowStatusBar' VALUE='1'>");
	document.write("<PARAM NAME='enableErrorDialogs' VALUE='0'> ");
	document.write("<PARAM NAME='_cx' VALUE='8467'> ");
	document.write("<PARAM NAME='_cy' VALUE='8255'> ");
	document.write("<PARAM NAME='Quality' VALUE='High'> ");
	document.write("<PARAM NAME='Bgcolor' VALUE=''>");
	document.write("<PARAM NAME='TransparentAtStart' VALUE='1'>");
	document.write("<PARAM NAME='AnimationAtStart' VALUE='0'>");
	document.write("<EMBED type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/' id='mplayer' name='mplayer' width='" + width + "' height='" + height + "' src='" + filepath + "' autostart='1'> ");
	document.write("</object>");
}

function chlngrMovieHTML(filepath, width, height)
{
	document.write("<object id=NSPlay codeBase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701 type='application/x-oleobject ' standby='Loading Microsoft Windows Media Player components...' width='" + width + "' height='" + height + "' classid=clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95 name=NSPlay bgcolor='DarkBlue'>");
	document.write("<PARAM NAME='AutoStart' VALUE='1'>");
	document.write("<PARAM NAME='AnimationAtStart' VALUE='0'>");
	document.write("<PARAM NAME='DisplayMode' VALUE='4'>");
	document.write("<PARAM NAME='Enabled' VALUE='true'>");
	document.write("<PARAM NAME='Filename' VALUE='" + filepath + "'>");
	document.write("<PARAM NAME='ShowControls' VALUE='1'>");
	document.write("<PARAM NAME='ShowAudioControls' VALUE='1'>");
	document.write("<PARAM NAME='ShowDisplay' VALUE='0'>");
	document.write("<PARAM NAME='ShowPositionControls' VALUE='0'>");
	document.write("<PARAM NAME='ShowStatusBar' VALUE='1'>");
	document.write("<PARAM NAME='Volume' VALUE='0'>");
	document.write("<PARAM NAME='ShowCaptioning' VALUE='0'>");
	document.write("<PARAM NAME='TransparentAtStart' VALUE='1'>");
	document.write("<EMBED type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/' id='NSPlay' Name='NSPlay' DisplaySize='4' AutoSize='1'  ShowControls='0' ShowDisplay='0' ShowStatusBar='1' width='" + width + "' height='" + height + "' src='" + filepath + "' autostart='0'> ");
	document.write("</EMBED>");
	document.write("</object>");
}

function showObject()
{
	var objs = document.getElementsByTagName("object");

	for (var i = 0; i < objs.length; i++)
	{
		objs[i].style.display = '';
	}
}

function getFlashHTML(id, filepath, width, height)
{
	var objHTML = "";

	document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='" + width + "' height='" + height + "' id='" + id + "' align='middle'>");
	document.write("<param name='allowScriptAccess' value='always' />");
	document.write("<param name='movie' value='" + filepath + "' />");
	document.write("<param name='quality' value='high' />");
	document.write("<param name='menu' value='false' />");
	document.write("<param name='wmode' value='transparent' />");
	document.write("<embed src='" + filepath + "' quality='high' width='" + width + "' height='" + height + "' name='" + id + "' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' wmode='transparent' />");
	document.write("</object>");

//	return objHTML;
	document.write(objHTML);
}