var target; // È£ÃâÇÑ ObjectÀÇ ÀúÀå var stime; document.write("
"); var nav,old,iex=(document.all),yyy=-1000; if(navigator.appName=="Netscape"){(document.layers)?nav=true:old=true;} function get_mouse(e){ var x=(nav)?e.pageX:event.x+document.body.scrollLeft; if(nav)var y=e.pageY; if(iex){y=event.y;if(navigator.appVersion.indexOf("MSIE 4")==-1)y+=document.body.scrollTop} return x; } function Calendar(obj) { // jucke if(obj) var now = obj.value.split("-"); else var now = ""; var x, y; target = obj; // Object ÀúÀå; if(arguments[1]) x = arguments[1]; else x = (document.layers) ? loc.pageX : event.clientX + document.body.scrollLeft; if(arguments[2]) y = arguments[2]; else y = (document.layers) ? loc.pageY : event.clientY + document.body.scrollTop; var c = get_mouse('iex'); minical.style.pixelTop = y; minical.style.pixelLeft = x; minical.style.display = (minical.style.display == "block") ? "none" : "block"; if (now.length == 3) { // Á¤È®ÇÑÁö °Ë»ç Show_cal(now[0],now[1],now[2]); // ³Ñ¾î¿Â °ªÀ» ³â¿ùÀÏ·Î ºÐ¸® } else { now = new Date(); Show_cal(now.getFullYear(), now.getMonth()+1, now.getDate()); // ÇöÀç ³â/¿ù/ÀÏÀ» ¼³Á¤ÇÏ¿© ³Ñ±è. } } function doClick() { // ³¯ÀÚ¸¦ ¼±ÅÃÇÏ¿´À» °æ¿ì cal_Day = window.event.srcElement.title; window.event.srcElement.style.borderColor = "red"; // Å׵θ® »öÀ» »¡°£»öÀ¸·Î if (cal_Day.length > 7) { // ³¯ÀÚ °ªÀÌÀÖÀ¸¸é var now = new Date() var year = now.getYear() var month = now.getMonth()+1 if (parseInt(month) < 10) { month = "0" + parseInt(month); } else { month = "" + parseInt(month); } var date = now.getDate() if (parseInt(date) < 10) { date = "0" + parseInt(date); } else { date = "" + parseInt(date); } var nowDate = year + "-" + month + "-" + date // if(nowDate <= cal_Day) { target.value=cal_Day // °ª ¼³Á¤ minical.style.display='none'; // È­¸é¿¡¼­ Áö¿ò // } else { // alert('¿À´ÃÀ̳ª ¿À´ÃÀÌÈÄÀÇ ³¯Â¥¸¦ ¼±ÅÃÇϼ¼¿ä'); // } } } function doOver() { // ¸¶¿ì½º°¡ Ä®·»´ÙÀ§¿¡ ÀÖÀ¸¸é var el = window.event.srcElement; cal_Day = el.title; if (cal_Day.length > 7) { // ³¯ÀÚ °ªÀÌ ÀÖÀ¸¸é. el.style.borderTopColor = el.style.borderLeftColor = "buttonhighlight"; el.style.borderRightColor = el.style.borderBottomColor = "buttonshadow"; } window.clearTimeout(stime); // Clear } function doOut() { var el = window.event.fromElement; cal_Day = el.title; if (cal_Day.length > 7) { el.style.borderColor = "white"; } //stime=window.setTimeout("minical.style.display='none';", 200); } function day2(d) { // 2ÀÚ¸® ¼ýÀÚ·á º¯°æ var str = new String(); if (parseInt(d) < 10) { str = "0" + parseInt(d); } else { str = "" + parseInt(d); } return str; } function Show_cal(sYear, sMonth, sDay) { var Months_day = new Array(0,31,28,31,30,31,30,31,31,30,31,30,31) var Weekday_name = new Array("ÀÏ", "¿ù", "È­", "¼ö", "¸ñ", "±Ý", "Åä"); var intThisYear = new Number(), intThisMonth = new Number(), intThisDay = new Number(); document.all.minical.innerHTML = ""; datToday = new Date(); // ÇöÀç ³¯ÀÚ ¼³Á¤ intThisYear = parseInt(sYear); intThisMonth = parseInt(sMonth); intThisDay = parseInt(sDay); if (intThisYear == 0) intThisYear = datToday.getFullYear(); // °ªÀÌ ¾øÀ» °æ¿ì if (intThisMonth == 0) intThisMonth = parseInt(datToday.getMonth())+1; // ¿ù °ªÀº ½ÇÁ¦°ª º¸´Ù -1 ÇÑ °ªÀÌ µÅµ¹·Á Áø´Ù. if (intThisDay == 0) intThisDay = datToday.getDate(); switch(intThisMonth) { case 1: intPrevYear = intThisYear -1; intPrevMonth = 12; intNextYear = intThisYear; intNextMonth = 2; break; case 12: intPrevYear = intThisYear; intPrevMonth = 11; intNextYear = intThisYear + 1; intNextMonth = 1; break; default: intPrevYear = intThisYear; intPrevMonth = parseInt(intThisMonth) - 1; intNextYear = intThisYear; intNextMonth = parseInt(intThisMonth) + 1; break; } NowThisYear = datToday.getFullYear(); // ÇöÀç ³â NowThisMonth = datToday.getMonth()+1; // ÇöÀç ¿ù NowThisDay = datToday.getDate(); // ÇöÀç ÀÏ datFirstDay = new Date(intThisYear, intThisMonth-1, 1); // ÇöÀç ´ÞÀÇ 1ÀÏ·Î ³¯ÀÚ °´Ã¼ »ý¼º(¿ùÀº 0ºÎÅÍ 11±îÁöÀÇ Á¤¼ö(1¿ùºÎÅÍ 12¿ù)) intFirstWeekday = datFirstDay.getDay(); // ÇöÀç ´Þ 1ÀÏÀÇ ¿äÀÏÀ» ±¸ÇÔ (0:ÀÏ¿äÀÏ, 1:¿ù¿äÀÏ) intSecondWeekday = intFirstWeekday; intThirdWeekday = intFirstWeekday; datThisDay = new Date(intThisYear, intThisMonth, intThisDay); // ³Ñ¾î¿Â °ªÀÇ ³¯ÀÚ »ý¼º intThisWeekday = datThisDay.getDay(); // ³Ñ¾î¿Â ³¯ÀÚÀÇ ÁÖ ¿äÀÏ varThisWeekday = Weekday_name[intThisWeekday]; // ÇöÀç ¿äÀÏ ÀúÀå intPrintDay = 1 // ´ÞÀÇ ½ÃÀÛ ÀÏÀÚ secondPrintDay = 1 thirdPrintDay = 1 Stop_Flag = 0 if ((intThisYear % 4)==0) { // 4³â¸¶´Ù 1¹øÀ̸é (»ç·Î³ª´©¾î ¶³¾îÁö¸é) if ((intThisYear % 100) == 0) { if ((intThisYear % 400) == 0) { Months_day[2] = 29; } } else { Months_day[2] = 29; } } intLastDay = Months_day[intThisMonth]; // ¸¶Áö¸· ÀÏÀÚ ±¸ÇÔ Stop_flag = 0 Cal_HTML = "" + "" + ""; for (intLoopWeek=1; intLoopWeek < 7; intLoopWeek++) { // ÁÖ´ÜÀ§ ·çÇÁ ½ÃÀÛ, ÃÖ´ë 6ÁÖ Cal_HTML += "" for (intLoopDay=1; intLoopDay <= 7; intLoopDay++) { // ¿äÀÏ´ÜÀ§ ·çÇÁ ½ÃÀÛ, ÀÏ¿äÀÏ ºÎÅÍ if (intThirdWeekday > 0) { // ùÁÖ ½ÃÀÛÀÏÀÌ 1º¸´Ù Å©¸é Cal_HTML += ""; } Cal_HTML += ""; if (Stop_Flag==1) break; } Cal_HTML += "
¢¸ " + ""+get_Yearinfo(intThisYear,intThisMonth,intThisDay)+"³â"+get_Monthinfo(intThisYear,intThisMonth,intThisDay)+"¿ù" + " ¢º
ÀÏ¿ùÈ­¼ö¸ñ±ÝÅä
"; intThirdWeekday--; } else { if (thirdPrintDay > intLastDay) { // ÀÔ·Â ³¯Â¦ ¿ù¸»º¸´Ù Å©´Ù¸é Cal_HTML += ""; } else { // ÀԷ³¯Â¥°¡ ÇöÀç¿ù¿¡ ÇØ´ç µÇ¸é Cal_HTML += ""+thirdPrintDay; } thirdPrintDay++; if (thirdPrintDay > intLastDay) { // ¸¸¾à ³¯Â¥ °ªÀÌ ¿ù¸» °ªº¸´Ù Å©¸é ·çÇÁ¹® Å»Ãâ Stop_Flag = 1; } } Cal_HTML += "
"; document.all.minical.innerHTML = Cal_HTML; } function get_Yearinfo(year,month,day) { // ³â Á¤º¸¸¦ ÄÞº¸ ¹Ú½º·Î Ç¥½Ã var min = parseInt(year) - 100; var max = parseInt(year) + 10; var i = new Number(); var str = new String(); str = ""; return str; } function get_Monthinfo(year,month,day) { // ¿ù Á¤º¸¸¦ ÄÞº¸ ¹Ú½º·Î Ç¥½Ã var i = new Number(); var str = new String(); str = ""; return str; }