<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChatWin.aspx.cs" Inherits="SWTraining.OA.ChatWin" %>

<!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 runat="server">
    <title></title>
    <link id="linkStyle" runat="server" href="../Themes/Blue/css.css" rel="stylesheet"
        type="text/css" />

    <script type="text/javascript">

        var msgLength = 0;

        function PostBack() {
            __doPostBack('uplTime', parent.GetPostTextLength());
            setTimeout('PostBack() ', 1000);
        }
        setTimeout('PostBack() ', 1000);


        function ScrollBottom() {
            var height = document.body.scrollHeight;
            window.scrollBy(0, height);

        }

    </script>

</head>
<body onload="ScrollBottom()" style="background-color: #ffffff; color: #000000; padding:0px">
    <form id="form1" runat="server">
    <bgsound id="bgsound" src="" loop="1" />
    <asp:ScriptManager ID="ScriptManager1" runat="server" >
        <Scripts>
        </Scripts>
    </asp:ScriptManager>
    <div>
    </div>
    <asp:UpdatePanel ID="uplMsgs" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <asp:Label ID="labMsg" runat="server"></asp:Label>
        </ContentTemplate>
    </asp:UpdatePanel>
    <div style="visibility: hidden; display: none">
        <asp:UpdatePanel ID="uplTime" runat="server">
            <ContentTemplate>
                <asp:Timer runat="server" ID="timerClock" Interval="900" Enabled="false" OnTick="timerClock_Tick">
                </asp:Timer>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </form>

    <script type="text/javascript">
        function pageLoad() {
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(onEndRequest);
        }

        function onEndRequest(sender, e) {
            // 如果有异常发生。
            if (e.get_error()) {
                //alert(e.get_error().description);
                // 告诉PageRequestManager异常已经处理过，无需再使用默认的JavaScript对话框显示。
                e.set_errorHandled(true);

            }

        }
        pageLoad();
    </script>

</body>
</html>
