OK, here goes the stupidest question of all: does it still pop up if you disable File Gallery?
Sorry, but I'm all out of ideas... :/
One other thing you could do is take a look at the "Error console" in Firefox. If it's enabled, it will be available from the Tools menu. If not, then please follow these instructions on how to enable it: https://developer.mozilla.org/en/Error_Console.
So, open the Error console and click the Clear button.
Now open/refresh the page that pops the alert box and see if any error has been logged. If it has, then please paste it here.
It probably won't show anything, but, like I said, I'm all out of ideas...
If it's an option for you, smilenj and security_man, I'll gladly take a look at your site's backends and try to solve the mystery, and I'm guessing it would not take me more than 5 minutes.
You can contact me either via e-mail (aesqe at skyphe dot org) or skype (username: skyphe).