all of the images that are in the album that I pull images from are named like this:
The $randomindex2 is a variable generated by the PHP random function to provide the number to tack on the end of "frontpage". I plug that into my image link in the phpinclude_start template like this:
$frontpageimage = "http://www.twtex.com/photopost/data/512/frontpage$randomindex2.JPG";
Then in the Portal template, I link to the image like this:
<td class="$bgclass" align="center">Click image to see Gallery<br><a href="http://www.twtex.com/photopost/showgallery.php?cat=512" target="blank"><img src="$frontpageimage" /></a><br>
That is how I have it setup at the moment if you would like to look at the page. www.twtex.com
It just randomly rotates through the images in the album.