function in_array(buscar, array){ for(i=0; i<array.length; i++) { if (array[i] == buscar) break; } return (i < array.length)? true : false; }