var player = GetPlayer();
var currentscore = player.GetVar("visco");
currentscore = parseInt(scoreTotal);
function findLMSAPI(win) {
if (win.hasOwnProperty("GetStudentID")) return win;
else if (win.parent == win) return null;
else return findLMSAPI(win.parent);
}
var lmsAPI = findLMSAPI(this);
SCORM2004_SetScore(currentscore, 100, 0);
lmsAPI.SetScore(currentscore, 100, 0);
SCORM2004_CallSetValue("cmi.completion_status", "completed");
SCORM2004_CallSetValue("cmi.success_status", "passed");
SetStatus("passed");