function loadNext() {
	//get rotating elements
	var myElement = document.getElementById('rx_fella_accessory');
	var myQuote = document.getElementById('quote');

	//declare image paths and arrays	
	var thePath 		= "/images/rx_fella/";
	var theImages 		= new Array();
	theImages[0] 		= "rx_fella_chippendale.png";
	theImages[1] 		= "rx_fella_eyepatch.png";
	theImages[2] 		= "rx_fella_fannypack.png";
	theImages[3] 		= "rx_fella_goatee.png";
	theImages[4] 		= "rx_fella_pipe-monocle.png";
	theImages[5] 		= "rx_fella_sash.png";
	theImages[6] 		= "rx_fella_sombrero.png";
	theImages[7] 		= "rx_fella.png";
	
	//declare quote texts and authors
	var theQuoteText 	= new Array();
	var theQuoteAuthor 	= new Array();
	theQuoteText[0] 	= "I was once a <strong>spineless craven</strong>, but now I am a <strong>Randian Titan</strong> in a world<br />of pathetic man-dwarves. Thanks, Suck It Up&trade;!";
	theQuoteAuthor[0] 	= "S. L. Gere, Esq.";
	theQuoteText[1] 	= "Thanks to Suck It Up&trade;, a <strong>fresh razor</strong>, and the generous application of <strong>shaving cream</strong>, I have discovered that <strong>bald truly is beautiful</strong>.";
	theQuoteAuthor[1] 	= "Mr. M.D.H., Philologist";
	theQuoteText[2] 	= "A <strong>chronic lack of social interaction</strong> had me down, but with Suck It Up&trade;, I discovered the <strong>pleasures of virtual friends</strong>. Thanks, Suck It Up&trade;!";
	theQuoteAuthor[2] 	= "Mr. C.M.G., Philadelphian";
	theQuoteText[3] 	= "I was once <strong>intolerant</strong> of others, but Suck It Up&trade; lead me to <strong>eschew solipsism</strong>.  I love my fellow man now!";
	theQuoteAuthor[3] 	= "Mr. F.R.Z., Philosopher";
	theQuoteText[4] 	= "Always the bridesmaid, <strong>never the bride</strong>. With regular use of Suck It Up&trade;, I&rsquo;m coming to <strong>appreciate being a bridesmaid</strong>!";
	theQuoteAuthor[4] 	= "Ms. A.M.L., Philhellene";
	theQuoteText[5] 	= "My stool is now <strong>firm and perfectly-formed</strong>. A happy circumstance which I attribute to Suck It Up&trade; and my raw oat diet.";
	theQuoteAuthor[5] 	= "Mr. P.H., Philanderer";
	theQuoteText[6] 	= "<strong>Late nights on the trail</strong>, camped under the stars with the dogies aslumber and <strong>my guitar for a wife</strong>, I appreciate Suck It Up&trade; more than ever.";
	theQuoteAuthor[6] 	= "Mr. F.W., Cowboy";
	theQuoteText[7] 	= "Since sucking it up, I&rsquo;ve begun to lead a more <strong>outgoing, romantic life</strong>. Suck It Up&trade; is my placebo of choice for self-confidently going a-wooing.";
	theQuoteAuthor[7] 	= "Mr. A.M., Philatelist";
	
	//get current cookie value
	var currentIndex = parseInt(getCookie());
	var imgPath = thePath + theImages[currentIndex];
	var theFullQuote = '<p>' + theQuoteText[currentIndex] + '</p>' + '<cite>' + theQuoteAuthor[currentIndex] + '</cite>';
	
	//update source of elements
	myElement.src = imgPath;
	myQuote.innerHTML = theFullQuote;
	
	//set next cookie index
	currentIndex += 1;
	if(currentIndex > (theImages.length - 1)) {
		currentIndex = 0;
	}
	setCookie(currentIndex);
}

function setCookie(someint) {
	var now = new Date();
	var addDays = now.getDate() + 7
	now.setDate(addDays); // cookie expires in 7 days
	var theString = 'cookieID=' + escape(someint) + ';expires=' + now.toUTCString();
	document.cookie = theString;
}

function getCookie() {
	var output = "0";
	if(document.cookie.length > 0) {
		var temp = unescape(document.cookie);
		temp = temp.split(';');
		for(var i = 0; i < temp.length; i++) {
			if(temp[i].indexOf('cookieID') != -1) {
				temp = temp[i].split('=');
				output = temp.pop();
				break;
			}
		}
	}
	return output;
}

addLoadEvent(loadNext);