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