﻿/* Contact
 *******************************************************************************/
function contact()
{
}
contact.prototype.send = function (name, email, phoneNumber, message, before, success, error)
{
    var data = new Object();
    data.Name = name;
    data.Email = email;
    data.PhoneNumber = phoneNumber;
    data.Message = message;

    $.ajaxDotNet(SERVICE_URL + "Contact_Send", {
        verb: "POST",
        data: data,
        beforeSend: function (xhr)
        {
            if (before)
                before();
            return xhr
        },
        success: function (obj)
        {
            obj = obj.d;
            if (success)
                success(obj);
        },
        error: function (xhr, st, e)
        {
            if (error)
                error(xhr, st, e);
        }
    });
}
