/******************************************************************************
 * Framework¿¡¼­ °øÅëÀ¸·Î »ç¿ëÇÏ´Â ºÎºÐÀÔ´Ï´Ù.
 * ÀÓÀÇ·Î º¯°æÇÏ½Ã°Å³ª, »èÁ¦ÇÏ½Ã¸é ¾ÈµË´Ï´Ù!!
 * Framework_Basic_Style
 ******************************************************************************
 * PROTOTYPE
 *   [string].replaceAll(str1, str2)                     --> replaceAll
 *   [string].trim()                                     --> trim
 * 
 * FUNCTION
 *   isNull(obj, fieldName)                                   		--> null ¿©ºÎ È®ÀÎ
 *   isText(obj, fieldName, minLength, maxLength)             		--> objÀÇ »çÀÌÁî¸¸ È®ÀÎ 
 *   isNumeric(obj, fieldName, minLength, maxLength)          		--> ¼ýÀÚ ¿©ºÎ È®ÀÎ2
 *   isAlphabet(obj, fieldName, minLength, maxLength)         		--> ¾ËÆÄºª ¿©ºÎ È®ÀÎ
 *   isAlphaNum(obj, fieldName, minLength, maxLength)        		--> ¾ËÆÄºª + ¼ýÀÚ ¿©ºÎ È®ÀÎ
 *   isUrl(obj, fieldName, minLength, maxLength)              		--> URL È®ÀÎ
 *   isEmail(obj, fieldName, minLength, maxLength)            		--> Email È®ÀÎ
 *   isPhoneNumber(obj, fieldName, minLength, maxLength)      		--> ÈÞ´ëÆù È®ÀÎ(10ÀÚ¸® È¤Àº 11ÀÚ¸® ¼ýÀÚ·Î¸¸ ±¸¼º)
 *   isPhoneNumberDash(obj, fieldName, minLength, maxLength)  		--> URL È®ÀÎ(01X-XXXX-XXXX ÇüÅÂ·Î ±¸¼º)
 * 	 isSpecial(obj, fieldName, minLength, maxLength, customRegExp)  --> Æ¯¼ö¹®ÀÚ È®ÀÎ
 *
 *   isValidDate(obj, fieldName)                         	  		--> date ÇüÀÇ À¯È¿¼º È®ÀÎ(¹Ì¿Ï¼º)
 * 
 *   getByteSize(obj)                                         		--> byte size È®ÀÎ
 *   openWin(url, winName, width, height, scrollbars)         		--> popup
 *   showCalendar(obj)                                        		--> calendar
 *
 *   msgWindow												  		--> ¸Þ¼¼ÁöÃ¢
 *   showMessage											  		--> ½ÇÁúÀûÀÎ ¸Þ¼¼ÁöÃ¢ ±¸¼º(msgWindow¿¡¼­ ³»ºÎÀûÀ¸·Î È£Ãâ)
 *   isSelectedCheckbox(chkObj)										--> checkbox°¡ ¼±ÅÃµÇÁö ¾Ê¾Ò´ÂÁö È®ÀÎ
 *   substringGetByte(chkObj, byte)										--> ÀÔ·ÂÆûÀÌ byte¸¸Å­ ÃÊ°úÇßÀ»°æ¿ì byte¸¸Å­ Àß¶ó¼­ ¹®ÀÚ¿­À» ¸®ÅÏÇÑ´Ù
******************************************************************************/

/* form validaton */
var REGULAR_TEXT = "regular_text";
var REGULAR_NUMBER = "regular_number";
var REGULAR_ALPHABET = "regular_alphabet";
var REGULAR_ALPHABET_NUMBER = "regular_alphabet_number";
var REGULAR_URL = "regular_url";
var REGULAR_EMAIL = "regular_email";
var REGULAR_PHONE_NUMBER_DASH = "regular_phone_number_dash";
var REGULAR_PHONE_NUMBER = "regular_phone_number";
var REGULAR_CUSTOM = "regular_custom";


var REGULAR_DOT = "regular_dot";						// '.'
var REGULAR_COMMA = "regular_comma";					// ','
var REGULAR_SPACE = "regular_space";					// ' '
var REGULAR_UNDERBAR = "regular_underbar";				// '_'
var REGULAR_DASH = "regular_dash";						// '-'



/**
 * replaceAll() ÇÔ¼ö(»ç¿ë¹ý : str.replaceAll('str1', 'str2'))
 */
String.prototype.replaceAll = function(str1, str2) {
	var temp_str = "";

	if(this.trim() != "" && str1 != str2) {
		temp_str = this.trim();

		while(temp_str.indexOf(str1) > -1) {
			temp_str = temp_str.replace(str1, str2);
		}
	}

	return temp_str;
}

//checkbox°¡ ¼±ÅÃµÇ¾ú´ÂÁö È®ÀÎ
function isSelectedCheckbox(chkObj){
	var checkFlag = false;
	if(chkObj == null){
		alert("À§Á¬ÀÌ Á¸ÀçÇÏÁö¾Ê½À´Ï´Ù.");
		return false;
	}

	if(chkObj.length == undefined){
		if(chkObj.checked){
			checkFlag = true;
		}
	}else{
		for(var i=0 ; i < chkObj.length ; i++){
			if(chkObj[i].checked){
				checkFlag = true;
			}
		}
	}
	if(!checkFlag){
		alert("¼±ÅÃµÈ À§Á¬ÀÌ ¾ø½À´Ï´Ù.");
	}
	return checkFlag;
}


/**
 * trim() ÇÔ¼ö(»ç¿ë¹ý : str.trim())
 */
String.prototype.trim = function() {
    return this.replace(/(^\s*)|(\s*$)/g, "");
}


/**
 * null ¿©ºÎ¸¦ È®ÀÎÇØ ÁÖ´Â ¸Þ¼Òµå
 * @param obj - input control
 * @param fieldName - È­¸éÀÇ fieldName
 * @return boolean
 */
function isNull(obj, fieldName) {
	return isRegularExpression(REGULAR_TEXT, obj, fieldName, 1, -1) ?  true : false;
}


/**
 * Text ÀÇ À¯È¿¼ºÀ» È®ÀÎÇØ ÁÖ´Â ¸Þ¼Òµå
 * @param obj - input control
 * @param fieldName - È­¸éÀÇ fieldName
 * @param minLength - ÃÖ¼Ò ÀÔ·Â°ª(byte ´ÜÀ§, 0 ÀÌ¸é null Çã¿ë)
 * @param maxLength - ÃÖ´ë ÀÔ·Â°ª(byte ´ÜÀ§)
 * @return boolean
 */
function isText(obj, fieldName, minLength, maxLength) {
	return isRegularExpression(REGULAR_TEXT, obj, fieldName, minLength, maxLength) ?  true : false;
}


/**
 * ¿µ¹® ¿©ºÎ¸¦ È®ÀÎÇØ ÁÖ´Â ¸Þ¼Òµå
 * @param obj - input control
 * @param fieldName - È­¸éÀÇ fieldName
 * @param minLength - ÃÖ¼Ò ÀÔ·Â°ª(byte ´ÜÀ§, 0 ÀÌ¸é null Çã¿ë)
 * @param maxLength - ÃÖ´ë ÀÔ·Â°ª(byte ´ÜÀ§)
 * @return boolean
 */
function isAlphabet(obj, fieldName, minLength, maxLength) {
	return isRegularExpression(REGULAR_ALPHABET, obj, fieldName, minLength, maxLength) ?  true : false;
}


/**
 * ¼ýÀÚ ¿©ºÎ¸¦ È®ÀÎÇØ ÁÖ´Â ¸Þ¼Òµå
 * @param obj - input control
 * @param fieldName - È­¸éÀÇ fieldName
 * @param minLength - ÃÖ¼Ò ÀÔ·Â°ª(byte ´ÜÀ§, 0 ÀÌ¸é null Çã¿ë)
 * @param maxLength - ÃÖ´ë ÀÔ·Â°ª(byte ´ÜÀ§)
 * @return boolean
 */
function isNumeric(obj, fieldName, minLength, maxLength) {	
	return (isRegularExpression(REGULAR_NUMBER, obj, fieldName, minLength, maxLength)) ? true : false;
}


/**
 * ¿µ¹®°ú ¼ýÀÚ ¿©ºÎ¸¦ È®ÀÎÇØ ÁÖ´Â ¸Þ¼Òµå
 * @param obj - input control
 * @param fieldName - È­¸éÀÇ fieldName
 * @param minLength - ÃÖ¼Ò ÀÔ·Â°ª(byte ´ÜÀ§, 0 ÀÌ¸é null Çã¿ë)
 * @param maxLength - ÃÖ´ë ÀÔ·Â°ª(byte ´ÜÀ§)
 * @return boolean
 */
function isAlphaNum(obj, fieldName, minLength, maxLength) {
	return isRegularExpression(REGULAR_ALPHABET_NUMBER, obj, fieldName, minLength, maxLength) ?  true : false;
}


/**
 * ³¯Â¥ÀÇ À¯È¿¼ºÀ» Ã¼Å©ÇØÁÖ´Â ¸Þ¼Òµå
 * @param obj       - input control(YYYYMMDD)
 * @param fieldName - È­¸éÀÇ fieldName
 * @return boolean
 */
function isValidDate(obj, fieldName) {
	// ÀÛ¾÷Áß
	return true;
}


/**
 * URL Çü½ÄÀ» Ã¼Å©ÇØÁÖ´Â ¸Þ¼Òµå
 * @param obj - input control
 * @param fieldName - È­¸éÀÇ fieldName
 * @param minLength - ÃÖ¼Ò ÀÔ·Â°ª(byte ´ÜÀ§, 0 ÀÌ¸é null Çã¿ë)
 * @param maxLength - ÃÖ´ë ÀÔ·Â°ª(byte ´ÜÀ§)
 * @return boolean
 */
function isUrl(obj, fieldName, minLength, maxLength) {
	return (isRegularExpression(REGULAR_URL, obj, fieldName, minLength, maxLength)) ? true : false;
}


/**
 * Email Çü½ÄÀ» Ã¼Å©ÇØÁÖ´Â ¸Þ¼Òµå
 * @param obj - input control
 * @param fieldName - È­¸éÀÇ fieldName
 * @param minLength - ÃÖ¼Ò ÀÔ·Â°ª(byte ´ÜÀ§, 0 ÀÌ¸é null Çã¿ë)
 * @param maxLength - ÃÖ´ë ÀÔ·Â°ª(byte ´ÜÀ§)
 * @return boolean
 */
function isEmail(obj, fieldName, minLength, maxLength) {
	return (isRegularExpression(REGULAR_EMAIL, obj, fieldName, minLength, maxLength)) ? true : false;
}


/**
 * ÀüÈ­¹øÈ£ Çü½ÄÀ» Ã¼Å©ÇØÁÖ´Â ¸Þ¼Òµå
 * ÀÌ °æ¿ì, ³Ñ¾î¿À´Â ÀüÈ­¹øÈ£ÀÇ Çü½ÄÀº (01X-XXXX-XXXX)ÀÌ³ª,  (01X-XXX-XXXX) ÀÌ¾î¾ß ÇÑ´Ù.
 * @param obj - input control
 * @param fieldName - È­¸éÀÇ fieldName
 * @param minLength - ÃÖ¼Ò ÀÔ·Â°ª(byte ´ÜÀ§, 0 ÀÌ¸é null Çã¿ë)
 * @param maxLength - ÃÖ´ë ÀÔ·Â°ª(byte ´ÜÀ§)
 * @return boolean
 */
function isPhoneNumberDash(obj, fieldName, minLength, maxLength) {
	return (isRegularExpression(REGULAR_PHONE_NUMBER_DASH, obj, fieldName, minLength, maxLength)) ? true : false;
}


/**
 * ÀüÈ­¹øÈ£ Çü½ÄÀ» Ã¼Å©ÇØÁÖ´Â ¸Þ¼Òµå
 * ÀÌ °æ¿ì, ³Ñ¾î¿À´Â ÀüÈ­¹øÈ£ÀÇ Çü½ÄÀº (01ABBBBCCCC)ÀÌ³ª,  (01ABBBCCCC) ÀÌ¾î¾ß ÇÑ´Ù.
 * @param obj - input control
 * @param fieldName - È­¸éÀÇ fieldName
 * @param minLength - ÃÖ¼Ò ÀÔ·Â°ª(byte ´ÜÀ§, 0 ÀÌ¸é null Çã¿ë)
 * @param maxLength - ÃÖ´ë ÀÔ·Â°ª(byte ´ÜÀ§)
 * @return boolean
 */
function isPhoneNumber(obj, fieldName, minLength, maxLength) {
	return (isRegularExpression(REGULAR_PHONE_NUMBER, obj, fieldName, minLength, maxLength)) ? true : false;
}

/**
 * Æ¯¼ö¹®ÀÚ È®ÀÎ 
 * @param obj - input control
 * @param fieldName - È­¸éÀÇ fieldName
 * @param minLength - ÃÖ¼Ò ÀÔ·Â°ª(byte ´ÜÀ§, 0 ÀÌ¸é null Çã¿ë)
 * @param maxLength - ÃÖ´ë ÀÔ·Â°ª(byte ´ÜÀ§)
 * @return boolean
 */
function isSpecial(obj, fieldName, minLength, maxLength, customRegExp) {
	var regExpStr = "";
	for(i = 0; i < customRegExp.length; i++) {
		if(customRegExp[i] == REGULAR_NUMBER) {
			regExpStr += "0-9";
		} else if(customRegExp[i] == REGULAR_ALPHABET) {
			regExpStr += "a-zA-Z";
		} else if(customRegExp[i] == REGULAR_ALPHABET_NUMBER) {
			regExpStr += "0-9a-zA-Z";
		} else if(customRegExp[i] == REGULAR_DOT) {
			regExpStr += ".";
		} else if(customRegExp[i] == REGULAR_COMMA) {
			regExpStr += ",";
		} else if(customRegExp[i] == REGULAR_SPACE) {
			regExpStr += " ";
		} else if(customRegExp[i] == REGULAR_UNDERBAR) {
			regExpStr += "_";
		} else if(customRegExp[i] == REGULAR_DASH) {
			regExpStr += "-";
		}
		
	}
	return isRegularExpression(REGULAR_CUSTOM, obj, fieldName, minLength, maxLength, regExpStr) ?  true : false;
}

/**
 * ³»ºÎ »ç¿ë method
 * °³¹ßÀÚÀÇ Direct Á¢±ÙÀº Çã¿ëÇÏÁö ¾Ê½À´Ï´Ù.
 * obj °¡ text, textarea, password type ÀÏ°æ¿ì obj.select() ½ÇÇà
 */
function objFocus(obj) {
	var type = getType(obj);	
	
	if(type == "text" || type == "textarea" || type == "password") {
		obj.select();
	}
}


/**
 * ³»ºÎ »ç¿ë mthod
 * °³¹ßÀÚÀÇ Direct Á¢±ÙÀº Çã¿ëÇÏÁö ¾Ê½À´Ï´Ù.
 * obj ÀÇ type À» Á¶È¸ ´Ü array ÇüÅÂÀÏ °æ¿ì [0]¹øÂ° ÀÎµ¦½ºÀÇ °ªÀ» °¡Áö°í ¿È
 * TODO : arrayÇüÅÂÀÇ µ¥ÀÌÅ¸ÀÏ °æ¿ì À¯È¿¼º °ËÁõÀ» ÇÒ °ÍÀÎÁö Á¤ÇØ¾ßÇÔ
 */
function getType(obj) {
	var type = "";
	
	if(obj.length == undefined) {
		type = obj.getAttribute("type");
	} else {
		type = obj[0].getAttribute("type");
				
		if(type == null) {
			type = obj.getAttribute("type");			
		}
	}
	
	return type;
}


/**
 * ³»ºÎ »ç¿ë method
 * °³¹ßÀÚÀÇ Direct Á¢±ÙÀº Çã¿ëÇÏÁö ¾Ê½À´Ï´Ù.
 * obj ÀÇ value¸¦ Á¶È¸ÇÑ´Ù. 
 * checkbox, radio ÀÎ °æ¿ì checked ¿©ºÎ¿¡ ´Ù¶ó 'true' ¸¦ ¸®ÅÏÇÑ´Ù.  
 */
function getValue(obj) {
	var inputStr = "";
	var type = getType(obj);
	
	if(obj.length == undefined) {		 
		if(type == "radio" || type == "checkbox") {		
			if(obj.checked) {
				inputStr = "true";
			}
		} else {
			inputStr = obj.value;
		}
	} else {
		if(type == "select-one" || type == "select-multiple") {
			inputStr = obj.value;
		} else {
			for(var i = 0; i < obj.length; i++) {
				if(obj[i].checked) {
					inputStr = "true";
					break;
				}
			}
		}
	}
	
	return inputStr;
}


/**
 * ³»ºÎ »ç¿ë method
 * °³¹ßÀÚÀÇ Direct Á¢±ÙÀº Çã¿ëÇÏÁö ¾Ê½À´Ï´Ù.
 * obj ÀÇ length¸¦ Á¶È¸ÇÑ´Ù.   
 */
function getLength(obj) {
	var rtnLenth;
	
	if (obj.length == undefined) {
		rtnLength = 1;
	} else {
		rtnLength = obj.length;
	}		
	return rtnLength
}


/**
 * ³»ºÎ »ç¿ë method
 * °³¹ßÀÚÀÇ Direct Á¢±ÙÀº Çã¿ëÇÏÁö ¾Ê½À´Ï´Ù.
 * @param regularExpression - Á¤±Ô½Ä
 * @param obj - input field
 * @param fieldName - field ¸í
 * @param minLength - ÃÖ¼Ò ±æÀÌ
 * @param maxLength - ÃÖ´ë ±æÀÌ
 * @return boolean
 */
function isRegularExpression(regularExpression, obj, fieldName, minLength, maxLength, customRegExp) {
	if (!isArgValidate(obj, fieldName, minLength, maxLength)) return false;
	
	var type = getType(obj);
	var inputStr = getValue(obj);
	var inputStrSize = getByteSize(obj);
	
	
	var regAlertMessage = "";
	if (regularExpression == REGULAR_NUMBER) {
		regAlertMessage = "¼ýÀÚ";			
	} else if (regularExpression == REGULAR_ALPHABET) {
		regAlertMessage = "¿µ¹®";
	} else if (regularExpression == REGULAR_ALPHABET_NUMBER) {
		regAlertMessage = "¿µ¹® ¶Ç´Â ¼ýÀÚ";
	} else if (regularExpression == REGULAR_URL) {
		regAlertMessage = "URL ÁÖ¼Ò";
	} else if(regularExpression == REGULAR_EMAIL) {
		regAlertMessage = "EMAIL ÁÖ¼Ò";
	} else if(regularExpression == REGULAR_PHONE_NUMBER) {
		regAlertMessage = "ÀüÈ­ ¹øÈ£";
	} else if(regularExpression == REGULAR_CUSTOM) {
		regAlertMessage = "Æ¯¼ö¹®ÀÚ°¡ Æ÷ÇÔµÈ ";
	}
	
	

	// NULL Ã¼Å©
	if (minLength > 0 && inputStr == "") {		
		if (type == "hidden" || type == "text" || type == "file" || type == "password") {
			var alertMessage = "";		
			alertMessage = fieldName + "Àº(´Â) ÇÊ¼ö Ç×¸ñÀÔ´Ï´Ù.\n\n";
			if (minLength != maxLength) {
				alertMessage += fieldName + "Àº(´Â) " + regAlertMessage + " " + minLength + "ÀÚ ÀÌ»ó, " + regAlertMessage + " " + maxLength + "ÀÚ ÀÌÇÏ¸¸ °¡´ÉÇÕ´Ï´Ù.\n";
				if(regularExpression == REGULAR_TEXT) {
					alertMessage += "(ÇÑ±ÛÀº " + Math.ceil(minLength / 2) + "ÀÚ ÀÌ»ó, " + Math.floor(maxLength / 2) + "ÀÚ ÀÌÇÏ)";
				}
			} else {
				alertMessage += fieldName + "Àº(´Â) " + regAlertMessage + " " + minLength + "ÀÚ¸¸ °¡´ÉÇÕ´Ï´Ù.\n";
				if(regularExpression == REGULAR_TEXT) {
					alertMessage += "(ÇÑ±ÛÀº " + Math.ceil(minLength / 2) + "ÀÚ ÀÌ»ó, " + Math.floor(maxLength / 2) + "ÀÚ ÀÌÇÏ)";
				}
			}
			showMessage(alertMessage);
		} else {
			showMessage(fieldName + "Àº(´Â) ÇÊ¼ö Ç×¸ñÀÔ´Ï´Ù.\n\n");			
		}
		objFocus(obj);
		return false;
	}
	
	var regExp = new RegExp(makeRegularExpression(regularExpression, minLength, maxLength, customRegExp));
			
	// Á¤±Ô½Ä Ã¼Å©
	if (regExp.test(obj.value.replaceAll("\r\n", "<br>"))) {
		return true;	
	} else {		
		regAlertMessage = fieldName + "Àº(´Â) " + regAlertMessage + " Çü½Ä¸¸ °¡´ÉÇÕ´Ï´Ù.\n";
		objFocus(obj);
		showMessage(regAlertMessage);
		
		return false;
	}
	
	
	if (maxLength != -1) {

		// MAX SIZE Ã¼Å©
		if (minLength < 2 && inputStrSize > maxLength) {
			var alertMessage = "";	
			if (minLength != maxLength) {
				alertMessage = fieldName + "Àº(´Â) " + regAlertMessage + " " + maxLength + "ÀÚ ÀÌÇÏ¸¸ °¡´ÉÇÕ´Ï´Ù.\n";
				if(regularExpression == REGULAR_TEXT) {
					alertMessage += "(ÇÑ±ÛÀº " + Math.floor(maxLength / 2) + "ÀÚ ÀÌÇÏ)";
				}
			} else {
				alertMessage = fieldName + "Àº(´Â) " + regAlertMessage + " " + maxLength + "ÀÚ¸¸ °¡´ÉÇÕ´Ï´Ù.\n";
				if(regularExpression == REGULAR_TEXT) {
					alertMessage += "(ÇÑ±ÛÀº " + Math.floor(maxLength / 2) + "ÀÚ)";
				}
			}
			objFocus(obj);
			showMessage(alertMessage);
			return false;	
		}
		
		// MIN BETWEEN MAX SIZE Ã¼Å©
		if (!(inputStrSize >= minLength && inputStrSize <= maxLength)) {
			var alertMessage = "";
			if (minLength != maxLength) {
				alertMessage = fieldName + "Àº(´Â) " + regAlertMessage + " " + minLength + "ÀÚ ÀÌ»ó " + maxLength + "ÀÚ ÀÌÇÏ¸¸ °¡´ÉÇÕ´Ï´Ù.\n";
				if(regularExpression == REGULAR_TEXT) {
					alertMessage += "(ÇÑ±ÛÀº " + Math.ceil(minLength / 2) + "ÀÚ ÀÌ»ó, " + Math.floor(maxLength / 2) + "ÀÚ ÀÌÇÏ)";
				}
			} else {
				alertMessage = fieldName + "Àº(´Â) " + regAlertMessage + " " + minLength + "ÀÚ¸¸ °¡´ÉÇÕ´Ï´Ù.\n";
				if(regularExpression == REGULAR_TEXT) {
					alertMessage += "(ÇÑ±ÛÀº " + Math.floor(minLength / 2) + "ÀÚ)";
				}
			}
			objFocus(obj);
			showMessage(alertMessage);
			return false;	
		}
	}
}


/**
 * ³»ºÎ »ç¿ë method
 * °³¹ßÀÚÀÇ Direct Á¢±ÙÀº Çã¿ëÇÏÁö ¾Ê½À´Ï´Ù.
 * argument ÀÇ À¯È¿¼ºÀ» Ã¼Å©ÇÑ´Ù.
 * 1. obj °¡ Á¤»óÀûÀÎ °´Ã¼ÀÎÁö È®ÀÎÇÑ´Ù.
 * 2. argument°¡ Á¤»óÀûÀÎÁö È®ÀÎÇÑ´Ù.
 * 3. Áö¿øµÇÁö ¾Ê´Â array ÇüÅÂ¸¦ È®ÀÎÇÑ´Ù.(radio, checkbox, select ¸¸ array ÇüÅÂ Áö¿ø)
 * @param obj - input field
 * @param fieldName - field ¸í
 * @param minLength - ÃÖ¼Ò ±æÀÌ
 * @param maxLength - ÃÖ´ë ±æÀÌ
 */
function isArgValidate(obj, fieldName, minLength, maxLength) {
	var validAlertMessage;
	
	if(obj != '[object]' && obj != '[object HTMLInputElement]') {
		validAlertMessage = "[DEBUG] Àß¸øµÈ object ÀÔ´Ï´Ù.";
		validAlertMessage += "\n obj : " + obj;
		showMessage(validAlertMessage);
		return false;
	} else {
		if(fieldName == undefined || minLength == undefined || maxLength == undefined) {
			var validAlertMessage = "[DEBUG] argument ´Â undefined ÀÏ ¼ö ¾ø½À´Ï´Ù.";
			validAlertMessage += "\n obj       : " + obj;
			validAlertMessage += "\n fieldName : " + fieldName;
			validAlertMessage += "\n minLength : " + minLength;
			validAlertMessage += "\n maxLength : " + maxLength;			
			showMessage(validAlertMessage);
			return false;
		} else {		
			var type = getType(obj)
			var inputLength = getLength(obj);
			
			if(inputLength > 1 && !(type == "radio" || type == "checkbox" || type == "select-one" || type == "select-multiple")) {
				validAlertMessage  = "[DEBUG] ARRAY Çü½ÄÀº Áö¿øµÇÁö ¾Ê½À´Ï´Ù.";
				validAlertMessage += "\n fieldName : " + fieldName;
				validAlertMessage += "\n length    : " + inputLength;
				showMessage(validAlertMessage);
				return false;
			} else {
				if(type == "text" || type == "textarea" || type == "password") {				
					obj.value = obj.value.trim();
				}			
				return true;
			}
		}
	}
}


/**
 * ³»ºÎ »ç¿ë method
 * °³¹ßÀÚÀÇ Direct Á¢±ÙÀº Çã¿ëÇÏÁö ¾Ê½À´Ï´Ù.
 * Á¤±Ô½ÄÀ» »ý¼ºÇØÁØ´Ù.
 * @param regularExpression - Á¤±Ô½Ä
 * @param minLength - ÃÖ¼Ò ±æÀÌ
 * @param maxLength - ÃÖ´ë ±æÀÌ
 */
function makeRegularExpression(regularExpression, minLength, maxLength, customRegExp) {
	var rtnRegularExpression = "";

	if(maxLength == -1) {
		maxLength = "";
	}
	
	if(regularExpression == REGULAR_NUMBER) {
		rtnRegularExpression = "^[0-9]{" + minLength + "," + maxLength + "}$";
	} else if(regularExpression == REGULAR_ALPHABET) {
		rtnRegularExpression = "^[a-zA-Z]{" + minLength + "," + maxLength + "}$";
	} else if(regularExpression == REGULAR_ALPHABET_NUMBER) {
		rtnRegularExpression = "^[0-9a-zA-Z]{" + minLength + "," + maxLength + "}$";
	} else if(regularExpression == REGULAR_URL) {
		rtnRegularExpression = "^https?:\/\/.{" + minLength + "," + maxLength + "}$";
	} else if(regularExpression == REGULAR_EMAIL) {
		rtnRegularExpression = "[a-z0-9]{2,}@[a-z0-9-]{2,}\.[a-z0-9]{2,}";
	} else if(regularExpression == REGULAR_PHONE_NUMBER) {
		rtnRegularExpression = "(01[01346-9])([1-9]{1}[0-9]{2,3})([0-9]{4})";
	} else if(regularExpression == REGULAR_PHONE_NUMBER_DASH) {
		rtnRegularExpression = "(01[01346-9])-([1-9]{1}[0-9]{2,3})-([0-9]{4})";
	} else if(regularExpression == REGULAR_CUSTOM) {
		rtnRegularExpression = "^[" + customRegExp + "]{" + minLength + "," + maxLength + "}$";
	} else {
		rtnRegularExpression = "^.{" + minLength + "," + maxLength + "}$";
	}

	return rtnRegularExpression;
}


/**
 * input controlÀÇ byte »çÀÌÁî¸¦ Á¶È¸ÇÑ´Ù.
 * @param obj - input field
 * @return byte size
 */
function getByteSize(obj) {
	var type = "";
	
	if(obj.length == undefined) {
		type = obj.getAttribute("type");
	} else {
		type = obj[0].getAttribute("type");
	}

	if(type == "checkbox" || type == "radio") {
		var rtnVal = 0;
		if(obj.length == undefined) {
			if(obj.checked) {
				rtnVal = 1;
			} 
		} else {
			for(var i = 0; i < obj.length; i++) {
				if(obj[i].checked) {
					rtnVal = 1;
					break;
				}
			}		
		}
		return rtnVal;
	}
				
	var str = obj.value;
    var sum = 0;
    var len = str.length;
    for(var i = 0; i < len; i++) {
        var ch = str.substring(i, i + 1);
        var en = escape(ch);
        if(en.length <= 4) {
            sum++;
        } else {
            sum += 2;
        }
    }
    return sum;
}

function substringGetByte(obj, byte){
	var str = obj.value;
	var returnValue = "";
    var sum = 0;
    var len = str.length;
    for(var i = 0; i < len; i++) {
        var ch = str.substring(i, i + 1);
        var en = escape(ch);
        if(en.length <= 4) {
            sum++;
        } else {
            sum += 2;
        }
        if(sum > byte){
        	returnValue = str.substring(0,i-2);
        	break;
        }
    }
    if(returnValue == ''){
    	return str;
    }else{
	    return returnValue;
    }
}


/**
 * ³»ºÎ »ç¿ë method
 * °³¹ßÀÚÀÇ Direct Á¢±ÙÀº Çã¿ëÇÏÁö ¾Ê½À´Ï´Ù.
 * @param winObj - À©µµ¿ì Object
 */
function moveToCenter(winObj) {
	var width  = arguments[1] == null ? 490 : Number(arguments[1]);
	var height = arguments[2] == null ? 235 : Number(arguments[2]);

	winObj.moveTo(screen.width  ? (screen.width  - width)  / 2 : 0,
		            screen.height ? (screen.height - height) / 2 : 0);
}


/**
 * µÎ °³ÀÇ ¹®ÀÚ¿­À» ºñ±³ ÇÕ´Ï´Ù.
 * ºñ±³ ¹®ÀÚ¿­ÀÌ °°À¸¸é true, ´Ù¸£¸é false.
 * @param arg1 - ºñ±³ÇÒ ¹®ÀÚ¿­1 
 * @param arg2 - ºñ±³ÇÒ ¹®ÀÚ¿­2
 */
function isStringCompare(arg1, arg2) {
	if(arg1.trim() == arg2.trim()){
		return true;
	} else {
		return false;
	}
} 


/**
 * µÎ °³ÀÇ ½ÃÀÛ³¯Â¥¿Í ³¡³¯Â¥ »çÀÌÀÇ ±â°£À» ºñ±³ ÇÕ´Ï´Ù.
 * µÎ ³¯Â¥ ±â°£ÀÌ ¿Ã¹Ù¸£¸é true, ¿Ã¹Ù¸£Áö ¾ÊÀ¸¸é false.
 * @param arg1 - ºñ±³ÇÒ ½ÃÀÛ³¯Â¥
 * @param arg2 - ºñ±³ÇÒ ³¡³¯Â¥
 */
function isDateOrder(obj1, obj2) {
	isNumeric(obj1, '', 8, 8);
	isNumeric(obj2, '', 8, 8);
	
	if(parseInt(obj1.value) <= parseInt(obj2.value)) {
		return true;
	} else {
		alert('ÀÔ·Â µÈ °ªÀÇ Å©±â°¡ Àß¸ø µÇ¾ú½À´Ï´Ù.');
		return false;
	}
}


/**
 * Form Submit À» À§ÇÑ Enter Key¸¦ È®ÀÎÇÕ´Ï´Ù.
 * Enter Key ÀÎ °æ¿ì doSubmit À» È£ÃâÇÕ´Ï´Ù.
 * @param actionName - ¾×¼Ç¸í
 */
function doEnter(actionName) {
	if(event.keyCode == 13) {
		doSubmit(actionName);
	}  
}
///////////////////////////// ¿©±â±îÁö!! ///////////////////////////////////////

/******************************************************************************
* Framework¿¡¼­ °øÅëÀ¸·Î Á¦°øÇÏ´Â ºÎºÐÀÔ´Ï´Ù.
* ¼­ºñ½º¿¡ ¸Â°Ô ¼öÁ¤ÇØÁÖ¼¼¿ä!!
******************************************************************************/

/**
 * ÆÄÀÏ ´Ù¿î·Îµå
 * Context Root°¡ '/'°¡ ¾Æ´Ï¶ó¸é, url¿¡ /download ¾Õ¿¡ Context Root¸¦ ±âÀÔÇØÁÖ¼¼¿ä!!
 * ¿¹) Context Root°¡ /COMMON_API¶ó¸é, /COMMON_API/dowload ·Î º¯°æ
 * @param actionName - ´Ù¿î·Îµå ¾×¼Ç¸í
 * @param fileName - ´Ù¿î·Îµå ÆÄÀÏ¸í
 * @param filePath - ´Ù¿î·Îµå ÆÄÀÏ ÆÐ½º¸í(base repository ÀÌÇÏ fullPath)
 * @param actionParam - ´Ù¿î·Îµå ¾×¼ÇÀÇ ÆÄ¶ó¹ÌÅÍ¸í
 */
function download(actionName, fileName, filePath, actionParam) {
	url = "/download/" + actionName + ".action?fileName=" + fileName + "&filePath=" + filePath + actionParam;
	location.href = url;
}




/**
 * Calendar Ã¢À» ¶ç¿öÁØ´Ù.
 * Context Root°¡ '/'°¡ ¾Æ´Ï¶ó¸é, window.showModalDialog Ã¹¹øÂ° ÆÄ¶ó¹ÌÅÍ url¿¡ /common.. ¾Õ¿¡ Context Root¸¦ ±âÀÔÇØÁÖ¼¼¿ä!!
 * @param obj - input field
 * @return date
 */
function showCalendar(obj) {
	var result = "false";
	result = window.showModalDialog('/common/calendar.html','cal','dialogWidth:252px;dialogHeight:266px;center:yes;help:no;status:no;scroll:no;resizable:no;title:no;');
	if(result == null)
		return;

	if(result.length != 3)
		return;

	obj.value  = result[0] + result[1] + result[2];
}



/**
 * ¸Þ½ÃÁö¸¦ º¸¿©ÁÖ´Â method
 * msgWindow methodÀÇ µÎ¹øÂ° ÆÄ¶ó¹ÌÅÍ¿¡ µû¶ó º¸¿©ÁÖ´Â Ã¢ÀÇ ÇüÅÂ°¡ ´Ù¸£´Ù.
 * "Y" : ±âº» alertÃ¢À¸·Î º¸¿©ÁÖ±â
 * "N" : ·¹ÀÌ¾îÃ¢À¸·Î º¸¿©ÁÖ±â
 * @param message - Ç¥½ÃÇÒ ¸Þ¼¼Áö
 */
function showMessage(message) {
	msgWindow(message, "Y");
} 


/**
 * JSP¿¡¼­ µî·Ï/¼öÁ¤/»èÁ¦ µîÀÇ Ã³¸® ÈÄ È®ÀÎ ¸Þ¼¼Áö¸¦ Ç¥½ÃÇØÁÖ´Â ¸Þ¼Òµå
 * ¸Þ¼¼ÁöÃ¢¿¡ ´ëÇÑ µðÀÚÀÎÀº common.css¿¡ msg_tbl Å¬·¡½º¿¡¼­ ÁöÁ¤°¡´ÉÇÏ´Ù.
 * ´Ü, ¸Þ¼¼Áö Ã¢ tableÀÇ °¡·Î/¼¼·Î »çÀÌÁî´Â ¿©±â¼­ ¼öÁ¤ÇØ¾ß ÇÑ´Ù. 
 * ¿Ö³ÄÇÏ¸é, Ã¢ÀÇ Áß¾ÓÁ¤·Ä ±â´É¶§¹®¿¡ °¡·Î/¼¼·Î »çÀÌÁî´Â common.css¿¡¼­ ÁöÁ¤ÇÒ ¼ö ¾ø´Ù.
 * ÀüÃ¼ ºê¶ó¿ìÀú¿¡ Ç¥½ÃµÇ´Â ·¹ÀÌ¾îÀÇ ½ºÅ¸ÀÏÀº common.css¿¡ msg_background Å¬·¡½º¿¡¼­ ÁöÁ¤°¡´ÉÇÏ´Ù.
 * @param message - Ç¥½ÃÇÒ ¸Þ¼¼Áö
 * @param isAlert - ¾Ë·µÃ¢À¸·Î Ç¥½Ã¿©ºÎ(Y:¾Ë·µÃ¢, N:·¹ÀÌ¾î)
 */
function msgWindow(message, isAlert) {
	if(isAlert == 'N') {
		// ¸Þ¼¼Áö Ã¢ tableÀÇ °¡·Î/¼¼·Î Å©±â
		var height = 130; 
		var width = 250; 
		
		message = message.replaceAll('\n', '<br/>');
		
		var layerAlert = "";
		layerAlert += "<table border='1' cellpadding='0' cellspacing='0' style='width:" + width + ";height:" + height + ";' class='msg_tbl'>";
		layerAlert += "	 <tr style='height:120'>";
		layerAlert += "    <td align='center'><b>" + message + "</b></td>";
	   	layerAlert += "  </tr>";
	   	layerAlert += "  <tr>";
	   	layerAlert += "    <td align='right'>";
	   	layerAlert += "      <input type='button' name='btnMsg' value='È®ÀÎ' onclick='javascript:closeMsgWindow();'/>";
	   	layerAlert += "    </td>";
	   	layerAlert += "  </tr>";
	   	layerAlert += "</table>";
	   	
		var messageObj;
		var bgObj;
		
		// background
		if (document.getElementById("divbackground") != "[object]") {
		   	bgObj = document.createElement('div');
		   	bgObj.setAttribute("id", "divbackground");
		   	document.body.appendChild(bgObj);
		} else {
		  	bgObj = document.getElementById("divbackground");
		}
		
		try {bgObj.style.opacity = 0.8;} catch(e) {}
		try {bgObj.style.MozOpacity = 0.8;} catch(e) {}
		try {bgObj.style.filter = 'alpha(opacity=80)';} catch(e) {}
		try {bgObj.style.KhtmlOpacity = 0.8;} catch(e) {}
		bgObj.style.height = document.body.clientHeight + "px";
		bgObj.style.width = document.body.clientWidth + "px";
		bgObj.className = "msg_background";
		bgObj.style.display = 'block';
		
		// message view
		if (document.getElementById("divmsg") != "[object]") {
		   	messageObj = document.createElement('DIV');
		   	messageObj.setAttribute('id', 'divmsg');
		   	document.body.appendChild(messageObj);
		} else {
		   	messageObj = document.getElementById("divmsg");
		}
		
		messageObj.innerHTML = layerAlert;
		messageObj.style.position = "absolute";
		messageObj.style.top = (document.body.clientHeight - height) / 2 + "px"; 
		messageObj.style.left = (document.body.clientWidth - width) / 2 + "px";
		
		document.getElementById("divmsg").style.display = 'block';
	} else {
		// alert Ã¢À¸·Î ¸Þ¼¼Áö Ç¥½ÃÇÏ±â
		alert(message);
	}
}

//############################ COOKIE ############################
/**
* setCookie
*/
function setCookie(name, value ){ 
  var today = new Date();
  today.setDate( today.getDate() + 7 );
  document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + today.toGMTString() + ";"
}

/**
*	delCookie
*/
function delCookie(name){
	var today = new Date();
	today.setDate(today.getDate() -1);
	document.cookie = name + "=;expires=" + today.toGMTString() + ";";
}

/**
*	getCookie
*/
function getCookie(name) { 
	var index = document.cookie.indexOf(name + "="); 
	if (index == -1) return ""; 
	index = document.cookie.indexOf("=", index) + 1; 
	var endstr = document.cookie.indexOf(";", index); 
	if (endstr == -1) endstr = document.cookie.length; 
	return unescape(document.cookie.substring(index, endstr)); 
} 


/**
  * ÁÖ¹Îµî·Ï¹øÈ£ À¯È¿¼º Ã¼Å©
  */
 function checkJuminNumber(obj1, obj2){
 	var resident1 = obj1.value;
 	var resident2 = obj2.value;
 	if(!isNumeric(obj1, "ÁÖ¹Îµî·Ï¹øÈ£ ¾ÕÀÚ¸®", 6,6)) return;
 	if(!isNumeric(obj2, "ÁÖ¹Îµî·Ï¹øÈ£ µÞÀÚ¸®", 7,7)) return;
 	var juminNumber = resident1 + resident2;

  	// ÁÖ¹Î¹øÈ£ÀÇ ÇüÅÂ¿Í 7¹øÂ° ÀÚ¸®(¼ºº°) À¯È¿¼º °Ë»ç
  	fmt = /^\d{6}[1234]\d{6}$/;

	if( !fmt.test( juminNumber ) ){
	 alert("Àß¸øµÈ ÁÖ¹Îµî·Ï¹øÈ£ÀÔ´Ï´Ù.");
	 return false;
	}

	// ³¯Â¥ À¯È¿¼º °Ë»ç
	birthYear  = ( juminNumber.charAt(7) <= "2" ) ? "19" : "20";
	birthYear += juminNumber.substr( 0, 2 );
	birthMonth = juminNumber.substr( 2, 2 ) - 1;
	birthDate  = juminNumber.substr( 4, 2 );
	
	birth = new Date( birthYear, birthMonth, birthDate );
	
	if( birth.getYear() % 100 != juminNumber.substr( 0, 2 )){
		alert("Àß¸øµÈ ÁÖ¹Îµî·Ï¹øÈ£ÀÔ´Ï´Ù.");
		return false;
	}

	// Check Sum ÄÚµåÀÇ À¯È¿¼º °Ë»ç
	buf = new Array( 13 );
	
	for( i = 0; i < 6; i++ ) buf[i] = parseInt( juminNumber.charAt( i ) );
	for( i = 6; i < 13; i++ ) buf[i] = parseInt( juminNumber.charAt( i ) );
	
	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] );
	
	if( ( 11 - ( sum % 11 ) ) % 10 != buf[12] ){
		alert("Àß¸øµÈ ÁÖ¹Îµî·Ï¹øÈ£ÀÔ´Ï´Ù.");
		return false;
	}
	return true;
 }

//¼ýÀÚ¸¸ ÀÔ·Â°¡´ÉÇÏ°Ô
function setNum(evt){
	var eCode = (window.netscape) ? evt.which : event.keyCode;
	//if( navigator.appName.indexOf("Microsoft") > -1 ){ // ¸¶ÀÌÅ©·Î¼ÒÇÁÆ® ÀÍ½ºÇÃ·Î·¯ÀÎÁö È®ÀÎ
	//	eCode = event.keyCode;
  	//}else{// ÀÍ½ºÇÃ·Î·¯°¡ ¾Æ´Ò °æ¿ì
	//	eCode = e.keyCode;
    //}
	//alert("eCode :: " + eCode);
	if(!(eCode > 47 && eCode <58) && eCode != 8 && eCode != 37 && eCode != 39 && eCode != 46 && eCode != 9 && eCode != 13 && !(eCode > 95 && eCode < 106) && eCode != 144 && eCode != 31 && eCode != 39){
		return false;
	}
}

//enter check
function enterCheck(evt){
	var eCode = (window.netscape) ? evt.which : event.keyCode;
	if(eCode == 13){
		return true;
	}else{
		return false;
	}
}
 
 /**
	°Ë»öÇÊµå¿¡´Â <SCRIPT> ÅÂ±× , '<', '>'Çã¿ë¾ÈÇÔ.
*/
function isSearchPermissionTag(obj, message){
	var text = getValue(obj).toUpperCase();
	var textTrim = text.replaceAll(" ", "");
	if(textTrim.indexOf("<") != -1 || textTrim.indexOf("&LT;") != -1){
		if(textTrim.indexOf("<SCRIPT") != -1 || textTrim.indexOf("&LT;SCRIPT") != -1){
			alert(message + "¿¡ <SCRIPT> TAG´Â »ç¿ëÇÏ½Ç¼ö ¾ø½À´Ï´Ù.");
			return false;
		}else{
			alert(message + "¿¡ '<'¸¦ »ç¿ëÇÒ¼ö¾ø½À´Ï´Ù");
			return false;
		}
	}else if(textTrim.indexOf(">") != -1 || textTrim.indexOf("&GT;") != -1){
			alert(message + "¿¡ '>'¸¦ »ç¿ëÇÒ¼ö¾ø½À´Ï´Ù");
			return false;
	}else{
		return true;
	}
}

/**
	º¸¾È»ó Çã¿ëµÇÁö¾Ê´Â TAG´Â ÀÔ·Â¸øÇÔ.
*/
function isPermissionTag(obj, message){
	var text = getValue(obj).toUpperCase();
//	alert(message + " : " + text);
	var textTrim = text.replaceAll(" ","");
//	alert("text ::: "+text);
//	alert("textTrim :: "+textTrim);
	if(textTrim.indexOf("<") != -1 || textTrim.indexOf("&LT;") != -1){
		if(textTrim.indexOf("<SCRIPT") != -1 || textTrim.indexOf("&LT;SCRIPT") != -1){
			alert(message + "¿¡ <SCRIPT> TAG´Â »ç¿ëÇÒ¼ö¾ø½À´Ï´Ù.");
			return false;
		}else if(textTrim.indexOf("<APPLET") != -1 || textTrim.indexOf("&LT;APPLET") != -1){
			alert(message + "¿¡ <APPLET> TAG´Â »ç¿ëÇÒ¼ö¾ø½À´Ï´Ù.");
			return false;
		}else if(textTrim.indexOf("<EMBED") != -1 || textTrim.indexOf("&LT;EMBED") != -1){
			alert(message + "¿¡ <EMBED> TAG´Â »ç¿ëÇÒ¼ö¾ø½À´Ï´Ù.");
			return false;
		}else if(textTrim.indexOf("<FORM") != -1 || textTrim.indexOf("&LT;FORM") != -1){
			alert(message + "¿¡ <FORM> TAG´Â »ç¿ëÇÒ¼ö¾ø½À´Ï´Ù.");
			return false;
		}else if(textTrim.indexOf("<IFRAME") != -1 || textTrim.indexOf("&LT;IFRAME") != -1){
			alert(message + "¿¡ <IFRAME> TAG´Â »ç¿ëÇÒ¼ö¾ø½À´Ï´Ù.");
			return false;
		}else if(textTrim.indexOf("<BODY") != -1 || textTrim.indexOf("&LT;BODY") != -1){
			alert(message + "¿¡ <BODY> TAG´Â »ç¿ëÇÒ¼ö¾ø½À´Ï´Ù.");
			return false;
		}else if(textTrim.indexOf("<LINK") != -1 || textTrim.indexOf("&LT;LINK") != -1){
			alert(message + "¿¡ <LINK> TAG´Â »ç¿ëÇÒ¼ö¾ø½À´Ï´Ù.");
			return false;
		}else if(textTrim.indexOf("<INPUT") != -1 || textTrim.indexOf("&LT;INPUT") != -1){
			alert(message + "¿¡ <INPUT> TAG´Â »ç¿ëÇÒ¼ö¾ø½À´Ï´Ù.");
			return false;
		}
		else if(textTrim.indexOf("<TABLE") != -1 || textTrim.indexOf("&LT;TABLE") != -1){
			alert(message + "¿¡ <TABLE> TAG´Â »ç¿ëÇÒ¼ö¾ø½À´Ï´Ù.");
			return false;
		}
		else if(textTrim.indexOf("<DIV") != -1 || textTrim.indexOf("&LT;DIV") != -1){
			alert(message + "¿¡ <DIV> TAG´Â »ç¿ëÇÒ¼ö¾ø½À´Ï´Ù.");
			return false;
		}
		else if(textTrim.indexOf("<IMG") != -1 || textTrim.indexOf("&LT;IMG") != -1){
			alert(message + "¿¡ <IMG> TAG´Â »ç¿ëÇÒ¼ö¾ø½À´Ï´Ù.");
			return false;
		}
//		else if(textTrim.indexOf("<IMG") != -1 || textTrim.indexOf("&LT;IMG") != -1){
//			var startIndex = text.indexOf("<IMG");
//			if(startIndex == -1){
//				startIndex = text.indexOf("&LT;IMG");
//			}
//			alert
//			var suStr = text.substring(startIndex);
//			alert("suStr ::: "+suStr);
//			var endIndex = suStr.indexOf(">");
//			if(endIndex == -1){
//				endIndex = suStr.indexOf("&GT;");
//				if(endIndex == -1){
//					endIndex = suStr.length;
//				}
//			}
//			var newText = suStr.substring(0, endIndex);
				
			//alert("newText ::: "+newText);
//			var textArr = newText.split(" ");
//			var returnValue = false;
//			for(var i = 0 ; i<textArr.length ; i++){
				//alert("textARR ::: "+textArr[i]);
//				if(textArr[i].indexOf("<") != -1 || textArr[i].indexOf("&LT;") != -1 
//					|| textArr[i].indexOf("IMG") != -1 || textArr[i].indexOf("<IMG") != -1 || textArr[i].indexOf("&LT;IMG") != -1 
//					|| textArr[i].indexOf("SRC") != -1 || textArr[i].indexOf("ALT") != -1
//					|| textArr[i].indexOf("HSPACE") != -1 || textArr[i].indexOf("WIDTH") != -1
//					|| textArr[i].indexOf("HEIGHT") != -1 || textArr[i].indexOf("ALIGN") != -1
//					|| textArr[i].indexOf("VSPACE") != -1 || textArr[i].indexOf("BORDER") != -1){
//				}else{
//					returnValue = true;
//				}
//			}
//			if(returnValue){
//				alert(message + "¿¡ <IMG> TAG¿¡ Attribute´Â 'SRC', 'ALT',\n 'HSPACE', 'WIDTH', 'HEIGHT', 'ALIGN',\n 'VSPACE', 'BORDER' ¿Ü¿¡´Â »ç¿ëÇÏ½Ç¼ö ¾ø½À´Ï´Ù.");
//				return false;
//			}else{
//				return true;
//			}
//		}
		else{
			return true;
		}
	}else{
		return true;
	}
}
 


 
