<!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=UTF-8" />
    <link href="../Content/Default/jquery-ui-1.8.10.custom.css" rel="stylesheet" type="text/css" />
    <link href="../Content/style.css" rel="stylesheet" type="text/css" />
    <script src="../Scripts/lib/jquery-1.4.4.min.js" type="text/javascript"></script>
    <script src="../Scripts/lib/jquery-ui-1.8.10.custom.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            window.onresize = function () {
                //调整弹出窗口遮罩层的高度
                $('.menu_dlg_shield').css("height", window.parent.document.documentElement.clientHeight);
                $('.menu_dlg_bg').css("height", window.parent.document.documentElement.clientHeight); //调整弹出所属窗口层的高度
            }
        });
        //打开跳转页面
        function openSubPage(pageId) {
            switch (pageId) {
                case 'p02':
                    //跳转到报表中心
                    showP02();
                    break;
                case 'p03':
                    //打开计算器
                    openTools(pageId);
                    break;
                case 'p04':
                    //打万年历
                    openTools(pageId);
                    break;
                case 'p05':
                    //打开快递查询
                    openTools(pageId);
                    break;
            }
        }
        //跳转到报表中心
        function showP02() {
            //改变标签的Name
            $(window.parent.document).find("#span_p01").text("报表中心");

            //改变标签Iframe的Src；
            $(window.parent.document).find("#idIframe-p01").css("display", "none");
            $(window.parent.document).find("#idIframe-p02").css("display", "block");
            $(window.parent.document).find("#idIframe-p02").attr("src", "p02.htm");
        }
        //打开工具窗口
        function openTools(dlgId) {
            var strTitle = "";
            switch (dlgId) {
                case 'p03':
                    //计算器
                    strTitle = "计算器";
                    iWidth = "412";
                    iHeight = "200";
                    creatDiv_ShowDialog('div' + dlgId, strTitle, false, false, '', parseInt(iWidth) + 2, true);

                    //添加内容
                    createCalc('div' + dlgId, strTitle, iHeight, iWidth);

                    FKeyPad = document.forms['Keypad'];
                    Accum = "0";
                    FlagNewNum = false;
                    PendingOp = "";
                    //计算input元素获得焦点
                    //FKeyPad.ReadOut.focus();
                    //计算input元素选中
                    FKeyPad.ReadOut.select();
                    break;
                case 'p04':
                    //万年历
                    strTitle = "万年历";
                    iWidth = "650";
                    iHeight = "350";
                    creatDiv_ShowDialog('div' + dlgId, strTitle, false, false, iHeight, parseInt(iWidth) + 2, true);
                    $('#div' + dlgId + "_divform").height(iHeight);
                    //添加内容
                    createWnl('div' + dlgId, strTitle, iHeight, iWidth);

                    break;
                case 'p05':
                    //快递查询
                    strTitle = "快递查询";
                    var iWidth = "650";
                    var iHeight = "500";
                    creatDiv_ShowDialog('div' + dlgId, strTitle, false, false, iHeight, parseInt(iWidth) + 2, true);
                    $('#div' + dlgId + "_content").css("margin-top", "-90px");
                    $('#div' + dlgId + "_divform").height(iHeight);
                    //添加内容
                    createKd('div' + dlgId, strTitle, iHeight, iWidth);

                    //隐藏查询结果层
                    $('#divResutl').hide();

                    break;
            }

            //dialog 默认加载时，屏蔽Backspace关闭对话框事件。
            $('#div' + dlgId).focus().keydown(function (event) {
                //event.stopPropagation();
                return false;
            }).keyup(function (event) {
                //event.stopPropagation();
                return false;
            }).keypress(function (event) {
                //event.stopPropagation();
                return false;
            });
        }
        //关闭窗口
        function closeMyDlg(strDialog, strType, strTable) {
            cihoDlgClose(strDialog);
        }
    </script>
</head>
<body>
    <div class="report">
        <div class="report_a">
            <div class="icon_bj">
                <div class="icon_box">
                    <div class="icon_btn1">
                        <a href="#" onclick="openSubPage('p02')"></a>
                    </div>
                    <div class="icon_btn2">
                        <a href="#" onclick="openSubPage('p03')"></a>
                    </div>
                    <div class="icon_btn3">
                        <a href="#" onclick="openSubPage('p04')"></a>
                    </div>
                    <div class="icon_btn4">
                        <a href="#" onclick="openSubPage('p05')"></a>
                    </div>
                </div>
                <div class="clr">
                </div>
            </div>
        </div>
    </div>
    <!--计算器-->
    <div id='divp03'>
    </div>
    <!--万年历-->
    <div id='divp04'>
    </div>
    <!--快递查询-->
    <div id='divp05'>
    </div>
</body>
</html>
<script src="../Scripts/common.js" type="text/javascript"></script>
<script src="../Scripts/p01.js" type="text/javascript"></script>
