/*--
Copyright © 1998, 2012, Oracle and/or its affiliates.  All rights reserved.
--*/

// include lms_init.js
/*
document.write('<script> lms_path="../../../"</script>');
document.write('<script type="text/javascript" src="../../../js/lms_init.js"></script>');
*/
var _modeLaunch = "incomplete";	// LMS_INCOMPLETE not ready yet?

// callback functions from topic

function lms_LoadAdapterComplete() {
    __alert("lms_LoadAdapterComplete() called");
    
    var lmscom = document.LmsCom;
    lmscom.Begin();
    lmscom.utGetModeIndex();

    // recall the topic player, do not remove
    lms_initialized = true;
    setTimeout(lms_store.callbackfunction, 1);
}

function GetChildLmsCom(child_store) {
    __Ialert("lms_GetChildLmsCom() called");
    var lmscom = document.LmsCom;
    var childlmscom = child_store.window.document.LmsCom = new LmsComBase(lmscom);
    childlmscom.owner = child_store.window;
    lmscom.child = childlmscom;
}

function ListenChildClose() {
    __alert("lms_ListenChildClose() called");

    var lmscom = document.LmsCom;

    var childlmscom = lmscom.child;
    if (childlmscom) {
        lmscom.status_obj = childlmscom.status_obj;  // just grab topiclaunch status from topic player
    }
}

// asset specific processing called from lms_init on ClosePage
// End the UT session. Pulled out of topicFinish so that it can be called from ClosePage in case topic is exited before
// being completed.
function _closePage() {
    var lmscom = document.LmsCom;
    lmscom.utRecordEndTime(new Date());
    lmscom.utRecordCompletionStatus(_modeLaunch);
}

function lms_KPathLogout() {
    _logout(true);
}
    
//----------------------------------------------------------------------------------------------/

var _lms_module_name = "lms_fusion.js";
var _lms_show_alert = false;
var _lms_show_Ialert = false;
