document.search() is not a function
We recently upgraded from InDesign CS2 to InDesign CS6.
We have scripts that we ran on Windows InDesign CS2 that we are trying to get to run on a Mac InDesign CS6.
We are getting the following error when executing one of the scripts.

I looked in the Object Model Viewer and did not find a method search() for Document.

Since it looks like this worked before in CS2, I am wondering if anyone knows if this method was deprecated in CS6 and if there is another method that does the same work?
This is the code that gets executed.

Any help in the right direction is appreciated.