  Several recent experiments have revealed that the charge density $\rho$ in a
given compound (mostly underdoped) is intrinsic inhomogeneous with large
nanoscale spatial variations. Therefore it is appropriate to define a local
charge density $\rho(r)$. These differences in the local charge concentration
yield insulator and metallic regions, either in an intrinsic granular or in a
stripe morphology. In the metallic region, the inhomogeneous charge density
produces spatial or local distributions of superconducting critical
temperatures $T_c(r)$ and zero temperature gap $\Delta_0(r)$. We propose that
the superconducting phase in high-$T_c$ oxides is reached when the temperature
reachs a value which superconduction regions with different critical
temperatures percolates. We show also that this novel approach is able to
reproduce the phase diagram for a family of cuprates and provides new insights
on several experimental features of high-$T_c$ oxides
