// Part 1: Number of rotating banners
// don't set count equal to 1
var count = 5;

// Part 2: Create variable x and y for use in chooing image from array
var x = Math.ceil(Math.random() * count);
var y = Math.ceil(Math.random() * count);

// Part 3: checkNumber function: Logic to make sure that the value of x is never y
if (count == 1) {
	y = 0;
} else {
	while (x == y) { var y = Math.ceil(Math.random() * count); }
}

// Part 4: Banner possibilities - upper right - large image
function random_banner() {
// create array of banners
var banners = new Array(count);
// populate banners array with output
	
banners[0] = '<img src="images/rotated-img1.jpg" width="549" height="280" border="0" />';
banners[1] = '<img src="images/rotated-img2.jpg" width="549" height="280" border="0" />';
banners[2] = '<img src="images/rotated-img3.jpg" width="549" height="280" border="0" />';
banners[3] = '<img src="images/rotated-img4.jpg" width="549" height="280" border="0" />';
banners[4] = '<img src="images/rotated-img5.jpg" width="549" height="280" border="0" />';

return banners[x-1];
}

