
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_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_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_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 SearchHelp() {
    window.open('/include/SearchHelp.asp','SearchHelp','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=425,height=240,left=200,top=50');
}

function topscroll() {          
    window.scroll (0,0)
}     

// ÅØ½ºÆ® ¹Ú½º¿¡ ±âº»°ª ³ªÅ¸³Â´Ù ÇØÁ¦ÇÏ±â
function DefaultValueChange (target,type) {  
       if ( target.value == target.defaultValue && type==0) target.value = ''; 
       if ( !target.value && type==1) target.value = target.defaultValue; 
} 

function DefaultValueChk(sKeyword) {
	if (sKeyword=="Ä«Å×°í¸®³» °Ë»ö") {
		return '';
	} else {
		return sKeyword;
	}
}

function DefaultTotalSearchValueChk(sKeyword) {
	if (sKeyword=="ÅëÇÕ°Ë»ö") {
		return '';
	} else {
		return sKeyword;
	}
}

// ÆäÀÌÁö focus blur
function bluring(){
	if (event.srcElement!=null) {
		if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
	}
}
document.onfocusin=bluring;

//ÆË¾÷ È­¸é Áß¾Ó¿¡ ¶ç¿ì±â
function Win_pop(newwin,w,h) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
if(w=='100%') w=window.availWidth;
winprops = 'width='+w+',height='+h+',top='+wint+',left='+winl+',resizable=no,scrollbars=no,toolbars=no,status=no,menu=no';
win = window.open(newwin, null, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function wording(num){
	var obj=document.getElementById('table01');
	var trs=obj.getElementsByTagName('tr');
	for(var i=0; i<trs.length; i++){
		if(trs[i].className=="wordingOnOff"){
			trs[i].style.display='none';
		}
	}
	var onofftr=eval(document.getElementById("wording"+num));
	if(onofftr.style.display==''){
		onofftr.style.display='none';
	}else if(onofftr.style.display=='none'){
		onofftr.style.display='';
	}
}



//·¹ÀÌ¾îÆË¾÷ ¶ç¿ì±â
isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
isHot=false;

function ddInit(e){
  topDog=isIE ? "BODY" : "HTML";
  whichDog=isIE ? document.all.theLayer : document.getElementById("theLayer");
  hotDog=isIE ? event.srcElement : e.target;
  while (hotDog.id!="titleBar"&&hotDog.tagName!=topDog){
    hotDog=isIE ? hotDog.parentElement : hotDog.parentNode;
  }
  if (hotDog.id=="titleBar"){
    offsetx=isIE ? event.clientX : e.clientX;
    offsety=isIE ? event.clientY : e.clientY;
    nowX=parseInt(whichDog.style.left);
    nowY=parseInt(whichDog.style.top);
    ddEnabled=true;
    document.onmousemove=dd;
  }
}

function dd(e){
  if (!ddEnabled) return;
  whichDog.style.left=isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx;
  whichDog.style.top=isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety;
  return false;
}

function ddN4(whatDog){
  if (!isN4) return;
  N4=eval(whatDog);
  N4.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
  N4.onmousedown=function(e){
    N4.captureEvents(Event.MOUSEMOVE);
    N4x=e.x;
    N4y=e.y;
  }
  N4.onmousemove=function(e){
    if (isHot){
      N4.moveBy(e.x-N4x,e.y-N4y);
      return false;
    }
  }
  N4.onmouseup=function(){
    N4.releaseEvents(Event.MOUSEMOVE);
  }
}

function hideMe(){
  if (isIE||isNN) whichDog.style.visibility="hidden";
  else if (isN4) document.theLayer.visibility="hide";
}

function showMe(){
  if (isIE||isNN) whichDog.style.visibility="visible";
  else if (isN4) document.theLayer.visibility="show";
}

document.onmousedown=ddInit;
document.onmouseup=Function("ddEnabled=false");


function notice_setCookie( name, value, expiredays )
{
        var todayDate = new Date();
        todayDate.setDate( todayDate.getDate() + expiredays );
        document.cookie = name + '=' + escape( value ) + '; path=/; expires=' + todayDate.toGMTString() + ';'
        return;
}
function notice_getCookie( name )
{
  var nameOfCookie = name + "=";
  var x = 0;
  while ( x <= document.cookie.length )
  {
   var y = (x+nameOfCookie.length);
   if ( document.cookie.substring( x, y ) == nameOfCookie ) {
    if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
      endOfCookie = document.cookie.length;
    return unescape( document.cookie.substring( y, endOfCookie ) );
   }
   x = document.cookie.indexOf( " ", x ) + 1;
   if ( x == 0 ) break;
  }
  return "";
}






//**   flash **//
function getFlash(id,url){
	var flashOut='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="100%" height="200px" id='+id+'>';
	flashOut+='<param name="movie" value='+url+' />';
	flashOut+='<param name="wmode" value="transparent" />';
	flashOut+='<param name="bgcolor" value="#ffffff" />';
	flashOut+='<param name="allowScriptAccess" value="sameDomain" />';
	flashOut+='<param name="quality" value="high" />';
	flashOut+='<param name="base" value="." />';
	flashOut+='<embed base="." src='+url+' width="100%" height="200px" name='+id+' wmode="transparent" bgcolor="#ffffff" swLiveConnect="true" allowScriptAccess="sameDomain" quality="high" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	flashOut+='</embed>';
	flashOut+='</object>';

	document.write(flashOut);
}

//**   flash1 **//
function getFlash01(id,url,w,h,t,bg){
	if(!t) var t='transparent'; if(!bg) var bg='none';
	var flashOut='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width='+w+' height='+h+' id='+id+'>';
	flashOut+='<param name="movie" value='+url+' /><param name="wmode" value='+t+' /><param name="base" value="." /><param name="bgcolor" value='+bg+' />';
	flashOut+='<param name="allowScriptAccess" value="sameDomain" /><param name="quality" value="high" /><param name="menu" value="false" />';
	flashOut+='<embed base="." src='+url+' width='+w+' height='+h+' name='+id+' wmode='+t+' bgcolor='+bg+' swLiveConnect="true" allowScriptAccess="sameDomain" quality="high" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	flashOut+='</object>';
	document.write(flashOut);
}


function getFlash02(id,url,w,h,initImg,t,bg){
	if(!t) var t='transparent'; if(!bg) var bg='none';
	var flashOut='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width='+w+' height='+h+' id='+id+'>';
	flashOut+='<param name="movie" value='+url+' /><param name="wmode" value='+t+' /><param name="base" value="." /><param name="bgcolor" value='+bg+' />';
	flashOut+='<param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="sameDomain" /><param name="quality" value="high" /><param name="menu" value="false" />';
	flashOut+='<param name="flashVars" value="initImg='+initImg+'" />';
	//flashOut+='<embed base="." src='+url+' flashVars="initImg='+initImg+'"  allowFullScreen="true"  width='+w+' height='+h+' name='+id+' wmode='+t+' bgcolor='+bg+' swLiveConnect="true" allowScriptAccess="sameDomain"  quality="high" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	// wmode='+t+' ÀÌ°Ô ÀÖÀ¸¸é Ç®½ºÅ©¸°ÀÌ Àû¿ëµÇÁö ¾Ê¾Æ Á¦°Å 
	flashOut+='<embed base="." src='+url+' flashVars="initImg='+initImg+'"  allowFullScreen="true"  width='+w+' height='+h+' name='+id+' bgcolor='+bg+' swLiveConnect="true" allowScriptAccess="sameDomain"  quality="high" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';

	flashOut+='</object>';
	document.write(flashOut);
}



//**   tab menu **//
function tabchange(img,divid,usetitle){
	var tabarea=img.parentNode;
	var imgs=tabarea.getElementsByTagName('img');
	var setimgsrc,setimgcheck,imgtype,newname,obj;

	var iset=(!usetitle)?1:0;

	//off image set
	for(var i=iset; i<imgs.length; i++){
		imgs[i].style.cursor='pointer';
		setimgsrc=imgs[i].src.split("/");
		setimgcheck=setimgsrc[setimgsrc.length-1].split(".gif");
		imgcheck=setimgcheck[0];
		if(!usetitle){
			obj=eval(document.getElementById(divid+i));
		}else{
			obj=eval(document.getElementById(divid+(i+1)));
		}
		if(img==imgs[i]){
			if(imgcheck.indexOf('on')==-1){
				img.src=img.src.replace(imgcheck,imgcheck+'on');
			}
			if(obj) obj.style.display='block';
		}else{
			if(imgcheck.indexOf('on')!=-1){
				newname=imgcheck.replace('on','');
				imgs[i].src=imgs[i].src.replace(newname+'on',newname);
			}
			if(obj) obj.style.display='none';
		}
	}

}

//**   img change **//
function imgchange(imgobj){
 if(imgobj.src.indexOf('on.gif')==-1){
  imgobj.src=imgobj.src.replace('.gif','on.gif');
  imgobj.onmouseout=function(){if(this.src.indexOf('on.gif')!=-1) this.src=this.src.replace('on.gif','.gif');}
 }
}

// ** popup ** //
function popup(url,w,h,scroll,resize){
 if(scroll) w=w+17;
 if(!scroll) scroll='no'; if(!resize) resize='no';
 var winl=(screen.width-w)/2; var wint=(screen.height-h)/2;
 var winnameset=url.split('/'); var winname=winnameset[winnameset.length-1].split('.')[0];
 window.open(url,winname,'width='+w+',height='+h+',top='+wint+',left='+winl+',resizable='+resize+',scrollbars='+scroll+',toolbars=no,status=yes,menu=no');
}


// ** popupetc ** //
function popupetc(url,w,h,scroll){
	var winl=(screen.width-w)/2;
	var wint=(screen.height-h)/2;
	if(w=='100%') w=window.availWidth;
	if(!scroll) scroll='no';
	window.open(url,null,'width='+w+',height='+h+',top='+wint+',left='+winl+',resizable=yes,scrollbars='+scroll+',toolbars=no,status=yes,menu=no');
}


//** ·Ñ¸µ **//
function rolling(moveobj,childtag,direction,defaultdirection,movesize,howmanyshow,maxcontents,speed,replaytime){


	var obj=document.getElementById(moveobj);
	var items,finalp,setmg,tempobj;
	clearTimeout(obj.replayaction);
	clearTimeout(obj.moveaction);

	var getmargin=function(){		
		if(direction=='up' || direction=='down') return parseInt(obj.style.marginTop);
		if(direction=='left' || direction=='right') return parseInt(obj.style.marginLeft);
	}

	var setmargin=function(value){
		if(direction=='up' || direction=='down') obj.style.marginTop=value+'px';
		if(direction=='left' || direction=='right') obj.style.marginLeft=value+'px';
	}

	var objp=getmargin();
	var maxp=-(movesize*(maxcontents-howmanyshow));
	
	var getnextposition=function(){
		var tmp;
		for(var i=-(maxcontents); i<=maxcontents; i++){
			tmp=i*movesize;
			if(direction=='left' || direction=='up'){
				if(tmp>objp) break;
			}else	if(direction=='right' || direction=='down'){
				if(tmp>objp){
					tmp=(i*movesize)-(movesize*2);
					break;
				}
			}
		}
		return tmp;
	}
	finalp=getnextposition();

	var appendfirst=function(){
		items=obj.getElementsByTagName(childtag);
		tempobj=items[items.length-1].cloneNode(true);
		obj.removeChild(items[items.length-1]);
		obj.insertBefore(tempobj,obj.firstChild);
		setmargin(objp-movesize);
		finalp=0;
	}

	var appendlast=function(){
		items=obj.getElementsByTagName(childtag);
		tempobj=items[0].cloneNode(true);
		obj.removeChild(items[0]);
		obj.appendChild(tempobj);
		setmargin(objp+movesize);
		finalp=maxp;
	}

	if(direction=='left' || direction=='up'){
		if(finalp>0) appendfirst();
	}else	if(direction=='right' || direction=='down'){
		if(finalp<maxp) appendlast();
	}

	var moveanimation=function(){		
		clearTimeout(obj.moveaction);
		objp=getmargin();
		if(objp>finalp){
			setmg=objp-Math.ceil((objp-finalp)/speed);setmargin(setmg);
			obj.moveaction=setTimeout(moveanimation,10);
		}else	if(objp<finalp){
			setmg=objp+Math.ceil((finalp-objp)/speed);setmargin(setmg);
			obj.moveaction=setTimeout(moveanimation,10);
		}else	if(objp==finalp){
			setmg=finalp;setmargin(setmg);
			clearTimeout(obj.moveaction);
			if(replaytime) obj.replayaction=setTimeout(replay,replaytime);
		}
	}
	moveanimation();

	var replay=function(){
		clearTimeout(obj.replayaction);
		clearTimeout(obj.moveaction);
		move(moveobj,childtag,defaultdirection,defaultdirection,movesize,howmanyshow,maxcontents,speed,replaytime);
	}
}
/*

move(moveobj,childtag,direction,defaultdirection,movesize,howmanyshow,maxcontents,speed,replaytime);

moveobj=ÀÌµ¿ÇÒ¿¤¸®¸ÕÆ®¾ÆÀÌµð
childtag=¿¤¸®¸ÕÆ®¾ÈÀÇ °¢°¢ÀÇ ÄÁÅÙÃ÷¸¦ ´ã°íÀÖ´Â ÃÖ»óÀ§ ¿¤¸®¸ÕÆ®ÀÇ ÅÂ±×¸í
direction=¹æÇâ(up,down,left,right)
defaultdirection=ÀÚµ¿À¸·Î ÀÌµ¿ÇÒ ¹æÇâ(up,down,left,right)
movesize=ÀÌµ¿ÇÒÅ©±â(px)
howmanyshow=ÇØ´çÀ§Ä¡¿¡ µð½ºÇÃ·¹ÀÌµÇ´Â °¹¼ö
maxcontents=ÃÑ ¸®½ºÆ®ÀÇ °¹¼ö
speed=¼Óµµ(1~100) 1ÀÏ°æ¿ì ¾Ö´Ï¸ÅÀÌ¼Ç ¾øÀ½ ³ôÀ»¼ö·Ï ´À¸² 
replaytime=ÀÚµ¿À¸·Î ¹Ýº¹µÇ´Â ¼Óµµ(¾øÀ¸¸é ÀÚµ¿ ¹Ýº¹ ¾ÈµÊ).

¸ÞÀÎÀÇ ÇØ´ç ¹öÆ°¿¡µµ ÇÔ¼ö¸¦ Àû¿ëÇØ¾ßÇÔ.

*/	

/* footer */






function footer(){

	var foothtml='';
	foothtml+='<div class="footer">';
	foothtml+='<div class="l">';
	foothtml+='<img src="/images/common/fm_sub.gif" usemap="#menu">';
    foothtml+='<map name="menu">';
	foothtml+='<area shape="rect" href="/company/intro.asp" coords="261,26,312,50" alt="È¸»ç¼Ò°³">';
	foothtml+='<area shape="rect" href="javascript:popup03()" coords="311,26,365,50" alt="ÀÌ¿ë¾à°ü">';
	foothtml+='<area shape="rect" href="javascript:popup02()" coords="364,26,452,50" alt="°³ÀÎÁ¤º¸º¸È£¹æÄ§">';
	foothtml+='<area shape="rect" href="javascript:popup01()" coords="451,26,550,50" alt="ÀÌ¸ÞÀÏ¹«´Ü¼öÁý°ÅºÎ">';
	foothtml+='<area shape="rect" href="/company/map.asp" coords="549,26,617,50" alt="Ã£¾Æ¿À½Ã´Â±æ">';
	
	foothtml+='</map>';
	foothtml+='<br>';    
	foothtml+='</div>';
	

	document.write(foothtml);
}


function popup01() {
runpeter=open("/etc/pop_email.html","new1","toolbar=no,menubar=no,location=no,directories=no,scrollbars=no,status=no,width=350,height=250");
  }
  function popup02() {
runpeter=open("/etc/pop_privacy.html","new1","toolbar=no,menubar=no,location=no,directories=no,scrollbars=no,status=no,width=650,height=500");
  }
    function popup03() {
runpeter=open("/etc/pop_rule.html","new1","toolbar=no,menubar=no,location=no,directories=no,scrollbars=no,status=no,width=650,height=500");
  }



function footer_main(){

	var foothtml='';
	foothtml+='<div class="footer_main">';
	foothtml+='<div class="l">';
	foothtml+='<img src="../images/common/fm_main.gif" usemap="#menu" >';
    foothtml+='<map name="menu">';
	foothtml+='<area shape="rect" href="/company/intro.asp" coords="48,11,99,35" alt="È¸»ç¼Ò°³">';
	foothtml+='<area shape="rect" href="javascript:popup03()" coords="98,11,153,35" alt="ÀÌ¿ë¾à°ü">';
	foothtml+='<area shape="rect" href="javascript:popup02()" coords="152,11,236,35" alt="°³ÀÎÁ¤º¸º¸È£¹æÄ§">';
	foothtml+='<area shape="rect" href="javascript:popup01()" coords="235,11,334,35" alt="ÀÌ¸ÞÀÏ¹«´Ü¼öÁý°ÅºÎ">';
	foothtml+='<area shape="rect" href="/company/map.asp" coords="333,11,404,35" alt="Ã£¾Æ¿À½Ã´Â±æ">';
	
	foothtml+='</map>';
	foothtml+='<br>';    
	foothtml+='</div>';
	
	
	

	document.write(foothtml);
}




function setPng24(obj) {
 obj.width=obj.height=1;
 obj.className=obj.className.replace(/\bpng24\b/i,""); 
 obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\""+ obj.src +"\",sizingMethod=\"image\");"
 obj.src="";
 return "";
}


/** list **/
	function mover(obj){
			obj.className='over';
			obj.onmouseout=function(){
				this.className='';
			}
		}

/** faq **/
function view(click){
	var obj=click.parentNode;
	var dts=obj.getElementsByTagName('dt');
	var dds=obj.getElementsByTagName('dd');
	for(i=0;i<dts.length;i++){
		if(click==dts[i]){
			dts[i].className='over';
			dts[i].onmouseover=null;
			dts[i].onmouseout=null;
			dds[i].style.display=(dds[i].style.display=='none')? '' : 'none';
		}else{
			dts[i].className='';
			dts[i].onmouseover=function(){
				mover(this);
			}
			dds[i].style.display='none';
		}
	}
}