	// ¹®ÀÚ ÀÔ·Â Á¦¾îÇÏ±â
	function func_isNan(){			
		if( event.keyCode < 48 || event.keyCode > 57){
			alert("¹®ÀÚ¸¦ »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù");
			event.keyCode=0;
		}
	}
	// ¹®ÀÚ ÀÔ·Â Á¦¾îÇÏ±â





/////////////////////////////////////////////////////
// ¹®ÀÚ¿­¿¡¼­ ÁÂ¿ì °ø¹éÁ¦°Å
/////////////////////////////////////////////////////
function trim(str){
	return str.replace(/(^\s*)|(\s*$)/g, "");
}

/////////////////////////////////////////////////////
// À±³âÀÎÁö check.
/////////////////////////////////////////////////////
function isYunNyun(y){
	if ( (y % 4) == 0 ) {
		if ((y % 100) != 0) return true;
		if ((y % 400) == 0) return true;
	}
	return false;
}

/////////////////////////////////////////////////////
// ¿¬¿ù(YYYYMM)ÀÇ À¯È¿¼ºÀ» Ã¼Å©ÇÏ°í Ç¥ÁØ ³¯Â¥ Æ÷¸Ë (YYYY/MM) À¸·Î º¯È¯ÇÏ¿© ¸®ÅÏ
// (ÁÖÀÇ : ÀÌ ÇÔ¼öÀÇ ÆÄ¶ó¹ÌÅÍ´Â °´Ã¼ÀÓ (input object))
/////////////////////////////////////////////////////
function formatYYYYMM(object) {

	if(trim(object.value) == "") return;

    var num, year, month;
    num = object.value;
    
	while(num.search("/") != -1){	
		num = num.replace("/","");
	}
	if(isNaN(num)) {        
		window.alert("¼ýÀÚ·Î¸¸ ÀÛ¼ºÇÏ¼Å¾ß ÇÕ´Ï´Ù");
		object.select();
		return "";  
	}
	if(num != 0 && (num.length >= 5 || num.length <= 6)) {
		year = num.substring(0, 4);
		month = num.substring(4);
		if(isValidMonth(month) == false) {
			alert("À¯È¿ÇÏÁö ¾ÊÀº ¿ùÀÔ´Ï´Ù.");
			object.select();
			return "";
		}
		if(num.length == 6) {
			num = year + "/" + month;
		} else if (num.length == 5) {	
			num = year + "/" + "0" + month;
		}	
	} else {
		num = "";
		object.value = "";
		object.select();
		return "";
	}
	object.value = num;	
    return num;
}

/////////////////////////////////////////////////////
// ¿¬¿ùÀÏ(YYYYMMDD)ÀÇ À¯È¿¼ºÀ» Ã¼Å©ÇÏ°í Ç¥ÁØ ³¯Â¥ Æ÷¸Ë (YYYY/MM/DD) À¸·Î º¯È¯ÇÏ¿© ¸®ÅÏ 
// (ÁÖÀÇ : ÀÌ ÇÔ¼öÀÇ ÆÄ¶ó¹ÌÅÍ´Â °´Ã¼ÀÓ (input object))
/////////////////////////////////////////////////////
function formatYYYYMMDD(object) {

	if(trim(object.value) == "") return;

	var num, year, month, day;
	num = object.value;
    
	while (num.search("/") != -1){	
		num = num.replace("/","");
	}		
	if (isNaN(num)) {        
		window.alert("¼ýÀÚ·Î¸¸ ÀÛ¼ºÇÏ¼Å¾ß ÇÕ´Ï´Ù");
		object.select();
		return "";
	}	 
	if( num != 0 && (num.length >= 7 || num.length <= 8) ) {
		year = num.substring( 0, 4 );
		month = num.substring( 4, 6 );  
		day = num.substring(6);
		if(isValidDay(year,month,day)==false) {
			num = "";
			window.alert("À¯È¿ÇÏÁö ¾Ê´Â ÀÏÀÚÀÔ´Ï´Ù.");
			object.select();
			return "";
		}        		



		if(num.length == 8) {
			num = year + "/" + month + "/" + day;
		} else if (num.length == 7) {	
			num = year + "/" + month + "/" + "0" + day;
		}	
	} else {
		num = "";
		window.alert("³¯Â¥ ÀÔ·ÂÇü½Ä ¿À·ùÀÔ´Ï´Ù.");
		object.select();
		return "";
	}	
	object.value = num;	
	return num;
}

/////////////////////////////////////////////////////
//À¯È¿ÇÑ(Á¸ÀçÇÏ´Â) ¿ù(ìí)ÀÎÁö Ã¼Å©
/////////////////////////////////////////////////////
function isValidMonth(mm) {
    var m = parseInt(mm, 10);
    return (m >= 1 && m <= 12);
}


/////////////////////////////////////////////////////
//À¯È¿ÇÑ(Á¸ÀçÇÏ´Â) ÀÏ(ìí)ÀÎÁö Ã¼Å©
/////////////////////////////////////////////////////
function isValidDay(yyyy, mm, dd) {
    var m = parseInt(mm, 10) - 1;
    var d = parseInt(dd, 10);

    var end = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
    if((yyyy % 4 == 0 && yyyy % 100 != 0) || yyyy % 400 == 0) {
        end[1] = 29;
    }
    return (d >= 1 && d <= end[m]);
}

/////////////////////////////////////////////////////
//modal ´Þ·ÂÃ¢À» ¶ç¿ö ³¯Â¥ ¼±ÅÃ (YYYY/MM/DD Çü½ÄÀ¸·Î ÀÔ·Â)
//ÁÖÀÇ : objName Àº °´Ã¼°¡ ¾Æ´Ï¶ó °´Ã¼ ¸íÀÓ.
/////////////////////////////////////////////////////
function selectDate(objName, i){
	var dlgUrl   = "/wasadmin/web/common/calendar.jsp";
	var dlgStyle = "dialogHeight=275px; dialogWidth=200px; status=no; help=no; scroll=no";
	var obj = document.getElementsByName(objName);
	
	var dObj = showModalDialog(dlgUrl, window, dlgStyle);

	if(dObj != null) {
		var tempMonth = (dObj.getMonth()*1 + 1) < 10 ? '0' + (dObj.getMonth()*1 + 1) : (dObj.getMonth()*1 + 1);
		var tempDay= dObj.getDate() < 10 ? '0' + dObj.getDate() : dObj.getDate();
		
		if(i != undefined) {
			obj[i].value = dObj.getYear() + "/" + tempMonth + "/" + tempDay;
			formatYYYYMMDD(obj[i]);
		} else{
	    	obj[0].value = dObj.getYear() + "/" + tempMonth + "/" + tempDay;
	    	formatYYYYMMDD(obj[0]);
	    }
	}
}


/////////////////////////////////////////////////////
//ÇÊ¼ö »çÇ× ÀÔ·Â °Ë»ç
/////////////////////////////////////////////////////
function checkRequiredField(frm) {
	for(var i = 0; i < frm.elements.length; i++) {
		var elem = frm.elements[i];
		if(elem.getAttribute("required") != null && !elem.getAttribute("disabled")) {
			// text, password, textarea field
			if(elem.type == "text" || elem.type == "password" || elem.type == "textarea" || elem.type == "select-one") {
				if(trim(elem.value) == "") {
					alert("'" + elem.getAttribute("caption") + "' ´Â ÇÊ¼öÀÔ·Â»çÇ× ÀÔ´Ï´Ù.");
					elem.focus();
					return false;
				}
			// radio field	
			} else if(elem.type == "radio") {
				var check = false;
				var eRadio = document.all[elem.name];
				for(var j = 0; j < eRadio.length; j++) {
					check = check || eRadio[j].checked;
				}
				if(!check) {
					alert("'" + elem.getAttribute("caption") + "' ´Â ÇÊ¼öÀÔ·Â»çÇ× ÀÔ´Ï´Ù.");
					eRadio[0].focus();
					return false;
				}
			}
		} // end of if
	} // end of for(i)
	return true;
}

/////////////////////////////////////////////////////
// onlyNumber(obj)	: ¼ýÀÚ¸¸ ÀÔ·ÂµÇµµ·Ï ÇÔ.
// »ç¿ë¿¹			: <input ... onkeyDown = "onlyNumber(this)">
// intFlag			: true ¼Ò¼öÁ¡ ÀÔ·Â ºÒ°¡´É
// signFlag			: trueÀÌ¸é ¸¶ÀÌ³Ê½ººÎÈ£ ÀÔ·Â ºÒ°¡´É
/////////////////////////////////////////////////////
function onlyNumber(obj, intFlag, signFlag) {
	var v = obj.value;
	if(event.keyCode == 45 && v.length > 0) {
		event.returnValue = false;
		return false;
	}
	if(event.keyCode == 45 && v.indexOf("-") != -1) {
		event.returnValue = false;
		return false;
	}
	if(event.keyCode == 46 && v.indexOf(".") != -1) {
		event.returnValue = false;
		return false;
	}
	sFilter = "[0-9";
	if(!intFlag) sFilter += ".";
	if(!signFlag)  sFilter += "-";
	sFilter += "]";
	
	if (sFilter) {
		var sKey = String.fromCharCode(event.keyCode);
		var re = new RegExp(sFilter);
      
      // backspace, delete, leftarrow, rightarrow, home, end ´Â °Ë»çÇÏÁö ¾Ê´Â´Ù
      if(event.keyCode == 8 || event.keyCode == 46 || event.keyCode == 37 
      	|| event.keyCode == 39 || event.keyCode == 46 || event.keyCode == 36 || event.keyCode == 9
      	|| event.keyCode == 35 || (event.keyCode >= 96 && event.keyCode <= 105) ) return;
      	
      if (sKey != "\r" && !re.test(sKey)) { event.returnValue = false; }

	  // Enter Å°°¡ ¸ÔÁö ¾Ê°Ô ÇÑ´Ù.
	  if (event.keyCode == 13) { event.returnValue = false; }
	}
} // end of onlyNumber()

/////////////////////////////////////////////////////
// »õÃ¢ ¿©´Â ÇÔ¼ö(status=no)
// window °´Ã¼ return
/////////////////////////////////////////////////////
function openWin(url, winName, sizeW, sizeH, nLeft, nTop){
	var tLeft = nLeft;
	var tTop  = nTop;
	if(tLeft == undefined && tLeft == undefined){
	    tLeft  = screen.width/2 - sizeW/2 ;
	    tTop   = screen.height/2 - sizeH/2 ;
	}
    opt = ",toolbar=no,menubar=no,location=no,scrollbars=no,status=no";
    //return window.open(url, "a3s"+winName+"_1", "left=" + tLeft + ",top=" +  tTop + ",width=" + sizeW + ",height=" + sizeH  + opt );
	window.open(url, "a3s"+winName+"_1", "left=" + tLeft + ",top=" +  tTop + ",width=" + sizeW + ",height=" + sizeH  + opt );
}



///////////////////////////////////////////////////////
// ÁÖ¹Î¹øÈ£ ¹«°á¼º Ã¼Å© ·ÎÁ÷
//////////////////////////////////////////////////////
/*--	ÁÖ¹Î¹øÈ£ ¹«°á¼º Ã¼Å©	--*/

function CityNumCheck( CityNum1 , CityNum2 ){

	var ssn = CityNum1 + CityNum2;
	var ssn1 = ssn.substring(0,6);								// ¾Õ 6ÀÚ¸®
	var ssn2 = ssn.substring(6,13);								// µÚ 7ÀÚ¸®
	var ssn3 = ssn.substring(7,13);								// °øÅëÁÖ¹Î¹øÈ£¿Í ºñ±³ºÎºÐ ÃßÃâ

		yy		= ssn1.substring(0,2);							// ³âµµ
		mm	= ssn1.substring(2,4);							// ´Þ
		dd		= ssn1.substring(4,6);							// ÀÏ
		sex	= ssn2.substring(0,1);							// ¼ºº°

		//°ø¹éÃ¼Å©
//		if( ssn2 == "1111111"){
//			alert("'1111111'´Â »ç¿ëÇÒ¼ö ¾ø´Â ÁÖ¹Î¹øÈ£ ÀÔ´Ï´Ù");
//			return false;
//		}
//
//		
//
		if (ssn.length < 13)	{
			alert ("ÁÖ¹Îµî·Ï¹øÈ£°¡ ÇÊ¿äÇÕ´Ï´Ù.")
			CityNum1.value ="";
			CityNum2.value = "";
			CityNum1.focus();
			return false;
		}

		if ((mm < 1)||(mm > 12)){		
			alert("ÁÖ¹Îµî·Ï¹øÈ£°¡ À¯È¿ÇÏÁö ¾Ê½À´Ï´Ù."+"\n"+"´Ù½Ã ÀÔ·ÂÇÏ¼¼¿ä~");
			return false;
	    
		} else if ((dd < 1)||(dd > 31)) {
			alert("ÁÖ¹Îµî·Ï¹øÈ£°¡ À¯È¿ÇÏÁö ¾Ê½À´Ï´Ù."+"\n"+"´Ù½Ã ÀÔ·ÂÇÏ¼¼¿ä~");
			return false;
	    
		} else if ((sex != 1) && (sex != 2) && (sex != 3) && (sex != 4)) {
    		alert("ÁÖ¹Îµî·Ï¹øÈ£°¡ À¯È¿ÇÏÁö ¾Ê½À´Ï´Ù."+"\n"+"´Ù½Ã ÀÔ·ÂÇÏ¼¼¿ä~");
			return false;
	   }

		// ÁÖ¹Îµî·Ï¹øÈ£ Ã¼Å©

		var a1=ssn1.substring(0,1)
		var a2=ssn1.substring(1,2)
		var a3=ssn1.substring(2,3)
		var a4=ssn1.substring(3,4)
		var a5=ssn1.substring(4,5)
		var a6=ssn1.substring(5,6)
		var check_digit = (a1*2) + (a2*3) + (a3*4) + (a4*5) + (a5*6) + (a6*7);
		var b1=ssn2.substring(0,1)
    	var b2=ssn2.substring(1,2)
    	var b3=ssn2.substring(2,3)
    	var b4=ssn2.substring(3,4)
    	var b5=ssn2.substring(4,5)
    	var b6=ssn2.substring(5,6)
    	var b7=ssn2.substring(6,7)
    	var check_digit = check_digit + (b1*8) + (b2*9) + (b3*2) + (b4*3) + (b5*4) + (b6*5);

			check_digit = check_digit % 11;
	    	check_digit = 11 - check_digit;
	    	check_digit = check_digit % 10;
	 		if (check_digit != b7) {
		   	    alert("ÁÖ¹Îµî·Ï¹øÈ£°¡ À¯È¿ÇÏÁö ¾Ê½À´Ï´Ù."+"\n"+"´Ù½Ã ÀÔ·ÂÇÏ¼¼¿ä~");
	    	    return false;
			}else{
				return true;
			}

			return;
		}

	
	/* --- ÀÚµ¿ Æ÷Ä¿½º ÀÌµ¿ -- */
	function juminFormat(obj , obj1) {
		
		var str = obj.value;
		var leng = str.length;		
		if( leng == 6){			
			obj1.focus();
		}
	}
	
	// ÀÌ¸ÞÀÏ ¹«°á¼º Ã¼Å© ÇÔ¼ö
		function func_CheckEmail( email ){
				
		var temp , tempEmail , tempDomain;

			temp = email.value;
				
				
			// charAt(int) : ¹®ÀÚ¿­Áß int ¹øÂ° ¹®ÀÚ ¹ÝÈ¯( 0 ºÎÅÍ ½ÃÀÛ )
			if( temp.split(" ").join("") == "" ){
				alert("ÀÌ¸ÞÀÏÀ» µî·ÏÇØ ÁÖ¼¼¿ä");
				email.focus();
				return false;
			}

			if( temp.indexOf('@') == -1 ){
				alert("ÀÌ¸ÞÀÏÀº '@'¸¦ Æ÷ÇÔÇÏ¿©¾ß ÇÕ´Ï´Ù");
				email.focus();
				return false;
			}

			if( temp.indexOf('.') == -1 ){
				alert("ÀÌ¸ÞÀÏÀº '.'¸¦ Æ÷ÇÔÇÏ¿©¾ß ÇÕ´Ï´Ù");
				email.focus();
				return false;
			}

			
			// indexOf : ¸Å°³º¯¼ö¿Í ÀÏÄ¡ÇÏ´Â ¹®ÀÚ¿­ÀÇ À§Ä¡¸¦ ¹ÝÈ¯ÇÑ´Ù.
			//	¹®ÀÚ¿­ÀÌ Á¸ÀçÇÏÁö ¾ÊÀ» °æ¿ì -1 À» ¹ÝÈ¯ ÇÏ¹Ç·Î ¹®ÀÚ¿­ÀÇ À¯¹« ÆÇ´Ü¿¡ »ç¿ë ÇÑ´Ù

			if (temp != '') {
				if (temp.indexOf(" ") != -1) {
					alert("°ø¹éÇã¿ë µÇÁö ¾Ê½À´Ï´Ù.");
					email.focus();
					return false;
				}
			}


			if (temp.indexOf(".") - temp.indexOf("@") == 1) {
				alert("'@' ´ÙÀ½¿¡ ¹Ù·Î '.'ÀÌ ¿Ã¼ö ¾ø½À´Ï´Ù.");
				email.focus();
				return false;
			}
	
			if (temp.charAt(temp.length-1) == '.') {
				alert("'.'Àº EmailÁÖ¼Ò ³¡¿¡ ¿Ã ¼ö ¾ø½À´Ï´Ù.");
				email.focus();
				return false;
			}
	
			if (temp.charAt(temp.length-1) == '@') {
				alert("'@'Àº EmailÁÖ¼Ò ³¡¿¡ ¿Ã ¼ö ¾ø½À´Ï´Ù.");
				email.focus();
				return false;
			}
			
			tempEmail = temp.split("@")[0];	//email.value.substring(0,email.value.indexOf('@'));
			tempDomain = temp.split("@")[1];

			for(i=0;i<tempEmail.length;i++) {
				c = tempEmail.charAt(i);
				
				if((c < '0' || c > '9')&&(c < 'a' || c > 'z')&&(c < 'A' || c > 'Z')&&(c != '.')&&(c != '-')&&(c != '_')){
					alert("E-mailÀº ¿µ¾î, ¼ýÀÚ, '-', '_', '.'¸¸ °¡´É ÇÕ´Ï´Ù.");
					email.value="";
					email.focus();
					return false;
				}
			}

			for(i=0;i<tempDomain.length;i++) {
				c = tempDomain.charAt(i);
				
				if((c < '0' || c > '9')&&(c < 'a' || c > 'z')&&(c < 'A' || c > 'Z')&&(c != '.')&&(c != '-')&&(c != '_')){
					alert("E-mailÀº ¿µ¾î, ¼ýÀÚ, '-', '_', '.'¸¸ °¡´É ÇÕ´Ï´Ù.");
					email.value = "";
					email.focus();
					return false;
				}
			}
					
			for(i=0;i<temp.length;i++) {
				c = temp.charAt(i);
				
				if((c < '0' || c > '9')&&(c < 'a' || c > 'z')&&(c < 'A' || c > 'Z')&&(c != '.')&&(c != '-')&&(c != '_')&&(c != '@')) {
					alert("E-mailÀº ¿µ¾î, ¼ýÀÚ, '-', '_', '.'¸¸ °¡´É ÇÕ´Ï´Ù.");
					email.focus();
					return false;
				}
			}				
			return true;		 
		}


	// ÀÌ¸ÞÀÏ Çü½Ä Ã¼Å©ÇÏ±â
	
	// È¸¿ø °èÁ¤ ¹«°á¼º Ã¼Å©ÇÏ±â
		function func_CheckUserId( UserId ) {
				
			var temp;
			temp = UserId.value;				
				
			// charAt(int) : ¹®ÀÚ¿­Áß int ¹øÂ° ¹®ÀÚ ¹ÝÈ¯( 0 ºÎÅÍ ½ÃÀÛ )
			if( temp.split(" ").join("") == "" ){
				alert("È¸¿ø ¾ÆÀÌµð¸¦ µî·ÏÇØ ÁÖ¼¼¿ä");
				UserId.focus();
				return false;
			}
			/*
			if( temp.length < 6 || temp.length > 8 ){
				alert("È¸¿ø ¾ÆÀÌµð´Â 6ÀÚ ÀÌ»ó 8ÀÚ ¹Ì¸¸ÀÌ¾î¾ß ÇÕ´Ï´Ù");
				UserId.focus();
				return false;
			}
			*/

			for(i = 0 ; i < temp.length; i++){
				c = temp.charAt(i);
				
				if(	(c < '0' || c > '9') && (c <'a' || c > 'z') && (c < 'A' || c > 'Z') ) {
					alert("::  ¾ÆÀÌµð´Â ¿µ¹®ÀÚ¿Í  ¼ýÀÚ¸¸ °¡´É ÇÕ´Ï´Ù.");
					UserId.value = "";
					UserId.focus();
					return false;
				}
			}
	 			return true;		 
		}	
		// È¸¿ø °èÁ¤ ¹«°á¼º Ã¼Å©ÇÏ±â


		// Å¬·´ id ¹«°á¼º Ã¼Å©ÇÏ±â
		function func_CheckUserId( pk_id ) {
				
			var temp;
			temp = pk_id.value;				
				
			// charAt(int) : ¹®ÀÚ¿­Áß int ¹øÂ° ¹®ÀÚ ¹ÝÈ¯( 0 ºÎÅÍ ½ÃÀÛ )
			if( temp.split(" ").join("") == "" ){
				alert("È¸¿ø ¾ÆÀÌµð¸¦ µî·ÏÇØ ÁÖ¼¼¿ä");
				pk_id.focus();
				return false;
			}
			/*
			if( temp.length < 6 || temp.length > 8 ){
				alert("È¸¿ø ¾ÆÀÌµð´Â 6ÀÚ ÀÌ»ó 8ÀÚ ¹Ì¸¸ÀÌ¾î¾ß ÇÕ´Ï´Ù");
				pk_id.focus();
				return false;
			}
			*/

			for(i = 0 ; i < temp.length; i++){
				c = temp.charAt(i);
				
				if(	(c < '0' || c > '9') && (c <'a' || c > 'z') && (c < 'A' || c > 'Z') ) {
					alert("::  ¾ÆÀÌµð´Â ¿µ¹®ÀÚ¿Í  ¼ýÀÚ¸¸ °¡´É ÇÕ´Ï´Ù.");
					pk_id.value = "";
					pk_id.focus();
					return false;
				}
			}
	 			return true;		 
		}	
		// Å¬·´ id ¹«°á¼º Ã¼Å©ÇÏ±â

		// ºñ¹Ð¹øÈ£ Ã¼Å©ÇÏ±â
		
			function func_CheckPswd( UserPswd , UserPswdRe , UserId ) {
				
				
			// charAt(int) : ¹®ÀÚ¿­Áß int ¹øÂ° ¹®ÀÚ ¹ÝÈ¯( 0 ºÎÅÍ ½ÃÀÛ )
			if( UserPswd.value.split(" ").join("") == "" ){
				alert("ºñ¹Ð¹øÈ£¸¦ µî·ÏÇØ ÁÖ¼¼¿ä");
				UserPswd.focus();
				return false;
			}
			/*
			if( UserPswd.value.length < 6 || UserPswd.value.length > 8 ){
				alert("È¸¿ø ºñ¹Ð¹øÈ£´Â 6ÀÚ ÀÌ»ó 8ÀÚ ¹Ì¸¸ÀÌ¾î¾ß ÇÕ´Ï´Ù");
				UserPswd.focus();
				return false;
			}
			*/

			if( UserPswd.value == UserId.value ){
				alert("È¸¿ø´ÔÀÇ ¾ÆÀÌµð¸¦ ºñ¹Ð¹øÈ£·Î »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù");
				UserPswd.value = "";
				UserPswd.focus();
				return false;
			}
			
			// ¹®ÀÚ , ¼ýÀÚ Á¶ÇÕ Ã¼Å©ÇÏ±â
			var incnt = 0;
			var outcnt = 0;
			var tmp_comp;

			 for(i=0;i<UserPswd.value.length;i++){
				
				tmp_comp = UserPswd.value.charAt(i)
				
				// ¼ýÀÚÀÏ°æ¿ì
				if (tmp_comp < 48 ||  tmp_comp > 57) {
					incnt = incnt + 1;
				}
				// ¼ýÀÚ°¡ ¾Æ´Ò °æ¿ì
				else{
					outcnt = outcnt + 1;
				}
			}

			if (outcnt == 0 || incnt == 0 ) {
				alert("ºñ¹Ð¹øÈ£´Â ¹®ÀÚ, ¼ýÀÚ Á¶ÇÕÀÌ¾î¾ß ÇÕ´Ï´Ù");
				UserPswd.focus();
				return false;
			}
				
			for(i = 0 ; i < UserPswd.value.length; i++){
				c = UserPswd.value.charAt(i);
				
				if(	(c < '0' || c > '9') && (c <'a' || c > 'z') && (c < 'A' || c > 'Z') ) {
					alert("È¸¿ø ºñ¹Ð¹øÈ£´Â  ¿µ¹®ÀÚ¿Í  ¼ýÀÚ¸¸ °¡´É ÇÕ´Ï´Ù");
					UserPswd.value = "";
					UserPswd.focus();
					return false;
				}
			}
			

			// ºñ¹Ð¹øÈ£¿¡ ¾ÆÀÌµð°¡ Æ÷ÇÔµÇ¾î ÀÖ´ÂÁö Ã¼Å©
			var temp = new Array(8);
				 temp[0] = "";
				 temp[1] = "";
				 temp[2] = "";
				 temp[3] = "";
				 temp[4] = "";
				 temp[5] = "";
				 temp[6] = "";
				 temp[7] = "";
			var temp_ = "";
			var flag = false;
			
			for( i = 0 ; i < UserPswd.value.length; i++){
				c = UserPswd.value.charAt(i);
				temp[i] = c;
			
				if( temp[i] == UserId.value.charAt(0)){						
					//alert("ºñ¹Ð¹øÈ£¿Í ¾ÆÀÌµð°¡ ÀÏÄ¡ÇÏ´Â ¹®ÀÚ¿­ ¹ß°ß:"+ temp[i]);
					flag = true;
				}

				if( flag == true ){
					temp_ = temp_ + c;
				}
				
				if( temp_ == UserId.value ){
					alert("È¸¿ø´ÔÀÇ ºñ¹Ð¹øÈ£¿¡ ¾ÆÀÌµð¸¦ Æ÷ÇÔÇÒ ¼ö ¾ø½À´Ï´Ù");
					return false;
				}

			}

			// ºñ¹Ð¹øÈ£¿¡ ¾ÆÀÌµð°¡ Æ÷ÇÔµÇ¾î ÀÖ´ÂÁö Ã¼Å©

			if( UserPswdRe.value.split(" ").join("") == "" ){
				alert("ºñ¹Ð¹øÈ£ È®ÀÎÀ» À§ÇØ ´Ù½ÃÇÑ¹ø µî·ÏÇØ ÁÖ¼¼¿ä");
				UserPswdRe.focus();
				return false;
			}
			/*
			if( UserPswdRe.value.length < 6 || UserPswdRe.value.length > 8 ){
				alert("È¸¿ø ºñ¹Ð¹øÈ£´Â 6ÀÚ ÀÌ»ó 8ÀÚ ¹Ì¸¸ÀÌ¾î¾ß ÇÕ´Ï´Ù");
				UserPswdRe.focus();
				return false;
			}
			*/
			
			if( UserPswd.value != UserPswdRe.value ){
				alert("ÀÔ·ÂÇÏ½Å ºñ¹Ð¹øÈ£°¡ ÀÏÄ¡ÇÏÁö ¾Ê½À´Ï´Ù"+"\n"+"´Ù½Ã ÇÑ¹ø È®ÀÎÇØ ÁÖ¼¼¿ä");
				UserPswd.value = "";
				UserPswdRe.value = "";
				UserPswd.focus();
				return;
			}				
				return true;		 
		}	
		// ºñ¹Ð¹øÈ£ ¹«°á¼º Ã¼Å©ÇÏ±â



function ResizePic() // ÀÌ¹ÌÁö»çÀÌÁî Ã¼Å©
{
	if(! imgz.complete)
	{
		setTimeout("ResizePic(imgz)",50);
	}
	else
	{
		if (imgz.width > 610)
		{
			imgz.width = 610;
		}
	}
}


var imgObj = new Image();
function showImgWin(imgName) { //ÀÌ¹ÌÁö »çÀÌÁî Ã¼Å©ÇÏ¿© ÆË¾÷¶ç¿ì±â
	imgObj.src = imgName;
	setTimeout("createImgWin(imgObj)", 100);
}
	
function createImgWin(imgObj) {
	if (! imgObj.complete) {
		setTimeout("createImgWin(imgObj)", 100);
		return;
	}
	var x = window.screen.width;
	var y = window.screen.height;
		
	var ix = imgObj.width;
	var iy = imgObj.height;
		
	var left_x=(x/2)-(ix/2);
	var left_y=(y/2)-(iy/2);

	if (parseInt(x) < parseInt(ix) && parseInt(y) < parseInt(iy)){
		
		var x = window.screen.width - 10;
		var y = window.screen.height - 55;
		
		imageWin = window.open("", "imageWin","top="+ left_y +",left="+ left_y+",scrollbars=yes,width=" + x + ",height=" + y);
		imageWin.document.write("<html><head><title>::Å¸ÀÌÆ²::</title></head><body style='margin:0'>");
		imageWin.document.write("<A HREF='javascript:window.close()'>"+"<img src=" + imgObj.src + " border=0 alt=´Ý±â>"+"</A>");
		imageWin.document.write("</body><html>");
		imageWin.document.title = "";
		
	}else if (parseInt(x) > parseInt(ix) && parseInt(y) < parseInt(iy)){
		var x = window.screen.width;
		var y = window.screen.height - 55;
		
		imageWin = window.open("", "imageWin","top="+ left_y +",left="+ left_y+",scrollbars=yes,width=" + ix + ",height=" + y);
		imageWin.document.write("<html><head><title>::Å¸ÀÌÆ²::</title></head><body style='margin:0'>");
		imageWin.document.write("<A HREF='javascript:window.close()'>"+"<img src=" + imgObj.src + " border=0 alt=´Ý±â>"+"</A>");
		imageWin.document.write("</body><html>");
		imageWin.document.title = "";
		
	}else if (parseInt(x) < parseInt(ix) && parseInt(y) > parseInt(iy)){
		
		var x = window.screen.width - 10;
		var y = window.screen.height;
		
		imageWin = window.open("", "imageWin","top"+ left_y +",left="+ left_y+",scrollbars=yes,width=" + x + ",height=" + iy);
		imageWin.document.write("<html><head><title>::Å¸ÀÌÆ²::</title></head><body style='margin:0'>");
		imageWin.document.write("<A HREF='javascript:window.close()'>"+"<img src=" + imgObj.src + " border=0 alt=´Ý±â>"+"</A>");
		imageWin.document.write("</body><html>");
		imageWin.document.title = "";
			
	}else{
		
		imageWin = window.open("", "imageWin","top="+ left_y +",left="+ left_y+",width=" + ix + ",height=" + iy);
		imageWin.document.write("<html><head><title>::Å¸ÀÌÆ²::</title></head><body style='margin:0'>");
		imageWin.document.write("<A HREF='javascript:window.close()'>"+"<img src=" + imgObj.src + " border=0 alt=´Ý±â>"+"</A>");
		imageWin.document.write("</body><html>");
		imageWin.document.title = "";
	}
}



		function popup_center(url,w, h, s, r) { //ÆË¾÷ °¡¿îµ¥ ¶ç¿ì±â
	
			width=screen.width;
			height=screen.height;
	
			x=(width/2)-(w/2);
			y=(height/2)-(h/2);
	
			opt = "left=" + x + ", top=" + y + ", width=" + w + ", height=" + h;
			opt = opt + ", toolbar=no,location=no,directories=no,status=no,menubar=no";
			opt = opt + ",scrollbars=" + s;
			opt = opt + ",resizable=" + r;
			window.open(url, "_blank", opt);
	
		}


var pub ="";
var XMLpath ="/img/flash/";

home=pub+"/index.jsp";
intro=pub+"/intro/about01.jsp";
	intro01=pub+"/intro/about01.asp";
	intro02=pub+"/intro/awards01.jsp";
	intro03=pub+"/intro/ep_program01.jsp";
	intro04=pub+"/intro/awards_news.jsp";
apply=pub+"/apply/apply011.jsp";
	apply01=pub+"/apply/apply011.jsp";
	apply02=pub+"/apply/apply02.jsp";
	apply03=pub+"/etc/faq_list.jsp?gb=apply";
	apply04=pub+"/apply/apply04.jsp";
	apply05=pub+"/apply/apply05.jsp";	
	apply06=pub+"/surface/apply_confirm.jsp";	
	apply07=pub+"/surface/surface_step01.jsp";	
awards=pub+"/awards/awards_in.jsp";
	awards01=pub+"/awards/awards_in.jsp";
	awards02=pub+"/awards/awards_over01.jsp";
	awards03=pub+"/awards/awards_press.jsp";
community=pub+"/community/community_index.jsp";
data=pub+"/data/edu_movie.jsp";
	data01=pub+"/data/edu_movie.jsp";
	data02=pub+"/data/edu_data.jsp";
	data03=pub+"/data/photo_gallery.jsp";
	data04=pub+"/data/poll.jsp";
	data05=pub+"/data/volunteer_data.jsp";
	
login=pub+"/member/login.jsp";	
join=pub+"/member/member_agree.jsp";
sitemap=pub+"/etc/sitemap.jsp";
contactus=pub+"/etc/contactus.jsp";	
faq=pub+"/etc/faq_list.jsp";	
qna=pub+"/etc/qna_list.jsp";	
priv=pub+"/etc/priv.jsp";	
prov=pub+"/etc/prov.jsp";	
spam=pub+"/etc/spam.jsp";	
locate=pub+"/etc/locate.jsp";	

function GoUrl(name, win) {

	if (name == null) {
			alert("¼­ºñ½º ÁØºñÁßÀÔ´Ï´Ù1.");
			return;	
	} else {
		if (win == null) {
			if(name.indexOf("(") != -1) 	eval(name);
			else									document.location.href = eval(name);
		} else {
				window.open(eval(name), win);
		}
	}
}
//--------------------------------------------------------------


//1Depth Menu rollOn 
function ImgPreLoad(imgTitle, imageNum) {
		imageNum++;
		rollOn = new Array(imageNum);
		rollOff = new Array(imageNum);
		for (j = 1; j <= imageNum; j++) {
			if (j < 10) {
				tmp = "0";
			} else {
				tmp ="";
			}
			rollOn[j] = new Image();
			rollOn[j].src = imgTitle + tmp + j + "_on.gif";
			rollOff[j] = new Image();
			rollOff[j].src = imgTitle + tmp + j + ".gif";
		}
	}
	function imgOn(Num) {
    if (rollOn[Num] != null) {	
				document["T"+Num].src = rollOn[Num].src;
		}
	}
	function imgOff(Num) {
		if (rollOn[Num] != null) {
			if (Num != _MCurrentOn) {
				document["T"+Num].src = rollOff[Num].src;
			}
      else {  
      document["T"+Num].src = rollOn[Num].src;
      }
	}
}

function PreImgLoad(Title, imgNum) {
		imgNum++;
		rollOver = new Array(imgNum);
		rollOut = new Array(imgNum);
		for (i = 1; i <= imgNum; i++) {
			if (i < 10) {
				tmp = "0";
			} else {
				tmp ="";
			}
			rollOver[i] = new Image();
			rollOver[i].src = Title + tmp + i + "_on.gif";
			rollOut[i] = new Image();
			rollOut[i].src = Title + tmp + i + ".gif";
		}
	}
	function imgOver(Num) {
    if (rollOver[Num] != null) {	
				document["S"+Num].src = rollOver[Num].src;
		}
	}
	function imgOut(Num) {
		if (rollOver[Num] != null) {
			if (Num != _SCurrentOn) {
				document["S"+Num].src = rollOut[Num].src;
			}
      else {  
      document["S"+Num].src = rollOver[Num].src;
    		 }
		}
	}
	
function BodyOnLoad() {
imgOff(_MCurrentOn);
}

<!-- [Á¡¼± ¾ø¾Ö±â] ½ÃÀÛ ###########################################################################-->
function allblur() {
	if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus(); 
}
document.onfocusin = allblur;
<!-- [Á¡¼± ¾ø¾Ö±â] ³¡ ###########################################################################-->


//Popup 		
function popup(Fn,Win, X, Y, Scroll){
l = (screen.width) ?	(screen.width- X) / 2	: 0;
t = (screen.height) ?	(screen.height- Y) / 2 : 0;	
	NewWindow=window.open(Fn,Win,'width='+X+',height='+Y+',top='+t+',left='+l+',scrollbars='+Scroll+',toolbar=no,location=no,directories=no,status=no,resizable=no,menubar=no');
}


/*********/
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_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_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 click50(stat) {
	if (stat == 1){
		document.all.click51.style.display = "block";
		document.all.click52.style.display = "none";
	} else if (stat == 2){
		document.all.click51.style.display = "none";
		document.all.click52.style.display = "block";
	}
}

// ¿À¸¥ÂÊ ¹è³Ê½ºÅ©·Ñ
function goTop(orix,oriy,desx,desy) {
		var Timer;
		var winHeight = document.body.scrollTop;
		if(Timer) clearTimeout(Timer);
		startx = 0;
		starty = winHeight;
		if(!orix || orix < 0) orix = 0;
		if(!oriy || oriy < 0) oriy = 0;
		var speed = 7;
		if(!desx) desx = 0 + startx;
		if(!desy) desy = 0 + starty;
		desx += (orix - startx) / speed;
		if (desx < 0) desx = 0;
		desy += (oriy - starty) / speed;
		if (desy < 0) desy = 0;
		var posX = Math.ceil(desx);
		var posY = Math.ceil(desy);
		window.scrollTo(posX, posY);
		if((Math.floor(Math.abs(startx - orix)) < 1) && (Math.floor(Math.abs(starty - oriy)) < 1)){
			clearTimeout(Timer);
			window.scroll(orix,oriy);
		}else if(posX != orix || posY != oriy){
			Timer = setTimeout("goTop("+orix+","+oriy+","+desx+","+desy+")",15);
		}else{
			clearTimeout(Timer);
		}
	}	

var bNetscape4plus = (navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) >= "4");
var bExplorer4plus = (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.substring(0,1) >= "4");
function CheckUIElements(){
  var yMenuFrom, yMenuTo, yButtonFrom, yButtonTo, yOffset, timeoutNextCheck;
	var ie=document.all&&navigator.userAgent.indexOf("Opera")==-1
	var ne=document.getElementById==-1
	var window_height=ie? document.body.clientHeight : window.innerHeight
	var window_height1=ne? document.getElementById.clientHeight : window.innerHeight

  if ( bNetscape4plus ) {
    yMenuFrom   = document["divMenu"].top;
    yMenuTo     = top.pageYOffset + 165;
  }
  else if ( bExplorer4plus ) {
    yMenuFrom   = parseInt (divMenu.style.top, 10);
    yMenuTo     = document.body.scrollTop +  165 ;
  }

  timeoutNextCheck = 500;

  if ( Math.abs (yButtonFrom - (yMenuTo + 152)) < 6 && yButtonTo < yButtonFrom ) {
    setTimeout ("CheckUIElements()", timeoutNextCheck);
    return;
  }

  if ( yButtonFrom != yButtonTo ) {
    yOffset = Math.ceil( Math.abs( yButtonTo - yButtonFrom ) / 10 );
    if ( yButtonTo < yButtonFrom )
      yOffset = -yOffset;

    if ( bNetscape4plus )
      document["divLinkButton"].top += yOffset;
    else if ( bExplorer4plus )
      divLinkButton.style.top = parseInt (divLinkButton.style.top, 10) + yOffset;

    timeoutNextCheck = 10;
  }
  if ( yMenuFrom != yMenuTo ) {
    yOffset = Math.ceil( Math.abs( yMenuTo - yMenuFrom ) / 20 );
    if ( yMenuTo < yMenuFrom )
      yOffset = -yOffset;

    if ( bNetscape4plus )
      document["divMenu"].top += yOffset;
    else if ( bExplorer4plus )
      divMenu.style.top = parseInt (divMenu.style.top, 10) + yOffset;

    timeoutNextCheck = 10;
  }

  setTimeout ("CheckUIElements()", timeoutNextCheck);
}

function OnLoad()
{
  var y;
  if ( top.frames.length )
  if ( bNetscape4plus ) {
    document["divMenu"].top = top.pageYOffset + 165;
    document["divMenu"].visibility = "visible";
  }
  else if ( bExplorer4plus ) {
    divMenu.style.top = document.body.scrollTop + 165;
    divMenu.style.visibility = "visible";
  }
  CheckUIElements();
  return true;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_popupMsg(msg) { //v1.0
  alert(msg);
}


function GoUrl(arg){
	
	if( arg == "contactus") {
		location.href="/etc/contactus.asp";
	} else if( arg == "home") {
		location.href="/index.asp";	
	} else if( arg == "login") {
		location.href="/member/login.asp";
	} else if( arg == "apply") {
		location.href="/apply/apply011.asp";
	} else if( arg == "awards") {
		location.href="/awards/awards_in.asp";
	} else if( arg == "community") {
		location.href="/community/index.asp";
	} else if( arg == "data") {
		location.href="/data/edu_movie.asp";
	} else if( arg == "edu_data") {
		location.href="/data/edu_data.asp";
	} else if( arg == "surface") {
		location.href="/surface/surface_step01.asp";
	} else if( arg == "intro" ) {
		location.href="/intro/about01.asp";
	} else if( arg == "agree") {
		location.href="/member/member_agree.asp";
	} else if( arg == "club") {
		location.href="/community/club_list.asp";
	} else if( arg == "diary") {
		location.href="/community/diary/diary_list.jsp";
	} else if( arg == "prize"){
		location.href="/community/club/club_main.asp?c=soclove";
	} else if( arg == "volunteer"){
		location.href="/community/volunteer/volunteer.asp";
	} else if( arg == "join"){
		location.href="/member/member_agree.asp";
	} else if( arg == "sitemap"){
		location.href="/etc/sitemap.asp";
	} else {
		location.href=arg;
	}
}

function imgSize(which , max ){
    var width = eval("document.images."+which+".width");
    var height = eval("document.images."+which+".height");
    var temp = 0; 
    var max_width= max;   // ÀÌ¹ÌÁöÀÇ ÃÖ´ë Å©±â         
    if ( width > max_width ) {  // ÀÌ¹ÌÁö°¡ 600º¸´Ù Å©´Ù¸é ³Êºñ¸¦ 600À¸·Î ¸Â¿ì°í ºñÀ²¿¡ ¸ÂÃç ¼¼·Î°ªÀ» º¯°æÇÑ´Ù.      
       height = height/(width / max_width);
       eval("document.images."+which+".width = max_width");     
       eval("document.images."+which+".height = height");
    }     
}
	//±ÛÀÚ¼ö
	function GetTextByte(text) {
	   str = new String(text);
	   var strLen = str.length;
	   var strByte = 0;
	   for (var i=0; i<strLen; i++) {
		   tmp = new String(str.charCodeAt(i));
		   strByte++;
		   if (tmp.length > 3) {
			   strByte++;
		   }
	   }
	   return strByte;
	}

function downLoad(arg){
	location.href="/conf/download.jsp?pk_Attach="+ arg;
}