/**
 * can be called with an < 0 reportId, it will do nothing
 */
function updateVideoTimeAndStateSpent(reportId, timeSpent, position, ajaxParams)
{
	if(reportId > 0)
	{
	
		var params = {};
		params.report_id  = reportId;
		params.time_spent = timeSpent;
		params.position = position;

		if (!ajaxParams)
			ajaxParams = {};

		ajaxParams.method       = 'post';
		ajaxParams.parameters   = params;

		new Ajax.Request(
			aJsConfig.APPLICATION_URL	+ "modules/e3/learning_object_implementations/video/interface/tracking_xmlrpc.php?method=video_object_advancement_report",
			ajaxParams
			);
	}
}

