
  var max      = 10;
  var nrImages = 6;
  function makeImages() {
    this[0]     = "imagem1.gif";
    this[1]     = "imagem2.gif";
    this[2]     = "imagem3.gif";
    this[3]     = "imagem4.gif";
    this[4]     = "imagem5.gif";
    this[5]     = "imagem6.gif";
    this[6]     = "imagem7.gif";
    this.length = nrImages;
  }
  function makeLinks() {
    this[0]     = "http://www.outrossois.com.br";
    this[1]     = "http://www.outrossois.com.br";
    this[2]     = "http://www.outrossois.com.br";
    this[3]     = "http://www.outrossois.com.br";
    this[4]     = "http://www.outrossois.com.br";
    this[5]     = "http://www.outrossois.com.br";
    this[5]     = "http://www.outrossois.com.br"; 
	this.length = nrImages;

  }
  var vetImages = new makeImages();
  var vetLinks  = new makeLinks();
  var x = Math.round(Math.random()*max);
  var y    = max / nrImages;
  for(var cont = 1;cont*y <= max;cont++) {
    if (x <= (cont*y)) {
      document.write("<a href="+vetLinks[cont-1]+" target=_blank><img  src="+vetImages[cont-1]+" border=0 center></a>");
      break;
    }
  }
