<%@ page language="C#" autoeventwireup="true" inherits="WebAdmin_WriteMessage, LebiMall" validaterequest="false" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<!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 id="Head1" runat="server">
    <title>新信息</title>
    <link href="css/css.css" rel="stylesheet" type="text/css" />
    <link href="css/tipswindown.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" language="javascript" src="js/topHead.js"></script>
    <script type="text/javascript" src="js/checked.js"></script>
    <script src="js/jquery.js" type="text/javascript"></script>
    <script src="js/tipswindown.js" type="text/javascript"></script>

    <script type="text/javascript">
    function checkCon(){
       var content=FCKeditorAPI.GetInstance("fck").GetXHTML();
       if(content==""){
            document.getElementById("sp_fck").innerHTML="<span class='msg_submit'>至少内容不能为空！</span>";
            return false;
       }else{
            document.getElementById("sp_fck").innerHTML="";
            return true;
       }
    }
    //展开与合并
    function resizeEditor(name,size) {   
	    var newheight = parseInt(document.getElementById(name +"___Frame").style.height, 10) + size;   
	        if(newheight >= 150) {   
		        document.getElementById(name +"___Frame").style.height = newheight + 'px';   
	        }   
	    }
    function openLink()
    {
        window.location.href="UserList.aspx?select=1";
    }
    </script>
</head>
<body>
    <form id="form1" runat="server" onsubmit="return checkCon();">
        <script>header(5,3,"images/");</script>
        <div class="blank clearfix">
        </div>
        <script type="text/javascript">
            var $=jQuery;
            var f="<%=returnValue %>";
            var i=2;
            if(f=="true"){
                tipsWindown('操作结果','text:操作成功！','250','60','true','2000','true','text');
                setInterval("fun()", 1000);
            }
            if(f=="false"){
                tipsWindown('操作结果','text:操作失败！','250','60','true','2000','true','text');
            }
            function fun() {
                if (i == 1) {
                window.location.href="SendMessage.aspx";
                }
                i--;
            }
        </script>
        <div class="tabmenus mainwidth">
            <ul>
                <li><a href="AdminMessage_List.aspx"><span>所有信息</span></a></li>
                <li class="current"><a href="WriteMessage.aspx"><span>写信息</span></a></li>
                <li><a href="ReceiveMessage.aspx"><span>收信箱</span></a></li>
                <li><a href="SendMessage.aspx"><span>发信箱</span></a></li>
                <li><a href="RubbishMessage.aspx"><span>垃圾箱</span></a></li>
            </ul>
        </div>
        <div class="tab-mainbody">
            <div class="tab-mainbody2">
                <div class="functionHandleArea clearfix">
                    <input type="image" title=" 返回 " onclick="history.back();return false;" src="images/bt_bak.gif"
                                align="absmiddle" />
                </div>
                <div id="datalist">
                <table cellspacing="0" width="100%" cellpadding="0" id="list">
                    <tr>
                        <th class="row" colspan="2">写信</th>
                    </tr>
                    <tr>
                        <td class="row">
                            收信人帐号</td>
                        <td class="row">
                            <input type="text" runat="server" id="txtUserId" name="txtUserId" disabled class="input" />
                            <input id="btnSelect" class="btn-choose" type="button" onclick="javascript:openLink()" />
                        </td>
                    </tr>
                    <tr>
                        <td class="row">
                            消息标题</td>
                        <td class="row">
                            <input type="text" runat="server" id="txtTitle" name="txtTitle" class="input" size="60" />
                        </td>
                    </tr>
                    <tr>
                        <td class="row">
                            内容</td>
                        <td class="row">
                            <FCKeditorV2:FCKeditor ID="fck" runat="server" ToolbarSet="Default" BasePath="js/fckeditor/" Height="250" Width="600">
                            </FCKeditorV2:FCKeditor>
                            <a href="javascript:resizeEditor('fck',-100)">
                            <img src="images/bt_close.gif" border='0'/></a>&nbsp;
                            <a href="javascript:resizeEditor('fck',150)">
                            <img src="images/bt_open.gif" border='0'/></a><br />
                            <span id="sp_fck"></span>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" class="list-foot" style="height: 27px">
                            <input id="btnSubmit" type="button" class="btn-app" runat="server" onserverclick="btnSubmit_ServerClick"/>
                        </td>
                    </tr>
                </table>
                <script type="text/javascript">tdshowm("list");</script>
            </div>
        </div>
        </div>
    </form>
</body>
</html>
