 //implementação das funções
Num=Math.floor (Math.random()*1000000);

function ordem(){
  for(i = 0; i < ordem.arguments.length; i++){
    this.tagsPublicidade += "<scr"+"ipt src=\""+ ordem.arguments[i] + "\"></scr"+"ipt>";
  }
}

function anuncios(){
  this.tagsPublicidade="";
  this.ordem = ordem;
  this.mostra = function (){document.write(this.tagsPublicidade);}
}

anuncioDireita = new anuncios();
anuncioCentroDireita = new anuncios();
anuncioEsquerda = new anuncios();
anuncioMiolo = new anuncios();
anuncioMioloPubExtra = new anuncios();
anuncioRodape = new anuncios();
anuncioPPP = new anuncios();

   //espaçador
espacador = "http://www.terra.com.br/ads/espaco.js";


//Sorteio
/*
cota1= rexona
cota2=coca-cola
cota3=seda
*/
var cotaId = new Array();
cotaId = ["cota1","cota2","cota3"];
idx = (Math.floor(Math.random() * 10000) % cotaId.length);


   //sources dos anuncios
superbanner = "http://ad.doubleclick.net/adj/br.terra.riofashion/home;sz=728x90;kw="+cotaId[idx]+";ord=" + Num + "?";
box = "http://ad.doubleclick.net/adj/br.terra.riofashion/home;sz=250x250;kw="+cotaId[idx]+";ord=" + Num + "?";
publi = "http://ad.doubleclick.net/adj/br.terra.riofashion/home;sz=10x10;ord=" + Num + "?";
patrocinio = "http://ad.doubleclick.net/adj/br.terra.riofashion/home;sz=88x31;ord=" + Num + "?";

  //posição dos anuncios
anuncioDireita.ordem();
anuncioCentroDireita.ordem(box);
anuncioMiolo.ordem(superbanner);
anuncioEsquerda.ordem();
anuncioRodape.ordem(patrocinio);
anuncioPPP.ordem();
anuncioMioloPubExtra.ordem(publi);