function array_find_index(array, val, repititionof=1) { var i; var amountof = 0; for (i=0; i= repititionof return i; } } return -1; }