// 브라우저 체크	
var isie=(navigator.userAgent.toLowerCase().indexOf('msie')!=-1)? true : false;
var isie6=(navigator.userAgent.toLowerCase().indexOf('msie 6')!=-1)? true : false;
//var isie7=(navigator.userAgent.toLowerCase().indexOf('msie 7')!=-1)? true : false;	
if(navigator.userAgent.toLowerCase().indexOf('msie 7')!=-1){
 isie6=false;
 var isie7=true;
}
if(navigator.userAgent.toLowerCase().indexOf('msie 8')!=-1){
 isie6=false;
 var isie8=true;
}
var isfirefox=(navigator.userAgent.toLowerCase().indexOf('firefox')!=-1)? true : false;
var isopera=(navigator.userAgent.toLowerCase().indexOf('opera')!=-1)? true : false;

try{
	document.execCommand('BackgroundImageCache', false, true);
}catch(e){}



// 네비게이션 메뉴 펼침
<!--
function showit(su,x)
 {
  document.all["sub"+su].style.display="block"
  document.all["sub"+su].style.pixelTop=0
 }
 function hideit(su)
 {
  document.all["sub"+su].style.display="none"
 }


//-->



// 메인_운화뉴스 탭선택 이미지
function jsNewsItem(str){
		if("news1"==str){
			document.all.newshow1.style.display = "";
			document.all.newshow2.style.display = "none";
		}else if("news2"==str){
			document.all.newshow1.style.display = "none";
			document.all.newshow2.style.display = "";
		}
	}






// 서브_회사연혁 탭선택 이미지
function jsHistory(str){
		if("yrtab1"==str){
			document.all.historyshow1.style.display = "";
			document.all.historyshow2.style.display = "none";
			document.all.historyshow3.style.display = "none";
			document.all.historyshow4.style.display = "none";
			document.all.historyshow5.style.display = "none";
			
			document.getElementById("yrtab1").src = "../images/sub/sub13_tab1_on.gif";
			document.getElementById("yrtab2").src = "../images/sub/sub13_tab2.gif";
			document.getElementById("yrtab3").src = "../images/sub/sub13_tab3.gif";
			document.getElementById("yrtab4").src = "../images/sub/sub13_tab4.gif";
			document.getElementById("yrtab5").src = "../images/sub/sub13_tab5.gif";
		}else if("yrtab2"==str){
			document.all.historyshow1.style.display = "none";
			document.all.historyshow2.style.display = "";
			document.all.historyshow3.style.display = "none";
			document.all.historyshow4.style.display = "none";
			document.all.historyshow5.style.display = "none";
			
			document.getElementById("yrtab1").src = "../images/sub/sub13_tab1.gif";
			document.getElementById("yrtab2").src = "../images/sub/sub13_tab2_on.gif";
			document.getElementById("yrtab3").src = "../images/sub/sub13_tab3.gif";
			document.getElementById("yrtab4").src = "../images/sub/sub13_tab4.gif";
			document.getElementById("yrtab5").src = "../images/sub/sub13_tab5.gif";
		}else if("yrtab3"==str){
			document.all.historyshow1.style.display = "none";
			document.all.historyshow2.style.display = "none";
			document.all.historyshow3.style.display = "";
			document.all.historyshow4.style.display = "none";
			document.all.historyshow5.style.display = "none";
			
			document.getElementById("yrtab1").src = "../images/sub/sub13_tab1.gif";
			document.getElementById("yrtab2").src = "../images/sub/sub13_tab2.gif";
			document.getElementById("yrtab3").src = "../images/sub/sub13_tab3_on.gif";
			document.getElementById("yrtab4").src = "../images/sub/sub13_tab4.gif";
			document.getElementById("yrtab5").src = "../images/sub/sub13_tab5.gif";
		}else if("yrtab4"==str){
			document.all.historyshow1.style.display = "none";
			document.all.historyshow2.style.display = "none";
			document.all.historyshow3.style.display = "none";
			document.all.historyshow4.style.display = "";
			document.all.historyshow5.style.display = "none";
			
			document.getElementById("yrtab1").src = "../images/sub/sub13_tab1.gif";
			document.getElementById("yrtab2").src = "../images/sub/sub13_tab2.gif";
			document.getElementById("yrtab3").src = "../images/sub/sub13_tab3.gif";
			document.getElementById("yrtab4").src = "../images/sub/sub13_tab4_on.gif";
			document.getElementById("yrtab5").src = "../images/sub/sub13_tab5.gif";
		}else if("yrtab5"==str){
			document.all.historyshow1.style.display = "none";
			document.all.historyshow2.style.display = "none";
			document.all.historyshow3.style.display = "none";
			document.all.historyshow4.style.display = "none";
			document.all.historyshow5.style.display = "";
			
			document.getElementById("yrtab1").src = "../images/sub/sub13_tab1.gif";
			document.getElementById("yrtab2").src = "../images/sub/sub13_tab2.gif";
			document.getElementById("yrtab3").src = "../images/sub/sub13_tab3.gif";
			document.getElementById("yrtab4").src = "../images/sub/sub13_tab4.gif";
			document.getElementById("yrtab5").src = "../images/sub/sub13_tab5_on.gif";
		}
	}
	
	



// 서브_운화 조직구성 팝업
function ViewLayer1(){

        if(document.getElementById("Pop1").style.display=="none"){

           document.getElementById("Pop1").style.display='inline'

        }else{

           document.getElementById("Pop1").style.display='none'

        }

}




// 서브_운화위치 탭선택 이미지
function jsStepItem(str){
		if("map1"==str){
			document.all.mapshow1.style.display = "";
			document.all.mapshow2.style.display = "none";
			document.all.mapshow3.style.display = "none";
			document.all.mapshow4.style.display = "none";
		}else if("map2"==str){
			document.all.mapshow1.style.display = "none";
			document.all.mapshow2.style.display = "";
			document.all.mapshow3.style.display = "none";
			document.all.mapshow4.style.display = "none";
		}else if("map3"==str){
			document.all.mapshow1.style.display = "none";
			document.all.mapshow2.style.display = "none";
			document.all.mapshow3.style.display = "";
			document.all.mapshow4.style.display = "none";
		}else if("map4"==str){
			document.all.mapshow1.style.display = "none";
			document.all.mapshow2.style.display = "none";
			document.all.mapshow3.style.display = "none";
			document.all.mapshow4.style.display = "";
		}
	}




// 서브_운화해외위치 탭선택 이미지
function jsAbrItem(str){
		if("abr1"==str){
			document.all.abrshow1.style.display = "";
			document.all.abrshow2.style.display = "none";
			document.all.abrshow3.style.display = "none";
			document.all.abrshow4.style.display = "none";
			document.all.abrshow5.style.display = "none";
		}else if("abr2"==str){
			document.all.abrshow1.style.display = "none";
			document.all.abrshow2.style.display = "";
			document.all.abrshow3.style.display = "none";
			document.all.abrshow4.style.display = "none";
			document.all.abrshow5.style.display = "none";
		}else if("abr3"==str){
			document.all.abrshow1.style.display = "none";
			document.all.abrshow2.style.display = "none";
			document.all.abrshow3.style.display = "";
			document.all.abrshow4.style.display = "none";
			document.all.abrshow5.style.display = "none";
		}else if("abr4"==str){
			document.all.abrshow1.style.display = "none";
			document.all.abrshow2.style.display = "none";
			document.all.abrshow3.style.display = "none";
			document.all.abrshow4.style.display = "";
			document.all.abrshow5.style.display = "none";
		}else if("abr5"==str){
			document.all.abrshow1.style.display = "none";
			document.all.abrshow2.style.display = "none";
			document.all.abrshow3.style.display = "none";
			document.all.abrshow4.style.display = "none";
			document.all.abrshow5.style.display = "";
		}
}



// 서브_회사둘러보기 탭선택 이미지
function jsPhoItem(str){
		if("phtab1"==str){
			document.all.photoshow1.style.display = "";
			document.all.photoshow2.style.display = "none";
			document.all.photoshow3.style.display = "none";
			
			document.getElementById("phtab1").src = "../images/sub/sub17_tab1_on.gif";
			document.getElementById("phtab2").src = "../images/sub/sub17_tab2.gif";
			document.getElementById("phtab3").src = "../images/sub/sub17_tab3.gif";
		}else if("phtab2"==str){
			document.all.photoshow1.style.display = "none";
			document.all.photoshow2.style.display = "";
			document.all.photoshow3.style.display = "none";
			
			document.getElementById("phtab1").src = "../images/sub/sub17_tab1.gif";
			document.getElementById("phtab2").src = "../images/sub/sub17_tab2_on.gif";
			document.getElementById("phtab3").src = "../images/sub/sub17_tab3.gif";
		}else if("phtab3"==str){
			document.all.photoshow1.style.display = "none";
			document.all.photoshow2.style.display = "none";
			document.all.photoshow3.style.display = "";
			
			document.getElementById("phtab1").src = "../images/sub/sub17_tab1.gif";
			document.getElementById("phtab2").src = "../images/sub/sub17_tab2.gif";
			document.getElementById("phtab3").src = "../images/sub/sub17_tab3_on.gif";
		}
	}
	


/* 서브_회사둘러보기_이미지토글 */
function jsChImage5201(url) {
	img_5201.src = url;
}
function jsChImage5202(url) {
	img_5202.src = url;
}
function jsChImage5203(url) {
	img_5203.src = url;
}



// 서브_회사둘러보기 좌우선택
	function jsDropImg(step){
		var idx  = getArrayIndex(tabIndex_d,tabHis_d);
		var tabData_d_this = tabData_d[idx];
		var log = "ItemCount:"+tabData_d_this.length+"\n";
		for(var i=0; i<itemCnt_d;i++) {
			loopIndex_d[idx] += ((step > 0) ? 1 : -1)*1;
			if ((loopIndex_d[idx] > (tabData_d_this.length-1)) || (loopIndex_d[idx] < 0)) {
				loopIndex_d[idx] = (step > 0) ? 0 : (tabData_d_this.length-1);
			}

			log += loopIndex_d[idx]+"\n";
			document.getElementById("drop"+(i+1)).innerHTML  = tabData_d_this[loopIndex_d[idx]];
		}
	}
	
	
	

// 서브_연구분야 탭선택 이미지
function jsDdoItem(str){
		if("ddotab1"==str){
			document.all.ddoshow1.style.display = "";
			document.all.ddoshow2.style.display = "none";
			
			document.getElementById("ddotab1").src = "../images/sub/sub31_tab1_on.gif";
			document.getElementById("ddotab2").src = "../images/sub/sub31_tab2.gif";
		}else if("ddotab2"==str){
			document.all.ddoshow1.style.display = "none";
			document.all.ddoshow2.style.display = "";
			
			document.getElementById("ddotab1").src = "../images/sub/sub31_tab1.gif";
			document.getElementById("ddotab2").src = "../images/sub/sub31_tab2_on.gif";
		}
	}
	
	
	
	

// 서브_디스커버리채널 탭선택 이미지
function jsChItem(str){
		if("chtab1"==str){
			document.all.chshow1.style.display = "";
			document.all.chshow2.style.display = "none";
			document.all.chshow3.style.display = "none";
			
			document.getElementById("chtab1").src = "../images/sub/sub44_ch_tab1_on.gif";
			document.getElementById("chtab2").src = "../images/sub/sub44_ch_tab2.gif";
			document.getElementById("chtab3").src = "../images/sub/sub44_ch_tab3.gif";
		}else if("chtab2"==str){
			document.all.chshow1.style.display = "none";
			document.all.chshow2.style.display = "";
			document.all.chshow3.style.display = "none";
			
			document.getElementById("chtab1").src = "../images/sub/sub44_ch_tab1.gif";
			document.getElementById("chtab2").src = "../images/sub/sub44_ch_tab2_on.gif";
			document.getElementById("chtab3").src = "../images/sub/sub44_ch_tab3.gif";
		}else if("chtab3"==str){
			document.all.chshow1.style.display = "none";
			document.all.chshow2.style.display = "none";
			document.all.chshow3.style.display = "";
			
			document.getElementById("chtab1").src = "../images/sub/sub44_ch_tab1.gif";
			document.getElementById("chtab2").src = "../images/sub/sub44_ch_tab2.gif";
			document.getElementById("chtab3").src = "../images/sub/sub44_ch_tab3_on.gif";
		}
	}




// 서브_디스커버리채널 탭선택 이미지
function jsDocItem(str){
		if("doctab1"==str){
			document.all.docshow1.style.display = "";
			document.all.docshow2.style.display = "none";
			document.all.docshow3.style.display = "none";
			document.all.docshow4.style.display = "none";
			document.all.docshow5.style.display = "none";
			document.all.docshow6.style.display = "none";
			
			document.getElementById("doctab1").src = "../images/sub/sub44_zm01_on.gif";
			document.getElementById("doctab2").src = "../images/sub/sub44_zm02.gif";
			document.getElementById("doctab3").src = "../images/sub/sub44_zm03.gif";
			document.getElementById("doctab4").src = "../images/sub/sub44_zm04.gif";
			document.getElementById("doctab5").src = "../images/sub/sub44_zm05.gif";
			document.getElementById("doctab6").src = "../images/sub/sub44_zm06.gif";
		}else if("doctab2"==str){
			document.all.docshow1.style.display = "none";
			document.all.docshow2.style.display = "";
			document.all.docshow3.style.display = "none";
			document.all.docshow4.style.display = "none";
			document.all.docshow5.style.display = "none";
			document.all.docshow6.style.display = "none";
			
			document.getElementById("doctab1").src = "../images/sub/sub44_zm01.gif";
			document.getElementById("doctab2").src = "../images/sub/sub44_zm02_on.gif";
			document.getElementById("doctab3").src = "../images/sub/sub44_zm03.gif";
			document.getElementById("doctab4").src = "../images/sub/sub44_zm04.gif";
			document.getElementById("doctab5").src = "../images/sub/sub44_zm05.gif";
			document.getElementById("doctab6").src = "../images/sub/sub44_zm06.gif";
		}else if("doctab3"==str){
			document.all.docshow1.style.display = "none";
			document.all.docshow2.style.display = "none";
			document.all.docshow3.style.display = "";
			document.all.docshow4.style.display = "none";
			document.all.docshow5.style.display = "none";
			document.all.docshow6.style.display = "none";
			
			document.getElementById("doctab1").src = "../images/sub/sub44_zm01.gif";
			document.getElementById("doctab2").src = "../images/sub/sub44_zm02.gif";
			document.getElementById("doctab3").src = "../images/sub/sub44_zm03_on.gif";
			document.getElementById("doctab4").src = "../images/sub/sub44_zm04.gif";
			document.getElementById("doctab5").src = "../images/sub/sub44_zm05.gif";
			document.getElementById("doctab6").src = "../images/sub/sub44_zm06.gif";
		}else if("doctab4"==str){
			document.all.docshow1.style.display = "none";
			document.all.docshow2.style.display = "none";
			document.all.docshow3.style.display = "none";
			document.all.docshow4.style.display = "";
			document.all.docshow5.style.display = "none";
			document.all.docshow6.style.display = "none";
			
			document.getElementById("doctab1").src = "../images/sub/sub44_zm01.gif";
			document.getElementById("doctab2").src = "../images/sub/sub44_zm02.gif";
			document.getElementById("doctab3").src = "../images/sub/sub44_zm03.gif";
			document.getElementById("doctab4").src = "../images/sub/sub44_zm04_on.gif";
			document.getElementById("doctab5").src = "../images/sub/sub44_zm05.gif";
			document.getElementById("doctab6").src = "../images/sub/sub44_zm06.gif";
		}else if("doctab5"==str){
			document.all.docshow1.style.display = "none";
			document.all.docshow2.style.display = "none";
			document.all.docshow3.style.display = "none";
			document.all.docshow4.style.display = "none";
			document.all.docshow5.style.display = "";
			document.all.docshow6.style.display = "none";
			
			document.getElementById("doctab1").src = "../images/sub/sub44_zm01.gif";
			document.getElementById("doctab2").src = "../images/sub/sub44_zm02.gif";
			document.getElementById("doctab3").src = "../images/sub/sub44_zm03.gif";
			document.getElementById("doctab4").src = "../images/sub/sub44_zm04.gif";
			document.getElementById("doctab5").src = "../images/sub/sub44_zm05_on.gif";
			document.getElementById("doctab6").src = "../images/sub/sub44_zm06.gif";
		}else if("doctab6"==str){
			document.all.docshow1.style.display = "none";
			document.all.docshow2.style.display = "none";
			document.all.docshow3.style.display = "none";
			document.all.docshow4.style.display = "none";
			document.all.docshow5.style.display = "none";
			document.all.docshow6.style.display = "";
			
			document.getElementById("doctab1").src = "../images/sub/sub44_zm01.gif";
			document.getElementById("doctab2").src = "../images/sub/sub44_zm02.gif";
			document.getElementById("doctab3").src = "../images/sub/sub44_zm03.gif";
			document.getElementById("doctab4").src = "../images/sub/sub44_zm04.gif";
			document.getElementById("doctab5").src = "../images/sub/sub44_zm05.gif";
			document.getElementById("doctab6").src = "../images/sub/sub44_zm06_on.gif";
		}
	}
	
	

/* 팝업 띄우기 */
/**
      * 화면중앙에 새창열기
      * window.open 에서 사용되는 방식으로 features 설정
      * @param theURL    새창의 Url
      * @param winName   새창의 name
      * @param features  새창의 세부 설정
      * @return
      */
    function CenterOpenWindow(theURL, winName, width, height, fstate ) {
        var features = "width=" + width ;
        features += ",height=" + height ;

		var state = "";

		if (fstate == "") {
			state = features + ", left=" + (screen.width-width)/2 + ",top=" + (screen.height-height)/2;
			//state = features + ", left=" + (screen.width-width)/2 + ",top=10";
		} else {
			state = fstate + ", " + features + ", left=" + (screen.width-width)/2 + ",top=" + (screen.height-height)/2;
		}

		popupWin = window.open(theURL,winName,state+",resizable=1 ");

        popupWin.focus();
    }







// LAYER SHOW HIDE
function cu(stat){
	if (stat == 1){ 
		document.all.cu1.style.display = "block"; 
		document.all.cu2.style.display = "none"; 
	} else if (stat == 2){  
		document.all.cu1.style.display = "none"; 
		document.all.cu2.style.display = "block";
	} 
}







//줄전체 링크걸기
function Url(url) {
document.location.href=url;
}





//플래시 불러오기
function jsPrintFlash(url, width, height){
	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='"+width+"' height='"+height+"'>");
	document.write("<param name='movie' value='"+url+"'>");
	document.write("<param name='quality' value='best'>");
	document.write("<param name='wmode' value='transparent' />");
	document.write("<embed src='"+url+"' quality='best' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' wmode='transparent' width='"+width+"' height='"+height+"'></embed>");
	document.write("</object>");
}



// link_onfocus_blurring
function bluring(){
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="img") document.body.focus();
}
document.onfocusin=bluring;




// 윙배너 스크롤
var mytop=71;  //처음메뉴의상단위치
function mymenuscroll() {  //스크롤시수행
    //메뉴의상단위치를스크롤의상단위치와비교하여정함
    var m_menu=document.all.mywing;
  //  var m_menuover=document.all.mymenuover;
    var s_top=document.body.scrollTop+70
    m_menu.style.top=s_top>mytop?s_top:mytop;
   // m_menuover.style.top=s_top>mytop?s_top:mytop;
}




	
	
// 풋터 패밀리사이트_LAYER 열기
function slide2(Id, interval, to)
{
var obj = document.getElementById(Id);
var H, step = 4;

if (obj == null) return;
if (to == undefined) { // user clicking
if (obj._slide2Start == true) return;
if (obj._expand == true) {
to = 0;
obj.style.overflow = "hidden";
} else {
slide2.addId(Id);
for(var i=0; i < slide2.objects.length; i++) {
if (slide2.objects[i].id != Id && slide2.objects[i]._expand == true) {
slide2(slide2.objects[i].id);
}
}

obj.style.height = "11px";
obj.style.overflow = "";
obj.style.display = "block";
to = obj.offsetHeight;
obj.style.overflow = "hidden";
obj.style.height = "1px";
}
obj._slide2Start = true;
}

step = ((to > 0) ? 1:-1) * step;
interval = ((interval==undefined)?5:interval);
obj.style.height = (H=((H=(isNaN(H=parseInt(obj.style.height))?0:H))+step<0)?0:H+step)+"px";

if (H <= 0) {
obj.style.display = "none";
obj.style.overflow = "hidden";
obj._expand = false;
obj._slide2Start = false;
} else if (to > 0 && H >= to) {
obj.style.display = "block";
obj.style.overflow = "visible";
obj.style.height = H + "px";
obj._expand = true;
obj._slide2Start = false;
} else {
setTimeout("slide2('"+Id+"' , "+interval+", "+to+");", interval);
}
}
slide2.objects = new Array();
slide2.addId = function(Id)
{
for (var i=0; i < slide2.objects.length; i++) {
if (slide2.objects[i].id == Id) return true;
}
slide2.objects[slide2.objects.length] = document.getElementById(Id);
}	



				
							
							
							

