//javascript that will randomly display a picture and text about a topic


	//***define the number of topics you have starting at 1; this should be one more than the highest number in the definition area
	numBanners = 5

	//define the arrays
	bannerWeight = new Array(numBanners)
	bannerComplete = new Array(numBanners)

	//define the information to rotate
	//***you can give them whatever weights you want, they are relative to each other.  
	//***Using smaller numbers may speed up the script.
	//***Be sure to change each page number, and order them sequentially.
	//***copy and delete these groups as needed.


	
	//Indianapolis
	bannerNumber = 0
	bannerWeight[bannerNumber] = 10
	bannerComplete[bannerNumber] = '<img src = "http://www.tourneytravel.com/pictures/rcadome.jpg" align="left">'
	bannerComplete[bannerNumber] += 'Lucas Oil Stadium in Indianapolis will host the 2009 Midwest Regional! Click '
	bannerComplete[bannerNumber] += '<a href = "http://www.travelnow.com/hotels/hotels.jsp?cid=73276&city=indianapolis&state=in&country=USA" target = blank>here</a href>'
	bannerComplete[bannerNumber] += ' to book a hotel in Indy!!'


	
	//Nashville
	bannerNumber = 1
	bannerWeight[bannerNumber] = 0
	bannerComplete[bannerNumber] = '<img src = "http://www.tourneytravel.com/pictures/gaylord.jpg" align="left">'
	bannerComplete[bannerNumber] += 'Nashville\'s Gaylord Entertainment Center will host the first and second rounds of the 2005 NCAA Tournament! Click '
	bannerComplete[bannerNumber] += '<a href = "http://www.travelnow.com/hotels/hotels.jsp?cid=73276&city=nashville&state=tn&country=USA" target = blank>here</a href>'
	bannerComplete[bannerNumber] += ' to book a hotel in Nashville!!'


	
	//Atlanta
	bannerNumber = 2
	bannerWeight[bannerNumber] = 0
	bannerComplete[bannerNumber] = '<img src = "http://www.tourneytravel.com/pictures/gadome.jpg" align="left">'
	bannerComplete[bannerNumber] += 'The Georgia Dome will host the 2007 Final Four! Click '
	bannerComplete[bannerNumber] += '<a href = "http://www.travelnow.com/hotels/hotels.jsp?cid=73276&city=Atlanta&state=GA&country=USA" target = blank>here</a href>'
	bannerComplete[bannerNumber] += ' to book a hotel in Atlanta!!'


	
	//Orlando
	bannerNumber = 3
	bannerWeight[bannerNumber] = 0
	bannerComplete[bannerNumber] = '<img src = "http://www.tourneytravel.com/pictures/tdwaterhouse.jpg" align="left">'
	bannerComplete[bannerNumber] += 'Orlando\'s TD Waterhouse Center will host the first and second rounds of the 2005 NCAA Tournament! Click '
	bannerComplete[bannerNumber] += '<a href = "http://www.travelnow.com/hotels/hotels.jsp?cid=73276&city=Orlando&state=FL&country=USA" target = blank>here</a href>'
	bannerComplete[bannerNumber] += ' to book a hotel in Orlando!!'


	//New Orlean s
	bannerNumber = 4
	bannerWeight[bannerNumber] = 0
	bannerComplete[bannerNumber] = '<img src = "http://www.tourneytravel.com/pictures/noarena.jpg" align="left">'
	bannerComplete[bannerNumber] += 'New Orleans Arena will host the 2007 NCAA Tournament! Click '
	bannerComplete[bannerNumber] += '<a href = "http://www.travelnow.com/hotels/hotels.jsp?cid=73276&city=new+orleans&state=la&country=USA" target = blank>here</a href>'
	bannerComplete[bannerNumber] += ' to book a hotel in New Orleans!!'




	//pick banner
	//add up total weights
	totalWeight = 0
	for (var i = 0; i<numBanners; i++) {
		totalWeight = totalWeight + bannerWeight[i]
	} // for loop ends

	//pick random number for banner
	bannerID = Math.round(Math.random() * (totalWeight - 1))

	//find proper banner
	//this portion of code goes through each banner and adds up the weights as it goes.
	//Once the tempWeight becomes larger than the random number chosen (bannerID), we have a match.
	tempWeight = 0
	for (var i = 0; i<numBanners; i++) {
		tempWeight = tempWeight + bannerWeight[i]
		if (bannerID < tempWeight) {
			bannerID = i
			break
		}  //end if
	} // for loop ends



	//display banner
	document.write(bannerComplete[bannerID])
	




