\n'); } function buildFlashURL() { if ( g_served ) { if ( !doLMSInitialize() ) { var the_error = "LMS not initialized. Cannot start the course." ; //alert ( the_error ) ; // Error alert handled by the doLMSInitialize() function document.write ( the_error ) ; return ; } g_bookmark_info = doLMSGetValue ( "cmi.core.lesson_location" ) ; start_keep_alive(); } load_swf() ; } // Handle all the the FSCommand messages in a Flash movie function index_DoFSCommand(command, args) { if ( !g_served ) { return ; } var indexObj = InternetExplorer ? index : document.index; var myArgs = args; sep = myArgs.indexOf(","); arg1 = myArgs.substr(0, sep); arg2 = myArgs.substr(sep+1); switch ( command ) { case "LMSSetValue": the_return_value = doLMSSetValue(arg1,arg2); break; case "LMSCommit": doLMSCommit(); break; default: alert ( "index_lms.html - Unexpected fscommand received. " + command ) ; break; } } function shutdown() { // Need the next line in case LMS communication failed and the index object never got created. Without the next line, IE will throw an error if (document.getElementById ( "index" ) != null) { index.movie = "ui/blank.swf" ; // so GeoLearning doesn't continue playing page audio after user click's the browser's Close button } if ( !g_served ) return ; var cres = doLMSCommit(); var res = doLMSFinish(); if ( !window.opener || window.opener.closed ) { // do nothing }else{ //alert ("sees opener"); window.opener.close(); } return; } function exit_course() { var x = false ; x = window.confirm("Are you sure you want to exit the course?\n\nClick OK to exit the course. Click Cancel to return to the course.") if (x) { window.close(); } } // keep alive code var g_timer__keep_alive ; function start_keep_alive() { // this function is called by buildFlashURL() once the LMS successfully initializes clearInterval ( g_timer__keep_alive ); //g_timer__keep_alive = setInterval ( "send_keep_alive()", 300000 ) ; // keep alive every 5 minutes //g_timer__keep_alive = setInterval ( "send_keep_alive()", 10000 ) ; // keep alive every 10 seconds g_timer__keep_alive = setInterval ( "send_keep_alive()", 60000 ) ; // keep alive every 1 minutes } function send_keep_alive() { if ( !g_served ) return ; var retval = doLMSCommit(); //alert ( "Commit sent" ) ; } var g_popup_window ; function popup_window ( the_url ) { var the_window_properties = "location=no,status=no,resizable=yes,scrollbars=yes,width=1010,height=700" ; if ( !g_popup_window || g_popup_window.closed ) { g_popup_window = window.open ( the_url, "", the_window_properties ); }else{ g_popup_window.location.href = the_url ; g_popup_window.focus(); } } function popup_window_no_properties ( the_url ) { var the_window_properties = "location=yes,status=yes,resizable=yes,scrollbars=yes,toolbar=yes,width=1024,height=768" ; if ( !g_popup_window || g_popup_window.closed ) { g_popup_window = window.open ( the_url, "", the_window_properties ); }else{ g_popup_window.location.href = the_url ; g_popup_window.focus(); } } //-->