<script language="JavaScript">
// timer counter --> uses setInterval to count
var timerID=0;
// image and link arrays - computedvalue works well.

var imgArray = new Array("/folder/app.nsf/webai/docunid/$FILES/image1.jpg", "/folder/app.nsf/webai/docunid/$FILES/image2.jpg", "/folder/app.nsf/webai/docunid/$FILES/image3.jpg", "/folder/app.nsf/webai/docunid/$FILES/image4.jpg",
"/folder/app.nsf/webai/docunid/$FILES/image5.jpg");

var linkArray = new Array("http://www.mindwatering.com", "http://www.rockingchairsoftware.com", "http://www.southmainstudios.com", "/folder/app.nsf/webpg/docunid",
"/folder/app.nsf/webpg/docunid");

function setupAdBanner() {
	rotateBanner();
	timerID = setInterval("rotateBanner()", 2 * 60000);
}

function cleanupPage() {
	if (timerID)
		clearInterval(timerID);
}

function rotateBanner() {
imgIndex = Math.ceil(Math.random() * imgArray.length) - 1;
document.images["PAdd"].src= + imgArray[imgIndex];
document.links["PAddLink"].src= + linkArray[imgIndex];
}
</script>

<head>
</head>

<body onLoad="setupAdBanner();" onUnload="cleanupPage();">
. . . 
<a id="PAddLink" name ="PAddLink" href="somewhere.com"><img id="PAdd" name="PAdd" src="/folder/app.nsf/somestartingimage.jpg" style="border: solid 0px;"></a>
. . . 
</body>