Javascript Array inArray(element)
Array.prototype.inArray = function(element) { return this.indexOf(element) !== -1; };