﻿function GetCountHttp() {
    var xhttp = null;
    if (window.XMLHttpRequest) {
        xhttp = new XMLHttpRequest();
    }
    else {
        if (window.ActiveXObject) {
            try {
                xhttp = new ActiveXObject("Msxml2.XMLHTTP");
            }
            catch (e) {
            }
            if (xhttp == null) {
                try {
                    xhttp = new ActiveXObject("Microsoft.XMLHTTP");
                }
                catch (e) {
                }
            }
        }
    }
    return xhttp;
}

function GetCount(ArtID, DivID) {
    var xhttp = GetCountHttp();

    xhttp.open("GET", "/xn/article/article_count.ashx?ID=" + ArtID.toString(), false);

    xhttp.send(null);

    var article_count = xhttp.responseText;
    xhttp.abort();
    xhttp = null;

    document.getElementById(DivID).innerHTML = article_count;
}