Quasi-two-dimensional approach to states of an adsorbed atom