﻿



function loadCustomNewsUL() {

    $("div.customnews").each(function () {

        var top = 3;
        if ($(this).attr("total") > 0)
            top = $(this).attr("total");

        var div = $(this);
        $.ajax({
            type: "GET",
            url: "/base/AteaBase/getCustomNewsUL/" + top,
            data: "",
            success: function (msg) {
                $(div).html($(msg).xml());
            },
            error: function (msg) {
                //alert("error " + $(msg).xml());
            }
        });
    });


}



function loadCustomPressUL() {

    $("div.custompress").each(function () {
        var top = 3;
        if ($(this).attr("total") > 0)
            top = $(this).attr("total");

        var div = $(this);
        $.ajax({
            type: "GET",
            url: "/base/AteaBase/getCustomPressUL/" + top,
            data: "",
            success: function (msg) {
                $(div).html($(msg).xml());
            },
            error: function (msg) {
                //alert("error " + msg);
            }
        });
    });


}



function reloadNews(year) {
     $.ajax({
        type: "GET",
        url: "/base/AteaBase/getNewsULForYear/" + year,
        data: "",
        success: function (msg) {
            $("#newslist").html($(msg).xml());
        },
        error: function (msg) {
            //alert("error " + msg);
        }
    });
}



function reloadPress(year) {

    

    $.ajax({
        type: "GET",
        url: "/base/AteaBase/getPressULForYear/" + year,
        data: "",
        success: function (msg) {
            $("#presslist").html($(msg).xml());
        },
        error: function (msg) {
            //alert("error " + msg);
        }
    });

}
