What are you trying to do? You have the elements in the array, and you are running the loop from 0 to array length/100, i.e., 0 to 0.04. Then other calculations inside the loop.
For one comparing an integer with a float is not a great idea and should be avoided. Secondly, check if the values are set properly in the find and change objects. Also, you should make the objects null at the end of each loop/query. So put these two lines at the bottom of the loop as well
What is the error that you get on that statement? That should work provided you have a document open. On the desktop version do you run the script by manually opening the document? If so then you need to open the document on IDS server as well. Since IDS does not have a UI, you will have to open the file using your script using the app.open method. Also once the work is done close the document using app.close()