//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();

switch (serie){
case 'lost':{
cota = ["cota1","cota2"];
idx=(Math.floor(Math.random()*100000)%cota.length);
break;
}
case "nada":{
cota = [""];
idx=(Math.floor(Math.random()*100000)%cota.length);
break;
}
default:{
cota = [""];
idx=(Math.floor(Math.random()*100000)%cota.length);
break;
}
}

//espaçador
espacador = "http://www.terra.com.br/ads/espaco.js";

//texto publicidade vertical (para superbanner)
publicidadeV = "http://www.terra.com.br/ads/default/publicidade_sb.js";

//sources dos anuncios
banner = "http://ad.doubleclick.net/adj/br.terra.seriesdetv/gral;kw="+cota[idx]+","+serie+";dcopt=ist;sz=728x90;ord="+Num+"?";


//posição dos anuncios
anuncioDireita.ordem();
anuncioMiolo.ordem(banner);
anuncioEsquerda.ordem();
anuncioRodape.ordem();