<%@ Page Language="C#" AutoEventWireup="true" CodeFile="top.aspx.cs" Inherits="top" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head >
    <title>华航后勤管理系统</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
    <link rel="stylesheet" type="text/css" href="./styles/1/style.css"/>

    <script type="text/javascript" language="javascript">
function re_login()
{
   parent.location="relogin.aspx";
}
window.setTimeout('this.location.reload();',1200000);
    </script>

    <script language="JavaScript" type="text/javascript">
function menu_click(menu_id)
{
	parent.leftmenu.menu_main.location="/general/ipanel/menu.php?MENU_ID="+menu_id;
	parent.leftmenu.view_menu(1);
	parent.callleftmenu.leftmenu_open();
}

var OA_TIME = new Date(2008,6,16,10,31,21);
function timeview()
{
  timestr=OA_TIME.toLocaleString();
  timestr=timestr.substr(timestr.indexOf(":")-2);
  document.getElementById("time_area").innerHTML = timestr;
  OA_TIME.setSeconds(OA_TIME.getSeconds()+1);
  window.setTimeout( "timeview()", 1000 );
}

//document.onreadystatechange= function()
//{
//   if(document.readyState=="complete")
//   parent.frame1.rows=(document.body.scrollHeight+1)+",*,20";
//};
    </script>

    <script language="JavaScript">
var bsYear;
var bsDate;
var bsWeek;
var arrLen=8;	//数组长度
var sValue=0;	//当年的秒数
var dayiy=0;	//当年第几天
var miy=0;	//月份的下标
var iyear=0;	//年份标记
var dayim=0;	//当月第几天
var spd=86400;	//每天的秒数
var year1999="30;29;29;30;29;29;30;29;30;30;30;29";	//354
var year2000="30;30;29;29;30;29;29;30;29;30;30;29";	//354
var year2001="30;30;29;30;29;30;29;29;30;29;30;29;30";	//384
var year2002="30;30;29;30;29;30;29;29;30;29;30;29";	//354
var year2003="30;30;29;30;30;29;30;29;29;30;29;30";	//355
var year2004="29;30;29;30;30;29;30;29;30;29;30;29;30";	//384
var year2005="29;30;29;30;29;30;30;29;30;29;30;29";	//354
var year2006="30;29;30;29;30;30;29;29;30;30;29;29;30";
var month1999="正月;二月;三月;四月;五月;六月;七月;八月;九月;十月;十一月;十二月"
var month2001="正月;二月;三月;四月;闰四月;五月;六月;七月;八月;九月;十月;十一月;十二月"
var month2004="正月;二月;闰二月;三月;四月;五月;六月;七月;八月;九月;十月;十一月;十二月"
var month2006="正月;二月;三月;四月;五月;六月;七月;闰七月;八月;九月;十月;十一月;十二月"
var Dn="初一;初二;初三;初四;初五;初六;初七;初八;初九;初十;十一;十二;十三;十四;十五;十六;十七;十八;十九;二十;廿一;廿二;廿三;廿四;廿五;廿六;廿七;廿八;廿九;三十";
var Ys=new Array(arrLen);
Ys[0]=919094400;Ys[1]=949680000;Ys[2]=980265600;
Ys[3]=1013443200;Ys[4]=1044028800;Ys[5]=1074700800;
Ys[6]=1107878400;Ys[7]=1138464000;
var Yn=new Array(arrLen);   //农历年的名称
Yn[0]="己卯年";Yn[1]="庚辰年";Yn[2]="辛巳年";
Yn[3]="壬午年";Yn[4]="癸未年";Yn[5]="甲申年";
Yn[6]="乙酉年";Yn[7]="丙戌年";
var D=new Date();
var yy=D.getYear();
var mm=D.getMonth()+1;
var dd=D.getDate();
var ww=D.getDay();
if (ww==0) ww="<font color=RED>星期日</font>";
if (ww==1) ww="星期一";
if (ww==2) ww="星期二";
if (ww==3) ww="星期三";
if (ww==4) ww="星期四";
if (ww==5) ww="星期五";
if (ww==6) ww="<font color=green>星期六</font>";
ww=ww;
var ss=parseInt(D.getTime() / 1000);
if (yy<100) yy="19"+yy;
for (i=0;i<arrLen;i++)
if (ss>=Ys[i]){
iyear=i;
sValue=ss-Ys[i];    //当年的秒数
}
dayiy=parseInt(sValue/spd)+1;    //当年的天数
var dpm=year1999;
if (iyear==1) dpm=year2000;
if (iyear==2) dpm=year2001;
if (iyear==3) dpm=year2002;
if (iyear==4) dpm=year2003;
if (iyear==5) dpm=year2004;
if (iyear==6) dpm=year2005;
if (iyear==7) dpm=year2006;
dpm=dpm.split(";");
var Mn=month1999;
if (iyear==2) Mn=month2001;
if (iyear==5) Mn=month2004;
if (iyear==7) Mn=month2006;
Mn=Mn.split(";");
var Dn="初一;初二;初三;初四;初五;初六;初七;初八;初九;初十;十一;十二;十三;十四;十五;十六;十七;十八;十九;二十;廿一;廿二;廿三;廿四;廿五;廿六;廿七;廿八;廿九;三十";
Dn=Dn.split(";");
dayim=dayiy;
var total=new Array(13);
total[0]=parseInt(dpm[0]);
for (i=1;i<dpm.length-1;i++) total[i]=parseInt(dpm[i])+total[i-1];
for (i=dpm.length-1;i>0;i--)
if (dayim>total[i-1]){
dayim=dayim-total[i-1];
miy=i;
}
bsWeek=ww;
bsDate=yy+"年"+mm+"月";
bsDate2=dd;
bsYear="农历"+Yn[iyear];
bsYear2=Mn[miy]+Dn[dayim-1];
if (ss>=Ys[7]||ss<Ys[0]) bsYear=Yn[7];
function time(){
document.write(bsDate+bsDate2+"&nbsp;&nbsp;");
document.write(bsWeek+"&nbsp;&nbsp;");
document.write(bsYear+bsYear2);
}
    </script>

</head>
<body class="bodycolor" topmargin="0" leftmargin="0" style="margin: 0pt; padding: 0pt"
    onload="timeview();">
   <form runat="server" id="from1">
    <table class="small topbar" width="100%" border="0" cellspacing="0" cellpadding="0" style="height:67px;">
        <tr>
            <td nowrap >
                <span style="font-family: 宋体; color: #404080; width: 100%; font-weight: bold; font-size: 18pt; line-height:40px;">
                    &nbsp;<span style="color: #000000">华航后勤管理系统</span> V1.0 </span>
            </td>
            <td align="right" style="height: 42px">
                <table width="340" height="100%" class="small" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td align="right" valign="top">
                            <span style="padding-top: 2px; color: #000000; width: 100%; font-size: 9pt;">
                                <script>time()</script>
                                <img src="./images/time.gif" align="absmiddle">
                                <span id="time_area"></span>&nbsp; </span>
                        </td>
                    </tr>
                    <tr>
                        <td valign="bottom" align="right">
                             <a href="/general/table_index.php" target="main">
                                 <img src="./images/menu/mytable.gif" align="absmiddle" width="16" height="16" border="0" alt="我的办公桌">&nbsp;桌面
                             </a>&nbsp;&nbsp;&nbsp; 
                             <a href="/general/person_info" target="main">
                                  <img src="./images/menu/person_info.gif" align="absmiddle" width="16" height="16"  border="0" alt="控制面板">&nbsp;控制面板
                             </a>&nbsp;&nbsp;&nbsp; 
                             <a href="#" onclick="re_login();">
                                 <img src="./images/menu/login.gif" border="0" align="absmiddle" width="16" height="16" alt="注销">&nbsp;注销
                             </a>&nbsp;&nbsp; 
                             <a href="/general/exit.aspx" target="_parent">
                                 <img src="./images/menu/exit.gif" align="absmiddle" width="16" height="16" border="0" alt="退出系统">&nbsp;退出
                              </a>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
       <tr class="topbar2">
            <td colspan="2" style="margin:0px;padding:0px;"><asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" DataSourceID="SiteMapDataSource1" Height="100%" MaximumDynamicDisplayLevels="0" StaticDisplayLevels="2" Target="leftree" style="display: block" DisappearAfter="100">
                    <DataBindings>
                        <asp:MenuItemBinding DataMember="SiteMapNode" ImageUrl="~/images/time.gif" ImageUrlField="Description"
                            NavigateUrlField="resourceKey" TextField="title" Target="leftree" />
                    </DataBindings>
                </asp:Menu>
            </td>
       </tr> 
    </table>
       <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
</form> 
</body>
</html>
