<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="to.aspx.cs" Inherits="JuSNS.Web.home.mail.to" %>
<%@ Import Namespace="System.Collections" %>
<%@ Import Namespace="System.Collections.Generic" %>
<!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 id="ptitle" runat="server">撰写信件</title>
<link href="../../template/<% Response.Write(JuSNS.Config.UiConfig.SkinStyle); %>/css/base.css" id="skinpath" type="text/css" rel="stylesheet" />
<script language="javascript" type="text/javascript" src="../../js/ajax.js"></script>
<script language="javascript" type="text/javascript" src="../../js/public.js"></script>
<script type="text/javascript" src="../../js/build/yahoo/yahoo-min.js"></script>
<script type="text/javascript" src="../../js/build/dom/dom-min.js"></script>
<script type="text/javascript" src="../../js/build/event/event-min.js"></script>
<script type="text/javascript" src="../../js/build/autocomplete/autocomplete-min.js"></script>
</head>

<body  id="yahoo-com" class="yui-skin-sam">
 <!--头部-->
<%=this.GetHtmlShort()%> 
<div id="divhead">
    <%=this.GetHtmlHead()%>
</div>

<div id="divbody">
    <div id="body_first">
        <div class="body_menu"> 
        <%=this.GetHtmlLeft()%>
        </div>
    </div>
    <div id="body_sec">
            <div id="body_mid"> 
                <div class="body_frame"> 
                     <div class="body_frame_otherinfo">
	                        <div class="title">
                                <div class="l"><img src="../../template/<%Response.Write(JuSNS.Config.UiConfig.SkinStyle); %>/images/site/notice.gif" align="absmiddle" /> <span class="shenlan bold font14 ocolor">写私信</span></div>
                                <div class="r"><a href="javascript:window.history.back();" title="返回上一页">返回上一页</a></div>
                                <div class="c"></div>
                            </div>
            		       
                            <div class="nav-menu">
                                <ul>
                                 <li><a href="../mail">收件箱</a></li>
                                 <li><a href="../mail/out.aspx">发件箱</a></li>
                                 <li><a href="../mail/notice.aspx">通知</a></li>
                                 <li class="current"><a href="../mail/to.aspx">写私信</a></li>
                                 </ul>
                            </div>        
                     </div>
                     <form id="form1" runat="server">
                     <div class="body_sec_all">
                        <div class="msg-succ" id="div_Suc" runat="server" style="display: none;"></div>
                        <div class="msg-error" id="div_Error" runat="server" style="display: none;"></div>        
                           <div class="content">
                                <label class="f-label">接收人</label>
                                <span id="span_Receiver" runat="server"></span>
                                  <div id="statesautocomplete" runat="server">
                                        <input id="Txt_Receiver" type="text" class="f-text" style="width:150px;" runat="server" />
                                        <asp:HiddenField ID="Hid_UserID" runat="server" /> 
                                        <div id="statescontainer"></div>
                                   </div>
                                   <span style="padding-left:75px;">输入姓名，系统自动查找。支持模糊查找。或者直接按"BackSpace（退格键）"选择好友。</span>
                           </div> 
                           <div class="content">
                                <label class="f-label">标题</label>
                                <input id="Txt_Title" type="text" class="f-text s50" runat="server" maxlength="100" />
                           </div>
                           <div class="content">
                                <label class="f-label">内容</label>
                                 <asp:TextBox ID="Txt_Content" runat="server" CssClass="f-text s50" Height="100" MaxLength="500" TextMode="MultiLine"></asp:TextBox>
                           </div>
                           
                           <div class="content">
                                <label class="f-label">&nbsp;</label>
                                <a href="javascript:void(0);"  id="face" onclick="showface(this.id,'Txt_Content',0);"><img src="../../template/images/face/c.gif" title="选择表情"  align="absmiddle" /></a>
                               <asp:Button ID="Button1" class="f-button" runat="server" Text="发送信件" OnClick="Button1_Click" />
                               <input type="reset" class="f-reset" value="重填" />
                           </div>
                           <span class="spline"></span>
                     </div>
                     </form>
                     </div>
                     <div class="divbottom">
                      <%=this.GetHtmlFoot()%>
                  </div>                        
         </div>
     </div>
</div>
</body>
</html>
<script type="text/javascript">
<%
    JuSNS.Home.Friend friend = new JuSNS.Home.Friend();
    Dictionary<int, string> dct = friend.GetFriends(UserID,"");
    string s_List = "";
    foreach (KeyValuePair<int, string> kvp in dct)
    {
        s_List += "\"" + kvp.Value + "<span style='display:none;'>" + kvp.Key.ToString() + "</span>\",";
    }
    s_List = s_List.TrimEnd(',');
%>
YAHOO.example.statesArray = [<% Response.Write(s_List); %>];

YAHOO.example.ACJSArray = new function() {
    this.oACDS = new YAHOO.widget.DS_JSArray(YAHOO.example.statesArray);

    this.oAutoComp = new YAHOO.widget.AutoComplete('Txt_Receiver','statescontainer', this.oACDS);
    this.oAutoComp.typeAhead = true;
    this.oAutoComp.useShadow = true;
    this.oAutoComp.minQueryLength = 0;
};
</script>