// This JavaScript will load a random DillonQuote on pageload into an Element with id "quoteHolder"
Event.observe(window, 'load', choosePic, false);

// Enter the path of the images to be displayed below.
var quoteImg = new Array("/image/stickyQuotes/im_from_no_hood.jpg", "/image/stickyQuotes/discover_your_passion2.jpg", "/image/stickyQuotes/sedition_acts.jpg", "/image/stickyQuotes/through_oceans.jpg", "/image/stickyQuotes/zooming.jpg");

/*
function rotate() {
	thisQuote++;
	if (thisQuote == quoteImg.length) {
		thisQuote = 0;	
	}
	
	document.getElementById("quoteHolder").src = quoteImg[thisQuote];
	
	setTimeout("rotate()", 3 * 1000);
}
*/

function choosePic()
{
	// Implement the below code and remove randomNum line to implement timed 		    // rotation of images
	//
	// thisQuote = Math.floor((Math.random() * quoteImg.length));
	randomNum = Math.floor((Math.random() * quoteImg.length));
	var quoteHolderElement	= $("quoteHolder");
	if(quoteHolderElement)
		quoteHolderElement.src = quoteImg[randomNum];
}
