<!--
/*--------------------------------------------*/
/* 	- °øÅë ÀÚ¹Ù½ºÅ©¸³Æ® ÇÔ¼ö				  */
/*--------------------------------------------*/
//Á¡¼± ¾È »ý±â°Ô ÇÏ´Â ½ºÅ©¸³Æ® ½ÃÀÛ
function allblur() {
for (i = 0; i < document.links.length; i++)
document.links[i].onfocus = document.links[i].blur;
}
document.onfocusin = allblur;

var win;
//¿ÀÇÂ À©µµ¿ì
function winOpen(f, w, h) {    
   	if(!win || win.closed){
	   	win = window.open(f,"win","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,left=500,top=300,width="+w+",height="+h);   
   	}
   	else
    {
	    win.close();
	   	win = window.open(f,"win","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,left=500,top=300,width="+w+",height="+h);   
	    win.focus();
    }
}

var popwin;
function popWin(f, w, h) { 
		if ( getCookie("openChk") != "true" ) 
		{
			popwin = window.open(f, 'popwin', "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,left=50,top=60,width="+w+",height="+h);   
			if(win)
			{
				popwin = window.open(f, 'popwin',"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,left=50,top=60,width="+w+",height="+h);   
				popwin.focus();
			}
		}
}

var popwin2;
function popWin2(f, w, h) { 
		if ( getCookie("openChk2") != "true" ) 
		{
			popwin = window.open(f, 'popwin2', "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,left=525,top=60,width="+w+",height="+h);   
			if(win)
			{
				popwin = window.open(f, 'popwin2',"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,left=525,top=60,width="+w+",height="+h);   
				popwin.focus();
			}
		}
}

var win2;
//¿ÀÇÂ À©µµ¿ì
function winOpen2(f, w, h) {    
   	if(!win2 || win2.closed){
	   	win2 = window.open(f,"win2","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width="+w+",height="+h);   
   	}
   	else
    {
	    win2.close();
	   	win2 = window.open(f,"win2","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width="+w+",height="+h);   
	    win2.focus();
    }
}


var win3;
//¿ÀÇÂ À©µµ¿ì
function winOpen3(f, w, h) {    
   	if(!win3 || win3.closed){
	   	win3 = window.open(f,"win3","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width="+w+",height="+h);   
   	}
   	else
    {
	    win3.close();
	   	win3 = window.open(f,"win3","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width="+w+",height="+h);   
	    win3.focus();
    }
}

var win4;
//¿ÀÇÂ À©µµ¿ì
function winOpen4(f, w, h, sc, rz) {
   	if(!win4 || win4.closed){
	   	win3 = window.open(f,"win4","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars="+sc+",resizable="+rz+",copyhistory=yes,width="+w+",height="+h);   
   	}
   	else
    {
	    win4.close();
	   	win4 = window.open(f,"win4","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars="+sc+",resizable="+rz+",copyhistory=yes,width="+w+",height="+h);   
	    win4.focus();
    }
}


//ÀÚ¸´¼ö Ã¼Å© ÈÄ ÀÚµ¿ ³Ñ¾î°¡±â
function nextForm(el1, el2, num)
{
	if(el1.value.length == num)
	{
		el2.focus();
	}
}

//ÁÖ¹Î¹øÈ£ Ã¼Å©-------------------------------------------------
function resnoCheck(val)
{
	//-----------------ÁÖ¹Îµî·Ï¹øÈ£ Ã¼Å© ·çÆ¾	
	IDtot = 0;
	IDAdd="234567892345";
	var resno = val;
	for(i=0;i<12;i++) {
	IDtot=IDtot+parseInt(resno.substring(i,i+1))*parseInt(IDAdd.substring(i,i+1));
	}
	IDtot=11-(IDtot%11);
	if(IDtot==10) {
	IDtot=0;
	}
	else if(IDtot==11){
	IDtot=1;
	}
	if(parseInt(resno.substring(12,13))!=IDtot)
	{
		 return false;
	}
	return true;
}
//-------------------------------------------------------------------

//¼ýÀÚ Ã¼Å©-------------------------------------------------
function numberCheck(val)
{
	var len = val.length;
	var str = "";
	var validstr = "0123456789";
	if(validstr.search(val.substring(0,1)) == -1)
	{
		return false;
	}
	return true;
}
//-------------------------------------------------------------------

//ÀÌ¸ÞÀÏ Ã¼Å©-------------------------------------------------
function emailCheck(val)
{
	var num = val.length
	var check = false
	for(i=0;i<num;i++)
	{
		if(val.substring(i,i+1)=="@")
		{
			for(j=i;j<num;j++)
			{
				if(val.substring(j,j+1)==".")
				{
					check = true
					return true;
					break
				}
			}
		}
	}
	return check;
}

function fileCheck(val)
{
	var len = val.length;

	if(len > 0)
	{
	    val = val.substring(val.lastIndexOf(".")+1,val.length);
	    if(val == "php"||val == "PHP"||val == "php3"||val == "PHP3"||val == "phtml"||val == "PHTML"||val == "html"||val == "htm"||val == "inc"||val == "INC"||val == "txt"||val == "TXT"||val == "asp"||val == "ASP")
	    {
	    	alert("Å¸ÀÔÀÌ ."+val+"ÀÎ ÆÄÀÏÀº ¾÷·ÎµåÇÒ ¼ö ¾ø½À´Ï´Ù.");
	    	return false;
	    }else
	    {
	    	return true;
	    }
	} else {
		return true;
	}
}

//ÄíÅ°¼³Á¤
function setCookie( name, value, expiredays ) {
    var todayDate = new Date();
    todayDate.setDate( todayDate.getDate() + expiredays );
    document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

// ÄíÅ°Á¤º¸ °¡Á®¿À±â
function getCookie(strName) {
	var strArg = new String(strName + "=");	
	var nArgLen, nCookieLen, nEnd;
	var i = 0, j;

	nArgLen    = strArg.length;
	nCookieLen = document.cookie.length;

	if(nCookieLen > 0) {
		while(i < nCookieLen) {
			j = i + nArgLen;
			if(document.cookie.substring(i, j) == strArg) {
				nEnd = document.cookie.indexOf (";", j);
				if(nEnd == -1) nEnd = document.cookie.length;
				return unescape(document.cookie.substring(j, nEnd));
			}
			i = document.cookie.indexOf(" ", i) + 1;
			if (i == 0) break;
		}
	}
	return("");
}	

// ¸Þ´º »õÃ¢ ¶ß±â.....
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  var url = selObj.options[selObj.selectedIndex].value;
  var kind = url.substring(0,4);
  if(kind == "http"){	//¿ø·¡´Â http°¡¾Æ´Ï±¸ openÀÌ¿´À½.
	 url = url.substring(5,70);
     var option = "left=5, top=5 , width=750, height=590, toolbar=yes,location=yes, directory=yes, status=yes, menubar=yes,scrollbars=yes, resizable=yes"
     mywin = window.open(url,'',option);
  }
  else{
  eval(targ+".location='"+url+"'");
  if (restore) selObj.selectedIndex=0;
  }
}
//-->


