
function flashMov_write(atX_obj){
//alert(atX_obj);
	document.write(atX_obj);
}

function flashMov_view(atX_obj){
	alert(atX_obj);
}


function fnSetFlash(sFile, sWID, sWVar, iWidth, iHeight, sWAlign, sWDomain, sQuality, sWmode, sWmenu, sWbgColor) {
     if (sFile == "") alert("��� �대���諛�����������댁� �⑸���");
     if (sWAlign == "") sWAlign = "middle";
     if (sQuality == "") sQuality = "high";
     if (sWmode == "") sWmode = "transparent";
     if (sWmenu == "") sWmenu = "false";

     if (sWDomain == "") sWDomain = "sameDomain";
     if (sWbgColor == "") sWbgColor = "#FFFFFF";

var sHTML = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '
          + ' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" '
          + ' ID="' + sWID
          + '" WIDTH="' + iWidth
          + '" HEIGHT="' + iHeight
          + '" ALIGN="' + sWAlign + '">'
          + ' <PARAM NAME="allowScriptAccess" VALUE="' + sWDomain + '" />'
          + ' <PARAM NAME="movie" VALUE="' + sFile + '" />'
          + ' <PARAM NAME="FlashVar" VALUE="' + sWVar + '" />'
          + ' <PARAM NAME="quality" VALUE="' + sQuality + '" />'
          + ' <PARAM NAME="wmode" VALUE= "' + sWmode + '" />  \n'
          + ' <PARAM NAME="menu" VALUE="' + sWmenu + '" />'
          + ' <param name="bgcolor" value="' + sWbgColor +'" /> '
          + ' <EMBED src=' + sFile
          + ' menu=' + sWmenu
          + ' quality=' + sQuality
          + ' wmode=' + sWmode + ' '
          + ' swLiveConnect=TRUE'
          + ' WIDTH=' + iWidth
          + ' HEIGHT=' + iHeight
          + ' NAME=' + sWID
          + ' ALIGN=' + sWAlign
          + ' allowScriptAccess=' + sWDomain
          + ' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" />'
          + ' </object>';

	document.write(sHTML);
}

/*
	2006-02-03 object ��렇 ���

	+ �댁� js踰����� 吏����� 紐삵���undefined, push �명���� ����쇰� 諛�씀嫄곕� ��� ���
	+ (2006-02-28) insertHTML 異�� - 理�� �깃꺽吏����� �ъ�

	-- �ъ� 諛⑸�
	- 誘몃�����������硫�湲곕낯 flash ����� (flash | mediaplayer | correction(泥⑥�))
	var obj = new objectTag("���寃쎈�", width, height [, 誘몃������]);
	obj.write();

	-- �듭�
	obj.param("name1:value1,name2:value2,...");
	obj.debug = [true|false] - ��꺼 諛�� param 媛�� ���, 湲곕낯媛�false
	obj.embedTag = [true|false] - embed ��렇 �ъ��щ�, 湲곕낯媛�true
	- object, embed ��렇 湲곕낯�ㅼ�, 泥⑥�媛�� 寃쎌� �몃���� �곕� 吏����以�� ���媛����.
	- ��� objectTag.prototype._typeSet �ㅼ� 李멸�
	obj.classid = 媛� obj.codebase = 媛� obj.pluginspage = 媛� obj.embedType = 媛�
	param ��린���ㅻⅨ 諛⑸� - ������ｌ��� param���쇱��대� ���.
	obj.paramAppend(name1, value1);
	obj.paramAppend(name2, value2);

	** 二쇱�: param �ъ���� :��,媛��ㅼ�媛�� 臾몄��댁�寃쎌� �대� ���硫��留�paramAppend 瑜��ъ������
		�뱀�臾몄� 泥�━媛������������.  �뱁� http:// �대����濡�二쇱�媛��ㅼ�媛�꼍��
	# flash
	<script>
	var activeX1 = new objectTag("Video_Control.swf?title=��ぉ", 640, 79);
		activeX1.param("id:navmovie,quality:high,bgcolor:#FFFFFF");
		activeX1.debug = true <- param �ㅼ� �댁���alert 李쎌�濡�蹂������.
		activeX1.write();
	</script>
	�ㅻⅨ ��	var activeX1 = new objectTag("", 640, 79);
		activeX1.paramAppend("movie","Video_Control.swf?title=��ぉ");
		activeX1.param("id:navmovie,quality:high,bgcolor:#FFFFFF");
		or
		activeX1.param("movie:Video_Control.swf?title=��ぉ,id:navmovie,quality:high,bgcolor:#FFFFFF");

	# mediaplayer
	<script>
	var activeX1 = new objectTag("誘몃������ 寃쎈�...", 640, 480, "mediaplayer");
		activeX1.param("id:MediaPlayer,AutoStart:1,EnableContextMenu:0,displaySize:0,ShowControls:0,SendMouseClickEvents:0") // �듭�
		activeX1.write();
	</script>

	insertHTML �ъ�
		activeX.insertHTML(document.getElementById("ObjflaPbl"));
		activeX.insertHTML("ObjflaPbl");
		activeX.insertHTML(ObjflaPbl); <- ie���留����
*/

// trim 援ы�
String.prototype.trim = function(){return this.replace(/^\s*|\s*$/g,"")}
// push 援ы�
if(typeof([].push) == "undefined") Array.prototype.push = function(v){return this[this.length] = v}

// 媛�껜 ���
var objectTag = function(src, width, height, mediatype){
	this._objectStrBuf = [];
	this._embedStrBuf = [];
	this._defaultChk = [];
	this._src = src
	this._id = ""
	this._width = width;
	this._height = height;
	this._type = (typeof(mediatype) != "undefined")? mediatype.trim().toLowerCase() : "flash"
	this._srcParamName = ""
	// ������몃���� �ㅼ� 媛��
	this.classid = ""
	this.codebase = ""
	this.pluginspage = ""
	this.embedType = ""
	this.embedTag = true
	this.debug = false
	// 湲곕낯 �ㅼ�媛�	
	switch(this._type){
		case "flash":
			this._defaultChk.push(["menu", false, "false"]);
			this._defaultChk.push(["quality", false, "high"]);
			break;
	}
}
objectTag.prototype._typeSet = function(){
	switch(this._type){
		case "flash":
			this._srcParamName = "movie";
			this.classid = "CLSID:D27CDB6E-AE6D-11cf-96B8-444553540000";
			this.codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0";
			this.embedType = "application/x-shockwave-flash";
			this.pluginspage = "http://www.macromedia.com/go/getflashplayer";
			break;
		case "mediaplayer":
			this._srcParamName = "filename";
			this.classid = "CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95";
			this.embedType = "application/x-mplayer2";
			break;
		case "correction":
			this._srcParamName = "src";
			this.classid = "CLSID:07A557A8-4C30-407C-8D21-000B6695AC88";
			break;
		case "director":
			this._srcParamName = "src"
			this.classid = "CLSID:166B1BCA-3F9C-11CF-8075-444553540000";
			this.codebase = "http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0";
			this.embedType = "application/x-director";
			this.pluginspage = "http://www.macromedia.com/shockwave/download/";
			break;
		case "cyberclass":
			this._srcParamName = "liveurl";
			this.classid = "CLSID:DB3AD5E6-365C-491F-9822-E3B18A94DD9B";
			break;
	}
}
// �곌린
objectTag.prototype.write = function(){
	// object ��렇 �ㅼ�
	this._typeSet();
	// 湲곕낯 �ㅼ�媛����
	for(_x=0;_x<this._defaultChk.length;_x++){
		if(!this._defaultChk[_x][1]) this.paramAppend(this._defaultChk[_x][0], this._defaultChk[_x][2]);
	}
	if(this._src != "") this.paramAppend(this._srcParamName, this._src);
	if(this.debug) alert(this._objectStrBuf.join("\n")+"\n\n"+this._embedStrBuf.join("\n"));
	document.write('<object classid="'+ this.classid +'" ');
	document.write('codebase="'+ this.codebase +'" ');
	if(this._width != "") document.write('width="'+ this._width +'" ');
	if(this._height != "") document.write('height="'+ this._height +'" ');
	if(this._id != "") document.write(' id="'+ this._id +'"');
	document.write('>');
	document.write(this._objectStrBuf.join(""));
	// embed tag��	
	if(this.embedTag){
		document.write('<embed swLiveConnect="true" pluginspage="'+ this.pluginspage +'" ');
		if(this._width != "") document.write('width="'+ this._width +'" ');
		if(this._height != "") document.write('height="'+ this._height +'" ');
		if(this._id != "") document.write(' name="'+ this._id +'" ');
		if(this.embedType != "") document.write('type="'+ this.embedType +'" ');
		document.write(this._embedStrBuf.join(""));
		document.write('></embed>');
	}
	document.write("</object>");
	this.clear();
}

objectTag.prototype.insertHTML = function(target){
	var returnStr
	// object ��렇 �ㅼ�
	this._typeSet();
	// 湲곕낯 �ㅼ�媛����
	for(_x=0;_x<this._defaultChk.length;_x++){
		if(!this._defaultChk[_x][1]) this.paramAppend(this._defaultChk[_x][0], this._defaultChk[_x][2]);
	}
	if(this._src != "") this.paramAppend(this._srcParamName, this._src);
	if(this.debug) alert(this._objectStrBuf.join("\n")+"\n\n"+this._embedStrBuf.join("\n"));
	returnStr = ('<object classid="'+ this.classid +'" ');
	returnStr += ('codebase="'+ this.codebase +'" ');
	if(this._width != "") returnStr += ('width="'+ this._width +'" ');
	if(this._height != "") returnStr += ('height="'+ this._height +'" ');
	if(this._id != "") returnStr += (' id="'+ this._id +'"');
	returnStr += ('>');
	returnStr += (this._objectStrBuf.join(""));
	// embed tag��	
	if(this.embedTag){
		returnStr += ('<embed swLiveConnect="true" pluginspage="'+ this.pluginspage +'" ');
		if(this._width != "") returnStr += ('width="'+ this._width +'" ');
		if(this._height != "") returnStr += ('height="'+ this._height +'" ');
		if(this._id != "") returnStr += (' name="'+ this._id +'" ');
		if(this.embedType != "") returnStr += ('type="'+ this.embedType +'" ');
		returnStr += (this._embedStrBuf.join(""));
		returnStr += ('></embed>');
	}
	returnStr += ("</object>");
	this.clear();
	if(typeof(target)=="string") document.getElementById(target).innerHTML = returnStr
	else target.innerHTML = returnStr
}

// param �깅�
objectTag.prototype.paramAppend = function(paramName, paramVal){
	_addObject = true;
	_addEmbed = true;
	paramName = paramName.toLowerCase().trim();
	paramVal = paramVal.toString().trim();
	switch(paramName){
	case "movie":
		if(this.embedTag) this._embedStrBuf.push(' src="'+ paramVal +'" ');
		_addEmbed = false
		break;
	case "filename":
		if(this.embedTag) this._embedStrBuf.push(' src="'+ paramVal +'" ');
		_addEmbed = false
		break;
	case "id":
		this._id = paramVal
		_addObject = false
		_addEmbed = false
		break;
	}
	for(_x=0;_x<this._defaultChk.length;_x++){
		if(this._defaultChk[_x][0] == paramName) this._defaultChk[_x][1] = true;
	}
	if(_addObject) this._objectStrBuf.push('<param name="'+paramName+'" value="'+paramVal+'"/>');
	if(_addEmbed && this.embedTag) this._embedStrBuf.push(paramName+'="'+ paramVal +'" ');
}
//// 추가
objectTag.prototype.param = function(){
	if(arguments.length <= 0){
		alert("전달값이 없습니다."); 
		return;
	}
	_paramArr = arguments[0].split(",");
	for(_i = 0;_i < _paramArr.length ;_i++){
		_paramSplit = _paramArr[_i].trim().split(":")
		this.paramAppend(_paramSplit[0], _paramSplit[1])
	}
}
objectTag.prototype.clear = function(){}