var timerID = 0;


var featuredproducts = new Array();
featuredproducts[0]='\/Flash\/acg2.swf';
featuredproducts[1]='\/Flash\/sci.swf';
featuredproducts[2]='\/Flash\/megafortris.swf';
featuredproducts[3]='\/Flash\/snp-banner.swf';
featuredproducts[4]='\/Flash\/avcreative.swf';
featuredproducts[5]='\/Flash\/gunnebo.png';


var bgcolor=new Array;
bgcolor[0]='#E8E8E8';
bgcolor[1]='#ffffff';
bgcolor[2]='#ffffff';
bgcolor[3]='#ffffff';
bgcolor[4]='#ffffff';

rnd.today=new Date();
rnd.seed=rnd.today.getTime();

function rnd() {
        rnd.seed = (rnd.seed*9301+49297) % 233280;
        return rnd.seed/(233280.0);
};

function rand(number) {
        return Math.ceil(rnd()*number);
};

function bnrRtr() {
   var updatedcode;
   var featLen = featuredproducts.length;
   var count = -1;
   while (count < 0 || count > featLen ) {
   		count = Math.floor (Math.random()*(featLen));
   }

   if(timerID) {
      clearTimeout(timerID);
   }
   if (count >= 5) {
		updatedcode = '<img src=\"'
		updatedcode += featuredproducts[count];
		updatedcode += '\" alt=\"ASIS Australia Platinum Sponsors\" \/>';

	} else {

	 updatedcode = '<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=6,0,0,0\" width=\"425\" height=\"109\" id=\"featuredproduct\" ><param name=\"movie\" value=\"'
	 updatedcode += featuredproducts[count];
	 updatedcode += '\" \/> <param name=\"quality\" value=\"high\" \/> <param name=bgcolor value=\"' + bgcolor[count] + '\" \/> <embed src=\"'
	 updatedcode += featuredproducts[count];
	 updatedcode += '\" quality=high bgcolor=' + bgcolor[count] + '  width=\"425\" height=\"109\" name=\"featuredproduct\" type=\"application\/x-shockwave-flash\" pluginspage=\"http:\/\/www.macromedia.com\/go\/getflashplayer\"><\/embed><\/object>'
	}

 if (document.getElementById) {
	document.getElementById("barea").innerHTML = updatedcode;
	document.getElementById("barea").style.backgroundColor = bgcolor[count];
 } else {
  document.barea2.document.open();
  document.barea2.document.write(updatedcode);
  document.barea2.bgColor = bgcolor[count];
  document.barea2.document.close();
 }

 timerID=setTimeout ("bnrRtr()", 13000);


}
