I don't think you understand what that code is doing.
setInterval("nextSlide()",gSlideshowInterval * 1000);
says "every 30 seconds, call the nextSlide( ) function"
It does this by setting up an Interval object.
So, indeed, every 30 seonds nextSlide is called.
But then the nextSlide function has THIS line:
which says "call the nextSlide function every 5 seconds"
AND EACH TIME YOU CALL loadSlide, you set up *ANOTHER* INTERVAL OBJECT!!!
So not surprisingly eventually you run out of memory, when enough of these interval objects have been created!!!
I think you MEANT to use setTimeout( ) and incorrectly used setInterval( )
setTimeout only happens one time and then disappears. setInterval happens for ever!