Helicity of magnetic clouds and their associated active regions