// JavaScript Document

function ajaxFunction() {
	var xmlhttp;
	
	if (window.XMLHttpRequest) {
		// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	} else if (window.ActiveXObject) {
		// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	} else {
		alert("Your browser does not support XMLHTTP!");
	}
	
	xmlhttp.onreadystatechange=function() {
		if(xmlhttp.readyState==4) {
			//document.quiz.test.value=xmlhttp.responseText;
			showResults(document.quiz.quizid.value);
		}
	}
	
	/* for testing: */	
	//var url="http://qa.sho.com/site/universityofandy/qz.do?quizid=" + document.quiz.quizid.value + "&userid=" + document.quiz.userid.value + "&score=" + getQuizGrade(document.quiz.quizid.value);
	var url="http://www.universityofandy.com/site/universityofandy/qz.do?quizid=" + document.quiz.quizid.value + "&score=" + getQuizGrade(document.quiz.quizid.value);
	
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
}


function populateQuiz(courseid, questionid) {
	if (!$('quiz_instructions').visible()) {
		$('quiz_instructions').show();
	}
	
	if ($('quiz_result').visible()) {
		$('quiz_result').hide();
	}

	if (questionid == 1) {
		$('takequiz').hide();
		
		$('question1').innerHTML = '<p class="question">' + quizzes[courseid].question1.question + '</p>';
		$('question1').innerHTML += '<p><input type="radio" name="question1" Value="A">&nbsp;' + quizzes[courseid].question1.choiceA + '</p>';
		$('question1').innerHTML += '<p><input type="radio" name="question1" Value="B">&nbsp;' + quizzes[courseid].question1.choiceB + '</p>';

		if (quizzes[courseid].question1.numberAnswers > 2) {
			$('question1').innerHTML += '<p><input type="radio" name="question1" Value="C">&nbsp;' + quizzes[courseid].question1.choiceC + '</p>';
		}
		if (quizzes[courseid].question1.numberAnswers > 3) {		
			$('question1').innerHTML += '<p><input type="radio" name="question1" Value="D">&nbsp;' + quizzes[courseid].question1.choiceD + '</p>';
		}
		
		$('question1').innerHTML += '<p class="nextquestion"><a href="javascript:populateQuiz('+ courseid +','+ (questionid+1) +');" onclick="OmniHelp.tc(\'question' + questionid + '\');">Next Question</a><img src="/site/universityofandy/image-panel/red-arrow.png" border="0" /></p>';
		
		$('question1').show();		
	}
	
	if (questionid == 2) {
		
		$('question1').hide();
		
		$('question2').innerHTML = '<p class="question">' + quizzes[courseid].question2.question + '</p>';
		$('question2').innerHTML += '<p><input type="radio" name="question2" Value="A">&nbsp;' + quizzes[courseid].question2.choiceA + '</p>';
		$('question2').innerHTML += '<p><input type="radio" name="question2" Value="B">&nbsp;' + quizzes[courseid].question2.choiceB + '</p>';
		
		if (quizzes[courseid].question2.numberAnswers > 2) {
			$('question2').innerHTML += '<p><input type="radio" name="question2" Value="C">&nbsp;' + quizzes[courseid].question2.choiceC + '</p>';
		}
		if (quizzes[courseid].question2.numberAnswers > 3) {		
			$('question2').innerHTML += '<p><input type="radio" name="question2" Value="D">&nbsp;' + quizzes[courseid].question2.choiceD + '</p>';
		}		
		
		$('question2').innerHTML += '<p class="nextquestion"><a href="javascript:populateQuiz('+ courseid +','+ (questionid+1) +');" onclick="OmniHelp.tc(\'question' + questionid + '\');">Next Question</a><img src="/site/universityofandy/image-panel/red-arrow.png" border="0" /></p>';
		
		$('question2').show();
	}
	
	if (questionid == 3) {
		$('question2').hide();
		
		$('question3').innerHTML = '<p class="question">' + quizzes[courseid].question3.question + '</p>';
		$('question3').innerHTML += '<p><input type="radio" name="question3" Value="A">&nbsp;' + quizzes[courseid].question3.choiceA + '</p>';
		$('question3').innerHTML += '<p><input type="radio" name="question3" Value="B">&nbsp;' + quizzes[courseid].question3.choiceB + '</p>';

		if (quizzes[courseid].question3.numberAnswers > 2) {
			$('question3').innerHTML += '<p><input type="radio" name="question3" Value="C">&nbsp;' + quizzes[courseid].question3.choiceC + '</p>';
		}
		if (quizzes[courseid].question3.numberAnswers > 3) {		
			$('question3').innerHTML += '<p><input type="radio" name="question3" Value="D">&nbsp;' + quizzes[courseid].question3.choiceD + '</p>';
		}		

		$('question3').innerHTML += '<p class="nextquestion"><a href="javascript:populateQuiz('+ courseid +','+ (questionid+1) +');" onclick="OmniHelp.tc(\'question' + questionid + '\');">Next Question</a><img src="/site/universityofandy/image-panel/red-arrow.png" border="0" /></p>';
		
		$('question3').show();
	}
	
	if (questionid == 4) {
		$('question3').hide();

		$('question4').innerHTML = '<p class="question">' + quizzes[courseid].question4.question + '</p>';

		$('question4').innerHTML += '<p><input type="radio" name="question4" Value="A">&nbsp;' + quizzes[courseid].question4.choiceA + '</p>';
		$('question4').innerHTML += '<p><input type="radio" name="question4" Value="B">&nbsp;' + quizzes[courseid].question4.choiceB + '</p>';

		if (quizzes[courseid].question4.numberAnswers > 2) {
			$('question4').innerHTML += '<p><input type="radio" name="question4" Value="C">&nbsp;' + quizzes[courseid].question4.choiceC + '</p>';
		}
		if (quizzes[courseid].question4.numberAnswers > 3) {
			$('question4').innerHTML += '<p><input type="radio" name="question4" Value="D">&nbsp;' + quizzes[courseid].question4.choiceD + '</p>';
		}				
		
		$('question4').innerHTML += '<p class="nextquestion"><a href="javascript:populateQuiz('+ courseid +','+ (questionid+1) +');" onclick="OmniHelp.tc(\'question' + questionid + '\');">Next Question</a><img src="/site/universityofandy/image-panel/red-arrow.png" border="0" /></p>';
		
		$('question4').show();
	}
	
	if (questionid == "5") {
		$('question4').hide();

		$('question5').innerHTML = '<p class="question">' + quizzes[courseid].question5.question + '</p>';
		
		$('question5').innerHTML += '<p><input type="radio" name="question5" Value="A">&nbsp;' + quizzes[courseid].question5.choiceA + '</p>';
		$('question5').innerHTML += '<p><input type="radio" name="question5" Value="B">&nbsp;' + quizzes[courseid].question5.choiceB + '</p>';

		if (quizzes[courseid].question5.numberAnswers > 2) {
			$('question5').innerHTML += '<p><input type="radio" name="question5" Value="C">&nbsp;' + quizzes[courseid].question5.choiceC + '</p>';
		}
		if (quizzes[courseid].question5.numberAnswers > 3) {		
			$('question5').innerHTML += '<p><input type="radio" name="question5" Value="D">&nbsp;' + quizzes[courseid].question5.choiceD + '</p>';
		}				

		$('question5').innerHTML += '<p class="nextquestion"><a href="javascript:ajaxFunction();" onclick="OmniHelp.tc(\'question' + questionid + '\');">Grade My Quiz</a><img src="/site/universityofandy/image-panel/red-arrow.png" border="0" /></p>';		
		
		$('question5').show();
	}
}

function getQuizGrade(courseid) {
	
	var quizGrade = 0;
	
	// all correct answers for this particular quiz are choice "A" (0)
	if (document.quiz.question1[quizzes[courseid].question1.correctAnswer].checked) {
		quizGrade += 20;
	}
	if (document.quiz.question2[quizzes[courseid].question2.correctAnswer].checked) {
		quizGrade += 20;
	}
	if (document.quiz.question3[quizzes[courseid].question3.correctAnswer].checked) {
		quizGrade += 20;
	}
	if (document.quiz.question4[quizzes[courseid].question4.correctAnswer].checked) {
		quizGrade += 20;
	}
	if (document.quiz.question5[quizzes[courseid].question5.correctAnswer].checked) {
		quizGrade += 20;
	}				   
	
	return quizGrade;
}

/* Show Quiz results */
function showResults(courseid) {
	var courseName = '';
	
	$('question5').hide();	
	var quizGrade = getQuizGrade(courseid);
		
	if (quizGrade >= 60) {
		$('quiz_instructions').hide();
		
		$('quiz_result').innerHTML = '<img src="image-panel/headers/header_quizcongrats.png" border="0" /><br/>';
		$('quiz_result').innerHTML += '<div class="result_box">' + quizGrade/20 + '/5</div>';
		
		if (courseid == 1) {
			courseName = 'How to Survive a Bear Attack';
		} else if (courseid == 2) {
			courseName = 'How to Score with Foreign Girls';			
		} else if (courseid == 3) {
			courseName = 'How to Breakup with Someone';						
		} else if (courseid == 4) {
			courseName = 'How to Start a Band';
		} else if (courseid == 5) {
			courseName = 'How to Make $100 in a Week';									
		} else if (courseid == 6) {
			courseName = 'How to Tell if You\'re Dating a Crazy';						
		} else if (courseid == 7) {
			courseName = 'How to Manscape';			
		} else if (courseid == 8) {
			courseName = 'How to Deal with Bullies';			
		} else if (courseid == 9) {
			courseName = 'How to Satisfy a Woman';
		} else if (courseid == 10) {
			courseName = 'Holding Your Liquor';
		} else if (courseid == 11) {
			courseName = 'How to Internet Date';
		} else if (courseid == 12) {
			courseName = 'Surviving the Apocalypse';			
		} else if (courseid == 13) {
			courseName = 'The Perfect Thanksgiving';			
		} else if (courseid == 14) {
			courseName = 'Threesomes';			
		} else if (courseid == 15) {
			courseName = 'Christmukkah';			
		} else if (courseid == 16) {
			courseName = 'How to Survive the Cold';			
		} else if (courseid == 18) {
			courseName = 'Valentine\'s Day';
		} else if (courseid == 17) {		
			courseName = 'TV/VCR Repair';						
		} else if (courseid == 19) {
			courseName = 'Wilderness';			
		} else if (courseid == 20) {
			courseName = 'St Patrick\'s Day';			
		} else if (courseid == 21) {
			courseName = 'Time Travel';			
		} else if (courseid == 22) {
			courseName = 'Earth Day';			
		} else if (courseid == 23) {
			courseName = 'First Time';			
		} else {
			courseName = 'How to Survive a Bear Attack';
		}
			
		$('quiz_result').innerHTML += '<h1>on the POP QUIZ and passed the <br/>' + courseName + ' class!</h1>';

	} else {
		$('quiz_instructions').hide();		
		$('quiz_result').innerHTML = '<img src="image-panel/headers/header_quizfail.png" border="0" /><br/>';
		$('quiz_result').innerHTML += '<div class="result_box">' + quizGrade/20 + '/5</div>';
				
		$('quiz_result').innerHTML += '<a href="javascript:populateQuiz('+courseid+',1);" onmouseover="showOverState(\'tryagain\');" onmouseout="hideOverState(\'tryagain\');"><img src="image-panel/button_tryagain_off.gif" class="button" id="tryagain" border="0"/></a>';

	}
	
	$('quiz_result').show();
	$('quiz_facebook').show();
		
}

// QUIZ ITEM OBJECT:

function quizItem(quizNumber, questionNumber, numberAnswers, question, choiceA, choiceB, choiceC, choiceD, correctAnswer){
	this.quizNumber = quizNumber;
	this.questionNumber = questionNumber;
	this.numberAnswers = numberAnswers;
	this.question = question;	
	this.choiceA = choiceA;
	this.choiceB = choiceB;
	this.choiceC = choiceC;
	this.choiceD = choiceD;
	this.correctAnswer = correctAnswer;
}

function quizObject (quizId, question1, question2, question3, question4, question5) {
	this.quizId = quizId;
	this.question1 = question1;
	this.question2 = question2;
	this.question3 = question3;
	this.question4 = question4;
	this.question5 = question5;				
}

/*** Create Quiz Objects ***/

var quizzes = new Array();

/* Quiz 1 Questions - How to Survive a Bear Attack */
var quiz1_1 = new quizItem(1, 1, 2, "Is it true that bears never attack?", "Absolutely, cuddle with all bears.", "Unless it's a friend disguised as a bear, bears can be dangerous.", "", "", 1);
var quiz1_2 = new quizItem(1, 2, 4, "Know the enemy. Bears crap in", "The Dishwasher", "Nancy's bed", "The Urinal", "The Woods", 3);
var quiz1_3 = new quizItem(1, 3, 4, "Camping trip in bear country? Which of the following should be avoided?", "Shrooms ", "Tent full of Pop Tarts", "Stockpiling ripe tampons", "All of the above", 3);
var quiz1_4 = new quizItem(1, 4, 4, "Which of the following will actually allow you to survive a serious attack?", "Stand-up comedy", "Weapons", "Negotiation", "Lighting a joint", 1);
var quiz1_5 = new quizItem(1, 5, 4, "Killing the mother bear's cub is:", "The last resort", "Horrible", "An effective survival tactic", "All of the above", 3);

/* Quiz 2 Questions - How to Score with Foreign Girls */
var quiz2_1 = new quizItem(2, 1, 2, "Foreign languages are:", "Barriers", "Opportunities", "", "", 1);
var quiz2_2 = new quizItem(2, 2, 4, "Hairy tongues in your ear are a result of:", "Too many beers with Brits, Irish, Germans and the like", "Counting cards at the sasquatch casino", "Dating hippies", "Ignoring Canadian girls", 0);
var quiz2_3 = new quizItem(2, 3, 4, "Which is not a good place to score quality foreign girls?", "WaterWORLD", "Museums", "Beaches", "Youth hostels", 0);
var quiz2_4 = new quizItem(2, 4, 4, "Which of the following is most pertinent to scoring with foreign chicks:", "Tight disco moves", "Understanding the secret of BBQ", "Matching the right drinks", "Firm grasp of sign language", 2);
var quiz2_5 = new quizItem(2, 5, 4, "Say you're from Michigan. Which of the following is not a foreigner?", "Ann from Austria", "Tanya from Tunisia", "Lenny from Detroit", "Ilene from Israel", 2);

/* Quiz 3 Questions - How to Breakup with Someone */
var quiz3_1 = new quizItem(3, 1, 4, "Uncle Andy's patented approach to breaking up:", "Fade to black", "Slash and burn", "The Band-Aid", "Cheat", 0);
var quiz3_2 = new quizItem(3, 2, 2, "Going the guillotine route? Your model should be:", "Laser guided missile", "Mushroom cloud nuke", "", "", 0);
var quiz3_3 = new quizItem(3, 3, 3, "Think your future ex might go stalker?", "Take the slow approach", "Break up with a vague text message", "Thanksgiving surprise: go cold turkey", "", 0);
var quiz3_4 = new quizItem(3, 4, 2, "Post breakup sex:", "Never worth it", "Never bad", "", "", 1);
var quiz3_5 = new quizItem(3, 5, 2, "Hot friends? Want to make an exchange?", "Rip the tags off and throw away the receipt", "Handle with care; be good to the goods", "", "", 1);

/* Quiz 4 Questions - How to Start a Band */
var quiz4_1 = new quizItem(4, 1, 2, "Rock gods get laid.", "True", "False", "", "", 0);
var quiz4_2 = new quizItem(4, 2, 4, "You can suck and still:", "attract emo chicks", "breathe through your nose", "sound awesome if cranked loud enough", "dance if you want to", 2);
var quiz4_3 = new quizItem(4, 3, 4, "In this class, Andy is:", "in his underwear", "riding a horse", "strangling a monkey", "in the classroom", 3);
var quiz4_4 = new quizItem(4, 4, 4, "Emo music will attract:", "Waify hipster mascara chicks", "Hardcore punch you in the face during sex types", "Mature women", "Bears", 0);
var quiz4_5 = new quizItem(4, 5, 4, "Kalimba is:", "an obscure musical instrument akin to a thumb piano", "the desert rain god", "that buck-toothed girl that sat behind you in algebra", "forty miles south of Theramin, Texas", 0);

/* Quiz 5 Questions - How to Make $100 in a Week */
var quiz5_1 = new quizItem(5, 1, 4, "How do you measure a man?", "Height", "Money", "Weight", "Honor", 1);
var quiz5_2 = new quizItem(5, 2, 4, "The muffin man won't buy your:", "Muffins", "Sperm", "Blood", "Beans", 0);
var quiz5_3 = new quizItem(5, 3, 4, "Blind the recession with:", "Science", "Bright light", "Splooge", "Tenacity", 2);
var quiz5_4 = new quizItem(5, 4, 4, "Beanie Babies are full of:", "Blood", "Frijoles negros", "Love", "Squiggly white gold", 1);
var quiz5_5 = new quizItem(5, 5, 2, "Uncle Andy knows how to make money:", "True", "False", "", "", 0);

/* Quiz 6 Questions - How to Tell if You're Dating a Crazy */
var quiz6_1 = new quizItem(6, 1, 3, "You forget Valentine's Day.  The next morning, there's a steaming pile of crap on your door step.", "You're dating a crazy", "You also forgot to walk your dog on Valentine's Day", "Grandpa forgot to take his meds", "", 0);
var quiz6_2 = new quizItem(6, 2, 4, "The cellphone's primary use is:", "as a tool for crazy people to follow you", "to call dad on Father's Day", "as a means to get pizza late at night", "communicate with friends and family", 0);
var quiz6_3 = new quizItem(6, 3, 3, "Early detection is the most effective way to avoid crazies:", "True", "False", "Oh shush, he/she's cute, let's see where this goes!", "", 0);
var quiz6_4 = new quizItem(6, 4, 4, "Abnormally high ratio of name to other words in conversations is a sign of:", "Foreign chick", "Future stalker", "Imminent bear attack", "Impending apocalypse", 1);
var quiz6_5 = new quizItem(6, 5, 4, "Signs you're dating a crazy:", "The sex is great", "Sudden abundance of hand-knit sweaters", "You fear for your pet bunny's life", "All of the above", 3);

/* Quiz 7 Questions - How to Manscape */
var quiz7_1 = new quizItem(7, 1, 3, "Chicks dig:", "Mr. Hairy Smelly Longnail", "Dirty clothes", "Uncle Andy", "", 2);
var quiz7_2 = new quizItem(7, 2, 4, "Dandruff is:", "cool as long as you wear light clothes", "a myth propagated by shampoo companies", "a fungus that grows on your head", "a way of enjoying winter all year long", 2);
var quiz7_3 = new quizItem(7, 3, 4, "Best bet for facial hair?", "A nice scruff", "A full chin weasel", "Unibomber crumb catcher", "Clean shaven", 0);
var quiz7_4 = new quizItem(7, 4, 4, "Which of the following is false?", "The twins need a good buzz", "The big mac needs some poppy seeds", "The Unibomber needs a bagel", "All of the above", 2);
var quiz7_5 = new quizItem(7, 5, 4, "Seek professional care when trimming:", "Tiny Tim's topiary", "The giving tree of sherwood forest", "Bush around the bush whacker", "All/any of the above", 3);

/* Quiz 8 Questions - How to Deal with Bullies */
var quiz8_1 = new quizItem(8, 1, 4, "Justice favors:", "The injured", "The bullies", "Gruyere sandwiches and muesli", "All of the above", 0);
var quiz8_2 = new quizItem(8, 2, 4, "Bullies:", "Exist", "Are bigger than you", "Crap on your desk", "All of the above", 3);
var quiz8_3 = new quizItem(8, 3, 4, "Allowing a bully to punch you:", "May pay off with a grilled cheese and popsicles", "Should be avoided at all costs", "Is illegal", "None of the above", 0);
var quiz8_4 = new quizItem(8, 4, 4, "What were we talking about?", "Scoring with foreign chicks", "Starting a band", "Bullies", "Bear wrestling", 2);
var quiz8_5 = new quizItem(8, 5, 3, "Touching bullies in the privates makes them:", "Cry", "Grow stronger", "None of the above", "", 0);

/* Quiz 9 Questions - How to Satisfy a Woman */
var quiz9_1 = new quizItem(9, 1, 4, "How many ways are there to satisfy a woman?", "One", "None", "Many", "What does satisfy mean?", 2);
var quiz9_2 = new quizItem(9, 2, 3, "The in and out burger must be seasoned with your:", "Cayenne Pepper", "Attention", "Uncle Bob's famous jerky sauce", "", 1);
var quiz9_3 = new quizItem(9, 3, 4, "Once you've satisfied a woman emotionally, you'll want to satisfy her spiritually. A woman's spirit animal resides in her:", "Garage", "Purse", "Hoo-haa", "Heart", 2);
var quiz9_4 = new quizItem(9, 4, 3, "Anticipation. Build it and they will:", "Thank you", "Get Bored", "Let you watch TV in bed", "", 0);
var quiz9_5 = new quizItem(9, 5, 4, "Once you've found the \"steeple...\"", "Pray", "Consult a doctor", "Tease it like a midget", "Clean it very carefully", 2);

/* Quiz 10 Questions - How to Hold Your Liquor */
var quiz10_1 = new quizItem(10, 1, 4, "Definitely going to be mixing? Start with:", "Car bombs", "Brown liquors", "Clear liquor", "All of the above", 2);
var quiz10_2 = new quizItem(10, 2, 4, "Step one to avoiding a drunken shenanigans viral video:", "Eat", "100 push ups a day", "Stem-cell research", "Always drink with a straw", 0);
var quiz10_3 = new quizItem(10, 3, 4, "When drinking, fatty turns:", "to hot and skinny", "into a slipper", "front to back", "out to be your sister", 0);
var quiz10_4 = new quizItem(10, 4, 4, "You will look stupid holding anything:", "with more than two fruits in it or on it", "that looks like a Starburst creamed in it", "that takes the bartender 20 minutes to make", "All of the above", 3);
var quiz10_5 = new quizItem(10, 5, 4, "If you think you're gonna hurl:", "Batten down the hatches and hold it in", "Get it over with and then pop a mint", "Take another shot", "None of the above", 1);

/* Quiz 11 Questions - How to Internet Date */
var quiz11_1 = new quizItem(11, 1, 4, "Want to cyber score? First profile priority:", "Witty \"about me\" statement", "Impressive list of favorite books", "Pictures, pictures, pictures", "None of the above", 2);
var quiz11_2 = new quizItem(11, 2, 3, "You're not going to get clicks without great pictures. For best results:", "Put up more than 1, less than 4", "Wear a gorilla costume in every shot", "Take pictures using a mirror", "", 0);
var quiz11_3 = new quizItem(11, 3, 3, "Beware of people with just 1 photo posted. It's a sure sign of:", "Modesty", "Scammer", "Fatties", "", 2);
var quiz11_4 = new quizItem(11, 4, 2, "Bars are efficient for:", "Drinking", "Meeting", "", "", 0);
var quiz11_5 = new quizItem(11, 5, 3, "Internet dating is NOT about:", "Complete honesty", "Getting laid", "Casual encounters", "", 0);

/* Quiz 12 Questions - Surviving the Apocalypse */
var quiz12_1 = new quizItem(12, 1, 4, "The apocalypse is:", "The end of the world as we know it", "A word I don't understand", "A new energy drink", "A French trip hop group", 0);
var quiz12_2 = new quizItem(12, 2, 3, "Bomb shelters should be avoided because they are susceptible to which?", "Nuclear Fallout", "Feral Zombies", "A crazy god-like beak", "", 2);
var quiz12_3 = new quizItem(12, 3, 4, "Quetzalcoatl has a god-like:", "Bank account", "Toe nail", "Beak", "Manscaping skills", 2);
var quiz12_4 = new quizItem(12, 4, 4, "Zombies should be:", "Braised with aromatics", "Avoided", "Befriended on Facebook", "Hired for small household chores", 1);
var quiz12_5 = new quizItem(12, 5, 4, "Finding good meat will be a challenge.  The best way to procure protein:", "Hunt animals", "Eat your friends", "Find a charismatic leader", "Forage for wild forest lentils", 2);

/* Quiz 13 Questions - The Perfect Thanksgiving */
var quiz13_1 = new quizItem(13, 1, 3, "Thanksgiving is:", "An obscure pagan tradition", "The oldest of American holidays", "An 80s pop compilation song (for a cause)", "", 1);
var quiz13_2 = new quizItem(13, 2, 3, "What must you do when you first wake up on Thanksgiving?", "Exercise", "Worship an effigy of Christopher Columbus", "Go back to bed", "", 2);
var quiz13_3 = new quizItem(13, 3, 4, "What is a man's responsibility to watch on Thanksgiving?", "Football", "A giant inflatable cartoon character", "The Tudors marathon", "Bubbie stuffing a turkey", 0);
var quiz13_4 = new quizItem(13, 4, 4, "What must we hope for during any Thanksgiving football game?", "Hot cheerleaders", "A drunk announcer", "Sideline reporters being molested", "All of the above", 3);
var quiz13_5 = new quizItem(13, 5, 4, "Besides eating turkey, what does Andy love about Thanksgiving?", "The pies", "Black Friday", "Stuffing the turkey", "None of the above", 0);

/* Quiz 14 Questions - Threesome */
var quiz14_1 = new quizItem(14, 1, 2, "Two heads are better than one.", "True", "False", "", "", 0);
var quiz14_2 = new quizItem(14, 2, 3, "Get started! Break the ice with:", "Shared interests", "An ice pick", "None of the above", "", 0);
var quiz14_3 = new quizItem(14, 3, 4, "Which of these combos does Andy recommend?", "Black chicks and Hispanic girls", "Red Sox fans and Yankee fans", "Short girls and midgets", "All of the above", 3);
var quiz14_4 = new quizItem(14, 4, 4, "When in doubt:", "Call for delivery", "Call Doug", "Let the ladies handle themselves", "All of the above", 2);
var quiz14_5 = new quizItem(14, 5, 4, "When the evening is over:", "Be a gentleman", "Tell your friends", "Offer a ride home", "All of the above", 3);

/* Quiz 15 Questions - Christmukkah */
var quiz15_1 = new quizItem(15, 1, 3, "Why do we celebrate Christmukkah?", "So that Santa can have latkes", "To save valuable shelf space at greeting card stores", "So Jews can schtup outside the tribe", "", 2);
var quiz15_2 = new quizItem(15, 2, 4, "According to Andy, how many days does the celebration last?", "1", "8", "20", "25", 2);
var quiz15_3 = new quizItem(15, 3, 4, "Christmukkah is:", "A religious holiday", "A loose metaphor open to interpretation", "That spicy sauce they serve with the bread at Indian restaurants", "An Arabic curse word", 1);
var quiz15_4 = new quizItem(15, 4, 4, "What does Andy recommend you do on day three of Christmukkah?", "Send three French hens to your true love", "Throw an \"Oy to the World\" party", "Honor the Maccabees with eight hits on the menorah bong", "None of the above", 2);
var quiz15_5 = new quizItem(15, 5, 2, "Religion has no place in a modern Christmukkah.", "True", "False", "", "", 0);

/* Quiz 16 Questions - How to Survive the Cold */
var quiz16_1 = new quizItem(16, 1, 4, "To survive old man winter's frosty breath, ask a girl:", "If she'd like to split your heating bill", "For some breath mints", "If she'd like to be naked with you", "To start a bonfire", 2);
var quiz16_2 = new quizItem(16, 2, 4, "Shriveled Genitals:", "Attract ladies", "Encourage ice cream consumption", "Both A & B", "None of the above", 2);
var quiz16_3 = new quizItem(16, 3, 4, "According to Andy, how should you explain the cold to children?", "Snow is really God's frozen tears and if you touch it you'll die", "Winter is a magical time of year", "The cold is God's way of saying your parents don't love you enough to move to Florida", "Both A & C", 3);
var quiz16_4 = new quizItem(16, 4, 3, "Which beverage should you consume in excess to stay warm?", "Microwaved half-and-half", "Alcohol", "Hot chocolate", "", 1);
var quiz16_5 = new quizItem(16, 5, 3, "Eskimos:", "Defecate into holes in the ice", "Fish in iceholes", "Are iceholes", "", 1);

/* Quiz 18 Questions - Valentine's Day */
var quiz18_1 = new quizItem(18, 1, 4, "Valentine's Day falls on:", "February 22nd", "March 15th", "February 14th", "June 22nd", 2);
var quiz18_2 = new quizItem(18, 2, 4, "No date for the big day?", "Send mom some flowers!", "Head to the bar!", "Watch the Dexter finale again!", "Call your ex!", 1);
var quiz18_3 = new quizItem(18, 3, 2, "Hand out single roses!", "Yes, I really like masturbating.", "No", "", "", 0);
var quiz18_4 = new quizItem(18, 4, 2, "Give carnations! They're pretty and cheap!", "Yes, I really like masturbating.", "No", "", "", 0);
var quiz18_5 = new quizItem(18, 5, 4, "When gifting lingerie, always:", "Buy a two-pack", "Buy the crotchless and edible type", "Guess her size and buy one smaller", "Buy the smallest size you can find", 2);

/* Quiz 17 Questions - TV/VCR */
var quiz17_1 = new quizItem(18, 1, 4, "In this video, Andy was:", "High on shrooms", "Very charming", "Seeing bunnies", "All of the above", 3);
var quiz17_2 = new quizItem(18, 2, 3, "Make sure you set your television to:", "Channel 3 or 4", "Video input mode", "Accept frozen waffles", "", 0);
var quiz17_3 = new quizItem(18, 3, 4, "Hitting the stop button repeatedly will:", "Unlock 'unlimited ammo' mode for killer gameplay", "Reset the VCR's servo motor", "Cause the room you're in to turn red", "Increase picture quality", 2);
var quiz17_4 = new quizItem(18, 4, 4, "If your VCR does not respect you:", "It will eat your tapes", "It will never love you", "It will never produce a clean image", "It will eat your waffles", 1);
var quiz17_5 = new quizItem(18, 5, 3, "Extra Credit: Setup-menu:", "&lt;USER1&gt;", "&lt;USER100&gt;", "&lt;USER000&gt", "", 0);

/* Quiz 19 Questions - Wilderness */
var quiz19_1 = new quizItem(19, 1, 4, "QUESTION 1", "Answer 1", "Answer 2", "Answer 3", "Answer 4", 0);
var quiz19_2 = new quizItem(19, 2, 3, "QUESTION 2", "Answer 1", "Answer 2", "Answer 3", "", 2);
var quiz19_3 = new quizItem(19, 3, 4, "QUESTION 3", "Answer 1", "Answer 2", "Answer 3", "Answer 4", 2);
var quiz19_4 = new quizItem(19, 4, 4, "QUESTION 4", "Answer 1", "Answer 2", "Answer 3", 1);
var quiz19_5 = new quizItem(19, 5, 4, "QUESTION 5", "Answer 1", "Answer 2", "Answer 3", "Answer 4", 2);

/* Quiz 20 Questions - St Patrick's Day */
var quiz20_1 = new quizItem(20, 1, 4, "QUESTION 1", "Answer 1", "Answer 2", "Answer 3", "Answer 4", 0);
var quiz20_2 = new quizItem(20, 2, 3, "QUESTION 2", "Answer 1", "Answer 2", "Answer 3", "", 2);
var quiz20_3 = new quizItem(20, 3, 4, "QUESTION 3", "Answer 1", "Answer 2", "Answer 3", "Answer 4", 2);
var quiz20_4 = new quizItem(20, 4, 4, "QUESTION 4", "Answer 1", "Answer 2", "Answer 3", 1);
var quiz20_5 = new quizItem(20, 5, 4, "QUESTION 5", "Answer 1", "Answer 2", "Answer 3", "Answer 4", 2);

/* Quiz 21 Questions - Time Travel */
var quiz21_1 = new quizItem(21, 1, 4, "QUESTION 1", "Answer 1", "Answer 2", "Answer 3", "Answer 4", 0);
var quiz21_2 = new quizItem(21, 2, 3, "QUESTION 2", "Answer 1", "Answer 2", "Answer 3", "", 2);
var quiz21_3 = new quizItem(21, 3, 4, "QUESTION 3", "Answer 1", "Answer 2", "Answer 3", "Answer 4", 2);
var quiz21_4 = new quizItem(21, 4, 4, "QUESTION 4", "Answer 1", "Answer 2", "Answer 3", 1);
var quiz21_5 = new quizItem(21, 5, 4, "QUESTION 5", "Answer 1", "Answer 2", "Answer 3", "Answer 4", 2);

/* Quiz 22 Questions - Earth Day */
var quiz22_1 = new quizItem(22, 1, 4, "QUESTION 1", "Answer 1", "Answer 2", "Answer 3", "Answer 4", 0);
var quiz22_2 = new quizItem(22, 2, 3, "QUESTION 2", "Answer 1", "Answer 2", "Answer 3", "", 2);
var quiz22_3 = new quizItem(22, 3, 4, "QUESTION 3", "Answer 1", "Answer 2", "Answer 3", "Answer 4", 2);
var quiz22_4 = new quizItem(22, 4, 4, "QUESTION 4", "Answer 1", "Answer 2", "Answer 3", 1);
var quiz22_5 = new quizItem(22, 5, 4, "QUESTION 5", "Answer 1", "Answer 2", "Answer 3", "Answer 4", 2);

/* Quiz 23 Questions - First Time */
var quiz23_1 = new quizItem(23, 1, 4, "QUESTION 1", "Answer 1", "Answer 2", "Answer 3", "Answer 4", 0);
var quiz23_2 = new quizItem(23, 2, 3, "QUESTION 2", "Answer 1", "Answer 2", "Answer 3", "", 2);
var quiz23_3 = new quizItem(23, 3, 4, "QUESTION 3", "Answer 1", "Answer 2", "Answer 3", "Answer 4", 2);
var quiz23_4 = new quizItem(23, 4, 4, "QUESTION 4", "Answer 1", "Answer 2", "Answer 3", 1);
var quiz23_5 = new quizItem(23, 5, 4, "QUESTION 5", "Answer 1", "Answer 2", "Answer 3", "Answer 4", 2);


/* Add questions to Quiz Objects */
quizzes[1] = new quizObject(1, quiz1_1, quiz1_2, quiz1_3, quiz1_4, quiz1_5);
quizzes[2] = new quizObject(2, quiz2_1, quiz2_2, quiz2_3, quiz2_4, quiz2_5);
quizzes[3] = new quizObject(3, quiz3_1, quiz3_2, quiz3_3, quiz3_4, quiz3_5);
quizzes[4] = new quizObject(4, quiz4_1, quiz4_2, quiz4_3, quiz4_4, quiz4_5);
quizzes[5] = new quizObject(5, quiz5_1, quiz5_2, quiz5_3, quiz5_4, quiz5_5);
quizzes[6] = new quizObject(6, quiz6_1, quiz6_2, quiz6_3, quiz6_4, quiz6_5)
quizzes[7] = new quizObject(7, quiz7_1, quiz7_2, quiz7_3, quiz7_4, quiz7_5);
quizzes[8] = new quizObject(8, quiz8_1, quiz8_2, quiz8_3, quiz8_4, quiz8_5);
quizzes[9] = new quizObject(9, quiz9_1, quiz9_2, quiz9_3, quiz9_4, quiz9_5);
quizzes[10] = new quizObject(10, quiz10_1, quiz10_2, quiz10_3, quiz10_4, quiz10_5);
quizzes[11] = new quizObject(11, quiz11_1, quiz11_2, quiz11_3, quiz11_4, quiz11_5);
quizzes[12] = new quizObject(12, quiz12_1, quiz12_2, quiz12_3, quiz12_4, quiz12_5);
quizzes[13] = new quizObject(13, quiz13_1, quiz13_2, quiz13_3, quiz13_4, quiz13_5);
quizzes[14] = new quizObject(14, quiz14_1, quiz14_2, quiz14_3, quiz14_4, quiz14_5);
quizzes[15] = new quizObject(15, quiz15_1, quiz15_2, quiz15_3, quiz15_4, quiz15_5);
quizzes[16] = new quizObject(16, quiz16_1, quiz16_2, quiz16_3, quiz16_4, quiz16_5);
quizzes[17] = new quizObject(17, quiz17_1, quiz17_2, quiz17_3, quiz17_4, quiz17_5);
quizzes[18] = new quizObject(18, quiz18_1, quiz18_2, quiz18_3, quiz18_4, quiz18_5);
quizzes[19] = new quizObject(19, quiz19_1, quiz19_2, quiz19_3, quiz19_4, quiz19_5);
quizzes[20] = new quizObject(20, quiz20_1, quiz20_2, quiz20_3, quiz20_4, quiz20_5);
quizzes[21] = new quizObject(21, quiz21_1, quiz21_2, quiz21_3, quiz21_4, quiz21_5);
quizzes[22] = new quizObject(22, quiz22_1, quiz22_2, quiz22_3, quiz22_4, quiz22_5);
quizzes[23] = new quizObject(23, quiz23_1, quiz23_2, quiz23_3, quiz23_4, quiz23_5);