/*
Use the following code as a template for creating a quiz with questions, answers, and scores 

var oQ; 
var oA; 
var oS; 

var oQuiz = new Quiz(); 

	oQuiz.SetQuestionNumberStyle();			// "1" or "A" or "a" or "." or ""
	oQuiz.SetQuestionNumberCssClass();			// CSS class name
	oQuiz.SetRequireAllGuesses();				// true or false 
	oQuiz.SetNeedAllGuessesCssClass();			// CSS class name
	oQuiz.SetNeedAllGuessesHTML();				// ex: "You must answer all questions." 
	oQuiz.SetScoreByPercentage();				// true or false (defaults to false)
	oQuiz.SetScoreCssClass("score");			// CSS class name
	
	// Repeat this indented block for each question 
	oQ = new Question(); 
		oQ.SetQuestionHTML();					// ex: "What is 2 + 2 ?" 
		oQ.SetQuestionCssClass();				// CSS class name 
		oQ.SetCorrectGuessHTML();				// ex: "Correct. Unless you are in Room 101 in the Ministry of Truth (with apologies to George Orwell)." 
		oQ.SetCorrectGuessCssClass();			// CSS class name 
		oQ.SetIncorrectGuessHTML();				// ex: "Incorrect. Practice your addition." 
		oQ.SetIncorrectGuessCssClass();			// CSS class name 
		oQ.SetQuestionType();					// "TF" or "MC" or "MS" :: TF = True/False; MC = Multiple Choice; MS = Multiple Selection 
		oQ.SetQuestionNumber();					// ex: 1 
		oQ.SetRequireAllOrNothing();			// true or false; determines whether Multiple Selection allows partial points for some but not all correct.
		oQ.SetAnswerNumberStyle();				// "1" or "A" or "a" or "." or ""
		oQ.SetAnswerNumberCssClass();			// CSS class name
		oQ.SetPossiblePoints();					// ex: 1
		
		// Repeat this indented block for each answer 
		oA = new Answer(); 
			oA.SetAnswerHTML();					// ex: "4" 
			oA.SetAnswerCssClass();				// CSS class name 
			oA.SetAnswerNumber();				// ex: 1 

			oA.SetPointsForCorrectGuess();		// defaults to 1; ex: 1 
			oA.SetCorrect();					// true or false (defaults to false)
			
			oQ.AddAnswer(oA);
			
		// Optional 
		oQ.RandomizeAnswers(); 
		
		oQuiz.AddQuestion(oQ); 
		
	//Repeat this indented block for each score range 
	oS = new Score(); 
		oS.SetScoreHTML();						// ex: "<b>Expert</b>: You really know your math!" 
		oS.SetMinScore();						// ex: 9 (for points) or 90 (for percent)
		
		oQuiz.AddScore(oS); 
		
	// Optional 
	oQuiz.RandomizeQuestions(); 
	
	// This line actually writes the functioning quiz to the document 
	oQuiz.Render();
*/

var oQ2; 
var oA2; 
var oS2; 

var oQuiz2 = new Quiz(); 
	oQuiz2.SetQuestionNumberStyle("1");
	oQuiz2.SetQuestionNumberCssClass("qnumber");
	oQuiz2.SetRequireAllGuesses(true);
	oQuiz2.SetNeedAllGuessesHTML("Please answer all questions first.");
	oQuiz2.SetNeedAllGuessesCssClass("requireall");
	oQuiz2.SetScoreByPercentage(true);
	oQuiz2.SetScoreCssClass("score");

	// Repeat this indented block for each question 
		
	oQ2 = new Question(); 
		oQ2.SetQuestionHTML("The main reason for becoming homeless is inability to afford rent.");
		oQ2.SetQuestionCssClass("question");
		oQ2.SetIncorrectGuessHTML("Correct: A recent study by Wilder Research found that 39% of homeless survey participants cited an inability to pay rent as one of the main reasons they had to abandon their previous housing.  This number has increased from 33% in 2003. Other reasons (in order of importance) include eviction, lost job or cut hours, breakup with spouse or partner, drinking or drug problem, relationship problems, being abused, entering jail or treatment, drinking or drug problem of someone else living there, substandard or unsafe housing, behavioral problems of visitors or guests, and violence in the neighborhood.");	
		oQ2.SetIncorrectGuessCssClass("correct");
		oQ2.SetCorrectGuessHTML("Incorrect: A recent study by Wilder Research found that 39% of homeless survey participants cited an inability to pay rent as one of the main reasons they had to abandon their previous housing.  This number has increased from 33% in 2003. Other reasons (in order of importance) include eviction, lost job or cut hours, breakup with spouse or partner, drinking or drug problem, relationship problems, being abused, entering jail or treatment, drinking or drug problem of someone else living there, substandard or unsafe housing, behavioral problems of visitors or guests, and violence in the neighborhood.");
		oQ2.SetCorrectGuessCssClass("incorrect");

		oQ2.SetQuestionType("TF");
		oQ2.SetQuestionNumber(1);
		oQ2.SetAnswerNumberStyle("");
		oQ2.SetAnswerNumberCssClass("anumber");
		
		// Repeat this indented block for each answer 
		oA2 = new Answer(); 
			oA2.SetAnswerHTML("True");
			oA2.SetAnswerCssClass("answer");
			oA2.SetPointsForCorrectGuess(1);
			
			oQ2.AddAnswer(oA2);					
			
		oA2 = new Answer(); 
			oA2.SetAnswerHTML("False");
			oA2.SetAnswerCssClass("answer");
			oA2.SetPointsForCorrectGuess(1);
			oA2.SetCorrect(true);
			
			oQ2.AddAnswer(oA2);					
			// Optional 
		//oQ2.RandomizeAnswers(); 
		
		oQuiz2.AddQuestion(oQ2);


	oQ2 = new Question(); 
		oQ2.SetQuestionHTML("There are approximately 500-1000 homeless people on any given night in Minnesota.");
		oQ2.SetQuestionCssClass("question");
		
		oQ2.SetIncorrectGuessHTML("Incorrect: Between 9,200 and 9,300 individuals are homeless on any given night in Minnesota. ");
		oQ2.SetIncorrectGuessCssClass("incorrect");
		oQ2.SetCorrectGuessHTML("Correct: Between 9,200 and 9,300 individuals are homeless on any given night in Minnesota.");
		oQ2.SetCorrectGuessCssClass("correct");
		oQ2.SetQuestionType("TF");
		oQ2.SetQuestionNumber(2);
		oQ2.SetAnswerNumberStyle("");
		oQ2.SetAnswerNumberCssClass("anumber");
		
		// Repeat this indented block for each answer 
		oA2 = new Answer(); 
			oA2.SetAnswerHTML("True");
			oA2.SetAnswerCssClass("answer");
			oA2.SetPointsForCorrectGuess(1);
			
			oQ2.AddAnswer(oA2);					
			
		oA2 = new Answer(); 
			oA2.SetAnswerHTML("False");
			oA2.SetAnswerCssClass("answer");
			oA2.SetPointsForCorrectGuess(1);
			oA2.SetCorrect(true);
			
			oQ2.AddAnswer(oA2);					




		// Optional 
		//oQ2.RandomizeAnswers(); 
		
		oQuiz2.AddQuestion(oQ2); 


oQ2 = new Question(); 
		oQ2.SetQuestionHTML("Homelessness disproportionally affects African Americans and American Indians.");
		oQ2.SetQuestionCssClass("question");
		oQ2.SetIncorrectGuessHTML("Correct: Almost half of all homeless persons in the Twin Cities metro area are African American and nearly one out of five of those in Greater Minnesota are American Indian. These disparities are especially apparent in a state that is more than 80% white.");	
		oQ2.SetIncorrectGuessCssClass("correct");
		oQ2.SetCorrectGuessHTML("Incorrect: Almost half of all homeless persons in the Twin Cities metro area are African American and nearly one out of five of those in Greater Minnesota are American Indian. These disparities are especially apparent in a state that is more than 80% white.");
		oQ2.SetCorrectGuessCssClass("incorrect");

		oQ2.SetQuestionType("TF");
		oQ2.SetQuestionNumber(3);
		oQ2.SetAnswerNumberStyle("");
		oQ2.SetAnswerNumberCssClass("anumber");
		
		// Repeat this indented block for each answer 
		oA2 = new Answer(); 
			oA2.SetAnswerHTML("True");
			oA2.SetAnswerCssClass("answer");
			oA2.SetPointsForCorrectGuess(1);
			
			oQ2.AddAnswer(oA2);					
			
		oA2 = new Answer(); 
			oA2.SetAnswerHTML("False");
			oA2.SetAnswerCssClass("answer");
			oA2.SetPointsForCorrectGuess(1);
			oA2.SetCorrect(true);
			
			oQ2.AddAnswer(oA2);					
			// Optional 
		//oQ2.RandomizeAnswers(); 
		
		oQuiz2.AddQuestion(oQ2);



oQ2 = new Question(); 
		oQ2.SetQuestionHTML("Most unemployed men reported criminal history as the main problem they face in trying to get a job.");
		oQ2.SetQuestionCssClass("question");
		oQ2.SetIncorrectGuessHTML("Incorrect:A recent study found that 34% of unemployed homeless adults cited lack of transportation as one of the main problems, followed by lack of housing (27%), physical health problems (26%), mental health problems (24%), criminal history (14%),  job experience or history (13%),  education (11%), and  lack of child care (10% of all unemployed homeless adults, and 21% of unemployed women).");	
		oQ2.SetIncorrectGuessCssClass("incorrect");
		oQ2.SetCorrectGuessHTML("Correct: A recent study found that 34% of unemployed homeless adults cited lack of transportation as one of the main problems, followed by lack of housing (27%), physical health problems (26%), mental health problems (24%), criminal history (14%),  job experience or history (13%),  education (11%), and  lack of child care (10% of all unemployed homeless adults, and 21% of unemployed women).");
		oQ2.SetCorrectGuessCssClass("correct");

		oQ2.SetQuestionType("TF");
		oQ2.SetQuestionNumber(4);
		oQ2.SetAnswerNumberStyle("");
		oQ2.SetAnswerNumberCssClass("anumber");
		
		// Repeat this indented block for each answer 
		oA2 = new Answer(); 
			oA2.SetAnswerHTML("True");
			oA2.SetAnswerCssClass("answer");
			oA2.SetPointsForCorrectGuess(1);
			
			oQ2.AddAnswer(oA2);					
			
		oA2 = new Answer(); 
			oA2.SetAnswerHTML("False");
			oA2.SetAnswerCssClass("answer");
			oA2.SetPointsForCorrectGuess(1);
			oA2.SetCorrect(true);
			
			oQ2.AddAnswer(oA2);					
			// Optional 
		//oQ2.RandomizeAnswers(); 
		
		oQuiz2.AddQuestion(oQ2);





oQ2 = new Question(); 
		oQ2.SetQuestionHTML("Domestic violence is one of the reasons women become homeless.");
		oQ2.SetQuestionCssClass("question");
		oQ2.SetIncorrectGuessHTML("Correct: As in previous years, approximately one of every three homeless women (32%) was homeless at least in part because of domestic abuse. This proportion was higher in Greater Minnesota (35%) than the Twin Cities area (30%).");	
		oQ2.SetIncorrectGuessCssClass("correct");
		oQ2.SetCorrectGuessHTML("Incorrect: As in previous years, approximately one of every three homeless women (32%) was homeless at least in part because of domestic abuse. This proportion was higher in Greater Minnesota (35%) than the Twin Cities area (30%).");
		oQ2.SetCorrectGuessCssClass("incorrect");

		oQ2.SetQuestionType("TF");
		oQ2.SetQuestionNumber(5);
		oQ2.SetAnswerNumberStyle("");
		oQ2.SetAnswerNumberCssClass("anumber");
		
		// Repeat this indented block for each answer 
		oA2 = new Answer(); 
			oA2.SetAnswerHTML("True");
			oA2.SetAnswerCssClass("answer");
			oA2.SetPointsForCorrectGuess(1);
			
			oQ2.AddAnswer(oA2);					
			
		oA2 = new Answer(); 
			oA2.SetAnswerHTML("False");
			oA2.SetAnswerCssClass("answer");
			oA2.SetPointsForCorrectGuess(1);
			oA2.SetCorrect(true);
			
			oQ2.AddAnswer(oA2);					
			// Optional 
		//oQ2.RandomizeAnswers(); 
		
		oQuiz2.AddQuestion(oQ2);




		



oQ2 = new Question(); 
		oQ2.SetQuestionHTML("Homelessness mostly affects middle-aged and elderly men and women.");
		oQ2.SetQuestionCssClass("question");
		oQ2.SetIncorrectGuessHTML("Incorrect: The average age of homeless adults (18 and older) was 41 for men and 33 for women. Most children, who were homeless and with their parents, were age 12 or younger (84%) and about half (49%) of this  84% group were age 5 or younger.");	
		oQ2.SetIncorrectGuessCssClass("incorrect");
		oQ2.SetCorrectGuessHTML("Correct: The average age of homeless adults (18 and older) was 41 for men and 33 for women. Most children, who were homeless and with their parents, were age 12 or younger (84%) and about half (49%) of this  84% group were age 5 or younger.");
		oQ2.SetCorrectGuessCssClass("correct");

		oQ2.SetQuestionType("TF");
		oQ2.SetQuestionNumber(6);
		oQ2.SetAnswerNumberStyle("");
		oQ2.SetAnswerNumberCssClass("anumber");
		
		// Repeat this indented block for each answer 
		oA2 = new Answer(); 
			oA2.SetAnswerHTML("True");
			oA2.SetAnswerCssClass("answer");
			oA2.SetPointsForCorrectGuess(1);
			
			oQ2.AddAnswer(oA2);					
			
		oA2 = new Answer(); 
			oA2.SetAnswerHTML("False");
			oA2.SetAnswerCssClass("answer");
			oA2.SetPointsForCorrectGuess(1);
			oA2.SetCorrect(true);
			
			oQ2.AddAnswer(oA2);					
			// Optional 
		//oQ2.RandomizeAnswers(); 
		
		oQuiz2.AddQuestion(oQ2);








// This is optional 
oQuiz2.RandomizeQuestions();		

