function shuffle(array) { n = array.length; // The number of items left to shuffle (loop invariant). while (n > 1) { k = randomInt(n); // 0 <= k < n. n--; // n is now the last pertinent index; temp = array[n]; // swap array[n] with array[k] (does nothing if k == n). array[n] = array[k]; array[k] = temp; } } // returns a random number, 0 <= k < n function randomInt(n) { return n * random(); } //begin execution here totalImages=ojNImages(); imageNames = newArray(totalImages); //current image names temp=ojGetImageName(1); imageNames[0]=temp; print(imageNames[0]) for (n=0; n=0) run("Clear Results"); setResult("oldName", 0,""); setResult("newName", 0,""); for (n=0; n