/** * calendar * @param beginyear 1990 * @param endyear 2010 * @param language 0(zh_cn)|1(en_us)|2(en_en)|3(zh_tw) * @param patterndelimiter "-" * @param date2stringpattern "yyyy-mm-dd" * @param string2datepattern "ymd" * @version 1.0 build 2006-04-01 * @version 1.1 build 2006-12-17 * @author kimsoft (jinqinghua [at] gmail.com) * note! you can use it free, but keep the copyright please * important:you must include this script file inner html body elment */ function calendar(beginyear, endyear, language, patterndelimiter, date2stringpattern, string2datepattern) { this.beginyear = beginyear || 2010; this.endyear = endyear || 2030; this.language = language || 0; this.patterndelimiter = patterndelimiter || "-"; this.date2stringpattern = date2stringpattern || calendar.language["date2stringpattern"][this.language].replace(/\-/g, this.patterndelimiter); this.string2datepattern = string2datepattern || calendar.language["string2datepattern"][this.language]; this.datecontrol = null; this.panel = this.getelementbyid("__calendarpanel"); this.iframe = window.frames["__calendariframe"]; this.form = null; this.date = new date(); this.year = this.date.getfullyear(); this.month = this.date.getmonth(); this.colors = {"bg_cur_day":"#00cc33","bg_over":"#efefef","bg_out":"#ffcc00"} }; calendar.language = { "year" : ["\u5e74", "", "", "\u5e74"], "months" : [ ["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"], ["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"], ["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"], ["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"] ], "weeks" : [["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"], ["sun","mon","tur","wed","thu","fri","sat"], ["sun","mon","tur","wed","thu","fri","sat"], ["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"] ], "clear" : ["\u6e05\u7a7a", "clear", "clear", "\u6e05\u7a7a"], "today" : ["\u4eca\u5929", "today", "today", "\u4eca\u5929"], "close" : ["\u5173\u95ed", "close", "close", "\u95dc\u9589"], "date2stringpattern" : ["yyyy-mm-dd", "yyyy-mm-dd", "yyyy-mm-dd", "yyyy-mm-dd"], "string2datepattern" : ["ymd","ymd", "ymd", "ymd"] }; calendar.prototype.draw = function() { calendar = this; var _cs = []; _cs[_cs.length] = '