SpecialCourse_class = function() {};
SpecialCourse_class.prototype.url = '/ajaxpro/IMQ.SpecialCourse,IMQ.ashx';
SpecialCourse_class.prototype.BindData = function(ID, onsuccess, onerror) {

	return jQuery.ajax({
		type: "POST",
		url: this.url,
		data:Object.toJSON({"ID":ID}),
		beforeSend: function(xhr) {
			xhr.setRequestHeader("X-AjaxPro-Method", "BindData");
			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."});
			}
		}
	}); 
};
SpecialCourse_class.prototype.Send = function(data, onsuccess, onerror) {

	return jQuery.ajax({
		type: "POST",
		url: this.url,
		data:Object.toJSON({"data":data}),
		beforeSend: function(xhr) {
			xhr.setRequestHeader("X-AjaxPro-Method", "Send");
			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 SpecialCourse = new SpecialCourse_class();


