中国月历

转载 2006年06月19日 10:28:00

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0046)http://sean.o4u.com/ap/calendar/calendarCN.htm -->
<!--
        ***************************************
         农历月历&世界时间 DHTML 程序 (中囯版)
        ***************************************
                最后修改: 2003/8/12


如果您觉得该程序不错,您可以自由转寄给亲朋好友分享。自由使
用范围: 学校、学会、公会、公司内部、程序研究、个人网站供人查
询使用。

Open Source 不代表放弃著作权,任何形式之引用或转载前请来信告
知。如需于“商业或营利”目的中使用此部份之程序码或数据,需取
得本人书面授权。

最新版本与更新信息于 http://sean.o4u.com/ap/calendar/ 公布


                             欢迎来信互相讨论研究与指正误谬
                      联系方式:http://sean.o4u.com/contact/
                                Sean Lin (林洵贤)
                          尊重他人创作·请勿删除或更改此说明

--><HTML><HEAD><TITLE>中国月历</TITLE>
<META
content="时间;世界时间;时区;农历;阴历;阳历;月历;历法;节日;纪念日;时区;节气;二十四节气;干支;生肖;world time clock;gregorian solar;chinese lunar;calendar"
name=keywords>
<META content=All name=robots>
<META content="Gregorian Solar Calendar and Chinese Lunar Calendar"
name=description>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<SCRIPT language=JScript>
<!--
/*****************************************************************************
                                 个人首选
*****************************************************************************/

var conWeekend = 3;  // 星期六颜色显示: 1=黑色, 2=绿色, 3=红色, 4=隔周休


/*****************************************************************************
                                 日期数据
*****************************************************************************/

var lunarInfo=new Array(
0x4bd8,0x4ae0,0xa570,0x54d5,0xd260,0xd950,0x5554,0x56af,0x9ad0,0x55d2,
0x4ae0,0xa5b6,0xa4d0,0xd250,0xd295,0xb54f,0xd6a0,0xada2,0x95b0,0x4977,
0x497f,0xa4b0,0xb4b5,0x6a50,0x6d40,0xab54,0x2b6f,0x9570,0x52f2,0x4970,
0x6566,0xd4a0,0xea50,0x6a95,0x5adf,0x2b60,0x86e3,0x92ef,0xc8d7,0xc95f,
0xd4a0,0xd8a6,0xb55f,0x56a0,0xa5b4,0x25df,0x92d0,0xd2b2,0xa950,0xb557,
0x6ca0,0xb550,0x5355,0x4daf,0xa5b0,0x4573,0x52bf,0xa9a8,0xe950,0x6aa0,
0xaea6,0xab50,0x4b60,0xaae4,0xa570,0x5260,0xf263,0xd950,0x5b57,0x56a0,
0x96d0,0x4dd5,0x4ad0,0xa4d0,0xd4d4,0xd250,0xd558,0xb540,0xb6a0,0x95a6,
0x95bf,0x49b0,0xa974,0xa4b0,0xb27a,0x6a50,0x6d40,0xaf46,0xab60,0x9570,
0x4af5,0x4970,0x64b0,0x74a3,0xea50,0x6b58,0x5ac0,0xab60,0x96d5,0x92e0,
0xc960,0xd954,0xd4a0,0xda50,0x7552,0x56a0,0xabb7,0x25d0,0x92d0,0xcab5,
0xa950,0xb4a0,0xbaa4,0xad50,0x55d9,0x4ba0,0xa5b0,0x5176,0x52bf,0xa930,
0x7954,0x6aa0,0xad50,0x5b52,0x4b60,0xa6e6,0xa4e0,0xd260,0xea65,0xd530,
0x5aa0,0x76a3,0x96d0,0x4afb,0x4ad0,0xa4d0,0xd0b6,0xd25f,0xd520,0xdd45,
0xb5a0,0x56d0,0x55b2,0x49b0,0xa577,0xa4b0,0xaa50,0xb255,0x6d2f,0xada0,
0x4b63,0x937f,0x49f8,0x4970,0x64b0,0x68a6,0xea5f,0x6b20,0xa6c4,0xaaef,
0x92e0,0xd2e3,0xc960,0xd557,0xd4a0,0xda50,0x5d55,0x56a0,0xa6d0,0x55d4,
0x52d0,0xa9b8,0xa950,0xb4a0,0xb6a6,0xad50,0x55a0,0xaba4,0xa5b0,0x52b0,
0xb273,0x6930,0x7337,0x6aa0,0xad50,0x4b55,0x4b6f,0xa570,0x54e4,0xd260,
0xe968,0xd520,0xdaa0,0x6aa6,0x56df,0x4ae0,0xa9d4,0xa4d0,0xd150,0xf252,
0xd520);

var solarMonth=new Array(31,28,31,30,31,30,31,31,30,31,30,31);
var Gan=new Array("甲","乙","丙","丁","戊","己","庚","辛","壬","癸");
var Zhi=new Array("子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥");
var Animals=new Array("鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪");
var solarTerm = new Array("小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至");
var sTermInfo = new Array(0,21208,42467,63836,85337,107014,128867,150921,173149,195551,218072,240693,263343,285989,308563,331033,353350,375494,397447,419210,440795,462224,483532,504758);
var nStr1 = new Array('日','一','二','三','四','五','六','七','八','九','十');
var nStr2 = new Array('初','十','廿','卅','  ');
var monthName = new Array("JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC");

//公历节日 *表示放假日
var sFtv = new Array(
"0101*新年元旦",
"0202 世界湿地日",
"0207 国际声援南非日",
"0210 国际气象节",
"0214 情人节",
"0301 国际海豹日",
"0303 全国爱耳日",
"0308 国际妇女节",
"0312 植树节 孙中山逝世纪念日",
"0314 国际警察日",
"0315 国际消费者权益日",
"0317 中国国医节 国际航海日",
"0321 世界森林日 消除种族歧视国际日",
"0321 世界儿歌日",
"0322 世界水日",
"0323 世界气象日",
"0324 世界防治结核病日",
"0325 全国中小学生安全教育日",
"0330 巴勒斯坦国土日",
"0401 愚人节 全国爱国卫生运动月 税收宣传月",
"0407 世界卫生日",
"0422 世界地球日",
"0423 世界图书和版权日",
"0424 亚非新闻工作者日",
"0501 国际劳动节",
"0504 中国五四青年节",
"0505 碘缺乏病防治日",
"0508 世界红十字日",
"0512 国际护士节",
"0515 国际家庭日",
"0517 世界电信日",
"0518 国际博物馆日",
"0520 全国学生营养日",
"0523 国际牛奶日",
"0531 世界无烟日",
"0601 国际儿童节",
"0605 世界环境日",
"0606 全国爱眼日",
"0617 防治荒漠化和干旱日",
"0623 国际奥林匹克日",
"0625 全国土地日",
"0626 国际反毒品日",
"0701 中国共产党建党日 世界建筑日",
"0702 国际体育记者日",
"0707 中国人民抗日战争纪念日",
"0711 世界人口日",
"0730 非洲妇女日",
"0801 中国建军节",
"0808 中国男子节(爸爸节)",
"0815 日本正式宣布无条件投降日",
"0908 国际扫盲日 国际新闻工作者日",
"0910 教师节",
"0914 世界清洁地球日",
"0916 国际臭氧层保护日",
"0918 九·一八事变纪念日",
"0920 国际爱牙日",
"0927 世界旅游日",
"1001*国庆节 世界音乐日 国际老人节",
"1001 国际音乐日",
"1002 国际和平与民主自由斗争日",
"1004 世界动物日",
"1008 全国高血压日",
"1008 世界视觉日",
"1009 世界邮政日 万国邮联日",
"1010 辛亥革命纪念日 世界精神卫生日",
"1013 世界保健日 国际教师节",
"1014 世界标准日",
"1015 国际盲人节(白手杖节)",
"1016 世界粮食日",
"1017 世界消除贫困日",
"1022 世界传统医药日",
"1024 联合国日 世界发展信息日",
"1031 世界勤俭日",
"1107 十月社会主义革命纪念日",
"1108 中国记者日",
"1109 全国消防安全宣传教育日",
"1110 世界青年节",
"1111 国际科学与和平周(本日所属的一周)",
"1112 孙中山诞辰纪念日",
"1114 世界糖尿病日",
"1117 国际大学生节 世界学生节",
"1121 世界问候日 世界电视日",
"1129 国际声援巴勒斯坦人民国际日",
"1201 世界艾滋病日",
"1203 世界残疾人日",
"1205 国际经济和社会发展志愿人员日",
"1208 国际儿童电视日",
"1209 世界足球日",
"1210 世界人权日",
"1212 西安事变纪念日",
"1213 南京大屠杀纪念日",
"1221 国际篮球日",
"1224 平安夜",
"1225 圣诞节",
"1229 国际生物多样性日");

//某月的第几个星期几。 5,6,7,8 表示到数第 1,2,3,4 个星期几
var wFtv = new Array(
"0110 黑人日",
"0150 世界麻风日", //一月的最后一个星期日(月倒数第一个星期日)
"0520 国际母亲节",
"0530 全国助残日",
"0630 父亲节",
"0911 劳动节",
"0932 国际和平日",
"0940 国际聋人节 世界儿童日",
"0950 世界海事日",
"1011 国际住房日",
"1013 国际减轻自然灾害日(减灾日)",
"1144 感恩节");

//农历节日
var lFtv = new Array(
"0101*春节",
"0115 元宵节",
"0202 龙抬头节",
"0323 妈祖生辰 (天上圣母诞辰)",
"0505 端午节",
"0707 七七中国情人节",
"0815 中秋节",
"0909 重阳节",
"1208 腊八节",
"1223 灶君(祭灶)节",
"0100*除夕");

//世界时间数据
var timeData = {
"Asia (North, East) 北亚、东亚": {
"Brunei             文莱达鲁萨兰    ":["+0800","","斯里巴加万港"],
"Burma              缅甸    ":["+0630","","仰光"],
"Cambodia           柬埔寨  ":["+0700","","金边"],
"China              中国    ":["+0800","","北京、重庆、上海、香港"],
"China(Ulumuqi)     中国    ":["+0600","","乌鲁木齐"],
"Indonesia          印尼    ":["+0700","","耶加达"],
"Japan              日本    ":["+0900","","东京、大阪、札幌"],
"Korea              韩国    ":["+0900","","汉城"],
"Kazakhstan(Almaty) 哈萨克  ":["+0600","","Almaty"],
"Kazakhstan(Aqtau)  哈萨克  ":["+0400","","Aqtau"],
"Kazakhstan(Aqtobe) 哈萨克  ":["+0500","","Aqtobe"],
"Kirghizia          吉尔吉斯":["+0500","","比斯凯克"],
"Laos               老挝    ":["+0700","","万象"],
"Malaysia           马来西亚":["+0800","","吉隆坡"],
"Mongolia           蒙古利亚":["+0800","03L03|09L03","乌兰巴托(库伦)"],
"Philippines        菲律宾  ":["+0800","04F53|10F53","马尼拉"],
"Russia(Anadyr)     俄罗斯  ":["+1300","03L03|10L03","阿那底河"],
"Russia(Kamchatka)  俄罗斯  ":["+1200","03L03|10L03","堪察加半岛"],
"Russia(Magadan)    俄罗斯  ":["+1100","03L03|10L03","马加丹"],
"Russia(Vladivostok)俄罗斯  ":["+1000","03L03|10L03","海参威"],
"Russia(Yakutsk)    俄罗斯  ":["+0900","03L03|10L03","雅库次克"],
"Singapore          新加坡  ":["+0800","","新加坡"],
"Taiwan             台湾    ":["+0800","","台北、高雄"],
"Thailand           泰王国    ":["+0700","","曼谷"],
"Vietnam            越南    ":["+0700","","河内"]
},
"Asia (South, West) 南亚、中亚、西亚": {
"Afghanistan        阿富汗  ":["+0430","","喀布尔"],
"Bahrain            巴林    ":["+0300","","麦纳玛"],
"Bangladesh         孟加拉  ":["+0600","","达卡"],
"Bhutan             不丹    ":["+0600","","辛布"],
"Cyprus             塞浦路斯":["+0200","","尼古西亚"],
"East Timor         东帝汶":["+0800","","帝力"],
"India              印度    ":["+0530","","新德里、孟买、加尔各答"],
"Iran               伊朗    ":["+0330","04 13|10 13","德黑兰"],
"Iraq               伊拉克  ":["+0300","04 13|10 13","巴格达"],
"Israel             以色列  ":["+0200","04F53|09F53","耶路撒冷"],
"Jordan             约旦    ":["+0200","","安曼"],
"Kuwait             科威特  ":["+0300","","科威特市"],
"Lebanon            黎巴嫩  ":["+0200","03L03|10L03","贝鲁特"],
"Maldives           马尔代夫":["+0500","","玛律"],
"Nepal              尼泊尔  ":["+0545","","加德满都"],
"Oman               阿曼    ":["+0400","","马斯喀特"],
"Pakistan           巴基斯坦":["+0500","","喀拉蚩、伊斯兰堡"],
"Palestine          巴勒斯坦":["+0200","","耶路撒冷"],
"Qatar              卡塔尔    ":["+0300","","杜哈"],
"Saudi Arabia       沙特阿拉伯":["+0300","","利雅德"],
"Sri Lanka          斯里兰卡":["+0600","","可伦坡"],
"Syria              叙利亚  ":["+0200","04 13|10 13","大马士革"],
"Tajikistan         塔吉克  ":["+0500","","杜桑贝"],
"Turkey             土耳其  ":["+0200","","伊斯坦堡"],
"Turkmenistan       土库曼  ":["+0500","","阿什哈巴德"],
"United Arab Emirates 阿拉伯联合大公国":["+0400","","阿布达比"],
"Uzbekistan         乌兹别克":["+0500","","塔什干"],
"Yemen              也门    ":["+0300","","沙那"]
},
"Europe (North)     北欧": {
"Denmark            丹麦":["+0100","04F03|10L03","哥本哈根"],
"Faroe Is.(DK)      法罗群岛(丹麦)":["+0100","","托尔斯港"],
"Finland            芬兰":["+0200","03L01|10L01","赫尔辛基"],
"Iceland            冰岛":["+0000","","雷克雅未克"],
"Jan Mayen(NORWAY)  扬马延岛(挪威)":["-0100","","扬马延岛"],
"Norwegian          挪威":["+0100","","奥斯陆"],
"Svalbard(NORWAY)   斯瓦尔巴群岛(挪威)":["+0100","","Longyearbyen"],
"Sweden             瑞典":["+0100","03L01|10L01","斯德哥尔摩"]
},
"Europe (Eastern)   中欧、东欧": {
"Armenia            亚美尼亚":["+0400","","叶里温"],
"Austria            奥地利  ":["+0100","03L01|10L01","维也纳"],
"Azerbaijan         亚塞拜然":["+0400","","巴库"],
"Belarus            白俄罗斯":["+0200","03L03|10L03","明斯克"],
"Czech Republic     捷克    ":["+0100","","布拉格"],
"Estonia            爱沙尼亚":["+0200","","塔林"],
"Georgia            乔治亚  ":["+0500","","第比利斯"],
"Germany            德国    ":["+0100","03L01|10L01","柏林"],
"Hungarian          匈牙利  ":["+0100","","布达佩斯"],
"Latvia             拉脱维亚":["+0200","","里加"],
"Liechtenstein      列支敦士登":["+0100","","瓦都兹"],
"Lithuania          立陶宛  ":["+0200","","维尔纽斯"],
"Moldova            摩尔多瓦":["+0200","","基希涅夫"],
"Poland             波兰    ":["+0100","","华沙"],
"Rumania            罗马尼亚":["+0200","","布加勒斯特"],
"Russia(Moscow)     俄罗斯  ":["+0300","03L03|10L03","莫斯科"],
"Russia(Volgograd)  俄罗斯  ":["+0300","03L03|10L03","伏尔哥格勒"],
"Slovakia           斯洛伐克":["+0100","","布拉提斯拉瓦"],
"Switzerland        瑞士    ":["+0100","03L01|10L01","苏黎世"],
"Ukraine            乌克兰  ":["+0200","","基辅"],
"Ukraine(Simferopol)乌克兰  ":["+0300","","Simferopol"]
},
"Europe (Western)   西欧": {
"Andorra            安道尔 ":["+0100","03L01|10L01","安道尔"],
"Belgium            比利时 ":["+0100","03L01|10L01","布鲁塞尔"],
"Channel Is.(UK)    海峡群岛(英)":["+0000","03L01|10L01","根西岛、泽西岛"],
"France             法国   ":["+0100","03L01|10L01","巴黎"],
"Gibraltar(UK)      直布罗陀(英)":["+0100","03L01|10L01","直布罗陀"],
"Ireland            爱尔兰 ":["+0000","03L01|10L01","都柏林"],
"Isle of Man(UK)    人岛(英)":["+0000","03L01|10L01","道格拉斯"],
"Luxembourg         卢森堡 ":["+0100","03L01|10L01","卢森堡市"],
"Monaco             摩纳哥 ":["+0100","","摩纳哥市"],
"Netherlands        荷兰   ":["+0100","03L01|10L01","阿姆斯特丹"],
"United Kingdom     英国   ":["+0000","03L01|10L01","伦敦、爱丁堡"]

},
"Europe (South)     南欧": {
"Albania            阿尔巴尼亚":["+0100","","地拉那"],
"Bosnia             波士尼亚":["+0100","","塞拉耶佛"],
"Bulgaria           保加利亚":["+0200","","索菲亚"],
"Croatia            克罗埃西亚":["+0100","","札格雷布"],
"Greece             希腊    ":["+0200","03L01|10L01","雅典"],
"Holy See           教廷    ":["+0100","","梵蒂冈"],
"Italy              义大利  ":["+0100","03L01|10L01","罗马"],
"Macedonia          马其顿  ":["+0100","","斯高彼亚"],
"Malta              马尔他  ":["+0100","","瓦勒他"],
"Portugal           葡萄牙  ":["+0000","03L01|10L01","里斯本"],
"San Marino         圣马力诺":["+0100","","圣马力诺"],
"Slovenia           斯洛维尼亚":["+0100","","卢布尔雅那"],
"Span               西班牙  ":["+0100","03L01|10L01","马德里"],
"Yugoslavia         南斯拉夫":["+0100","","贝尔格勒"]
},
"America (North)    北美洲": {
"Canada(NST)        加拿大":["-0330","04F02|10L02","纽芬兰, St. John's, Goose Bay"],
"Canada(AST)        加拿大":["-0400","04F02|10L02","Pangnirtung, Glace Bay"],
"Canada(EST)        加拿大":["-0500","04F02|10L02","蒙特娄"],
"Canada(CST)        加拿大":["-0600","04F02|10L02","Swift Current, Regina, Rainy River"],
"Canada(MST)        加拿大":["-0700","04F02|10L02","Inuvik, Edmonton, Dawson Creek"],
"Canada(PST)        加拿大":["-0800","04F02|10L02","温哥华"],
"Greenland(DK)      格陵兰(丹麦)":["-0300","","努克"],
"US(Eastern)        美国(东岸)":["-0500","04F02|10L02","纽约"],
"US(Indiana)        美国      ":["-0500","","印第安纳"],
"US(Central)        美国(中部)":["-0600","04F02|10L02","芝加哥"],
"US(Mountain)       美国(山区)":["-0700","04F02|10L02","丹佛"],
"US(Arizona)        美国      ":["-0700","","亚历桑那"],
"US(Pacific)        美国(西岸)":["-0800","04F02|10L02","旧金山、洛杉矶"],
"US(Alaska)         美国      ":["-0900","","朱诺"]
},
"America (South)    中南美洲": {
"Anguilla(UK)       安圭拉(英)":["-0400","","瓦利"],
"Antigua & Barbuda  安提瓜及巴布达":["-0400","","圣约翰"],
"Argentina          阿根廷  ":["-0300","","布宜诺斯艾利斯"],
"Aruba(NL)          阿鲁巴(荷)":["-0400","","奥拉涅斯塔德"],
"Bahamas            巴哈马  ":["-0500","","拿索"],
"Barbados           巴贝多  ":["-0400","","桥镇"],
"Belize             贝里斯  ":["-0600","","贝尔墨邦"],
"Bermuda(UK)        百慕达群岛(英)":["-0400","","汉密尔顿"],
"Bolivia            玻利维亚":["-0400","","拉巴斯"],
"Brazil(AST)        巴西    ":["-0500","10F03|02L03","Porto Acre"],
"Brazil(EST)        巴西    ":["-0300","10F03|02L03","里约热内卢、巴西利亚"],
"Brazil(FST)        巴西    ":["-0200","10F03|02L03","Noronha"],
"Brazil(WST)        巴西    ":["-0400","10F03|02L03","Cuiaba"],
"British Virgin Is.(UK)维尔京群岛(英)":["-0400","","罗德城"],
"Cayman Is.(UK)     开曼群岛(英)":["-0500","","乔治敦"],
"Chile              智利    ":["-0300","10F03|03F03","圣地牙哥"],
"Chile              智利    ":["-0500","10F03|03F03","Hanga Roa"],
"Colombia           哥伦比亚":["-0500","","波哥大"],
"Costa Rica         哥斯达黎加":["-0600","","圣约瑟"],
"Cuba               古巴    ":["-0500","04 13|10L03","哈瓦那"],
"Dominica           多米尼克":["-0400","","罗梭"],
"Dominican Republic 多米尼加":["-0400","","圣多明哥"],
"Ecuador            厄瓜多尔  ":["-0500","","基多"],
"El Salvador        萨尔瓦多":["-0600","","圣萨尔瓦多"],
"Falkland Is.(UK)   福克兰群岛(英)":["-0300","09F03|04F03","史坦利"],
"Grenada            格林纳达":["-0400","","圣乔治"],
"Guadeloupe(FR)     瓜德罗普(法)":["-0400","","巴斯特尔"],
"Guatemala          危地马拉":["-0600","","危地马拉城"],
"Guiana(FR)         圭亚那(法)":["-0300","","卡宴"],
"Guyana             盖亚那  ":["-0400","","佐治敦"],
"Haiti              海地    ":["-0500","","太子港"],
"Honduras           洪都拉斯":["-0600","","德古斯加巴"],
"Jamaica            牙买加  ":["-0500","","京斯敦"],
"Martinique(FR)     马提尼克(法)":["-0400","","法兰西堡"],
"Mexico(Mazatlan)   墨西哥  ":["-0700","","Mazatlan"],
"Mexico(首都)       墨西哥  ":["-0600","","墨西哥城"],
"Mexico(蒂娃娜)     墨西哥  ":["-0800","","蒂娃娜"],
"Montserrat(UK)     蒙特塞拉特(英)":["-0400","","普利茅斯"],
"Antilles(NL)       安的列斯(荷)":["-0400","","威廉斯塔德"],
"Nicaragua          尼加拉瓜":["-0500","","马纳瓜"],
"Panama             巴拿马  ":["-0500","","巴拿马市"],
"Paraguay           巴拉圭  ":["-0400","10F03|02L03","亚松森"],
"Peru               秘鲁    ":["-0500","","利马"],
"Puerto Rico(US)    波多黎各(美)":["-0400","","圣胡安"],
"So. Georgia & So. Sandwich Is.(UK)南乔治和南三明治群岛(英)":["-0200","","Grytviken"],
"St. Kitts & Nevis  圣克里斯多福及尼维斯":["-0400","","巴士地"],
"St. Lucia          圣露西亚":["-0400","","卡斯翠"],
"St. Pierre & Miquelon(FR) 圣皮埃尔和密克隆群岛(法)":["-0330","","圣皮埃尔市"],
"St. Vincent & Grenadines 圣文森特及格瑞那丁":["-0400","","金石城"],
"Suriname           苏里南":["-0300","","巴拉马里波"],
"Trinidad & Tobago  特立尼达和多巴哥及托巴哥":["-0400","","西班牙港"],
"Turks & Caicos Is.(UK) 特克斯和凯科斯群岛(英)":["-0500","","科伯恩城"],
"Uruguay            乌拉圭  ":["-0300","","蒙特维多"],
"Venezuela          委内瑞拉":["-0400","","卡拉卡斯"],
"Virgin Is.(US)     维尔京群岛(美)":["-0400","","夏洛特.阿马里"]
},
"Africa (North)     北非": {
"Morocco            摩洛哥  ":["+0000","","卡萨布兰卡"],
"Algeria            阿尔及利亚":["+0100","","阿尔及尔"],
"Tunisia            突尼西亚":["+0100","","突尼斯"],
"Libyan             利比亚  ":["+0200","","的黎波里"],
"Egypt              埃及    ":["+0200","04L53|09L43","开罗"],
"Sudan              苏丹    ":["+0200","","卡土穆"]
},
"Africa (Western)   西非": {
"Western Sahara     西撒哈拉":["+0000","","阿尤恩"],
"Mauritania         毛里塔尼亚":["+0000","","诺克少"],
"Mali               马里    ":["+0000","","巴马科"],
"Niger              尼日    ":["+0100","","尼阿美"],
"Chad               乍得    ":["+0100","","恩加美纳"],
"Senegal            塞内加尔":["+0000","","达卡"],
"Gambia             冈比亚  ":["+0000","","班竹"],
"Guinea-Bissau      几内亚比绍":["+0000","","比索"],
"Guinea             几内亚  ":["+0000","","柯那克里"],
"Sierra Leone       塞拉利昂  ":["+0000","","自由城"],
"Liberia            利比里亚":["+0000","","蒙罗维亚"],
"Ivory Coast        象牙海岸":["+0000","","雅穆索戈"],
"Burkina Faso       布吉纳法索":["+0000","","瓦加杜古"],
"Ghana              加纳    ":["+0000","","阿克拉"],
"Togo               多哥    ":["+0000","","洛梅"],
"Benin              贝宁    ":["+0100","","新港"],
"Nigeria            尼日利亚":["+0100","","阿布札"],
"Cape Verde         维德角岛":["-0100","","培亚"],
"Canary Is.(SP)     加纳利群岛(西班牙)":["-0100","","乔治城"]
},
"Africa (Central)   中非": {
"Cameroon           喀麦隆  ":["+0100","","雅恩德"],
"Cen.African Rep.   中非共和国":["+0100","","班基"],
"Sao Tome & Principe圣多美普林西比":["+0000","","圣多美"],
"Equatorial Guinea  赤道几内亚":["+0100","","马拉博"],
"Gabon              加蓬    ":["+0100","","自由市"],
"Congo,Republic     刚果共和国":["+0100","","布拉萨市"],
"Congo,Democratic   刚果民主共和国":["+0100","","金夏沙"]
},
"Africa (East)      东非": {
"Eritrea            厄利垂亚":["+0300","","阿斯马拉"],
"Djibouti           吉布提  ":["+0300","","吉布提"],
"Ethiopia           埃塞俄比亚":["+0300","","阿迪斯阿贝巴"],
"Somalia            索马里":["+0300","","摩加迪休"],
"Kenya              肯尼亚    ":["+0300","","奈洛比"],
"Uganda             乌干达  ":["+0300","","坎帕拉"],
"Rwanda             卢旺达  ":["+0200","","吉佳利"],
"Burundi            布隆迪  ":["+0200","","布松布拉"],
"Tanzania           坦桑尼亚":["+0300","","杜笃玛"],
"Malawi             马拉维  ":["+0200","","里朗威"],
"Mozambique         莫桑比克":["+0200","","马布多"],
"Madagascar         马达加斯加":["+0300","","安塔那那利佛"],
"Comoros            科摩罗    ":["+0300","","莫罗尼"],
"Seychelles         塞舌尔  ":["+0300","","维多利亚"],
"Mauritius          毛里求斯":["+0400","","路易士港"],
"Mayotte(FR)        马约特岛(法)":["+0300","","Mamoutzou"],
"Reunion(FR)        留尼旺岛(法)":["+0400","","圣但尼"]
},
"Africa (South)     南非": {
"Angola             安哥拉  ":["+0100","","鲁安达"],
"Zambia             赞比亚  ":["+0200","","路沙卡"],
"Namibia            纳米比亚":["+0200","09F03|04F03","温吐克"],
"Botswana           博茨瓦纳  ":["+0200","","嘉伯隆里"],
"Zimbabwe           津巴布韦  ":["+0200","","哈拉雷"],
"South Africa       南非    ":["+0200","","普利托里亚"],
"Swaziland          斯威士兰":["+0200","","墨巴本"],
"Lesotho            莱索托  ":["+0200","","马赛鲁"],
"Saint Helena(UK)   圣赫勒拿(英)":["-0100","","詹姆士城"]
},
"Oceania            大洋洲": {
"American Samoa(US) 美属萨摩亚(美)":["-1100","","派哥派哥港"],
"Aus.(Adelaide)     澳大利亚  ":["+0930","10F03|03F03","阿德莱德"],
"Aus.(Brisbane)     澳大利亚  ":["+1000","10F03|03F03","布利斯班"],
"Aus.(Darwin)       澳大利亚  ":["+0930","10F03|03F03","达尔文"],
"Aus.(Hobart)       澳大利亚  ":["+1000","10F03|03F03","荷伯特"],
"Aus.(Perth)        澳大利亚  ":["+0800","10F03|03F03","伯斯"],
"Aus.(Sydney)       澳大利亚  ":["+1000","10F03|03F03","雪梨"],
"Cook Islands(NZ)   库克群岛(纽)  ":["-1000","","阿瓦鲁阿"],
"Fiji               斐济      ":["+1200","11F03|02L03","苏瓦"],
"Guam               关岛      ":["+1000","","阿加纳"],
"Hawaii(US)         夏威夷(美)":["-1000","","檀香山"],
"Kiribati           吉里巴斯  ":["+1100","","塔拉瓦"],
"Marshall Is.       马绍尔群岛":["+1200","","Majuro"],
"Micronesia         密克罗尼西亚":["+1000","","帕利基尔"],
"Midway Is.(US)     中途岛(美)":["-1100","","中途岛"],
"Nauru Rep.         瑙鲁共和国":["+1200","","雅连"],
"New Calednia(FR)   新克里多尼亚(法)":["+1100","","Noumea"],
"New Guined         新几内亚  ":["+1000","","莫勒斯比港"],
"New Zealand        新西兰    ":["+1200","10F03|04F63","奥克兰"],
"New Zealand(CHADT) 新西兰    ":["+1245","10F03|04F63","Waitaing"],
"Niue(NZ)           纽埃(纽)      ":["-1100","","阿洛菲"],
"Nor. Mariana Is.   北马里亚纳群岛(美)":["+1000","","塞班岛"],
"Palau              帛琉      ":["+0900","","柯洛"],
"Papua New Guinea   巴布亚新几内亚":["+1000","","莫尔斯贝港"],
"Pitcairn Is.(UK)   皮特凯恩群岛(英)":["-0830","","亚当斯敦"],
"Polynesia(FR)      波利尼西亚(法)":["-1000","","巴比蒂、大溪地"],
"Solomon Is.        索罗门群岛":["+1100","","荷尼阿拉"],
"Tokelau(NZ)        托克劳(纽)    ":["-1100","","努库塔努"],
"Tonga              汤加      ":["+1300","10F63|04F63","努瓜娄发"],
"Tuvalu             图瓦卢    ":["+1200","","富那富提"],
"Vanuatu            瓦努阿图    ":["+1100","","维拉港"],
"Western Samoa      西萨摩亚  ":["-1100","","阿庇亚"],
"国际换日线                   ":["-1200","","国际换日线"]
}
};


/*****************************************************************************
                                    日期计算
*****************************************************************************/

//====================================== 传回农历 y年的总天数
function lYearDays(y) {
 var i, sum = 348;
 for(i=0x8000; i>0x8; i>>=1) sum += (lunarInfo[y-1900] & i)? 1: 0;
 return(sum+leapDays(y));
}

//====================================== 传回农历 y年闰月的天数
function leapDays(y) {
 if(leapMonth(y)) return( (lunarInfo[y-1899]&0xf)==0xf? 30: 29);
 else return(0);
}

//====================================== 传回农历 y年闰哪个月 1-12 , 没闰传回 0
function leapMonth(y) {
 var lm = lunarInfo[y-1900] & 0xf;
 return(lm==0xf?0:lm);
}

//====================================== 传回农历 y年m月的总天数
function monthDays(y,m) {
 return( (lunarInfo[y-1900] & (0x10000>>m))? 30: 29 );
}


//====================================== 算出农历, 传入日期物件, 传回农历日期物件
//                                       该物件属性有 .year .month .day .isLeap
function Lunar(objDate) {

 var i, leap=0, temp=0;
 var offset   = (Date.UTC(objDate.getFullYear(),objDate.getMonth(),objDate.getDate()) - Date.UTC(1900,0,31))/86400000;

 for(i=1900; i<2100 && offset>0; i++) { temp=lYearDays(i); offset-=temp; }

 if(offset<0) { offset+=temp; i--; }

 this.year = i;

 leap = leapMonth(i); //闰哪个月
 this.isLeap = false;

 for(i=1; i<13 && offset>0; i++) {
    //闰月
    if(leap>0 && i==(leap+1) && this.isLeap==false)
       { --i; this.isLeap = true; temp = leapDays(this.year); }
    else
       { temp = monthDays(this.year, i); }

    //解除闰月
    if(this.isLeap==true && i==(leap+1)) this.isLeap = false;

    offset -= temp;
 }

 if(offset==0 && leap>0 && i==leap+1)
    if(this.isLeap)
       { this.isLeap = false; }
    else
       { this.isLeap = true; --i; }

 if(offset<0){ offset += temp; --i; }

 this.month = i;
 this.day = offset + 1;
}

//==============================传回国历 y年某m+1月的天数
function solarDays(y,m) {
 if(m==1)
    return(((y%4 == 0) && (y%100 != 0) || (y%400 == 0))? 29: 28);
 else
    return(solarMonth[m]);
}
//============================== 传入 offset 传回干支, 0=甲子
function cyclical(num) {
 return(Gan[num%10]+Zhi[num%12]);
}

//============================== 月历属性
function calElement(sYear,sMonth,sDay,week,lYear,lMonth,lDay,isLeap,cYear,cMonth,cDay) {

    this.isToday    = false;
    //国历
    this.sYear      = sYear;   //西元年4位数字
    this.sMonth     = sMonth;  //西元月数字
    this.sDay       = sDay;    //西元日数字
    this.week       = week;    //星期, 1个中文
    //农历
    this.lYear      = lYear;   //西元年4位数字
    this.lMonth     = lMonth;  //农历月数字
    this.lDay       = lDay;    //农历日数字
    this.isLeap     = isLeap;  //是否为农历闰月?
    //八字
    this.cYear      = cYear;   //年柱, 2个中文
    this.cMonth     = cMonth;  //月柱, 2个中文
    this.cDay       = cDay;    //日柱, 2个中文

    this.color      = '';

    this.lunarFestival = ''; //农历节日
    this.solarFestival = ''; //国历节日
    this.solarTerms    = ''; //节气
}

//===== 某年的第n个节气为几日(从0小寒起算)
function sTerm(y,n) {
 var offDate = new Date( ( 31556925974.7*(y-1900) + sTermInfo[n]*60000  ) + Date.UTC(1900,0,6,2,5) );
 return(offDate.getUTCDate());
}

 


//============================== 传回月历物件 (y年,m+1月)
/*
功能说明: 传回整个月的日期数据物件

用法: OBJ = new calendar(年,零起算月);

OBJ.length      传回当月最大日
OBJ.firstWeek   传回当月一日星期

由 OBJ[日期].属性名称 即可取得各项值

OBJ[日期].isToday  传回是否为今日 true 或 false

其他 OBJ[日期] 属性参见 calElement() 中的注解
*/
function calendar(y,m) {

 var sDObj, lDObj, lY, lM, lD=1, lL, lX=0, tmp1, tmp2, tmp3;
 var cY, cM, cD; //年柱,月柱,日柱
 var lDPOS = new Array(3);
 var n = 0;
 var firstLM = 0;

 sDObj = new Date(y,m,1,0,0,0,0);    //当月一日日期

 this.length    = solarDays(y,m);    //国历当月天数
 this.firstWeek = sDObj.getDay();    //国历当月1日星期几

 ////////年柱 1900年立春后为庚子年(60进制36)
 if(m<2) cY=cyclical(y-1900+36-1);
 else cY=cyclical(y-1900+36);
 var term2=sTerm(y,2); //立春日期

 ////////月柱 1900年1月小寒以前为 丙子月(60进制12)
 var firstNode = sTerm(y,m*2) //传回当月“节”为几日开始
 cM = cyclical((y-1900)*12+m+12);

 //当月一日与 1900/1/1 相差天数
 //1900/1/1与 1970/1/1 相差25567日, 1900/1/1 日柱为甲戌日(60进制10)
 var dayCyclical = Date.UTC(y,m,1,0,0,0,0)/86400000+25567+10;

 for(var i=0;i<this.length;i++) {

    if(lD>lX) {
       sDObj = new Date(y,m,i+1);    //当月一日日期
       lDObj = new Lunar(sDObj);     //农历
       lY    = lDObj.year;           //农历年
       lM    = lDObj.month;          //农历月
       lD    = lDObj.day;            //农历日
       lL    = lDObj.isLeap;         //农历是否闰月
       lX    = lL? leapDays(lY): monthDays(lY,lM); //农历当月最后一天

       if(n==0) firstLM = lM;
       lDPOS[n++] = i-lD+1;
    }

    //依节气调整二月分的年柱, 以立春为界
    if(m==1 && (i+1)==term2) cY=cyclical(y-1900+36);
    //依节气月柱, 以“节”为界
    if((i+1)==firstNode) cM = cyclical((y-1900)*12+m+13);
    //日柱
    cD = cyclical(dayCyclical+i);

    //sYear,sMonth,sDay,week,
    //lYear,lMonth,lDay,isLeap,
    //cYear,cMonth,cDay
   
    this[i] = new calElement(y, m+1, i+1, nStr1[(i+this.firstWeek)%7],
                             lY, lM, lD++, lL,
                             cY ,cM, cD );
 }

 //节气
 tmp1=sTerm(y,m*2  )-1;
 tmp2=sTerm(y,m*2+1)-1;
 this[tmp1].solarTerms = solarTerm[m*2];
 this[tmp2].solarTerms = solarTerm[m*2+1];
 if(m==3) this[tmp1].color = 'red'; //清明颜色

 //国历节日
 for(i in sFtv)
    if(sFtv[i].match(/^(/d{2})(/d{2})([/s/*])(.+)$/))
       if(Number(RegExp.$1)==(m+1)) {
          if(Number(RegExp.$2)<=this.length){
            this[Number(RegExp.$2)-1].solarFestival += RegExp.$4 + ' ';
            if(RegExp.$3=='*') this[Number(RegExp.$2)-1].color = 'red';
          }
       }

 //月周节日
 for(i in wFtv)
    if(wFtv[i].match(/^(/d{2})(/d)(/d)([/s/*])(.+)$/))
       if(Number(RegExp.$1)==(m+1)) {
          tmp1=Number(RegExp.$2);
          tmp2=Number(RegExp.$3);
          if(tmp1<5)
             this[((this.firstWeek>tmp2)?7:0) + 7*(tmp1-1) + tmp2 - this.firstWeek].solarFestival += RegExp.$5 + ' ';
          else {
             tmp1 -= 5;
             tmp3 = (this.firstWeek+this.length-1)%7; //当月最后一天星期?
             this[this.length - tmp3 - 7*tmp1 + tmp2 - (tmp2>tmp3?7:0) - 1 ].solarFestival += RegExp.$5 + ' ';
          }
       }

 //农历节日
 for(i in lFtv)
    if(lFtv[i].match(/^(/d{2})(.{2})([/s/*])(.+)$/)) {
       tmp1=Number(RegExp.$1)-firstLM;
       if(tmp1==-11) tmp1=1;
       if(tmp1 >=0 && tmp1<n) {
          tmp2 = lDPOS[tmp1] + Number(RegExp.$2) -1;
          if( tmp2 >= 0 && tmp2<this.length && this[tmp2].isLeap!=true) {
             this[tmp2].lunarFestival += RegExp.$4 + ' ';
             if(RegExp.$3=='*') this[tmp2].color = 'red';
          }
       }
    }


 //复活节只出现在3或4月
 if(m==2 || m==3) {
    var estDay = new easter(y);
    if(m == estDay.m)
       this[estDay.d-1].solarFestival = this[estDay.d-1].solarFestival+' 复活节';
 }

 //黑色星期五
 if((this.firstWeek+12)%7==5)
    this[12].solarFestival += '黑色星期五';

 //今日
 if(y==tY && m==tM) this[tD-1].isToday = true;
}

//======================================= 传回该年的复活节(春分后第一次满月周后的第一主日)
function easter(y) {

 var term2=sTerm(y,5); //取得春分日期
 var dayTerm2 = new Date(Date.UTC(y,2,term2,0,0,0,0)); //取得春分的国历日期物件(春分一定出现在3月)
 var lDayTerm2 = new Lunar(dayTerm2); //取得取得春分农历

 if(lDayTerm2.day<15) //取得下个月圆的相差天数
    var lMlen= 15-lDayTerm2.day;
 else
    var lMlen= (lDayTerm2.isLeap? leapDays(y): monthDays(y,lDayTerm2.month)) - lDayTerm2.day + 15;

 //一天等于 1000*60*60*24 = 86400000 毫秒
 var l15 = new Date(dayTerm2.getTime() + 86400000*lMlen ); //求出第一次月圆为国历几日
 var dayEaster = new Date(l15.getTime() + 86400000*( 7-l15.getUTCDay() ) ); //求出下个周日

 this.m = dayEaster.getUTCMonth();
 this.d = dayEaster.getUTCDate();

}

//====================== 中文日期
function cDay(d){
 var s;

 switch (d) {
    case 10:
       s = '初十'; break;
    case 20:
       s = '二十'; break;
       break;
    case 30:
       s = '三十'; break;
       break;
    default :
       s = nStr2[Math.floor(d/10)];
       s += nStr1[d%10];
 }
 return(s);
}

///////////////////////////////////////////////////////////////////////////////

var cld;

function drawCld(SY,SM) {
 var i,sD,s,size;
 cld = new calendar(SY,SM);

 if(SY>1874 && SY<1909) yDisplay = '光绪' + (((SY-1874)==1)?'元':SY-1874);
 if(SY>1908 && SY<1912) yDisplay = '宣统' + (((SY-1908)==1)?'元':SY-1908);
 if(SY>1911 && SY<1950) yDisplay = '民国' + (((SY-1911)==1)?'元':SY-1911);
 if(SY>1949) yDisplay = '建国' + (((SY-1949)==1)?'元':SY-1949);

 GZ.innerHTML = yDisplay +'年 农历岁次' + cyclical(SY-1900+36) + '年 【'+Animals[(SY-4)%12]+'】';

 YMBG.innerHTML = "&nbsp;" + SY + "<BR>&nbsp;" + monthName[SM];

 for(i=0;i<42;i++) {

    sObj=eval('SD'+ i);
    lObj=eval('LD'+ i);

    sObj.className = '';

    sD = i - cld.firstWeek;

    if(sD>-1 && sD<cld.length) { //日期内
       sObj.innerHTML = sD+1;

       if(cld[sD].isToday) sObj.className = 'todyaColor'; //今日颜色

       sObj.style.color = cld[sD].color; //国定假日颜色

       if(cld[sD].lDay==1) //显示农历月
          if(cld[sD].isLeap) //闰月
            lObj.innerHTML = '<b>闰'+cld[sD].lMonth+'月' + (leapDays(cld[sD].lYear)==29?'小':'大')+'</b>';
          else //非闰月
            lObj.innerHTML = '<b>'+cld[sD].lMonth+'月' + (monthDays(cld[sD].lYear,cld[sD].lMonth)==29?'小':'大')+'</b>';
       else //显示农历日
          lObj.innerHTML = cDay(cld[sD].lDay);

       s=cld[sD].lunarFestival;
       if(s.length>0) { //农历节日
          if(s.length>6) s = s.substr(0, 4)+'…';
          s = s.fontcolor('red');
       }
       else { //国历节日
          s=cld[sD].solarFestival;
          if(s.length>0) {
             size = (s.charCodeAt(0)>0 && s.charCodeAt(0)<128)?8:4;
             if(s.length>size+2) s = s.substr(0, size)+'…';
             s=(s=='黑色星期五')?s.fontcolor('black'):s.fontcolor('blue');
          }
          else { //廿四节气
             s=cld[sD].solarTerms;
             if(s.length>0) s = s.fontcolor('limegreen');
          }
       }

       if(cld[sD].solarTerms=='清明') s = '清明节'.fontcolor('red');

 

       if(s.length>0) lObj.innerHTML = s;

    }
    else { //非日期
       sObj.innerHTML = '';
       lObj.innerHTML = '';
    }
 }
}


function changeCld() {
 var y,m;
 y=CLD.SY.selectedIndex+1900;
 m=CLD.SM.selectedIndex;
 drawCld(y,m);
}

function pushBtm(K) {
 switch (K){
    case 'YU' :
       if(CLD.SY.selectedIndex>0) CLD.SY.selectedIndex--;
       break;
    case 'YD' :
       if(CLD.SY.selectedIndex<200) CLD.SY.selectedIndex++;
       break;
    case 'MU' :
       if(CLD.SM.selectedIndex>0) {
          CLD.SM.selectedIndex--;
       }
       else {
          CLD.SM.selectedIndex=11;
          if(CLD.SY.selectedIndex>0) CLD.SY.selectedIndex--;
       }
       break;
    case 'MD' :
       if(CLD.SM.selectedIndex<11) {
          CLD.SM.selectedIndex++;
       }
       else {
          CLD.SM.selectedIndex=0;
          if(CLD.SY.selectedIndex<200) CLD.SY.selectedIndex++;
       }
       break;
    default :
       CLD.SY.selectedIndex=tY-1900;
       CLD.SM.selectedIndex=tM;
 }
 changeCld();
}

var Today = new Date();
var tY = Today.getFullYear();
var tM = Today.getMonth();
var tD = Today.getDate();
//////////////////////////////////////////////////////////////////////////////

var width = "130";
var offsetx = 2;
var offsety = 8;

var x = 0;
var y = 0;
var snow = 0;
var sw = 0;
var cnt = 0;

var dStyle;
document.onmousemove = mEvn;

//显示详细日期数据
function mOvr(v) {
 var s,festival,spcday;
 var sObj=eval('SD'+ v);
 var d=sObj.innerHTML-1;

    //sYear,sMonth,sDay,week,
    //lYear,lMonth,lDay,isLeap,
    //cYear,cMonth,cDay

 if(sObj.innerHTML!='') {
    sObj.style.cursor = 's-resize';
    spcday=cld[d].sMonth==3 && cld[d].sDay==3*7?unescape('%20%u6797%u6D35%u8CE2%u7684%u751F%u65E5'):'';

    if(cld[d].solarTerms == '' && cld[d].solarFestival == '' && cld[d].lunarFestival == '' && spcday=='')
       festival = '';
    else
       festival = '<TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 BGCOLOR="#CCFFCC"><TR><TD>'+
       '<FONT COLOR="#000000" STYLE="font-size:9pt;">'+cld[d].solarTerms + ' ' + cld[d].solarFestival + ' ' + cld[d].lunarFestival+' '+spcday+'</FONT></TD>'+
       '</TR></TABLE>';

    s= '<TABLE WIDTH="130" BORDER=0 CELLPADDING="2" CELLSPACING=0 BGCOLOR="#000066" style="filter:Alpha(opacity=80)"><TR><TD>' +
       '<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD ALIGN="right"><FONT COLOR="#ffffff" STYLE="font-size:9pt;">'+
       cld[d].sYear+' 年 '+cld[d].sMonth+' 月 '+cld[d].sDay+' 日<br>星期'+cld[d].week+'<br>'+
       '<font color="violet">农历'+(cld[d].isLeap?'闰 ':' ')+cld[d].lMonth+' 月 '+cld[d].lDay+' 日</font><br>'+
       '<font color="yellow">'+cld[d].cYear+'年 '+cld[d].cMonth+'月 '+cld[d].cDay + '日</font>'+
       '</FONT></TD></TR></TABLE>'+ festival +'</TD></TR></TABLE>';

    document.all["detail"].innerHTML = s;

    if (snow == 0) {
       dStyle.left = x+offsetx-(width/2);
       dStyle.top = y+offsety;
       dStyle.visibility = "visible";
       snow = 1;
    }
 }
}

//清除详细日期数据
function mOut() {
 if ( cnt >= 1 ) { sw = 0; }
 if ( sw == 0 ) { snow = 0; dStyle.visibility = "hidden";}
 else cnt++;
}

//取得位置
function mEvn() {
 x=event.x;
 y=event.y;
 if (document.body.scrollLeft)
    {x=event.x+document.body.scrollLeft; y=event.y+document.body.scrollTop;}
 if (snow){
    dStyle.left = x+offsetx-(width/2);
    dStyle.top = y+offsety;
 }
}

/*****************************************************************************
                                世界时间计算
*****************************************************************************/
var OneHour = 60*60*1000;
var OneDay = OneHour*24;
var TimezoneOffset = Today.getTimezoneOffset()*60*1000;

function showUTC(objD) {
 var dn,s;
 var hh = objD.getUTCHours();
 var mm = objD.getUTCMinutes();
 var ss = objD.getUTCSeconds();
 s = objD.getUTCFullYear() + "年" + (objD.getUTCMonth() + 1) + "月" + objD.getUTCDate() +"日 ("+ nStr1[objD.getUTCDay()] +")";

 if(hh>12) { hh = hh-12; dn = '下午'; }
 else dn = '上午';

 if(hh<10) hh = '0' + hh;
 if(mm<10) mm = '0' + mm;
 if(ss<10) ss = '0' + ss;

 s += " " + dn + ' ' + hh + ":" + mm + ":" + ss;
 return(s);
}

function showLocale(objD) {
 var dn,s;
 var hh = objD.getHours();
 var mm = objD.getMinutes();
 var ss = objD.getSeconds();
 s = objD.getFullYear() + "年" + (objD.getMonth() + 1) + "月" + objD.getDate() +"日 ("+ nStr1[objD.getDay()] +")";

 if(hh>12) { hh = hh-12; dn = '下午'; }
 else dn = '上午';

 if(hh<10) hh = '0' + hh;
 if(mm<10) mm = '0' + mm;
 if(ss<10) ss = '0' + ss;

 s += " " + dn + ' ' + hh + ":" + mm + ":" + ss;
 return(s);
}

//传入时差字符串, 传回偏移之正负毫秒
function parseOffset(s) {
 var sign,hh,mm,v;
 sign = s.substr(0,1)=='-'?-1:1;
 hh = Math.floor(s.substr(1,2));
 mm = Math.floor(s.substr(3,2));
 v = sign*(hh*60+mm)*60*1000;
 return(v);
}

//传回UTC日期物件 (年,月-1,第几个星期几,几点)
function getWeekDay(y,m,nd,w,h){
 var d,d2,w1;
 if(nd>0){
    d = new Date(Date.UTC(y, m, 1));
    w1 = d.getUTCDay();
    d2 = new Date( d.getTime() + ((w<w1? w+7-w1 : w-w1 )+(nd-1)*7   )*OneDay + h*OneHour);
 }
 else {
    nd = Math.abs(nd);
    d = new Date( Date.UTC(y, m+1, 1)  - OneDay );
    w1 = d.getUTCDay();
    d2 = new Date( d.getTime() + (  (w>w1? w-7-w1 : w-w1 )-(nd-1)*7   )*OneDay + h*OneHour);
 }
 return(d2);
}

//传入某时间值, 日光节约字符串 传回 true 或 false
function isDaylightSaving(d,strDS) {

 if(strDS == '') return(false);

 var m1,n1,w1,t1;
 var m2,n2,w2,t2;
 with (Math){
    m1 = floor(strDS.substr(0,2))-1;
    w1 = floor(strDS.substr(3,1));
    t1 = floor(strDS.substr(4,1));
    m2 = floor(strDS.substr(6,2))-1;
    w2 = floor(strDS.substr(9,1));
    t2 = floor(strDS.substr(10,1));
 }

 switch(strDS.substr(2,1)){
    case 'F': n1=1; break;
    case 'L': n1=-1; break;
    default : n1=0; break;
 }

 switch(strDS.substr(8,1)){
    case 'F': n2=1; break;
    case 'L': n2=-1; break;
    default : n2=0; break;
 }


 var d1, d2, re;

 if(n1==0)
    d1 = new Date(Date.UTC(d.getUTCFullYear(), m1, Math.floor(strDS.substr(2,2)),t1));
 else
    d1 = getWeekDay(d.getUTCFullYear(),m1,n1,w1,t1);

 if(n2==0)
    d2 = new Date(Date.UTC(d.getUTCFullYear(), m2, Math.floor(strDS.substr(8,2)),t2));
 else
    d2 = getWeekDay(d.getUTCFullYear(),m2,n2,w2,t2);

 if(d2>d1)
    re = (d>d1 && d<d2)? true: false;
 else
    re = (d>d1 || d<d2)? true: false;

 return(re);
}

var isDS = false;

//计算全球时间
function getGlobeTime() {
 var d,s;
 d = new Date();

 d.setTime(d.getTime()+parseOffset(objTimeZone[0]));

 isDS=isDaylightSaving(d,objTimeZone[1]);
 if(isDS) d.setTime(d.getTime()+OneHour);
 return(showUTC(d));
}

var objTimeZone;
var objContinentMenu;
var objCountryMenu;

function tick() {
 var today;
 today = new Date();
 LocalTime.innerHTML = showLocale(today);
 GlobeTime.innerHTML = getGlobeTime();
 window.setTimeout("tick()", 1000);
}

//指定自定索引时区
function setTZ(a,c){
 objContinentMenu.options[a].selected=true;
 chContinent();
 objCountryMenu.options[c].selected=true;
 chCountry();
}

//更改区域
function chContinent() {
 var key,i;
 continent = objContinentMenu.options[objContinentMenu.selectedIndex].text;
 for (var i = objCountryMenu.options.length-1; i >= 0; i--)
    objCountryMenu[0]=null;
 for (key in timeData[continent])
    objCountryMenu.options[objCountryMenu.options.length]=new Option(key);
 objCountryMenu.options[0].selected=true;
 chCountry();
}

//更改国家
function chCountry() {
 var txtContinent = objContinentMenu.options[objContinentMenu.selectedIndex].text;
 var txtCountry = objCountryMenu.options[objCountryMenu.selectedIndex].text;

 objTimeZone = timeData[txtContinent][txtCountry];

 getGlobeTime();

 //地图位移
 City.innerHTML = (isDS==true?"<SPAN STYLE='font-size:12pt;font-family:Wingdings; color:Red;'>R</span> ":'') + objTimeZone[2]; //首都
 var pos = Math.floor(objTimeZone[0].substr(0,3));
 if(pos<0) pos+=24;
 pos*=-10;
 world.style.left = pos;

}

function setCookie(name,value) {
 var today = new Date();
 var expires = new Date();
 expires.setTime(today.getTime() + 1000*60*60*24*365);
 document.cookie = name + "=" + escape(value) + "; expires=" + expires.toGMTString();
}

function getCookie(Name) {
 var search = Name + "=";
 if(document.cookie.length > 0) {
    offset = document.cookie.indexOf(search);
    if(offset != -1) {
       offset += search.length;
       end = document.cookie.indexOf(";", offset);
       if(end == -1) end = document.cookie.length;
       return unescape(document.cookie.substring(offset, end));
    }
    else return('');
 }
 else return('');
}

///////////////////////////////////////////////////////////////////////////

function initialize() {
 var key;

 //时间
 map.filters.Light.Clear();
 map.filters.Light.addAmbient(255,255,255,60);
 map.filters.Light.addCone(120, 60, 80, 120, 60, 255,255,255,120,60);

 objContinentMenu=document.WorldClock.continentMenu;
 objCountryMenu=document.WorldClock.countryMenu;

 for (key in timeData)
    objContinentMenu[objContinentMenu.length]=new Option(key);


 var TZ1 = getCookie('TZ1');
 var TZ2 = getCookie('TZ2');


 if(TZ1=='') {TZ1=0; TZ2=18;}
 setTZ(TZ1,TZ2);

 tick();


 //月历
 dStyle = detail.style;
 CLD.SY.selectedIndex=tY-1900;
 CLD.SM.selectedIndex=tM;
 drawCld(tY,tM);

}

function terminate() {
 setCookie("TZ1",objContinentMenu.selectedIndex);
 setCookie("TZ2",objCountryMenu.selectedIndex);
}

 

 

//-->
</SCRIPT>

<STYLE>.todyaColor {
 BACKGROUND-COLOR: aqua
}
</STYLE>

<META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
<BODY onload=initialize() onunload=terminate()>
<SCRIPT language=JavaScript><!--
 if(navigator.appName == "Netscape" || parseInt(navigator.appVersion) < 4)
 document.write("<h1>你的浏览器无法运行此程序。</h1>此程序需在 IE4 以后的版本才能运行!!")
//--></SCRIPT>

<DIV id=detail
style="Z-INDEX: 3; FILTER: shadow(color=#333333,direction=135); WIDTH: 140px; POSITION: absolute; HEIGHT: 120px"></DIV>
<CENTER>
<TABLE border=0>
  <TBODY>
  <TR><!------------------------------ 世界时间 ----------------------------------->
    <FORM name=WorldClock>
    <TD vAlign=top align=middle width=240><FONT style="FONT-SIZE: 9pt"
      size=2>本地时间</FONT><BR><SPAN id=LocalTime
      style="FONT-SIZE: 11pt; COLOR: #000080; FONT-FAMILY: Arial">0000年0月0日 ( )
       午 00:00:00</SPAN>
      <P><SPAN id=City
      style="FONT-SIZE: 9pt; WIDTH: 150px; FONT-FAMILY: '宋体'">中国</SPAN>
      <BR><SPAN id=GlobeTime
      style="FONT-SIZE: 11pt; COLOR: #000080; FONT-FAMILY: Arial">0000年0月0日 ( )
       午 00:00:00</SPAN><BR>
      <TABLE style="FONT-SIZE: 10pt; FONT-FAMILY: Wingdings">
        <TBODY>
        <TR>
          <TD align=middle>&Uacute;
            <DIV id=map
            style="FILTER: Light; OVERFLOW: hidden; WIDTH: 240px; HEIGHT: 120px; BACKGROUND-COLOR: mediumblue"><FONT
            id=world
            style="FONT-SIZE: 185px; LEFT: 0px; COLOR: green; FONT-FAMILY: Webdings; POSITION: relative; TOP: -26px">&ucirc;&ucirc;</FONT>
            </DIV>&Ugrave; </TD></TR></TBODY></TABLE><BR><SELECT
      style="FONT: 9pt '宋体'; WIDTH: 240px; BACKGROUND-COLOR: #e0e0ff"
      onchange=chContinent() name=continentMenu></SELECT><BR><SELECT
      style="FONT: 9pt '宋体'; WIDTH: 240px; BACKGROUND-COLOR: #e0e0ff"
      onchange=chCountry() name=countryMenu></SELECT></P></TD></FORM><!------------------------------ 万年历 ----------------------------------->
    <FORM name=CLD>
    <TD align=middle>
      <DIV style="Z-INDEX: -1; POSITION: absolute; TOP: 30px"><FONT id=YMBG
      style="FONT-SIZE: 100pt; COLOR: #f0f0f0; FONT-FAMILY: 'Arial Black'">&nbsp;0000<BR>&nbsp;JUN</FONT>
      </DIV>
      <TABLE border=0>
        <TBODY>
        <TR>
          <TD bgColor=#000080 colSpan=7><FONT style="FONT-SIZE: 9pt"
            color=#ffffff size=2>公元<SELECT style="FONT-SIZE: 9pt"
            onchange=changeCld() name=SY>
              <SCRIPT language=JavaScript><!--
          for(i=1900;i<2101;i++) document.write('<option>'+i)
          //--></SCRIPT>
            </SELECT>年<SELECT style="FONT-SIZE: 9pt" onchange=changeCld()
            name=SM>
              <SCRIPT language=JavaScript><!--
          for(i=1;i<13;i++) document.write('<option>'+i)
          //--></SCRIPT>
            </SELECT>月</FONT> <FONT id=GZ face=黑体 color=#ffffff
            size=4></FONT><BR></TD></TR>
        <TR align=middle bgColor=#e0e0e0>
          <TD width=54>日</TD>
          <TD width=54>一</TD>
          <TD width=54>二</TD>
          <TD width=50>三</TD>
          <TD width=54>四</TD>
          <TD width=54>五</TD>
          <TD width=54>六</TD></TR>
        <SCRIPT language=JavaScript><!--
          var gNum, color1, color2;

          // 星期六颜色
          switch (conWeekend) {
          case 1:
             color1 = 'black';
             color2 = color1;
             break;
          case 2:
             color1 = 'green';
             color2 = color1;
             break;
          case 3:
             color1 = 'red';
             color2 = color1;
             break;
          default :
             color1 = 'green';
             color2 = 'red';
          }

          for(i=0;i<6;i++) {
             document.write('<tr align=center>')
             for(j=0;j<7;j++) {
                gNum = i*7+j
                document.write('<td id="GD' + gNum +'" onMouseOver="mOvr(' + gNum +')" onMouseOut="mOut()"><font id="SD' + gNum +'" size=5 face="Arial Black"')
                if(j == 0) document.write(' color=red')
                if(j == 6) {
                   if(i%2==1) document.write(' color='+color2)
                      else document.write(' color='+color1)
                }
                document.write(' TITLE=""> </font><br><font id="LD' + gNum + '" size=2 style="font-size:9pt"> </font></td>')
             }
             document.write('</tr>')
          }
          //--></SCRIPT>
        </TBODY></TABLE></TD>
    <TD vAlign=top align=middle width=40><BR><BR><BR>年<BR><BUTTON
      style="FONT-SIZE: 9pt" onclick="pushBtm('YD')">↑</BUTTON><BR><BUTTON
      style="FONT-SIZE: 9pt" onclick="pushBtm('YU')">↓</BUTTON>
      <P>月<BR><BUTTON style="FONT-SIZE: 9pt"
      onclick="pushBtm('MD')">↑</BUTTON><BR><BUTTON style="FONT-SIZE: 9pt"
      onclick="pushBtm('MU')">↓</BUTTON>
      <P><BUTTON style="FONT-SIZE: 9pt" onclick="pushBtm('')">当<BR>月</BUTTON>
      <P></P></TD></FORM></TR></TBODY></TABLE></CENTER></BODY></HTML>

月历输出

输出月历 Description 已知每月1号是星期几,输出当月月历。每个月都按30天算。 Input 输入为一个整数n,1 Output 输出月历。月历的第一行为...

使用月历控件CMonthCalCtrl让VC2010的CMFCPropertyGridProperty支持日期选择

VC2010提供了属性控件CMFCPropertyGridProperty对文件、颜色、字体的支持,没有提供对日期选择的支持。 参考了以下两个帖子的内容,创建一个类CMFCPropertyGridD...

显示任意一年的月历的程序

功能概述:从键盘输入年份和月份,然后从控制台输出这个月的月历。然后询问是否继续,继续按1退出按2。 程序很简单,我把代码贴出来,其中有详细注释,看不懂的留言吧~~ 源代码: // 日历2.c...
  • neolone
  • neolone
  • 2011年10月25日 21:48
  • 708

打印月历题解

24:打印月历 总时间限制:  1000ms   内存限制:  65536kB 描述 给定年月,打印当月的月历表。 输入 输入为一行两个整数,第一个整数是年份year(1900 ≤ year ≤ 20...
  • MrH929
  • MrH929
  • 2016年01月30日 23:03
  • 525

js常规日期格式处理、月历渲染、倒计时函数

日期格式处理在前端的日常任务中非常常见,但是为此引入monent.js这样的类库又会显得有点臃肿,毕竟我们一个特定的项目中,并不需要monent.js那么全的涵盖范围。另外,如果现在公司让你自己手写一...
  • hj7jay
  • hj7jay
  • 2016年11月29日 10:04
  • 697

Java打印月历GUI

import javax.swing.JOptionPane; public class PrintCalendarGUI {  public static void main(String[] ...

Windows应用程序高级控件之月历控件--MonthCalendar控件

MonthCalendar--月历控件 提供一个直观的图形界面,可以让用户查看和设置日期。 允许使用鼠标进行拖曳,以便选择一段连续的时间,此段连续的时间包括起始和结束时间 (1)...

c++的万年历类,支持显示某月月历与某年年历,支持计算任意两个日期的间隔天数

#include #include #include using namespace std; class Date { private: int year; //年份 ...
  • sryan
  • sryan
  • 2011年05月19日 12:24
  • 2823

ORACLE使用一条SQL语句搞定星期月历 软件报20071217N51P16

 本文发表于 软件报 2007年 51期 12月17日P16   一个星期月历其实是我们最常用的,例如在Windows系统修改时间的界面下,我们就可以看到这样的月历:    那么在O...

java 20008年月历输出 日期的个位与星期数相等 的日子

20008年月历输出   日期的个位与星期数相等 的日子 并统计天数 (个位数为0当作周日) package pkg08date; /** * 一个方便是输出星期几的类 * */ cl...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:中国月历
举报原因:
原因补充:

(最多只允许输入30个字)