Interactions of resonances and global bifurcations in Rayleigh-Benard convection