﻿function ShowView(id) {

    //    var $newsid = id;
    
    $.ajax({
    url: "/Ajax.aspx?q=ShowViewCount&newsid=" + id + "&time=" + new Date().toString(),
        type: "GET",
        timeout: 30000,
        beforeSend: function()
        { },
        error: function() {
        $("#divViewCount").html("20");
        },
        success: function() {
            var $s = arguments[0];
            if ($s != "") {
                $("#divViewCount").html($s);
                
            }
            else {
                
            }
        }
    });
}

function ShowButton(id) {
    $.ajax({
        url: "/Ajax.aspx?q=ShowButton&newsid=" + id + "&time=" + new Date().toString(),
        type: "GET",
        timeout: 30000,
        beforeSend: function()
        { },
        error: function()
        { },
        success: function() {
            var $s = arguments[0];
            if ($s != "") {
                              $("#divShowButton").html($s);
               
            }
            else {
                
            }
        }
    });
}

function ShowAD(id) {
    $.ajax({
    url: "/Ajax.aspx?q=ShowAD&newsid=" + id + "&time=" + new Date().toString(),
        type: "GET",
        timeout: 30000,
        beforeSend: function()
        { },
        error: function() {
        $("#divShowAD").html("");
        },
        success: function() {
            var $s = arguments[0];
            if ($s != "") {
                $("#divShowAD").html($s);
                
            }
            else {
                $("#divShowAD").html("");
            }
        }
    });
}
