Thickness dependence of the magnetization and the Curie temperature of ferromagnetic thin films