var numSpots = 1; // Number of promo spots you want
var howMany = 6; // max number of items listed below
var feature = new Array(howMany+1);
var used = new Array(); // an array of used numbers
// these are the features.
// if you add or subtract a feature, update howMany above




feature[0]="<img src=\"images/aurora.jpg\">";
feature[1]="<img src=\"images/geese.jpg\">";
feature[2]="<img src=\"images/lighthouse.jpg\">";
feature[3]="<img src=\"images/puckett.jpg\">";
feature[4]="<img src=\"images/church.jpg\">";
feature[5]="<img src=\"images/weismann.jpg\">";





var s = String();
var i = numSpots;
var j = 0;
used[0] = 0;
// this function generates a random number
function makeRandom() {

var randPromo = parseInt(Math.random()*(howMany+1));

		return randPromo 
				   		}
// a sanity check to avoid trying to fill
// fewer spots than there are unique features available
if (numSpots < feature.length ) {
// this is the outer loop. it is 
// executed numSpots times
for (d = numSpots; d > 0; d--) {
// generate a random number

// this is the inner loop. It is
// executed for the length of the array
	while (i > 0) 
	{
// cat the random number to a string
	var randPromo = makeRandom() ;
	if (s.indexOf(randPromo) == -1) 	{
		if ( feature[randPromo] != null) 	{
			s = s + randPromo + ' , ' ;
			document.write(feature[randPromo] , '<br>');
			j++
			i--;
										}
	          	}
// end the inner loop					
	}


// end the outer loop
							}
	}	

