// Funções de Random

var currentdate = 0
var core = 0

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

  }
}

image = new StringArray(3)
image[0] = 'campanha1.swf'
image[1] = 'campanha2.swf'
image[2] = 'campanha3.swf'

var ran = 60/image.length

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

function pegaBanner() {
	document.write('<object classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0 width=730 height=173 id=ShockwaveFlash1>');
	document.write('<param name="quality" "value="high">');
	document.write('<param name="wmode" value="transparent">');
	document.write('<param name=movie value=" '+ranimage()+' ">');
	document.write('<embed src=" '+ranimage()+' " quality="high" pluginspage=""http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"" type=""application/x-shockwave-flash"" width=730 height=173>');
	document.write('</embed>');
	document.write('</object>');
}
