Function Show_cal(cYear, cMonth, cDay, sYear, sMonth, sDay)
	document.all.minical.innerHTML=""

	'¼±ÅÃµÈ ÀÏÀ» Ç¥½ÃÇÒ ³â,¿ù,ÀÏ°ª
	intCurrYear	 = cint("0"&cYear)  'ÃÊ±â³âµµ³Ñ°Ü¹Þ±â
	intCurrMonth = cint("0"&cMonth) 'ÃÊ±â¿ù ³Ñ°Ü¹Þ±â
	intCurrDay	 = cint("0"&cDay)

	'È­¸é¿¡ Ãâ·ÂµÉ ³â,¿ùÀÇ °ª	
	intThisYear	 = cint("0"&sYear)  '³âµµ³Ñ°Ü¹Þ±â
	intThisMonth = cint("0"&sMonth) '¿ù ³Ñ°Ü¹Þ±â
	intThisDay	 = cint("0"&sDay)

	datToday=date()
	
	if intCurrYear	= 0 then intCurrYear=Year(datToday)		'¸¸¾à ÃÊ±â³âµµ¿Í ¿ù°ªÀ» ³Ñ°Ü¹ÞÁö ¾Ê¾Ò´Ù¸é ÇöÀç ³âµµ¸¦ ³âµµ º¯¼ö¿¡
	if intCurrMonth	= 0 then intCurrMonth=Month(datToday)	'ÃÊ±â ¿ùÀ» ¿ù º¯¼ö¿¡
	if intCurrDay	= 0 then intCurrDay=day(datToday)		'ÃÊ±â ³¯Â¥
	
	if intThisYear	= 0 then intThisYear=Year(datToday)		'¸¸¾à ³âµµ¿Í ¿ù°ªÀ» ³Ñ°Ü¹ÞÁö ¾Ê¾Ò´Ù¸é ÇöÀç ³âµµ¸¦ ³âµµ º¯¼ö¿¡
	if intThisMonth	= 0 then intThisMonth=Month(datToday)	'ÇöÀç ¿ùÀ» ¿ù º¯¼ö¿¡
	if intThisDay	= 0 then intThisDay=day(datToday)		'¿À´Ã ³¯Â¥

	if intThisMonth=1 then
		intPrevYear=intThisYear-1
		intPrevMonth=12
		intNextYear=intThisYear
		intNextMonth=2
	elseif intThisMonth=12 then
		intPrevYear=intThisYear
		intPrevMonth=11
		intNextYear=intThisYear + 1
		intNextMonth=1
	else
		intPrevYear=intThisYear
		intPrevMonth=intThisMonth -1
		intNextYear=intThisYear
		intNextMonth=intThisMonth+1
	end if
	
	intAbsPrevYear = intThisYear - 1
	intAbsnextYear = intThisYear + 1
	
	datFirstDay=DateSerial(intThisYear, intThisMonth, 1) '³Ñ°Ü¹ÞÀº ³¯Â¥ÀÇ ¿ùÃÊ±â°ª ÆÄ¾Ç
	intFirstWeekday=Weekday(datFirstDay, vbSunday) '³Ñ°Ü¹ÞÀº ³¯Â¥ÀÇ ÁÖÃÊ±â°ª ÆÄ¾Ç
	intSecondWeekday=intFirstWeekday
	intThirdWeekday=intFirstWeekday

	datThisDay=cdate(intThisYear&"-"&intThisMonth&"-"&intThisDay)
	intThisWeekday=Weekday(datThisDay)

	Select Case intThisWeekday
		Case 1	varThisWeekday="ÀÏ"
		Case 2	varThisWeekday="¿ù"
		Case 3	varThisWeekday="È­"
		Case 4	varThisWeekday="¼ö"
		Case 5	varThisWeekday="¸ñ"
		Case 6	varThisWeekday="±Ý"
		Case 7	varThisWeekday="Åä"
	End Select

	intPrintDay=1 'Ãâ·Â ÃÊ±âÀÏ °ªÀº 1ºÎÅÍ
	secondPrintDay=1
	thirdPrintDay=1

	Stop_Flag=0

	if intThisMonth=4 or intThisMonth=6 or intThisMonth=9 or intThisMonth=11 then  '¿ù¸» °ª °è»ê
		intLastDay=30
	elseif intThisMonth=2 and not (intThisYear mod 4) = 0 then
		intLastDay=28
	elseif intThisMonth=2 and (intThisYear mod 4) = 0 then
		if (intThisYear mod 100) = 0 then
			if (intThisYear mod 400) = 0 then
				intLastDay=29
			else
				intLastDay=28
			end if
		else
			intLastDay=29
		end if
	else
		intLastDay=31
	end if

	if intPrevMonth=4 or intPrevMonth=6 or intPrevMonth=9 or intPrevMonth=11 then  '¿ù¸» °ª °è»ê
		intPrevLastDay=30
	elseif intPrevMonth=2 and not (intPrevYear mod 4) = 0 then
		intPrevLastDay=28
	elseif intPrevMonth=2 and (intPrevYear mod 4) = 0 then
		if (intPrevYear mod 100) = 0 then
			if (intPrevYear mod 400) = 0 then
				intPrevLastDay=29
			else
				intPrevLastDay=28
			end if
		else
			intPrevLastDay=29
		end if
	else
		intPrevLastDay=31
	end if

	Stop_Flag=0
	Cal_HTML=Cal_HTML& "<table border=0 cellpadding=1 cellspacing=1 onmouseover='doOver()' onmouseout='doOut()' style='font-size:12; font-family:±¼¸²;' bgcolor='#C7C7C7'>"
	Cal_HTML=Cal_HTML& "<tr align='center' valign='bottom' height='40' bgcolor='white'>"
	Cal_HTML=Cal_HTML& "<td colspan=7 style='filter=progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#FFFFFF, EndColorStr=#E1E1E1)'><font color=#454545><b>"
	Cal_HTML=Cal_HTML& intThisYear&"³â "&intThisMonth&"¿ù</font><br>"
	Cal_HTML=Cal_HTML& "<img src='/img/ymd/ico_prev01.gif' style='cursor:hand;' OnClick='vbscript:call Show_cal("&intCurrYear&","&intCurrMonth&","&intCurrDay&","&intAbsPrevYear&","&intThisMonth&",1)' alt='ÀÌÀü³âµµ'>&nbsp;"
	Cal_HTML=Cal_HTML& "<img src='/img/ymd/ico_prev02.gif' style='cursor:hand;' OnClick='vbscript:call Show_cal("&intCurrYear&","&intCurrMonth&","&intCurrDay&","&intPrevYear&","&intPrevMonth&",1)' alt='ÀÌÀü´Þ'>&nbsp;"
	Cal_HTML=Cal_HTML& "<img src='/img/ymd/ico_today.gif'  style='cursor:hand;' OnClick='javascript:doToday()' alt='ÇöÀçÀÏÀÚ'>&nbsp;"
	Cal_HTML=Cal_HTML& "<img src='/img/ymd/ico_delete.gif' style='cursor:hand;' OnClick='javascript:doDelete()' alt='ÀÏÀÚ»èÁ¦'>&nbsp;"
	Cal_HTML=Cal_HTML& "<img src='/img/ymd/ico_next02.gif' style='cursor:hand;' OnClick='vbscript:call Show_cal("&intCurrYear&","&intCurrMonth&","&intCurrDay&","&intNextYear&","&intNextMonth&",1)' alt='´ÙÀ½´Þ'>&nbsp;"
	Cal_HTML=Cal_HTML& "<img src='/img/ymd/ico_next01.gif' style='cursor:hand;' OnClick='vbscript:call Show_cal("&intCurrYear&","&intCurrMonth&","&intCurrDay&","&intAbsNextYear&","&intThisMonth&",1)' alt='´ÙÀ½³âµµ'>"
	Cal_HTML=Cal_HTML& "</td>"
	Cal_HTML=Cal_HTML& "</tr>"
	Cal_HTML=Cal_HTML& "<tr align=center bgcolor=#E7E7E7 style='font-weight:bold'>"
	Cal_HTML=Cal_HTML& "<td style='color:red;'>ÀÏ</td><td>¿ù</td><td>È­</td><td>¼ö</td><td>¸ñ</td><td>±Ý</td><td style='color:#0D6776;'>Åä</td>"
	Cal_HTML=Cal_HTML& "</tr>"
	
	FOR intLoopWeek=1 to 6   'ÁÖ´ÜÀ§ ·çÇÁ ½ÃÀÛ, ÃÖ´ë 6ÁÖ

		Cal_HTML=Cal_HTML& "<tr align='center' bgcolor=white onclick='doClick()'>"
		for intLoopDay=1 to 7 '¿äÀÏ´ÜÀ§ ·çÇÁ ½ÃÀÛ, ÀÏ¿äÀÏºÎÅÍ

			if intThirdWeekDay > 1 then 'Ã¹ÁÖ½ÃÀÛÀÏÀÌ 1º¸´Ù Å©¸é
				Cal_HTML=Cal_HTML& "<td>&nbsp;</td>"
				intThirdWeekDay=intThirdWeekDay-1
			else  
				if thirdPrintDay > intLastDay then 'ÀÔ·Â³¯Â¥°¡ ¿ù¸»º¸´Ù Å©´Ù¸é
					Cal_HTML=Cal_HTML& "<td>&nbsp;</td>"
				else 'ÀÔ·Â³¯Â¥°¡ ÇöÀç¿ù¿¡ ÇØ´çµÇ¸é
					if LEN(intThisMonth) = 1 then
						intThisMonth = cint("0")&intThisMonth
					end if
					if LEN(thirdPrintDay) = 1 then
						thirdPrintDay = cint("0")&thirdPrintDay
					end if
					Cal_HTML=Cal_HTML& "<td align='center' title='"&intThisYear&"-"&intThisMonth&"-"&thirdPrintDay&"' style='cursor: hand;border: 1px solid white;width:18; height:18;"
		
					if intCurrYear-intThisYear=0 and intCurrMonth-intThisMonth=0 and intCurrDay-thirdPrintDay=0 then '¿À´Ã ³¯Â¥ÀÌ¸éÀº ±Û¾¾ÆùÆ®¸¦ ´Ù¸£°Ô
						Cal_HTML=Cal_HTML& "background-color:#FF8400;"
					end if
					if  intLoopDay=1 then 'ÀÏ¿äÀÏÀÌ¸é »¡°£»öÀ¸·Î
						Cal_HTML=Cal_HTML& "color:red;"
					else ' ÀÏ¿äÀÏÀÌ ¾Æ´Ñ°æ¿ì
    					if  intLoopDay=7 then 'Åä¿äÀÏÀÌ¸é ÆÄ¶õ»öÀ¸·Î
    						Cal_HTML=Cal_HTML& "color:#0D6776;"
    					else ' ±×¿ÜÀÇ °æ¿ì
    						Cal_HTML=Cal_HTML& "color:#4D4D4D;"
    					end if
					end if
					Cal_HTML=Cal_HTML& "'>"&thirdPrintDay
				end if
				thirdPrintDay=thirdPrintDay+1 '³¯Â¥°ªÀ» 1 Áõ°¡

				if thirdPrintDay > intLastDay then	Stop_Flag=1	 '¸¸¾à ³¯Â¥°ªÀÌ ¿ù¸»°ªº¸´Ù Å©¸é ·çÇÁ¹® Å»Ãâ

			end if
			Cal_HTML=Cal_HTML& "</td>"
		next
		Cal_HTML=Cal_HTML& "</tr>"
		if Stop_Flag=1 then	EXIT FOR
	NEXT
	Cal_HTML=Cal_HTML& "</table>"
	Cal_HTML=Cal_HTML& ""
	Cal_HTML=Cal_HTML& ""
	
	document.all.minical.innerHTML=Cal_HTML
END Function

Function Show_calB(cYear,cMonth,cDay,sYear,sMonth,sDay)
    top.window.content.minical.innerHTML=""
    
    intCurrYear     = cint("0"&cYear)  'ÃÊ±â³âµµ³Ñ°Ü¹Þ±â
    intCurrMonth = cint("0"&cMonth) 'ÃÊ±â¿ù ³Ñ°Ü¹Þ±â
    intCurrDay     = cint("0"&cDay)
    
    intThisYear     = cint("0"&sYear)  '³âµµ³Ñ°Ü¹Þ±â
    intThisMonth = cint("0"&sMonth) '¿ù ³Ñ°Ü¹Þ±â
    intThisDay     = cint("0"&sDay)

    datToday=date()
    
    if intCurrYear    = 0 then intCurrYear=Year(datToday)        '¸¸¾à ÃÊ±â³âµµ¿Í ¿ù°ªÀ» ³Ñ°Ü¹ÞÁö ¾Ê¾Ò´Ù¸é ÇöÀç ³âµµ¸¦ ³âµµ º¯¼ö¿¡
    if intCurrMonth    = 0 then intCurrMonth=Month(datToday)    'ÃÊ±â ¿ùÀ» ¿ù º¯¼ö¿¡
    if intCurrDay    = 0 then intCurrDay=day(datToday)        'ÃÊ±â ³¯Â¥
    
    if intThisYear    = 0 then intThisYear=Year(datToday)        '¸¸¾à ³âµµ¿Í ¿ù°ªÀ» ³Ñ°Ü¹ÞÁö ¾Ê¾Ò´Ù¸é ÇöÀç ³âµµ¸¦ ³âµµ º¯¼ö¿¡
    if intThisMonth    = 0 then intThisMonth=Month(datToday)    'ÇöÀç ¿ùÀ» ¿ù º¯¼ö¿¡
    if intThisDay    = 0 then intThisDay=day(datToday)        '¿À´Ã ³¯Â¥

    if intThisMonth=1 then
        intPrevYear=intThisYear-1
        intPrevMonth=12
        intNextYear=intThisYear
        intNextMonth=2
    elseif intThisMonth=12 then
        intPrevYear=intThisYear
        intPrevMonth=11
        intNextYear=intThisYear + 1
        intNextMonth=1
    else
        intPrevYear=intThisYear
        intPrevMonth=intThisMonth -1
        intNextYear=intThisYear
        intNextMonth=intThisMonth+1
    end if
    
    intAbsPrevYear = intThisYear - 1
    intAbsnextYear = intThisYear + 1
    
    datFirstDay=DateSerial(intThisYear, intThisMonth, 1) '³Ñ°Ü¹ÞÀº ³¯Â¥ÀÇ ¿ùÃÊ±â°ª ÆÄ¾Ç
    intFirstWeekday=Weekday(datFirstDay, vbSunday) '³Ñ°Ü¹ÞÀº ³¯Â¥ÀÇ ÁÖÃÊ±â°ª ÆÄ¾Ç
    intSecondWeekday=intFirstWeekday
    intThirdWeekday=intFirstWeekday

    datThisDay=cdate(intThisYear&"-"&intThisMonth&"-"&intThisDay)
    intThisWeekday=Weekday(datThisDay)

    Select Case intThisWeekday
        Case 1    varThisWeekday="ÀÏ"
        Case 2    varThisWeekday="¿ù"
        Case 3    varThisWeekday="È­"
        Case 4    varThisWeekday="¼ö"
        Case 5    varThisWeekday="¸ñ"
        Case 6    varThisWeekday="±Ý"
        Case 7    varThisWeekday="Åä"
    End Select

    intPrintDay=1 'Ãâ·Â ÃÊ±âÀÏ °ªÀº 1ºÎÅÍ
    secondPrintDay=1
    thirdPrintDay=1

    Stop_Flag=0

    if intThisMonth=4 or intThisMonth=6 or intThisMonth=9 or intThisMonth=11 then  '¿ù¸» °ª °è»ê
        intLastDay=30
    elseif intThisMonth=2 and not (intThisYear mod 4) = 0 then
        intLastDay=28
    elseif intThisMonth=2 and (intThisYear mod 4) = 0 then
        if (intThisYear mod 100) = 0 then
            if (intThisYear mod 400) = 0 then
                intLastDay=29
            else
                intLastDay=28
            end if
        else
            intLastDay=29
        end if
    else
        intLastDay=31
    end if

    if intPrevMonth=4 or intPrevMonth=6 or intPrevMonth=9 or intPrevMonth=11 then  '¿ù¸» °ª °è»ê
        intPrevLastDay=30
    elseif intPrevMonth=2 and not (intPrevYear mod 4) = 0 then
        intPrevLastDay=28
    elseif intPrevMonth=2 and (intPrevYear mod 4) = 0 then
        if (intPrevYear mod 100) = 0 then
            if (intPrevYear mod 400) = 0 then
                intPrevLastDay=29
            else
                intPrevLastDay=28
            end if
        else
            intPrevLastDay=29
        end if
    else
        intPrevLastDay=31
    end if

    Stop_Flag=0
'div·Î ¿­¸±¶§
    Cal_HTML=Cal_HTML& "<table border=0 cellpadding=1 cellspacing=1 onmouseover='body.doOverB()' onmouseout='body.doOutB()' onclick='body.doClickB()' style='font-size:12; font-family:±¼¸²;' bgcolor='#C7C7C7'>"
'popupÀ¸·Î ¿­¸±¶§
    'Cal_HTML=Cal_HTML& "<table border=0 cellpadding=1 cellspacing=1 onclick='doClickB()' style='font-size:12; font-family:±¼¸²;'>"
    Cal_HTML=Cal_HTML& "<tr align='center' valign='bottom' height='40' bgcolor='white'>"
    Cal_HTML=Cal_HTML& "<td colspan=7 style='filter=progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#FFFFFF, EndColorStr=#E1E1E1)'><font color=#454545><b>"
    Cal_HTML=Cal_HTML& intThisYear&"³â "&intThisMonth&"¿ù</font><br>"
    Cal_HTML=Cal_HTML& "<img src='/img/ymd/ico_prev01.gif' style='cursor:hand;' OnClick='vbscript:call Show_calB("&intCurrYear&","&intCurrMonth&","&intCurrDay&","&intAbsPrevYear&","&intThisMonth&",1)' alt='ÀÌÀü³âµµ'>&nbsp;"
    Cal_HTML=Cal_HTML& "<img src='/img/ymd/ico_prev02.gif' style='cursor:hand;' OnClick='vbscript:call Show_calB("&intCurrYear&","&intCurrMonth&","&intCurrDay&","&intPrevYear&","&intPrevMonth&",1)' alt='ÀÌÀü´Þ'>&nbsp;"
    Cal_HTML=Cal_HTML& "<img src='/img/ymd/ico_today.gif'  style='cursor:hand;' OnClick='javascript:body.doTodayB()' alt='ÇöÀçÀÏÀÚ'>&nbsp;"
    Cal_HTML=Cal_HTML& "<img src='/img/ymd/ico_delete.gif' style='cursor:hand;' OnClick='javascript:body.doDeleteB()' alt='ÀÏÀÚ»èÁ¦'>&nbsp;"
    Cal_HTML=Cal_HTML& "<img src='/img/ymd/ico_next02.gif' style='cursor:hand;' OnClick='vbscript:call Show_calB("&intCurrYear&","&intCurrMonth&","&intCurrDay&","&intNextYear&","&intNextMonth&",1)' alt='´ÙÀ½´Þ'>&nbsp;"
    Cal_HTML=Cal_HTML& "<img src='/img/ymd/ico_next01.gif' style='cursor:hand;' OnClick='vbscript:call Show_calB("&intCurrYear&","&intCurrMonth&","&intCurrDay&","&intAbsNextYear&","&intThisMonth&",1)' alt='´ÙÀ½³âµµ'>"
    Cal_HTML=Cal_HTML& "</td>"
    Cal_HTML=Cal_HTML& "</tr>"
    Cal_HTML=Cal_HTML& "<tr align=center bgcolor=#E7E7E7 style='font-weight:bold'>"
    Cal_HTML=Cal_HTML& "<td style='color:red;'>ÀÏ</td><td>¿ù</td><td>È­</td><td>¼ö</td><td>¸ñ</td><td>±Ý</td><td style='color:#0D6776;'>Åä</td>"
    Cal_HTML=Cal_HTML& "</tr>"
    
    FOR intLoopWeek=1 to 6   'ÁÖ´ÜÀ§ ·çÇÁ ½ÃÀÛ, ÃÖ´ë 6ÁÖ

        Cal_HTML=Cal_HTML& "<tr align='center' bgcolor=white >"
        for intLoopDay=1 to 7 '¿äÀÏ´ÜÀ§ ·çÇÁ ½ÃÀÛ, ÀÏ¿äÀÏºÎÅÍ

            if intThirdWeekDay > 1 then 'Ã¹ÁÖ½ÃÀÛÀÏÀÌ 1º¸´Ù Å©¸é
                Cal_HTML=Cal_HTML& "<td>&nbsp;</td>"
                intThirdWeekDay=intThirdWeekDay-1
            else  
                if thirdPrintDay > intLastDay then 'ÀÔ·Â³¯Â¥°¡ ¿ù¸»º¸´Ù Å©´Ù¸é
                    Cal_HTML=Cal_HTML& "<td>&nbsp;</td>"
                else 'ÀÔ·Â³¯Â¥°¡ ÇöÀç¿ù¿¡ ÇØ´çµÇ¸é
                    if LEN(intThisMonth) = 1 then
                        intThisMonth = cint("0")&intThisMonth
                    end if
                    if LEN(thirdPrintDay) = 1 then
                        thirdPrintDay = cint("0")&thirdPrintDay
                    end if
                    Cal_HTML=Cal_HTML& "<td align='center' title='"&intThisYear&"-"&intThisMonth&"-"&thirdPrintDay&"' style='cursor: hand;border: 1px solid white;width:18; height:18;"
        
                    if intCurrYear-intThisYear=0 and intCurrMonth-intThisMonth=0 and intCurrDay-thirdPrintDay=0 then '¿À´Ã ³¯Â¥ÀÌ¸éÀº ±Û¾¾ÆùÆ®¸¦ ´Ù¸£°Ô
                        Cal_HTML=Cal_HTML& "background-color:#FF8400;"
                    end if
                    if  intLoopDay=1 then 'ÀÏ¿äÀÏÀÌ¸é »¡°£»öÀ¸·Î
                        Cal_HTML=Cal_HTML& "color:red;"
                    else ' ÀÏ¿äÀÏÀÌ ¾Æ´Ñ°æ¿ì
                        if  intLoopDay=7 then 'Åä¿äÀÏÀÌ¸é ÆÄ¶õ»öÀ¸·Î
                            Cal_HTML=Cal_HTML& "color:#0D6776;"
                        else ' ±×¿ÜÀÇ °æ¿ì
                            Cal_HTML=Cal_HTML& "color:#4D4D4D;"
                        end if
                    end if
                    Cal_HTML=Cal_HTML& "'>"&thirdPrintDay
                end if
                thirdPrintDay=thirdPrintDay+1 '³¯Â¥°ªÀ» 1 Áõ°¡

                if thirdPrintDay > intLastDay then    Stop_Flag=1     '¸¸¾à ³¯Â¥°ªÀÌ ¿ù¸»°ªº¸´Ù Å©¸é ·çÇÁ¹® Å»Ãâ

            end if
            Cal_HTML=Cal_HTML& "</td>"
        next
        Cal_HTML=Cal_HTML& "</tr>"
        if Stop_Flag=1 then    EXIT FOR
    NEXT
    Cal_HTML=Cal_HTML& "</table>"
    Cal_HTML=Cal_HTML& ""
    Cal_HTML=Cal_HTML& ""
    
    top.window.content.minical.innerHTML=Cal_HTML
END Function

Function Show_calC(cYear,cMonth,cDay,sYear,sMonth,sDay)
    top.window.content.minical.innerHTML=""
    
    intCurrYear     = cint("0"&cYear)  'ÃÊ±â³âµµ³Ñ°Ü¹Þ±â
    intCurrMonth = cint("0"&cMonth) 'ÃÊ±â¿ù ³Ñ°Ü¹Þ±â
    intCurrDay     = cint("0"&cDay)
    
    intThisYear     = cint("0"&sYear)  '³âµµ³Ñ°Ü¹Þ±â
    intThisMonth = cint("0"&sMonth) '¿ù ³Ñ°Ü¹Þ±â
    intThisDay     = cint("0"&sDay)

    datToday=date()
    
    if intCurrYear    = 0 then intCurrYear=Year(datToday)        '¸¸¾à ÃÊ±â³âµµ¿Í ¿ù°ªÀ» ³Ñ°Ü¹ÞÁö ¾Ê¾Ò´Ù¸é ÇöÀç ³âµµ¸¦ ³âµµ º¯¼ö¿¡
    if intCurrMonth    = 0 then intCurrMonth=Month(datToday)    'ÃÊ±â ¿ùÀ» ¿ù º¯¼ö¿¡
    if intCurrDay    = 0 then intCurrDay=day(datToday)        'ÃÊ±â ³¯Â¥
    
    if intThisYear    = 0 then intThisYear=Year(datToday)        '¸¸¾à ³âµµ¿Í ¿ù°ªÀ» ³Ñ°Ü¹ÞÁö ¾Ê¾Ò´Ù¸é ÇöÀç ³âµµ¸¦ ³âµµ º¯¼ö¿¡
    if intThisMonth    = 0 then intThisMonth=Month(datToday)    'ÇöÀç ¿ùÀ» ¿ù º¯¼ö¿¡
    if intThisDay    = 0 then intThisDay=day(datToday)        '¿À´Ã ³¯Â¥

    if intThisMonth=1 then
        intPrevYear=intThisYear-1
        intPrevMonth=12
        intNextYear=intThisYear
        intNextMonth=2
    elseif intThisMonth=12 then
        intPrevYear=intThisYear
        intPrevMonth=11
        intNextYear=intThisYear + 1
        intNextMonth=1
    else
        intPrevYear=intThisYear
        intPrevMonth=intThisMonth -1
        intNextYear=intThisYear
        intNextMonth=intThisMonth+1
    end if
    
    intAbsPrevYear = intThisYear - 1
    intAbsnextYear = intThisYear + 1
    
    datFirstDay=DateSerial(intThisYear, intThisMonth, 1) '³Ñ°Ü¹ÞÀº ³¯Â¥ÀÇ ¿ùÃÊ±â°ª ÆÄ¾Ç
    intFirstWeekday=Weekday(datFirstDay, vbSunday) '³Ñ°Ü¹ÞÀº ³¯Â¥ÀÇ ÁÖÃÊ±â°ª ÆÄ¾Ç
    intSecondWeekday=intFirstWeekday
    intThirdWeekday=intFirstWeekday

    datThisDay=cdate(intThisYear&"-"&intThisMonth&"-"&intThisDay)
    intThisWeekday=Weekday(datThisDay)

    Select Case intThisWeekday
        Case 1    varThisWeekday="ÀÏ"
        Case 2    varThisWeekday="¿ù"
        Case 3    varThisWeekday="È­"
        Case 4    varThisWeekday="¼ö"
        Case 5    varThisWeekday="¸ñ"
        Case 6    varThisWeekday="±Ý"
        Case 7    varThisWeekday="Åä"
    End Select

    intPrintDay=1 'Ãâ·Â ÃÊ±âÀÏ °ªÀº 1ºÎÅÍ
    secondPrintDay=1
    thirdPrintDay=1

    Stop_Flag=0

    if intThisMonth=4 or intThisMonth=6 or intThisMonth=9 or intThisMonth=11 then  '¿ù¸» °ª °è»ê
        intLastDay=30
    elseif intThisMonth=2 and not (intThisYear mod 4) = 0 then
        intLastDay=28
    elseif intThisMonth=2 and (intThisYear mod 4) = 0 then
        if (intThisYear mod 100) = 0 then
            if (intThisYear mod 400) = 0 then
                intLastDay=29
            else
                intLastDay=28
            end if
        else
            intLastDay=29
        end if
    else
        intLastDay=31
    end if

    if intPrevMonth=4 or intPrevMonth=6 or intPrevMonth=9 or intPrevMonth=11 then  '¿ù¸» °ª °è»ê
        intPrevLastDay=30
    elseif intPrevMonth=2 and not (intPrevYear mod 4) = 0 then
        intPrevLastDay=28
    elseif intPrevMonth=2 and (intPrevYear mod 4) = 0 then
        if (intPrevYear mod 100) = 0 then
            if (intPrevYear mod 400) = 0 then
                intPrevLastDay=29
            else
                intPrevLastDay=28
            end if
        else
            intPrevLastDay=29
        end if
    else
        intPrevLastDay=31
    end if

    Stop_Flag=0
'div·Î ¿­¸±¶§
    Cal_HTML=Cal_HTML& "<table border=0 cellpadding=1 cellspacing=1 onmouseover='deliver.doOverC()' onmouseout='deliver.doOutC()' onclick='deliver.doClickC()' style='font-size:12; font-family:±¼¸²;' bgcolor='#C7C7C7'>"
'popupÀ¸·Î ¿­¸±¶§
    'Cal_HTML=Cal_HTML& "<table border=0 cellpadding=1 cellspacing=1 onclick='doClickC()' style='font-size:12; font-family:±¼¸²;'>"
    Cal_HTML=Cal_HTML& "<tr align='center' valign='bottom' height='40' bgcolor='white'>"
    Cal_HTML=Cal_HTML& "<td colspan=7 style='filter=progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#FFFFFF, EndColorStr=#E1E1E1)'><font color=#454545><b>"
    Cal_HTML=Cal_HTML& intThisYear&"³â "&intThisMonth&"¿ù</font><br>"
    Cal_HTML=Cal_HTML& "<img src='/img/ymd/ico_prev01.gif' style='cursor:hand;' OnClick='vbscript:call Show_calC("&intCurrYear&","&intCurrMonth&","&intCurrDay&","&intAbsPrevYear&","&intThisMonth&",1)' alt='ÀÌÀü³âµµ'>&nbsp;"
    Cal_HTML=Cal_HTML& "<img src='/img/ymd/ico_prev02.gif' style='cursor:hand;' OnClick='vbscript:call Show_calC("&intCurrYear&","&intCurrMonth&","&intCurrDay&","&intPrevYear&","&intPrevMonth&",1)' alt='ÀÌÀü´Þ'>&nbsp;"
    Cal_HTML=Cal_HTML& "<img src='/img/ymd/ico_today.gif'  style='cursor:hand;' OnClick='javascript:deliver.doTodayC()' alt='ÇöÀçÀÏÀÚ'>&nbsp;"
    Cal_HTML=Cal_HTML& "<img src='/img/ymd/ico_delete.gif' style='cursor:hand;' OnClick='javascript:deliver.doDeleteC()' alt='ÀÏÀÚ»èÁ¦'>&nbsp;"
    Cal_HTML=Cal_HTML& "<img src='/img/ymd/ico_next02.gif' style='cursor:hand;' OnClick='vbscript:call Show_calC("&intCurrYear&","&intCurrMonth&","&intCurrDay&","&intNextYear&","&intNextMonth&",1)' alt='´ÙÀ½´Þ'>&nbsp;"
    Cal_HTML=Cal_HTML& "<img src='/img/ymd/ico_next01.gif' style='cursor:hand;' OnClick='vbscript:call Show_calC("&intCurrYear&","&intCurrMonth&","&intCurrDay&","&intAbsNextYear&","&intThisMonth&",1)' alt='´ÙÀ½³âµµ'>"
    Cal_HTML=Cal_HTML& "</td>"
    Cal_HTML=Cal_HTML& "</tr>"
    Cal_HTML=Cal_HTML& "<tr align=center bgcolor=#E7E7E7 style='font-weight:bold'>"
    Cal_HTML=Cal_HTML& "<td style='color:red;'>ÀÏ</td><td>¿ù</td><td>È­</td><td>¼ö</td><td>¸ñ</td><td>±Ý</td><td style='color:#0D6776;'>Åä</td>"
    Cal_HTML=Cal_HTML& "</tr>"
    
    FOR intLoopWeek=1 to 6   'ÁÖ´ÜÀ§ ·çÇÁ ½ÃÀÛ, ÃÖ´ë 6ÁÖ

        Cal_HTML=Cal_HTML& "<tr align='center' bgcolor=white >"
        for intLoopDay=1 to 7 '¿äÀÏ´ÜÀ§ ·çÇÁ ½ÃÀÛ, ÀÏ¿äÀÏºÎÅÍ

            if intThirdWeekDay > 1 then 'Ã¹ÁÖ½ÃÀÛÀÏÀÌ 1º¸´Ù Å©¸é
                Cal_HTML=Cal_HTML& "<td>&nbsp;</td>"
                intThirdWeekDay=intThirdWeekDay-1
            else  
                if thirdPrintDay > intLastDay then 'ÀÔ·Â³¯Â¥°¡ ¿ù¸»º¸´Ù Å©´Ù¸é
                    Cal_HTML=Cal_HTML& "<td>&nbsp;</td>"
                else 'ÀÔ·Â³¯Â¥°¡ ÇöÀç¿ù¿¡ ÇØ´çµÇ¸é
                    if LEN(intThisMonth) = 1 then
                        intThisMonth = cint("0")&intThisMonth
                    end if
                    if LEN(thirdPrintDay) = 1 then
                        thirdPrintDay = cint("0")&thirdPrintDay
                    end if
                    Cal_HTML=Cal_HTML& "<td align='center' title='"&intThisYear&"-"&intThisMonth&"-"&thirdPrintDay&"' style='cursor: hand;border: 1px solid white;width:18; height:18;"
        
                    if intCurrYear-intThisYear=0 and intCurrMonth-intThisMonth=0 and intCurrDay-thirdPrintDay=0 then '¿À´Ã ³¯Â¥ÀÌ¸éÀº ±Û¾¾ÆùÆ®¸¦ ´Ù¸£°Ô
                        Cal_HTML=Cal_HTML& "background-color:#FF8400;"
                    end if
                    if  intLoopDay=1 then 'ÀÏ¿äÀÏÀÌ¸é »¡°£»öÀ¸·Î
                        Cal_HTML=Cal_HTML& "color:red;"
                    else ' ÀÏ¿äÀÏÀÌ ¾Æ´Ñ°æ¿ì
                        if  intLoopDay=7 then 'Åä¿äÀÏÀÌ¸é ÆÄ¶õ»öÀ¸·Î
                            Cal_HTML=Cal_HTML& "color:#0D6776;"
                        else ' ±×¿ÜÀÇ °æ¿ì
                            Cal_HTML=Cal_HTML& "color:#4D4D4D;"
                        end if
                    end if
                    Cal_HTML=Cal_HTML& "'>"&thirdPrintDay
                end if
                thirdPrintDay=thirdPrintDay+1 '³¯Â¥°ªÀ» 1 Áõ°¡

                if thirdPrintDay > intLastDay then    Stop_Flag=1     '¸¸¾à ³¯Â¥°ªÀÌ ¿ù¸»°ªº¸´Ù Å©¸é ·çÇÁ¹® Å»Ãâ

            end if
            Cal_HTML=Cal_HTML& "</td>"
        next
        Cal_HTML=Cal_HTML& "</tr>"
        if Stop_Flag=1 then    EXIT FOR
    NEXT
    Cal_HTML=Cal_HTML& "</table>"
    Cal_HTML=Cal_HTML& ""
    Cal_HTML=Cal_HTML& ""
    
    top.window.content.minical.innerHTML=Cal_HTML
END Function

