///////////////////////////////////////////////////////////////////////////////////////////////////
//
//	Copyright 2001, 2002, 2003 Microsoft Corporation.  All Rights Reserved.
//	This documentation is only for the internal, personal use by customers who have
//	licensed the Microsoft eLearning Library or who are entitled to use the 
//	eLearning benefits provided via Microsoft's Software Assurance program.  
//	It may not be modified or distributed outside of your organization. 
//
// 	File: ScormCode.js
//
// 	Description: Contains the script that causes a hosting page to initiate and terminate an LMS session.
//
///////////////////////////////////////////////////////////////////////////////////////////////////

var g_oAPI = null;

//--------------------------------------------------------------------
// Function: window.onload
//
// Purpose: Initializes LMS session
//
// Parameters: None
//
// Returns: null
//--------------------------------------------------------------------
function window.onload()
{
	g_oAPI = FindLMSAPI();
	if (g_oAPI) g_oAPI.LMSInitialize('');
}

//--------------------------------------------------------------------
// Function: window.onunload
//
// Purpose: Finalizes LMS session
//
// Parameters: None
//
// Returns: null
//--------------------------------------------------------------------
function window.onunload()
{
	if (g_oAPI) g_oAPI.LMSFinish('');
}
