

// ÇÃ·¡½Ã
var EmbedStr = "";
	function GetFlash2(objid,url,x,y) { 
		
		AC_FL_RunContent(
			'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
			'width', x,
			'height', y,
			'src', url,
			'quality', 'high',
			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
			'align', 'middle',
			'play', 'true',
			'loop', 'true',
			'scale', 'showall',
			'wmode', 'window',
			'devicefont', 'false',
			'id', objid,
			'bgcolor', '#ffffff',
			'name', 'HubMain',
			'menu', 'true',
			'allowFullScreen', 'false',
			'allowScriptAccess','sameDomain',
			'movie', url,
			'salign', ''
			); //end AC code
			//document.write(EmbedStr);
			//return;
			
		}





// ÇÃ·¡½Ã
var EmbedStr = "";
	function GetFlash3(objid,url,x,y) { 
		
		AC_FL_RunContent(
			'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
			'width', x,
			'height', y,
			'src', url,
			'quality', 'high',
			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
			'align', 'middle',
			'play', 'true',
			'loop', 'true',
			'scale', 'showall',
			'wmode', 'transparent',
			'devicefont', 'false',
			'id', objid,
			'bgcolor', '#ffffff',
			'name', 'HubMain',
			'menu', 'true',
			'allowFullScreen', 'false',
			'allowScriptAccess','sameDomain',
			'movie', url,
			'salign', ''
			); //end AC code
			//document.write(EmbedStr);
			//return;
			
		}




// ÇÃ·¡½Ã
var EmbedStr = "";
function GetFlash(objid,url,x,y) { 
	EmbedStr = "<object id='objid' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='" + x + "' height='" + y + "'>";
	EmbedStr += "<param name='allowScriptAccess' value='sameDomain' />";
	EmbedStr += "<param name='allowFullScreen' value='false' />";
	EmbedStr += "<param name='movie' value='" + url + "' />";
	EmbedStr += "<param name='quality' value='high' />";
	EmbedStr += "<param name='bgcolor' value='#ffffff' />";
	EmbedStr += "<param name='wmode' value='transparent' />";
	EmbedStr += "<embed src='" + url + "' quality='high' wmode='transparent' bgcolor='#ffffff' width='" + x + "' height='" + y + "' allowScriptAccess='sameDomain' allowFullScreen='false' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />";
	EmbedStr += "</object>";
	
	document.write(EmbedStr);
	return;
}


var EmbedStr1 = "";
function GetFlash1(objid,url,x,y) { 
	EmbedStr1 = "<object id='objid' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='" + x + "' height='" + y + "'>";
	EmbedStr1 += "<param name='allowScriptAccess' value='sameDomain' />";
	EmbedStr1 += "<param name='movie' value='" + url + "' />";
	EmbedStr1 += "<param name='quality' value='high' />";
	EmbedStr1 += "<param name='bgcolor' value='#ffffff' />";
	EmbedStr1 += "<param name='wmode' value='transparent' />";
	EmbedStr1 += "<param name='base' value='.' />";
	EmbedStr1 += "<embed src='" + url + "' quality='high' base='.' wmode='transparent' bgcolor='#ffffff' width='" + x + "' height='" + y + "' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />";
	EmbedStr1 += "</object>";
	
	document.write(EmbedStr1);
	return;
}



function GetFlash10(objid,url,x,y) { 
 EmbedStr = "<object id='"+objid +"' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='" + x + "' height='" + y + "'>";
 EmbedStr += "<param name='allowScriptAccess' value='sameDomain' />";
 EmbedStr += "<param name='movie' value='" + url + "' />";
 EmbedStr += "<param name='quality' value='high' />";
 EmbedStr += "<param name='bgcolor' value='#ffffff' />";
 EmbedStr += "<param name='wmode' value='window' />";
 EmbedStr += "<param name='base' value='.' />";
 EmbedStr += "<embed src='" + url +  "' id='"+objid + "'" + " quality='high' wmode='window' base='.' bgcolor='#ffffff' width='" + x + "' height='" + y + "' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />";
 EmbedStr += "</object>";
 
 document.write(EmbedStr);
 return;
}

// Tab Content
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);
		thismenu.onclick = function tabMenuClick() {
			currentmenu = this.container.current;
			if (currentmenu == this)
				return;

			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;
		};

		if (!thismenu.container.first)
			thismenu.container.first = thismenu;
	}
	if (tabContainer.first)
		tabContainer.first.onclick();
}



// sTab Content
function mOver()
{
	this.src = this.src.replace(".gif", "_on.gif");
}
function mOut()
{
	this.src = this.src.replace("_on.gif", ".gif");
}

function TabMenu(menuContainerID, menuTabName) {
	var tabMenu = document.getElementsByName(menuTabName);
	var i = 0;

	for(i=0; i<tabMenu.length; i++) {
		thismenu = tabMenu.item(i);
		thismenu.menuContainer = document.getElementById(menuContainerID);
		thismenu.targetEl = document.getElementById(tabMenu.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		if (thismenu.getElementsByTagName("img").item(0)) {
			thismenu.getElementsByTagName("img").item(0).onmouseover = mOver;
			thismenu.getElementsByTagName("img").item(0).onmouseout = mOut;
		}
		thismenu.onclick = tabMenuClick;
	}

	initmenu = tabMenu.item(0);
	initmenu.targetEl.style.display = "block";
	if (initmenu.getElementsByTagName("img").item(0)) {
		initmenu.getElementsByTagName("img").item(0).onmouseover();
		initmenu.getElementsByTagName("img").item(0).onmouseover = null;
		initmenu.getElementsByTagName("img").item(0).onmouseout = null;
	}
	initmenu.menuContainer.current = initmenu;
}


function tabMenuClick() {
	currentmenu = this.menuContainer.current;
	if (currentmenu != this) {
		currentmenu.targetEl.style.display = "none";
		if (currentmenu.getElementsByTagName("img").item(0)) {
			currentmenu.getElementsByTagName("img").item(0).onmouseover = mOver;
			currentmenu.getElementsByTagName("img").item(0).onmouseout = mOut;
			currentmenu.getElementsByTagName("img").item(0).onmouseout();
		}
	
		this.targetEl.style.display = "block";
		if (this.getElementsByTagName("img").item(0)) {
			this.getElementsByTagName("img").item(0).onmouseover = null;
			this.getElementsByTagName("img").item(0).onmouseout = null;
		}
		this.menuContainer.current = this;
	}
	return false;
}




//object ÆÄÀÏ ÆÐÄ¡ ´ëºñ 
	
	var paramInfo = new Array;
	
	function initParam()
	{
	  var oldSize = paramInfo.length;
	
		for (var i=0; i<oldSize; i++) {
			paramInfo.length--;
		}	
	}
	
	function setParam(paramName, paramValue)
	{
		var idx = paramInfo.length;
	
		paramInfo[idx] = [];
		paramInfo[idx][0] = paramName;  
		paramInfo[idx][1]= paramValue;
	}
	

	function playMedia(objID, objSource, objWidth, objHeight, objStyle)
	{
		document.write('<OBJECT id="' + objID + '" name="' + objID + '" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" ');
		document.write('WIDTH="' + objWidth + '" HEIGHT="' + objHeight + '" ' + objStyle + '>');
	
		for (var i=0; i<paramInfo.length; i++) {
			document.write('<PARAM NAME="' + paramInfo[i][0] + '" VALUE="'+ paramInfo[i][1] +'">');		
			
		}	
		
		document.write('</OBJECT>');
	}
	


		
					
//media player
		 var nVolLeftPosition = 0;							// º¼·ý ¹Ù ¹è°æ ½ÃÀÛÁ¡
		var nVolStartPosition = 0;							// º¼·ý ¹Ù ½ÃÀÛ Á¡
		var nVolEndPosition = 30;							// º¼·ý ¹Ù ³¡ Á¡
		var nVolume = 15;									// º¼·ý ÃÊ±â °ª
		var nPrevVol;										// º¼·ýÀÌ º¯°æµÇ±â ÀüÀÇ °ª
		var bIsVolumeSet		= false;						// º¼·ý¹Ù µå·¡±× ¿©ºÎ
		var nZoomed			= 0;							// ±âº»°ª 1 : ÁÜµÊ,   0 : Ãà¼ÒµÊ

		function killErr(){return true;}

		function setVolumeBar(){
			nPrevVol = event.clientX;
			nVolLeftPosition = sound.style.pixelLeft;

			bIsVolumeSet = true;
			document.onmousemove=drag_dropie;
			if (document.all){document.onmouseup=endVolume;}
		}

		function drag_dropie(){
			if (bIsVolumeSet==true){
				var mov = nVolLeftPosition+event.clientX-nPrevVol;
				if ((mov >= nVolStartPosition)  && (mov < nVolEndPosition)){
					cutpoint=nVolEndPosition-sound.style.pixelLeft;
					document.all.soundbg.style.pixelWidth=39-cutpoint;
					//document.all.sbg.width = 58-cutpoint;
					sound.style.pixelLeft=nVolLeftPosition+event.clientX-nPrevVol;
					mplayer.Volume = -2500*(cutpoint/37);
					nVolume=sound.style.pixelLeft
					nVolume1=document.all.sbg.width;
					mplayer.Mute=false;
				}
				return false;
			}
		}

		function endVolume(){
			bIsVolumeSet=false;
		}

		function ris(name, nsdoc)
		{
			var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
			if (name == '') return;
			if (img && img.altsrc) {
				img.src    = img.altsrc;
				img.altsrc = null;
			}
		}

		function cis(name, nsdoc, rpath, preload)
		{ 
			var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
			if (name == '')	return;
			if (img) {
				img.altsrc = img.src;
				img.src    = rpath;
			}
		}		
    
    function mutecheck(){
      if(document.all.mplayer.mute==0) document.all.mplayer.mute=1;
      else document.all.mplayer.mute=0;
    }
 
 function setScrollColor(objFrame) 
 {  
    try 
    { 
      self[objFrame.name].document.body.style.scrollbarFaceColor = "#eeeeee";
      self[objFrame.name].document.body.style.scrollbarHighlightColor = "#ffffff";
      self[objFrame.name].document.body.style.scrollbarShadowColor = "#FFFFFF";
      self[objFrame.name].document.body.style.scrollbar3dLightColor = "#b6b6b6";
      self[objFrame.name].document.body.style.scrollbarArrowColor = "#333333";
      self[objFrame.name].document.body.style.scrollbarTrackColor = "";
      self[objFrame.name].document.body.style.scrollbarDarkshadowColor = "";
    } 
    catch(oException) 
    { 
      // Á¢±Ùº¸¾ÈÀÏ¶§ ¾Æ¹«·± ÀÏµµ ÇÏÁö ¾Ê´Â´Ù. 
    } 

 }

	
	function handlePlay(){
    document.mplayer.play();
	
	}
	function handleStop(){
	    document.mplayer.Stop();
	}
	
	function handlepause(){
	    document.mplayer.pause();
	}
	
	function handleonForward() {
	 document.mplayer.FastForward();
	}
	
	
	function handleonReverse() {
		document.mplayer.FastReverse();
	}
	
	
	function setVolume(opt)
	{

	  delta = 300; 
	  if(opt==0)
	  {
	    mplayer.Mute();
	
	  }
	  else
	  {  
	    if ((mplayer.Volume + delta * opt) > 0)
			mplayer.Volume = 0;
	    else if((mplayer.Volume + delta * opt) < -10000)
	      mplayer.Volume = -10000;
	    else
	      mplayer.Volume = mplayer.Volume + opt*delta ;
	  }
	  mplayer.Play();
	}



	
	
	
//¸µÅ© ÁÖº¯ Á¡¼± ¾ø¾Ö±â_Ç×»ó ¸Ç¾Æ¸®¿¡ ½áÁÖ±â
var myAnchors=document.all.tags("A");
function allblur() {
	for (i=0;i<myAnchors.length;i++) {
		myAnchors[i].onfocus=new Function("blur()");
	}
}

allblur();

function bluring(){
	if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}
document.onfocusin=bluring;




function initMoving(topPosition, topLimit, btmLimit) {

	GoTop.initTop = topPosition;
	GoTop.topLimit = topLimit;
	GoTop.bottomLimit = document.documentElement.scrollHeight - btmLimit;

	GoTop.style.position = "absolute";
	GoTop.top = GoTop.initTop;
	GoTop.left = GoTop.initLeft;
	GoTop.style.top = GoTop.top + "px";

	GoTop.getTop = function() {
		if (document.documentElement.scrollTop) {
			return document.documentElement.scrollTop;
		} else if (window.pageYOffset) {
			return window.pageYOffset;
		} else {
			return 0;
		}
	}
	GoTop.getHeight = function() {
		if (self.innerHeight) {
			return self.innerHeight;
		} else if(document.documentElement.clientHeight) {
			return document.documentElement.clientHeight;
		} else {
			return 500;
		}
	}
	GoTop.move = setInterval(function() {
		pos = GoTop.getTop() + topPosition;

		if (pos > GoTop.bottomLimit)
			pos = GoTop.bottomLimit
		if (pos < GoTop.topLimit)
			pos = GoTop.topLimit

		interval = GoTop.top - pos;
		GoTop.top = GoTop.top - interval / 8;
		GoTop.style.top = GoTop.top + "px";
	}, 30)
}

		


//lnb ¸Þ¹Â on off Ã³¸®  : Á¤ÈñÁ¤
function leftMenuOn(menuName) {
 

	//ÇØ´ç ¸Þ´ºÀÌ¸§ÀÌ Á¸ÀçÇÒ°æ¿ì¿¡¸¸
	if (document.getElementById(menuName)) {
		var menuObj = document.getElementById(menuName);
		var menuTagName = menuObj.tagName.toLowerCase();

		if (menuTagName == "a") {
			//alert(menuObj.parentNode.tagName.toLowerCase());
			var parentObj = menuObj.parentNode;
			//alert(parentObj.className);
			parentObj.className = "on"; 
		  
		}
	}
	

	// 2depth¸Þ´º ¿Â : ÇØ´ç ¸Þ´ºÀÌ¸§ÀÌ Á¸ÀçÇÒ°æ¿ì¿¡¸¸
	 depthmenu = menuName.substring(0,5) + "00" ;

	if (document.getElementById(depthmenu)) {
		var menuObj1 = document.getElementById(depthmenu);
		var menuTagName = menuObj1.tagName.toLowerCase(); 

		if (menuTagName == "a") {
			//alert(menuObj.parentNode.tagName.toLowerCase());
			var parentObj = menuObj1.parentNode;
			//alert(parentObj.className);
			parentObj.className = "on"; 
		}else{
			menuObj1.className = "on"; 
		}
	}
 
	//GNB ¸Þ´º ¿Â : ÇØ´ç ¸Þ´ºÀÌ¸§ÀÌ Á¸ÀçÇÒ°æ¿ì¿¡¸¸
	var gnbMenu = "menu" + menuName.substring(3,4) ;
	 
	if (document.getElementById(gnbMenu)) {
		var gnbmenuObj = document.getElementById(gnbMenu);
		var gnbmenuTagName = gnbmenuObj.tagName.toLowerCase();
 
		if (gnbmenuTagName == "li") {
 
			gnbmenuObj.className = "menu04 on"; 
		  
		}
	}
  
}


