esslic 0 Newbie Poster

Hi everyone

I need to have rotating banners on my under-development websites with the conditions:


  • All types should be displayed i.e. JPG, SWF, GIFs etc

  • On refreshing the page a new banner should load.

  • Banners should load with a random start

I have got the script but it can only display banners for a fixed amount of time (All types). I want to make sure it loads banners randomly as well but dont know how to do it.

The script takes banner as an object. How could it be possible to make sure it can take up random objects using JavaScript?


The code on the page is this:

<script language="javascript">
                    banner1 = new Banner('banner1');
                    banner1.add("IMAGE", "espebanner/thunder.jpg", 1, 60, 468,"");
                    banner1.add("IMAGE", "espebanner/esp.jpg", 1, 60, 468,"espebanner.html");
                    banner1.add("FLASH", "espebanner/fun.swf", 1, 60, 468,"espebanner.html");
 
                   document.write(banner1);
		   banner1.start();

Thanx