\n'); } function myOnload() { checkInitializeScormAPI(); if(scormAPI == null) { var elem = document.getElementById("flashcontent"); elem.style.display = "none"; alert("You must be logged in to view this course."); } else { handleResize(); var courseObj = InternetExplorer ? course : document.course; courseObj.focus(); } } function convertTotalSeconds(ts) { var sec = (ts % 60); ts -= sec; var tmp = (ts % 3600); //# of seconds in the total # of minutes ts -= tmp; //# of seconds in the total # of hours sec = Math.round(sec*100)/100; var strSec = new String(sec); var strWholeSec = strSec; if(strSec.indexOf(".") != -1) { strWholeSec = strSec.substring(0, strSec.indexOf(".")); } if(strWholeSec.length < 2) { strWholeSec = "0" + strWholeSec; } strSec = strWholeSec; var hour = 0; var min = 0; if((ts % 3600) == 0) { hour = (ts / 3600); } var min = 0; if((tmp % 60) == 0) { min = (tmp / 60); } if((new String(hour)).length < 2) { hour = "0"+hour; } if((new String(min)).length < 2) { min = "0"+min; } var rtnVal = hour+":"+min+":"+strSec; return rtnVal; } function onUnload() { var currentDate = new Date().getTime(); var elapsedSeconds = ( (currentDate - startDate) / 1000); doLMSSetValue("cmi.core.session_time", convertTotalSeconds(elapsedSeconds)); var courseObj = InternetExplorer ? course : document.course; var sLocation = courseObj.GetVariable("nextReturnToPage"); sLocation += ";"; var suspenddata = courseObj.GetVariable("suspenddata"); if(suspenddata != null) { sLocation += suspenddata; } if(!scoClosed) { scoClosed = true; doLMSSetValue("cmi.core.lesson_location", sLocation); // doLMSSetValue("cmi.suspend_data", courseObj.GetVariable("suspenddata")); doLMSSetValue("cmi.core.exit", ""); doLMSCommit(); doLMSFinish(); } } function handleResize() { var availHeight = 0; var availWidth = 0; if(typeof( window.innerWidth ) == 'number' ) { availHeight = window.innerHeight; availWidth = window.innerWidth; } else if(document.documentElement && document.documentElement.clientHeight) { availHeight = document.documentElement.clientHeight; availWidth = document.documentElement.clientWidth; } else if( document.body && document.body.clientHeight) { availHeight = document.body.clientHeight; availWidth = document.body.clientWidth; } if(availHeight > (715)) { var elem = document.getElementById("flashcontent"); elem.style.height = availHeight + "px"; } }
| You need to upgrade your Flash Player |