/*************************************************************************
	Content and element data objects for building element divs and content to fill them
*************************************************************************/
/* Version date: 10/16/2006 4:21 PM */
// -----------------------------------------------------------------------

//All arrays 0 based except content objects in adDataLoaderCG.js, adDataObjs.js

//MultiArray that holds all main elements
var elementArray = new Array();
var norepeatArray = new Array();
var textArray = new Array();
elementArray[0] = new elementEntry("","","","1","160");
elementArray[1] = new elementEntry("","","","1","0");
elementArray[2] = new elementEntry("","","","0","120");
elementArray[3] = new elementEntry("","","","1","160");
elementArray[4] = new elementEntry("","","","1","0");
elementArray[5] = new elementEntry("","","","0","120");
elementArray[6] = new elementEntry("","","","1","160");
elementArray[7] = new elementEntry("","","","1","0");
elementArray[8] = new elementEntry("","","","0","120");
elementArray[9] = new elementEntry("","","","0","200");

//Elements contents
//ELEMENT 0 CONTENT
var elementContent_0 = "";
var elementContent_9 = "";
var elementButton = "<br/>";
var buildQuestion = "";

topics = topicAreas.Topics;
topic = topics[0];
subtopics = topic.Subtopics;
subtopic = subtopics[0];
topicCategories = subtopic.TopicCategories;
for(k=0; k<topicCategories.length; k++)
{
	topicCategory = topicCategories[k];
	questions = topicCategory.Questions;
	
	elementContent_0 += "<span class='list_title'>" + topicCategory.Description + "</span><br/><table>";
	
	for(l=0; l<questions.length; l++)
	{
		question = questions[l];
		
		var itExists = false;
		for(r=0;r<norepeatArray.length;r++)
		{
			if(question.QuestionID == norepeatArray[r])
			{
				itExists = true;
			}
		}
		
		if(itExists == false)
		{
			norepeatArray.push(question.QuestionID);
			textArray[question.QuestionID] = question.Text;
			buildQuestion = buildText(textArray[question.QuestionID]);		
			elementContent_9 += "<div class='freequestion' id='question" + question.QuestionID + "'><table><tr><td valign='top'><input type='checkbox' id='quest_s_" + question.QuestionID + "' onClick='trackQuests(" + question.QuestionID + ")'></td><td class='normal_page_text' valign='top'>" + buildQuestion + "</td></tr></table></div>";
		}
		elementContent_0 += "<tr><td valign='top'><input type='checkbox' id='quest_" + question.QuestionID + "' name='quest_" + question.QuestionID + "' onClick='trackQuests(" + question.QuestionID + ")'></td><td class='normal_page_text' valign='top'>" + question.Text + "</td></tr>";
	}
	elementContent_0 += "</table><br/><br/>";
}
elementContent_0 += elementButton;

//ELEMENT 1 CONTENT
var elementContent_1 = "";

topics = topicAreas.Topics;
topic = topics[0];
subtopics = topic.Subtopics;
subtopic = subtopics[1];
topicCategories = subtopic.TopicCategories;
for(k=0; k<topicCategories.length; k++)
{
	topicCategory = topicCategories[k];
	questions = topicCategory.Questions;
	
	elementContent_1 += "<span class='list_title'>" + topicCategory.Description + "</span><br/><table>";
	
	for(l=0; l<questions.length; l++)
	{
		question = questions[l];
		
		var itExists = false;
		for(r=0;r<norepeatArray.length;r++)
		{
			if(question.QuestionID == norepeatArray[r])
			{
				itExists = true;
			}
		}
		if(itExists == false)
		{
			norepeatArray.push(question.QuestionID);
			textArray[question.QuestionID] = question.Text;
			buildQuestion = buildText(textArray[question.QuestionID]);		
			elementContent_9 += "<div class='freequestion' id='question" + question.QuestionID + "'><table><tr><td valign='top'><input type='checkbox' id='quest_s_" + question.QuestionID + "' onClick='trackQuests(" + question.QuestionID + ")'></td><td class='normal_page_text' valign='top'>" + buildQuestion + "</td></tr></table></div>";
		}
		
		elementContent_1 += "<tr><td valign='top'><input type='checkbox' id='quest_" + question.QuestionID + "' name='quest_" + question.QuestionID + "' onClick='trackQuests(" + question.QuestionID + ")'></td><td class='normal_page_text' valign='top'>" + question.Text + "</td></tr>";
	}
	elementContent_1 += "</table><br/><br/>";
}
elementContent_1 += elementButton;

//ELEMENT 2 CONTENT
var elementContent_2 = "";

topics = topicAreas.Topics;
topic = topics[0];
subtopics = topic.Subtopics;
subtopic = subtopics[2];
topicCategories = subtopic.TopicCategories;
for(k=0; k<topicCategories.length; k++)
{
	topicCategory = topicCategories[k];
	questions = topicCategory.Questions;
	
	elementContent_2 += "<span class='list_title'>" + topicCategory.Description + "</span><br/><table>";
	
	for(l=0; l<questions.length; l++)
	{
		question = questions[l];
		
		var itExists = false;
		for(r=0;r<norepeatArray.length;r++)
		{
			if(question.QuestionID == norepeatArray[r])
			{
				itExists = true;
			}
		}
		if(itExists == false)
		{
			norepeatArray.push(question.QuestionID);
			textArray[question.QuestionID] = question.Text;
			buildQuestion = buildText(textArray[question.QuestionID]);		
			elementContent_9 += "<div class='freequestion' id='question" + question.QuestionID + "'><table><tr><td valign='top'><input type='checkbox' id='quest_s_" + question.QuestionID + "' onClick='trackQuests(" + question.QuestionID + ")'></td><td class='normal_page_text' valign='top'>" + buildQuestion + "</td></tr></table></div>";
		}
		
		elementContent_2 += "<tr><td valign='top'><input type='checkbox' id='quest_" + question.QuestionID + "' name='quest_" + question.QuestionID + "' onClick='trackQuests(" + question.QuestionID + ")'></td><td class='normal_page_text' valign='top'>" + question.Text + "</td></tr>";
	}
	elementContent_2 += "</table><br/><br/>";
}
elementContent_2 += elementButton;

//ELEMENT 3 CONTENT
var elementContent_3 = "";

topics = topicAreas.Topics;
topic = topics[1];
subtopics = topic.Subtopics;
subtopic = subtopics[0];
topicCategories = subtopic.TopicCategories;
for(k=0; k<topicCategories.length; k++)
{
	topicCategory = topicCategories[k];
	questions = topicCategory.Questions;
	
	elementContent_3 += "<span class='list_title'>" + topicCategory.Description + "</span><br/><table>";
	
	for(l=0; l<questions.length; l++)
	{
		question = questions[l];
		
		var itExists = false;
		for(r=0;r<norepeatArray.length;r++)
		{
			if(question.QuestionID == norepeatArray[r])
			{
				itExists = true;
			}
		}
		if(itExists == false)
		{
			norepeatArray.push(question.QuestionID);
			textArray[question.QuestionID] = question.Text;
			buildQuestion = buildText(textArray[question.QuestionID]);		
			elementContent_9 += "<div class='freequestion' id='question" + question.QuestionID + "'><table><tr><td valign='top'><input type='checkbox' id='quest_s_" + question.QuestionID + "' onClick='trackQuests(" + question.QuestionID + ")'></td><td class='normal_page_text' valign='top'>" + buildQuestion + "</td></tr></table></div>";
		}
		
		elementContent_3 += "<tr><td valign='top'><input type='checkbox' id='quest_" + question.QuestionID + "' name='quest_" + question.QuestionID + "' onClick='trackQuests(" + question.QuestionID + ")'></td><td class='normal_page_text' valign='top'>" + question.Text + "</td></tr>";
	}
	elementContent_3 += "</table><br/><br/>";
}
elementContent_3 += elementButton;

//ELEMENT 4 CONTENT
var elementContent_4 = "";

topics = topicAreas.Topics;
topic = topics[1];
subtopics = topic.Subtopics;
subtopic = subtopics[1];
topicCategories = subtopic.TopicCategories;
for(k=0; k<topicCategories.length; k++)
{
	topicCategory = topicCategories[k];
	questions = topicCategory.Questions;
	
	elementContent_4 += "<span class='list_title'>" + topicCategory.Description + "</span><br/><table>";
	
	for(l=0; l<questions.length; l++)
	{
		question = questions[l];
		
		var itExists = false;
		for(r=0;r<norepeatArray.length;r++)
		{
			if(question.QuestionID == norepeatArray[r])
			{
				itExists = true;
			}
		}
		if(itExists == false)
		{
			norepeatArray.push(question.QuestionID);
			textArray[question.QuestionID] = question.Text;
			buildQuestion = buildText(textArray[question.QuestionID]);		
			elementContent_9 += "<div class='freequestion' id='question" + question.QuestionID + "'><table><tr><td valign='top'><input type='checkbox' id='quest_s_" + question.QuestionID + "' onClick='trackQuests(" + question.QuestionID + ")'></td><td class='normal_page_text' valign='top'>" + buildQuestion + "</td></tr></table></div>";
		}
		
		elementContent_4 += "<tr><td valign='top'><input type='checkbox' id='quest_" + question.QuestionID + "' name='quest_" + question.QuestionID + "' onClick='trackQuests(" + question.QuestionID + ")'></td><td class='normal_page_text' valign='top'>" + question.Text + "</td></tr>";
	}
	elementContent_4 += "</table><br/><br/>";
}
elementContent_4 += elementButton;

//ELEMENT 5 CONTENT
var elementContent_5 = "";

topics = topicAreas.Topics;
topic = topics[1];
subtopics = topic.Subtopics;
subtopic = subtopics[2];
topicCategories = subtopic.TopicCategories;
for(k=0; k<topicCategories.length; k++)
{
	topicCategory = topicCategories[k];
	questions = topicCategory.Questions;
	
	elementContent_5 += "<span class='list_title'>" + topicCategory.Description + "</span><br/><table>";
	
	for(l=0; l<questions.length; l++)
	{
		question = questions[l];
		
		var itExists = false;
		for(r=0;r<norepeatArray.length;r++)
		{
			if(question.QuestionID == norepeatArray[r])
			{
				itExists = true;
			}
		}
		if(itExists == false)
		{
			norepeatArray.push(question.QuestionID);
			textArray[question.QuestionID] = question.Text;
			buildQuestion = buildText(textArray[question.QuestionID]);		
			elementContent_9 += "<div class='freequestion' id='question" + question.QuestionID + "'><table><tr><td valign='top'><input type='checkbox' id='quest_s_" + question.QuestionID + "' onClick='trackQuests(" + question.QuestionID + ")'></td><td class='normal_page_text' valign='top'>" + buildQuestion + "</td></tr></table></div>";
		}
		
		elementContent_5 += "<tr><td valign='top'><input type='checkbox' id='quest_" + question.QuestionID + "' name='quest_" + question.QuestionID + "' onClick='trackQuests(" + question.QuestionID + ")'></td><td class='normal_page_text' valign='top'>" + question.Text + "</td></tr>";
	}
	elementContent_5 += "</table><br/><br/>";
}
elementContent_5 += elementButton;

//ELEMENT 6 CONTENT
var elementContent_6 = "";

topics = topicAreas.Topics;
topic = topics[2];
subtopics = topic.Subtopics;
subtopic = subtopics[0];
topicCategories = subtopic.TopicCategories;
for(k=0; k<topicCategories.length; k++)
{
	topicCategory = topicCategories[k];
	questions = topicCategory.Questions;
	
	elementContent_6 += "<span class='list_title'>" + topicCategory.Description + "</span><br/><table>";
	
	for(l=0; l<questions.length; l++)
	{
		question = questions[l];
		
		var itExists = false;
		for(r=0;r<norepeatArray.length;r++)
		{
			if(question.QuestionID == norepeatArray[r])
			{
				itExists = true;
			}
		}
		if(itExists == false)
		{
			norepeatArray.push(question.QuestionID);
			textArray[question.QuestionID] = question.Text;
			buildQuestion = buildText(textArray[question.QuestionID]);		
			elementContent_9 += "<div class='freequestion' id='question" + question.QuestionID + "'><table><tr><td valign='top'><input type='checkbox' id='quest_s_" + question.QuestionID + "' onClick='trackQuests(" + question.QuestionID + ")'></td><td class='normal_page_text' valign='top'>" + buildQuestion + "</td></tr></table></div>";
		}
		
		elementContent_6 += "<tr><td valign='top'><input type='checkbox' id='quest_" + question.QuestionID + "' name='quest_" + question.QuestionID + "' onClick='trackQuests(" + question.QuestionID + ")'></td><td class='normal_page_text' valign='top'>" + question.Text + "</td></tr>";
	}
	elementContent_6 += "</table><br/><br/>";
}
elementContent_6 += elementButton;

//ELEMENT 7 CONTENT
var elementContent_7 = "";

topics = topicAreas.Topics;
topic = topics[2];
subtopics = topic.Subtopics;
subtopic = subtopics[1];
topicCategories = subtopic.TopicCategories;
for(k=0; k<topicCategories.length; k++)
{
	topicCategory = topicCategories[k];
	questions = topicCategory.Questions;
	
	elementContent_7 += "<span class='list_title'>" + topicCategory.Description + "</span><br/><table>";
	
	for(l=0; l<questions.length; l++)
	{
		question = questions[l];
		
		var itExists = false;
		for(r=0;r<norepeatArray.length;r++)
		{
			if(question.QuestionID == norepeatArray[r])
			{
				itExists = true;
			}
		}
		if(itExists == false)
		{
			norepeatArray.push(question.QuestionID);
			textArray[question.QuestionID] = question.Text;
			buildQuestion = buildText(textArray[question.QuestionID]);		
			elementContent_9 += "<div class='freequestion' id='question" + question.QuestionID + "'><table><tr><td valign='top'><input type='checkbox' id='quest_s_" + question.QuestionID + "' onClick='trackQuests(" + question.QuestionID + ")'></td><td class='normal_page_text' valign='top'>" + buildQuestion + "</td></tr></table></div>";
		}
		
		elementContent_7 += "<tr><td valign='top'><input type='checkbox' id='quest_" + question.QuestionID + "' name='quest_" + question.QuestionID + "' onClick='trackQuests(" + question.QuestionID + ")'></td><td class='normal_page_text' valign='top'>" + question.Text + "</td></tr>";
	}
	elementContent_7 += "</table><br/><br/>";
}
elementContent_7 += elementButton;

//ELEMENT 8 CONTENT
var elementContent_8 = "";

topics = topicAreas.Topics;
topic = topics[2];
subtopics = topic.Subtopics;
subtopic = subtopics[2];
topicCategories = subtopic.TopicCategories;
for(k=0; k<topicCategories.length; k++)
{
	topicCategory = topicCategories[k];
	questions = topicCategory.Questions;
	
	elementContent_8 += "<span class='list_title'>" + topicCategory.Description + "</span><br/><table>";
	
	for(l=0; l<questions.length; l++)
	{
		question = questions[l];
		
		var itExists = false;
		for(r=0;r<norepeatArray.length;r++)
		{
			if(question.QuestionID == norepeatArray[r])
			{
				itExists = true;
			}
		}
		if(itExists == false)
		{
			norepeatArray.push(question.QuestionID);
			textArray[question.QuestionID] = question.Text;
			buildQuestion = buildText(textArray[question.QuestionID]);		
			elementContent_9 += "<div class='freequestion' id='question" + question.QuestionID + "'><table><tr><td valign='top'><input type='checkbox' id='quest_s_" + question.QuestionID + "' onClick='trackQuests(" + question.QuestionID + ")'></td><td class='normal_page_text' valign='top'>" + buildQuestion + "</td></tr></table></div>";
		}
		
		elementContent_8 += "<tr><td valign='top'><input type='checkbox' id='quest_" + question.QuestionID + "' name='quest_" + question.QuestionID + "' onClick='trackQuests(" + question.QuestionID + ")'></td><td class='normal_page_text' valign='top'>" + question.Text + "</td></tr>";
	}
	elementContent_8 += "</table><br/><br/>";
}
elementContent_8 += elementButton;
