My simple function for Array.indexOf doesn't actually cover the overloaded version in the JS 1.6 standard, which has an additional start parameter. Updated it to this:
if(!Array.indexOf){
Array.prototype.indexOf = function(obj, start){
for(var i=(start||0); i<this.length; i++){
if(this[i]==obj){
return i;
}
}
}
}
This is based on a tip here.