Surface-induced orientation of the liquid crystal molecules