<!--
var hpccount;
var hpccount = 1;
////// IMAGE_ROLLOVER //////
function menuOn(imgEl)
{
	imgEl.src = imgEl.src.replace(".gif", "_on.gif");
}

function menuOut(imgEl)
{
	imgEl.src = imgEl.src.replace("_on.gif", ".gif");
}
function menuOnjpg(imgEl)
{
	imgEl.src = imgEl.src.replace(".jpg", "_on.jpg");
}

function menuOut(imgEl)
{
	imgEl.src = imgEl.src.replace("_on.gif", ".gif");
}
function menuOutjpg(imgEl)
{
	imgEl.src = imgEl.src.replace("_on.jpg", ".jpg");
}
// CONTENT TAB MENU
function mOver()
{
	this.src = this.src.replace(".gif", "_on.gif");
}
function mOut()
{
	this.src = this.src.replace("_on.gif", ".gif");
}

function initTabMenu(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;
}

// 페이지 focus blur
function bluring(){ 
	if (event.srcElement!=null) {
		if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
	}	
} 
document.onfocusin=bluring; 

//OPENER url 바꾸기
function opener_url(url)
{
	opener.location=url;
}

//팝업 화면 중앙에 띄우기
function Win_pop(newwin,w,h) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'width='+w+',height='+h+',top='+wint+',left='+winl+',resizable=no,scrollbars=no,toolbars=no,status=no,menu=no';
win = window.open(newwin, "new1", winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

//팝업 화면 중앙에 띄우기
function Win_pop3(newwin,w,h) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'width='+w+',height='+h+',top='+wint+',left='+winl+',resizable=no,scrollbars=no,toolbars=no,status=no,menu=no';
win = window.open(newwin, "style", winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}	 

function Win_pop2(newwin,w,h) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'width='+w+',height='+h+',top='+wint+',left='+winl+',resizable=no,scrollbars=yes,toolbars=no,status=no,menu=no';
win = window.open(newwin, "new2", winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

//tab
function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}


function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function goMenu(Val,Sel)
{
	Sel.value = '';
	if (Val) location=Val;
	
}
 
 //이미지팝업
function view(what) { 
var imgwin = window.open("",'WIN','scrollbars=no,status=no,toolbar=no,resizable=0,location=no,menu=no,width=10,height=10'); 
imgwin.focus(); 
imgwin.document.open(); 
imgwin.document.write("<html>\n"); 
imgwin.document.write("<head>\n"); 
imgwin.document.write("<title>Image Zoom Up</title>\n"); 

imgwin.document.write("<sc"+"ript>\n"); 
imgwin.document.write("function resize() {\n"); 


imgwin.document.write(" var PopImageName = new Image();\n"); 
imgwin.document.write(" PopImageName.src = document.il.src;\n"); 
imgwin.document.write(" var imgwidth =  PopImageName.width; \n"); 
imgwin.document.write(" var imgheight = PopImageName.height; \n"); 
imgwin.document.write(" if(window.navigator.userAgent.indexOf('MSIE 7') != -1){\n"); 
//imgwin.document.write(" alert('ie7');"); 
imgwin.document.write(" window.resizeTo(imgwidth+15,imgheight+88);\n"); 
imgwin.document.write(" }else if(navigator.appName == 'Netscape'){\n"); 
//imgwin.document.write(" alert('net');"); 
imgwin.document.write(" window.resizeTo(imgwidth+9,imgheight+58);\n"); 
imgwin.document.write(" }else {\n"); 
//imgwin.document.write(" alert('ie6');"); 
imgwin.document.write(" window.resizeTo(imgwidth+13,imgheight+60);\n"); 
imgwin.document.write(" }\n"); 
imgwin.document.write(" }\n");

/*

imgwin.document.write("pic = document.il;\n"); 
//imgwin.document.write("alert(eval(pic).width);\n"); 

imgwin.document.write(" var imgw = eval(pic).width; ");
imgwin.document.write("  if (eval(pic).width > 800){ eval(pic).width = 800\n "); //800px보다크면 800으로
imgwin.document.write(" } else if(eval(pic).width < 800){ eval(pic).width = eval(pic).width\n} "); //800px보다작으면 원래크기로

imgwin.document.write(" if (eval(pic).height) { var name = navigator.appName\n"); 
imgwin.document.write("  if (name == 'Microsoft Internet Explorer') { myHeight = eval(pic).height + 40; myWidth = eval(pic).width + 10;\n"); 
imgwin.document.write("  } else { myHeight = eval(pic).height + 9; myWidth = eval(pic).width; }\n"); 
imgwin.document.write("  clearTimeout();\n"); 
imgwin.document.write("  var height = screen.height;\n"); 
imgwin.document.write("  var width = screen.width;\n"); 
imgwin.document.write("  var leftpos = width / 2 - myWidth / 2;\n"); 
imgwin.document.write("  var toppos = height / 2 - myHeight / 2; \n"); 
imgwin.document.write("  self.moveTo(leftpos, toppos);\n");
imgwin.document.write("  if (myWidth > width) { myWidth = width; }\n");
imgwin.document.write("  self.resizeTo(myWidth, myHeight-12);\n"); 
imgwin.document.write("}else setTimeOut(resize(), 100);}\n"); 
*/
imgwin.document.write("</sc"+"ript>\n"); 

imgwin.document.write("</head>\n"); 
imgwin.document.write('<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" bgcolor="#FFFFFF">\n'); 

imgwin.document.write("<img border=0 src=\""+escape(what)+"\" name=il onload='resize();'  align='center' valign='middle' style='cursor:hand' onclick='window.close();'>\n"); 
imgwin.document.write("</body>\n");
imgwin.document.close(); 
}

//toggle 함수
function toggle(e) {
  if (e.style.display == "none") {
     e.style.display = "";
  } else {
     e.style.display = "none";
  }
}

 //media player
 var nVolLeftPosition = 0;							// 볼륨 바 배경 시작점
		var nVolStartPosition = 0;							// 볼륨 바 시작 점
		var nVolEndPosition = 40;							// 볼륨 바 끝 점
		var nVolume = 30;									// 볼륨 초기 값
		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) 
    { 
      // 접근보안일때 아무런 일도 하지 않는다. 
    } 

 }
 //ceo1 ceo1
 
 
  function show_ceo()
  {
    document.all['CEO2'].style.display='';        
  }
  function hide_ceo()
  {
    document.all['CEO2'].style.display='none';    
  }
  
  function show_press()
  {
    document.all['CEO1'].style.display='';
  }
  function hide_press()
  {   
    document.all['CEO1'].style.display='none';
  }
  function all_hide()
  {
    document.all['CEO1'].style.display='none';
    document.all['CEO2'].style.display='none';
    msg = "true";    
    return msg;
  }
  
  function log_post(code)
  {	
    document.all['logiframe'].src = '/common/util/f_eng_log_post.asp?code='+code;
  }

  function swapmap(url){
    document.getElementById('mapimg').src=url;
  }
  
  function blank_check(s){
  var tmp_str = s;
  var str = '';
  var flag = false;

	if(!tmp_str) tmp_str = '';

  for(var i=0; i<tmp_str.length; i++){
    if(flag == false){
      if(tmp_str.charAt(i) == ' '){
        flag = false;
      } else {
        str = str.concat(tmp_str.charAt(i));
        flag = true;
      }
    } else {
      str = str.concat(tmp_str.charAt(i));
      flag = true;
    }
  }

  return str; // 단어 앞의 공백을 제외한 문자열 반환
}

function CheckEmail(strEmail){
  var regDoNot = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/;
  var regMust = /^[a-zA-Z0-9\-\.\_]+\@[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3})$/;
  if ( !regDoNot.test(strEmail) && regMust.test(strEmail) )
    return true;
  else
    return 0;
}

var i=0 
aa=null;
bb=null;

function scrollup(){ 
  clearTimeout(aa)
  clearTimeout(bb)
  if (0 < i) { 
    i=parseInt(document.body.scrollTop);
    document.body.scrollTop=i-3;
    aa = setTimeout ("scrollup()",1) 
  }else{
    clearTimeout(aa)  
  }  
} 

function scrolldown(){
  clearTimeout(aa)  
  clearTimeout(bb)  
  if (56>i) {  
    i=parseInt(document.body.scrollTop) ; 
    document.body.scrollTop=i+3 ;     
    bb = setTimeout ("scrolldown()",1) 
  }else{
    clearTimeout(bb)  
  } 
}





// 플래시 패치
function  viewMediaPlayer(sURL, sName, sFeatures){ 

 //미디어 플레이어 오브젝트를 뿌려줍니다. 
 //미디어 플레이어 버전은 7~10 버전에 호환되는 오브젝트ID를 사용합니다. 
 var WMPCID = "CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"; 

 var sFeature; 
 var sWidth  = "100%"; 
 var sHeight  = "100%"; 
 var pmBoolean = "false"; 
 var sTempArray; 
 var sParamTag; 

 sFeature = sFeatures.split(/\s*,\s*/); 
 for (var i=0; i< sFeature.length ; i++) 
 { 
  sTempArray = sFeature[i].split(/\s*=\s*/); 
  if (sTempArray[0].toLowerCase() == "width"){ 
  //넓이 
  sWidth = sTempArray[1]; 
  }else if (sTempArray[0].toLowerCase() == "height"){ 
  //높이 
  sHeight = sTempArray[1]; 
  }else{ 
  //기타 파라메터 처리 
  if (sTempArray[1].toLowerCase() == "yes" || sTempArray[1] == "1" || sTempArray[1].toLowerCase() == "true") 
  { 
    pmBoolean = "true" 
  } 
  sParamTag = "<PARAM NAME='"+sTempArray[0]+"'VALUE='" + pmBoolean + "'>\n"+sParamTag; 
  } 
 } 

 document.write("<OBJECT ID='"+sName+"' NAME='"+sName+"' CLASSID='"+WMPCID+"' WIDTH='"+sWidth+"' HEIGHT='"+sHeight+"' >"); 
 document.write("<PARAM NAME='URL'VALUE='" + sURL + "'>"); 
 document.write(sParamTag); 
 document.write("</OBJECT>"); 
} 

function  viewFlash(sURL, sName, sFeatures, wMode){ 

 //플래시 ActiveX 오브젝트를 뿌려줍니다. 
 var FLASHCAB = "http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"; 
 var FLASHCID = "CLSID:D27CDB6E-AE6D-11CF-96B8-444553540000"; 
 var FLASHVER = "8,0,0,0"; 

 var sFeature; 
 var sWidth  = "100%"; 
 var sHeight  = "100%"; 
 var pmBoolean = "false"; 
 var sTempArray; 
 var sParamTag; 

 sFeature = sFeatures.split(/\s*,\s*/); 
 for (var i=0; i< sFeature.length ; i++) 
 { 
  sTempArray = sFeature[i].split(/\s*=\s*/); 
  if (sTempArray[0].toLowerCase() == "width"){ 
  //넓이 
  sWidth = sTempArray[1]; 
  }else if (sTempArray[0].toLowerCase() == "height"){ 
  //높이 
  sHeight = sTempArray[1]; 
  }else{ 
  //기타 파라메터 처리 
  if (sTempArray[1].toLowerCase() == "yes" || sTempArray[1] == "1" || sTempArray[1].toLowerCase() == "true") 
  { 
    pmBoolean = "true" 
  } 
  sParamTag = "<PARAM NAME='"+sTempArray[0]+"'VALUE='" + pmBoolean + "'>\n"+sParamTag; 
  } 
 } 

 document.write("<OBJECT ID='"+sName+"' NAME='"+sName+"' CLASSID='"+FLASHCID+"' CODEBASE='"+FLASHCAB+"#version="+FLASHVER+"' WIDTH='"+sWidth+"' HEIGHT='"+sHeight+"'>"); 
 document.write("<PARAM NAME='movie' VALUE='" + sURL + "'>"); 
 document.write(sParamTag); 
 document.write("<EMBED SRC='"+sURL+"' WMODE='"+wMode+"' MENU='false' WIDTH='"+sWidth+"' HEIGHT='"+sHeight+"' ID='"+sName+"' NAME='"+sName+"' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer' />") 
 document.write("</OBJECT>"); 
}  
  //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 playFlash(objID, objSource, objWidth, objHeight, objStyle, cabVersion, embedAttr)
  {
  	document.write('<OBJECT id="' + objID + '" name="' + objID + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ');
  
  	if (cabVersion != '') {
  		document.write('codebase="' + self.window.document.protocol + '"://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + cabVersion + '" ');
  	}
  	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('<embed src="' + objSource + '" width="' + objWidth + '" height="' + objHeight + '" ' + embedAttr + '>');
  	document.write('</OBJECT>');
  }
  
  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>');
  }  
//-->

/* 탭 */

function TD_ch(num) {
    var TD_block = "Tab"+num;
    var TDname1 = "TD"+num;


    for(i=1;i<4;i++){
        var TD_num = "Tab"+i;     
 var TDname2 = "TD"+i;    
        document.getElementById(TD_num).style.display="none";    
    }
    document.getElementById(TD_block).style.display="block";
}

