﻿<!--

// 전체창 띄우기
function OpenFull(url) {
	window.open(url,'kiosk','fullscreen=yes,scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no')
}

// go_top
function GoTop() {
	window.scrollTo(0,0);
}

// 원래 이미지로 되돌리기 (롤오버이미지)
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 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 bluring(){
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}
document.onfocusin=bluring;

// 새창띄우기
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

// 새창띄우기

function open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';
  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}

// 팝업창에서 부모창링크

function gourl(url) { 
opener.top.location=url; 
self.close(); 
} 

//레이어 숨기기

function MM_showHideLayers() { //v6.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_jumpMenu(targ,selObj,restore){ //v3.0

//targ 타겟이 되는 프레임
//selObj 셀렉트 객체
//restore 셀렉트 후 다시 "검색엔진"로 복귀여부

if(selObj.options[selObj.selectedIndex].value != "default"){
	  if(selObj.options[selObj.selectedIndex].target == "_blank"){
			window.open(selObj.options[selObj.selectedIndex].value,"new","");
	  }else{
	 	  //여기서 새창을 못 띄워서.. 위에 코드 추가했어요.
		  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	  }
	  if (restore) selObj.selectedIndex=0;
	}
}
//faq
var menux="juldaeogosu";
function visual2(sub){

	if (menux != sub){
		show_Menu2();
		eval(sub).style.display="block";
		menux=sub;
	}
	else{
		menux="juldaegosu";
		show_Menu2();
	}
}
function show_Menu2(){
	
	for(i=1;i<30;i++) {
		if(document.getElementById("menu"+i)) {
			document.getElementById("menu"+i).style.display="none";		
		}		
		bb="document.getElementById(sub).style";
	}	
}


function GoTop() {
	window.scrollTo(0,0);
}



//새창띄우기
function openWindow2(anchor, options) {

 var args = '';

 if (typeof(options) == 'undefined') { var options = new Object(); }
 if (typeof(options.name) == 'undefined') { options.name = 'win' + Math.round(Math.random()*100000); }

 if (typeof(options.height) != 'undefined' && typeof(options.fullscreen) == 'undefined') {
  args += "height=" + options.height + ",";
 }

 if (typeof(options.width) != 'undefined' && typeof(options.fullscreen) == 'undefined') {
  args += "width=" + options.width + ",";
 }

 if (typeof(options.fullscreen) != 'undefined') {
  args += "width=" + screen.availWidth + ",";
  args += "height=" + screen.availHeight + ",";
 }

 if (typeof(options.center) == 'undefined') {
  options.x = 0;
  options.y = 0;
  args += "screenx=" + options.x + ",";
  args += "screeny=" + options.y + ",";
  args += "left=" + options.x + ",";
  args += "top=" + options.y + ",";
 }

 if (typeof(options.center) != 'undefined' && typeof(options.fullscreen) == 'undefined') {
  options.y=Math.floor((screen.availHeight-(options.height || screen.height))/2)-(screen.height-screen.availHeight);
  options.x=Math.floor((screen.availWidth-(options.width || screen.width))/2)-(screen.width-screen.availWidth);
  args += "screenx=" + options.x + ",";
  args += "screeny=" + options.y + ",";
  args += "left=" + options.x + ",";
  args += "top=" + options.y + ",";
 }

 if (typeof(options.scrollbars) != 'undefined') { args += "scrollbars=1,"; }
 if (typeof(options.menubar) != 'undefined') { args += "menubar=1,"; }
 if (typeof(options.locationbar) != 'undefined') { args += "location=1,"; }
 if (typeof(options.resizable) != 'undefined') { args += "resizable=1,"; }

 var win = window.open(anchor, options.name, args);
 return false;

}

// 개체의 TOP 위치
function getRealOffsetTop(el) {
    return el ? el.offsetTop + getRealOffsetTop(el.offsetParent) : 0;
}

// 개체의 LEFT 위치
function getRealOffsetLeft(el) {
    return el ? el.offsetLeft + getRealOffsetLeft(el.offsetParent) : 0;
}

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 ''; 
} 

function isRegNo_fgnno(fgnno) { 
        var sum=0; 
        var odd=0; 
        buf = new Array(13); 
        for(i=0; i<13; i++) { buf[i]=parseInt(fgnno.charAt(i)); } 
        odd = buf[7]*10 + buf[8]; 
        if(odd%2 != 0) { return false; } 
        if( (buf[11]!=6) && (buf[11]!=7) && (buf[11]!=8) && (buf[11]!=9) ) { 
                return false; 
        } 
        multipliers = [2,3,4,5,6,7,8,9,2,3,4,5]; 
        for(i=0, sum=0; i<12; i++) { sum += (buf[i] *= multipliers[i]); } 
        sum = 11 - (sum%11); 
        if(sum >= 10) { sum -= 10; } 
        sum += 2; 
        if(sum >= 10) { sum -= 10; } 
        if(sum != buf[12]) { return false } 
        return true; 
} 