' ); } function SetVariables( variables) { var d = new Date(); tstart = d.getTime(); if( isAppNeeded == 1 ) document.ForSwf.SetVar(variables + notFromAsp + "#"); movieObj = InternetExplorer ?PADEMO2:document.PADEMO2; loggedin = "TRUE"; var nList = variables; var nIndex = nList.lastIndexOf("#"); var fIndex = nList.indexOf("#"); userid = nList.substring(0,fIndex); nList = nList.substring(fIndex+1,nIndex); fIndex = nList.indexOf("#"); rpeid = nList.substring(0,fIndex); nList = nList.substring(fIndex+1,nIndex); fIndex = nList.indexOf("#"); server = nList.substring(0,fIndex); nList = nList.substring(fIndex+1,nIndex); ltotalfrms = nList; } function SetFileInfo(variables) { if( isAppNeeded == 1 ) document.ForSwf.SetFileInfo(variables); var nList = variables; var nIndex = nList.lastIndexOf("#"); var fIndex = nList.indexOf("#"); filetype = nList.substring(0,fIndex); nList = nList.substring(fIndex+1,nIndex); if ( filetype == 1) { lessonname = nList; lframeno = "1"; } } function SetFrameNum( variables ) { variables++; if( isAppNeeded == 1 ) document.ForSwf.SetFrameNum(variables); lframeno = variables; } function init() { var protocol = document.location.protocol; document.PADEMO2.SetVariable("/:PROTOCOL",protocol); if(isNetscape == 0)document.PADEMO2.SetVariable("/:SET_FOCUS","0"); if(isNetscape == 0)document.PADEMO2.focus(); if(isNetscape == 0)timer1 = setTimeout("OnInitTimer()",1000); if(isNetscape == 0)document.PADEMO2.SetVariable( "/:IN_BROWSER_FLG","1"); var str = document.cookie; str = str.substring( str.indexOf("=")+1,str.length); var action = str.substring(0,str.indexOf("#")); if( action == "FRMVLDN" ) { fno = str.substring( str.indexOf("#")+1,str.length); timer = setTimeout("OnTimer()",1000); } else if( action == "VLDN" ) { var target = str.substring( str.indexOf("#")+1,str.indexOf("?")); var userdata = str.substring( str.indexOf("?")+1,str.indexOf("@")); fno = str.substring( str.indexOf("@")+1,str.length); if( parseInt(fno) >= 0) document.PADEMO2.GotoFrame( fno ); if( userdata.substring(userdata.length -1, userdata.length) == "~") { userdata = userdata.substring( 0,userdata.length -1); userdata = userdata + ";"; } document.PADEMO2.SetVariable( target,userdata); var tsprite = target.substring( 0,target.lastIndexOf(".")); if( tsprite != "" ) { document.PADEMO2.SetVariable( "/:spkey","1"); document.PADEMO2.SetVariable( "/:mnkey","0116"); document.PADEMO2.TCallFrame( tsprite,1); document.PADEMO2.TCallFrame( tsprite,2); document.PADEMO2.SetVariable( "/:spkey","0"); } document.cookie = "vframe = null"; } } function logout() { var protocol = document.location.protocol; movieObj = InternetExplorer ?PADEMO2:document.PADEMO2; var movie = movieObj; var de = new Date(); tstop = de.getTime(); var d = tstop-tstart; timeonline = d/1000; if(loggedin=="TRUE") { loggedin="FALSE"; movie.SetVariable("/:REPORTSHOW","0"); var v = movie.GetVariable("/:REPORTFRMNO"); movie.GotoFrame(v - 1); if( param.indexOf( "PID=" ) != -1 ) PID=movie.GetVariable("PID"); if( isNetscape != 1 ) { userid=movie.GetVariable("SID"); server=movie.GetVariable("SERVER"); isBookmark="FALSE"; } if(filetype=="1"&isBookmark == "TRUE") { var isbm=confirm(''); if(isbm) { if( isNetscape != 1 ) { lessonname=movie.GetVariable("LNM"); lframeno=movie.GetVariable("LFN"); } if (isAppNeeded == 1) { document.ForSwf.UpdateDatabase(server,userid,courseid,timeonline,ltotalfrms,lessonname,lframeno, notFromAsp); } else { var p = protocol+"//"+server+"/scripts/ManagerExtn20a.dll?CloseCourseSession?&lUID="+userid+"&lCID="+courseid+"&shLoginStatus=1&lTimespent="+timeonline+"&lTotalFrame="+ltotalfrms+"&strLessonName="+lessonname+"&lProgress="+lframeno+"&shFlag="+notFromAsp+";"; if (PID > 0) p = p + "&PID="+PID; document.location = p } alert(''); } else { if (isAppNeeded == 1) { document.ForSwf.UpdateDatabase(server,userid,courseid,timeonline,ltotalfrms,0,0, notFromAsp ); } else { var p= protocol+"//"+server+"/scripts/ManagerExtn20a.dll?CloseCourseSession?&lUID="+userid+"&lCID="+courseid+"&shLoginStatus=1&lTimespent="+timeonline+"&lTotalFrame="+ltotalfrms+"&strLessonName=&lProgress=&shFlag="+notFromAsp+";"; if (PID > 0) p = p + "&PID="+PID; document.location = p } } if( notFromAsp ) alert( "You have successfully logged out "); } else { if (isAppNeeded == 1) { document.ForSwf.UpdateDatabase(server,userid,courseid,timeonline,ltotalfrms,0,0, notFromAsp); } else { //document.location = protocol+"//"+server+"/scripts/RPEManagerExtn.dll?InetRPELogoutUser?&SID="+userid+"&FromApp=1"; } if( notFromAsp || history.length == 0 ) alert( "You have successfully logged out "); } if( isAppNeeded == 0 && isNetscape == 1) { if ( notFromAsp ) document.location = href; } } document.cookie = "InitFullscreen=0"; } function CloseParent(newwin,window) { if(newwin.closed) { window.opener=top; window.close(); } } function OnLoading() { if (bIsParent == 1 ) { init(); } } function OnBeforeUnLoading() { if (bIsParent == 1 ) { logout(); } if (bIsParent == 2 && fromLMS != -1) { newwin.close(); } } function OnUnLoading() { if (bIsParent == 1 ) { logout(); } } function doMouseEnter() { document.PADEMO2.SetVariable( "/:FOCUS_IN","1"); } function doMouseOut() { document.PADEMO2.SetVariable( "/:FOCUS_IN","0"); } function OnTimer() { document.PADEMO2.GotoFrame( parseInt( fno )); document.PADEMO2.SetVariable( "/:RefreshFlg","1"); document.PADEMO2.SetVariable( "/:RefreshKeyCode","116"); timer1 = setTimeout("OnTimer_Final()",500); clearTimeout( timer ); } function OnTimer_Final() { document.PADEMO2.TCallFrame("/FrKeyValidationSprite",1); clearTimeout(timer1); document.cookie = "vframe = null"; } function OnInitTimer() { document.PADEMO2.SetVariable("/:SET_FOCUS","1"); clearTimeout(timer1); } function OnLeftSingleClick( name ) { //Add your code here } function OnRightSingleClick( name ) { //Add your code here } function GetFocus() { window.focus(); } function ReturnFocus() { if(isNetscape == 0) document.PADEMO2.focus(); document.PADEMO2.SetVariable( "/spkey","0"); } function TrapN() { var ctrl = event.ctrlKey; if((ctrl) && event.keyCode ) { event.keyCode = 555; event.returnValue = false; if(isNetscape == 0) document.PADEMO2.SetVariable( "/:SET_FOCUS","0"); if(isNetscape == 0) document.PADEMO2.focus(); if(ValFld) { tsprite = document.PADEMO2.GetVariable( "/:SetCurFcs"); var nIndex = tsprite.lastIndexOf("."); tsprite = tsprite.substring(0,nIndex); var tctrln = tsprite+":ctrln"; if(tsprite != ""); { document.PADEMO2.SetVariable( "/:spkey","1"); document.PADEMO2.SetVariable(tctrln,"1"); document.PADEMO2.SetVariable( "/:mnkey","78"); document.PADEMO2.TCallFrame(tsprite,1); document.PADEMO2.SetVariable( "/:spkey","0"); document.PADEMO2.SetVariable(tctrln,"0"); document.PADEMO2.SetVariable( "/:mnkey","0"); } } else { if(isNetscape == 0) timer1 = setTimeout("OnInitTimer()",500); if(isNetscape == 0) document.PADEMO2.SetVariable( "/:IN_BROWSER_FLG","1"); } } } //-->