
	    var ASSESSMENT_MODE_NULL = 0;
	    var ASSESSMENT_MODE_LIVE = 1;
	    var ASSESSMENT_MODE_REVIEW = 2;
    			
		var courseStructure = new Array;
		var structureIndex = new Array;
		var questionPool = new Array;
		var assessmentSection = new Array;
		var scoreMatrix = new Array;
		var assessmentMode = 0;
		var assessmentScore = 0;
		var status = "i";
		var showAssessmentFeedback = false;
		
		function setupStructure()
		{
		
			var nodeDetails = new Array;
			var topicIndex = 0;
			var parentIndex = 0;
			var topicStart = -1;
		     





					nodeDetails = new Array;
					nodeDetails[ 0 ] = 	"mmi_010.xml";
					nodeDetails[ 1 ] = "Introduction";
					nodeDetails[ 2 ] = "N1095E";
					nodeDetails[ 3 ] = "mmi_010";
					nodeDetails[ 4 ] = "courseStructure";
					nodeDetails[ 5 ] = "l";
					nodeDetails[ 6 ] = ++topicIndex;
					nodeDetails[ 7 ] = "";
					nodeDetails[ 8 ] = parentIndex;
					nodeDetails[ 9 ] = false;
				
						nodeDetails[10 ] = false;
					
					courseStructure[ courseStructure.length ] = nodeDetails;
					if ( topicStart == - 1 )
					{
						topicStart = courseStructure.length - 1;
					}
	         
					nodeDetails = new Array;
					nodeDetails[ 0 ] = 	"mmi_020.xml";
					nodeDetails[ 1 ] = "What would you suggest?";
					nodeDetails[ 2 ] = "N10AC2";
					nodeDetails[ 3 ] = "mmi_020";
					nodeDetails[ 4 ] = "courseStructure";
					nodeDetails[ 5 ] = "l";
					nodeDetails[ 6 ] = ++topicIndex;
					nodeDetails[ 7 ] = "";
					nodeDetails[ 8 ] = parentIndex;
					nodeDetails[ 9 ] = false;
				
						nodeDetails[10 ] = false;
					
					courseStructure[ courseStructure.length ] = nodeDetails;
					if ( topicStart == - 1 )
					{
						topicStart = courseStructure.length - 1;
					}
	         
					nodeDetails = new Array;
					nodeDetails[ 0 ] = 	"mmi_030.xml";
					nodeDetails[ 1 ] = "One answer";
					nodeDetails[ 2 ] = "N10E71";
					nodeDetails[ 3 ] = "mmi_030";
					nodeDetails[ 4 ] = "courseStructure";
					nodeDetails[ 5 ] = "l";
					nodeDetails[ 6 ] = ++topicIndex;
					nodeDetails[ 7 ] = "";
					nodeDetails[ 8 ] = parentIndex;
					nodeDetails[ 9 ] = false;
				
						nodeDetails[10 ] = false;
					
					courseStructure[ courseStructure.length ] = nodeDetails;
					if ( topicStart == - 1 )
					{
						topicStart = courseStructure.length - 1;
					}
	         
					nodeDetails = new Array;
					nodeDetails[ 0 ] = 	"mmi_040.xml";
					nodeDetails[ 1 ] = "Question 1";
					nodeDetails[ 2 ] = "N10FD0";
					nodeDetails[ 3 ] = "mmi_040";
					nodeDetails[ 4 ] = "courseStructure";
					nodeDetails[ 5 ] = "l";
					nodeDetails[ 6 ] = ++topicIndex;
					nodeDetails[ 7 ] = "";
					nodeDetails[ 8 ] = parentIndex;
					nodeDetails[ 9 ] = false;
				
						nodeDetails[10 ] = false;
					
					courseStructure[ courseStructure.length ] = nodeDetails;
					if ( topicStart == - 1 )
					{
						topicStart = courseStructure.length - 1;
					}
	         
					nodeDetails = new Array;
					nodeDetails[ 0 ] = 	"mmi_050.xml";
					nodeDetails[ 1 ] = "Question 2";
					nodeDetails[ 2 ] = "N1127C";
					nodeDetails[ 3 ] = "mmi_050";
					nodeDetails[ 4 ] = "courseStructure";
					nodeDetails[ 5 ] = "l";
					nodeDetails[ 6 ] = ++topicIndex;
					nodeDetails[ 7 ] = "";
					nodeDetails[ 8 ] = parentIndex;
					nodeDetails[ 9 ] = false;
				
						nodeDetails[10 ] = false;
					
					courseStructure[ courseStructure.length ] = nodeDetails;
					if ( topicStart == - 1 )
					{
						topicStart = courseStructure.length - 1;
					}
	         
					nodeDetails = new Array;
					nodeDetails[ 0 ] = 	"mmi_060.xml";
					nodeDetails[ 1 ] = "Question 3";
					nodeDetails[ 2 ] = "N1150F";
					nodeDetails[ 3 ] = "mmi_060";
					nodeDetails[ 4 ] = "courseStructure";
					nodeDetails[ 5 ] = "l";
					nodeDetails[ 6 ] = ++topicIndex;
					nodeDetails[ 7 ] = "";
					nodeDetails[ 8 ] = parentIndex;
					nodeDetails[ 9 ] = false;
				
						nodeDetails[10 ] = false;
					
					courseStructure[ courseStructure.length ] = nodeDetails;
					if ( topicStart == - 1 )
					{
						topicStart = courseStructure.length - 1;
					}
	         
					nodeDetails = new Array;
					nodeDetails[ 0 ] = 	"mmi_070.xml";
					nodeDetails[ 1 ] = "Question 4";
					nodeDetails[ 2 ] = "N117AA";
					nodeDetails[ 3 ] = "mmi_070";
					nodeDetails[ 4 ] = "courseStructure";
					nodeDetails[ 5 ] = "l";
					nodeDetails[ 6 ] = ++topicIndex;
					nodeDetails[ 7 ] = "";
					nodeDetails[ 8 ] = parentIndex;
					nodeDetails[ 9 ] = false;
				
						nodeDetails[10 ] = false;
					
					courseStructure[ courseStructure.length ] = nodeDetails;
					if ( topicStart == - 1 )
					{
						topicStart = courseStructure.length - 1;
					}
	         
					nodeDetails = new Array;
					nodeDetails[ 0 ] = 	"mmi_080.xml";
					nodeDetails[ 1 ] = "Question 5";
					nodeDetails[ 2 ] = "N11A55";
					nodeDetails[ 3 ] = "mmi_080";
					nodeDetails[ 4 ] = "courseStructure";
					nodeDetails[ 5 ] = "l";
					nodeDetails[ 6 ] = ++topicIndex;
					nodeDetails[ 7 ] = "";
					nodeDetails[ 8 ] = parentIndex;
					nodeDetails[ 9 ] = false;
				
						nodeDetails[10 ] = false;
					
					courseStructure[ courseStructure.length ] = nodeDetails;
					if ( topicStart == - 1 )
					{
						topicStart = courseStructure.length - 1;
					}
	         
					nodeDetails = new Array;
					nodeDetails[ 0 ] = 	"mmi_100.xml";
					nodeDetails[ 1 ] = "Business Benefits";
					nodeDetails[ 2 ] = "N11D30";
					nodeDetails[ 3 ] = "mmi_100";
					nodeDetails[ 4 ] = "courseStructure";
					nodeDetails[ 5 ] = "l";
					nodeDetails[ 6 ] = ++topicIndex;
					nodeDetails[ 7 ] = "";
					nodeDetails[ 8 ] = parentIndex;
					nodeDetails[ 9 ] = false;
				
						nodeDetails[10 ] = false;
					
					courseStructure[ courseStructure.length ] = nodeDetails;
					if ( topicStart == - 1 )
					{
						topicStart = courseStructure.length - 1;
					}
	         
					nodeDetails = new Array;
					nodeDetails[ 0 ] = 	"mmi_110.xml";
					nodeDetails[ 1 ] = "Swot analysis";
					nodeDetails[ 2 ] = "N122DF";
					nodeDetails[ 3 ] = "mmi_110";
					nodeDetails[ 4 ] = "courseStructure";
					nodeDetails[ 5 ] = "l";
					nodeDetails[ 6 ] = ++topicIndex;
					nodeDetails[ 7 ] = "";
					nodeDetails[ 8 ] = parentIndex;
					nodeDetails[ 9 ] = false;
				
						nodeDetails[10 ] = false;
					
					courseStructure[ courseStructure.length ] = nodeDetails;
					if ( topicStart == - 1 )
					{
						topicStart = courseStructure.length - 1;
					}
	         
					nodeDetails = new Array;
					nodeDetails[ 0 ] = 	"mmi_120.xml";
					nodeDetails[ 1 ] = "SWOT Case Study";
					nodeDetails[ 2 ] = "N1276C";
					nodeDetails[ 3 ] = "mmi_120";
					nodeDetails[ 4 ] = "courseStructure";
					nodeDetails[ 5 ] = "l";
					nodeDetails[ 6 ] = ++topicIndex;
					nodeDetails[ 7 ] = "";
					nodeDetails[ 8 ] = parentIndex;
					nodeDetails[ 9 ] = false;
				
						nodeDetails[10 ] = false;
					
					courseStructure[ courseStructure.length ] = nodeDetails;
					if ( topicStart == - 1 )
					{
						topicStart = courseStructure.length - 1;
					}
	         
					nodeDetails = new Array;
					nodeDetails[ 0 ] = 	"mmi_130.xml";
					nodeDetails[ 1 ] = "SWOT exercise";
					nodeDetails[ 2 ] = "N128DE";
					nodeDetails[ 3 ] = "mmi_130";
					nodeDetails[ 4 ] = "courseStructure";
					nodeDetails[ 5 ] = "l";
					nodeDetails[ 6 ] = ++topicIndex;
					nodeDetails[ 7 ] = "";
					nodeDetails[ 8 ] = parentIndex;
					nodeDetails[ 9 ] = false;
				
						nodeDetails[10 ] = false;
					
					courseStructure[ courseStructure.length ] = nodeDetails;
					if ( topicStart == - 1 )
					{
						topicStart = courseStructure.length - 1;
					}
	         
					nodeDetails = new Array;
					nodeDetails[ 0 ] = 	"mmi_140.xml";
					nodeDetails[ 1 ] = "SWOT exercise";
					nodeDetails[ 2 ] = "N12C22";
					nodeDetails[ 3 ] = "mmi_140";
					nodeDetails[ 4 ] = "courseStructure";
					nodeDetails[ 5 ] = "l";
					nodeDetails[ 6 ] = ++topicIndex;
					nodeDetails[ 7 ] = "";
					nodeDetails[ 8 ] = parentIndex;
					nodeDetails[ 9 ] = false;
				
						nodeDetails[10 ] = false;
					
					courseStructure[ courseStructure.length ] = nodeDetails;
					if ( topicStart == - 1 )
					{
						topicStart = courseStructure.length - 1;
					}
	         
					nodeDetails = new Array;
					nodeDetails[ 0 ] = 	"mmi_145.xml";
					nodeDetails[ 1 ] = "Mike and Linda's list";
					nodeDetails[ 2 ] = "N12EF0";
					nodeDetails[ 3 ] = "mmi_145";
					nodeDetails[ 4 ] = "courseStructure";
					nodeDetails[ 5 ] = "l";
					nodeDetails[ 6 ] = ++topicIndex;
					nodeDetails[ 7 ] = "";
					nodeDetails[ 8 ] = parentIndex;
					nodeDetails[ 9 ] = false;
				
						nodeDetails[10 ] = false;
					
					courseStructure[ courseStructure.length ] = nodeDetails;
					if ( topicStart == - 1 )
					{
						topicStart = courseStructure.length - 1;
					}
	         
					nodeDetails = new Array;
					nodeDetails[ 0 ] = 	"mmi_150.xml";
					nodeDetails[ 1 ] = "Options for Internet Marketing";
					nodeDetails[ 2 ] = "N13053";
					nodeDetails[ 3 ] = "mmi_150";
					nodeDetails[ 4 ] = "courseStructure";
					nodeDetails[ 5 ] = "l";
					nodeDetails[ 6 ] = ++topicIndex;
					nodeDetails[ 7 ] = "";
					nodeDetails[ 8 ] = parentIndex;
					nodeDetails[ 9 ] = false;
				
						nodeDetails[10 ] = false;
					
					courseStructure[ courseStructure.length ] = nodeDetails;
					if ( topicStart == - 1 )
					{
						topicStart = courseStructure.length - 1;
					}
	         
					nodeDetails = new Array;
					nodeDetails[ 0 ] = 	"mmi_160.xml";
					nodeDetails[ 1 ] = "Options for Internet Marketing";
					nodeDetails[ 2 ] = "N131BC";
					nodeDetails[ 3 ] = "mmi_160";
					nodeDetails[ 4 ] = "courseStructure";
					nodeDetails[ 5 ] = "l";
					nodeDetails[ 6 ] = ++topicIndex;
					nodeDetails[ 7 ] = "";
					nodeDetails[ 8 ] = parentIndex;
					nodeDetails[ 9 ] = false;
				
						nodeDetails[10 ] = false;
					
					courseStructure[ courseStructure.length ] = nodeDetails;
					if ( topicStart == - 1 )
					{
						topicStart = courseStructure.length - 1;
					}
	         
					nodeDetails = new Array;
					nodeDetails[ 0 ] = 	"mmi_170.xml";
					nodeDetails[ 1 ] = "Where next?";
					nodeDetails[ 2 ] = "N13326";
					nodeDetails[ 3 ] = "mmi_170";
					nodeDetails[ 4 ] = "courseStructure";
					nodeDetails[ 5 ] = "l";
					nodeDetails[ 6 ] = ++topicIndex;
					nodeDetails[ 7 ] = "";
					nodeDetails[ 8 ] = parentIndex;
					nodeDetails[ 9 ] = false;
				
						nodeDetails[10 ] = false;
					
					courseStructure[ courseStructure.length ] = nodeDetails;
					if ( topicStart == - 1 )
					{
						topicStart = courseStructure.length - 1;
					}
	         




			topicEnd = courseStructure.length;
			topicSize = topicEnd - topicStart;
			// for ( topicStart = topicStart + 1; topicStart <= topicEnd; topicStart++ )
			for ( ; topicStart < topicEnd; topicStart++ )
			{
			    courseStructure[ topicStart ][ 7 ] = topicSize;
			}
        
            // buildIndex();
            
            createAssessmentSection();
            
        }
        
 	