<!--
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_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_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];}
}

//keyCode °¡ 13 ÀÏ °æ¿ì tab.
function Enter_Tab(Focus_Name) {
  if (event.keyCode == 13) {    
	eval("document.all." + Focus_Name + ".focus()");
  }
}

//keyCode °¡ 13 ÀÏ °æ¿ì¸¸ submit
function Enter_Submit(Submit_Name) {
	if(event.keyCode == 13) {
		if(Submit_Name != "") {
			eval(Submit_Name + "()");
		}
	}
}

//¼ýÀÚ¿©ºÎÃ¼Å©
function IsNumeric(sValue){
	// isNaN(sValue)´Â sValue°¡ ¼ýÀÚÀÌ¸é false ¾Æ´Ï¸é true¸¦ ¸®ÅÏÇÑ´Ù.
	// NaN = non a number
	return !(isNaN(sValue));
}

//ÄÚµå·Î ÀÌ¸§ °¡Á®¿À±â
function KeyCode_Check(Form_Name,Object_name,Method_Type,File_Url,Object_Code_Name,Object_Code,Object_To_Name,Focus,ale) {	
	if(eval("document." + Form_Name + "." + Object_Code_Name + ".value") == "") {
		if(ale == 1) {
			//init ÈÄ¿¡ focus¸¦ ÇÒ°æ¿ì.
			if(Focus != "false") {
				eval("document." + Form_Name + "." + Focus + ".focus();");
			}
		} else {
			alert(Object_name + "(À»)¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
			eval("document." + Form_Name + "." + Object_Code_Name + ".focus();");
		}
		return;
	} else {
		Search_Object(Form_Name,Object_name,Method_Type,File_Url,Object_Code_Name,Object_Code,Object_To_Name,Focus);
	}
}

function Search_Object(Form_Name,Object_name,Method_Type,File_Url,Object_Code_Name,Object_Code,Object_To_Name,Focus) {
	//Method°¡ postÀÏ¶§¿Í getÀÏ°æ¿ì ±¸ºÐ.
	if(Method_Type == "post") {
		var datatosend = Object_Code_Name + "=" + Object_Code;
		var xmlhttp = new ActiveXObject("msxml2.XMLHTTP");
		xmlhttp.Open(Method_Type,File_Url,false);
		xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		xmlhttp.send(datatosend);
		mRequestCont = xmlhttp.responseText;
	} else if(Method_Type == "get") {
		var datatosend = Object_Code_Name + "=" + Object_Code;
		var xmlhttp = new ActiveXObject("msxml2.XMLHTTP");
		xmlhttp.Open(Method_Type,File_Url + "?" + Object_Code_Name + "=" + Object_Code,false);
		xmlhttp.send();
		mRequestCont = xmlhttp.responseText;
	}
	
	if(mRequestCont == "") {
		alert("Á¸ÀçÇÏÁö ¾Ê´Â " + Object_name + " ÀÔ´Ï´Ù.");
		eval("document." + Form_Name + "." + Object_Code_Name + ".value = ''");
		eval("document." + Form_Name + "." + Object_To_Name + ".value = ''");
		return;
	}

	if(Object_Code_Name == "ID") {
		if(mRequestCont == "1") {
			alert("»ç¿ëÇÒ ¼ö ¾ø´Â " + Object_name + " ÀÔ´Ï´Ù.");
			eval("document." + Form_Name + "." + Object_Code_Name + ".value = ''");
			eval("document." + Form_Name + "." + Object_Code_Name + ".focus();");
			Check_ID_YN = false;
		} else {
			alert("»ç¿ëÇÒ ¼ö ÀÖ´Â " + Object_name + " ÀÔ´Ï´Ù.");
			//init ÈÄ¿¡ focus¸¦ ÇÒ°æ¿ì.
			if(Focus != "false") {
				eval("document." + Form_Name + "." + Focus + ".focus();");
			}
			Check_ID_YN = true;
		}
	} else {
		if(Object_To_Name != "") {
			eval("document." + Form_Name + "." + Object_To_Name + ".value= '" + mRequestCont + "'");
		}

		//init ÈÄ¿¡ focus¸¦ ÇÒ°æ¿ì.
		if(Focus != "false") {
			eval("document." + Form_Name + "." + Focus + ".focus();");
		}
	}	
}

function KeyUp_Focus(Focus_Name) {
	if(event.keyCode==40 || event.keyCode==38) {
		eval("document.all." + Focus_Name + ".focus()");
	}
}

//Input ³»¿ë ¾ø¾Ö´Â ÇÔ¼ö.
function Input_Del(Form_Name, Input_01, Input_02) {
	eval("document." + Form_Name + "." + Input_01 + ".value = ''");
	
	if(Input_02 != "") {
		eval("document." + Form_Name + "." + Input_02 + ".value = ''");
	}
}

//¾Ë¹ÙÆêÀÎÁö Çü½Ä Check
function CheckChar(Form_Name, Field_Name) {
	strarr = new Array(eval("document." + Form_Name + "." + Field_Name + ".value.length"));
	/*
	if((name.value.charAt(0) < "a" || name.value.charAt(0) > "z") && (name.value.charAt(0) < "A" || name.value.charAt(0) > "Z")) {
		return true;
	}
	*/

	if(eval("(document." + Form_Name + "." + Field_Name + ".value.charAt(0) < 'a' || document." + Form_Name + "." + Field_Name + ".value.charAt(0) > 'z') && (document." + Form_Name + "." + Field_Name + ".value.charAt(0) < 'A' || document." + Form_Name + "." + Field_Name + ".value.charAt(0) > 'Z')")) {
		return true;
	}
	
	for(i = 0; i < eval("document." + Form_Name + "." + Field_Name + ".value.length"); i++) {
		strarr[i] = eval("document." + Form_Name + "." + Field_Name + ".value.charAt(i)");
		if((strarr[i] >= 0) && (strarr[i] <= 9))
			continue;
		else if((strarr[i] >= "a") && (strarr[i] <= "z"))
			continue;
		else if((strarr[i] >= "A") && (strarr[i] <= "Z"))
			continue;
		else {
			return true;
		}
	}  
	
	return false;
}

//Email Çü½Ä check
function Email_chk(Form_Name, Field_Name) {
	var t = eval("document." + Form_Name + "." + Field_Name + ".value");
	var ValidFlag = false;
	var atCount = 0;
	var SpecialFlag;
	var atLoop;
	var atChr;
	var BadFlag;
	var tAry1;
	var UserName;
	var DomainName;
	
	if(t.length > 0 && t.indexOf("@") > 0 && t.indexOf(".") > 0) {
		atCount = 0;
		SpecialFlag = false;
		
		for(atLoop=1; atLoop<=t.length; atLoop++) {
			atChr = t.substring(atLoop, atLoop+1);
			
			if(atChr == "@") atCount = atCount + 1;
			if((atChr >= 32) && (atChr <= 44)) SpecialFlag = true;
			if((atChr == 47) || (atChr == 96) || (atChr >= 123)) SpecialFlag = true;
			if((atChr >= 58) && (atChr <= 63)) SpecialFlag = true;
			if((atChr >= 91) && (atChr <= 94)) SpecialFlag = true;
		}
		
		if((atCount == 1) && (SpecialFlag == false)) {
			BadFlag = false;
			tAry1 = t.split("@");
			UserName = tAry1[0];
			DomainName = tAry1[1];
			
			if((UserName.length <= 0) || (DomainName.length <= 0 )) BadFlag = true;
			if(DomainName.substring(1, 2 ) == ".") BadFlag = true;
			if(DomainName.substring(DomainName.length-1, DomainName.length) == ".") BadFlag = true;
			
			ValidFlag = true;
		}
	}
	
	if(BadFlag == true) ValidFlag = false;
	
	return ValidFlag;
}

//ÁÖ¹Îµî·Ï¹øÈ£ Çü½Ä Check
function IDNum_chk(Form_Name, Field_01_Name, Field_02_Name) {
	f = eval("document." + Form_Name);
	
	var numbers = eval("f." + Field_01_Name + ".value + f." + Field_02_Name + ".value");
	
	 if(numbers == ""){
		alert("ÁÖ¹Îµî·Ï¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä.");
		eval("f." + Field_01_Name + ".focus()");
		return false;
	}

	 for(i=0;i<numbers.length;i++) {
        c = numbers.charAt(i);   
        if((c < '0' || c > '9')){
           alert("ÁÖ¹Îµî·Ï¹øÈ£´Â ¼ýÀÚÀÔ´Ï´Ù.");
           eval("f." + Field_01_Name + ".value=''");
		   eval("f." + Field_02_Name + ".value=''");
		   eval("f." + Field_01_Name + ".focus()");
           return false;        
        }
    }

	var sum=0;
	for(i=0;i<8;i++) { sum+=numbers.substring(i,i+1)*(i+2); }
	for(i=8;i<12;i++) { sum+=numbers.substring(i,i+1)*(i-6); }
		sum=11-(sum%11);
	if (sum>=10) { sum-=10; }
	if (numbers.substring(12,13) != sum || (numbers.substring(6,7) !=1 && numbers.substring(6,7) != 2)) {
			alert("ÁÖ¹Îµî·Ï¹øÈ£¿¡ ¿À·ù°¡ ÀÖ½À´Ï´Ù. ´Ù½Ã È®ÀÎÇÏ½Ê½Ã¿À.");
			eval("f." + Field_01_Name + ".value=''");
			eval("f." + Field_02_Name + ".value=''");
			eval("f." + Field_01_Name + ".focus()");
	return false;
	}

	return true;
}

//»õÃ¢(URL, window name, detail_option)
function NewWin(URL_TXT, Window_Name, Detail_Option) {
	if(Detail_Option != "") {
		window.open(URL_TXT, Window_Name, Detail_Option);
	} else {
		window.open(URL_TXT, Window_Name, "left=100, top=100, scrollbars=no, status=no, width=50, height=50");
	}
}
//-->