//<![CDATA[
  function banner(imgSource, chance) {
    this.imgSource = imgSource;
    this.chance = chance;
  }

  function dispBanner() {
    with (this) document.write("<object type='application/x-shockwave-flash' data='" + imgSource + "' width='610' height='241' id='Flash'>" +
                               "<param name='movie' value='" + imgSource + "' />" +
                               "<param name='allowScriptAcess' value='sameDomain' />" +
                               "<param name='quality' value='best' />" +
                               "<param name='bgcolor' value='#9ECEE4' />" +
                               "<param name='scale' value='noScale' />" +
                               "<param name='salign' value='TL' />" +
                               "<param name='FlashVars' value='playerMode=embedded' /></object>");
  }

  banner.prototype.dispBanner = dispBanner;
  banners = new Array();

  banners[0] = new banner("swf/sindicato_am.swf",10);
  banners[1] = new banner("swf/sindicato_ba.swf",10);
  banners[2] = new banner("swf/sindicato_ce.swf",10);
  banners[3] = new banner("swf/sindicato_df.swf",10);
  banners[4] = new banner("swf/sindicato_es.swf",10);
  banners[5] = new banner("swf/sindicato_go.swf",10);
  banners[6] = new banner("swf/sindicato_mg.swf",10);
  banners[7] = new banner("swf/sindicato_mt.swf",10);
  banners[8] = new banner("swf/sindicato_pa.swf",10);
  banners[9] = new banner("swf/sindicato_pe.swf",10);
  banners[10] = new banner("swf/sindicato_pr.swf",10);
  banners[11] = new banner("swf/sindicato_rj.swf",10);
  banners[12] = new banner("swf/sindicato_sc.swf",10);
  banners[13] = new banner("swf/sindicato_sp.swf",10);
  banners[14] = new banner("swf/sindicato_rs.swf",10);
  banners[15] = new banner("swf/sindicato_ms.swf",10);

  sum_of_all_chances = 0;

  for (i = 0; i < banners.length; i++) {
    sum_of_all_chances += banners[i].chance;
  }

  function randomBanner() {
    chance_limit = 0;
    randomly_selected_chance = Math.round((sum_of_all_chances - 1) * Math.random()) + 1;
    for (i = 0; i < banners.length; i++) {
      chance_limit += banners[i].chance;
      if (randomly_selected_chance <= chance_limit) {
        document.write("<object type='application/x-shockwave-flash' data='" + banners[i].imgSource + "' width='610' height='241' id='Flash'>" +
                       "<param name='movie' value='" + banners[i].imgSource + "' />" +
                       "<param name='allowScriptAcess' value='sameDomain' />" +
                       "<param name='quality' value='best' />" +
                       "<param name='bgcolor' value='#9ECEE4' />" +
                       "<param name='scale' value='noScale' />" +
                       "<param name='salign' value='TL' />" +
					   "<param name='wmode' value='transparent' />" +
                       "<param name='FlashVars' value='playerMode=embedded' />" +
                       "</object>");
        return banners[i];
        break;
      }
    }
  }
//]]>

//<![CDATA[
		   
//BANNER TOPO RANDÔMICO
  function topbanner(imgSource, chance) {
    this.imgSource = imgSource;
    this.chance = chance;
  }


//]]>