//for client
function setMsg(html, mtype, tips, btns)
{
    var outputHtml = "";
    
    if (html) 
    {
        var classDict = ["none", "right", "wrong", "tips", "warn", "help"];
        if (typeof(mtype) != "integer" || mtype < 0 || mtype > classDict.length - 1) 
            mtype = 0;
        outputHtml += "<div class='msg " + classDict[mtype] + "'>" + html + "</div>";
    }
    if (tips) 
        outputHtml += "<div class='tips'>" + tips + "</div>";
    if (btns) 
        outputHtml += "<div class='btns'>" + btns + "</div>";
    
    setContent(outputHtml);
}

//for network
function setContent(html)
{
    self.select("#content").html = html;
}

self.ready = function()
{
    view.onLoadhtmlComplete();
};