/**
 * IMP Popup JavaScript.
 *
 * Provides the javascript to toggle address blocks.
 * This file should be included via Horde::addScriptFile().
 *
 * $Horde: imp/js/src/addressesBlocks.js,v 1.3.2.2 2008/05/20 16:33:02 slusarz Exp $
 *
 * See the enclosed file COPYING for license information (GPL). If you
 * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
 */
function toggleAddressesBlock(field, count)
{
    var b = $('ab_' + field);

    $('at_' + field).firstDescendant().innerHTML = (b.visible()) ?
        '[' + IMP.text.toggle_show + ' - ' + count + ' ' + IMP.text.recipients + ']' :
        '[' + IMP.text.toggle_hide + ']';

    b.toggle();
}
