var sL2Player_RoutingVer = 'L2Player_Routing.js 0501.0003'

/******************************************************************************************
** Function:	Learn2_OnEvent(sTag, sCallback, sEvent)
** Inputs:		sTag - String indicating command to execute
** 				sCallback - String containing callback info. If sCallback == '00000000' then no callback
** 					is required. Otherwise the player function Learn2OnEventRsp(sTag, sCallback, sEvent)
** 					must be called where sTag and sCallback are the same as what was input to this function
** 				sEvent - On input this contains event request information. On output it contains response
** 					information. If an error occurs, then this will be the error description string.
** Return:		None
** Description:	This function is called by the Learn2 player when it fires a Javascript event. If fired by Netscape
** 				this routine is called directly. If fired by IE then this is called via the VBScript function
** 				L2PlayerObj_OnEvent() below.
******************************************************************************************/
function Learn2_OnEvent(sTag, sCallback, sEvent) {
	DebugLog('Player Event: sTag = ' + sTag + ' sCallback = ' + sCallback + ' sEvent = ' + sEvent, true);

	// Cant get this to work with switch/case on Netscape, so use compound if's
	if (sTag == 'Learn2_LMSInitialize' || sTag == 'Learn2_LMSFinish' || sTag == 'Learn2_LMSSetValue' || sTag == 'Learn2_LMSGetValue' ||
			sTag == 'Learn2_LMSCMISetValue' || sTag == 'Learn2_LMSCMIGetValue' || sTag == 'Learn2_LMSCMICommit' || sTag == 'Learn2_LMSCMIGetLastError' || sTag == 'Learn2_LMSCMIGetErrorString' || sTag == 'Learn2_LMSCMIGetDiagnostic') { 
		Learn2_OnSCORMEvent(sTag, sCallback, sEvent);
		return;
	}
	if (sTag == 'JumpPage' || sTag == 'Feedback' || sTag == 'Help') {
		Learn2_OnSec508Event(sTag, sCallback, sEvent);
		return;
	}
	if (sCallback != '00000000')
		SendPlayerRsp(sTag, sCallback, '');
}

// Send response string back to the player
function SendPlayerRsp(sTag,sCallback,sEventRsp) {
	DebugLog('Player Response: sTag = ' + sTag + ' sCallback = ' + sCallback + ' sEventRsp = ' + sEventRsp, true);
	L2PlayerObj.Learn2OnEventRsp(sTag, sCallback, sEventRsp);
}
