function FlashInsert(FlashIDName, FlashVars, FlashFileName, FlashWidth, FlashHeight, DNSSetting, WMODESetting, FlashBGColor, QSetting, FlashAlign)
{
	document.write('<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	document.write('CODEBASE="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab#version=8,0,22,0" ');
	document.write(' ID="'+FlashIDName+'" WIDTH="' + FlashWidth + '" HEIGHT="' + FlashHeight + '" ALIGN="'+FlashAlign+'">');
	document.write('<PARAM NAME="movie" VALUE="'+ FlashFileName +'">');
	document.write('<PARAM NAME="quality" VALUE="'+QSetting+'">');
	document.write('<PARAM NAME="bgcolor" VALUE="'+FlashBGColor+'">');
	document.write('<PARAM NAME="wmode" VALUE="'+WMODESetting+'">');
	document.write('<PARAM NAME="FlashVars" VALUE="'+FlashVars+'">');
	document.write('<PARAM NAME="allowScriptAccess" VALUE="'+DNSSetting+'">');
	document.write('<EMBED SRC="'+ FlashFileName +'"  NAME="'+FlashIDName+'"');
	document.write(' WIDTH="' + FlashWidth + '" HEIGHT="' + FlashHeight + '" QUALITY="'+QSetting+'" BGCOLOR="'+FlashBGColor+'"');
	document.write(' ALLOWSCRIPTACCESS="'+DNSSetting+'" ALIGN="'+FlashAlign+'" WMODE="'+WMODESetting+'" TYPE="application/x-shockwave-flash" ');
	document.write(' PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" >');
	document.write('</EMBED>');
	document.write('</OBJECT>');
}
n = document.layers 
ie = document.all 
function hidesss() { 
if (ie || n) { 
if (n) document.Load.visibility = "hidden" 
else Load.style.visibility = "hidden" 
} 
} 
function main_url(pg) {
	if (pg==1)	location = "/?sub=1";
	if (pg==2)	location = "/?sub=2";
	if (pg==3)	location = "/?sub=3";
	if (pg==4)	location = "/?sub=4";
	if (pg==5)	location = "/bbs/eboard.php?id=notice";
}

var Toggle1 =1; 
function DWtop1(chk) 
{   
  Toggle1 = 0;   
  switch(chk) { 
		case 1: 
		  pf1.stop(); 
		  break; 
		case 2: 
		  pf1.stop(); 
		  break; 
  }     
} 

function DWstart1(chk)   
{   
  Toggle1 = 1;   
  switch(chk) { 
		case 1: 
		  pf1.start(); 
		  break; 
		case 2: 
		  pf1.start(); 
		  break; 
  }     
} 
function link_site(url) {
	if (url!=1){	newWindow(url);	}

}
function key_check() {
	if (event.shiftKey) { alert("Shift Å°´Â »ç¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù."); return false; }
	if (event.ctrlKey) {  alert("Ctrl Å°´Â »ç¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");  return false; }
	if (event.altKey) {  alert("Alt Å°´Â »ç¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");  return false; }
	if (event.ctrlKey && event.KeyCode == 78 ) {  alert("»õÃ¢Àº Áö¿øÇÏÁö ¾Ê½À´Ï´Ù.");  return false; }
	if (event.KeyCode == 25 ) {  alert("Ctrl Å°´Â »ç¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù."); return false; }
	if (event.KeyCode == "116" ) {  alert("F5 Å°´Â »ç¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù."); return false; }
	if (event.KeyCode == "122" ) {  alert("F11 Å°´Â »ç¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù."); return false; }
	return true;
}
function Selection_change(theForm)
{
	 apply_personal.email2.value=theForm.value;
}
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.01
  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 && d.getElementById) x=d.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 MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

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 del(url) {
	if (confirm('Á¤¸» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?'))
	{
		location = url;
	}
}

function na_restore_img_src(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 na_preload_img()
{ 
  var img_list = na_preload_img.arguments;
  if (document.preloadlist == null) 
    document.preloadlist = new Array();
  var top = document.preloadlist.length;
  for (var i=0; i < img_list.length; i++) {
    document.preloadlist[top+i]     = new Image;
    document.preloadlist[top+i].src = img_list[i+1];
  } 
}

function na_change_img_src(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 Checkbox_Radio_check_message(item,message_value) {
	var i, flag=true;
	for (i=0; i<item.length; i++) {
		if (item[i].checked == true) {
			flag = false;
		}
	}
	if (flag) {
		alert(message_value);
		item[0].focus();
		return true;
	} else {
		return false;
	}
}

function Select_check_message(item, message_value) {
	if (item.selectedIndex == 0) {
		alert(message_value);
		item.focus();
		return true; // ¼±ÅÃÀ» ÇÏÁö ¾Ê¾ÒÀ» °æ¿ì
	}

	return false; // ¼±ÅÃÀ» ÇÏ¿´À» °æ¿ì
}

// »ç¿ë¹ý
// if(Checkbox_Radio_check_message(resume.sex,"¼ºº°À» ¼±ÅÃÇÏ¼¼¿ä")){return false;} 

function win_open(url,name,width,height) {
	window.open(url,name,'left=0,top=0,width='+width+',height='+height+',scrollbars=no,toolbar=no,status=no,resizable=no');
}


// ÄíÅ°Ã¤Å©
function 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 ""; 
}


function pop_check(pophtml,popname,width,height) {
	if ( getCookie( popname ) != "done" ) { 		
		window.open( pophtml, popname, 'width='+width+',height='+height+',left=50,top=50');
	} 
}


function check_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;
}

// ÁÖ¹Î¹øÈ£ Ã¼Å©
function check_juminno(juminno) {
        if(juminno=="" || juminno==null || juminno.length!=13) {
                alert("ÁÖ¹Îµî·Ï¹øÈ£¸¦ Àû¾îÁÖ¼¼¿ä.");
                return false;
        }
        var jumin1 = juminno.substr(0,6);
        var jumin2 = juminno.substr(6,7);
        var yy           = jumin1.substr(0,2);        // ³âµµ
        var mm     = jumin1.substr(2,2);        // ¿ù
        var dd     = jumin1.substr(4,2);        // ÀÏ
        var genda  = jumin2.substr(0,1);        // ¼ºº°
        var msg, ss, cc;

        // ¼ýÀÚ°¡ ¾Æ´Ñ °ÍÀ» ÀÔ·ÂÇÑ °æ¿ì
        if (!isNumeric(jumin1)) {
                alert("ÁÖ¹Îµî·Ï¹øÈ£ ¾ÕÀÚ¸®¸¦ ¼ýÀÚ·Î ÀÔ·ÂÇÏ¼¼¿ä.");
                return false;
        }
        // ±æÀÌ°¡ 6ÀÌ ¾Æ´Ñ °æ¿ì
        if (jumin1.length != 6) {
                alert("ÁÖ¹Îµî·Ï¹øÈ£ ¾ÕÀÚ¸®¸¦ ´Ù½Ã ÀÔ·ÂÇÏ¼¼¿ä.");
                return false;
        }
        // Ã¹¹øÂ° ÀÚ·á¿¡¼­ ¿¬¿ùÀÏ(YYMMDD) Çü½Ä Áß ±âº» ±¸¼º °Ë»ç
        if (yy < "00" || yy > "99" ||
                mm < "01" || mm > "12" ||
                dd < "01" || dd > "31") {
                alert("ÁÖ¹Îµî·Ï¹øÈ£ ¾ÕÀÚ¸®¸¦ ´Ù½Ã ÀÔ·ÂÇÏ¼¼¿ä.");
                return false;
        }
        // ¼ýÀÚ°¡ ¾Æ´Ñ °ÍÀ» ÀÔ·ÂÇÑ °æ¿ì
        if (!isNumeric(jumin2)) {
                alert("ÁÖ¹Îµî·Ï¹øÈ£ µÞÀÚ¸®¸¦ ¼ýÀÚ·Î ÀÔ·ÂÇÏ¼¼¿ä.");
                return false;
        }
        // ±æÀÌ°¡ 7ÀÌ ¾Æ´Ñ °æ¿ì
        if (jumin2.length != 7) {
                alert("ÁÖ¹Îµî·Ï¹øÈ£ µÞÀÚ¸®¸¦ ´Ù½Ã ÀÔ·ÂÇÏ¼¼¿ä.");
                return false;
        }
        // ¼ºº°ºÎºÐÀÌ 1 ~ 4 °¡ ¾Æ´Ñ °æ¿ì
        if (genda < "1" || genda > "4") {
                alert("ÁÖ¹Îµî·Ï¹øÈ£ µÞÀÚ¸®¸¦ ´Ù½Ã ÀÔ·ÂÇÏ¼¼¿ä.");
                return false;
        }
        // ¿¬µµ °è»ê - 1 ¶Ç´Â 2: 1900³â´ë, 3 ¶Ç´Â 4: 2000³â´ë
        cc = (genda == "1" || genda == "2") ? "19" : "20";
        // Ã¹¹øÂ° ÀÚ·á¿¡¼­ ¿¬¿ùÀÏ(YYMMDD) Çü½Ä Áß ³¯Â¥ Çü½Ä °Ë»ç
        if (isYYYYMMDD(parseInt(cc+yy), parseInt(mm), parseInt(dd)) == false) {
                alert("ÁÖ¹Îµî·Ï¹øÈ£ ¾ÕÀÚ¸®¸¦ ´Ù½Ã ÀÔ·ÂÇÏ¼¼¿ä.");
                return false;
        }
        // Check Digit °Ë»ç
        if (!isSSN(jumin1, jumin2)) {
                alert("ÀÔ·ÂÇÑ ÁÖ¹Îµî·Ï¹øÈ£¸¦ °ËÅäÇÑ ÈÄ, ´Ù½Ã ÀÔ·ÂÇÏ¼¼¿ä.");
                return false;
        }
        return true;
}

// »ç¾÷ÀÚµî·Ï¹øÈ£ Ã¼Å©
function check_busino(vencod) {
        var sum = 0;
        var getlist =new Array(10);
        var chkvalue =new Array("1","3","7","1","3","7","1","3","5");
        for(var i=0; i<10; i++) { getlist[i] = vencod.substring(i, i+1); }
        for(var i=0; i<9; i++) { sum += getlist[i]*chkvalue[i]; }
        sum = sum + parseInt((getlist[8]*5)/10);
        sidliy = sum % 10;
        sidchk = 0;
        if(sidliy != 0) { sidchk = 10 - sidliy; }
        else { sidchk = 0; }
        if(sidchk != getlist[9]) { return false; }
        return true;
}


function isYYYYMMDD(y, m, d) {
        switch (m) {
        case 2:        // 2¿ùÀÇ °æ¿ì
                if (d > 29) return false;
                if (d == 29) {
                        // 2¿ù 29ÀÇ °æ¿ì ´çÇØ°¡ À±³âÀÎÁö¸¦ È®ÀÎ
                        if ((y % 4 != 0) || (y % 100 == 0) && (y % 400 != 0))
                                return false;
                }
                break;
        case 4:        // ÀÛÀº ´ÞÀÇ °æ¿ì
        case 6:
        case 9:
        case 11:
                if (d == 31) return false;
        }
        // Å« ´ÞÀÇ °æ¿ì
        return true;
}
function isNumeric(s) {
        for (i=0; i<s.length; i++) {
                c = s.substr(i, 1);
                if (c < "0" || c > "9") return false;
        }
        return true;
}
function isLeapYear(y) {
        if (y < 100)
        y = y + 1900;
        if ( (y % 4 == 0) && (y % 100 != 0) || (y % 400 == 0) ) {
                return true;
        } else {
                return false;
        }
}
function getNumberOfDate(yy, mm) {
        month = new Array(29,31,28,31,30,31,30,31,31,30,31,30,31);
        if (mm == 2 && isLeapYear(yy)) mm = 0;
        return month[mm];
}
function isSSN(s1, s2) {
        n = 2;
        sum = 0;
        for (i=0; i<s1.length; i++)
                sum += parseInt(s1.substr(i, 1)) * n++;
        for (i=0; i<s2.length-1; i++) {
                sum += parseInt(s2.substr(i, 1)) * n++;
                if (n == 10) n = 2;
        }
        c = 11 - sum % 11;
        if (c == 11) c = 1;
        if (c == 10) c = 0;
        if (c != parseInt(s2.substr(6, 1))) return false;
        else return true;
}

//check_fgnno('¿Ü±¹ÀÎ¹øÈ£13ÀÚ¸®');
//check_juminno('ÁÖ¹Î¹øÈ£13ÀÚ¸®');
//check_busino('»ç¾÷ÀÚ¹øÈ£10ÀÚ¸®');