function banner(img_source,chance) {
   this.img_source = img_source;
   this.chance = chance;
}
function display() {
   with (this) document.write("<IMG SRC='" + img_source + "' WIDTH=150 HEIGHT=160 BORDER=0 >");
}
banner.prototype.display = display;
banners = new Array();
banners[0] = new banner("cnr_images/random_images/1.gif",
                        10);
banners[1] = new banner("cnr_images/random_images/2.gif",
                        10);
banners[2] = new banner("cnr_images/random_images/3.gif",
                        10);
banners[3] = new banner("cnr_images/random_images/4.gif",
                        10);
banners[4] = new banner("cnr_images/random_images/5.gif",
                        10);
banners[5] = new banner("cnr_images/random_images/6.gif",
                        10);
banners[6] = new banner("cnr_images/random_images/7.gif",
                        10);
banners[7] = new banner("cnr_images/random_images/8.gif",
                        10);
banners[8] = new banner("cnr_images/random_images/9.gif",
                        10);
banners[9] = new banner("cnr_images/random_images/10.gif",
                        10);
banners[10] = new banner("cnr_images/random_images/11.gif",
                        10);
banners[11] = new banner("cnr_images/random_images/12.gif",
                        10);
banners[12] = new banner("cnr_images/random_images/13.gif",
                        10);
banners[13] = new banner("cnr_images/random_images/14.gif",
                        10);
banners[14] = new banner("cnr_images/random_images/15.gif",
                        10);
banners[15] = new banner("cnr_images/random_images/16.gif",
                        10);
banners[16] = new banner("cnr_images/random_images/17.gif",
                        10);
banners[17] = new banner("cnr_images/random_images/18.gif",
                        10);
banners[18] = new banner("cnr_images/random_images/19.gif",
                        10);
banners[19] = new banner("cnr_images/random_images/20.gif",
                        10);
banners[20] = new banner("cnr_images/random_images/21.gif",
                        10);
banners[21] = new banner("cnr_images/random_images/22.gif",
                        10);
sum_of_all_chances = 0;
for (i = 0; i < banners.length; i++) {
   sum_of_all_chances += banners[i].chance;
}
function display_banner() {
   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("<IMG SRC='" + banners[i].img_source + "' WIDTH=150 HEIGHT=160 BORDER=0 >");
         return banners[i];
         break;
      }
   }
}
//-->
