<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Face.aspx.cs" Inherits="MTCUN.frame.Face" %>

<!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" />
    <style type="text/css">
        .mouseover
        {
            border-width: 0px 1px 0px 0px !important;
        }
        .userface
        {
            background-color: White;
            width: 20px;
            height: 20px;
        }
        .divfaceCursor
        {
            cursor: pointer;
            cursor: hand;
        }
        .divfaceCursor a
        {
            cursor: pointer;
            cursor: hand;
        }
    </style>
    <script type="text/javascript">

        //来电回调代码::::::::::::
        var faceShow = false;


        function FaceShow() {
            var face = document.getElementById("divFace");
            face.className = "divfaceCursor";

            if (face.style.display == "none") {
                face.style.display = "block";
            }
            else {
                face.style.display = "none";
            }

            if (faceShow) {
                setTimeout('FaceShow()', 500);
            }
            else {
                face.style.display = "block";
                face.className = "";
                NotMsg();
            }
        }
    </script>
</head>
<body style="margin: 0px; padding: 0px">
    <form id="form1" runat="server">
    <bgsound id="bgsound" src="" loop="1" />
    <audio id="html5_bgsound" src="" autoplay="true" playcount="1"></audio>
    <asp:ScriptManager ID="ScriptManager1" runat="server" AllowCustomErrorsRedirect="False">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="uplFace" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <a style="width: 20px; height: 20px; line-height: 20px;" runat="server" id="hlkFace">
                <div style="width: 20px; height: 20px; line-height: 20px;">
                    <div onclick="stopFace();" style="width: 20px; height: 20px; line-height: 20px;"
                        id="divFace" runat="server">
                    </div>
                </div>
            </a>
        </ContentTemplate>
    </asp:UpdatePanel>
<%--    <asp:UpdatePanel ID="uplTimer" runat="server">
        <ContentTemplate>
            <asp:Timer ID="Timer1" runat="server" Interval="10000" OnTick="userTimer_Tick">
            </asp:Timer>
            <asp:HiddenField ID="hfdNotMsgCount" runat="server" Value="0" />
        </ContentTemplate>
    </asp:UpdatePanel>--%>
    </form>
    <script type="text/javascript">



        function startTimer() {
            var timer = $find(timerid);
            timer._startTimer();
        }

        function stopTimer() {
            if (msgmode == 0) {
                try {
                    var timer = $find(timerid);
                    timer._stopTimer();
                    timer.set_interval(2000);
                    timer._startTimer();
                    timer.set_interval(waitInterval);
                } catch (ex) { }
            }
        }

        function stopFace() {
            if (msgmode == 0) {
                faceShow = false;
            }
        }

        function NotMsg() {
            divFace.style.background = "url('../images/userface/" + userFace + "')";
            hlkFace.href = "#";
            hlkFace.title = "";
            hlkFace.name = "";
        }

        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>
