API=null;function apiSetIncomplete(){scormSetValue("cmi.core.exit","suspend");scormSetValue("cmi.core.lesson_status","incomplete");}function apiGetTotalTime(){return scormGetValue("cmi.core.total_time");}function scormGetAPI(){findAPI(window);if((API==null)&&(window.opener!=null)){findAPI(window.opener);}}function scormInitialize(){if(API==null)return "false";var result=API.LMSInitialize("");return result;}function scormTerminate(){if(API==null)return "false";var result=API.LMSFinish("");API==null;return result;}function scormGetValue(name){if(API==null)return "";var value=API.LMSGetValue(name);var errCode=API.LMSGetLastError();if(errCode!="0"){return "";}else{return value;}}function scormSetValue(name,value){if(API==null)return "";var result=API.LMSSetValue(name,value+"");return result;}function scormGetLastError(){if(API==null){return "401";}return API.LMSGetLastError();}function findAPI(win){while((win.API==null)&&(win.parent!=null)&&(win.parent!=win)){win=win.parent;}API=win.API;}