﻿var n_process = false;
var n_container_id = '';

function n_get5next(container_id, news_id) {
    if (!n_process) {
        n_container_id = container_id;
        ws_www.n_get5next(news_id, n_get5next_success, n_get5next_failed);
    }
}

function n_get5next_success(result) {
    if ((result == null) || (result == "")) return;
    n_process = true;
    try {
        var ia = new Array();
        ia = result.split(';;');
        ial = ia.length;

        var id = '';
        var newtop5 = '<ul>';
        for (i = 0; i < ial; i++) {
            var na = new Array();
            na = ia[i].split('||');
            id = na[1];
            newtop5 = newtop5.concat('<li><a title="').concat(na[6]).concat('" href="');
            if (na[2] == "l") {
                newtop5 = newtop5.concat(na[4]);
            }
            else {
                newtop5 = newtop5.concat('news_detail.aspx?id=').concat(id);
            }
            newtop5 = newtop5.concat('">').concat(na[5]).concat('</a> <span class="igray">(').concat(na[0].substr(6, 2)).concat('/');
            newtop5 = newtop5.concat(na[0].substr(4, 2)).concat('/').concat(na[0].substr(0, 4)).concat(')</span></li>');
        }
        newtop5 = newtop5.concat('</ul><div class="more"><a onclick="n_get5next(').concat("'").concat(n_container_id).concat("',").concat(id).concat(');">Xem tiếp >></a></div></div>');
        document.getElementById(n_container_id).innerHTML = newtop5;
    }
    catch (err) { }
    n_process = false;
}

function n_get5next_failed(result) {
}
