FireFox Looses variable on slow server

Hi!

Here’s code http://qf.pastebin.com/652440

http://www.cccaretakers.ca/gallery/slideshow1.html

It works fine on Explorer, but Firefox looses the variable and it goes to never ending loop. Can anyone help me ?

Btw, it works fine on http://koti.mbnet.fi/zonas/slideshow/slideshow1.html (unless you got slow conn to finland).

Can anyone help me ?