
// png ÀÌ¹ÌÁö
function setPng24(obj) { 
    obj.width=obj.height=1; 
	obj.style.width = obj.width + "px"; 
    obj.style.height = obj.height + "px"; 
    obj.className=obj.className.replace(/\bpng24\b/i,''); 
    obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');" 
    obj.src='';  
    return ''; 
} 

// ±âº» ÇÃ·¡½Ã				
function flashObj(URL,SizeX,SizeY,LnkId,Frm,Flag) // quick
{
    document.write('            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ');
    document.write('                    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ');
    document.write('                    width="'+SizeX+'" height="'+SizeY+'"  id="'+LnkId+'" align="middle">');
    document.write('            <param name="movie"     value="'+URL+'" />');
    document.write('            <param name="quality"   value="high" />');
    if ( Flag == null || Flag != 'N' )
    {
        document.write('        <param name="wmode"     value="transparent"/>');
    }
 document.write('   <param name="allowScriptAccess" value="always"/> ');
 document.write('   <param name="base" value="." />');
    document.write('            <embed base="." src="'+URL+'" quality="high" width="'+SizeX+'" height="'+SizeY+'"  align="middle" ');
  if ( Flag == null || Flag != 'N' )
    {
        document.write('         wmode="transparent" ');
    }
    document.write('             type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="always" swLiveConnect=true name="'+LnkId+'"  />');
    document.write('            </embed></object>');
 if ( Frm == 'Y' ) { // form ÅÂ±× µé¾î°¡´Â ÆäÀÌÁö¿¡ Àû¿ë
  eval("window." + LnkId + " = document.forms[0]."+ LnkId +"; ");
 } 
}


//quick_top
function initMoving(target, position, topLimit, btmLimit) {
	if (!target)
		return false;

	var obj = target;
	obj.initTop = position;
	obj.topLimit = topLimit;
	obj.bottomLimit = document.documentElement.scrollHeight - btmLimit;

	obj.style.position = "absolute";
	obj.style.zIndex= "10";
	obj.top = obj.initTop;
	obj.left = obj.initLeft;

	if (typeof(window.pageYOffset) == "number") {
		obj.getTop = function() {
			return window.pageYOffset;
		}
	} else if (typeof(document.documentElement.scrollTop) == "number") {
		obj.getTop = function() {
			return document.documentElement.scrollTop;
		}
	} else {
		obj.getTop = function() {
			return 0;
		}
	}

	if (self.innerHeight) {
		obj.getHeight = function() {
			return self.innerHeight;
		}
	} else if(document.documentElement.clientHeight) {
		obj.getHeight = function() {
			return document.documentElement.clientHeight;
		}
	} else {
		obj.getHeight = function() {
			return 1000;
		}
	}

	obj.move = setInterval(function() {
		if (obj.initTop > 0) {
			pos = obj.getTop() + obj.initTop;
		} else {
			pos = obj.getTop() + obj.getHeight() + obj.initTop;
			//pos = obj.getTop() + obj.getHeight() / 2 - 15;
		}

		if (pos > obj.bottomLimit)
			pos = obj.bottomLimit;
		if (pos < obj.topLimit)
			pos = obj.topLimit;

		interval = obj.top - pos;
		obj.top = obj.top - interval / 3;
		obj.style.top = obj.top + "px";
	}, 30)
}

//ÆË¾÷¶ç¿ì±â ½ºÅ©·Ñ ¾ø´Â °Å
function popsn(url,trgt,w,h) { 
    window.open(url,trgt,'width='+w+',height='+h+',scrollbars=no,resizable=no,copyhistory=no,toolbar=no,status=no'); 
}
//ÆË¾÷¶ç¿ì±â ½ºÅ©·Ñ ÀÖ´Â °Å
function popsy(url,trgt,w,h) { 
    window.open(url,trgt,'width='+w+',height='+h+',scrollbars=yes,resizable=no,copyhistory=no,toolbar=no,status=no,left=0,top=0'); 
}


//ÅÇ
function imgOver(imgName) {
	
	if (imgName.getElementsByTagName("img")[0] == null)
	{
		imgName.src = imgName.src.replace(".gif", "_on.gif");
		imgName.src = imgName.src.replace(".jpg", "_on.jpg");
	}else{
		imgName = imgName.getElementsByTagName("img")[0];
		imgName.src = imgName.src.replace(".gif", "_on.gif");
		imgName.src = imgName.src.replace(".jpg", "_on.jpg");
	}
}
function imgOut(imgName) {
	
	if (imgName.getElementsByTagName("img")[0] == null)
	{
		imgName.src = imgName.src.replace("_on.gif", ".gif");
		imgName.src = imgName.src.replace("_on.jpg", ".jpg");
	}else{
		imgName = imgName.getElementsByTagName("img")[0];
		imgName.src = imgName.src.replace("_on.gif", ".gif");
		imgName.src = imgName.src.replace("_on.jpg", ".jpg");
	}
}

function tabOver(tabName){	
	tabName = tabName.className = "on";
}
function tabOut(tabName){
	tabName = tabName.className = "";
}

function layer_events()
{
  if (document.layers) {
    document.layers['gnb_area'].captureEvents(Event.MOUSEOVER|Event.MOUSEOUT|Event.MOUSEUP);
    document.layers['gnb_area'].onmouseout = new Function("this.style.height='115'");
    document.layers['gnb_area'].onmouseover = new Function("this.style.height='260'");
  }
}
link_num = 0;
function link_open(n) {
	for(i = 0; i < document.getElementById("link_table").getElementsByTagName("tr").length; i++){		
		if (document.getElementById("link_table").getElementsByTagName("tr")[i].className == "none")
		{
			link_num = link_num+1;
		}
		
	}
	for(i = 1; i <= link_num; i++){		
		trname = document.getElementById("link"+i)			
		if (i == n)
		{
			if (trname.style.display == "")
			{
				trname.style.display = "block"
			}else{
				trname.style.display = ""
			}
		}		
	}	
}
function select(n) {	
	for(i = 1; i <= 2; i++){		
		select_div = document.getElementById("select"+i);
		if (n == null){
			select_div.style.display = "block"
		}else{
			if (i == n)
			{
				select_div.style.display = "block"
			}else{
				select_div.style.display = "none"
			}
		}
		
	}	
}

// layer tab
function tabChange(value) {
	for (var i=1; i<=5; i++) {
		if (i==value) {
			document.getElementById("tabimg0"+i).src="/images/utility/tab_layer0"+i+"_on.gif";
			document.getElementById("layerTab0"+i).style.display="";
		}
		else {
			document.getElementById("tabimg0"+i).src="/images/utility/tab_layer0"+i+".gif";
			document.getElementById("layerTab0"+i).style.display="none";
		}
	}
}
var isOpen = 'N';
var num = '';
// faq style list
function faqList(value, total) {
	for (var j=1; j<=total; j++) {
		var ThisNum=document.getElementById("color"+j).children;
		if (j==value) {
			for (var i=0; i<ThisNum.length; i++) {
				document.getElementById("color"+j).children(i).style.color="#ef4130";
				//document.getElementById("color"+j).children(i).style.borderBottom="0";
			}
			
			if(isOpen == "Y" && num == value){
				document.getElementById("view"+j).style.display="none";
				isOpen = 'N';
			} else {
				document.getElementById("view"+j).style.display="";
				isOpen = 'Y';
				num =value;
			}
		}
		else {
			for (var i=0; i<ThisNum.length; i++) {
				document.getElementById("color"+j).children(i).style.color="#68696a";
				if (j==total) {
					document.getElementById("color"+j).children(i).style.borderBottom="0";
				}
				else {
					document.getElementById("color"+j).children(i).style.borderBottom="1px solid #dcdddf";
				}
			}
			document.getElementById("view"+j).style.display="none";
		}
	}
}

// faq
function faqLists(value, total) {
	for (var j=1; j<=total; j++) {
		var ThisNum=document.getElementById("color"+j).children;
		if (j==value) {
			for (var i=0; i<ThisNum.length; i++) {
				document.getElementById("color"+j).children(i).style.color="#2a2b2d";
				document.getElementById("color"+j).children(i).style.borderBottom="0";
			}
			document.getElementById("view"+j).style.display="";
		}
		else {
			for (var i=0; i<ThisNum.length; i++) {
				document.getElementById("color"+j).children(i).style.color="#68696a";
				if (j==total) {
					document.getElementById("color"+j).children(i).style.borderBottom="0";
				}
				else {
					document.getElementById("color"+j).children(i).style.borderBottom="1px solid #dcdddf";
				}
			}
			document.getElementById("view"+j).style.display="none";
		}
	}
}

//¼³¸³¿¬±¸±â°ü
function acompanyOn (value, This) {
	This.style.backgroundColor="#978344";
	document.getElementById("acompany"+value).style.display="";
}
function acompanyOut (value, This) {
	This.style.backgroundColor="";
	document.getElementById("acompany"+value).style.display="none";
}

//Ã£¾Æ¿À½Ã´Â ±æ
function cometo (value) {
	for (var i=1; i<=9; i++) {
		if (i==value) {
			document.getElementById("comebt0"+i).src="/images/university/intro/btn_come0"+i+"_on.gif";
			document.getElementById("come0"+i).style.display="";
		}
		else {
			document.getElementById("comebt0"+i).src="/images/university/intro/btn_come0"+i+".gif";
			document.getElementById("come0"+i).style.display="none";
		}
	}
}

//Á¶Á÷µµ
function depth (value) {
	for (var i=1; i<=8; i++) {
		if (value==i) {
			document.getElementById("depth0"+i).style.display="";
		}
		else {
			document.getElementById("depth0"+i).style.display="none";
		}
	}
	if (value=="1") {
		document.getElementById("layerPop").style.top="495px";
		document.getElementById("layerPop").style.left="297px";
	}
	else if (value=="2") {
		document.getElementById("layerPop").style.top="575px";
		document.getElementById("layerPop").style.left="297px";
	}
	else if (value=="3") {
		document.getElementById("layerPop").style.top="575px";
		document.getElementById("layerPop").style.left="382px";
	}
	else if (value=="4") {
		document.getElementById("layerPop").style.top="690px";
		document.getElementById("layerPop").style.left="226px";
	}
	else if (value=="5") {
		document.getElementById("layerPop").style.top="690px";
		document.getElementById("layerPop").style.left="336px";
	}
	else if (value=="6") {
		document.getElementById("layerPop").style.top="690px";
		document.getElementById("layerPop").style.left="439px";
	}
	else if (value=="7") {
		document.getElementById("layerPop").style.top="690px";
		document.getElementById("layerPop").style.left="439px";
	}
	else if (value=="8") {
		document.getElementById("layerPop").style.top="690px";
		document.getElementById("layerPop").style.left="439px";
	}
	document.getElementById("layerPop").style.display="";
}

function closePop() {
	document.getElementById("layerPop").style.display="none";
}

/* À¥Áø */
function webOn (value) {
	document.getElementById("over"+value).style.display="";
}

function webOut (value) {
	document.getElementById("over"+value).style.display="none";
}

/* sub index tab */
function tabUst (value) {
	if (value=="1") {
		document.getElementById("subLi01").className="firstOn";
		document.getElementById("subLi02").className="second";
		document.getElementById("subLi03").className="second";
		document.getElementById("subLi04").className="";
	}
	else if (value=="2") {
		document.getElementById("subLi01").className="first";
		document.getElementById("subLi02").className="On";
		document.getElementById("subLi03").className="second";
		document.getElementById("subLi04").className="";
	}
	else if (value=="3") {
		document.getElementById("subLi01").className="firstOff";
		document.getElementById("subLi02").className="secondOff";
		document.getElementById("subLi03").className="On";
		document.getElementById("subLi04").className="";
	}
	else if (value=="4") {
		document.getElementById("subLi01").className="firstOff";
		document.getElementById("subLi02").className="second";
		document.getElementById("subLi03").className="secondOff";
		document.getElementById("subLi04").className="On";
	}
	for (var i=1; i<=4; i++) {
		if (value==i) {
			document.getElementById("subImg0"+i).src="/images/major/txt_sub0"+i+"_on.gif";
			document.getElementById("tab0"+i).style.display="";
		}
		else {
			document.getElementById("subImg0"+i).src="/images/major/txt_sub0"+i+".gif";
			document.getElementById("tab0"+i).style.display="none";
		}
	}
}

function changeLiOn(This) {
	This.className="on";
}

function changeLiOut(This) {
	This.className="";
}