Account disabled and deleted functions I have the following functions that for the most part are utilizing much of the same code (except for the actual message). What are the possibilities, if there are any, for combining / reducing these functions so that there isn't so much redundancy?

    // ACCOUNT DISABLED FUNCTION

    function accountDisabled() {
        if (!$('.accountautologoff').length) {

            $('.content').append('&lt;div class="accountautologoff"&gt;&lt;span&gt;Your account has been disabled&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Contact the system administrator&lt;/span&gt;&lt;/div&gt;');

            $('body').addClass('disabled');
            $('html').removeClass('loading');
            $('.accountautologoff').hide().fadeTo(600, 1, 'swing');
            $(document).bind('mousewheel', function (e) { e.preventDefault(); });
            $('.content-home, .content-search').fadeTo(600, 0.5, 'swing');
        };
    };

    // ACCOUNT DELETED FUNCTION

    function accountDeleted() {
        if (!$('.accountautologoff').length) {

            $('.content').append('&lt;div class="accountautologoff"&gt;&lt;span&gt;Your account has been removed&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Contact the system administrator&lt;/span&gt;&lt;/div&gt;');

            $('body').addClass('disabled');
            $('html').removeClass('loading');
            $('.accountautologoff').hide().fadeTo(600, 1, 'swing');
            $(document).bind('mousewheel', function (e) { e.preventDefault(); });
            $('.content-home, .content-search').fadeTo(600, 0.5, 'swing');
    };
};
You could start by actually trying to combine them yourself. :/ we appreciate code reviews but honestly this was a copy and paste job.

function accountDeactivate(msg) {
  if (!$('.accountautologoff').length) {
    $('.content').append('&lt;div class="accountautologoff"&gt;&lt;span&gt;' + msg +'&lt;/span&gt;&lt;/div&gt;');
    $('body').addClass('disabled');
    $('html').removeClass('loading');
    $('.accountautologoff').hide().fadeTo(600, 1, 'swing');
    $(document).bind('mousewheel', function (e) { e.preventDefault(); });
    $('.content-home, .content-search').fadeTo(600, 0.5, 'swing');
  };
}