Random pictures before preloader

Hi kirupaneers,

I’m designing a website that uses a high quality photo as background. the site has five sections (home, portfolio, etc…) for each section I have 3 high quality photo’s, now I want to load for each section 1 photo at random (so every time you start the site the background is differnt), when I include all pictures the site is like 10 mb. But how to code this before the preloader…

so it would go like this I assume:

random picture selection for five sections --> pre-load site with random pictures --> start site

I 'm puzzeled and a bad coder…sorry

my preloader code

bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = 986.3getPercent;
this.loadTextvak._x= this.loadBar._width-150;
this.loadText = Math.round(getPercent
100)+"%";
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}

Thanks a lot