added indexOf to Array for backwards-compatibility from Javascript 1.6