Hi V
Sorry about that
Change the 1st while loop to
while (l--) { nameFinds = ([]).concat.apply ([],cityFinds[c]); if (!(fl = nameFinds.length)) {c++; continue;} firstFind = nameFinds[0]; pageOffset = firstFind.parentTextFrames[0].parentPage.documentOffset; theCities[n] = city = firstFind.contents; pageOffsets [n++] = pageOffset; entryFinds [city] = (entryFinds [city]) ? entryFinds [city] + fl : fl; c++; }
should work