If you haven't read Generate a Random Picture (Part 1) you may want to.
Below is the code that I use(used) for an advertising campaign by DiscountASP.NET. They wanted to rotate two 468x80 banner images. I set up a file located in a folder 'includes' called 'banner.asp'. Below is the code that I inserted into this file. I have used a virtual include to embed the code from banner.asp into all my pages on this site. You will notice that a random number between 1 and 2 is generated and depending on the value of 'RandomNumber' the SELECT CASE function will output one of the banners and it's link and alt tags.
Here's the code that embeds the include file;
<!--#include virtual="/banner/banner.asp"-->
Get the best asp web hosting provider now and save 30%
Plug and play ASP membership script that integrates with PayPal to let you charge recurring membership fees.