function array_contains_within(array, val) { var i, j; for (i=0; i