//This code gets executed when the page loads because it is not contained in a function;
var uid = new Date().getTime();
var gecco_id = 'gecco';
var flashProxy = new FlashProxy(uid, gecco_id, 'env/javascript/JavaScriptFlashGateway.swf');
var GeccoVariables = new Array(); //used to retrieve GeccoVariables from the engine

function LMSInitialize(param) {
	flashProxy.call("LMSInitialize_Callback", true);
}

function LMSFinish(param) {
	flashProxy.call("LMSFinish_Callback", true);
}

function LMSCommit(param) {
}

function LMSSetValue(param, value){
    //alert ("Setting values: " + param + " = " + value);
	//flashProxy.call("LMSSetValue_Callback", param, apiCall("setValue", param, value));
}

function LMSGetValue(param) {
	if (param == "cmi.objectives._children") {
		flashProxy.call("LMSGetValue_Callback", param, "id,score,status");
	}
	//alert("Getting value: " + param + " = ?");
	//flashProxy.call("LMSGetValue_Callback", param, apiCall("getValue", param));
}

function returnGeccoVariable(key, value){
    GeccoVariables[key] = value;
}