function scormAPI()
{

  //alert("lms_data : "+lms_data+" remotedataservice : "+remotedataservice);
  //alert("lms_data : "+lms_data);
	//alert("controller : "+top.controller);

	// on sette quelques autres variables
	
	// lmsgetvalue
	//		=> online
	//		=> offline
	this.LMSGetValue = function(cmi_node)
		{
			
			
			var ret = "";
			//si la valeur cherché existe dans le tracking on le renvoie
		
        //maintenant on traite par cas :)
        switch (cmi_node) {
          case "": ret= ""; break;
          case "cmi.core.lesson_mode": ret= "normal"; break;
          case "cmi.student_data.mastery_score": ret= "0"; break;
          default: ret = "";
        }
        
    
			// pour l'instant uniquement online
			//return this.stack[this.current]["return"]["returnedvalue"];
			if (DEBUG_LMS)
			{
				alert('lmsgetvalue : '+cmi_node+" - retour : "+ret);
			}
			return ret;

		}

	// lmssetvalue
	//		=> online
	//		=> offline
	this.LMSSetValue = function(cmi_node,new_value)
		{
			if (DEBUG_LMS)
			{
				alert('lmssetvalue : '+cmi_node+" - value : "+new_value);
			}
			
			 /*monTrack[cmi_node] = new_value;
			 //selon la valeur qu'on veut enregistré on fait une action spécifique
			 switch (cmi_node) {
          case "cmi.core.session_time": ret= ""; break;//le temps est géré par la plateform pour l'instant donc on le prend pas en compte
          case "cmi.core.score.max": top.controller.xset("scoremax", new_value, lms_data); break;
          case "cmi.core.score.raw": top.controller.xset("score", new_value, lms_data); break;
          case "cmi.suspend_data":top.controller.xset("cmi.suspend_data", new_value.toString(), lms_data);break;
          default:top.controller.xset(cmi_node, new_value, lms_data); 
          
        }
        */
			// pour l'instant uniquement online
			//return this.stack[this.current]["return"]["returnedvalue"];
			return "true";

		}

	this.LMSInitialize = function(init_string)
		{
			if (DEBUG_LMS)
			{
				alert('lmsinitialize');
			}
			//alert("xvalues : "+typeof top.controller.xgets());
			
			
			//on recherche les valeurs qui sont redemandé : 
			//monTrack["cmi.suspend_data"] = top.controller.xget("cmi.suspend_data");
      
      // pour l'instant uniquement online
			//return this.stack[this.current]["return"]["returnedvalue"];
			return "true";

		}

	this.LMSFinish = function(finish_string)
		{
			if (DEBUG_LMS)
			{
				alert('lmsfinish');
			}
			top.controller.newScormAPI();
			return "true";

		}


	this.LMSCommit = function()
		{
			if (DEBUG_LMS)
			{
				alert('lmscommit');
			}
			// pour l'instant uniquement online
			return "true";
		}

	this.LMSGetLastError = function()
		{
			if (DEBUG_LMS)
			{
				alert('getlasterror');
			}
			// pour l'instant uniquement online
			//return this.stack[this.current]["return"]["returnedcode"];
			return 0;
		}
		
	this.LMSLastError = function()
		{
			if (DEBUG_LMS)
			{
				alert('LastError');
			}
			// pour l'instant uniquement online
			//return this.stack[this.current]["return"]["returnedcode"];
			return 0;
		}

	this.LMSGetErrorString = function(str_error_code)
		{
			if (DEBUG_LMS)
			{
				alert('geterrorstring');
			}
			//return this.geterrorstring(str_error_code);
			return "";
		}

	this.LMSGetDiagnostic = function()
		{
			if (DEBUG_LMS)
			{
				alert('getdiagnostic');
			}
			/*var ret = "<hr>online : <br>";
			for (var i in this.stack[this.current]["online"])
			{
				ret += i + " = " + this.stack[this.current]["online"][i] + "<br>";
			}
			ret += "<hr>offline : <br>";
			for (var i in this.stack[this.current]["offline"])
			{
				ret += i + " = " + this.stack[this.current]["offline"][i] + "<br>";
			}
			ret += "<hr>return : <br>";
			for (var i in this.stack[this.current]["return"])
			{
				ret += i + " = " + this.stack[this.current]["return"][i] + "<br>";
			}*/
			return ret;
		}

	
}

