I have this array.prototype on my page and it seems to be sucking up a lot of processing time:
Array.prototype.findInArray = function(searchStr) {
var returnArray = false;
for (i=0; i<this.length; i++) {
if (typeof(searchStr) == 'function') {
if (searchStr.test(this[i])) {
if (!returnArray) { returnArray = [] }
returnArray.push(i);
}
} else {
var regexp = new RegExp(".*" + searchStr + ".*");
if (this[i].match(regexp)) {
if (!returnArray) { returnArray = [] }
returnArray.push(i);
}
}
}
return returnArray;
}