Scaling and thermodynamics of a trapped Bose-condensed gas