I've caused that warning a number of times ... as a web developer I write JavaScript--the script--and when I create an endless loop (usually with a while statement, but sometimes with recursive functions) it will continue to execute until the end of time, or until the browser gives you the chance to stop it.
Someone writing the page you're visiting didn't fix their buggy script, so you can either stop it when the browser (FF) prompts you, like you described, or you can disable JavaScript in your browser. To do the latter ...
Tools > Options... > Content (tab) > (deselect) Enable JavaScript (checkbox)
...and enjoy script-free browsing.
Although, doing a quick Google search it seems your particular script might be caused by a poorly written Firefox add-on/plugin ... possibly something called addblock plus. So that might be another direction to search if you keep getting this message.
Hope it helps