if (data.adl && data.adl.nav) { var m = String(data.adl.nav.request).match(/^(\{target=([^\}]+)\})?(choice|continue|previous|suspendAll|exit(All)?|abandon(All)?)$/); if (m) { alert("m "+m) navReq = {type: m[3].substr(0, 1).toUpperCase() + m[3].substr(1), target: m[2]}; } } 
function onTerminate(data) {	//alert("onTerminate " + data.cmi.exit);	var navReq;	switch (data.cmi.exit)	{		case "suspend":			navReq = {type: "suspend"};			break;		case "logout":		case "time-out":			navReq = {type: "exitAll"};			// abort ongoing navigation			abortNavigation();			break;		default : // "", "normal"			if (data.adl && data.adl.nav) 			{				var m = String(data.adl.nav.request).match(/^(\{target=([^\}]+)\})?(choice|continue|previous|suspendAll|exit(All)?|abandon(All)?)$/);				if (m) 				{					alert("m "+m)					navReq = {type: m[3].substr(0, 1).toUpperCase() + m[3].substr(1), target: m[2]};				}			}			break;	}	if (navReq) 	{		// will only work if no navigation is ongoing 		// so we delay to next script cycle		// and use closure to retain current variable scope		//alert('ADLNAV => '+[navReq.type, navReq.target])	//	alert(navReq.type, navReq.target);		if (navReq.type!="suspend") {			launchNavType(navReq.type);		}	/*	window.setTimeout( 			new (function (type, target) {				return function () {					execNavigation(type, target);				}			})(navReq.type, navReq.target), 0);		*/		}	return true;}
6251	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6251/19b3b8c6671e7b19f9f49c3801abff3544c74d70/main.js/clean/Modules/Scorm2004/scripts/main.js