AjaxUtility_class = function() {};
AjaxUtility_class.prototype.url = '/ajaxpro/FeedNews.Controls.AjaxUtility,FeedNews.Controls.ashx';
AjaxUtility_class.prototype.ShareIt = function(rssDataid, onsuccess, onerror) {

	return jQuery.ajax({
		type: "POST",
		url: this.url,
		data:Object.toJSON({"rssDataid":rssDataid}),
		beforeSend: function(xhr) {
			xhr.setRequestHeader("X-AjaxPro-Method", "ShareIt");
			if(typeof AjaxPro !== 'undefined' && AjaxPro.token !== null)
				xhr.setRequestHeader("X-AjaxPro-Token", AjaxPro.token);
		},
		success: function(s) {
			var o = null;
			eval("o = " + s + ";");
			if(o != null) {
				if(typeof o.value != "undefined" && typeof onsuccess == "function") {
					onsuccess(o.value);
					return;
				} else if(typeof o.error != "undefined" && typeof onerror == "function") {
					onerror(o.error);
					return;
				}
			}
			if(typeof onerror == "function") {
				onerror({"Message":"Failed."});
			}
		}
	}); 
};
AjaxUtility_class.prototype.SetReadIt = function(rssDataid, isread, onsuccess, onerror) {

	return jQuery.ajax({
		type: "POST",
		url: this.url,
		data:Object.toJSON({"rssDataid":rssDataid, "isread":isread}),
		beforeSend: function(xhr) {
			xhr.setRequestHeader("X-AjaxPro-Method", "SetReadIt");
			if(typeof AjaxPro !== 'undefined' && AjaxPro.token !== null)
				xhr.setRequestHeader("X-AjaxPro-Token", AjaxPro.token);
		},
		success: function(s) {
			var o = null;
			eval("o = " + s + ";");
			if(o != null) {
				if(typeof o.value != "undefined" && typeof onsuccess == "function") {
					onsuccess(o.value);
					return;
				} else if(typeof o.error != "undefined" && typeof onerror == "function") {
					onerror(o.error);
					return;
				}
			}
			if(typeof onerror == "function") {
				onerror({"Message":"Failed."});
			}
		}
	}); 
};
var AjaxUtility = new AjaxUtility_class();


