<?php
!defined('ADMIN')&&die("<meta http-equiv='refresh' content=0;url='/'>");
global $i;
FN("title","万年历");
_F("top");
?>
<script type="text/javascript" src="system/js/wnl.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	initial();
	if($('#content').width()>340){
		var w=parseInt($('#content').width()/7);
		$('.aorange,.one,.lb,.bs,.day td').width(w)
		$('#date_content,.table_head').width(w*7)
	}
})
</script>
<link href="system/css/wnl.css" rel="stylesheet" type="text/css">
<tt id="tw"></tt>
<fieldset>
<legend><h1><b><var><img src="system/img/left.gif" /></var><dfn class="hide"><img src="system/img/right.gif" /></dfn></b>　万年历</h1></legend>
  <form name="calender_content">
<div id="content">
<!-- 显示日期详情 --><div id="detail">
<div id="date_content"></div>
<div id="animal_year"></div>
</div>
<table class="week">
  <tbody>
     <tr>
        <td class="ch">
                <!-- 日历头部 -->
               <table>
 <tbody>
       <tr class="day">
              <td>日</td>
              <td>一</td>
              <td>二</td>
              <td>三</td>
              <td>四</td>
              <td>五</td>
              <td>六</td>
          </tr>
     </tbody>
                </table>
                </tr>
                </td>
<!-- 头部END -->
<!-- js动态的向表格写入日期 -->
<script>
var Num; //Num计算出日期位置
for(i=0;i<6;i++) {
	document.write('<table id="cal-content"><tr>');
	for(j=0;j<7;j++) {
		Num = i*7+j;
		document.write('<td id="SD' + Num +'" onclick="addDay(' + Num +')" ');
		//周六 周日 假期样式设定
		if(j == 0|| j == 6){
			document.write(' class="aorange"');
			}else{
				document.write(' class="one"');
			}
			document.write('> </td>')
		}
		document.write('</tr></table></td></tr><tr><td><table class="fff"><tr style="text-align:center"> ');
         //农历
         for(j=0;j<7;j++) {
            Num = i*7+j;
            document.write('<td id="LD' + Num +'" onclick="addDay(' + Num +')" class="bs"></td>')
         }
         document.write('</tr></table></td></tr>');
}
</script>  
<!-- 生成日期 END    -->
      </tr>
   </table>
 </td>
                </tr>   
              </tbody>
            </table>
             <table>
               <tbody>
                <tr>
<td class="sm">
  <table class="table_head">
    <tbody>
    <tr>
      <td class="hhh"> 
      <!-- 选择年份菜单 -->
        <div class="year_select">
            <span onClick="BtN('year_d')"><img src="system/img/rl_left.png"></span>
              <select onChange="chaCld()" name="SY">
                <script>
 for(i=1900;i<2050;i++) 
document.write('<option>'+i+"年")
                </script>
              </select> 
            <span onClick="BtN('year_a')"><img src="system/img/rl_right.png"></span> 
        </div>
        <!-- 回到当天菜单 -->
        <div  class="home_select">
             <span onClick="BtN('')">今日</span>
        </div>

        <!-- 选择月份菜单 -->
            <div style="display:inline-block;">
                <span onClick="BtN('month_d')"><img src="system/img/rl_left.png"></span>
                 <select onChange="chaCld()" name="SM">
<script>
for(i=1;i<13;i++) document.write('<option>'+i+"月")
</script>
</select> 
                <span onClick="BtN('month_a')"><img src="system/img/rl_right.png"></span>
            </div>
         </td>
     </tr>
   </tbody>
  </table>
</td>
</tr> 
</tbody>
</table>
</div>
</form>
</fieldset>
<?php
_F("end");