Origin of inertia :extended Mach's principle and cosmological consequences