/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

jQuery(function($){
    $("#MobilePhone").mask("(999) 999-9999");
});

function loadMobilePhoneMask() {
    $("#MobilePhone").mask("(999) 999-9999");
}

function disableFields()
{
    if ($("#SmsNotification").is(':checked') == false) {
        $("#MobilePhoneDiv").hide();
    } else {
        $("#MobilePhoneDiv").show()
    }
}

function UpdateClientMobileInfo() {
    var IsUserInside = $.ajax({
        type: "POST",
        data: {
            MobilePhone : $("#MobilePhone").val(), 
            GetsSms : $("#SmsNotification").is(':checked')
        },
        url: "/Scripts/UpdateClientInfo.php",
        async: false
    }).responseText;
    
    return IsUserInside;
}
