Javascript Array entSearch(id)
Array.prototype.entSearch = function(id){ for (var e = 0; e < this.length; e++) { if (this[e].id == id) { return e;/*ww w . jav a2 s .c o m*/ } } return -1; };