\n'); } //==================================================================== // More SCORM Functions var findAPITries = 0; function findAPI2004(win) { findAPITries = 0; // trapping possible cross domain issues var tempObj = null; var validLocation = true; var winAPI = null; try { tempObj = win.API_1484_11 ; } catch (e) { validLocation = false; } try { tempObj = win.parent; } catch (e) { validLocation = false; } while ( validLocation && (win.API_1484_11 == null) && (win.parent != null) && (win.parent != win)) { findAPITries++; // Note: 7 is an arbitrary number, but should be more than sufficient if (findAPITries > 7) { //alert("Error finding API -- too deeply nested."); return null; } win = win.parent; // trapping possible cross domain issues try { tempObj = win.API_1484_11 ; } catch (e) { validLocation = false; } try { tempObj = win.parent; } catch (e) { validLocation = false; } } try { winAPI = win.API_1484_11 ; } catch (e) {} return winAPI; } function findAPI(win) { findAPITries = 0; // trapping possible cross domain issues var tempObj = null; var validLocation = true; var winAPI = null; try { tempObj = win.API; } catch (e) { validLocation = false; } try { tempObj = win.parent; } catch (e) { validLocation = false; } while ( validLocation && (win.API == null) && (win.parent != null) && (win.parent != win)) { findAPITries++; // Note: 7 is an arbitrary number, but should be more than sufficient if (findAPITries > 7) { //alert("Error finding API -- too deeply nested."); return null; } win = win.parent; // trapping possible cross domain issues try { tempObj = win.API; } catch (e) { validLocation = false; } try { tempObj = win.parent; } catch (e) { validLocation = false; } } try { winAPI = win.API; } catch (e) {} return winAPI; } function getAPI2004() { // trapping possible cross domain issues var tempObj = null; var validLocation = true; var theAPI = findAPI2004(window); // trapping possible cross domain issues try { tempObj = window.opener; } catch (e) { validLocation = false; } if ( validLocation && (theAPI == null) && (window.opener != null) && (typeof(window.opener) != "undefined")) theAPI = findAPI(window.opener); if (theAPI == null) { // alert("Unable to find an API adapter"); } return theAPI } function getAPI() { // trapping possible cross domain issues var tempObj = null; var validLocation = true; var theAPI = findAPI(window); // trapping possible cross domain issues try { tempObj = window.opener; } catch (e) { validLocation = false; } if ( validLocation && (theAPI == null) && (window.opener != null) && (typeof(window.opener) != "undefined")) theAPI = findAPI(window.opener); if (theAPI == null) { //alert("Unable to find an API adapter"); } else { APIFound=true } return theAPI } //-->