function  viewFlash(sDiv, sURL, sId, sCid, sWidth , sHeight, sAlign, sWmode, sBgcolor, sOrder){

	var codeBase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0";
	var pluginsPage = "application/x-shockwave-flash";
	var embedType = "application/x-shockwave-flash";
	var pluginsPage = "http://www.macromedia.com/go/getflashplayer";

	var flashHTML = "";
	flashHTML += "<OBJECT CLASSID=\""+ sCid +"\" CODEBASE=\""+ codeBase +"\" WIDTH=\""+ sWidth +"\" HEIGHT=\""+ sHeight +"\" ID=\"" + sId + "\" ALIGN=\"" + sAlign + "\">";
	flashHTML += "<PARAM NAME=\"movie\" VALUE=\"" + sURL + "\">";
	flashHTML += "<PARAM NAME=\"quality\" VALUE=\"high\">";
	flashHTML += "<PARAM NAME=\"allowScriptAccess\" VALUE=\"always\">";
	flashHTML += "<param name=\"allowFullScreen\" value=\"true\" />";
	if(sWmode) flashHTML += "<PARAM NAME=\"wmode\" VALUE=\""+ sWmode + "\">";
	if(sBgcolor) flashHTML += "<PARAM NAME=\"bgcolor\" VALUE=\""+ sBgcolor + "\">";

	if(sOrder) {
		var arrayTemp = sOrder.split("|");
		var arrayOne;

		for (var i=0; i< arrayTemp.length ; i++)
		{
			if(arrayTemp[i]) {
				arrayOne = arrayTemp[i].split("=");


				if(arrayOne.length > 2) {
					var arrayValue = "";

					arrayValue += arrayTemp[i].replace(arrayOne[0] + "=","");
				}
				else {
					arrayValue = arrayOne[1];
				}

				flashHTML += "<PARAM NAME=\""+ arrayOne[0] + "\" VALUE=\""+ arrayValue + "\">";
			}
		}
	}
	flashHTML += "<EMBED SRC=\""+ sURL + "\" QUALITY=\"high\" WMODE=\"" + sWmode + "\" BGCOLOR=\"" + sBgcolor + "\"  WIDTH=\""+ sWidth +"\" HEIGHT=\""+ sHeight +"\" NAME=\"" + sId + "\" ALIGN=\"" + sAlign + "\"TYPE=\"" + embedType + "\" PLUGINSPAGE=\"" + pluginsPage + "\" />";
	flashHTML += "</OBJECT>";

	document.getElementById(sDiv).innerHTML = flashHTML;

}

function  viewFlash2(sDiv, sURL, sId, sCid, sWidth , sHeight, sAlign, sWmode, sBgcolor, sOrder, sScale){

	var codeBase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0";
	var pluginsPage = "application/x-shockwave-flash";
	var embedType = "application/x-shockwave-flash";
	var pluginsPage = "http://www.macromedia.com/go/getflashplayer";

	document.write("<OBJECT CLASSID=\""+ sCid +"\" CODEBASE=\""+ codeBase +"\" WIDTH=\""+ sWidth +"\" HEIGHT=\""+ sHeight +"\" ID=\"" + sId + "\" ALIGN=\"" + sAlign + "\">");
	document.write("<PARAM NAME=\"movie\" VALUE=\"" + sURL + "\">");
	document.write("<PARAM NAME=\"quality\" VALUE=\"high\">");
	if(sWmode) document.write("<PARAM NAME=\"wmode\" VALUE=\""+ sWmode + "\">");
	if(sBgcolor) document.write("<PARAM NAME=\"bgcolor\" VALUE=\""+ sBgcolor + "\">");
	if(sScale) document.write("<PARAM NAME=\"scale\" VALUE=\"" + sScale + "\">");

	if(sOrder) {
		var arrayTemp = sOrder.split("|");
		var arrayOne;

		for (var i=0; i< arrayTemp.length ; i++)
		{
			if(arrayTemp[i]) {
				arrayOne = arrayTemp[i].split("=");


				if(arrayOne.length > 2) {
					var arrayValue = "";

					arrayValue += arrayTemp[i].replace(arrayOne[0] + "=","");
				}
				else {
					arrayValue = arrayOne[1];
				}
//alert(sDiv+"/"+sURL+"/"+sId+"/"+sCid+"/"+sWidth+"/"+sHeight+"/"+sAlign+"/"+sWmode+"/"+sBgcolor+"/"+sOrder);
				document.write("<PARAM NAME=\""+ arrayOne[0] + "\" VALUE=\""+ arrayValue + "\">");
			}
		}
	}

	document.write("<EMBED SRC=\""+ sURL + "\" QUALITY=\"high\" WMODE=\"" + sWmode + "\" BGCOLOR=\"" + sBgcolor + "\"  WIDTH=\""+ sWidth +"\" HEIGHT=\""+ sHeight +"\" NAME=\"" + sId + "\" ALIGN=\"" + sAlign + "\"TYPE=\"" + embedType + "\" PLUGINSPAGE=\"" + pluginsPage + "\" />");
	document.write("</OBJECT>");
}

function mgameFlash(flashUrl,flashWidth,flashHeight,flashDiv) {
	var flashPath,flashVars;
	var classId			=	"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";
	var codeBase		=	"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0";
	var pluginsPage	=	"application/x-shockwave-flash";
	var embedType	=	"application/x-shockwave-flash";
	var pluginsPage	=	"http://www.macromedia.com/go/getflashplayer";
	
	var flashHtml		=	"";

	flashHtml			+=	'<object id="mgameFlashObj" classid="'+ classId +'" codebase="'+ codeBase +'" width="'+ flashWidth +'" height="'+ flashHeight +'">';
	flashHtml			+=	'	<param name="movie" value="' + flashUrl + '" />';
	flashHtml			+=	'	<param name="quality" value="high" />';
	
	// ÀÌ¹ÌÁöÅø ÇÃ·¡½Ã¿¡¼­ °ÅºÎ¹ÝÀÀ... ¤Ñ¤Ñ;
	if(location.href.indexOf("guild.mgame.com") == -1 && location.href.indexOf("blog.mgame.com") == -1) {
		flashHtml		+=	'	<param name="allowScriptAccess" value="always" />';
	}

	flashHtml			+=	'	<param name="wmode" value="transparent" />';
	flashHtml			+=	'	<embed src="'+ flashUrl + '" quality="high" wmode="transparent" width="'+ flashWidth +'" height="'+ flashHeight +'" type="' + embedType + '" pluginspage="' + pluginsPage + '" />';
	flashHtml			+=	'</object>';

	if(flashDiv) {
		document.getElementById(flashDiv).innerHTML	=	flashHtml;
	} else {
		document.write(flashHtml);
	}
}

function mgameMovie(movieUrl,movieWidth,movieHeight,movieDiv,movieUI,moviePlay) {
	var classId			=	"clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6";
	var playUI			=	movieUI ? "none" : "full";		//	½ºÅ©¸° ¸ðµå
	var playMode		=	moviePlay ? "false" : "true";	//	ÀÚµ¿ ÇÃ·¹ÀÌ
	var movieHtml		=	"";	

	movieHtml			+=	'<object width="'+ movieWidth +'" height="'+ movieHeight +'" id="mgamePlayer" classid="'+ classId +'">';
	movieHtml			+=	'	<param name="autostart" value="'+ playMode +'">';
	movieHtml			+=	'	<param name="url" value="'+ movieUrl +'">';
	movieHtml			+=	'	<param name="volume" value="70">';
	movieHtml			+=	'	<param name="showcontrols" value="true">';
	movieHtml			+=	'	<param name="defaultframe" value="content">';
	movieHtml			+=	'	<param name="uiMode" value="'+ playUI +'">';
	movieHtml			+=	'	<param name="enablecontextmenu" value="false">';
	movieHtml			+=	'	<param name="fullscreen" value="false">';
	movieHtml			+=	'	<param name="enabled" value="true">';
	movieHtml			+=	'	<param name="stretchtofit" value="true">';
	movieHtml			+=	'</object>';

	if(movieDiv) {
		document.getElementById(movieDiv).innerHTML	=	movieHtml;
	} else {
		document.write(movieHtml);
	}
}

function viewFlv(sURL, sWidth, sHeight){
//	if(sWidth) sWidth=322;
//	if(sHeight) sHeight=282;
	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="'+sWidth+'" height="'+sHeight+'" id="flvplayer" align="middle">');
	document.write('<param name="allowScriptAccess" value="always" />');
	document.write('<param name="movie" value="'+sURL+'" />');
	document.write('<param name="quality" value="high" />');
	//document.write('<param name="wmode" value="opaque" />');
	document.write('<param name="allowFullScreen" value="true" />');
	document.write('<param name="bgcolor" value="#000000" />');
	document.write('<embed src="'+sURL+'" quality="high" bgcolor="#0000000" width="'+sWidth+'" height="'+sHeight+'"  name="20070726_flvplayer" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash"  pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');

}

function  viewMediaPlayer(sDiv, sURL, sId, sCid, sWidth , sHeight,sOrder){

	var codeBase = "http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112";
	var pluginsPage = "application/x-oleobject";
	var embedType = "application/x-mplayer2";
	var pluginsPage = "http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/";

	var myObjectElement = document.createElement("<OBJECT WIDTH=\""+ sWidth + "\" HEIGHT=\""+ sHeight  + "\" ID=\"" + sId + "\" name=\"" + sId + "\" CLASSID=\"" + sCid + "\" standby=\"Loading Microsoft Windows Media Player components...\" type=\"" + pluginsPage + "\" CODEBASE=\""+ codeBase + "\" VIEWASTEXT></OBJECT>");

	myObjectElement.appendChild(document.createElement("<PARAM NAME=\"filename\" VALUE=\"" + sURL + "\">"));

	if(sOrder) {
		var arrayTemp = sOrder.split("|");
		var arrayOne;

		for (var i=0; i< arrayTemp.length ; i++)
		{
			if(arrayTemp[i]) {
				arrayOne = arrayTemp[i].split("=");

				myObjectElement.appendChild(document.createElement("<PARAM NAME=\""+ arrayOne[0] + "\" VALUE=\""+ arrayOne[1] + "\">"));
			}
		}
	}

	document.getElementById(sDiv).appendChild(myObjectElement);
}


function  viewMediaPlayer2(sDiv, sURL, sId, sCid, sWidth , sHeight,sOrder){

	var codeBase = "http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112";
	var pluginsPage = "application/x-oleobject";
	var embedType = "application/x-mplayer2";
	var pluginsPage = "http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/";

	var MediaHTML ;
	MediaHTML = "<OBJECT WIDTH=\""+ sWidth + "\" HEIGHT=\""+ sHeight  + "\" ID=\"" + sId + "\" name=\"" + sId + "\" CLASSID=\"" + sCid + "\" standby=\"Loading Microsoft Windows Media Player components...\" type=\"" + pluginsPage + "\" CODEBASE=\""+ codeBase + "\" VIEWASTEXT><PARAM NAME=\"filename\" VALUE=\"" + sURL + "\">";

	if(sOrder) {
		var arrayTemp = sOrder.split("|");
		var arrayOne;

		for (var i=0; i< arrayTemp.length ; i++)
		{
			if(arrayTemp[i]) {
				arrayOne = arrayTemp[i].split("=");
				MediaHTML += "<PARAM NAME=\""+ arrayOne[0] + "\" VALUE=\""+ arrayOne[1] + "\">";
			}
		}
	}
	MediaHTML += "</OBJECT>";
	document.getElementById(sDiv).innerHTML = MediaHTML;
}


//###################################################################
// ÇÔ ¼ö ¸í : mgameDivMove()
// ÀÛ ¼º ÀÚ : ¹Ú¼º¿í
// ¼³     ¸í : µ¿¿µ»ó Å×µÎ¸® Á¦°Å
//###################################################################
function mgameDivMove(div) {
	document.getElementById(div).innerHTML	=	document.getElementById(div).innerHTML;
}

function  viewFlashmedia(sDiv, sURL, sId, sCid, sWidth , sHeight, sAlign, sWmode, sBgcolor, sOrder){

	var codeBase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0";
	var embedType = "application/x-shockwave-flash";
	var pluginsPage = "http://www.macromedia.com/go/getflashplayer";

	var flashHTML = "";
	flashHTML += "<OBJECT CLASSID=\""+ sCid +"\" CODEBASE=\""+ codeBase +"\" WIDTH=\""+ sWidth +"\" HEIGHT=\""+ sHeight +"\" ID=\"" + sId + "\" ALIGN=\"" + sAlign + "\">";
	flashHTML += "<PARAM NAME=\"movie\" VALUE=\"" + sURL + "\">";
	flashHTML += "<PARAM NAME=\"quality\" VALUE=\"high\">";
	flashHTML += "<PARAM NAME=\"allowScriptAccess\" VALUE=\"always\">";
	if(sWmode) flashHTML += "<PARAM NAME=\"wmode\" VALUE=\""+ sWmode + "\">";
	if(sBgcolor) flashHTML += "<PARAM NAME=\"bgcolor\" VALUE=\""+ sBgcolor + "\">";
	flashHTML += "<PARAM NAME=\"flashvars\" VALUE=\"linkSong=http://image.mgame.com/mgamezzang/games/yulgang_2007/bukhae/20071224_bukhae_bgm.mp3\">";
	if(sOrder) {
		var arrayTemp = sOrder.split("|");
		var arrayOne;

		for (var i=0; i< arrayTemp.length ; i++)
		{
			if(arrayTemp[i]) {
				arrayOne = arrayTemp[i].split("=");


				if(arrayOne.length > 2) {
					var arrayValue = "";

					arrayValue += arrayTemp[i].replace(arrayOne[0] + "=","");
				}
				else {
					arrayValue = arrayOne[1];
				}

				flashHTML += "<PARAM NAME=\""+ arrayOne[0] + "\" VALUE=\""+ arrayValue + "\">";
			}
		}
	}
	flashHTML += "<EMBED SRC=\""+ sURL + "\" QUALITY=\"high\" WMODE=\"" + sWmode + "\" BGCOLOR=\"" + sBgcolor + "\"  WIDTH=\""+ sWidth +"\" HEIGHT=\""+ sHeight +"\" NAME=\"" + sId + "\" ALIGN=\"" + sAlign + "\"TYPE=\"" + embedType + "\" flashvars=\"linkSong=http://image.mgame.com/mgamezzang/games/yulgang_2007/bukhae/20071224_bukhae_bgm.mp3\" PLUGINSPAGE=\"" + pluginsPage + "\" />";
	flashHTML += "</OBJECT>";
	document.getElementById(sDiv).innerHTML = flashHTML;
}