 //implementação das funções
Num=Math.floor (Math.random()*1000000);
var cm8cat="br_esportes";

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();
anuncioEsquerda = new anuncios();
anuncioMiolo = new anuncios();
anuncioRodape = new anuncios();
anuncioCentroDireitaPequeno = new anuncios();
anuncioBarra = new anuncios();

//espaçador
espacador = "http://www.terra.com.br/ads/espaco.js";

//sources dos anuncios
banner = "http://ad.br.doubleclick.net/adj/br.terra.esportes/home;sz=468x60;ga=br_esportes;dcopt=ist;niv=0;tile=1;ord="+ Num +"?";

//subset1 ="http://www.latinmedios.com/RealMedia/ads/adstream_jx.ads/www.terra.com.br/deportes/discoverychannel/animalplanet@Right1"; 
//subsetPpiComplemento = "http://ad.doubleclick.net/897498/tag_subset_esportes.js";//retirar quado entrar pelo DART

subset2 = "http://ad.doubleclick.net/adj/br.terra.esportes/sub2;sz=138x238;tile=1;niv=0;ga=br_esportes;ord=" + Num + "?";
ppiCompras = "http://ppi.terra.com.br/showppijs.asp?canal=esportes&pag=capa&ord=" + Num;
busca = "http://www.terra.com.br/ads/esportes/busca.js"
barra = "http://www.terra.com.br/ads/esportes/barra_publicitaria.js"
popup = "http://ad.doubleclick.net/adj/br.terra.esportes/pops;sz=1x1;ga=br_esportes;ord="+Num+"?";
checkm8 = "http://adserver.terra.com.br/checkm8scripts/checkm8_init_1.js";
formatoEditorial = "http://ad.doubleclick.net/adj/br.terra.esportes/subset;tile=2;niv=0;sz=138x238;ga=br_esportes;ord="+Num+"?";
textolinkado = "http://www.terra.com.br/ads/esportes/textolinkado.js";

//posição dos anuncios
anuncioDireita.ordem(formatoEditorial,espacador,subset2,espacador,ppiCompras,busca);
anuncioMiolo.ordem(banner,textolinkado);
anuncioEsquerda.ordem();
anuncioBarra.ordem();
anuncioRodape.ordem(popup,checkm8);


