Hello, this is my first post, hopefully someone will help me.

I have this short Javascript, which is great because it can rotate anything, plain picture banner (JPG, GIF, PNG) or SWF, (externally or internally hosted) text, link... On page load. Every time a page loads, different banner is shown. Here's the script:

PHP Code:
<script language="Javascript">
<!--
var 
currentdate 0
var core 0

function StringArray (n) {
  
this.length n;
  for (var 
=1<= ni++) {
    
this[i] = ' '

  
}
}

image = new StringArray(4)
image[0] = '<OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab #version=5,0,0,0 id=Banner><PARAM NAME=movie VALUE=flashAD.swf><PARAM NAME=quality VALUE=high><PARAM NAME=menu VALUE=false><EMBED src=flashAD.swf quality=high  TYPE=application/x-shockwave-flash PLUGINSPAGE=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash></EMBED></OBJECT>'
image[1] = 'Text only ad'
image[2] = '<a href="ad.htm">Text AD</a>'
image[3] = '<img src="ad.jpg">'

var ran 60/image.length

function radAD() {
  
currentdate = new Date()
  
core currentdate.getSeconds()
  
core Math.floor(core/ran)
    return(
image[core])
}

document.write(radAD())

//-->
</script> 
However, I'd like to have it auto rotating every 10-15 second or so.
Two most common methods are out.
1. Autorefresh of a script because it causes refresh of the whole page,
2. Putting the code in iFrame and refreshing iFrame only. Both me and Google don't like iFrames. :-)

Could anyone come with some quick solution? Thanks a million!