<%@ control language="VB" inherits="hcw.newly, App_Web_y-huk89q" %>
<form id="form1" runat="server">
<br />
<table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
        <td align="right" width="9%" style="height: 24px">
            <strong>发给:</strong></td>
      <td width="91%" style="height: 24px">
            <asp:TextBox ID="userlist" runat="server" Columns="52" MaxLength="100"></asp:TextBox>
            <img src="images/clifriend.jpg" width="92" height="16" align="absmiddle" onclick=popwind(); style="CURSOR: pointer! important"/></td>
    </tr>
    <tr>
        <td align="right" width="9%" style="height: 19px">
            <strong></strong>
        </td>
        <td width="91%" style="height: 19px">
          请输入用户昵称或是选择好友,多个好友请用分号“;”分隔。</td>
    </tr>
  <tr>
    <td width="9%" align="right"><strong>标题:</strong></td>
    <td width="91%">
      <asp:TextBox ID="title" runat="server" Columns="52" MaxLength="100"></asp:TextBox>
    请不要超过50个汉字!<asp:RequiredFieldValidator id="check1" runat="server" ErrorMessage="请输入标题!" Display="Dynamic" ControlToValidate="title">
</asp:RequiredFieldValidator></td>
  </tr>
  <tr>
    <td align="right" valign="top"><strong>内容:</strong></td>
    <td><asp:TextBox id="content" runat="server" TextMode="MultiLine" Columns="52" Rows="8">
</asp:TextBox><br/>严禁发送任何广告内容/传销内容和骚扰信息！</td>
  </tr>
  <tr>
    <td align="right">&nbsp;</td>
    <td><asp:ImageButton id="ImageButton1" runat="server" ImageUrl="~/user/blog/images/send.jpg"></asp:ImageButton>&nbsp;&nbsp;<a href="messlist.aspx?kind=out"><img height="15" alt="取消" src="images/cancel.jpg" width="45" border="0" /></a></td>
  </tr>
</table>
</form>
<SCRIPT language=JavaScript type=text/JavaScript>
	String.prototype.inStr=function(s1,s2){s2=s2||";";return (s2+this+s2).indexOf(s2+s1+s2)!=-1?true:false}
	function popwind(id)
	{
	var returnvalue= window.open("friendlist.aspx","friendlist","height=200,width=400,top=0,left=550,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no");
	}
		function setnickname(returnvalue)
	{
		nicknamestr = document.getElementById('<%=userlist.ClientId%>').value;
		insert_nickname = '';
		if(returnvalue!= ''){
			nickname_arr = returnvalue.split(";");
			for(i=0;i<nickname_arr.length;i++){
				if( nicknamestr.length  == 0 )
				{
					insert_nickname = insert_nickname + nickname_arr[i]+";";
				}else{
					if(nicknamestr.inStr(nickname_arr[i]) == false)
						insert_nickname = insert_nickname + nickname_arr[i]+";";
					
				}
				
			}
			
		}
		insert_nickname = insert_nickname.substring(0,insert_nickname.length-1); 
		if(nicknamestr && insert_nickname && nicknamestr.substr(nicknamestr.length-1,nicknamestr.length) != ";")nicknamestr =nicknamestr + ";";
		document.getElementById('<%=userlist.ClientId%>').value =  nicknamestr + insert_nickname;
	}
	
	</script>