Based on the idea that the components of a cosmological metric may be determined by the total gravitational potential of the universe, the scalar field $\phi=1/G$ in the Jordan-Brans-Dicke (JBD) theory is introduced as evolving with the inverse square of the scale factor. Since the gravitational potential is related to the field $\phi$ resulting from Mach's principle and depends on time due to the expansion of space, the temporal evolution of the field should be in accord with the evolution of time and space intervals in the metric tensor. For the same reason, the time dependence of the field makes these comoving intervals relative for different points on the time axis. Thus, it is shown that introduction of the cosmic gravitational potential as a time dependent scalar field proportional to $1/a^2$ may resolve the flatness, the horizon and the late-time accelerating expansion problems of the standard model of cosmology. The luminosity distance vs redshift data of Type Ia supernovae is in agreement with this approach.