// JavaScript Document

/*
function init() {
	var movies = [	["Duke Blues", "Jarvis (2005)",								"url(images/banner/jarvis.jpg)", 	"movies/movies05/jarvis.html"],
					["Wake Up", "Gilbert-Addoms (2005)", 						"url(images/banner/ga.jpg)", 		"movies/movies05/ga.html"],
					["Murder for Breakfast, Duke for Lunch", "Alspaugh (2005)", "url(images/banner/alspaugh.jpg)", 	"movies/movies05/alspaugh.html"],
					["Locked Out", "Aycock (2005)", 							"url(images/banner/aycock.jpg)", 	"movies/movies05/aycock.html"],
					["Punk'd!", "Bassett (2005)", 								"url(images/banner/bassett.jpg)", 	"movies/movies05/bassett.html"],
					["Froshlife: A True Hollywood Story", "Blackwell (2005)", 	"url(images/banner/blackwell.jpg)", "movies/movies05/blackwell.html"],
					["Boy Meets Girl at Duke", "Brown (2005)", 					"url(images/banner/brown.jpg)", 	"movies/movies05/brown.html"],
					["Wonderstruck", "Pegram (2005)", 							"url(images/banner/pegram.jpg)", 	"movies/movies05/pegram.html"],
					["Boiling Points", "Wilson (2005)", 						"url(images/banner/wilson.jpg)", 	"movies/movies05/wilson.html"]
				];
*/

/*
function init() {
	var movies = [	["From Move-in to Madden", "Aycock (2006)", 						"url(images/06/aycock.jpg)", 			"/froshlife/movies/movies06/06_AycockHi-Res_ref.mov"],
					["College Kids", "Bell Tower (2006)", 								"url(images/06/bell_tower.jpg)", 		"/froshlife/movies/movies06/06_BellTowerHi-Res_ref.mov"],
					["Our Shining Star: A Tribute to Bob Scmick", "Blackwell (2006)", 	"url(images/06/blackwell.jpg)", 		"/froshlife/movies/movies06/06_BlackwellHi-Res_ref.mov"],
					["Brown Baggin' It", "Brown (2006)", 								"url(images/06/brown.jpg)", 			"/froshlife/movies/movies06/06_BrownHi-Res_ref.mov"],
					["Only the Beginning", "Gilbert - Addoms (2006)", 					"url(images/06/ga.jpg)", 				"/froshlife/movies/movies06/06_GAHi-Res_ref.mov"],
					["Ballaholics Anonymous", "Giles (2006)", 							"url(images/06/giles.jpg)", 			"/froshlife/movies/movies06/06_GilesHi-Res_ref.mov"],
					["Wheels on the Bus", "Jarvis (2006)", 								"url(images/06/jarvis.jpg)", 			"/froshlife/movies/movies06/06_JarvisHi-Res_ref.mov"],
					["Finding Home", "Pegram (2006)", 									"url(images/06/pegram.jpg)", 			"/froshlife/movies/movies06/06_PegramHi-Res_ref.mov"],
					["Froshin at it...Carefully", "Randolph (2006)", 					"url(images/06/randolph.jpg)", 			"/froshlife/movies/movies06/06_RandolphHi-Res_ref.mov"], 
					["12", "Southgate (2006)", 											"url(images/06/southgate.jpg)", 		"/froshlife/movies/movies06/06_SouthgateHi-Res_ref.mov"],
					["My Only One", "Wilson (2006)", 									"url(images/06/wilson.jpg)", 			"/froshlife/movies/movies06/06_WilsonHi-Res_ref.mov"],
				];
*/
/*function init() {		
	var movies = [	["Citizen K", "Alspaugh (2007)", 								"url(images/07stills/Alspaugh.png)",	 	"movies/movies07/Alspaugh_ref.mov"],
					["Lift Your Head Up", "Aycock (2007)", 							"url(images/07stills/Aycock.png)", 			"movies/movies07/Aycock_ref.mov"],
					["Oh, 10", "Blackwell (2007)", 									"url(images/07stills/Blackwell.png)", 		"movies/movies07/Blackwell_ref.mov"],
					["It Goes Around and Comes Around", "Brown (2007)",				"url(images/07stills/Brown.png)", 			"movies/movies07/Brown_ref.mov"],
					["Clue", "Epworth (2007)", 										"url(images/07stills/Epworth.png)",	 		"movies/movies07/Epworth_ref.mov"],
					["Riding Darkness", "Gilbert-Addoms (2007)", 					"url(images/07stills/GA.png)", 				"movies/movies07/GilbertAddoms_ref.mov"],
					["The Marketplace: A Documentary", "Giles (2007)", 				"url(images/07stills/Giles.png)", 			"movies/movies07/Giles_ref.mov"],
					["Frosh Noir", "Pegram (2007)", 								"url(images/07stills/Pegram.png)", 			"movies/movies07/Pegram_ref.mov"],
					["PROspective Lessons", "Randolph (2007)",						"url(images/07stills/Randolph.png)", 		"movies/movies07/Randolph_ref.mov"],
					["The Making of a Froshlife Movie", "Southgate (2007)", 		"url(images/07stills/Southgate.png)",	 	"movies/movies07/Southgate_ref.mov"],
					["Fresh Beans", "Wilson (2007)", 								"url(images/07stills/Wilson.png)",		 	"movies/movies07/Wilson_ref.mov"],
						
				];*/
	
/*function init() {		
	var movies = [	["Stage Five", "Alspaugh (2008)", 								"url(images/08/stills/alspaugh.png)",	 	"movies/movies08/Alspaugh_ref.mov"],
					["Duke Forrest", "Aycock (2008)", 								"url(images/08/stills/aycock.png)",	 		"movies/movies08/Aycock_ref.mov"],
					["Meeting Girls", "Blackwell (2008)", 							"url(images/08/stills/blackwell.png)",	 	"movies/movies08/Blackwell_ref.mov"],
					["Duke Life", "Brown (2008)", 									"url(images/08/stills/brown.png)",		 	"movies/movies08/Brown_ref.mov"],
					["Second Impressions", "Gilbert-Addoms (2008)", 				"url(images/08/stills/gilbertaddoms.png)", 	"movies/movies08/Gilbert-Addoms_ref.mov"],
					["Impressionism", "Pegram (2008)", 								"url(images/08/stills/pegram.png)",		 	"movies/movies08/pegram_ref.mov"],
					["Untitled", "Randolph (2008)", 								"url(images/08/stills/randolph.png)",	 	"movies/movies08/Randolph_ref.mov"],
					["The Legend of Pat Hamburger", "Southgate (2008)", 			"url(images/08/stills/southgate.png)",	 	"movies/movies08/Southgate_ref.mov"],
					["Making the Grade", "Wilson (2008)", 							"url(images/08/stills/wilson.png)",	 	"movies/movies08/Wilson_ref.mov"],
						
				];	
	*/
	
	
function init() {		
	var movies = [	["This is Crazie", "Aycock (2009)",								"url(images/09stills/thumbs/aycock2.png)",	 	"movies_09.html?0"],
					["Common Room", "Wilson (2009)",								"url(images/09stills/thumbs/Wilson.png)",	 	"movies_09.html?1"],
					["Take Five", "Giles (2009)",									"url(images/09stills/thumbs/Giles.png)",	 	"movies_09.html?2"],
					["Roommate Wars", "Bassett (2009)",								"url(images/09stills/thumbs/bassett.png)",	 	"movies_09.html?3"],
					["Awkward Bound", "Gilbert-Addoms (2009)",						"url(images/09stills/thumbs/GA.png)",	 		"movies_09.html?4"],
					["The Race", "Pegram (2009)",									"url(images/09stills/thumbs/Pegram.png)",	 	"movies_09.html?5"],
					["I'm a Duke Student", "Alspaugh (2009)",						"url(images/09stills/thumbs/alspaugh.png)",		"movies_09.html?6"],
					["A Shared Experience", "Southgate (2009)",						"url(images/09stills/thumbs/southgate.jpg)",	"movies_09.html?7"],
					["Barely Perfect", "Brown (2009)",								"url(images/09stills/thumbs/brown.png)",	 	"movies_09.html?8"],
					
						
				];		
	
	for (var i = 1; i <= 3; i++) {
		var movie = Math.floor(Math.random() * movies.length);
		var slot = document.getElementById("movie" + i);
		
		slot.childNodes[1].childNodes[0].childNodes[0].data = movies[movie][0];
		slot.childNodes[1].childNodes[1].childNodes[0].data = movies[movie][1];
		slot.style.backgroundImage = movies[movie][2];
		slot.href = movies[movie][3];
		
		movies.splice(movie, 1);
	}
}