//*******************************************************************
// Kappa Solutions Ltd. Javascript Library.
// (c) 2000-2009 Kappa Solutions Ltd. except where credited
//*******************************************************************
var KSL;
if (!KSL) KSL = {};
if (!KSL.Serv) KSL.Serv = {};
if (!KSL.Serv.AE) KSL.Serv.AE = {};

//*******************************************************************
// Contact service proxy class.
//
//*******************************************************************
KSL.Serv.AE.Contact = function () {

	this._CONTACTURL = ["http://", location.host, "/contactservice.asmx/"].join("");
//	this._CONTACTURL = "http://localhost:50462/Sitex/contactservice.asmx/";
}

KSL.Serv.AE.Contact.prototype.subscribe = function(data, success, error) {

    var params = {};
    params.contact = data;
    $.ajax({
        type: "POST",
        url: this._CONTACTURL + "Subscribe",
        data: JSON.stringify(params),
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: success,
		error: error
    });
 }

KSL.Serv.AE.Contact.prototype.unSubscribe = function(data, success, error) {

    var params = {};
    params.contact = data;
    $.ajax({
        type: "POST",
        url: this._CONTACTURL + "UnSubscribe",
        data: JSON.stringify(params),
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: success,
		error: error
    });
}

//*******************************************************************
