<!--
/**
 '==============================================================================
 '#	INFORMATION
 '------------------------------------------------------------------------------
 '#	@Author 				: JJang. Jang,Seon-Joo (jeuse7@hanmail.net)
 '# @Reference 			: N/A
 '#	@FileName 			: Calendar.js
 '#	@Description		: Calendar °ü·Ã Å¬·¡½º
 '#	@Version 				: 1.0.0
 '#	@CreateDate 		: 2003.12.22
 '#	@UpdateDate 		: 2007.06.14
 '#	@Requirement 		: String.js
 '#	@Function List	: 
 '#		N/A
 '#		
 '==============================================================================
*/


/**
 * Calendar Constructor
 */
var __ObjCalendar = null;
var Calendar = function() {
	__ObjCalendar = this;
	this.IMG_URL = "/assets/JFW.JS/Calendar/img";
	this.DIV_NAME = "ID-DivCalendarBasis";
	this.INPUT_NAME = null;
	this.CONTROL_NAME = null;
	this.INPUT_OLD_NAME = null;
	this.CONTROL_OLD_NAME = null;
	this.OBJ_DIV = null;	
	this.OBJ_INPUT = null;
	this.OBJ_CONTROL = null;
	this.OBJ_INPUT_OLD = null;
	this.OBJ_CONTROL_OLD = null;
	this.INPUT_HEIGHT = 0;
	this.DIV_TOP = 0;
	this.DIV_LEFT = 0;
	this.IMG_ACTIVE = "_on";
	this.IMG_PASSIVE = "_off";
	this.setDate();
}

/**
 * Set Date
 */
Calendar.prototype.setDate = function() {
	this.NEW_DATE = new Date();
	this.TODAY_YEAR = this.NEW_DATE.getFullYear();
	this.TODAY_MONTH = (this.NEW_DATE.getMonth() + 1).toString().getAddZero(2);
	this.TODAY_DAY = this.NEW_DATE.getDate().toString().getAddZero(2);
	this.TODAY_DATE = this.TODAY_YEAR + "-" + this.TODAY_MONTH + "-" + this.TODAY_DAY;
	this.SELECT_YEAR = this.TODAY_YEAR;
	this.SELECT_MONTH = this.TODAY_MONTH;
	this.SELECT_DAY = this.TODAY_DAY;
	this.SELECT_DATE = this.TODAY_DATE;
	this.STARTING_YEAR = (parseInt(this.SELECT_YEAR, 10) - 3) < 1 ? 1 : (parseInt(this.SELECT_YEAR, 10) - 3);
	this.STARTING_MONTH = (parseInt(this.SELECT_MONTH, 10) - 3) < 1 ? 1 : (parseInt(this.SELECT_MONTH, 10) - 3);
	this.STARTING_MONTH = this.STARTING_MONTH > 6 ? 6 : this.STARTING_MONTH;
}

/**
 * Calendar Initialize
 * @param _inputName		(ÀÔ·ÂÇÊµå¸í)
 * @param _controlName	(ÄÁÆ®·Ñ¸í)
 */
Calendar.prototype.init = function(_inputName, _controlName) {
	if (parseInt(this.TODAY_YEAR, 10) != parseInt(new Date().getFullYear(), 10) ||
			parseInt(this.TODAY_MONTH, 10) != (parseInt(new Date().getMonth(), 10) + 1) ||
			parseInt(this.TODAY_DAY, 10) != parseInt(new Date().getDate(), 10)) this.setDate();	
	if (!this.OBJ_DIV) this.createDiv();
	if (!isEmptyTrim(this.INPUT_NAME)) this.INPUT_OLD_NAME = this.INPUT_NAME;
	if (!isEmptyTrim(this.CONTROL_NAME)) this.CONTROL_OLD_NAME = this.CONTROL_NAME;
	if (this.OBJ_INPUT) this.OBJ_INPUT_OLD = this.OBJ_INPUT;
	if (this.OBJ_CONTROL) this.OBJ_CONTROL_OLD = this.OBJ_CONTROL;
	if (!isEmptyTrim(_inputName)) this.INPUT_NAME = _inputName;
	if (!isEmptyTrim(_controlName)) this.CONTROL_NAME = _controlName;
	this.setObjInput();
	this.setObjControl();
	this.INPUT_HEIGHT = this.OBJ_INPUT.offsetHeight;
	this.DIV_TOP = 0;
	this.DIV_LEFT = 0;
	var ObjParent = this.OBJ_INPUT;
	if (ObjParent.offsetParent) {
		do {
			this.DIV_TOP += ObjParent.offsetTop;
			this.DIV_LEFT += ObjParent.offsetLeft;
		} while (ObjParent = ObjParent.offsetParent);
	}
	this.DIV_TOP += this.INPUT_HEIGHT;
	this.OBJ_DIV.style.top = this.DIV_TOP + "px";
	this.OBJ_DIV.style.left = this.DIV_LEFT + "px";
}

/**
 * Create Div
 */
Calendar.prototype.createDiv = function() {
	this.OBJ_DIV = document.createElement("DIV");
	this.OBJ_DIV.setAttribute("id", this.DIV_NAME);
	this.OBJ_DIV.style.position = "absolute";
	this.OBJ_DIV.style.width = "147px";
	this.OBJ_DIV.style.height = "156px";
	this.OBJ_DIV.style.top = this.DIV_TOP + "px";
	this.OBJ_DIV.style.left = this.DIV_LEFT + "px";
	this.OBJ_DIV.style.border = "0px";
	this.OBJ_DIV.style.backgroundColor = "#FFFFFF";
	this.OBJ_DIV.style.display = "none";
	this.OBJ_DIV.style.zIndex = "1000";
	document.body.appendChild(this.OBJ_DIV);
	
	this.createIframe();
		
	this.OBJ_BODY = document.createElement("DIV");
	this.OBJ_BODY.setAttribute("id", "ID-DivCalendarBody");
	this.OBJ_BODY.style.position = "absolute";
	this.OBJ_BODY.style.width = "147px";
	this.OBJ_BODY.style.height = "156px";
	this.OBJ_BODY.style.top = this.DIV_TOP + "px";
	this.OBJ_BODY.style.left = this.DIV_LEFT + "px";
	this.OBJ_BODY.style.border = "0px";
	this.OBJ_BODY.style.backgroundColor = "#FFFFFF";
	this.OBJ_BODY.style.display = "block";
	this.OBJ_BODY.style.zIndex = "1001";
	this.OBJ_DIV.appendChild(this.OBJ_BODY);
}

/**
 * Create IFRAME
 */
Calendar.prototype.createIframe = function() {
	var ObjIframe = document.createElement("IFRAME");
	ObjIframe.setAttribute("id", "ID-IframeCalendarBasis");
	ObjIframe.setAttribute("src", "about:blank");
	ObjIframe.setAttribute("frameBorder", "no");
	ObjIframe.setAttribute("width", "147px"); 
	ObjIframe.setAttribute("height", "156px");
	ObjIframe.style.border = "0px";
	ObjIframe.style.backgroundColor = "#FFFFFF";
	this.OBJ_DIV.appendChild(ObjIframe);
}

/**
 * Set Object Input
 */
Calendar.prototype.setObjInput = function() {
	if (!isEmptyTrim(this.INPUT_NAME)) {
		if (document.getElementsByName(this.INPUT_NAME).length > 1) {
			alert("The input object is 1 or more. ");
		} else {
			this.OBJ_INPUT = document.getElementById(this.INPUT_NAME);
			if (!this.OBJ_INPUT) alert("The input object does not exist. ");
		}
	} else {
		alert("The input name does not exist. ");
	}
}

/**
 * Set Object Control
 */
Calendar.prototype.setObjControl = function() {
	if (!isEmptyTrim(this.CONTROL_NAME)) {
		if (document.getElementsByName(this.CONTROL_NAME).length > 1) {
			alert("The control object is 1 or more. ");
		} else {
			this.OBJ_CONTROL = document.getElementById(this.CONTROL_NAME).getElementsByTagName("img")[0];
			if (!this.OBJ_CONTROL) alert("The control object does not exist. ");
		}
	}
}

/**
 * Active Calendar
 * @param _inputName		(ÀÔ·ÂÇÊµå¸í)
 * @param _controlName	(ÄÁÆ®·Ñ¸í)
 */
Calendar.prototype.active = function(_inputName, _controlName) {
	this.init(_inputName, _controlName);
	if (this.INPUT_NAME == this.INPUT_OLD_NAME) {		
		if (this.OBJ_DIV.style.display == "none") {
			this.activeSelected();
		} else {
			this.passiveSelected();
		}
	} else {
		this.passiveSelected();
		this.activeSelected();
	}
}

/**
 * Active Selected Calendar
 */
Calendar.prototype.activeSelected = function() {
	//try {
		if (isEmptyTrim(this.OBJ_INPUT.value)) {
			this.setDate();
		} else {
			var arrDateVal = this.OBJ_INPUT.value.split("-");
			this.SELECT_YEAR = arrDateVal[0];
			this.SELECT_MONTH = arrDateVal[1];
			this.SELECT_DAY = arrDateVal[2];
			this.SELECT_DATE = this.SELECT_YEAR + "-" + this.SELECT_MONTH + "-" + this.SELECT_DAY;
			if (new Date(this.SELECT_YEAR, parseInt(this.SELECT_MONTH, 10) - 1, this.SELECT_DAY) == "NaN") {
				this.setDate();
			}
		}
		this.createCalendar();
		if (this.OBJ_DIV) this.OBJ_DIV.style.display = "block";
		if (this.OBJ_CONTROL) this.OBJ_CONTROL.src = this.OBJ_CONTROL.src.replace(this.IMG_PASSIVE, this.IMG_ACTIVE);
	//} catch (E) {}
}

/**
 * Passive Selected Calendar
 */
Calendar.prototype.passiveSelected = function() {
	//try {
		if (this.OBJ_DIV) this.OBJ_DIV.style.display = "none";
		if (this.OBJ_CONTROL) this.OBJ_CONTROL.src = this.OBJ_CONTROL.src.replace(this.IMG_ACTIVE, this.IMG_PASSIVE);
		if (this.OBJ_CONTROL_OLD) this.OBJ_CONTROL_OLD.src = this.OBJ_CONTROL_OLD.src.replace(this.IMG_ACTIVE, this.IMG_PASSIVE);
	//} catch (E) {}
}

/**
 * ¼±ÅÃµÈ ³âµµ¸¦ Àû¿ëÇÑ´Ù.
 * @param idx	 (¼±ÅÃµÈ ³âµµ Index ¹øÈ£)
 */
Calendar.prototype.selectYear = function(idx) {
	this.SELECT_YEAR = parseInt(this.STARTING_YEAR) + parseInt(idx);
	this.SELECT_DATE = this.SELECT_YEAR + "-" + this.SELECT_MONTH + "-" + this.SELECT_DAY;
	this.createCalendar();
	document.getElementById("ID-DivCalendarYear").style.display = "none";
}

/**
 * ¼±ÅÃµÈ ¿ùÀ» Àû¿ëÇÑ´Ù.
 * @param idx	(¼±ÅÃµÈ ¿ù Index ¹øÈ£)
 */
Calendar.prototype.selectMonth = function(idx) {
	this.SELECT_MONTH = (parseInt(this.STARTING_MONTH) + parseInt(idx)).toString().getAddZero(2);
	this.SELECT_DATE = this.SELECT_YEAR + "-" + this.SELECT_MONTH + "-" + this.SELECT_DAY;
	this.createCalendar();
	document.getElementById("ID-DivCalendarMonth").style.display = "none";
}

/**
 * Decrease Year
 */
Calendar.prototype.decreaseYear = function() {
	if (this.STARTING_YEAR <= 1) return;
	var newYear = 0;
	for (var i = 0; i < 7; i++) {
		newYear = (i + this.STARTING_YEAR) - 1;
		document.getElementById("ID-ListCalendarYear" + i).innerHTML = (newYear == this.SELECT_YEAR ? "<strong>" + newYear + "³â</strong>" : newYear + "³â");
	}
	this.STARTING_YEAR--;
}

/**
 * Increase Year
 */
Calendar.prototype.increaseYear = function() {
	var newYear = 0;
	for (var i = 0; i < 7; i++) {
		newYear = (i + this.STARTING_YEAR) + 1;
		document.getElementById("ID-ListCalendarYear" + i).innerHTML = (newYear == this.SELECT_YEAR ? "<strong>" + newYear + "³â</strong>" : newYear + "³â");
	}
	this.STARTING_YEAR++;
}

/**
 * Decrease Month
 */
Calendar.prototype.decreaseMonth = function() {
	if (this.STARTING_MONTH <= 1) return;
	var newMonth = 0;
	for (var i = 0; i < 7; i++) {
		newMonth = ((i + this.STARTING_MONTH) - 1).toString().getAddZero(2);
		document.getElementById("ID-ListCalendarMonth" + i).innerHTML = (newMonth == this.SELECT_MONTH ? "<strong>" + newMonth + "¿ù</strong>" : newMonth + "¿ù");
	}
	this.STARTING_MONTH--;
}

/**
 * Increase Month
 */
Calendar.prototype.increaseMonth = function() {
	if ((parseInt(this.STARTING_MONTH, 10) + 6) >= 12) return;
	var newMonth = 0;
	for (var i = 0; i < 7; i++) {
		newMonth = ((i + this.STARTING_MONTH) + 1).toString().getAddZero(2);
		document.getElementById("ID-ListCalendarMonth" + i).innerHTML = (newMonth == this.SELECT_MONTH ? "<strong>" + newMonth + "¿ù</strong>" : newMonth + "¿ù");
	}
	this.STARTING_MONTH++;
}

/**
 * Set Interval
 * @param runFunc	(½ÇÇàÇÒ ÇÔ¼ö)
 */
Calendar.prototype.setInterval = function(runFunc) {
	this.intervalID = setInterval(runFunc, 30);
}

/**
 * Clear Interval
 */
Calendar.prototype.clearInterval = function() {
	clearInterval(this.intervalID);
}

/**
 * Swap Image
 * @param imageID	(ÀÌ¹ÌÁö ID)
 * @param status	(ÀÌ¹ÌÁö »óÅÂ)
 */
Calendar.prototype.swapImage = function(imageID, status) {
	document.getElementById(imageID).src = this.IMG_URL + "/btn_" + status + ".gif";
}

/**
 * Reverse Div
 * @param divID		(div ID)
 * @param formID	(form ID)
 */
Calendar.prototype.reverseDiv = function(divID, formID) {
	if (this.DISPLAY_ID && (this.DISPLAY_ID != divID)) {
		document.getElementById(this.DISPLAY_ID).style.display = "none";
		this.DISPLAY_ID = null;
	}	
	var ObjDiv = document.getElementById(divID);
	var ObjForm = document.getElementById(formID);
	if (ObjForm) {
		var formHeight = ObjForm.offsetHeight;
		var divTop = 0;
		var divLeft = 0;
		var ObjParent = ObjForm;
		if (ObjParent.offsetParent) {
			do {
				divTop += ObjParent.offsetTop;
				divLeft += ObjParent.offsetLeft;
			} while (ObjParent = (ObjParent.offsetParent.tagName != "DIV" ? ObjParent.offsetParent : null));
		}
		divTop += formHeight;
		ObjDiv.style.top = divTop + "px";
		ObjDiv.style.left = divLeft + "px";
	}
	if (ObjDiv.style.display == "none") {
		ObjDiv.style.display = "block";
		this.DISPLAY_ID = divID;
	} else if (ObjDiv.style.display == "block") {
		ObjDiv.style.display = "none";
		this.DISPLAY_ID = null;
	}	
}

/**
 * Set Input
 * @param allDate	(¼±ÅÃµÈ ³¯Â¥)
 */
Calendar.prototype.setInput = function(allDate) {
	//try {
		this.passiveSelected();
		this.OBJ_INPUT.value = allDate;
	//} catch (E) {}
}

/**
 * Create Calendar
 */
Calendar.prototype.createCalendar = function() {
	var calendarHTML = "";
	calendarHTML += "<table width=\"100%\" height=\"100%\" cellpadding=\"0px\" cellspacing=\"0px\" style=\"background-color:#FFFFFF;border:1px solid #474747;\">\n";
	calendarHTML += "	<tr>\n";
	calendarHTML += "		<td valign=\"top\">\n";
	calendarHTML += "		<table width=\"100%\" height=\"33px\" border=\"0px\" cellpadding=\"0px\" cellspacing=\"0px\" style=\"background-color:#D4D0C8;\">\n";
	calendarHTML += "			<tr style=\"padding:5px 0px 5px 0px;\">\n";
	calendarHTML += "				<td width=\"59px\" align=\"right\">\n";
	calendarHTML += "					<table cellpadding=\"0px\" cellspacing=\"0px\" onmousedown=\"__ObjCalendar.reverseDiv('ID-DivCalendarYear', 'ID-FormCalendarYear');\" style=\"width:49px;height:21px;border:0px;background-color:#FFFFFF;\">\n";
	calendarHTML += "						<tr>\n";
	calendarHTML += "							<td id=\"ID-FormCalendarYear\" onmouseover=\"this.style.borderColor='#FF0000';\" onmouseout=\"this.style.borderColor='#A0A0A0';\" style=\"border:1px solid #A0A0A0;font-family:verdana;font-size:11px;color:#000000;text-align:center;vertical-align:middle;\">" + this.SELECT_YEAR + "<span style=\"font-family:µ¸¿ò,µ¸¿òÃ¼,verdana;\">³â</span></td>\n";
	calendarHTML += "						</tr>\n";
	calendarHTML += "					</table>\n";
	calendarHTML += "				</td>\n";
	calendarHTML += "				<td width=\"17px\" align=\"left\" onmousedown=\"__ObjCalendar.reverseDiv('ID-DivCalendarYear', 'ID-FormCalendarYear');__ObjCalendar.swapImage('ID-BtnCalendarYear', 'down');\" onmouseup=\"__ObjCalendar.swapImage('ID-BtnCalendarYear', 'over');\" onmouseover=\"__ObjCalendar.swapImage('ID-BtnCalendarYear', 'over');\" onmouseout=\"__ObjCalendar.swapImage('ID-BtnCalendarYear', 'basis');\" style=\"cursor:pointer;\">\n";
	calendarHTML += "					<img id=\"ID-BtnCalendarYear\" src=\"" + this.IMG_URL + "/btn_basis.gif\" width=\"17px\" height=\"21px\" border=\"0px\"></td>\n";
	calendarHTML += "				<td width=\"35px\" align=\"left\" style=\"padding:0px 0px 0px 7px;\">\n";
	calendarHTML += "					<table cellpadding=\"0px\" cellspacing=\"0px\" onmousedown=\"__ObjCalendar.reverseDiv('ID-DivCalendarMonth', 'ID-FormCalendarMonth');\" style=\"width:35px;height:21px;border:0px;background-color:#FFFFFF;\">\n";
	calendarHTML += "						<tr>\n";
	calendarHTML += "							<td id=\"ID-FormCalendarMonth\" onmouseover=\"this.style.borderColor='#FF0000';\" onmouseout=\"this.style.borderColor='#A0A0A0';\" style=\"border:1px solid #A0A0A0;font-family:verdana;font-size:11px;color:#000000;text-align:center;vertical-align:middle;\">" + this.SELECT_MONTH + "<span style=\"font-family:µ¸¿ò,µ¸¿òÃ¼,verdana;\">¿ù</span></td>\n";
	calendarHTML += "						</tr>\n";
	calendarHTML += "					</table>\n";
	calendarHTML += "				</td>\n";
	calendarHTML += "				<td width=\"27px\" align=\"left\" onmousedown=\"__ObjCalendar.reverseDiv('ID-DivCalendarMonth', 'ID-FormCalendarMonth');__ObjCalendar.swapImage('ID-BtnCalendarMonth', 'down');\" onmouseup=\"__ObjCalendar.swapImage('ID-BtnCalendarMonth', 'over');\" onmouseover=\"__ObjCalendar.swapImage('ID-BtnCalendarMonth', 'over');\" onmouseout=\"__ObjCalendar.swapImage('ID-BtnCalendarMonth', 'basis');\" style=\"cursor:pointer;\">\n";
	calendarHTML += "					<img id=\"ID-BtnCalendarMonth\" src=\"" + this.IMG_URL + "/btn_basis.gif\" width=\"17px\" height=\"21px\" border=\"0px\"></td>\n";
	calendarHTML += "			</tr>\n";
	calendarHTML += "		</table>\n";
	calendarHTML += "		<table width=\"100%\" border=\"0px\" cellpadding=\"0px\" cellspacing=\"0px\" style=\"line-height:15px;font-family:±¼¸²,µ¸¿ò,µ¸¿òÃ¼,verdana;font-size:12px;color:#474747;\">\n";
	calendarHTML += "			<tr height=\"21px\" align=\"center\" style=\"background-color:#EAEAEA;\">\n";
	calendarHTML += "				<td width=\"21px\"><font color=\"red\">ÀÏ</font></td>\n";
	calendarHTML += "				<td width=\"21px\">¿ù</td>\n";
	calendarHTML += "				<td width=\"21px\">È­</td>\n";
	calendarHTML += "				<td width=\"21px\">¼ö</td>\n";
	calendarHTML += "				<td width=\"21px\">¸ñ</td>\n";
	calendarHTML += "				<td width=\"21px\">±Ý</td>\n";
	calendarHTML += "				<td width=\"21px\"><font color=\"blue\">Åä</font></td>\n";
	calendarHTML += "			</tr>\n";

	var lastDay = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);						//°¢ ´ÞÀÇ ¸¶Áö¸· ³¯Â¥
	if(((parseInt(this.SELECT_YEAR, 10) % 4) == 0 &&
			(parseInt(this.SELECT_YEAR, 10) % 100) != 0) ||
			(parseInt(this.SELECT_YEAR, 10) % 400) == 0) { 																	//year¸¦ °¡Áö°í À±³âÀÎÁö °Ë»ç
		lastDay[1] = 29; 																																	//À±³âÀÎ °æ¿ì 2¿ùÀÇ ¸¶Áö¸· ³¯Â¥¸¦ 29·Î ÀÔ·Â
	}
	var firstDay = new Date(this.SELECT_YEAR, parseInt(this.SELECT_MONTH, 10) - 1, 1); 	//ÀÔ·Â¹ÞÀº ¿ùÀÇ Ã¹¹øÂ° ³¯Â¥ÀÎ 1ÀÏÀ» º¯¼ö¿¡ ´ëÀÔ
	var firstWeek = firstDay.getDay(); 																									//ÀÔ·Â¹ÞÀº ¿ùÀÇ 1ÀÏÀÇ ¿äÀÏÀÇ °ª(¼ýÀÚ)À» ±¸ÇÑ´Ù
	var blankCell = 0;																																	//1ÀÏÀÇ ½ÃÀÛÀ§Ä¡ Àü¿¡ ºó¼¿<td></td>À» ³Ö±âÀ§ÇÑ º¯¼ö
	var dayCount = 1;																																		//³¯Â¥¸¦ Ç¥½ÃÇÏ±â À§ÇÑ º¯¼ö
	for(var rows = 1; rows <= Math.ceil((lastDay[parseInt(this.SELECT_MONTH, 10) - 1] + firstWeek) / 7); rows++) {	//ÇØ´ç¿ù¿¡ ¸îÁÖ°¡ »ý±â´ÂÁö ±¸ÇØ¼­ ÁÖ¸¸Å­ for¹®À» µ·´Ù.
		calendarHTML += "			<tr height=\"17px\" align=\"center\">\n";
		for(var i = 0; i <= 6; i++) {
			if(dayCount <= lastDay[parseInt(this.SELECT_MONTH, 10) - 1]) {		//¸¶Áö¸· ³¯Â¥¸¦ Âï°í ³²Àº ºÎºÐÀ» ºó¼¿<td></td>À¸·Î Ãâ·ÂÇÏ±â À§ÇÑ Á¶°Ç½Ä
				if(blankCell < firstWeek) {																			//1ÀÏÀÇ ½ÃÀÛÀ§Ä¡ Àü¿¡ ºó¼¿<td></td>À» ³Ö±âÀ§ÇÑ Á¶°Ç½Ä
					calendarHTML += "				<td></td>\n";
					blankCell++;
				} else{
					var allDate = this.SELECT_YEAR + "-" + this.SELECT_MONTH + "-" + dayCount.toString().getAddZero(2);	//ÀüÃ¼³¯Â¥¸¦ ±¸ÇÑ´Ù

					//Åä¿äÀÏ °ú ÀÏ¿äÀÏÀÇ ³¯Â¥ »ö±òÀ» ´Ù¸£°Ô ÇÏ±âÀ§ÇÑ Á¶°Ç½Ä
					var dayCountColor = "";
					if(i == 0) dayCountColor = "<font color=\"#FF0000\">" + dayCount + "</font>";
					else if(i == 6) dayCountColor = "<font color=\"#0000FF\">" + dayCount + "</font>";
					else dayCountColor = dayCount;
					//¿À´Ã³¯Â¥ ¹é±×¶ó¿îµå ÀÌ¹ÌÁö Style 
					var todayBackground = "background-image:url(" + this.IMG_URL + "/today.gif);background-repeat:no-repeat;background-position:left top;";
					
					//¿À´Ã³¯Â¥, ¼±ÅÃµÈ ³¯Â¥¸¦ Ç¥½ÃÇÏ±â À§ÇÑ Á¶°Ç½Ä
					if((allDate == this.TODAY_DATE) && (allDate == this.SELECT_DATE)) calendarHTML += "				<td onmouseover=\"this.style.backgroundColor='#F8EECC'\" onmouseout=\"this.style.backgroundColor='#DDDDFC'\" onclick=\"__ObjCalendar.setInput('" + allDate + "');\" style=\"" + todayBackground + "background-color:#DDDDFC;cursor:pointer;vertical-align:bottom;\">" + dayCountColor + "</td>\n";
					else if(allDate == this.TODAY_DATE) calendarHTML += "				<td onmouseover=\"this.style.backgroundColor='#F8EECC'\" onmouseout=\"this.style.backgroundColor='#FFFFFF'\" onclick=\"__ObjCalendar.setInput('" + allDate + "');\" style=\"" + todayBackground + "background-color:#FFFFFF;cursor:pointer;vertical-align:bottom;\">" + dayCountColor + "</td>\n";
					else if(allDate == this.SELECT_DATE) calendarHTML += "				<td onmouseover=\"this.style.backgroundColor='#F8EECC'\" onmouseout=\"this.style.backgroundColor='#DDDDFC'\" onclick=\"__ObjCalendar.setInput('" + allDate + "');\" style=\"background-color:#DDDDFC;cursor:pointer;vertical-align:bottom;\">" + dayCountColor + "</td>\n";
					else calendarHTML += "				<td onmouseover=\"this.style.backgroundColor='#F8EECC'\" onmouseout=\"this.style.backgroundColor='#FFFFFF'\" onclick=\"__ObjCalendar.setInput('" + allDate + "');\" style=\"background-color:#FFFFFF;cursor:pointer;vertical-align:bottom;\">" + dayCountColor + "</td>\n";

					dayCount++;
				}
			} else{
				calendarHTML += "				<td></td>\n";
			}
		}
		calendarHTML += "			</tr>\n";
	}
	
	calendarHTML += "		</table>\n";
	calendarHTML += "		</td>\n";
	calendarHTML += "	</tr>\n";
	calendarHTML += "</table>\n";
	calendarHTML += "<div id=\"ID-DivCalendarYear\" style=\"position:absolute;width:66px;height=146px;top:0px;left:0px;border:0px;background-color:#FFFFFF;cursor:pointer;display:none;z-index:1002;\">\n";
	calendarHTML += "<table width=\"100%\" height=\"100%\" cellpadding=\"0px\" cellspacing=\"0px\" style=\"background-color:#FFFFDD;border:1px solid #A0A0A0;\">\n";
	calendarHTML += "	<tr><td onmousedown=\"__ObjCalendar.clearInterval();__ObjCalendar.setInterval('__ObjCalendar.decreaseYear()');\" onmouseup=\"__ObjCalendar.clearInterval();\" onmouseover=\"this.style.backgroundColor='#FFCC99';\" onmouseout=\"__ObjCalendar.clearInterval();this.style.backgroundColor='#FFFFDD';\" style=\"height:16px;text-align:center;vertical-align:bottom;\">-</td></tr>\n";
	
	this.STARTING_YEAR = (parseInt(this.SELECT_YEAR, 10) - 3) < 1 ? 1 : (parseInt(this.SELECT_YEAR, 10) - 3);
	for (var i = this.STARTING_YEAR, j = 0; i <= (parseInt(this.STARTING_YEAR, 10) + 6); i++) {
		calendarHTML += "	<tr>\n";
		calendarHTML += "		<td id=\"ID-ListCalendarYear" + j + "\" onclick=\"__ObjCalendar.selectYear(" + j + ");\" onmouseover=\"this.style.backgroundColor='#FFCC99';\" onmouseout=\"this.style.backgroundColor='#FFFFDD';\" style=\"height:16px;text-align:center;font-size:11px;vertical-align:bottom;\">\n";
		calendarHTML += i == this.SELECT_YEAR ? "<strong>" + i + "³â</strong>" : i + "³â"; 
		calendarHTML += "		</td>\n";
		calendarHTML += "	</tr>\n";
		j++;
	}
	
	calendarHTML += "	<tr><td onmousedown=\"__ObjCalendar.clearInterval();__ObjCalendar.setInterval('__ObjCalendar.increaseYear()');\" onmouseup=\"__ObjCalendar.clearInterval();\" onmouseover=\"this.style.backgroundColor='#FFCC99';\" onmouseout=\"__ObjCalendar.clearInterval();this.style.backgroundColor='#FFFFDD';\" style=\"height:16px;text-align:center;vertical-align:bottom;\">+</td></tr>\n";
	calendarHTML += "</table>\n";
	calendarHTML += "</div>\n";
	calendarHTML += "<div id=\"ID-DivCalendarMonth\" style=\"position:absolute;width:52px;height=146px;top:0px;left:0px;border:0px;background-color:#FFFFFF;cursor:pointer;display:none;z-index:1003;\">\n";
	calendarHTML += "<table width=\"100%\" height=\"100%\" cellpadding=\"0px\" cellspacing=\"0px\" style=\"background-color:#FFFFDD;border:1px solid #A0A0A0;\">\n";
	calendarHTML += "	<tr><td onmousedown=\"__ObjCalendar.clearInterval();__ObjCalendar.setInterval('__ObjCalendar.decreaseMonth()');\" onmouseup=\"__ObjCalendar.clearInterval();\" onmouseover=\"this.style.backgroundColor='#FFCC99';\" onmouseout=\"__ObjCalendar.clearInterval();this.style.backgroundColor='#FFFFDD';\" style=\"height:16px;text-align:center;vertical-align:bottom;\">-</td></tr>\n";
		
	this.STARTING_MONTH = (parseInt(this.SELECT_MONTH, 10) - 3) < 1 ? 1 : (parseInt(this.SELECT_MONTH, 10) - 3);
	this.STARTING_MONTH = this.STARTING_MONTH > 6 ? 6 : this.STARTING_MONTH;
	for (var i = this.STARTING_MONTH, j = 0; i <= (parseInt(this.STARTING_MONTH, 10) + 6); i++) {
		var monthStr = i.toString().getAddZero(2);
		calendarHTML += "	<tr>\n";
		calendarHTML += "		<td id=\"ID-ListCalendarMonth" + j + "\" onclick=\"__ObjCalendar.selectMonth('" + j + "');\" onmouseover=\"this.style.backgroundColor='#FFCC99';\" onmouseout=\"this.style.backgroundColor='#FFFFDD';\" style=\"height:16px;text-align:center;font-size:11px;vertical-align:bottom;\">\n";
		calendarHTML += monthStr == this.SELECT_MONTH ? "<strong>" + monthStr + "¿ù</strong>" : monthStr + "¿ù"; 
		calendarHTML += "		</td>\n";
		calendarHTML += "	</tr>\n";
		j++;
	}
	
	calendarHTML += "	<tr><td onmousedown=\"__ObjCalendar.clearInterval();__ObjCalendar.setInterval('__ObjCalendar.increaseMonth()');\" onmouseup=\"__ObjCalendar.clearInterval();\" onmouseover=\"this.style.backgroundColor='#FFCC99';\" onmouseout=\"__ObjCalendar.clearInterval();this.style.backgroundColor='#FFFFDD';\" style=\"height:16px;text-align:center;vertical-align:bottom;\">+</td></tr>\n";
	calendarHTML += "</table>\n";
	calendarHTML += "</div>\n";
		 
	this.OBJ_BODY.innerHTML = calendarHTML;
}

//-->
