<!--
function IsObj(oObj) { return ((typeof(oObj) != 'undefined') && (oObj != null)); }
function trim_all(pVal) { return (pVal.replace(/\s/g,'')); }
function trim(pVal) { return (pVal.replace(/(^\s+|\s+$)/g,'')); }
function trim_r(pVal) { return (pVal.replace(/\s+$/g,'')); }
function trim_l(pVal) { return (pVal.replace(/^\s+/g,'')); }
function is_empty(pVal) { return !(/\S+/.test(pVal)); }
function msg(msgtype, msg)
{
	if(msgtype == "ALERT") // alert
		return alert(msg);
	else if(msgtype == "CONFIRM") // confirm
		return confirm(msg);
	else
		return msg;
}
function openWin(file, name, width, height)
{
	var win = window.open(file, name, "menubar=no, scrollbars=yes, resizable=no, width=" + width + ", height=" + height);
}
function openWinOpt(file, name, width, height, menubar, status, scrollbars, resizable){	var win = window.open(file, name, "menubar="+menubar+", status="+status+", scrollbars="+scrollbars+", resizable="+resizable+", width=" + width + ", height=" + height);}
function len_byte(pVal) {
	var i, nLen = pVal.length, nDByte = 0;
	for (i = 0; i < nLen; i++) { if (pVal.charCodeAt(i) > 127) { nDByte++; } }
	return (nLen + nDByte);
}
function left_byte(pVal, pLen) {
	var i, nLen = pVal.length, nByte;
	var ret = '';
	var ret_len = 0;
	for (i = 0; i < nLen; i++) {
		nByte = 1;
		if (pVal.charCodeAt(i) > 127) { nByte++; }
		if (pLen < (ret_len + nByte)) { break; }
		ret += pVal.charAt(i);
		ret_len += nByte;
	}
	return ret;
}
function IsNumber(vText){
  for(j=0;j<vText.length;j++){
		var sstr = "0123456789";
		if (sstr.indexOf(vText.charAt(j)) == -1) { return false; }
  }
  return true;
}	
function GetByteCount(vText) {
	var nTextLen = vText.length;
	var nDoubleCharCnt = 0;
	for (var i = 0; i < nTextLen; i++) { if (vText.charCodeAt(i) > 255) nDoubleCharCnt++; }
	return (nTextLen + nDoubleCharCnt);
}
function IsEmpty(vText) {
	var nTextLen = vText.length;
	if (nTextLen == 0) { return true; }
	for (var i = 0; i < nTextLen; i++){ if (vText.charAt(i)!=' ') { return false;} }
	return true;
}
function ValidateTxtInput(vText, vIsMan, nMaxLen) {
	if (vIsMan == 'y') { if (IsEmpty(vText)) { return 0; } }
	if (nMaxLen > 0) { if (GetByteCount(vText) > nMaxLen) { return -1; } }
	return 1;
}
// ÇØ´ç¿ùÀÇ ¸¶Áö¸· ÀÏÀ» ±¸ÇÑ´Ù.
function lastDay(year,month) { 
	month = month - 1 	
	// Non-Leap year Month days..
	var DOMonth = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);  
	// Leap year Month days..
	var lDOMonth =new Array(31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); 
	if ((year % 4) == 0) {
		if ((year % 100) == 0 && (year % 400) != 0) {
			return DOMonth[month];
		}
			return lDOMonth[month];
		} else {
 			return DOMonth[month];
	}  
}
//-->
