[pLog-svn] r2013 - in plugins/trunk: . lunar lunar/class lunar/class/action lunar/class/view lunar/js lunar/locale lunar/templates

mark at devel.plogworld.net mark at devel.plogworld.net
Tue May 17 06:48:49 GMT 2005


Author: mark
Date: 2005-05-17 06:48:49 +0000 (Tue, 17 May 2005)
New Revision: 2013

Added:
   plugins/trunk/lunar/
   plugins/trunk/lunar/class/
   plugins/trunk/lunar/class/action/
   plugins/trunk/lunar/class/action/pluginlunarconfigaction.class.php
   plugins/trunk/lunar/class/action/pluginlunarupdateconfigaction.class.php
   plugins/trunk/lunar/class/action/showlunarcalendaraction.class.php
   plugins/trunk/lunar/class/view/
   plugins/trunk/lunar/class/view/pluginlunarconfigview.class.php
   plugins/trunk/lunar/js/
   plugins/trunk/lunar/js/lunar.js
   plugins/trunk/lunar/locale/
   plugins/trunk/lunar/locale/locale_en_UK.php
   plugins/trunk/lunar/locale/locale_zh_CN.php
   plugins/trunk/lunar/locale/locale_zh_TW.php
   plugins/trunk/lunar/pluginlunar.class.php
   plugins/trunk/lunar/readme.txt
   plugins/trunk/lunar/templates/
   plugins/trunk/lunar/templates/calendar_zh-CN.template
   plugins/trunk/lunar/templates/calendar_zh-TW.template
   plugins/trunk/lunar/templates/lunar.template
Log:


Added: plugins/trunk/lunar/class/action/pluginlunarconfigaction.class.php
===================================================================
--- plugins/trunk/lunar/class/action/pluginlunarconfigaction.class.php	2005-05-17 06:32:17 UTC (rev 2012)
+++ plugins/trunk/lunar/class/action/pluginlunarconfigaction.class.php	2005-05-17 06:48:49 UTC (rev 2013)
@@ -0,0 +1,26 @@
+<?php
+
+	include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
+	include_once( PLOG_CLASS_PATH."plugins/lunar/class/view/pluginlunarconfigview.class.php" );
+
+	/**
+	 * shows a form with the current configuration
+	 */
+	class PluginLunarConfigAction extends AdminAction
+	{
+		
+		function PluginLunarConfigAction( $actionInfo, $request )
+		{
+			$this->AdminAction( $actionInfo, $request );
+		}
+		
+		function perform()
+		{
+            $this->_view = new PluginLunarConfigView( $this->_blogInfo );
+			
+			$this->setCommonData();
+			
+			return true;
+		}
+	}
+?>
\ No newline at end of file

Added: plugins/trunk/lunar/class/action/pluginlunarupdateconfigaction.class.php
===================================================================
--- plugins/trunk/lunar/class/action/pluginlunarupdateconfigaction.class.php	2005-05-17 06:32:17 UTC (rev 2012)
+++ plugins/trunk/lunar/class/action/pluginlunarupdateconfigaction.class.php	2005-05-17 06:48:49 UTC (rev 2013)
@@ -0,0 +1,58 @@
+<?php
+
+	include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
+	include_once( PLOG_CLASS_PATH."plugins/lunar/class/view/pluginlunarconfigview.class.php" );
+		
+	/**
+	 * updates the plugin configuration
+	 */
+	class PluginLunarUpdateConfigAction extends AdminAction
+	{
+		var $_pluginEnabled;
+		
+		function PluginLunarUpdateConfigAction( $actionInfo, $request )
+		{
+			$this->AdminAction( $actionInfo, $request );
+		}
+		
+		function validate()
+		{
+            $this->_pluginEnabled = $this->_request->getValue( "pluginEnabled" );
+            $this->_pluginEnabled = ($this->_pluginEnabled != "" );			
+			
+			return true;
+		}
+		        
+		function perform()
+		{
+            // update the plugin configurations to blog setting
+			$blogSettings = $this->_blogInfo->getSettings();
+            $blogSettings->setValue( "plugin_lunar_enabled", $this->_pluginEnabled );
+            $this->_blogInfo->setSettings( $blogSettings ); 
+		
+			// save the blogs settings
+			$blogs = new Blogs();
+            if( !$blogs->updateBlog( $this->_blogInfo->getId(), $this->_blogInfo )) {
+                $this->_view = new PluginLunarConfigView( $this->_blogInfo );
+                $this->_view->setErrorMessage( $this->_locale->tr("error_updating_settings"));
+                $this->setCommonData();
+
+                return false;                       
+            }
+			
+			// if everything went ok...
+            $this->_blogInfo->setSettings( $blogSettings );
+            $this->_session->setValue( "blogInfo", $this->_blogInfo );
+            $this->saveSession();
+			
+			$this->_view = new PluginLunarConfigView( $this->_blogInfo );
+			$this->_view->setSuccessMessage( $this->_locale->tr("lunar_settings_saved_ok"));			
+			$this->setCommonData();
+			
+			// clear the cache
+			CacheControl::resetBlogCache( $this->_blogInfo->getId());					
+            
+            return true;		
+		}
+	}
+?>
\ No newline at end of file

Added: plugins/trunk/lunar/class/action/showlunarcalendaraction.class.php
===================================================================
--- plugins/trunk/lunar/class/action/showlunarcalendaraction.class.php	2005-05-17 06:32:17 UTC (rev 2012)
+++ plugins/trunk/lunar/class/action/showlunarcalendaraction.class.php	2005-05-17 06:48:49 UTC (rev 2013)
@@ -0,0 +1,25 @@
+<?php
+
+    include_once( PLOG_CLASS_PATH."class/action/blogaction.class.php" );
+    include_once( PLOG_CLASS_PATH."class/view/plugintemplatedview.class.php" );
+    
+    class ShowLunarCalendarAction extends BlogAction
+    {
+		var $_calendarTemplate;
+		
+        function ShowLunarCalendarAction( $actionInfo, $request )
+        {
+            $this->BlogAction( $actionInfo, $request );
+        }
+        
+        function perform()
+        {
+            $this->_calendarTemplate = $this->_request->getValue( "show" );
+
+            $this->_view = new PluginTemplatedView( $this->_blogInfo, "lunar", $this->_calendarTemplate );
+            $this->setCommonData();
+            
+            return true;
+        }
+    }
+?>
\ No newline at end of file

Added: plugins/trunk/lunar/class/view/pluginlunarconfigview.class.php
===================================================================
--- plugins/trunk/lunar/class/view/pluginlunarconfigview.class.php	2005-05-17 06:32:17 UTC (rev 2012)
+++ plugins/trunk/lunar/class/view/pluginlunarconfigview.class.php	2005-05-17 06:48:49 UTC (rev 2013)
@@ -0,0 +1,28 @@
+<?php
+	
+	include_once( PLOG_CLASS_PATH."class/view/admin/adminplugintemplatedview.class.php" );
+
+	/**
+	 * implements the main view of the feed reader plugin
+	 */
+	class PluginLunarConfigView extends AdminPluginTemplatedView
+	{
+
+		function PluginLunarConfigView( $blogInfo )
+		{
+			$this->AdminPluginTemplatedView( $blogInfo, "lunar", "lunar" );
+		}
+		
+		function render()
+		{
+			// load some configuration settings
+			$blogSettings = $this->_blogInfo->getSettings();
+			$pluginEnabled = $blogSettings->getValue( "plugin_lunar_enabled" );
+			
+			// create a view and export the settings to the template
+			$this->setValue( "pluginEnabled", $pluginEnabled );		
+			
+			parent::render();
+		}
+	}
+?>
\ No newline at end of file

Added: plugins/trunk/lunar/js/lunar.js
===================================================================
--- plugins/trunk/lunar/js/lunar.js	2005-05-17 06:32:17 UTC (rev 2012)
+++ plugins/trunk/lunar/js/lunar.js	2005-05-17 06:48:49 UTC (rev 2013)
@@ -0,0 +1,153 @@
+function CalConv( lang )
+{
+	FIRSTYEAR = 1998;
+	LASTYEAR = 2031;
+
+	today = new Date();
+	SolarYear = today.getFullYear();
+	SolarMonth = today.getMonth() + 1;
+	SolarDate = today.getDate();
+	Weekday = today.getDay();
+
+	LunarCal = [
+  				new tagLunarCal( 27,  5, 3, 43, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1 ),
+  				new tagLunarCal( 46,  0, 4, 48, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1 ), /* 1999 */
+  				new tagLunarCal( 35,  0, 5, 53, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1 ), /* 2000 */
+  				new tagLunarCal( 23,  4, 0, 59, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ),
+  				new tagLunarCal( 42,  0, 1,  4, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ),
+  				new tagLunarCal( 31,  0, 2,  9, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0 ),
+  				new tagLunarCal( 21,  2, 3, 14, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1 ), /* 2004 */
+  				new tagLunarCal( 39,  0, 5, 20, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1 ),
+  				new tagLunarCal( 28,  7, 6, 25, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1 ),
+  				new tagLunarCal( 48,  0, 0, 30, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1 ),
+  				new tagLunarCal( 37,  0, 1, 35, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1 ), /* 2008 */
+  				new tagLunarCal( 25,  5, 3, 41, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1 ),
+  				new tagLunarCal( 44,  0, 4, 46, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1 ),
+  				new tagLunarCal( 33,  0, 5, 51, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ),
+  				new tagLunarCal( 22,  4, 6, 56, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 ), /* 2012 */
+  				new tagLunarCal( 40,  0, 1,  2, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 ),
+  				new tagLunarCal( 30,  9, 2,  7, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1 ),
+  				new tagLunarCal( 49,  0, 3, 12, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1 ),
+  				new tagLunarCal( 38,  0, 4, 17, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0 ), /* 2016 */
+  				new tagLunarCal( 27,  6, 6, 23, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1 ),
+  				new tagLunarCal( 46,  0, 0, 28, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0 ),
+  				new tagLunarCal( 35,  0, 1, 33, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0 ),
+  				new tagLunarCal( 24,  4, 2, 38, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ), /* 2020 */
+  				new tagLunarCal( 42,  0, 4, 44, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 ),
+  				new tagLunarCal( 31,  0, 5, 49, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0 ),
+  				new tagLunarCal( 21,  2, 6, 54, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1 ),
+  				new tagLunarCal( 40,  0, 0, 59, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1 ), /* 2024 */
+  				new tagLunarCal( 28,  6, 2,  5, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0 ),
+  				new tagLunarCal( 47,  0, 3, 10, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1 ),
+  				new tagLunarCal( 36,  0, 4, 15, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1 ),
+  				new tagLunarCal( 25,  5, 5, 20, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0 ), /* 2028 */
+  				new tagLunarCal( 43,  0, 0, 26, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1 ),
+  				new tagLunarCal( 32,  0, 1, 31, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0 ),
+  				new tagLunarCal( 22,  3, 2, 36, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0 ) ];
+
+ 	/* 西曆年每月之日數 */
+ 	SolarCal = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ];
+
+ 	/* 西曆年每月之累積日數, 平年與閏年 */
+ 	SolarDays = [
+  				 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365, 396,
+  				 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366, 397 ];
+
+ 	AnimalIdx = ["馬 ", "羊 ", "猴 ", "雞 ", "狗 ", "豬 ", "鼠 ", "牛 ", "虎 ", "兔 ", "龍 ", "蛇 " ];
+ 	LocationIdx = [ "南", "東", "北", "西" ];
+
+ 	if ( SolarYear <= FIRSTYEAR || SolarYear > LASTYEAR ) return 1;
+
+ 	sm = SolarMonth - 1;
+ 
+ 	if ( sm < 0 || sm > 11 ) return 2;
+ 
+ 	leap = GetLeap( SolarYear );
+
+ 	if ( sm == 1 )
+  		d = leap + 28;
+ 	else
+  		d = SolarCal[sm];
+
+ 	if ( SolarDate < 1 || SolarDate > d ) return 3;
+
+ 	y = SolarYear - FIRSTYEAR;
+ 	acc = SolarDays[ leap*14 + sm ] + SolarDate;
+ 	kc = acc + LunarCal[y].BaseKanChih;
+ 	Kan = kc % 10;
+ 	Chih = kc % 12;
+ 	Location = LocationIdx[kc % 4];
+ 	Age = kc % 60;
+ 	if ( Age < 22 )
+  		Age = 22 - Age;
+ 	else
+  		Age = 82 - Age;
+
+ 	Age =Age + 3;
+
+	if (Age < 10)
+  		Age=Age+60;
+
+ 	Animal = AnimalIdx[ Chih ];
+
+ 	if ( acc <= LunarCal[y].BaseDays ) {
+  		y--;
+  		LunarYear = SolarYear - 1;
+  		leap = GetLeap( LunarYear );
+  		sm += 12;
+  		acc = SolarDays[leap*14 + sm] + SolarDate;
+  	} else {
+  		LunarYear = SolarYear;
+  	}
+  
+ 	l1 = LunarCal[y].BaseDays;
+ 	for ( i=0; i<13; i++ ) {
+  		l2 = l1 + LunarCal[y].MonthDays[i] + 29;
+  		if ( acc <= l2 ) break;
+  		l1 = l2;
+  	}
+
+ 	LunarMonth = i + 1;
+ 	LunarDate = acc - l1;
+ 	im = LunarCal[y].Intercalation;
+
+ 	if ( im != 0 && LunarMonth > im ) {
+  		LunarMonth--;
+  		if ( LunarMonth == im ) LunarMonth = -im;
+  	}
+
+ 	if ( LunarMonth > 12 ) LunarMonth -= 12;
+
+    if ( lang == 'zh-CN' || lang == 'zh_CN' ) {
+ 		document.write( "【今天 西元 " + SolarYear + " 年 " + SolarMonth + " 月 " + SolarDate + " 日 " );
+    	document.write( "农历 " + LunarMonth + " 月 " + LunarDate + " 日 " );
+    	document.write( "煞" + Location + " 冲" + Animal + Age + " 岁】" );
+	} else {
+ 		document.write( "【今天 西元 " + SolarYear + " 年 " + SolarMonth + " 月 " + SolarDate + " 日 " );
+    	document.write( "農曆 " + LunarMonth + " 月 " + LunarDate + " 日 " );
+    	document.write( "煞" + Location + " 沖" + Animal + Age + " 歲】" );
+	}                
+ 
+ 	return 0;
+}
+
+ /* 求此西曆年是否為閏年, 返回 0 為平年, 1 為閏年 */
+function GetLeap( year )
+{
+	if ( year % 400 == 0 )
+     	return 1;
+   	else if ( year % 100 == 0 )
+     	return 0;
+   	else if ( year % 4 == 0 )
+     	return 1;
+   	else
+     	return 0;
+}
+
+function tagLunarCal( d, i, w, k, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13) {
+ 	this.BaseDays = d;         /* 到西曆 1 月 1 日到農曆正月初一的累積日數 */
+ 	this.Intercalation = i;    /* 閏月月份. 0==此年沒有閏月 */
+ 	this.BaseWeekday = w;      /* 此年西曆 1 月 1 日為星期幾再減 1 */
+ 	this.BaseKanChih = k;      /* 此年西曆 1 月 1 日之干支序號減 1 */
+ 	this.MonthDays = [ m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13 ]; /* 此農曆年每月之大小, 0==小月(29日), 1==大月(30日) */
+}
\ No newline at end of file

Added: plugins/trunk/lunar/locale/locale_en_UK.php
===================================================================
--- plugins/trunk/lunar/locale/locale_en_UK.php	2005-05-17 06:32:17 UTC (rev 2012)
+++ plugins/trunk/lunar/locale/locale_en_UK.php	2005-05-17 06:48:49 UTC (rev 2013)
@@ -0,0 +1,13 @@
+<?php
+$messages["manageAppearancePlugins"] = "Appearance Management";
+$messages["Lunar"] = "Chinese Lunar Clanedar";
+
+$messages["lunar_plugin_enabled"] = "Enable this plugin";
+$messages["lunar_plugin"] = "Chinese Lunar Calendar Plugin";
+$messages["detail"] = "Detail";
+
+$messages["lunar_settings_saved_ok"] = "Chinese Lunar Calendar settings saved successfully!";
+
+$messages["label_configuration"] = "Configuration";
+$messages["label_enable"] = "Enable";
+?>
\ No newline at end of file

Added: plugins/trunk/lunar/locale/locale_zh_CN.php
===================================================================
--- plugins/trunk/lunar/locale/locale_zh_CN.php	2005-05-17 06:32:17 UTC (rev 2012)
+++ plugins/trunk/lunar/locale/locale_zh_CN.php	2005-05-17 06:48:49 UTC (rev 2013)
@@ -0,0 +1,13 @@
+<?php
+$messages["manageAppearancePlugins"] = "网志外观管理";
+$messages["Lunar"] = "农民历设定";
+
+$messages["lunar_plugin_enabled"] = "启动外挂程式";
+$messages["lunar_plugin"] = "农民历外挂程式";
+$messages["detail"] = "详细";
+
+$messages["lunar_settings_saved_ok"] = "农民历设定储存成功。";
+
+$messages["label_configuration"] = "设定";
+$messages["label_enable"] = "启动";
+?>
\ No newline at end of file

Added: plugins/trunk/lunar/locale/locale_zh_TW.php
===================================================================
--- plugins/trunk/lunar/locale/locale_zh_TW.php	2005-05-17 06:32:17 UTC (rev 2012)
+++ plugins/trunk/lunar/locale/locale_zh_TW.php	2005-05-17 06:48:49 UTC (rev 2013)
@@ -0,0 +1,13 @@
+<?php
+$messages["manageAppearancePlugins"] = "網誌外觀管理";
+$messages["Lunar"] = "農民曆設定";
+
+$messages["lunar_plugin_enabled"] = "啟動外掛程式";
+$messages["lunar_plugin"] = "農民曆外掛程式";
+$messages["detail"] = "詳細";
+
+$messages["lunar_settings_saved_ok"] = "農民曆設定儲存成功。";
+
+$messages["label_configuration"] = "設定";
+$messages["label_enable"] = "啟動";
+?>
\ No newline at end of file

Added: plugins/trunk/lunar/pluginlunar.class.php
===================================================================
--- plugins/trunk/lunar/pluginlunar.class.php	2005-05-17 06:32:17 UTC (rev 2012)
+++ plugins/trunk/lunar/pluginlunar.class.php	2005-05-17 06:48:49 UTC (rev 2013)
@@ -0,0 +1,79 @@
+<?php
+	include_once( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
+	include_once( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
+
+	class PluginLunar extends PluginBase
+	{
+		var $pluginEnabled;
+		
+		function PluginLunar()
+		{
+			$this->PluginBase();
+
+			$this->id      = "lunar";
+			$this->author  = "Mark Wu";
+			$this->desc    = "Show Chinese Lunar Calendar date information in template.";
+
+			$this->locales = Array( "en_UK" , "zh_TW" );
+
+			$this->init();
+		}
+
+		function init()
+		{
+            $this->registerBlogAction( "lunarCalendar", "ShowLunarCalendarAction" );
+            $this->registerAdminAction( "lunar", "PluginLunarConfigAction" );
+			$this->registerAdminAction( "updateLunarConfig", "PluginLunarUpdateConfigAction" );
+			
+			$menu =& Menu::getMenu();
+			if( !$menu->entryExists( "/menu/controlCenter/manageAppearancePlugins" ))						
+				$this->addMenuEntry( "/menu/controlCenter", "manageAppearancePlugins", "", "", true, false );			
+            $this->addMenuEntry( "/menu/controlCenter/manageAppearancePlugins", "Lunar", "?op=lunar", "" );
+		}
+
+		function register()
+		{
+		    $blogSettings = $this->blogInfo->getSettings();
+			$this->pluginEnabled = $blogSettings->getValue( "plugin_lunar_enabled" );
+		}
+
+	    function isEnabled()
+	    {
+	        return $this->pluginEnabled;
+	    }
+	    
+	    function show()
+	    {
+            $locale = $this->blogInfo->getLocale();
+            $langId = $locale->getLanguageId();
+
+			$rg = $this->blogInfo->getBlogRequestGenerator();
+			$baseUrl = $rg->getBaseUrl();
+
+	    	$str = '';
+	    	$str = '<script type="text/javascript" src="'.$baseUrl.'/plugins/lunar/js/lunar.js"></script>';
+	    	$str .= '<script type="text/javascript">CalConv("'.$langId.'");</script>';
+	    	$str .= '... <a href="#" onclick="javascript:window.open(\''.$this->getCalendarUrl($langId);
+	    	$str .= '\',\''.$locale->tr("calendar").'\',\'scrollbars=no,resizable=no,toolbar=no,height=400,width=800\');">'.$locale->tr("detail").'</a>';
+	    	return $str;
+		}
+
+        function getCalendarUrl( $langId )
+        {
+ 			if ( $langId == "zh_CN" || $langId == "zh-CN" )
+ 				$langId = "zh-CN";
+ 			else
+ 				$langId = "zh-TW";
+ 			
+ 			$rg = new RawRequestGenerator($this->blogInfo);
+            
+        	$rg->addParameter( "op", "lunarCalendar" );
+        	$rg->addParameter( "show", "calendar_".$langId);
+            $rg->addParameter( "blogId", $this->blogInfo->getId());
+
+            $templatePage = $rg->getIndexUrl().$rg->getRequest();
+
+            return $templatePage;
+        }				
+	}
+?>
\ No newline at end of file

Added: plugins/trunk/lunar/readme.txt
===================================================================
--- plugins/trunk/lunar/readme.txt	2005-05-17 06:32:17 UTC (rev 2012)
+++ plugins/trunk/lunar/readme.txt	2005-05-17 06:48:49 UTC (rev 2013)
@@ -0,0 +1,15 @@
+Plugin: Lunar
+Author: Mark Wu
+Release Date: 2005/05/17
+Version: 1.0
+
+This plugin offers Chinese Lunar Calendar date information in template
+
+Requirement:
+This plugin only works under UTF-8 encoding with Chinese fonts (Traditional/Simplified) support.
+
+Installation:
+1. Just enable the plugin in control center
+2. Put the follow template to where you want to show Chinese Lunar Date
+
+{$lunar->show()}
\ No newline at end of file

Added: plugins/trunk/lunar/templates/calendar_zh-CN.template
===================================================================
--- plugins/trunk/lunar/templates/calendar_zh-CN.template	2005-05-17 06:32:17 UTC (rev 2012)
+++ plugins/trunk/lunar/templates/calendar_zh-CN.template	2005-05-17 06:48:49 UTC (rev 2013)
@@ -0,0 +1,1462 @@
+{literal}
+<!--
+        ***************************************
+         农历月历&世界时间 DHTML 程式 (中囯版)
+        ***************************************
+             最后修改: 2005 年 1 月 11 日
+
+
+如果您觉得这个程式不错,您可以自由转寄给亲朋好友分享。自由使
+用范围: 学校、学会、公会、公司内部、程式研究、个人网站供人查
+询使用。
+
+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=big5">
+<SCRIPT language=Javascript>
+<!--
+/*****************************************************************************
+                                 个人偏好设定
+*****************************************************************************/
+
+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 世界湿地日[1996]",
+"0207 国际声援南非日[1964]",
+"0210 世界气象日[1960]",
+"0214 情人节",
+"0215 中国12亿人口日[1995]",
+"0221 反对殖民制度斗争日[1949]",
+"0224 第三世界青年日",
+"0228 世界居住条件调查日",
+//-
+"0301 国际海豹日[1983]",
+"0303 全国爱耳日[2000]",
+"0305 中国青年志愿者服务日",
+"0308 国际妇女节[1910]",
+"0312 中国植树节[1979] 孙中山逝世纪念日",
+"0314 国际警察日(节)",
+"0315 国际消费者权益日[1983]",
+"0316 手拉手情系贫困小伙伴全国统一行动日",
+"0317 中国国医节[1929] 国际航海日",
+"0318 全国科技人才活动日",
+"0321 世界睡眠日[2001] 世界儿歌日 世界森林日(林业节)[1972] 消除种族歧视国际日[1976]",
+"0322 世界水日[1993]",
+"0323 世界气象日[1950]",
+"0324 世界防治结核病日[1996]",
+"0330 巴勒斯坦国土日",
+//-
+"0401 国际愚人节 全国爱国卫生运动月(四月) 税收宣传月(四月)",
+"0402 国际儿童图书日",
+"0407 世界卫生日[1950]",
+"0421 全国企业家活动日[1994]",
+"0422 世界地球日[1970]",
+"0423 世界图书和版权日",
+"0424 世界青年反对殖民主义日[1957] 亚非新闻工作者日",
+"0425 全国预防接种宣传日[1986]",
+"0426 世界知识产权日[2001]",
+"0427 联谊城日",
+"0430 全国交通安全反思日",
+//-
+"0501 国际劳动节[1889] 国际示威游行日",
+"0503 世界哮喘日",
+"0504 中国五四青年节[1939] 五四运动纪念日[1919] 科技传播日",
+"0505 全国碘缺乏病防治日[1994]",
+"0508 世界红十字日[1948] 世界微笑日",
+"0512 国际护士节[1912]",
+"0515 国际家庭(咨询)日[1994]",
+"0517 世界电信日[1969]",
+"0518 国际博物馆日",
+"0520 全国母乳喂养宣传日[1990] 全国学生营养日[1990]",
+"0526 世界向人体条件挑战日[1993]",
+"0530 “五卅”反对帝国主义运动纪念日[1925]",
+"0531 世界无烟日[1988]", 
+//
+"0601 国际儿童节[1949]",
+"0605 世界环境日[1974]",
+"0606 全国爱眼日[1996]",
+"0611 中国人口日",
+"0617 世界防止荒漠化和干旱日",
+"0620 世界难民日[2001]",
+"0622 中国儿童慈善活动日",
+"0623 国际奥林匹克日[1894] 世界手球日",
+"0625 全国土地日[1991]",
+"0626 国际禁毒日(国际反毒品日)[1987] 国际宪章日(联合国宪章日)",
+"0630 世界青年联欢节",
+//-
+"0701 中国共产党建党日[1921] 香港回归纪念日[1997] 国际建筑日[1985] 亚洲“三十亿人口日”[1988]",
+"0702 国际体育记者日 精品推介站(21softs.com)正式开放纪念日[2001]",
+"0707 中国人民抗日战争纪念日[1937]",
+"0711 世界(50亿)人口日[1987]",
+"0720 人类首次成功登月[1969]",
+"0726 世界语(言)创立日",
+"0728 第一次世界大战爆发[1914]",
+"0730 非洲妇女日",
+//-
+"0801 中国人民解放军建军节[1927]",
+"0806 国际电影节[1932]",
+"0808 中国男子节(爸爸节)[1988]",
+"0815 日本正式宣布无条件投降日[1945]",
+"0826 全国律师咨询日[1993]",
+//-
+"0903 中国抗日战争胜利纪念日[1945]",
+"0908 世界扫盲日[1966] 国际新闻工作者(团结)日[1958]",
+"0910 中国教师节[1985]",
+"0914 世界清洁地球日",
+"0916 国际臭氧层保护日[1987]",
+"0918 “九·一八”事变纪念日(中国国耻日)[1931]",
+"0920 全国爱牙日[1989]",
+"0921 国际和平日(全球停火和非暴力日, 2002年以后)[2002]",
+"0926 (曲阜国际)孔子文化节[1989]",
+"0927 世界旅游日[1980]",
+//-
+"1001*国庆节[1949] 国际音乐日[1980] 国际敬老日(老人节)[1991]",
+"1002 国际和平(与民主自由)斗争日[1949]",
+"1004 世界动物日[1949]",
+"1008 全国高血压日[1998] 世界视觉日 国际左撇子日",
+"1009 世界邮政日(万国邮联日)[1969]",
+"1010 辛亥革命纪念日[1911] 世界精神卫生日[1992] 世界居室卫生日",
+"1011 声援南非政治犯日",
+"1013 中国少年先锋队诞辰日[1949] 世界保健日 国际教师节 采用格林威治时间为国际标准时间日[1884]",
+"1014 世界标准日[1969]",
+"1015 国际盲人节(白手杖节)[1984]",
+"1016 世界粮食日[1979]",
+"1017 世界消除贫困日",
+"1022 世界传统医药日[1992]",
+"1024 联合国日[1945] 世界发展信息日",
+"1028 世界“男性健康日”[2000]",
+"1031 世界勤俭日",
+//-
+"1107 十月社会主义革命纪念日(现俄“和谐和解日”)[1917]",
+"1108 中国记者日[2000]",
+"1109 中国消防宣传日(消防节, 全国消防安全宣传教育日)[1992]",
+"1110 世界青年节(日)[1946]",
+"1111 国际科学与和平周(本日所属的一周)",
+"1112 孙中山诞辰纪念日[1866, 1926定]",
+"1114 世界糖尿病日[1991]",
+"1117 国际大学生节(世界学生节)[1946]",
+"1120  世界儿童日[1986]",
+"1121 世界问候日[1973] 世界电视日[1996]",
+"1129 国际声援巴勒斯坦人民国际日[1977]",
+//-
+"1201 世界艾滋病日[1988]",
+"1202 废除一切形式奴役世界日[1986]",
+"1203 世界残疾人日[1992]",
+"1204 中国法制宣传日[2001]",
+"1205 国际经济和社会发展志愿人员日[1985] 世界弱能人士日",
+"1207 国际民航日[纪念1994, 1996定]",
+"1209 “一二·九”运动纪念日[1935] 世界足球日[1995]",
+"1210 世界人权日[1950]",
+"1211 世界防治哮喘日[1998]",
+"1212 西安事变纪念日[1936]",
+"1213 南京大屠杀(1937年)纪念日!紧记血泪史![1937]",
+"1215 世界强化免疫日",
+"1220 澳门回归纪念日[1999]",
+"1221 国际篮球日",
+"1224 平安夜",
+"1225 圣诞节",
+"1229 国际生物多样性日[1994]");
+
+//某月的第几个星期几。 5,6,7,8 表示到数第 1,2,3,4 个星期几
+var wFtv = new Array(
+"0110 黑人日",
+"0150 国际麻风节(世界防治麻风病日) 1954", //一月的最后一个星期日(月倒数第一个星期日)
+"0351 全国中小学生安全教育日[1996]",
+"0430 世界儿童日[1986]",
+"0453 秘书节",
+"0520 国际母亲节[1914] 救助贫困母亲日[1997]",
+"0530 全国助残日[1990]",
+"0532 国际牛奶日[1961]",
+"0630 父亲节",
+"0716 国际合作节",
+"0911 劳动节",
+"0932 国际和平日(1981至2001年)[1981]",
+"0936 全民国防教育日[2001]",
+"0940 国际聋人节[1958]",
+"0950 世界海事日[1978] 世界心脏日[2000]",
+"1011 国际住房日[1982]",
+"1013 国际减轻自然灾害日(减灾日)[1990]",
+"1144 感恩节",
+"1220 国际儿童电视广播日");
+
+//农历节日
+var lFtv = new Array(
+"0101*春节",
+"0115 元宵节 壮族歌墟节 朝鲜族上元节 苗族踩山节 达翰尔族卡钦",
+"0116 侗族芦笙节(正月十六至二十)",
+"0125 填仓节",
+"0129 送穷日",
+"0201 瑶族忌鸟节",
+"0202 春龙节(龙抬头节) 畲族会亲节",
+"0315 傈傈族刀杆节 白族三月街(三月十五至二十五)",
+"0323 妈祖生辰 (天上圣母诞辰)",
+"0408 牛王诞",
+"0418 锡伯族西迁节",
+"0505 端午节 黎族朝花节 苗族龙船年",
+"0513 阿昌族泼水节",
+"0522 鄂温克族米阔鲁节",
+"0529 瑶族达努节",
+"0606 姑姑节 天贶节 壮族祭田节 瑶族尝新节",
+"0624 彝族 阿昌族 白族 佤族 纳西族 基诺族火把节",
+"0707 七七中国情人节(女儿节, 乞巧节)",
+"0713 侗族吃新节",
+"0715 中元节 盂兰盆会 普米族转山会",
+"0815 中秋节 拉祜族尝新节",
+"0909 重阳节 中国老年节(义务助老活动日)[1989]",
+"1001 祭祖节(十月朝)",
+"1016 瑶族盘王节",
+"1208 腊八节",
+"1223 北方灶君节[北方小年(扫房日)]",
+"1224 南方祭灶节[南方小年(掸尘日)]",
+"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","","圣马利诺"],
+"Serbia & Montenegro塞尔维亚及蒙特尼哥罗":["+0100","","贝尔格勒"],
+"Slovenia           斯洛维尼亚":["+0100","","卢布尔雅那"],
+"Span               西班牙  ":["+0100","03L01|10L01","马德里"]
+},
+"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","","派哥派哥港"],
+"Australia(EST)     澳大利亚  ":["+1000","10L02|03L03","坎培拉、墨尔本、雪梨、荷伯特"],
+"Australia(EST)     澳大利亚  ":["+1000","10F02|03L03","塔斯马布亚州"],
+"Australia(CST)     澳大利亚  ":["+0930","10L02|03L03","阿德莱德、北澳洲与南领地"],
+"Australia(WST)     澳大利亚  ":["+0800","","伯斯、布利斯班、达尔文"],
+"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);
+
+   document.getElementById("GZ").innerHTML = yDisplay +'年 农历岁次' + cyclical(SY-1900+36) + '年 【'+Animals[(SY-4)%12]+'】';
+
+   document.getElementById("YMBG").innerHTML = "&nbsp;" + SY + "<BR>&nbsp;" + monthName[SM];
+
+   for(i=0;i<42;i++) {
+
+      gObj=document.getElementById('GD'+ i);
+      sObj=document.getElementById('SD'+ i);
+      lObj=document.getElementById('LD'+ i);
+
+
+      gObj.className = '';
+
+      sD = i - cld.firstWeek;
+
+      if(sD>-1 && sD<cld.length) { //日期内
+         sObj.innerHTML = sD+1;
+
+         if(cld[sD].isToday) gObj.className = 'todayColor'; //今日颜色
+
+         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=document.CLD.SY.selectedIndex+1900;
+   m=document.CLD.SM.selectedIndex;
+   drawCld(y,m);
+}
+
+function pushBtm(K) {
+   switch (K){
+      case 'YU' :
+         if(document.CLD.SY.selectedIndex>0) document.CLD.SY.selectedIndex--;
+         break;
+      case 'YD' :
+         if(document.CLD.SY.selectedIndex<200) document.CLD.SY.selectedIndex++;
+         break;
+      case 'MU' :
+         if(document.CLD.SM.selectedIndex>0) {
+            document.CLD.SM.selectedIndex--;
+         }
+         else {
+            document.CLD.SM.selectedIndex=11;
+            if(document.CLD.SY.selectedIndex>0) document.CLD.SY.selectedIndex--;
+         }
+         break;
+      case 'MD' :
+         if(document.CLD.SM.selectedIndex<11) {
+            document.CLD.SM.selectedIndex++;
+         }
+         else {
+            document.CLD.SM.selectedIndex=0;
+            if(document.CLD.SY.selectedIndex<200) document.CLD.SY.selectedIndex++;
+         }
+         break;
+      default :
+         document.CLD.SY.selectedIndex=tY-1900;
+         document.CLD.SM.selectedIndex=tM;
+   }
+   changeCld();
+
+   return false;
+
+}
+
+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=document.getElementById('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="opacity:0.8; -moz-opacity:0.8; 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.getElementById("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(event) {
+
+   if(navName == 'IE') {
+      x=event.x;
+      y=event.y;
+   }
+   else {
+      x=event.clientX;
+      y=event.clientY;
+   }
+
+
+   if (document.body.scrollLeft) x+=document.body.scrollLeft;
+   if (document.body.scrollTop) 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)){ //F L 头或尾
+      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();
+   document.getElementById("LocalTime").innerHTML = showLocale(today);
+   document.getElementById("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].value;
+   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, key);
+
+   objCountryMenu.options[0].selected=true;
+   chCountry();
+}
+
+//变更国家
+function chCountry() {
+   var txtContinent = objContinentMenu.options[objContinentMenu.selectedIndex].value;
+   var txtCountry = objCountryMenu.options[objCountryMenu.selectedIndex].value;
+
+   objTimeZone = timeData[txtContinent][txtCountry];
+
+   getGlobeTime();
+
+   //地图位移
+   document.getElementById("City").innerHTML = (isDS==true?"<SPAN STYLE='font-size:12pt;font-family:Wingdings; color:Red;'><font face='Wingdings'>R</font></span> ":'') + objTimeZone[2]; //首都
+   var pos = Math.floor(objTimeZone[0].substr(0,3));
+   if(pos<0) pos+=24;
+   pos*=-10;
+   document.getElementById("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;
+
+   //时间
+   if(navName == 'IE') {
+   	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, key);
+
+
+   var TZ1 = getCookie('TZ1');
+   var TZ2 = getCookie('TZ2');
+
+
+   if(TZ1=='') {TZ1=0; TZ2=18;}
+   setTZ(TZ1,TZ2);
+
+   tick();
+
+
+   //月历
+   dStyle = document.getElementById("detail").style;
+   document.CLD.SY.selectedIndex=tY-1900;
+   document.CLD.SM.selectedIndex=tM;
+   drawCld(tY,tM);
+
+}
+
+function terminate() {
+   setCookie("TZ1",objContinentMenu.selectedIndex);
+   setCookie("TZ2",objCountryMenu.selectedIndex);
+}
+
+
+//-->
+</SCRIPT>
+<STYLE>
+.todayColor { background-color: aqua; border: 2px ridge blue; }
+</STYLE>
+</HEAD>
+<BODY style="z-index:0; position: relative;" onload=initialize() onunload=terminate() onmousemove="mEvn(event)">
+<SCRIPT language=Javascript><!--
+var agent = navigator.userAgent;
+var navVer = 0;
+var navName = '';
+
+if(agent.indexOf("MSIE") != -1) {
+	navVer = agent.replace(/^.+MSIE ([0-9\.]+).*$/i, "$1");
+	navName = 'IE';
+}
+if(agent.indexOf("Firefox") != -1) {
+	navVer = agent.replace(/^.+Firefox\/([0-9\.]+).*$/i, "$1");
+	navName = 'Firefox';
+}
+if(agent.indexOf("Gecko") != -1) {
+	navVer = agent.replace(/^.*Mozilla\/([0-9\.]+).*$/i, "$1");
+	navName = 'Mozilla';
+}
+if(navVer == 0 || (navName=='IE'&&navVer<4) ) {
+ document.write("<h1>你的浏览器无法执行此程式。</h1>此程式需在 IE 4.0 或 Firefox 1.0 以后的版本才能执行!!")
+ document.close;
+}
+//--></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><font face="Wingdings">&Uacute;</font><DIV id=map
+          style="FILTER: Light; OVERFLOW: hidden; WIDTH: 240px; HEIGHT: 120px; BACKGROUND-COLOR: mediumblue"><FONT
+            id=world face="Webdings" style="FONT-SIZE: 185px; LEFT: 0px; COLOR: green; POSITION: relative; TOP: -26px">&#251;&#251;</FONT></DIV><font face="Wingdings">&Ugrave;</font></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 onsubmit="return false;">
+  <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 width=455>
+      <TBODY>
+      <TR>
+        <TD bgColor=#000080 colSpan=7 align=center><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=楷体_GB2312 color=#ffffff
+          size=4></FONT><BR></TD></TR>
+      <TR align=middle bgColor=#e0e0e0>
+        <TD width=65>日</TD>
+        <TD width=65>一</TD>
+        <TD width=65>二</TD>
+        <TD width=65>三</TD>
+        <TD width=65>四</TD>
+        <TD width=65>五</TD>
+        <TD width=65>六</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>
+</TD></FORM></TR></TBODY></TABLE></CENTER></BODY></HTML>
+{/literal}
\ No newline at end of file

Added: plugins/trunk/lunar/templates/calendar_zh-TW.template
===================================================================
--- plugins/trunk/lunar/templates/calendar_zh-TW.template	2005-05-17 06:32:17 UTC (rev 2012)
+++ plugins/trunk/lunar/templates/calendar_zh-TW.template	2005-05-17 06:48:49 UTC (rev 2013)
@@ -0,0 +1,1365 @@
+{literal}
+<!--
+        ***************************************
+         農曆月曆&世界時間 DHTML 程式 (台灣版)
+        ***************************************
+             最後修改: 2005 年 1 月 11 日
+
+
+如果您覺得這個程式不錯,您可以自由轉寄給親朋好友分享。自由使
+用範圍: 學校、學會、公會、公司內部、程式研究、個人網站供人查
+詢使用。
+
+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=big5">
+<SCRIPT language=Javascript>
+<!--
+/*****************************************************************************
+                                 個人偏好設定
+*****************************************************************************/
+
+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*元旦 中華民國開國紀念日",
+"0111 司法節",
+"0115 藥師節",
+"0123 自由日",
+"0204 農民節",
+"0214 情人節",
+"0215 戲劇節",
+"0219 新生活運動紀念日",
+"0228*和平紀念日",
+"0301 兵役節",
+"0305 童子軍節",
+"0308 婦女節",
+"0312 植樹節 國父逝世紀念日",
+"0317 國醫節",
+"0320 郵政節",
+"0321 氣象節",
+"0325 美術節",
+"0326 廣播節",
+"0329 青年節 革命先烈紀念日",
+"0330 出版節",
+"0401 愚人節 主計節",
+"0404 婦幼節",
+"0405 音樂節",
+"0407 衛生節",
+"0422 世界地球日",
+"0501*勞動節",
+"0504 文藝節",
+"0505 舞蹈節",
+"0510 珠算節",
+"0512 護士節",
+"0603 禁煙節",
+"0606 工程師節 水利節",
+"0609 鐵路節",
+"0615 警察節",
+"0630 會計師節",
+"0701 漁民節 公路節 稅務節",
+"0711 航海節",
+"0712 聾啞節",
+"0808 父親節",
+"0814 空軍節",
+"0827 鄭成功\誕辰",
+"0901 記者節",
+"0903 軍人節 抗戰紀念",
+"0909 體育節 律師節",
+"0913 法律日",
+"0928 教師節 孔子誕辰",
+"1006 老人節",
+"1010*國慶紀念日",
+"1021 華僑節",
+"1025 台灣光復節",
+"1031 萬聖節 蔣公誕辰紀念日 榮民節",
+"1101 商人節",
+"1111 工業節 地政節",
+"1117 自來水節",
+"1112 國父誕辰紀念日 醫師節 中華文化復興節",
+"1121 防空節",
+"1205 海員節 盲人節",
+"1210 人權節",
+"1212 憲兵節",
+"1225 行憲紀念日 民族復興節 聖誕節",
+"1227 建築師節",
+"1228 電信節",
+"1231 受信節");
+
+//某月的第幾個星期幾。 5,6,7,8 表示到數第 1,2,3,4 個星期幾
+var wFtv = new Array(
+"0520 母親節",
+"0716 國際合作節",
+"0730 被奴役國家週",
+"1144 感恩節");
+
+//農曆節日
+var lFtv = new Array(
+"0101*春節",
+"0102*回娘家",
+"0103*祭祖",
+"0104 迎神",
+"0105 開市",
+"0109 天公生",
+"0115 元宵節 觀光節",
+"0202 頭牙 土地公生",
+"0323 媽祖生",
+"0408 浴佛節",
+"0505*端午節 詩人節",
+"0701 開鬼門",
+"0707 七夕情人節",
+"0715 中元節",
+"0800 關鬼門",
+"0815*中秋節",
+"0909 重陽節",
+"1208 臘八節",
+"1216 尾牙",
+"1224 送神",
+"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","","聖馬利諾"],
+"Serbia & Montenegro塞爾維亞及蒙特尼哥羅":["+0100","","貝爾格勒"],
+"Slovenia           斯洛維尼亞":["+0100","","盧布爾雅那"],
+"Span               西班牙  ":["+0100","03L01|10L01","馬德里"]
+},
+"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","","派哥派哥港"],
+"Australia(EST)     澳大利亞  ":["+1000","10L02|03L03","坎培拉、墨爾本、雪梨、荷伯特"],
+"Australia(EST)     澳大利亞  ":["+1000","10F02|03L03","塔斯馬布亞州"],
+"Australia(CST)     澳大利亞  ":["+0930","10L02|03L03","阿德萊德、北澳洲與南領地"],
+"Australia(WST)     澳大利亞  ":["+0800","","伯斯、布利斯班、達爾文"],
+"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) yDisplay = '民國' + (((SY-1911)==1)?'元':SY-1911);
+
+   document.getElementById("GZ").innerHTML = yDisplay +'年 農曆歲次' + cyclical(SY-1900+36) + '年 【'+Animals[(SY-4)%12]+'】';
+
+   document.getElementById("YMBG").innerHTML = "&nbsp;" + SY + "<BR>&nbsp;" + monthName[SM];
+
+   for(i=0;i<42;i++) {
+
+      gObj=document.getElementById('GD'+ i);
+      sObj=document.getElementById('SD'+ i);
+      lObj=document.getElementById('LD'+ i);
+
+
+      gObj.className = '';
+
+      sD = i - cld.firstWeek;
+
+      if(sD>-1 && sD<cld.length) { //日期內
+         sObj.innerHTML = sD+1;
+
+         if(cld[sD].isToday) gObj.className = 'todayColor'; //今日顏色
+
+         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=document.CLD.SY.selectedIndex+1900;
+   m=document.CLD.SM.selectedIndex;
+   drawCld(y,m);
+}
+
+function pushBtm(K) {
+   switch (K){
+      case 'YU' :
+         if(document.CLD.SY.selectedIndex>0) document.CLD.SY.selectedIndex--;
+         break;
+      case 'YD' :
+         if(document.CLD.SY.selectedIndex<200) document.CLD.SY.selectedIndex++;
+         break;
+      case 'MU' :
+         if(document.CLD.SM.selectedIndex>0) {
+            document.CLD.SM.selectedIndex--;
+         }
+         else {
+            document.CLD.SM.selectedIndex=11;
+            if(document.CLD.SY.selectedIndex>0) document.CLD.SY.selectedIndex--;
+         }
+         break;
+      case 'MD' :
+         if(document.CLD.SM.selectedIndex<11) {
+            document.CLD.SM.selectedIndex++;
+         }
+         else {
+            document.CLD.SM.selectedIndex=0;
+            if(document.CLD.SY.selectedIndex<200) document.CLD.SY.selectedIndex++;
+         }
+         break;
+      default :
+         document.CLD.SY.selectedIndex=tY-1900;
+         document.CLD.SM.selectedIndex=tM;
+   }
+   changeCld();
+
+   return false;
+
+}
+
+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=document.getElementById('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="opacity:0.8; -moz-opacity:0.8; 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.getElementById("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(event) {
+
+   if(navName == 'IE') {
+      x=event.x;
+      y=event.y;
+   }
+   else {
+      x=event.clientX;
+      y=event.clientY;
+   }
+
+
+   if (document.body.scrollLeft) x+=document.body.scrollLeft;
+   if (document.body.scrollTop) 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)){ //F L 頭或尾
+      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();
+   document.getElementById("LocalTime").innerHTML = showLocale(today);
+   document.getElementById("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].value;
+   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, key);
+
+   objCountryMenu.options[0].selected=true;
+   chCountry();
+}
+
+//變更國家
+function chCountry() {
+   var txtContinent = objContinentMenu.options[objContinentMenu.selectedIndex].value;
+   var txtCountry = objCountryMenu.options[objCountryMenu.selectedIndex].value;
+
+   objTimeZone = timeData[txtContinent][txtCountry];
+
+   getGlobeTime();
+
+   //地圖位移
+   document.getElementById("City").innerHTML = (isDS==true?"<SPAN STYLE='font-size:12pt;font-family:Wingdings; color:Red;'><font face='Wingdings'>R</font></span> ":'') + objTimeZone[2]; //首都
+   var pos = Math.floor(objTimeZone[0].substr(0,3));
+   if(pos<0) pos+=24;
+   pos*=-10;
+   document.getElementById("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;
+
+   //時間
+   if(navName == 'IE') {
+   	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, key);
+
+
+   var TZ1 = getCookie('TZ1');
+   var TZ2 = getCookie('TZ2');
+
+
+   if(TZ1=='') {TZ1=0; TZ2=18;}
+   setTZ(TZ1,TZ2);
+
+   tick();
+
+
+   //月曆
+   dStyle = document.getElementById("detail").style;
+   document.CLD.SY.selectedIndex=tY-1900;
+   document.CLD.SM.selectedIndex=tM;
+   drawCld(tY,tM);
+
+}
+
+function terminate() {
+   setCookie("TZ1",objContinentMenu.selectedIndex);
+   setCookie("TZ2",objCountryMenu.selectedIndex);
+}
+
+
+//-->
+</SCRIPT>
+<STYLE>
+.todayColor { background-color: aqua; border: 2px ridge blue; }
+</STYLE>
+</HEAD>
+<BODY style="z-index:0; position: relative;" onload=initialize() onunload=terminate() onmousemove="mEvn(event)">
+<SCRIPT language=Javascript><!--
+var agent = navigator.userAgent;
+var navVer = 0;
+var navName = '';
+
+if(agent.indexOf("MSIE") != -1) {
+	navVer = agent.replace(/^.+MSIE ([0-9\.]+).*$/i, "$1");
+	navName = 'IE';
+}
+if(agent.indexOf("Firefox") != -1) {
+	navVer = agent.replace(/^.+Firefox\/([0-9\.]+).*$/i, "$1");
+	navName = 'Firefox';
+}
+if(agent.indexOf("Gecko") != -1) {
+	navVer = agent.replace(/^.*Mozilla\/([0-9\.]+).*$/i, "$1");
+	navName = 'Mozilla';
+}
+if(navVer == 0 || (navName=='IE'&&navVer<4) ) {
+ document.write("<h1>你的瀏覽器無法執行此程式。</h1>此程式需在 IE 4.0 或 Firefox 1.0 以後的版本才能執行!!")
+ document.close;
+}
+//--></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><font face="Wingdings">&Uacute;</font><DIV id=map
+          style="FILTER: Light; OVERFLOW: hidden; WIDTH: 240px; HEIGHT: 120px; BACKGROUND-COLOR: mediumblue"><FONT
+            id=world face="Webdings" style="FONT-SIZE: 185px; LEFT: 0px; COLOR: green; POSITION: relative; TOP: -26px">&#251;&#251;</FONT></DIV><font face="Wingdings">&Ugrave;</font></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 onsubmit="return false;">
+  <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 width=455>
+      <TBODY>
+      <TR>
+        <TD bgColor=#000080 colSpan=7 align=center><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=65>日</TD>
+        <TD width=65>一</TD>
+        <TD width=65>二</TD>
+        <TD width=65>三</TD>
+        <TD width=65>四</TD>
+        <TD width=65>五</TD>
+        <TD width=65>六</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>
+</TD></FORM></TR></TBODY></TABLE></CENTER></BODY></HTML>
+{/literal}
\ No newline at end of file

Added: plugins/trunk/lunar/templates/lunar.template
===================================================================
--- plugins/trunk/lunar/templates/lunar.template	2005-05-17 06:32:17 UTC (rev 2012)
+++ plugins/trunk/lunar/templates/lunar.template	2005-05-17 06:48:49 UTC (rev 2013)
@@ -0,0 +1,24 @@
+{include file="$admintemplatepath/header.template"}
+{include file="$admintemplatepath/navigation.template" showOpt=Lunar title=$locale->tr("lunar_plugin")}
+<form name="lunarPluginConfig" method="post">
+ <fieldset class="inputField">
+ <legend>{$locale->tr("label_configuration")}</legend>  
+  {include file="$admintemplatepath/successmessage.template"}
+  {include file="$admintemplatepath/errormessage.template"}   
+  <div class="field">
+   <label for="pluginEnabled">{$locale->tr("label_enable")}</label>
+   <div class="formHelp">   
+    <input class="checkbox" type="checkbox" name="pluginEnabled" id="pluginEnabled" {if $pluginEnabled} checked="checked" {/if} value="1" />{$locale->tr("lunar_plugin_enabled")}
+   </div>
+  </div>
+  
+ </fieldset>  
+
+ <div class="buttons">
+  <input type="hidden" name="op" value="updateLunarConfig" />
+  <input type="reset" name="{$locale->tr("reset")}" />    
+  <input type="submit" name="{$locale->tr("update_settings")}" value="{$locale->tr("update")}" />
+ </div>
+</form>
+{include file="$admintemplatepath/footernavigation.template"}
+{include file="$admintemplatepath/footer.template"}
\ No newline at end of file




More information about the pLog-svn mailing list