<!--
	/*
		Byte Ã¼Å© ÇÔ¼ö ÇÑ±Û:2byte ±×¿Ü(¿µ¹®,¼ýÀÚ):1byte
	*/
	function getByteLength(objText, objMsg, maxLen){ 
	   var intLength = 0; 
	   var minusLen = 0;
	   var tmpstr=0;

	   for(var i=0;i<objText.value.length;i++){ 
		  var c = escape(objText.value.charAt(i)); 

		  if ( c.length == 1 )				  			  intLength ++; 
		  else if ( c.indexOf("%u") != -1 ) 		  intLength += 2;
		  else if ( c.indexOf("%") != -1 ) 			  intLength += c.length/3; 

		  if( intLength > maxLen ) {
				alert(maxLen + " Byte ¾È¿¡¼­ ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù.");
				objText.value  = objText.value.substring(0, objText.value.length - parseInt(intLength-maxLen));
				break;
		  }
		
		  if( objMsg != "" && typeof(objMsg) == "object" )		  objMsg.value = intLength;/* Byte¼ýÀÚ Ç¥½Ã text¹Ú½º*/
		  tmpstr += c;
	   } 
	} 	

	/*
		getByteLength º¸¿ÏÇÑ ÇÔ¼ö(ÀÛ¼ºÀÚ: Á¶½ÂÇö)
	*/
	function CheckLen(objText, objMsg, maxLen)
	{
		var temp;
		var memocount;
		memocount = 0;
		len = objText.value.length;

		
		for(k=0;k<len;k++){
			temp = escape(objText.value.charAt(k));
			if(temp.length == 1)
				memocount += 1;
			else if(temp.indexOf("%u") != -1 )
				memocount += 2;
			else if(temp.indexOf("%") != -1 )
				memocount += temp.length/3;
		}

		if( objMsg != "" && typeof(objMsg) == "object" )		  objMsg.value = memocount;/* Byte¼ýÀÚ Ç¥½Ã text¹Ú½º*/
    
		
		if (memocount > maxLen) {	
			alert("³»¿ëÀº " + maxLen/2 + "ÀÚ±îÁö¸¸ ÀÔ·ÂÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.");
			objText.value = oldText;
			objMsg.value = oldCount;
			objText.focus();
			return;
		}else{
			oldText = objText.value;
			oldCount = memocount;
		}
	
	}


	/*'
		onKeyPress : ÀÔ·ÂÇÑ ¹®ÀÚ°¡ ¼ýÀÚÀÎÁö check
	*/
	function checkNum(txtBox) 	{
		if(isNaN(txtBox.value + String.fromCharCode(event.keyCode)))
		{
			alert('¼ýÀÚ¸¦ ÀÔ·ÂÇÏ½Ê½Ã¿À.!');
			event.keyCode = 0;
		  }
	}
	
    // ´Ü¼ø °ø¹éÀÎÁö °Ë»ç
    function removeblank1(obj) {
    	var str;
    	str = removeblank(obj.value);
    	if( (parseInt(str.length) < 1 )  ||  str == "undefined")  return false;  
    	else return true; 
    }

    // ÁÖ¾îÁø ¹®ÀÚ¿­(str)ÀÇ °ø¹éÀ» Á¦°ÅÇÏ´Â ÇÔ¼ö
    function removeblank(str) {
    	var zero = String.fromCharCode(32); //blank(32)°ø¹é¹®ÀÚ¿­
    	var i = 0, temp = "", ch = "";
    
    	for (i; i < str.length; i++) {
    		ch = str.charAt(i);
    		if (ch == zero) continue; 
    		else temp += ch; 
    	}
    	return temp;
    }

    // °´Ã¼ÀÇ °ª(value)¸¦ ÃÊ±âÈ­ ÇÏ°í Æ÷Ä¿½º¸¦ °®°Ô ÇÑ´Ù.
    function resetvalue(obj) {
    	obj.focus();
    	obj.select();
    }  

    // obj : ±æÀÌ¸¦ Ã¼Å©ÇÒ °³Ã¼, msg : ¹®ÀÚ¿­(err), lnum : ÃÖ¼Ò±æÀÌ
    function lencheck(obj,lnum) {
    	obj = eval(obj);
    	var temp = removeblank(obj.value);
    	if (temp.length < lnum) return false; 
    	else return true;
    }

	//¼ýÀÚ Ã¼Å©
	function check_num(input)
	{
		var num_cnt=0
		for (var i = 0; i < input.length; i++)
		{
			var val = input.charAt(i);
			if (val >= "0" && val <= "9")
			num_cnt ++
		}
		if (num_cnt != 0 )
			return true;
		else
			return false;
	}


	// ¿µ¹®, ¼ýÀÚ, Unicode °Ë»ö( Obj : °´Ã¼ , MODE : num, ALPHA, HANÁß ¼±ÅÃ)
	function modecheck(obj,menu) {
		var strvalue = obj.value;
		var strlen = obj.value.length;
		var ch;				//¹®ÀÚ
		var errflag=0;		//¿¡·¯¹ß»ý½Ã 1
		var unicode;		//À¯´ÏÄÚµå
		var errmsg;			//¿¡·¯ ¸Þ½ÃÁö
		
		for(i=0; i<strlen; i++)	{
			ch = strvalue.charAt(i).toUpperCase();
			unicode = strvalue.charCodeAt(i);
			
			switch(menu) {
				case 'N'://¼ýÀÚ
					if(ch < '0' || ch > '9') { 
						errflag = 1;
					}
					break;

				case 'A': // ¿µ¹®
					if(ch < 'A' || ch > 'Z') {
						if(ch == ' ') {
							break;
						} 
						errflag = 1;
					}
					break;

				case 'H':  // ÇÑ±Û
					if ((ch < 0 || ch > 9) && (ch < 'A' || ch > 'Z') && (unicode < 255) && (unicode > 0)) {
						errflag = 1; 
					}
					if (unicode > 0 && unicode < 127) {
						errflag = 1; 
					}
					break;

			
				case 'NA':  // ¿µ¹® ¹× ÇÑ±ÛÀÌ¸é true ¹ÝÈ¯
					if (((ch < '0' || ch > '9') && (ch < 'A' || ch > 'Z') )) { 
						errflag = 1 
					} 					
					break;
			}
		}		
			
		if (errflag == 1) 
			return false;
		else
			return true;
	}

	function winOpen( thisForm, opnUrl, targetName , width, height,scrollbar, resize ,leftpos,toppos ) {
		var popHeight = height;
		var popWidth  = width;
		
		var popupLeftPosition = 0;
		var popupTopPosition = 0;
		
		if( leftpos == 0 )		leftpos = (window.top.screen.width - parseInt(width))/2;
		if( toppos == 0 )		toppos = (window.top.screen.height - parseInt(height))/2;
	
		popupLeftPosition = leftpos;
		popupTopPosition = toppos;
		window.open(opnUrl,targetName,"left="+popupLeftPosition+",top="+popupTopPosition+",width="+popWidth+",height="+popHeight+",fullscreen=no,channelmode=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=" + scrollbar + ",resizable=" + resize ,false);

		if( targetName != "" && typeof(thisForm) == "object" )					thisForm.target= targetName;
	}

	/* ÄíÅ° ¼ÂÆÃÇÏ´Â ÇÔ¼ö*/
	function setCookie(name, value, expiredays){
		var today = new Date();
		today.setDate( today.getDate() + expiredays );
		document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + today.toGMTString() + ";";
	}

	/*Æ¯Á¤ ÄíÅ°°ª ¾ø¾Ö´Â ÇÔ¼ö*/	
	function setUnCookie ( name ) {
		var today = new Date();
		today.setTime(today.getTime() - 1000);

	   thisCookie = document.cookie.split("; ");
	   for(i=0; i<thisCookie.length; i++)  {
		 if(name == thisCookie[i].split("=")[0]) {
			document.cookie = name + "=''; path=/; expires=" + today.toGMTString() + ";";
		 }
	   }
	}
	
	/* ÇØ´ç ÄíÅ°°ª ¾Ë¾Æ¿À±â*/
	function cookieVal(cookieName) {
	   thisCookie = document.cookie.split("; ");
	   for(i=0; i<thisCookie.length; i++)  {
		 if(cookieName == thisCookie[i].split("=")[0])
			 return thisCookie[i].split("=")[1];
	   }
	   return "";
	} 
//-->