// ################## Script For Flash & ActiveX #########################
// +++++++++++++  MakePlayerString(source) ++++++++
//
// source: source url --> µ¿¿µ»ó ÆÄÀÏÀÇ °æ·Î
// 
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

// +++++++++++++  MakeFlashString(source,id,width,height,wmode) ++++++++
// 
// source: source url --> ÇÃ·¡½¬ ÆÄÀÏÀÇ °æ·Î
// id: flash id 
// width: source width
// height: source height
// wmode: wmode --> "none, window, transparent, opaque"
//        window : ±âº»°ªÀ¸·Î ¸ðµç html ¿¤¸®¸ÕÆ® À§·Î flash °¡ ³ªÅ¸³³´Ï´Ù.
//        opaque : flash À§¿¡ html ¿¤¸®¸ÕÆ®¸¦ À§Ä¡ ½ÃÅ³¶§ »ç¿ëÇÕ´Ï´Ù.
//        transparent : flash ¸¦ Åõ¸íÇÏ°Ô ÇÏ¿© flash ¾Æ·¡ÀÇ html ¿¤¸®¸ÕÆ®°¡ È­¸é»ó¿¡ ³ª¿À°Ô µË´Ï´Ù.
// otherparam : Ãß°¡ ÆÄ¶ó¹ÌÅÍ "<param name='myParam' value='myValue' />
// 
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

// +++++++++++++  MakeObjectString(classid, codebase, name, id, width,height, param) ++++++++
// 
// classid: classid --> ÇÃ·¡½¬ ÆÄÀÏÀÇ °æ·Î
// codebase: cabÆÄÀÏ À§Ä¡ ¹× ¹öÀüÁ¤º¸ 
// name :
// id :
// width: source width
// height: source height
// 
// wmode: wmode --> "none, transparent, opaque"
// param : Ãß°¡ ÆÄ¶ó¹ÌÅÍ "<param name='myParam' value='myValue' />
// 
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

// Example 
// DocumentWrite(MakeFlashString('image/ml_flash.swf','emb1','330','520','opaque'));
// SetInnerHTML(document.all.mm, MakeFlashString('image/ml_flash.swf','emb1','330','520','opaque'));
// @@ÁÖÀÇ »çÇ× 
//  - »óÈ£ÀÛ¿ë ¾ø´Â ÄÁÅÙÃ÷´Â DocumentWrite, SetInnerHTML µÑ´Ù »ç¿ë °¡´É
//  - »óÈ£ÀÛ¿ë ÀÖ´Â ÄÁÅÙÃ÷´Â SetInnerHTML¸¸ »ç¿ë °¡´É
// #######################################################################


function MakeFlashString(source,id,width,height,wmode,otherParam)
{	
	return "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0\" width="+width+" height="+height+" id="+id+"><param name=wmode value="+wmode+" /><param name=movie value='"+source+"' /><param name=quality value=high />"+otherParam+"<embed src='"+source+"' quality=high wmode='"+wmode+"' type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash\" width="+width+" height="+height+"></embed></object>";
}

function MakeObjectString(classid, codebase, name, id, width, height, param)
{
	return "<object classid="+classid+" codebase="+codebase+" name="+name+" width="+width+" height="+height+" id="+id+"><param name=wmode value="+wmode+" />"+param+"</object>";
}

function MakePlayerString(source)
{	
	var re = / /g;
	source = source.replace(re,"%20"); //°ø¹é¹®ÀÚ Ã³¸®
	return "<embed src='"+ source +"' type=\"application/x-mplayer2\"></embed>";
}

function MakeMediaPlayer7String(source)
{	
	var re = / /g;
	source = source.replace(re,"%20"); //°ø¹é¹®ÀÚ Ã³¸®
	return "<object id=\"WindowsMediaPlayer7\" classid=\"clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6\" type=\"application/x-oleobject\"><param name=url value='"+source+"' /></object>";
	//return "<object id=WindowsMediaPlayer7 width="+width+" height="+height+" classid=\"clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6\" type=\"application/x-oleobject\"><param name=url value='"+source+"' /></object>";
}

// innerHTML Type
function SetInnerHTML(target, code)
{ 
	target.innerHTML = code; 
}

// Direct Write Type<IMG SRC="C:/Documents and Settings/Administrator/Local Settings/Temporary Internet Files/Content.IE5/OHLJH3M0/title_easy[1].gif" WIDTH="680" HEIGHT="60" BORDER="0" ALT="">
function DocumentWrite(src)
{
	document.write(src);
}
