<%@ page language="C#" autoeventwireup="true" inherits="user_mail_mini_send, ZKCMS" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<!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>

    <script type="text/javascript" src="/s/skin/base.js"></script>

    <script type="text/javascript" src="/skin/public/public.js"></script>

    <script type="text/javascript" src="/s/skin/base64.js"></script>

    <script type="text/javascript" src="/s/skin/input.js"></script>

    <script type="text/javascript" src="/s/skin/tinybox.js"></script>

    <asp:Literal ID="CSS" runat="server"></asp:Literal>
    <style type="text/css">
        body
        {
            background-color: #fff;
            background-image: none;
        }
    </style>

    <script type="text/javascript">
    //<<firefox下使用insertAdjacentHTML,insertAdjacentText
    if(typeof HTMLElement!="undefined" && !HTMLElement.prototype.insertAdjacentElement)
{
     HTMLElement.prototype.insertAdjacentElement = function(where,parsedNode)
     {
        switch (where)
        {
            case 'beforeBegin':
                this.parentNode.insertBefore(parsedNode,this)
                break;
            case 'afterBegin':
                this.insertBefore(parsedNode,this.firstChild);
                break;
            case 'beforeEnd':
                this.appendChild(parsedNode);
                break;
            case 'afterEnd':
                if (this.nextSibling) this.parentNode.insertBefore(parsedNode,this.nextSibling);
                    else this.parentNode.appendChild(parsedNode);
                break;
         }
     }

     HTMLElement.prototype.insertAdjacentHTML = function (where,htmlStr)
     {
         var r = this.ownerDocument.createRange();
         r.setStartBefore(this);
         var parsedHTML = r.createContextualFragment(htmlStr);
         this.insertAdjacentElement(where,parsedHTML)
     }

     HTMLElement.prototype.insertAdjacentText = function (where,txtStr)
     {
         var parsedText = document.createTextNode(txtStr)
         this.insertAdjacentElement(where,parsedText)
     }
}
//>>firefox下使用insertAdjacentHTML,insertAdjacentText

    function check1(){
    
    var touids=document.getElementById("touids").value; var title=document.getElementById("title").value;var content=document.getElementById("content").value;
    if(touids==""||touids=="请输入接收会员用户名　多个请用，号隔开！"){alert("请输入接收会员用户名！");return false;}    
    if(title==""||title=="请输入短消息标题！"){alert("请输入短消息标题！");return false;}    
    if(content==""||content=="请输入短消息内容！") {  if(title.length<2){alert("短消息标题太短！");return false;}  }
    if(content==""||content=="请输入短消息内容！"){document.getElementById("content").value=title;}
    wait();
    document.getElementById("Button1").style.display="none";document.getElementById("Button1_").style.display="";
    }
     function ok(){
       var objLayer ="<div class=\"abs s14\" style=\"margin-left:146px;margin-top:120px;color:#ff6600\">短消息发送成功！</div>";
    document.getElementById("form_mail").insertAdjacentHTML("afterBegin",objLayer); 
     }
    function wait(){
    var objLayer ="<div class=\"abs\" style=\"margin-left:181px;margin-top:100px\"><img src=\"/s/skin/loading.gif\"></div>";
    document.getElementById("form_mail").insertAdjacentHTML("afterBegin",objLayer); 
    } 
    </script>

</head>
<body>
    <form id="form_mail" runat="server" autocomplete="off">
    <asp:Label ID="Label1" runat="server"></asp:Label>
    <asp:HiddenField ID="HiddenField1" runat="server" />
    <div style="padding-left: 1px">
        <div><asp:TextBox ID="touids" runat="server" CssClass="inp4" Width="390" MaxLength="500"
                Text="请输入接收会员用户名　多个请用，号隔开！" onfocus="if(this.value=='请输入接收会员用户名　多个请用，号隔开！')this.value=''"
                onblur="if(this.value=='')this.value='请输入接收会员用户名　多个请用，号隔开！'"></asp:TextBox><asp:TextBox ID="touids_" runat="server" CssClass="inp4" Width="390" Visible="false" Enabled="false"></asp:TextBox></div>
        <div style="padding-top: 7px"><asp:TextBox ID="title" runat="server" CssClass="inp4" Width="390" MaxLength="50"
                Text="请输入短消息标题！" onfocus="if(this.value=='请输入短消息标题！')this.value=''" onblur="if(this.value=='')this.value='请输入短消息标题！'"></asp:TextBox></div>
        <div style="padding-top: 7px"><asp:TextBox ID="content" runat="server" TextMode="MultiLine" CssClass="inp4" Width="390" Height="140"
                Text="请输入短消息内容！" onfocus="if(this.value=='请输入短消息内容！')this.value=''" onblur="if(this.value=='')this.value='请输入短消息内容！'" style="line-height:20px"></asp:TextBox></div>
    </div>
    <div style="padding-left: 1px; padding-top: 7px">
        <asp:Button ID="Button1" runat="server" Text="发送消息" CssClass="but4" OnClientClick="return check1()"
            OnClick="Button1_Click" onmouseover="hover(this,0)" onmouseout="hover(this,1)" /><input type="button" value="发送中" id="Button1_" class="but4" style="display:none" />&nbsp;
            <input type="button" value="取消发送" class="but4" onclick="wait();top.location=document.getElementById('HiddenField1').value" onmouseover="hover(this,0)" onmouseout="hover(this,1)" /><asp:Label ID="msg" runat="server" CssClass="red"></asp:Label>
    </div>
    </form>
</body>
</html>
