///////////////////////////////////////////// obj_common /////////////////////////////////////////////////////////////////////////


//-- ÀÏ¹ÝÀûÀ¸·Î ´Ü¼øÇÑ ÇÃ·¡½¬ ÀÏ °æ¿ì
/*
	-- ÆÄ¶ó¹ÌÅÍ Á¤º¸ --

	width : °¡·ÎÅ©±â
	height : ¼¼·ÎÅ©±â
	url : ÇÃ·¡½¬ ÆÄÀÏÀÇ °æ·Î
*/

function swfView(width, height, url){

	document.write("<object  classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' ");
	document.write(" codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' ");
	document.write(" width='"+width+"' height='"+height+"' align='middle'>");
	document.write("<param name='allowScriptAccess' value='always' /> ");
	document.write("<param name='movie' value='"+url+"' /> ");
	document.write("<param name='quality' value='high' /> ");
	document.write("<param name='wmode' value='transparent'> ");
	document.write("<embed src='"+url+"' quality='high' width='"+width+"' height='"+height+"' align='middle' ");
	document.write(" allowScriptAccess='sameDomain' type='application/x-shockwave-flash' ");
	document.write(" pluginspage='http://www.macromedia.com/go/getflashplayer' />");
	document.write("</object>");
}

function ms_fatch(str){
	document.write(str);
}

function editorView(width, height){

	document.write("<OBJECT id='editBox' style='LEFT:0px;TOP:0px' data='/editor/Editor.htm' width='"+width+"' height='"+height+"' type='text/x-scriptlet' VIEWASTEXT></OBJECT>");

}

function editorCtrl(width, height){
 document.write("<object id='EditCtrl' width='"+width+"' height='"+height+"' classid='clsid:2D360201-FFF5-11D1-8D03-00A0C959BC0A' VIEWASTEXT >");
 document.write("<param name='wmode' value='transparent'> ");
 document.write("<PARAM NAME=ShowBorders VALUE=1>");
 document.write("<PARAM NAME=ShowDetails VALUE=0>");
 document.write("<PARAM NAME=Appearance VALUE=0>");
 document.write("<PARAM NAME=ActivateActiveXControls VALUE=1>");
 document.write("</object>");
}

function vodView(width, height, filename, volume){
	document.write("<OBJECT id=myplayer CLASSID='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' ");
	document.write("CODEBASE='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' ");
	document.write("	STANDBY='Loading Microsoft Windows Media Player components...' TYPE='application/x-oleobject' width="+width+" height="+height+">");
	document.write("<param NAME='fileName' VALUE='"+filename+"'>");
	document.write("<param NAME='Displaysize' value='0'>");
	document.write("<param NAME='animationatstart' value='true'>");
	document.write("<param NAME='autostart' value='true'>");
	document.write("<param NAME='EnableContextMenu' Value='0'>");
	document.write("<param NAME='ShowStatusBar' VALUE='0'>");
	document.write("<param NAME='ShowControls' VALUE='0'>");
	document.write("<param NAME='Volume' value='"+volume+"'>");
	document.write("<param name='wmode' value='transparent'> ");
	document.write("</OBJECT>");
}

function setPng24(obj) {
obj.width=obj.height=1;
obj.className=obj.className.replace(/\bpng24\b/i,''); 
obj.style.filter =
"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
obj.src='about:blank;';
return '';
}

// Tab Content (board)
function initTabMenu(tabContainerID) {
	var tabContainer = document.getElementById(tabContainerID);
	var tabAnchor = tabContainer.getElementsByTagName("a");
	var i = 0;

	for(i=0; i<tabAnchor.length; i++) {
		if (tabAnchor.item(i).className == "tab")
			thismenu = tabAnchor.item(i);
		else
			continue;

		thismenu.container = tabContainer;
		thismenu.targetEl = document.getElementById(tabAnchor.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		thismenu.imgEl = thismenu.getElementsByTagName("img").item(0);
		if (thismenu.imgEl) {
			thismenu.onmouseover = function () {
				//this.onclick();
			}
		}
		thismenu.onclick = tabMenuClick;
		
		if (!thismenu.container.first)
			thismenu.container.first = thismenu;
	}
	tabContainer.first.onclick();
}
function tabMenuClick() {
	currentmenu = this.container.current;
	if (currentmenu != this) {
		if (currentmenu) {
			currentmenu.targetEl.style.display = "none";
			if (currentmenu.imgEl) {
				currentmenu.imgEl.src = currentmenu.imgEl.src.replace("_on.gif", ".gif");
			} else {
				currentmenu.className = currentmenu.className.replace(" on", "");
			}
		}

		this.targetEl.style.display = "block";
		if (this.imgEl) {
			this.imgEl.src = this.imgEl.src.replace(".gif", "_on.gif");
		} else {
			this.className += " on";
		}
		this.container.current = this;
	}
	return false;
}
