Fetion.Web.Chat.defined("Fetion.Web.Chat.File");
Fetion.Web.Chat.File.create = function (o)
{
    // 提示类型0成功1失败2感叹提示3红心提示
    var state = ["succeed", "fail", "prompt", "redheart"];
    var info = document.createElement("SPAN");
    var html = "<table style='margin-left:-12px;color:#777777;font:12px Microsoft YaHei'>";
    if (!window.isChrome)
        html += "<tr><td><table style='table-layout:auto'><tr><td><img style='margin-right:4px' src='img/icon" + (o.state - -2) + ".png'/></td><td>" + o.title + " " + "</td><td>" + o.time + "</td></tr></table></td></tr>";
    html += "<tr><td><table style='table-layout:auto;'></table></td></tr>";
    html += "</table>";
    info.innerHTML = html;
    info = info.childNodes[0];
    var tab = info.rows[info.rows.length - 1].cells[0].childNodes[0];
    var row = tab.insertRow(tab.rows.length);
    if (o.icon)
    {
        var cell = row.insertCell(row.cells.length);
        cell.rowSpan = "2";
        cell.innerHTML = o.icon;
    }
    if (o.desc)
    {
        var cell = row.insertCell(row.cells.length);
        cell.innerHTML = o.desc;
    }
    if (o.extend)
    {
        var row = tab.insertRow(tab.rows.length);
        var cell = row.insertCell(row.cells.length);
        cell.innerHTML = o.extend;
    }
    if (o.parent)
        o.parent.appendChild(info);
    return info;
};