How to preload randomly loaded jpg's


i used the kirupa tutorial on how to randomly load a jpg from a specific folder.
this works great, altough i would like to preload the loaded jpg’s.
and this preloading is my problem. i tryed a lot of things but i can not seem to get the totalbytes and the percentage counter to work. the loadedbytes are working.

i used netlimiter to reduce the download speed of IE6 to 10K otherwise i can not see the preloader because of my fast adsl internet connection.

can anyone help out or check my code. or even better tell me a better way of preloading randomly loaded jpg’s if my method isn’t good enough.