/*

DIPENDENZE:

jquery.js

VINCOLI:

<nessuno> (libreria di funzioni plug-in)

*/

// arr.indexOf(obj) restituisce l'indice di obj nell'array arr, o -1 se non lo trova.
Array.prototype.indexOf = function(obj) {
  for (var i = 0; i < this.length; i++) {
    if (this[i] == obj)
      return i;
  }
  return -1;
}

// arr.has(obj) restituisce (arr.indexOf(obj) >= 0).
Array.prototype.has = function(obj) {
  return this.indexOf(obj) >= 0;
} 