Adding indexOf since IE sucks.