function SessionAdd() {
    var c = document.frames[Editor].document.body.innerHTML;
    if (c.length == 0) {
        alert("发送消息不能够为空");
    }
    else {
        document.frames[Editor].document.body.innerHTML = "";
        D.BLL.B_KF_Message.SessionAdd(c, MessageBack);
    }
}

function SessionRobotAdd() {
    var c = document.getElementById("txtContent").value;
    if (c.length == 0) {
        alert("发送消息不能够为空");
    }
    else {
        document.getElementById("txtContent").value="";
        D.BLL.B_KF_Message.SessionRobotAdd(c, MessageBack);
    }
}

function MessageBack(res) {
}

function ShowMessage() {
    D.BLL.B_KF_Message.ShowMessage(ShowMessageBack);
    setTimeout(ShowMessage, 500);
}

function ShowMessageBack(res) {
    if (res.value.length > 0) {
        document.getElementById("MessageList").innerHTML = document.getElementById("MessageList").innerHTML + res.value;
        document.getElementById("MessageList").scrollTop = document.getElementById("MessageList").scrollHeight;
    }
}

function KeyPress() {
    if (event.ctrlKey && window.event.keyCode == 13) {
    }
}