	
	var errNumber="0";
	var qbhavebeensubmit=0;

	var numCorrectAns = 0;
	var numQuestions = 0;
	var sSumQuestions=" Tống số câu hỏi: ";
	var sNumQuestions="\n Số câu trả lời đúng: ";
	
	//var sSumQuestions=" Total question true: ";
	//var sNumQuestions="\n Number question true: ";
	
	//Functions of API Adapter for SCORM 1.2
	function APIAdapter()
	{
		this.IsInitialized = false;
		//Execution state
		this.LMSInitialize	=	LMSInitialize;
		this.LMSFinish		=	LMSFinish;
		//State Management
		this.LMSGetLastError	=	LMSGetLastError;
		this.LMSGetErrorString	=	LMSGetErrorString;
		this.LMSGetDiagnostic	=	LMSGetDiagnostic;
		//Data transfer
		this.LMSGetValue	=	LMSGetValue; 
		this.LMSSetValue	=	LMSSetValue; 
		this.LMSCommit		=	LMSCommit;
	}
	function LMSInitialize(param)
	{
		qbhavebeensubmit=0;
		numCorrectAns = 0;
		numQuestions = 0;
		return "true";
	}
	function LMSFinish(param)
	{
		return "true";
	}
	function LMSGetValue(element)
	{
		return "";
	}
	function LMSSetValue(element,value)
	{
		element=element+"";
		if(element.indexOf("cmi.interactions.")==0)
		{
			var sType = element.substring(element.lastIndexOf(".")+1,element.length);
			if (sType == "id")
			{
				numQuestions = numQuestions + 1;
			}
			else if (sType == "result")
			{
				if (value == "correct")
				{
					numCorrectAns = numCorrectAns +1;
				}
			}			
		}
		if(element=="cmi.core.score.raw")
		{
			var str;
			//str = " Total questions: " + numQuestions;
			//str = str + "\n Correct Answers: " + 	numCorrectAns;
			str = sSumQuestions + numQuestions;
			str = str + sNumQuestions + 	numCorrectAns;
			alert(str);
			//qbhavebeensubmit = 1;
			rawScore = 0;
			actualScore = 0;
			numCorrectAns = 0;
			numQuestions = 0;
		}
		return "true";
	}
	function LMSCommit(param)
	{
		return "true";
	}
	function LMSGetLastError()
	{
		return errNumber;
	}
	function LMSGetErrorString(ErrNumber)
	{
		return "";
	}
	function LMSGetDiagnostic(para)
	{
		return "";
	}
	//	End funtions of API Adapter for SCORM 1.2
	
	//Functions of API Adapter for SCORM 2004
	function API2004()
	{
		this.IsInitialized = false;
		//Execution state
		this.Initialize		=	Initialize;
		this.Terminate		=	Terminate;
		//State Management
		this.GetLastError	=	GetLastError;
		this.GetErrorString	=	GetErrorString;
		this.GetDiagnostic	=	GetDiagnostic;
		//Data transfer
		this.GetValue		=	GetValue; 
		this.SetValue		=	SetValue; 
		this.Commit			=	Commit;
	}
	function Initialize(param)
	{
		qbhavebeensubmit=0;
		numCorrectAns = 0;
		numQuestions = 0;
		return "true";
	}
	function Terminate(param)
	{
		return "true";
	}
	function GetValue(element)
	{
		return ""
	}
	function SetValue(element,value)
	{
		element=element+"";
		if(element.indexOf("cmi.interactions.")==0)
		{
			var sType = element.substring(element.lastIndexOf(".")+1,element.length);
			if (sType == "id")
			{
				numQuestions = numQuestions + 1;
			}
			else if (sType == "result")
			{
				if (value == "correct")
				{
					numCorrectAns = numCorrectAns +1;
				}
			}			
		}
		if(element=="cmi.score.raw")
		{
			var str;
			//str = " Total questions: " + numQuestions;
			//str = str + "\n Correct Answers: " + 	numCorrectAns;
			str = sSumQuestions  + numQuestions;
			str = str + sNumQuestions  + 	numCorrectAns;
			alert(str);
			//qbhavebeensubmit = 1;
			rawScore = 0;
			actualScore = 0;
			numCorrectAns = 0;
			numQuestions = 0;
		}	
		return "true";
	}
	function Commit(param)
	{
		return "true";
	}
	function GetLastError()
	{
		return errNumber;
	}
	function GetErrorString(ErrNumber)
	{
		return "";
	}
	function GetDiagnostic(para)
	{
		return "";
	}
	//End functions of API Adapter for SCORM 2004
	var API=new APIAdapter();
	var API_1484_11 = new API2004()	;
