window.onload = choosePic;

var adImages = new Array("/Deptsite/img/banner12.gif","/Deptsite/img/banner_01.gif", "/Deptsite/img/banner_12.gif","/Deptsite/img/2006-12-26.gif","/Deptsite/img/banner_11.gif","/Deptsite/img/Ren_lab_trio.gif","/Deptsite/img/nano_science.gif", "/Deptsite/img/banner_09.gif","/Deptsite/img/banner_14.gif","/Deptsite/img/banner_04.gif","/Deptsite/img/index_nano.gif","/Deptsite/img/banner_10.gif","/Deptsite/img/banner_05.gif","/Deptsite/img/Physics_team_small.gif","/Deptsite/img/banner_06.gif");

function rotate() {
	thisAd++;
	if (thisAd == adImages.length) {
		thisAd = 0;
	}
	document.getElementById("adBanner").src = adImages[thisAd];

	setTimeout("rotate()", 3 * 1000);
}


function choosePic() {
	thisAd = Math.floor((Math.random() * adImages.length));
	document.getElementById("adBanner").src = adImages[thisAd];
	
	rotate();
}



