Effects of the cubic vs quartic anharmonicity in gap and surface localized modes of diatomic chains