/********************* flash Include *********************/
function EmbedObject() {
// Object
	var objectTAG		= new String;
	//SWF
	var classIDSWF		= 'CLSID:D27CDB6E-AE6D-11cf-96B8-444553540000';
	var codeBaseSWF		= 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab';

	//WMP
	var classIDWMP		= 'CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95';
	var codeBaseWMP		= 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab';

// Param
	var parameterTAG	= new String;

// Embed
	var embedTAG		= new String;

	// SWF
	var typeSWF			= 'application/x-shockwave-flash';
	var pluginsPageSWF	= 'http://www.macromedia.com/go/getflashplayer';

	// WMP
	var typeWMP			= 'application/x-mplayer2';
	var pluginsPageWMP	= 'http://www.microsoft.com/Windows/MediaPlayer/';	

	this.embedSWF		= embedSWF;
	this.embedWMP		= embedWMP;
	this.editObject		= editObject;
	this.editParam		= editParam;
	this.editEmbed		= editEmbed;
	this.displayHTML	= displayHTML;
	this.showembedTAG	= showembedTAG;

	// Flash ³Ö´Â ÇÔ¼ö
	function embedSWF(srcSWF, widthSWF, heightSWF, objectID, alignSWF, verSWF) {

		//Script init
		objectTAG += "<OBJECT ";
		embedTAG += "<EMBED ";

		//Class ID
		objectTAG += "classid='"+ classIDSWF +"' ";
	
		//CodeBase, Version
		(verSWF) ? codeBaseSWF += "#version="+ verSWF : codeBaseSWF += "#version=9,0,0,0"
		this.editObject('codebase',codeBaseSWF);


		// Align
		if (alignSWF)	{
			this.editObject('align',alignSWF);
		}

		// ID
		if (objectID)	{
			this.editObject('id',objectID);
			this.editEmbed('name',objectID);
		}
		
		//Parameter
		this.editParam('quality','high');
		this.editParam('movie',srcSWF,'Param');

		//Embed tag
		this.editEmbed('src',srcSWF);
		this.editEmbed('pluginspage',pluginsPageSWF);
		this.editEmbed('type',typeSWF);


		if (widthSWF)	{
			this.editObject('width',widthSWF);
			this.editEmbed('width',widthSWF);
		}

		if (heightSWF)	{
			this.editObject('height',heightSWF);
			this.editEmbed('height',heightSWF);
		}
	}

	// Media Player ³Ö´Â ÇÔ¼ö
	function embedWMP(srcWMP, widthWMP, heightWMP, objectID, alignWMP, verWMP) {

		//Script init
		objectTAG += "<OBJECT ";
		embedTAG += "<EMBED ";

		//Class ID
		objectTAG += "classid='"+ classIDWMP +"' ";
	
		//CodeBase, Version
		codeBaseWMP += (verWMP) ? "#version="+ verWMP : "#version=5,1,52,701";
		this.editObject('codebase',codeBaseWMP);

		//Type
		this.editObject('type','application/x-oleobject');

		// ID
		if (objectID)	{
			this.editObject('id',objectID);
			this.editEmbed('name',objectID);
		}

		// Align
		if (alignWMP)	{
			this.editObject('align',alignWMP);
		}
		
		//Parameter
		this.editParam('FileName',srcWMP,'Param');

		//Embed tag
		this.editEmbed('src',srcWMP);
		this.editEmbed('pluginspage',pluginsPageWMP);
		this.editEmbed('type',typeWMP);


		if (widthWMP)	{
			this.editObject('width',widthWMP);
			this.editEmbed('width',widthWMP);
		}

		if (heightWMP)	{
			this.editObject('height',heightWMP);
			this.editEmbed('height',heightWMP);
		}
	}
	
	//Object Tag
	function editObject(name, value) {
		objectTAG += " " + name + "='" + value + "' ";
	}

	//Parameter Tag
	function editParam(name, value, target) {

		parameterTAG += "<PARAM NAME='"+name+"' VALUE='"+value+"'>\n";
		
		// editParamÇÔ¼ö¿¡¼­ Object ¹× Embed¿¡ ÇÑ²¨¹ø¿¡ Áý¾î³ÖÀ½. 
		if (!target) {
			editEmbed(name, value);
		}
	}
	//Embed Tag
	function editEmbed(name, value) {
		embedTAG += " " + name + "='" + value + "' ";
	}

	//HTML¿¡ »Ñ·ÁÁÖ´Â ÇÔ¼ö
	function displayHTML(DivID) {
		objectTAG	+= ">\n"; 
		embedTAG	+= "></EMBED>\n"; // ¸¶°¨ÅÂ±× ºÙ¿©ÁÖ±â
		totalHTML		= objectTAG + parameterTAG + embedTAG + "</OBJECT>";

		(DivID) ? document.getElementById(DivID).innerHTML = totalHTML : document.write(totalHTML);
	}

	function showembedTAG() {
		alert(objectTAG + parameterTAG + embedTAG+"></EMBED>\n</OBJECT>");
	}
}

/********* XML Handling **********/ 
function initXML(xmlFile) {
	try {
		if (window.ActiveXObject) {
			try {
				xmlDoc = new ActiveXObject('Microsoft.XMLDOM');
			} catch (cantRead) {
				try {
					xmlDoc = new ActiveXObject('Msxml2.Domdocument');
				} catch (cantRead) {
					alert('¸øÀÐ¾úÀ½ \nF5 ¿¬Å¸ ÀÐÀ» ¼ö ÀÖÀ» ¶§ ±îÁö');
				}
			}
		}
		else if (document.implementation && document.implementation.createDocument) {
			xmlDoc = document.implementation.createDocument('','doc',null);
		}
		else alert('Sorry, this browser is not XML-compliant and cannot render the XML data.');

		xmlDoc.async=false;
		xmlDoc.load(xmlFile);

	} catch(cantRead) {
		alert ('There was an error (' + cantRead + ') attempting to load the XML document');
	}
}




/************************************************************
* Link Blur Script ½ÃÀÛ -- ¸µÅ© Á¡¼± Å×µÎ¸® ¾ø¾Ö±â
************************************************************/

//ÀÌ¹ÌÁö Å¬¸¯½Ã Á¡¼± ¾ø¾Ö±â
var myAnchors=document.all.tags("A"); 
function allblur() {
	for (i=0;i<myAnchors.length;i++) { 
		myAnchors[i].onfocus=new Function("myAnchors["+i+"].blur()");
	} 
}

/************************************************************
* png ÆÄÀÏ Åõ¸í°ª
************************************************************/
function setPngT(obj) { 
    obj.width=obj.height=1; 
    obj.className=obj.className.replace(/\bpngT\b/i,''); 
    obj.style.filter = 
    "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');" 
    obj.src='';  
    return ''; 
} 

function languageOpen()
{
	document.all.language_btn1.style.display="none";
	document.all.language_btn2.style.display="";
	document.all.language.style.display="";
}
function languageClose(str)
{
	document.all.language_btn1.style.display="";
	document.all.language_btn2.style.display="none";
	document.all.language.style.display="none";
}

function setMenuHeight(h){
	document.getElementById('wrap_topmenu').style.height = h;
}