    var hotArticlesPerPage = 20;
    var currentPage = 1;
    var hotArticlesDisabled = false;
    var loadHotArticlesInterval = null;
    var loadHotArticlesStatus = "";
    integrio.js.include("integrio.majax");
    function gotoArchiveDate(date, category) {
        document.location = "/search.jsp?ar=yes&archivedate=" + date + (category != null ? "&categoryId=" + category : "");
    }
    function pervHotArticlePage() {
        if (hotArticlesDisabled) {
            return;
        }
        if (currentPage == 1) {
            return;
        }
        currentPage--;
        getHotArticles();
    }
    function nextHotArticlePage() {
        if (hotArticlesDisabled) {
            return;
        }
        if (currentPage == allHotArticlesPages) {
            return;
        }
        currentPage++;
        getHotArticles();
    }
    function getHotArticlesComplete() {
        window.clearInterval(loadHotArticlesInterval);
        var cont = document.getElementById("hotArticles").getElementsByTagName("DIV")[0];
        cont.innerHTML = this.getParameter("text");
        prepButton();
        var sfrom = document.getElementById("fromNews");
        var countLoadNews = parseInt(this.getParameter("countNews"))-1;
        var sto = document.getElementById("toNews");
        var cf = (currentPage-1)*hotArticlesPerPage+1;
        sfrom.innerHTML = cf;
        sto.innerHTML = cf+countLoadNews;
        hotArticlesDisabled = false;
    }
    function loadProcess() {
        loadHotArticlesStatus += ".";
        if (loadHotArticlesStatus.length > 7) {
            loadHotArticlesStatus = "";
        }
        var cont = document.getElementById("hotArticles").getElementsByTagName("DIV")[0];
        cont.innerHTML = "<div style='margin-left:10px'>Загрузка " + loadHotArticlesStatus + "</div>";
    }
    function prepButton() {
        
        document.getElementById("hotArticlesUp").src = currentPage != 1 ? "/images/modules/news/up_over.gif" : "/images/modules/news/up.gif";
        document.getElementById("hotArticlesDown").src = currentPage < allHotArticlesPages ? "/images/modules/news/down_over.gif" : "/images/modules/news/up.gif";

    }
