if (typeof(checkbox_name) == 'undefined'){
        var checkbox_name = 'friend';
    }
     
     
function enable_button() {
    jQuery('.bt_black > span').removeClass('setGray');
    //jQuery('.abutton > a').removeClass( 'cur_defa' );
}

function disable_button() {
    jQuery('.bt_black.float_left > span').addClass('setGray');
}


function SelectAll(ele_all) {    
    jQuery("input[name=" + checkbox_name + "]").each(function() {
        this.checked = ele_all.checked;
        if ( ele_all.checked ) {
            enable_button();
        } else {
             disable_button();
        }
    } );
}

jQuery(document).ready( function() {
    disable_button();
    jQuery("input[name=" + checkbox_name + "]").bind('click', function() {        
        if (any_checked() ) {
            enable_button();
        } else {
            disable_button();
        }
    } );
} );

function any_checked() {
    return jQuery("input[@name=" + checkbox_name + "]").is(":checked")
}