// 플래시 및 미디어플레이어
var GLOBAL_URL = "";
var GLOBAL_HTTP_SCHEME = "http";
var ACTIVEX_PATCH = new Object();
ACTIVEX_PATCH.write = function(url,width,height,type)
{
	if (null == type)
	{
		ACTIVEX_PATCH._writeFlashPlayer(url,width,height);
	}
	else
	{
		ACTIVEX_PATCH._writeWMPlayer(url,width,height);
	}
}

ACTIVEX_PATCH._writeWMPlayer = function(url,width,height,id)
{
	document.write('<object id="MediaPlayer1" name="MediaPlayer1" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95"');
	document.write('codebase="'+GLOBAL_HTTP_SCHEME+'://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"');
	document.write('standby="..."  type="application/x-oleobject"');
	document.write('bgcolor="DarkBlue" width="'+width+'" height="'+height+'">');
	document.write('<param name="AutoStart" value="0">');
	document.write('<param name="AutoSize" value="1">');
	document.write('<param name="AnimationAtStart" value="1">');
	document.write('<param name="DisplayMode" value="1">');
	document.write('<param name="Enabled" value="true">');
	document.write('<param name="Filename" value="'+url+'">');
	document.write('<param name="ShowControls" value="1">');
	document.write('<param name="ShowAudioControls" value="0">');
	document.write('<param name="ShowDisplay" value="0">');
	document.write('<param name="ShowGotoBar" value="0">');
	document.write('<param name="ShowPositionControls" value="0">');
	document.write('<param name="ShowStatusBar" value="0">');
	document.write('<param name="ShowCaptioning" value="0">');
	document.write('<param name="Tracker" value="0">');
	document.write('<param name="TransparentAtStart" value="0">');
	document.write('<param name="Volume" value="0">');
	document.write('<embed type="application/x-mplayer2" pluginspage="'+GLOBAL_HTTP_SCHEME+'://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/"');
	document.write('id="NSPlay" name="MediaPlayer1" displaysize="4" autosize="1"  showcontrols="1"');
	document.write('showdisplay="0" showstatusbar="0"  width="'+width+'" height="'+height+'" src="'+url+'"');
	document.write('autostart="0"></embed>');
	document.write('</object>');
}

ACTIVEX_PATCH._writeFlashPlayer = function(url,width,height,id)
{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+GLOBAL_HTTP_SCHEME+'://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+width+'" height="'+height+'" id="main_index" align="middle">');
	document.write('<param name="movie" value="'+GLOBAL_URL+url+'">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="menu" value="false">');
	//document.write('<param name="FlashVars" value="'+pageNum+'">');
	document.write('<param name="wmode" value="transparent">');
	document.write('<embed src="'+GLOBAL_URL+url+'" width="'+width+'" height="'+height+'" quality="high" pluginspage="'+GLOBAL_HTTP_SCHEME+'://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" menu="false"></embed>');
	document.write('</object>');
}
