
<!-- Copyright 2000 - Galichon Enterprises, Inc.  rich@galichon.net  http://www.galichon.net
// Permission granted to SimplytheBest.net to list the script in the DHTML scripts library
// Courtesy of SimplytheBest.net - http://simplythebest.net/scripts/
function banner(img_source,url,alt,chance) {
   this.img_source = img_source;
   this.url = url;
   this.alt = alt;
   this.chance = chance;
}
function display() {
   with (this) document.write("<A HREF=" + url + "><IMG SRC='" + img_source + "' WIDTH=96 HEIGHT=186 BORDER=0 ALT='" + alt + "'></A>");
}
banner.prototype.display = display;
banners = new Array();
banners[0] = new banner("link-electronic-01.jpg",
                        "electronic-earmuffs.html  target='_new'",
                        " ",
                        100);
banners[1] = new banner("link-capmount.jpg",
                        "hardhard-earmuffs.html  target='_new'",
                        "When you're in a tough industrial environment and need to block noise, Bilsom's Leightning series' steel wire construction provides high performance and robust durability.",
                        100);
banners[2] = new banner("link-dispensers.jpg",
                        "../product-dispensers/ear-plugs-dispensers.html#250220 target='_self'",
                        "Easy-to-use dispenser allows safety managers to buy in bulk to eliminate unnecessary packaging, lower costs and reduce trash in the workplace.",
                        100);
banners[3] = new banner("link-bags.jpg",
                        "../fall-protection/utility-bags.html target='_blank'",
                        "Soft Pouch Utility Bag - has a drawstring closure and is great for prescription safety glasses, water bottles, ear plugs, etc.",
                        100);
banners[4] = new banner("link-radio.jpg",
                        "earplugs04.html#1010375 target='_blank'",
                        "Add music and routine jobs become more satisfying. The Bilsom Radio earmuff provides superior AM/FM sound, while its lightweight design and unique headband provide superb comfort for all-day wear.",
                        100);
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("<A HREF=" + banners[i].url + "><IMG SRC='" + banners[i].img_source + "' WIDTH=96 HEIGHT=186 BORDER=0 ALT='" + banners[i].alt + "'></A>");
         return banners[i];
         break;
      }
   }
}
//-->

