function distribute(post_id, systems, num, one){
    sys = systems.split(',')
    if(!one){
        
        distribute(post_id, systems, 0, true);
        
    }else{
        
        var anchor = document.getElementById(sys[num]+'_anchor').value
        jQuery.post(ajaxurl, {
            action: 'bm_send',
            post_id: post_id,
            system: sys[num],
            anchor: anchor
        }, function(data) {
            var elem_src = document.getElementById(sys[num]+'_load')
            if(data=='ok'){
                elem_src.src=elem_src.src.replace('load.gif','ok.png');
            }else{
                elem_src.src=elem_src.src.replace('load.gif','err.png');
            }
            if(sys[num+1]){
                distribute(post_id, systems, num+1 , true);
            }
            
        })
      
    }
    
    
}
