/* If you have worked with JavaScript at any length you are aware that IE does not implement the ECMAScript function for Array.prototype.indexOf() [including IE8]. Not a huge problem because you can extend the functionality on your page with the following code. */ if (!Array.prototype.indexOf) { Array.prototype.indexOf = function(obj, start) { for (var i = (start || 0), j = this.length; i < j; i++) { if (this[i] === obj) { return i; } } return -1; } }