﻿function updateImpression(adsid){
    $.ajax({
    url: "http://et.phununet.com/Adservice.asmx/UpdateImression",
                data: { adid: JSON.stringify(adsid)},
                contentType: "application/json; charset=utf-8",
                dataType: "jsonp",
                cache: false,
                success: Succsess,
                error: error
            });
 }
 function updateClick(adsid) {
            $.ajax({
                url: "http://et.phununet.com/Adservice.asmx/UpdateClick",
                data: { adid: JSON.stringify(adsid) },
                contentType: "application/json; charset=utf-8",
                dataType: "jsonp",
                cache: false,
                success: Succsess,
                error: error
            });
        }
function updatePopup(adsid) {
            $.ajax({
            url: "http://localhost:1227/PhununetAds/Adservice.asmx/UpdatePopup",
                data: { adid: JSON.stringify(adsid)},
                contentType: "application/json; charset=utf-8",
                dataType: "jsonp",
                cache: false,
                success: Succsess,
                error: error
            });
        }
function Succsess(msg) {}
function error(msg) {}

function getImpression1(tagname,adsid) {
    $.ajax({
        url: "http://et.phununet.com/Adservice.asmx/getImpression",
        data: { adid: JSON.stringify(adsid) },
        contentType: "application/json; charset=utf-8",
        dataType: "jsonp",
        cache: false,
        success: function(msg) {
        $('#' + tagname).html('<span>' + msg.d + '</span>');
        },
        error: error
    });
}


function phagia_Adimpression1(adsid, adscid) {
    $.ajax({
        url: "http://et.phununet.com/Adservice.asmx/phagia_impression",
        data: { adid: JSON.stringify(adsid), cid: JSON.stringify(adscid) },
        contentType: "application/json; charset=utf-8",
        dataType: "jsonp",
        cache: false,
        success: Succsess,
        error: error
    });
}

function phagia_Adclick1(adsid, adscid) {
    $.ajax({
        url: "http://et.phununet.com/Adservice.asmx/phagia_click",
        data: { adid: JSON.stringify(adsid), cid: JSON.stringify(adscid) },
        contentType: "application/json; charset=utf-8",
        dataType: "jsonp",
        cache: false,
        success: Succsess,
        error: error
    });
}
function phagia_Adpopup1(adsid, adscid) {
    $.ajax({
        url: "http://et.phununet.com/Adservice.asmx/phagia_popup",
        data: { adid: JSON.stringify(adsid), cid: JSON.stringify(adscid) },
        contentType: "application/json; charset=utf-8",
        dataType: "jsonp",
        cache: false,
        success: Succsess,
        error: error
    });
}


function phagia_getImpression1(tagname, adsid) {
    $.ajax({
        url: "http://et.phununet.com/Adservice.asmx/phagia_getImpression",
        data: { adid: JSON.stringify(adsid) },
        contentType: "application/json; charset=utf-8",
        dataType: "jsonp",
        cache: false,
        success: function(msg) {
            $('#' + tagname).html('<span>' + msg.d + '</span>');
        },
        error: error
    });
}

