 //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();
anuncioEsquerda = new anuncios();
anuncioMiolo = new anuncios();
anuncioRodape = new anuncios();

//espaçador
espacador = "http://www.terra.com.br/ads/espaco.js";

var keyw = new Array();keyw = ["bmf","bancoreal"];
idx = (Math.floor(Math.random() * 10000) % keyw.length);

//sources dos anuncios
banner = "http://ad.doubleclick.net/adj/br.terra.mercadocarbono/gral_ingles;sz=728x90;kw="+keyw[idx]+";dcopt=ist;ord="+Num+"?";
subset = "http://ad.doubleclick.net/adj/br.terra.mercadocarbono/gral_ingles;sz=120x240;ord=" + Num + "?";
patrocinio= "http://www.terra.com.br/ads/mercado_carbono/patrocinio.js";

//posição dos anuncios
anuncioDireita.ordem();
anuncioMiolo.ordem(banner);
anuncioEsquerda.ordem();
anuncioRodape.ordem(patrocinio);