<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/Master/User.Master" CodeBehind="AddMessage.aspx.vb" Inherits="Dingtai.Website.AddMessage" 
    title="无标题页" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div id="body_left">
<div class="body_left_top"></div>
<asp:Label ID="lblid" runat="server" Visible="false"></asp:Label>

<div id="body_left_conter">
<div id="upload_title" style="color:#FFF;">站内短信(共20封)
  <div class="back"><a href="javascript:history.back(-1)">返回上页</a></div>
</div>
<div class="info" style="position:relative">
<div class="Reply_bt"><span>标题：</span><input name="" id="txtTitle" type="text" runat="server"></div>
<div class="Reply_sxr"><span>收信人：</span><input name="" id="txtReceiver" type="text" runat="server"></div>
<div class="Reply_zw"><span>正文：</span><textarea name="" id="txtContext" cols="300" rows="20" runat="server"></textarea></div>
<div class="Reply_an"><input name="" type="submit" value="发送"></div>
<div class="friends"><input type="button" value="" onClick="locking();" style="width:14px;height:14px;border:none;background:none;" runat="server" id="addFriend"></div>
</div>
</div>
<div class="body_left_bottom"></div>
</div>



<div id="pop_bg"></div>

<!--浮层框架开始-->
<div id="pop_body">
<div id="pop_box">
<div id="pop_title">
<a href="JavaScript:;" class="style1" onClick="Lock_CheckForm(this);">关闭</a><span>我的好友</span>
</div>
<div id="pop_content" style="padding-top:11px;margin-left:8px;">
<div class="Reply_left">
<ul>
    <asp:Repeater ID="Repeater1" runat="server">
        <ItemTemplate><li><input name="" type="checkbox" value='<%#Eval("FriendName") %>'><%#Eval("FriendName") %></li></ItemTemplate>
    </asp:Repeater>
</ul>
</div>
<div class="Reply_conter"><input name="" type="button" value="添&nbsp;加" onclick="Add_User();"><input name="" type="button" value="移&nbsp;除" onclick="Del_User();"></div>
<div class="Reply_right">
<div class="Reply_right_box">
<ul>
</ul>
</div>
<input name="" type="button" value="确&nbsp;定" onclick="Add();" style="margin-top:9px;">
</div>

</div>

</div>
</div>
</div>
<!--浮层框架结束-->
<script type="text/javascript" src="/js/jquery-1.6.js"></script>
<script language="javascript">
function locking(){
 document.all.pop_bg.style.display="block";
 document.all.pop_bg.style.width=document.body.clientWidth;
 document.all.pop_bg.style.height=document.body.clientHeight;
 document.all.pop_body.style.display='block';
}
function Lock_CheckForm(theForm){
 document.all.pop_bg.style.display='none';document.all.pop_body.style.display='none';
 return false;
}
function Add_User() {
    var lefts = $("#pop_content .Reply_left ul");
    var rights =  $("#pop_content .Reply_right ul");
    lefts.find("li").each(function (i){
        if($(this).find("input")[0].checked){
            rights.append($(this).clone());
            $(this).remove();
        }
    });
}

function Del_User() {
    var lefts = $("#pop_content .Reply_left ul");
    var rights =  $("#pop_content .Reply_right ul");
    rights.find("li").each(function (i){
        if($(this).find("input")[0].checked){
            lefts.append($(this).clone());
            $(this).remove();
        }
    });
}

function Add() {
    var rights =  $("#pop_content .Reply_right ul");
    var objs = "";
    rights.find("li").each(function (i){        
        objs = objs + $(this).find("input")[0].value + " , "
    });

    if (objs != "" ) { objs = objs.substr(0,objs.length - 3); }    
    var receiver = $(".Reply_sxr input")[0];
    receiver.value = objs;
    Lock_CheckForm(this);
}
</script>

</asp:Content>
