function banner(imgSource,url,alt,chance){this.imgSource=imgSource;this.url=url;this.alt=alt;this.chance=chance;}
function dispBanner(){with(this)document.write("<A HREF="+url+"><IMG SRC='"+imgSource+"' width=204 height=130 BORDER=0 ALT='"+alt+"'></A>");}
banner.prototype.dispBanner=dispBanner;banners=new Array();banners[0]=new banner("../img/01_venues/sc_noslice.jpg","staples_center.html","STAPLES Center",50);banners[1]=new banner("../img/01_venues/caesar_noslice.jpg","colosseum.html","The Colosseum",50);sum_of_all_chances=0;for(i=0;i<banners.length;i++){sum_of_all_chances+=banners[i].chance;}
function dispBanner2(){with(this)document.write("<A HREF="+url+"><IMG SRC='"+imgSource+"' width=204 height=130 BORDER=0 ALT='"+alt+"'></A>");}
banner.prototype.dispBanner=dispBanner2;banners2=new Array();banners2[0]=new banner("../img/01_venues/hdc_noslice.jpg","homedepot.html","The Home Depot Center",50);banners2[1]=new banner("../img/01_venues/adt_noslice.jpg","homedepot.html","ADT Event Center",50);sum_of_all_chances=0;for(i=0;i<banners2.length;i++){sum_of_all_chances+=banners2[i].chance;}
function dispBanner3(){<!--Lists the bottom images to be displayed-->with(this)document.write("<A HREF="+url+"><IMG SRC='"+imgSource+"' width=204 height=130 BORDER=0 ALT='"+alt+"'></A>");}
banner.prototype.dispBanner=dispBanner3;banners3=new Array();banners3[0]=new banner("../img/01_venues/wamu_noslice.jpg","wamu_theater.html","WaMu Theater",50);banners3[1]=new banner("../img/01_venues/gp_noslice.jpg","nokia_theatre.html","Nokia Theatre - Grand Prairie",50);sum_of_all_chances=0;for(i=0;i<banners3.length;i++){sum_of_all_chances+=banners3[i].chance;}<!--Randomizes the top image-->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("<A HREF="+banners[i].url+"><IMG SRC='"+banners[i].imgSource+"'border=0'"+banners[i].alt+"'></A>");return banners[i];break;}}}<!--Randomizes the middle image-->function randomBanner2()
{chance_limit=0;randomly_selected_chance=Math.round((sum_of_all_chances-1)*Math.random())+1;for(i=0;i<banners2.length;i++)
{chance_limit+=banners2[i].chance;if(randomly_selected_chance<=chance_limit)
{document.write("<A HREF="+banners2[i].url+"><IMG SRC='"+banners2[i].imgSource+"'border=0'"+banners2[i].alt+"'></A>");return banners2[i];break;}}}<!--Randomizes the bottom image-->function randomBanner3()
{chance_limit=0;randomly_selected_chance=Math.round((sum_of_all_chances-1)*Math.random())+1;for(i=0;i<banners3.length;i++)
{chance_limit+=banners3[i].chance;if(randomly_selected_chance<=chance_limit){document.write("<A HREF="+banners3[i].url+"><IMG SRC='"+banners3[i].imgSource+"'border=0'"+banners3[i].alt+"'></A>");return banners3[i];break;}}}}
