/* 
﻿Copyright © 1998, 2012, Oracle and/or its affiliates.  All rights reserved.*/ 
var Escape={};Escape.SafeUri_EscapeCharacter="/";Escape.SafeUri_UnsafeCharacters=["<",">",'"',"'","%",";","(",")","&","+"];Escape.SafeUriEscape=function(d){return Escape.__Escape(d,1)};Escape.SafeUriUnEscape=function(d){return Escape.__UnEscape(d,1)};Escape.MyEscape=function(d){return Escape.__Escape(d,0)};Escape.MyUnEscape=function(d){return Escape.__UnEscape(d,0)};
Escape.__Escape=function(d,e){for(var g="",j=0;j<d.length;j++){ss=d.substr(j,1);if(e==0?Escape.__Normal_Contains(ss):!Escape.__SafeUri_Contains(ss))g+=ss;else{ss=d.charCodeAt(j);a="0000"+ss.toString(16).toUpperCase();g+=(e==0?"$":Escape.SafeUri_EscapeCharacter)+a.substr(a.length-4)}}return g};
Escape.__UnEscape=function(d,e){for(var g="",j=false,l=0;l<d.length;l++)if(j){ss=d.substr(l,4);g+=String.fromCharCode(parseInt("0x"+ss));l+=3;j=false}else{ss=d.substr(l,1);if(ss==(e==0?"$":Escape.SafeUri_EscapeCharacter))j=true;else g+=ss}return g};Escape.__Normal_Contains=function(d){return d>="0"&&d<="9"||d>="a"&&d<="z"||d>="A"&&d<="Z"};
Escape.__SafeUri_Contains=function(d){for(var e=Escape.SafeUri_UnsafeCharacters.length,g=0;g<e;g++)if(d==Escape.SafeUri_UnsafeCharacters[g])return true;if(d==Escape.SafeUri_EscapeCharacter)return true;return false};function UrlParser(){this.params=[];this.safemode=false}UrlParser.prototype.Clone=function(){var d=new UrlParser;d.params=[];d.safemode=this.safemode;for(var e in this.params)if(this.params[e]!=null)d.params[e]=this.params[e];return d};
UrlParser.prototype.Parse=function(){var d,e;d=document.location.hash.substring(1);d=d.split("&");if(d.length==0||d[0]==""){d=document.location.search.substring(1);d=d.split("&")}if(d.length>0)if(d[0].toLowerCase().substr(0,3)=="su="){this.safemode=true;d=d[0].substr(3);d=Escape.SafeUriUnEscape(d);d=d.split("&")}for(var g=0;g<d.length;g++){e=d[g];if(e.length!=0){var j=e.split("=");if(j.length==2)this.params[j[0].toLowerCase()]=j[1];else if(j.length<2)this.params[j[0].toLowerCase()]="";else this.params[j[0].toLowerCase()]=
e.substr(j[0].length+1)}}};UrlParser.prototype.GetSafeMode=function(){return this.safemode};UrlParser.prototype.SetSafeMode=function(d){this.safemode=d};UrlParser.prototype.GetParameter=function(d){return this.params[d.toLowerCase()]};UrlParser.prototype.AddParameter=function(d,e){this.params[d.toLowerCase()]=e};UrlParser.prototype.RemoveParameter=function(d){this.params[d.toLowerCase()]=null};UrlParser.prototype.ClearParameterList=function(){this.params=null;this.params=[]};
UrlParser.prototype.BuildParameterList=function(d){d="";var e=true,g;for(g in this.params){var j=this.params[g];if(j!=null){if(e==false)d+="&";e=false;d+=j.length==0?g:g+"="+this.params[g]}}if(this.safemode)d="su="+Escape.MyEscape(d);return d};
UrlParser.prototype.GetCorrectUrl=function(d,e){if(!this.safemode)return d;var g,j=d.indexOf("#");if(j==-1)j=d.indexOf("?");if(j>=0){var l=d.substring(j+1);g=l.split("&");if(g[0].toLowerCase().substr(0,3)=="su=")return d;return d.substring(0,j+1)+"su="+Escape.SafeUriEscape(l)}else return d+(e?"":"?su=")};function Cookie(d,e,g,j,l,m){this.$document=d;this.$name=e;if(g=="today"){d=new Date;d.setHours(23);d.setMinutes(59);d.setSeconds(59);this.$exp=d}else this.$exp=g?new Date((new Date).getTime()+g*864E5):null;this.$path=j?j:null;this.$domain=l?l:null;this.$secure=m?true:false}
Cookie.prototype.Store=function(){if(PlayerConfig.EnableCookies){var d="",e;for(e in this)if(!(e.charAt(0)=="$"||typeof this[e]=="function")){if(d!="")d+="&";d+=e+":"+escape(this[e])}d=this.$name+"="+d;if(this.$exp)d+="; expires="+this.$exp.toGMTString();if(this.$path)d+="; path="+this.$path;if(this.$domain)d+="; domain="+this.$domain;if(this.$secure)d+="; secure=";this.$document.cookie=d}};
Cookie.prototype.Load=function(){if(!PlayerConfig.EnableCookies)return false;var d=this.$document.cookie;if(d=="")return false;var e=d.indexOf(this.$name+"=");if(e==-1)return false;e+=this.$name.length+1;var g=d.indexOf(";",e);if(g==-1)g=d.length;d=d.substring(e,g).split("&");for(e=0;e<d.length;e++){g=d[e].split(":");this[g[0]]=unescape(g[1])}return true};
Cookie.prototype.Remove=function(){if(PlayerConfig.EnableCookies){var d=this.$name+"=";if(this.$path)d+="; path="+this.$path;if(this.$domain)d+="; domain="+this.$domain;d+="; expires=Fri, 02-Jan-1970 00:00:00 GMT";this.$document.cookie=d}};function UserPreferences(){this.EnablePreferences=true;this.TimeStamp="000000000000";this.ShowLeadIn=this.PlayAudio="all";this.MarqueeColor="red";this.TryIt={};this.TryIt.EnableSkipping=true;this.DoIt={};this.DoIt.HotKey={};this.DoIt.HotKey.Ctrl="L";this.DoIt.HotKey.Shift="N";this.DoIt.HotKey.Alt="L";this.DefaultPlayMode="S";this.WebPageAutoPlayback=true;this.NavbarVolume=100}
UserPreferences.prototype.Copy=function(d){this.TimeStamp=d.TimeStamp;this.PlayAudio=d.PlayAudio;this.ShowLeadIn=d.ShowLeadIn;this.MarqueeColor=d.MarqueeColor;this.TryIt.EnableSkipping=d.TryIt.EnableSkipping;this.DoIt.HotKey.Ctrl=d.DoIt.HotKey.Ctrl;this.DoIt.HotKey.Shift=d.DoIt.HotKey.Shift;this.DoIt.HotKey.Alt=d.DoIt.HotKey.Alt;this.DefaultPlayMode=d.DefaultPlayMode;this.WebPageAutoPlayback=d.WebPageAutoPlayback;this.NavbarVolume=d.NavbarVolume};
UserPreferences.prototype.Compare=function(d){if(this.PlayAudio!=d.PlayAudio)return true;if(this.ShowLeadIn!=d.ShowLeadIn)return true;if(this.MarqueeColor!=d.MarqueeColor)return true;if(this.TryIt.EnableSkipping!=d.TryIt.EnableSkipping)return true;if(this.DoIt.HotKey.Ctrl!=d.DoIt.HotKey.Ctrl)return true;if(this.DoIt.HotKey.Shift!=d.DoIt.HotKey.Shift)return true;if(this.DoIt.HotKey.Alt!=d.DoIt.HotKey.Alt)return true;if(this.DefaultPlayMode!=d.DefaultPlayMode)return true;if(this.WebPageAutoPlayback!=
d.WebPageAutoPlayback)return true;if(this.NavbarVolume!=d.NavbarVolume)return true;return false};UserPreferences.prototype.GetCookie=function(){return new Cookie(document,"OnDemandPlayer",365,"/")};
UserPreferences.prototype.LoadCookie=function(){var d=this.GetCookie();d.Load();if(!(UserPrefs.TimeStamp!="000000000000"&&(!d.TimeStamp||UserPrefs.TimeStamp>d.TimeStamp))){if(d.PlayAudio)this.PlayAudio=d.PlayAudio;if(d.ShowLeadIn)this.ShowLeadIn=d.ShowLeadIn;if(d.MarqueeColor)this.MarqueeColor=d.MarqueeColor;if(d.TryIt_EnableSkipping)this.TryIt.EnableSkipping=d.TryIt_EnableSkipping=="true";if(d.DoIt_HotKey_Ctrl)this.DoIt.HotKey.Ctrl=d.DoIt_HotKey_Ctrl;if(d.DoIt_HotKey_Shift)this.DoIt.HotKey.Shift=
d.DoIt_HotKey_Shift;if(d.DoIt_HotKey_Alt)this.DoIt.HotKey.Alt=d.DoIt_HotKey_Alt;if(d.DefaultPlayMode)this.DefaultPlayMode=d.DefaultPlayMode;if(d.WebPageAutoPlayback)this.WebPageAutoPlayback=d.WebPageAutoPlayback;if(d.NavbarVolume)this.NavbarVolume=d.NavbarVolume}};
UserPreferences.prototype.StoreCookie=function(){var d=this.GetCookie();d.TimeStamp=this.TimeStamp;d.PlayAudio=this.PlayAudio;d.ShowLeadIn=this.ShowLeadIn;d.MarqueeColor=this.MarqueeColor;d.TryIt_EnableSkipping=this.TryIt.EnableSkipping;d.DoIt_HotKey_Ctrl=this.DoIt.HotKey.Ctrl;d.DoIt_HotKey_Shift=this.DoIt.HotKey.Shift;d.DoIt_HotKey_Alt=this.DoIt.HotKey.Alt;d.DefaultPlayMode=this.DefaultPlayMode;d.WebPageAutoPlayback=this.WebPageAutoPlayback;d.NavbarVolume=this.NavbarVolume;d.Store()};
UserPreferences.prototype.GetUrlParamString=function(){return"PP_SOUND="+this.PlayAudio+"&PP_LEADIN="+this.ShowLeadIn+"&PP_SKIP="+(this.TryIt.EnableSkipping?"true":"false")+"&PP_MARQUEE="+this.MarqueeColor+"&PP_ENABLE="+(this.EnablePreferences?"true":"false")+"&PP_HOTKEY="+this.DoIt.HotKey.Ctrl+this.DoIt.HotKey.Shift+this.DoIt.HotKey.Alt};
UserPreferences.prototype.ParseUrlParamString=function(d){d=d.split("&");for(var e=0;e<d.length;e++){var g=d[e].split("=");if(g[0].toUpperCase()=="PP_SOUND")this.PlayAudio=g[1];else if(g[0].toUpperCase()=="PP_LEADIN")this.ShowLeadIn=g[1];else if(g[0].toUpperCase()=="PP_MARQUEE")this.MarqueeColor=g[1];else if(g[0].toUpperCase()=="PP_SKIP")this.TryIt.EnableSkipping=g[1]=="true";else if(g[0].toUpperCase()=="PP_ENABLE")this.EnablePreferences=g[1]=="true";else if(g[0].toUpperCase()=="PP_HOTKEY"){this.DoIt.HotKey.Ctrl=
g[1].charAt(0);this.DoIt.HotKey.Shift=g[1].charAt(1);this.DoIt.HotKey.Alt=g[1].charAt(2)}}};var UserPrefs=new UserPreferences;window.SetDefaultPreferences&&SetDefaultPreferences();UserPrefs.EnablePreferences&&UserPrefs.LoadCookie();var paramstr=unescape(document.location.hash.substring(1));if(paramstr=="")paramstr=unescape(document.location.search.substring(1));UserPrefs.EnablePreferences&&UserPrefs.LoadCookie();UserPrefs.ParseUrlParamString(paramstr);
function OpenPreferencesDialog(d,e,g){if(UserPrefs.EnablePreferences){d+="/preferences/preferences.html";h=412;var j=[];try{if(lms_IsUserProfileAvailable()){var l=lms_GetUserProfileUrl();if(l!="")j[j.length]="UserProfileUrl="+Escape.MyEscape(l)}}catch(m){}if(e)j[j.length]="nosound";if(g){j[j.length]="seeitonly";h=412}for(e=0;e<j.length;e++){d+=e==0?"?":"&";d+=j[e]}window.open(d,"prefwin","width=550,height="+h+",resizable=1,scrollbars=0,top="+(screen.availHeight-290)/2+",left="+(screen.availWidth-
550)/2)}else alert(R_preferences_disabled)}function SessionPreferences(){this.swipeInstructionShowed=false}SessionPreferences.prototype.GetCookie=function(){return new Cookie(document,"OnDemandPlayerSession",null,"/")};SessionPreferences.prototype.LoadCookie=function(){var d=this.GetCookie();d.Load();if(d.swipeInstructionShowed)this.swipeInstructionShowed=d.swipeInstructionShowed};
SessionPreferences.prototype.StoreCookie=function(){var d=this.GetCookie();d.swipeInstructionShowed=this.swipeInstructionShowed;d.Store()};var SessionPrefs=new SessionPreferences;function UserRolesClass(){this.Filtering=false;this.Roles=[]}UserRolesClass.prototype.Copy=function(d){this.Filtering=d.Filtering;this.Roles=[];for(var e=0;e<d.Roles.length;e++)this.Roles[e]=d.Roles[e]};
UserRolesClass.prototype.Compare=function(d){if(this.Filtering!=d.Filtering)return true;if(this.Roles.length!=d.Roles.length)return true;for(var e=0;e<this.Roles.length;e++)if(this.Roles[e]!=d.Roles[e])return true;return false};UserRolesClass.prototype.GetCookie=function(){return new Cookie(document,"OnDemandPlayerRoles",365,"/")};
UserRolesClass.prototype.LoadCookie=function(){var d=this.GetCookie();d.Load();this.Filtering=false;if(d.Filtering)this.Filtering=d.Filtering=="true";this.Roles=[];if(d.Roles)this.Roles=d.Roles.split("+")};UserRolesClass.prototype.StoreCookie=function(){var d=this.GetCookie();d.Filtering=this.Filtering?"true":"false";d.Roles=this.Roles.join("+");d.Store()};UserRolesClass.prototype.GetUrlParamString=function(){return"PP_ROLEFILTERING="+(this.Filtering?"true":"false")+"&PP_ROLES="+encodeURIComponent(this.Roles.join("+"))};
UserRolesClass.prototype.ParseUrlParamString=function(d){d=d.split("&");for(var e=0;e<d.length;e++){var g=d[e].split("=");if(g[0].toUpperCase()=="PP_ROLEFILTERING")this.Filtering=g[1]=="true";else if(g[0].toUpperCase()=="PP_ROLES"){this.Roles=[];if(g[1])this.Roles=g[1].split("+")}}};var UserRoles=new UserRolesClass;UserRoles.LoadCookie();UserRoles.ParseUrlParamString(paramstr);
function OpenRolesDialog(d){window.open(d+"/preferences/roles.html","roleswin","width=500,height=318,resizable=1,scrollbars=0,top="+(screen.availHeight-286)/2+",left="+(screen.availWidth-500)/2)};var intPos=window.location.search.toLowerCase().indexOf("aicc_url"),intPos2=window.location.search.toLowerCase().indexOf("aicc_sid");function getOnlyPath(d){for(;d.indexOf("\\")!=-1;)d=d.replace("\\","/");return d.substr(0,d.lastIndexOf("/"))}
if(intPos>-1&&intPos2>-1){if(LmsConfig.AiccAppletPath==""){var currentPgPath=window.location.protocol+"//"+window.location.host+getOnlyPath(window.location.pathname);fullPath=currentPgPath+"/"+lms_path+"js"}else fullPath=LmsConfig.AiccAppletPath;document.write("<div style='position: absolute;'><applet NAME='GetHTTPPostData' codebase='"+fullPath+"' code='GetHTTPPostData.class' width='1' height='1' MAYSCRIPT></applet></div>")};function InsertRuntimeAPI(d){if(Kpath_launch==false)setTimeout(d,1);else{var e=findKPathAPIFrame(window);if(e==null){e=document.createElement("iframe");e.id="KPATH_API_FRAME";e.style.display="none";document.body.appendChild(e);if(d)if(navigator.appName=="Microsoft Internet Explorer")e.attachEvent("onload",d);else e.onload=d;e.src=Kpath_Runtime_API}else setTimeout(d,1)}}
function findKPathAPIFrame(d){var e=null,g=0,j=d;try{for(;j!=null;){e=j.document.getElementById("KPATH_API_FRAME");if(e!=null)return e.contentWindow;g++;if(g>7)break;if(j===j.parent)break;j=j.parent}if(d.top.opener!=null)return findKPathAPIFrame(d.top.opener)}catch(l){}return null}var _GlobalLmsComFactory=null;function GetLmsComFactory(){_GlobalLmsComFactory==null&&alert(R_initializelmscom_not_called);return _GlobalLmsComFactory}
function CheckForLMSAPI(){if(_lmsMode=="LMS"&&!(_GlobalLmsComFactory.api_type=="scorm2004"||_GlobalLmsComFactory.api_type=="scorm12"||_GlobalLmsComFactory.api_type=="aicc"||_GlobalLmsComFactory.api_type=="kpath"&&findKPathAPIFrame(window)))alert(R_scorm_noapi);_lmsMode=="KPT"&&!findKPathAPIFrame(window)&&alert(R_scorm_noapi)}function InitializeLmsCom(){_GlobalLmsComFactory=new LmsComFactory(window.location.search)}
function LmsComFactory(d){this.api_type="none";this.launch_arg=d;this.aicc_sid=this.aicc_url="";this.scorm_api_2004=this.scorm_api_12=null;d=this.launch_arg.substring(1).split("&");lmslog.addEntry(0,"LmsComFactory","strArgs",d);for(var e=0;e<d.length;e++){strArg=d[e];var g;g=this.CheckParam(strArg,"aicc_url=");if(g!="")this.aicc_url=g.substr(0,4).toLowerCase()!="http"?LmsConfig.AiccUrlProtocol+g:g;else{g=this.CheckParam(strArg,"aicc_sid=");if(g!="")this.aicc_sid=g}}if(LmsConfig.ScormVersion!=="1.2")this.scorm_api_2004=
this.FindScorm2004API();if(this.scorm_api_2004==null&&LmsConfig.ScormVersion!=="2004")this.scorm_api_12=this.FindScorm12API();if(this.aicc_url!=""&&this.aicc_sid!="")this.api_type="aicc";else if(Kpath_launch==true)this.api_type="kpath";else if(this.scorm_api_2004!=null)this.api_type="scorm2004";else if(this.scorm_api_12!=null)this.api_type="scorm12"}
LmsComFactory.prototype.CreateLmsCom=function(){if(this.api_type=="aicc")return new LmsComAICC(this.aicc_url,this.aicc_sid);else if(this.api_type=="scorm2004")return new LmsComScorm2004;else if(this.api_type=="kpath"){var d=new LmsComKPath;d.API=this.scorm_api_2004;return d}else if(this.api_type=="scorm12")return new LmsComScorm12;return PlayerConfig.EnableCookies?new LmsComCookie:new LmsComBase};
LmsComFactory.prototype.FindScorm12API=function(){try{var d=this.FindWindowScorm12API(window);if(d==null&&top.window.opener!=null&&!top.window.opener.closed)d=this.FindWindowScorm12API(top.window.opener);return d}catch(e){return null}};LmsComFactory.prototype.FindWindowScorm12API=function(d){for(var e=0;d.API==null&&d.parent!=null&&d.parent!=d;){e++;if(e>500){lmslog.addEntry(0,"FindScorm12API","",R_scorm_apideep);return null}d=d.parent}return d.API};
LmsComFactory.prototype.FindScorm2004API=function(){try{var d=this.FindWindowScorm2004API(window);if(d==null&&top.window.opener!=null&&!top.window.opener.closed)d=this.FindWindowScorm2004API(top.window.opener);return d}catch(e){return null}};LmsComFactory.prototype.FindWindowScorm2004API=function(d){for(var e=0;d.API_1484_11==null&&d.parent!=null&&d.parent!=d;){e++;if(e>500){lmslog.addEntry(0,"FindScorm2004API","",R_scorm_apideep);return null}d=d.parent}return d.API_1484_11};
LmsComFactory.prototype.CheckParam=function(d,e){var g=e.length,j="";if(d.substr(0,g).toLowerCase()==e)j=d.substring(g);return j};var LMS_PASSED="passed",LMS_FAILED="failed",LMS_COMPLETED="completed",LMS_INCOMPLETE="incomplete",LMS_NOT_ATTEMPTED="not attempted";Date.prototype.toSCORM=function(){return this.getFullYear()+"-"+("0"+(this.getMonth()+1)).slice(-2)+"-"+("0"+this.getDate()).slice(-2)+"T"+("0"+this.getHours()).slice(-2)+":"+("0"+this.getMinutes()).slice(-2)+":"+("0"+this.getSeconds()).slice(-2)};
function LmsComBase(d){this.status_obj=null;this.ordinal_number=0;this.credit=this.student_name=this.student_id=this.end_date=this.start_date="";this.lesson_status=LMS_NOT_ATTEMPTED;this.time=this.score=this.core_vendor=this.original_lesson_data=this.lesson_data=this.lesson_location=this.lesson_flag="";this.idle_time=0;this.guid=this.owner=null;this.bigsco=this.session_active=false;if(d!=null){this.Copy(d);this.ParentLmsCom=d}this.object_type_name="LmsComBase"}
LmsComBase.prototype.GetOrdinalNumber=function(){return this.ordinal_number};LmsComBase.prototype.SetOrdinalNumber=function(d){this.ordinal_number=d};LmsComBase.prototype.Copy=function(d){this.student_id=d.student_id;this.student_name=d.student_name;this.credit=d.credit;this.lesson_status=d.lesson_status;this.bigsco=d.bigsco;this.lesson_data=d.lesson_data;this.lesson_location=d.lesson_location};
LmsComBase.prototype.Begin=function(){this.start_date=(new Date).getTime();this.session_active&&alert(R_lmscom_already_active);return this.session_active=true};LmsComBase.prototype.End=function(){this.session_active||alert(R_lmscom_inactive);this.end_date=(new Date).getTime();this.session_active=false;return true};LmsComBase.prototype.LoadAPIAdapter=function(d){d()};LmsComBase.prototype.SendCompletionInfo=function(){};
LmsComBase.prototype.NotifyParent=function(){var d=this.ParentLmsCom;d&&!d.owner.closed&&d.owner.ListenChildClose&&d.owner.ListenChildClose()};LmsComBase.prototype.getReportedLessonStatus=function(){return this.lesson_status===LMS_PASSED?LmsConfig.ReportOnPass:this.lesson_status===LMS_FAILED?LmsConfig.ReportOnFail:this.lesson_status};LmsComBase.prototype.computeTime=function(d,e){return this.convertTotalSeconds((e-d-this.idle_time)/1E3)};
LmsComBase.prototype.convertTotalSeconds=function(d){var e=d%60;d-=e;var g=d%3600;d-=g;e=Math.round(e*100)/100;var j=e=new String(e);if(e.indexOf(".")!=-1){j=e.substring(0,e.indexOf("."));e.substring(e.indexOf(".")+1,e.length)}if(j.length<2)j="0"+j;e=j;d=d%3600!=0?0:d/3600;g=g%60!=0?0:g/60;if((new String(d)).length<2)d="0"+d;if((new String(g)).length<2)g="0"+g;return d+":"+g+":"+e};LmsComBase.prototype.GetBookmark=function(d){if(this.ParentLmsCom)return this.ParentLmsCom.GetBookmark(d);return 0};
LmsComBase.prototype.doGetUPKValue=function(d){if(this.ParentLmsCom)return this.ParentLmsCom.doGetUPKValue(d);return""};LmsComBase.prototype.doSetUPKValue=function(d,e){this.ParentLmsCom&&this.ParentLmsCom.doSetUPKValue(d,e)};LmsComBase.prototype.doUPKCommit=function(){this.ParentLmsCom&&this.ParentLmsCom.doUPKCommit()};LmsComBase.prototype.setInteraction=function(d,e){if(this.ParentLmsCom)return this.ParentLmsCom.setInteraction(d,e)};
LmsComBase.prototype.getAnsweredQuestions=function(){if(this.ParentLmsCom)return this.ParentLmsCom.getAnsweredQuestions();return{}};LmsComBase.prototype.setObjective=function(d,e){this.ParentLmsCom&&this.ParentLmsCom.setObjective(d,e)};LmsComBase.prototype.requestContinue=function(){this.ParentLmsCom&&this.ParentLmsCom.requestContinue()};LmsComBase.prototype.IsConnected=function(){if(this.ParentLmsCom)return this.ParentLmsCom.IsConnected();return false};
LmsComBase.prototype.OpenBasicStatus=function(){this.status_obj=new LmsBasicStatus;this.status_obj.status=this.lesson_status;return this.status_obj};
LmsComBase.prototype.OpenTopicStatus=function(d,e){this.status_obj=new LmsTopicStatus;this.status_obj.setRequiredMode(d,e);lmslog.addEntry(0,"OpenTopicStatus","RequiredMode",this.status_obj.requiredMode);this.status_obj.isScored=!!d.K;var g;g=GetTopLevelLmsMode()=="LMS"?d:e;this.status_obj.setModeavail("S",g.S);this.status_obj.setModeavail("T",g.T);this.status_obj.setModeavail("K",g.K);this.status_obj.setModeavail("D",g.D);this.status_obj.setModeavail("P",g.P);this.status_obj.setModeavail("E",g.E);
lmslog.addEntry(0,"OpenTopicStatus","SeeIt",this.status_obj.getModeavail("S"));lmslog.addEntry(0,"OpenTopicStatus","TryIt",this.status_obj.getModeavail("T"));lmslog.addEntry(0,"OpenTopicStatus","KnowIt",this.status_obj.getModeavail("K"));lmslog.addEntry(0,"OpenTopicStatus","DoIt",this.status_obj.getModeavail("D"));lmslog.addEntry(0,"OpenTopicStatus","PrintIt",this.status_obj.getModeavail("P"));lmslog.addEntry(0,"OpenTopicStatus","TestIt",this.status_obj.getModeavail("E"));if(this.bigsco){this.status_obj.savedStatus=
this.lesson_data.charAt(0);this.lesson_data=this.lesson_data.substring(1)}this.status_obj.initTopicstat(this.lesson_data);return this.status_obj};
LmsComBase.prototype.OpenTopicLaunchStatus=function(d,e,g){this.status_obj=new LmsTopicLaunchStatus(d);this.status_obj.setRequiredMode(e,g);lmslog.addEntry(0,"OpenTopicLaunchStatus","RequiredMode",this.status_obj.requiredMode);this.status_obj.isScored=e.indexOf("K")!=-1;d=GetTopLevelLmsMode()=="LMS"?e:g;this.status_obj.setModeavail("S",d.indexOf("S")!=-1);this.status_obj.setModeavail("T",d.indexOf("T")!=-1);this.status_obj.setModeavail("K",d.indexOf("K")!=-1);this.status_obj.setModeavail("D",d.indexOf("D")!=
-1);this.status_obj.setModeavail("P",d.indexOf("P")!=-1);this.status_obj.setModeavail("E",d.indexOf("E")!=-1);lmslog.addEntry(0,"OpenTopicLaunchStatus","SeeIt",this.status_obj.getModeavail("S"));lmslog.addEntry(0,"OpenTopicLaunchStatus","TryIt",this.status_obj.getModeavail("T"));lmslog.addEntry(0,"OpenTopicLaunchStatus","KnowIt",this.status_obj.getModeavail("K"));lmslog.addEntry(0,"OpenTopicLaunchStatus","DoIt",this.status_obj.getModeavail("D"));lmslog.addEntry(0,"OpenTopicLaunchStatus","PrintIt",
this.status_obj.getModeavail("P"));lmslog.addEntry(0,"OpenTopicLaunchStatus","TestIt",this.status_obj.getModeavail("E"));this.status_obj.initTopicstat(this.lesson_data);return this.status_obj};LmsComBase.prototype.OpenQuestionStatus=function(){this.status_obj=new LmsQuestionStatus;this.status_obj.status=LMS_NOT_ATTEMPTED;this.status_obj.savedStatus=this.lesson_data?Stat2Lms(this.lesson_data):LMS_NOT_ATTEMPTED;return this.status_obj};
LmsComBase.prototype.OpenAssessmentStatus=function(d,e){this.status_obj=new LmsAssessmentStatus;this.status_obj.hash=e;var g=this.lesson_data,j,l=null;if(g)if(this.bigsco)l=e;else{var m=g.indexOf("@");if(m>0){j=parseInt(g.substring(0,m));l=g.substring(m+1,m+j+1).replace(/ /g,"+");g=g.substring(m+j+1)}}if(e===l&&g.length===d+1){this.status_obj.savedStatus=g.charAt(0);this.status_obj.status=g.charAt(0)==="I"?LMS_INCOMPLETE:LMS_NOT_ATTEMPTED;for(j=0;j<d;j++)this.status_obj.questionstatus[j]=g.charAt(j+
1)}else{if(g&&!this.bigsco){this.status_obj.stateDiscarded=true;this.status_obj.savedStatus=g.charAt(0)}else this.status_obj.savedStatus="N";this.status_obj.status=LMS_NOT_ATTEMPTED;for(j=0;j<d;j++)this.status_obj.questionstatus[j]="N"}return this.status_obj};LmsComBase.prototype.OpenTOCStatus=function(d,e){var g=new LmsTOCStatus;this.status_obj=g;var j=new TOCState(d,e);g.setTocState(j);this.lesson_data!=null&&this.lesson_data.length>0&&j.DeserializeTOC(this.lesson_data);return g};
LmsComBase.prototype.SaveStatus=function(){this.status_obj&&this.status_obj.Save(this)};LmsComBase.prototype.utGetModeIndex=function(){this.ParentLmsCom&&this.ParentLmsCom.utGetModeIndex()};LmsComBase.prototype.utPushModeIndex=function(){this.ParentLmsCom&&this.ParentLmsCom.utPushModeIndex()};LmsComBase.prototype.utPopModeIndex=function(){this.ParentLmsCom&&this.ParentLmsCom.utPopModeIndex()};LmsComBase.prototype.utRecordType=function(d){this.ParentLmsCom&&this.ParentLmsCom.utRecordType(d)};
LmsComBase.prototype.utRecordStartTime=function(d){this.ParentLmsCom&&this.ParentLmsCom.utRecordStartTime(d)};LmsComBase.prototype.utRecordEndTime=function(d){this.ParentLmsCom&&this.ParentLmsCom.utRecordEndTime(d)};LmsComBase.prototype.utRecordCompletionStatus=function(d){this.ParentLmsCom&&this.ParentLmsCom.utRecordCompletionStatus(d)};LmsComBase.prototype.utRecordSuccessStatus=function(d){this.ParentLmsCom&&this.ParentLmsCom.utRecordSuccessStatus(d)};
LmsComBase.prototype.utRecordScoreScaled=function(d){this.ParentLmsCom&&this.ParentLmsCom.utRecordScoreScaled(d)};LmsComBase.prototype.utRecordFrameViewed=function(d){this.ParentLmsCom&&this.ParentLmsCom.utRecordFrameViewed(d)};function LmsComScorm12(){this.allow_launch=false;this.object_type_name="LmsComScorm12"}LmsComScorm12.prototype=new LmsComBase;LmsComScorm12.prototype.constructor=LmsComScorm12;LmsComScorm12.prototype.BaseClass=LmsComBase.prototype;
LmsComScorm12.prototype.Begin=function(){LmsComScorm12.prototype.BaseClass.Begin.call(this);lmslog.addEntry(0,"LmsComScorm12.Begin","","Start");if(this.API==null){this.allow_launch=true;return false}if(this.API.LMSInitialize("")=="false"){var d=this.API.LMSGetLastError(),e=this.API.LMSGetErrorString(d)+"\n"+this.API.LMSGetDiagnostic("");this.API=null;lms_ConnectionLost(d+" "+e);lmslog.addEntry(0,"LmsComScorm12.Begin","",e);return false}this.lesson_status=this.original_lesson_status=this.doLMSGetValue("cmi.core.lesson_status");
this.lesson_data=this.doLMSGetValue("cmi.suspend_data");this.lesson_location=this.doLMSGetValue("cmi.core.lesson_location");this.student_id=this.doLMSGetValue("cmi.core.student_id");this.student_name=this.doLMSGetValue("cmi.core.student_name");this.allow_launch=true;lmslog.addEntry(0,"LmsComScorm12.Begin","","LMS session started");return true};
LmsComScorm12.prototype.End=function(){LmsComScorm12.prototype.BaseClass.End.call(this);lmslog.addEntry(0,"LmsComScorm12.End","","Start");if(!this.allow_launch)return false;this.allow_launch=false;if(this.API==null)return false;this.lesson_status==LMS_INCOMPLETE?this.doLMSSetValue("cmi.core.exit","suspend"):this.doLMSSetValue("cmi.core.exit","");this.doLMSSetValue("cmi.core.session_time",this.computeTime(this.start_date,this.end_date));this.lesson_data&&this.doLMSSetValue("cmi.suspend_data",this.lesson_data);
this.lesson_location&&this.doLMSSetValue("cmi.core.lesson_location",this.lesson_location);this.SendCompletionInfo(true);if(this.API&&this.API.LMSFinish("")=="false"){var d=this.API.LMSGetLastError(),e=this.API.LMSGetErrorString(d)+"\n"+this.API.LMSGetDiagnostic("");this.API=null;lms_ConnectionLost(d+" "+e);lmslog.addEntry(0,"LmsComScorm12.End","",e);return false}this.API=null;lmslog.addEntry(0,"LmsComScorm12.End","","LMS session terminated");return true};
LmsComScorm12.prototype.SendCompletionInfo=function(d){if(this.lesson_status===LMS_NOT_ATTEMPTED)this.original_lesson_status===LMS_NOT_ATTEMPTED?this.doLMSSetValue("cmi.core.lesson_status",LMS_INCOMPLETE):this.doLMSSetValue("cmi.core.lesson_status",this.original_lesson_status);else this.doLMSSetValue("cmi.core.lesson_status",this.getReportedLessonStatus());if(this.score!==""){this.doLMSSetValue("cmi.core.score.raw",this.score);this.doLMSSetValue("cmi.core.score.min","0");this.doLMSSetValue("cmi.core.score.max",
"100")}d||this.doLMSCommit()};LmsComScorm12.prototype.LoadAPIAdapter=function(d){this.API=null;if(GetLmsComFactory())this.API=GetLmsComFactory().scorm_api_12;d()};LmsComScorm12.prototype.IsConnected=function(){return this.API!=null};LmsComScorm12.prototype.ErrorCodes={NoError:0,GeneralException:101,ElementCannotHaveChildren:202,ElementNotAnArray:203,NotInitialized:301,NotImplemented:401,InvalidSetValue:402,ElementIsReadOnly:403,ElementIsWriteOnly:404,IncorrectDataType:405};
LmsComScorm12.prototype.doLMSGetValue=function(d){if(this.API==null)return"";var e=this.API.LMSGetValue(d),g=this.API.LMSGetLastError();if(g!=this.ErrorCodes.NoError){e=this.API.LMSGetErrorString(g);lms_ConnectionLost(g+" "+e+", "+d);lmslog.addEntry(0,"doLMSGetValue","",R_scorm_getvalfail+d+" "+e);return""}lmslog.addEntry(1,"doLMSGetValue",d,e);return e};
LmsComScorm12.prototype.doLMSSetValue=function(d,e){if(this.API==null)return"false";if(this.API.LMSSetValue(d,e)=="false"){var g=this.API.LMSGetLastError();if(g!=this.ErrorCodes.NoError&&g!=this.ErrorCodes.NotImplemented){var j=this.API.LMSGetErrorString(g);lms_ConnectionLost(g+" "+j+", "+d+", "+e);lmslog.addEntry(0,"doLMSSetValue","",R_scorm_setvalfail+d+":"+e+" "+j);return"false"}}lmslog.addEntry(1,"doLMSSetValue",d,e);return"true"};
LmsComScorm12.prototype.doLMSCommit=function(){if(this.API==null)return"false";if(this.API.LMSCommit("")=="false"){var d=this.API.LMSGetLastError(),e=this.API.LMSGetErrorString(d);lms_ConnectionLost(d+" "+e);lmslog.addEntry(0,"doLMSCommit","",e);this.API=null;return"false"}lmslog.addEntry(1,"doLMSCommit","","");return"true"};function LmsComScorm2004(){this.allow_launch=false;this.object_type_name="LmsComScorm2004";this.lesson_data_location="cmi.suspend_data"}LmsComScorm2004.prototype=new LmsComBase;
LmsComScorm2004.prototype.constructor=LmsComScorm2004;LmsComScorm2004.prototype.BaseClass=LmsComBase.prototype;
LmsComScorm2004.prototype.Begin=function(){LmsComScorm2004.prototype.BaseClass.Begin.call(this);lmslog.addEntry(0,"LmsComScorm2004.Begin","","Start");if(this.API==null){this.allow_launch=true;return false}if(this.API.Initialize("")=="false"){var d=this.API.GetLastError(),e=this.API.GetErrorString(d)+"\n"+this.API.GetDiagnostic("");this.API=null;lms_ConnectionLost(d+" "+e);lmslog.addEntry(0,"LmsComScorm2004.Begin","",e);return false}this.lesson_status=this.doGetValue("cmi.completion_status");if(this.lesson_status===
"unknown")this.lesson_status=LMS_NOT_ATTEMPTED;else if(this.lesson_status===LMS_COMPLETED){d=this.doGetValue("cmi.success_status");if(d===LMS_PASSED||d===LMS_FAILED)this.lesson_status=d}this.original_lesson_status=this.lesson_status;this.lesson_data=this.doGetValue(this.lesson_data_location);this.lesson_location=this.doGetValue("cmi.location");this.student_id=this.doGetValue("cmi.learner_id");this.student_name=this.doGetValue("cmi.learner_name");this.allow_launch=true;lmslog.addEntry(0,"LmsComScorm2004.Begin",
"","LMS session started");return true};
LmsComScorm2004.prototype.End=function(){LmsComScorm2004.prototype.BaseClass.End.call(this);lmslog.addEntry(0,"LmsComScorm2004.End","","Start");if(!this.allow_launch)return false;this.allow_launch=false;if(this.API==null)return false;this.lesson_status==LMS_INCOMPLETE?this.doSetValue("cmi.exit","suspend"):this.doSetValue("cmi.exit","normal");this.doSetValue("cmi.session_time",this.computeTime(this.start_date,this.end_date));this.lesson_data&&this.doSetValue(this.lesson_data_location,this.lesson_data);
this.lesson_location&&this.doSetValue("cmi.location",this.lesson_location);this.SendCompletionInfo(true);if(this.API&&this.API.Terminate("")=="false"){var d=this.API.GetLastError(),e=this.API.GetErrorString(d)+"\n"+this.API.GetDiagnostic("");this.API=null;lms_ConnectionLost(d+" "+e);lmslog.addEntry(0,"LmsComScorm2004.End","",e);return false}this.API=null;lmslog.addEntry(0,"LmsComScorm2004.End","","LMS session terminated");return true};
LmsComScorm2004.prototype.LoadAPIAdapter=function(d){this.API=null;if(GetLmsComFactory())this.API=GetLmsComFactory().scorm_api_2004;d()};
LmsComScorm2004.prototype.SendCompletionInfo=function(d){var e=this.getReportedLessonStatus();if(e===LMS_NOT_ATTEMPTED)e=this.original_lesson_status;if(e==LMS_PASSED||e==LMS_FAILED){this.doSetValue("cmi.success_status",e);this.doSetValue("cmi.completion_status",LMS_COMPLETED)}else this.doSetValue("cmi.completion_status",e);if(this.score!==""){this.doSetValue("cmi.score.raw",this.score);this.doSetValue("cmi.score.scaled",this.score/100);this.doSetValue("cmi.score.min","0");this.doSetValue("cmi.score.max",
"100")}d||this.doCommit()};LmsComScorm2004.prototype.convertTotalSeconds=function(d){var e=d%60;d-=e;var g=d%3600;d-=g;e=Math.round(e*100)/100;var j=e=new String(e);if(e.indexOf(".")!=-1){j=e.substring(0,e.indexOf("."));e.substring(e.indexOf(".")+1,e.length)}if(j.length<2)j="0"+j;e=j;d=d%3600!=0?0:d/3600;g=g%60!=0?0:g/60;if((new String(d)).length<2)d="0"+d;if((new String(g)).length<2)g="0"+g;return"PT"+d+"H"+g+"M"+e+"S"};LmsComScorm2004.prototype.IsConnected=function(){return this.API!=null};
LmsComScorm2004.prototype.ErrorCodes={NoError:0,GeneralException:101,GeneralInitializationFailure:102,AlreadyInitialized:103,ContentInstanceTerminated:104,GeneralTerminationFailure:111,TerminationBeforeInitialization:112,TerminationAfterTermination:113,RetrieveDataBeforeInitialization:122,RetrieveDataAfterTermination:123,StoreDataBeforeInitialization:132,StoreDataAfterTermination:133,CommitBeforeInitialization:142,CommitAfterTermination:143,GeneralArgumentError:201,GeneralGetFailure:301,GeneralSetFailure:351,
GeneralCommitFailure:391,UndefinedDataModelElement:401,UnimplementedDataModelElement:402,DataModelElementValueNotInitialized:403,DataModelElementIsReadOnly:404,DataModelElementIsWriteOnly:405,DataModelElementTypeMismatch:406,DataModelElementValueOutOfRange:407,DataModelDependencyNotEstablished:408,KPathTimeout:1501};
LmsComScorm2004.prototype.doGetValue=function(d){if(this.API==null)return"";var e=this.API.GetValue(d),g=this.API.GetLastError();if(g!=this.ErrorCodes.NoError&&g!=this.ErrorCodes.DataModelElementValueNotInitialized)if(g==this.ErrorCodes.KPathTimeout&&this.object_type_name=="LmsComKPath"){lmslog.addEntry(0,"doGetValue","","KCenter timeout");g=this.API.GetValue("upk.idle_time");lmslog.addEntry(0,"doGetValue","upk.idle_time",g);this.idle_time+=g;lmslog.addEntry(0,"doGetValue","idle_time",this.idle_time);
return this.doGetValue(d)}else{e=this.API.GetErrorString(g);lms_ConnectionLost(g+" "+e+", "+d);lmslog.addEntry(0,"doGetValue","",R_scorm_getvalfail+d+" "+e);return""}lmslog.addEntry(1,"doGetValue",d,e);return e};
LmsComScorm2004.prototype.doSetValue=function(d,e){if(this.API==null)return"false";if(this.API.SetValue(d,e)=="false"){var g=this.API.GetLastError();if(g!=this.ErrorCodes.NoError&&g!=this.ErrorCodes.UnimplementedDataModelElement)if(g==this.ErrorCodes.KPathTimeout&&this.object_type_name=="LmsComKPath"){lmslog.addEntry(0,"doSetValue","","KCenter timeout");g=this.API.GetValue("upk.idle_time");lmslog.addEntry(0,"doSetValue","upk.idle_time",g);this.idle_time+=g;lmslog.addEntry(0,"doSetValue","idle_time",
this.idle_time);return this.doSetValue(d,e)}else{var j=this.API.GetErrorString(g);lms_ConnectionLost(g+" "+j+", "+d+", "+e);lmslog.addEntry(0,"doSetValue","",R_scorm_setvalfail+d+":"+e+" "+j);return"false"}}lmslog.addEntry(1,"doSetValue",d,e);return"true"};
LmsComScorm2004.prototype.doCommit=function(){if(this.API==null)return"false";if(this.API.Commit("")=="false"){var d=this.API.GetLastError(),e=this.API.GetErrorString(d);if(d==this.ErrorCodes.KPathTimeout&&this.object_type_name=="LmsComKPath"){lmslog.addEntry(0,"doCommit","","KCenter timeout");d=this.API.GetValue("upk.idle_time");lmslog.addEntry(0,"doCommit","upk.idle_time",d);this.idle_time+=d;lmslog.addEntry(0,"doCommit","idle_time",this.idle_time);return this.doCommit()}else{this.API=null;lms_ConnectionLost(d+
" "+e);lmslog.addEntry(0,"doCommit","",e);return"false"}}lmslog.addEntry(1,"doCommit","","");return"true"};function LmsComKPath(d){this.allow_launch=false;if(d!=null){this.Copy(d);this.ParentLmsCom=d}this.object_type_name="LmsComKPath";this.lesson_data_location="upk.sco_data"}LmsComKPath.prototype=new LmsComScorm2004;LmsComKPath.prototype.constructor=LmsComKPath;LmsComKPath.prototype.BaseClass=LmsComScorm2004.prototype;
LmsComKPath.prototype.Begin=function(){lmslog.addEntry(0,"LmsComKPath.Begin","","Start");var d=LmsComKPath.prototype.BaseClass.Begin.call(this);this.doSetValue("upk.launch_from",GetTopLevelLmsMode());lmslog.addEntry(0,"LmsComKPath.Begin","","LMS session started");return d};
LmsComKPath.prototype.SendCompletionInfo=function(d){var e=this.getReportedLessonStatus();if(e===LMS_NOT_ATTEMPTED)this.doSetValue("cmi.completion_status",LMS_NOT_ATTEMPTED);else{if(e==LMS_PASSED||e==LMS_FAILED){this.doSetValue("cmi.success_status",e);this.doSetValue("cmi.completion_status",LMS_COMPLETED)}else this.doSetValue("cmi.completion_status",e);if(this.score!==""){this.doSetValue("cmi.score.raw",this.score);this.doSetValue("cmi.score.scaled",this.score/100);this.doSetValue("cmi.score.min",
"0");this.doSetValue("cmi.score.max","100")}d||this.doCommit()}};LmsComKPath.prototype.LoadAPIAdapter=function(d){if(this.API)d();else{var e=findKPathAPIFrame(window);if(e&&e.LoadRuntime&&this.guid){this.deferred_callback=d;var g=this;e.LoadRuntime(this.guid,0,0,0,function(j,l,m,q){g.LoadAPIAdapterCallback(j,l,m,q)})}else d()}};
LmsComKPath.prototype.LoadAPIAdapterCallback=function(d,e,g,j){if(d=="succeeded"&&e==this.guid){this.API=g.GetAPI();lmslog.addEntry(0,"LoadAPIAdapterCallback","","KPath adapter bound");try{this.deferred_callback()}catch(l){}}else{if(d=="no SCO")this.API=null;else alert(R_scorm_noapi+" "+j);lmslog.addEntry(0,"LoadAPIAdapterCallback","",j);this.deferred_callback()}};LmsComKPath.prototype.doGetUPKValue=function(d){d=this.doGetValue(d);if(d==="")d=-1;return d};
LmsComKPath.prototype.doSetUPKValue=function(d,e){this.doSetValue(d,e)};LmsComKPath.prototype.doUPKCommit=function(){this.doCommit()};
LmsComKPath.prototype.setInteraction=function(d,e){if(this.API){var g=e.status_obj,j=this.doGetValue("cmi.interactions._count");if(d==-1)d=j;d>=j&&this.doSetValue("cmi.interactions."+d+".id",e.guid);this.doSetValue("cmi.interactions."+d+".type",g.getQuestionType());this.doSetValue("cmi.interactions."+d+".timestamp",(new Date).toSCORM());this.doSetValue("cmi.interactions."+d+".weighting","1");if(g.getResult()){this.doSetValue("cmi.interactions."+d+".learner_response",g.getLearnerResponse());this.doSetValue("cmi.interactions."+
d+".result",g.getResult())}this.doCommit();return d}};LmsComKPath.prototype.getAnsweredQuestions=function(){var d={};if(!this.API)return d;for(var e=this.doGetValue("cmi.interactions._count"),g=0;g<e;g++){var j=this.doGetValue("cmi.interactions."+g+".id");d[j]={index:g};d[j].weighting=this.doGetValue("cmi.interactions."+g+".weighting");d[j].result=this.doGetValue("cmi.interactions."+g+".result")}return d};
LmsComKPath.prototype.setObjective=function(d,e){if(this.API){this.doSetValue("cmi.objectives."+d+".id",e.objectiveGuid=="PRIMARYOBJ"?"PRIMARYOBJ":"OBJ_"+e.objectiveGuid);this.doSetValue("cmi.objectives."+d+".score.scaled",e.score/100);this.doSetValue("cmi.objectives."+d+".completion_status",e.completed?"completed":"incomplete");this.doSetValue("cmi.objectives."+d+".success_status",e.completed?"passed":"failed")}};
LmsComKPath.prototype.requestContinue=function(){this.doSetValue("adl.nav.request","continue")};LmsComKPath.prototype.utGetModeIndex=function(){this.mode_index=this.doGetValue("upk.modes._count")};LmsComKPath.prototype.utPushModeIndex=function(){this.saved_mode_index=this.mode_index;this.utGetModeIndex()};LmsComKPath.prototype.utPopModeIndex=function(){this.mode_index=this.saved_mode_index;delete this.saved_mode_index};
LmsComKPath.prototype.utRecordType=function(d){this.doSetValue("upk.modes."+this.mode_index+".type",d)};LmsComKPath.prototype.utRecordStartTime=function(d){this.doSetValue("upk.modes."+this.mode_index+".start_time",d.toSCORM())};LmsComKPath.prototype.utRecordEndTime=function(d){this.doSetValue("upk.modes."+this.mode_index+".end_time",d.toSCORM())};LmsComKPath.prototype.utRecordCompletionStatus=function(d){this.doSetValue("upk.modes."+this.mode_index+".completion_status",d)};
LmsComKPath.prototype.utRecordSuccessStatus=function(d){this.doSetValue("upk.modes."+this.mode_index+".success_status",d)};LmsComKPath.prototype.utRecordScoreScaled=function(d){this.doSetValue("upk.modes."+this.mode_index+".score.scaled",d)};LmsComKPath.prototype.utRecordFrameViewed=function(d){this.doSetValue("upk.modes."+this.mode_index+".frame_viewed",d);this.doSetValue("cmi.session_time",this.computeTime(this.start_date,(new Date).getTime()));this.doCommit()};
function LmsComAICC(d,e){this.allow_launch=false;this.aicc_url=d;this.aicc_sid=e;this.app=document.applets.GetHTTPPostData;this.object_type_name="LmsComAICC"}LmsComAICC.prototype=new LmsComBase;LmsComAICC.prototype.constructor=LmsComScorm12;LmsComAICC.prototype.BaseClass=LmsComBase.prototype;LmsComAICC.prototype.Begin=function(){LmsComAICC.prototype.BaseClass.Begin.call(this);lmslog.addEntry(0,"LmsComAICC.Begin","","Start");this.hacpGetparam();lmslog.addEntry(0,"LmsComAICC.Begin","","about to log paramvalues")};
LmsComAICC.prototype.End=function(){LmsComAICC.prototype.BaseClass.End.call(this);lmslog.addEntry(0,"LmsComAICC.End","","Start");if(!this.allow_launch)return false;this.allow_launch=false;var d=this.hacpGetpostdata();d="command=putparam&version="+LmsConfig.AiccVersion+"&session_id="+this.aicc_sid+"&aicc_data="+escape(d)+"&";lmslog.addEntry(0,"LmsComAICC.End","params",d);d=this.app.GetData(unescape(this.aicc_url),d);lmslog.addEntry(0,"LmsComAICC.End","strData",d);d="version="+LmsConfig.AiccVersion+
"&command=ExitAU&session_id="+this.aicc_sid+"&";lmslog.addEntry(0,"LmsComAICC.End","params",d);d=this.app.GetData(unescape(this.aicc_url),d);lmslog.addEntry(0,"LmsComAICC.End","strData",d)};var closingAmp=true;
LmsComAICC.prototype.hacpGetparam=function(){lmslog.addEntry(0,"hacpGetparam","","Start");var d="";d="version="+LmsConfig.AiccVersion+"&command=GetParam&session_id="+this.aicc_sid;if(closingAmp)d+="&";lmslog.addEntry(0,"hacpGetparam","params",d);d=this.app.GetData(unescape(this.aicc_url),d);lmslog.addEntry(0,"hacpGetparam","strData",d);var e,g,j=false;d+=" ";for(var l=d.split("\r"),m=0;m<l.length;m++){var q=l[m],r=trimValue(q.substring(0,q.indexOf("="))),t=trimValue(q.substring(q.indexOf("=")+1));
if(r.toLowerCase()=="error"){e=t;j=true}if(r.toLowerCase()=="error_text")g=t;if(r.toLowerCase()=="aicc_data"){this.aicc_data=d.substring(d.indexOf(q.substring(0,q.indexOf("=")))+q.substring(0,q.indexOf("=")).length+1);j=true}}if(j)if(e==0){l=get_group_content("core",this.aicc_data).split("\r");for(m=0;m<l.length;m++){q=l[m];r=trimValue(q.substring(0,q.indexOf("=")));t=trimValue(q.substring(q.indexOf("=")+1));if(r.toLowerCase()=="student_id")this.student_id=t;if(r.toLowerCase()=="student_name")this.student_name=
t;if(r.toLowerCase()=="lesson_status"){this.lesson_status=t.toLowerCase().charAt(0);if(t.indexOf(",")!=-1)this.lesson_flag=trimValue(t.substring(t.indexOf(",")+1)).toLowerCase();if(this.lesson_status=="p")this.lesson_status=LMS_PASSED;if(this.lesson_status=="c")this.lesson_status=LMS_COMPLETED;if(this.lesson_status=="f")this.lesson_status=LMS_FAILED;if(this.lesson_status=="i")this.lesson_status=LMS_INCOMPLETE;if(this.lesson_status=="n")this.lesson_status=LMS_NOT_ATTEMPTED;this.original_lesson_status=
this.lesson_status}if(r.toLowerCase()=="lesson_location")this.lesson_location=t;if(r.toLowerCase()=="credit")this.credit=t;if(r.toLowerCase()=="score")this.score=t;if(r.toLowerCase()=="time")this.time=t}this.lesson_data=this.lesson_status==LMS_INCOMPLETE||this.lesson_status==LMS_COMPLETED||this.lesson_status==LMS_PASSED||this.lesson_status==LMS_FAILED?trimValue(get_group_content("core_lesson",this.aicc_data)):"";this.core_vendor=trimValue(get_group_content("core_vendor",this.aicc_data));this.allow_launch=
true}else{alert(R_error_unexp+g);lmslog.addEntry(0,"hacpGetparam","","Unable to continue because of the following error: "+g)}else{alert(R_error_svr+unescape(this.aicc_url)+"\r\r - "+d);lmslog.addEntry(0,"hacpGetparam","","Unable to post to server "+unescape(this.aicc_url)+" - "+d)}};
LmsComAICC.prototype.hacpGetpostdata=function(){lmslog.addEntry(0,"hacpGetpostdata","","Start");var d="";d="[CORE]\r\n";d+="Lesson_Location=\r\n";var e=this.getReportedLessonStatus();if(e===LMS_NOT_ATTEMPTED)e=this.original_lesson_status;d+=this.lesson_status===LMS_INCOMPLETE?"Lesson_Status="+e+", suspend\r\n":"Lesson_Status="+e+"\r\n";lmslog.addEntry(0,"hacpGetpostdata","is_assess",this.is_assess);d+=this.score!==""?"Score="+this.score+"\r\n":"Score=\r\n";d+="Time="+this.computeTime(this.start_date,
this.end_date)+"\r\n";d+="[CORE_LESSON]\r\n";d+=this.lesson_data+"\r\n";lmslog.addEntry(0,"hacpGetpostdata","NewAiccData",d);return d};function get_group_content(d,e){for(var g="",j=e.split("\r"),l=false,m=0;m<j.length;m++){var q=trimValue(j[m]);if(q.substr(0,1)=="[")l=q.toLowerCase().indexOf("["+d.toLowerCase()+"]")>=0?true:false;else if(l)g+=q+"\r\n"}return g}
function trimValue(d){for(var e=0,g=d.length,j=0;j<d.length;j++)if(d.substr(j,1)!=" "&&d.substr(j,1)!="\t"&&d.substr(j,1)!="\n"&&d.substr(j,1)!="\r"){e=j;break}if(j==d.length)return"";for(j=d.length-1;j>0;j--)if(d.substr(j,1)!=" "&&d.substr(j,1)!="\t"&&d.substr(j,1)!="\n"&&d.substr(j,1)!="\r"){g=j;break}if(j==0)g=0;return d.substring(e,g+1)}LmsComAICC.prototype.IsConnected=function(){return true};function LmsComCookie(){this.allow_launch=false;this.object_type_name="LmsComCookie"}
LmsComCookie.prototype=new LmsComBase;LmsComCookie.prototype.constructor=LmsComCookie;LmsComCookie.prototype.BaseClass=LmsComBase.prototype;LmsComCookie.prototype.Begin=function(){LmsComCookie.prototype.BaseClass.Begin.call(this);if(this.toc_hash=window.toc_hash){var d=new Cookie(document,"Bookmark_"+this.toc_hash,30);d.Load();this.lesson_location=d.Location}};
LmsComCookie.prototype.End=function(){LmsComCookie.prototype.BaseClass.End.call(this);if(this.toc_hash){var d=new Cookie(document,"Bookmark_"+this.toc_hash,30);d.Load();d.Location=this.lesson_location;d.Store()}};LmsComCookie.prototype.GetBookmark=function(d){if(this.toc_hash=d){d=new Cookie(document,"Bookmark_"+this.toc_hash,30);d.Load();this.lesson_location=d.Location}return parseInt(this.lesson_location,10)};function LmsBasicStatus(){this.status=LMS_NOT_ATTEMPTED}
LmsBasicStatus.prototype.getStatus=function(){return this.status};LmsBasicStatus.prototype.setStatus=function(d){this.status=d};LmsBasicStatus.prototype.Save=function(d){d.lesson_status=this.status};LmsTopicStatus.prototype=new LmsBasicStatus;LmsTopicStatus.prototype.constructor=LmsTopicStatus;LmsTopicStatus.prototype.BaseClass=LmsBasicStatus.prototype;
function LmsTopicStatus(){this.score="";this.passed=false;this.modes=[];this.modes.S=new Mode("S");this.modes.T=new Mode("T");this.modes.K=new Mode("K");this.modes.D=new Mode("D");this.modes.P=new Mode("P");this.modes.E=new Mode("E");this.anylaunched=false}LmsTopicStatus.prototype.Save=function(d){d.lesson_data=d.bigsco?"":this.getStatusstring();d.lesson_status=this.getLMSStatus();d.score=this.getScore()};LmsTopicStatus.prototype.setModeavail=function(d,e){this.modes[d].avail=e};
LmsTopicStatus.prototype.getModeavail=function(d){return this.modes[d].avail};LmsTopicStatus.prototype.setModestatus=function(d,e){if(this.modes[d].avail)this.modes[d].complete=e;else lmslog.addEntry(0,"setModestatus","","Invalid call of setModestatus")};LmsTopicStatus.prototype.getModestatus=function(d){return this.modes[d].complete};LmsTopicStatus.prototype.setRequiredMode=function(d,e){this.requiredMode=GetTopLevelLmsMode()=="LMS"?this._getRequiredMode(d):this._getRequiredMode(e)};
LmsTopicStatus.prototype._getRequiredMode=function(d){for(var e=0;e<6;e++)if(d["EKTSPD".charAt(e)])return"EKTSPD".charAt(e);return"None"};LmsTopicStatus.prototype.GetRequiredMode=function(){return this.requiredMode};
LmsTopicStatus.prototype.initTopicstat=function(d){lmslog.addEntry(0,"initTopicstat","","Start");lmslog.addEntry(0,"initTopicstat","s string",d);lmslog.addEntry(0,"initTopicstat","s.length",d.length);if(d.length!=0){var e=d.split(",");for(d=0;d<=e.length-1;d++){lmslog.addEntry(0,"initTopicstat","f["+d+"]",e[d]);if(e[d].charAt(1)=="=")this.modes[e[d].charAt(0)].complete=this.modeIscomplete(e[d].substr(2,1));else if(e[d].substr(0,5)=="PASS=")this.passed=e[d].substr(5,1)=="0"?false:true;else if(e[d].substr(0,
6)=="SCORE=")this.score=e[d].substr(6)}}};LmsTopicStatus.prototype.clearTopicstat=function(){this.score="";this.passed=false;for(var d in this.modes)this.modes[d].complete=false};
LmsTopicStatus.prototype.getStatusstring=function(){lmslog.addEntry(0,"get_statusstring","","Start");var d="";for(x in this.modes){if(d.length!=0)d+=",";d+=this.modes[x].id+"="+(this.modes[x].complete?"C":"I")}if(this.modes.K.complete&&this.isScored)d+=",PASS="+(this.passed?"1":"0")+",SCORE="+this.score;lmslog.addEntry(0,"get_statusstring","dataString",d);return d};
LmsTopicStatus.prototype.getStatus=function(){var d="";if(this.isComplete())if(this.modes.K.avail&&this.isScored)d=this.passed?LMS_PASSED:LMS_FAILED;else{d=LMS_COMPLETED;if(this.savedStatus=="P"||this.savedStatus=="F")d=this.savedStatus}else{d=LMS_INCOMPLETE;if(this.savedStatus=="P"||this.savedStatus=="F"||this.savedStatus=="C")d=Stat2Lms(this.savedStatus)}return d};LmsTopicStatus.prototype.getLMSStatus=function(){if(this.isComplete()&&!this.anylaunched)return LMS_NOT_ATTEMPTED;return this.getStatus()};
LmsTopicStatus.prototype.getScore=function(){return this.score};LmsTopicStatus.prototype.isComplete=function(){lmslog.addEntry(0,"is_complete","","Start");var d=false;if(this.requiredMode==="None")d=true;else{var e=["E","K","T","S","P","D"];for(i=0;i<e.length;i++){if(this.modes[e[i]].complete)d=true;if(e[i]===this.requiredMode)break}}lmslog.addEntry(0,"is_complete","iscomp",d);return d};
LmsTopicStatus.prototype.modeIscomplete=function(d){var e=false;lmslog.addEntry(0,"modeIscomplete","","Start");if(d=="C")e=true;else if(d=="I")e=false;lmslog.addEntry(0,"modeIscomplete","ret",e);return e};LmsTopicStatus.prototype.isRequired=function(d){return this.requiredMode===d};LmsTopicLaunchStatus.prototype=new LmsTopicStatus;LmsTopicLaunchStatus.prototype.constructor=LmsTopicStatus;LmsTopicLaunchStatus.prototype.BaseClass=LmsTopicStatus.prototype;
function LmsTopicLaunchStatus(d){this.mode=this.modes[d];this.score="";this.passed=false;this.anylaunched=true}LmsTopicLaunchStatus.prototype.Save=function(d){this.BaseClass.Save.call(this,d)};LmsTopicLaunchStatus.prototype._getRequiredMode=function(d){for(var e=0;e<6;e++)if(d.indexOf("EKTSPD".charAt(e))!=-1)return"EKTSPD".charAt(e);return"None"};LmsTopicLaunchStatus.prototype.getResult=function(){return this.passed?"correct":"incorrect"};LmsTopicLaunchStatus.prototype.getQuestionType=function(){return"other"};
LmsTopicLaunchStatus.prototype.getLearnerResponse=function(){return""};function Mode(d){this.complete=this.avail=false;this.id=d}LmsQuestionStatus.prototype=new LmsBasicStatus;LmsQuestionStatus.prototype.constructor=LmsQuestionStatus;LmsQuestionStatus.prototype.BaseClass=LmsBasicStatus.prototype;function LmsQuestionStatus(){this.result=this.learner_response=this.question_type=null}LmsQuestionStatus.prototype.Save=function(d){d.lesson_status=this.status;d.lesson_data=Lms2Stat(this.getStatus())};
LmsQuestionStatus.prototype.getStatus=function(){return this.status===LMS_NOT_ATTEMPTED?this.savedStatus:this.status};LmsQuestionStatus.prototype.getQuestionType=function(){return this.question_type};LmsQuestionStatus.prototype.setQuestionType=function(d){return this.question_type=d};LmsQuestionStatus.prototype.getLearnerResponse=function(){return this.learner_response};LmsQuestionStatus.prototype.setLearnerResponse=function(d){return this.learner_response=d};
LmsQuestionStatus.prototype.getResult=function(){return this.result};LmsQuestionStatus.prototype.setResult=function(d){return this.result=d};LmsAssessmentStatus.prototype=new LmsBasicStatus;LmsAssessmentStatus.prototype.constructor=LmsAssessmentStatus;LmsAssessmentStatus.prototype.BaseClass=LmsBasicStatus.prototype;function LmsAssessmentStatus(){this.score="";this.questionstatus=[];this.stateDiscarded=false}
LmsAssessmentStatus.prototype.Save=function(d){d.lesson_status=this.status;d.score=this.status!=LMS_INCOMPLETE&&this.status!=LMS_NOT_ATTEMPTED?this.score:"";var e="";d.bigsco||(e=this.hash.length+"@"+this.hash);e+=this.status==LMS_NOT_ATTEMPTED?this.savedStatus:Lms2Stat(this.status);for(var g=0;g<this.questionstatus.length;g++)e+=this.questionstatus[g];d.lesson_data=e};LmsAssessmentStatus.prototype.getStatus=function(){return this.status===LMS_NOT_ATTEMPTED?Stat2Lms(this.savedStatus):this.status};
LmsAssessmentStatus.prototype.getLMSStatus=function(){return this.status};LmsAssessmentStatus.prototype.getScore=function(){return this.score};LmsAssessmentStatus.prototype.setScore=function(d){return this.score=d};LmsTOCStatus.prototype=new LmsBasicStatus;LmsTOCStatus.prototype.constructor=LmsTOCStatus;LmsTOCStatus.prototype.BaseClass=LmsBasicStatus.prototype;function LmsTOCStatus(){}LmsTOCStatus.prototype.getStatus=function(){return Stat2Lms(this.getTocState().GetStatus(0))};
LmsTOCStatus.prototype.Save=function(d){d.lesson_status=this.getStatus();var e=this.getTocState();d.lesson_data=e.SerializeTOC()};LmsTOCStatus.prototype.getTocState=function(){return this.tocstate};LmsTOCStatus.prototype.setTocState=function(d){return this.tocstate=d};function NodeState(){this.Status="N";this.Score=null;this.ChildrenStatus=""}function TOCState(d,e){this.NodeCounter=d;this.TocVersion=e;this.InitInLookupTable()}
TOCState.prototype.SetStatus=function(d,e){this.LookUpTable[d]||(this.LookUpTable[d]=new NodeState);this.LookUpTable[d].Status=e};TOCState.prototype.GetStatus=function(d){return this.LookUpTable[d].Status};TOCState.prototype.SetScore=function(d,e){this.LookUpTable[d]||(this.LookUpTable[d]=new NodeState);this.LookUpTable[d].Score=e};TOCState.prototype.GetScore=function(d){return this.LookUpTable[d].Score};
TOCState.prototype.SetChildren=function(d,e){this.LookUpTable[d]||(this.LookUpTable[d]=new NodeState);this.LookUpTable[d].ChildrenStatus=e};TOCState.prototype.GetChildren=function(d){return this.LookUpTable[d].ChildrenStatus};
TOCState.prototype.DeserializeTOC=function(d){var e=0,g,j=d.indexOf("@");if(j>0){e=parseInt(d.substring(0,j));g=d.substring(j+1,j+e+1);if(g==this.TocVersion){d=d.substring(j+e+2);j=d.indexOf("@");if(j>0){e=parseInt(d.substring(0,j));d=d.substring(j+1,j+e+1);if(d.length==e){d=this.RLESDecode(d);this.DeserializeLookUpTable(d)}}}}};
TOCState.prototype.DeserializeLookUpTable=function(d){for(var e=0,g="",j=0;j<d.length;j++){g=d.charAt(j);this.SetStatus(e,g);for(g="";j<d.length-1&&d.charAt(j+1)>="0"&&d.charAt(j+1)<="9";){j++;g+=d.charAt(j)}g.length>0&&this.SetScore(e,parseInt(g));if(j<d.length-1&&d.charAt(j+1)=="{"){g=d.indexOf("}",j+2);this.SetChildren(e,d.substring(j+2,g));j=g}e++}};
TOCState.prototype.SerializeTOC=function(){var d=this.RLESEncode(this.SerializeLookupTable());return this.TocVersion.length+"@"+this.TocVersion+" "+d.length+"@"+d};TOCState.prototype.SerializeLookupTable=function(){for(var d="",e=0;e<this.NodeCounter;e++){var g=this.LookUpTable[e].Status,j=this.LookUpTable[e].ChildrenStatus;g||(g="N");d+=g;if(j)d+="{"+j+"}"}return d};
TOCState.prototype.InitInLookupTable=function(){this.LookUpTable=[];for(var d=0;d<this.NodeCounter;d++)this.LookUpTable[d]=new NodeState;this.SetStatus(0,"I")};TOCState.prototype.RLESEncode=function(d){var e="",g=0,j="";e=d.charAt(0);for(var l=g=1;l<d.length;l++)if(d.charAt(l)==e)g++;else{if(g>2){j+="#";j+=g;j+=e}else j+=d.substring(l-g,l);e=d.charAt(l);g=1}if(g>2){j+="#";j+=g;j+=e}else j+=d.substring(l-g,l);return j};
TOCState.prototype.RLESDecode=function(d){for(var e="",g="",j=0;j<d.length;j++)if(d.charAt(j)=="#"){g="";for(j++;d.charAt(j)>="0"&&d.charAt(j)<="9";){g+=d.charAt(j);j++}g=parseInt(g);for(var l=0;l<g;l++)e+=d.charAt(j)}else e+=d.charAt(j);return e};function Lms2Stat(d){return d.charAt(0).toUpperCase()}function Stat2Lms(d){return[LMS_PASSED,LMS_FAILED,LMS_COMPLETED,LMS_INCOMPLETE,LMS_NOT_ATTEMPTED]["PFCIN".indexOf(d)]}
function LogEntry(d,e,g,j,l){this.logType=e;this.funcName=g;this.varName=j;this.msgValue=l;this.dateTime=(new Date).getTime()-d}LogEntry.prototype.GetTableRow=function(){var d="#006600";if(this.logType===1)d="#000033";var e=this.varName;if(e==="")e="&nbsp;";var g=this.msgValue;if(g==="")g="&nbsp;";var j="<tr>";j+="<td align='right'>"+this.dateTime/1E3+"</td>";j+="<td style='color:"+d+";'>"+this.funcName+"</td>";j+="<td>"+e+"</td>";j+="<td>"+g+"</td>";j+="</tr>";return j};
function Log(d){this.traceWindow=null;this.logArray=[];this.enabled=d;this.startDateTime=new Date;this.changed=true;this.windowReady=false;this.startLog()}Log.prototype.startLog=function(){if(this.enabled){this.addEntry(0,"initLog","","Log Intialized");this.openTraceWindow()}};Log.prototype.addEntry=function(d,e,g,j){if(this.enabled){this.logArray.push(new LogEntry(this.startDateTime.getTime(),d,e,g,j));this.changed=true;this.traceWindow&&this.windowReady&&this.traceWindow.UpdateTraceStack()}};
Log.prototype.writeLog=function(d,e){var g=e;if(g>this.logArray.length||g==0)g=this.logArray.length;var j="<table width='600'>";j+="<tr>";j+="<th colspan=4>Session start: "+this.startDateTime+"</th>";j+="</tr>";j+="<tr>";j+="<th>time</th>";j+="<th>function</th>";j+="<th>variable</th>";j+="<th>message</th>";j+="</tr>";var l;if(d==0)for(var m=this.logArray.length-g;m<this.logArray.length;m++){l=this.logArray[m];j+=l.GetTableRow(m)}else for(m=this.logArray.length-1;m>=this.logArray.length-g;m--){l=this.logArray[m];
j+=l.GetTableRow(m)}j+="</table>";this.changed=false;this.windowReady=true;return j};Log.prototype.writeDetails=function(d){return this.logArray[d].GetDetails()};Log.prototype.openTraceWindow=function(){if(this.traceWindow==null){this.changed=true;this.traceWindow=window.open(lms_path+"lmsdebug.html","_blank")}};var _lmsMode=null,_lmsParser=null;
function InitLmsMode(d){if(_lmsParser==null){_lmsParser=new UrlParser;_lmsParser.Parse();if(d=="player"){if(_lmsParser.GetParameter("directlaunch")!=null)_lmsMode=Kpath_launch==true?"KPT":"Cookie"}else if(d=="lmstart"){if(_lmsParser.GetParameter("toc")==null)_lmsMode=_lmsParser.GetParameter("dhtml")!=null?Kpath_launch==true?"KPT":"Cookie":"LMS"}else if(d=="toc"){if(_lmsParser.GetParameter("sco")==null)_lmsMode=Kpath_launch==true?"KPT":"Cookie"}else alert(R_undefined_lms_source)}}
function GetTopLevelLmsMode(){return _GetTopLevelLmsMode(this)}function _GetTopLevelLmsMode(d){var e=d._lmsMode;if(e==null)return _GetTopLevelLmsMode(d.lms_store.parentW);return e}var lms_initialized=false,lms_store,lmslog;
function lms_InitPage(d,e,g,j){if(lms_initialized==true)setTimeout(j,1);else{__Ialert("lms_InitPage called with parameters:"+d+","+e+","+g+","+j);lms_store={window:window,childIndex:d,parentW:e,cguid:g,callbackfunction:j};if(!e||e.closed){lmslog=new Log(LmsConfig.DebugMode);InitializeLmsCom();InsertRuntimeAPI(lms_LoadRuntimeComplete)}else if(e.lms_initialized){lmslog=e.lmslog;setTimeout(lms_LoadRuntimeComplete,1)}}}
function lms_LoadRuntimeComplete(){__Ialert("lms_LoadRuntimeComplete() called");if(lms_store.parentW&&!lms_store.parentW.closed)lms_store.parentW.GetChildLmsCom(lms_store);else if(!lms_store.parentW&&!lms_store.cguid&&!window.bigScoItemCount)document.LmsCom=PlayerConfig.EnableCookies?new LmsComCookie:new LmsComBase;else{CheckForLMSAPI();document.LmsCom=_GlobalLmsComFactory.CreateLmsCom()}var d=document.LmsCom;d.guid=lms_store.cguid;d.owner=window;d.LoadAPIAdapter(lms_LoadAdapterComplete)}
function lms_UpdateUI(d){try{parent&&parent.updateUI&&parent.updateUI(d)}catch(e){}}var hasClosed=false;
function lms_ClosePage(d){__Ialert("lms_ClosePage() called");if(hasClosed!=true){hasClosed=true;var e=document.LmsCom;if(e&&e.session_active){var g=e.child;g&&g.session_active&&g.owner&&!g.owner.closed&&g.owner.lms_ClosePage(true);(g=e.ancillaryChild)&&g.session_active&&g.owner&&!g.owner.closed&&g.owner.lms_ClosePage(true);window._closePage&&_closePage();if(e.session_active){e.SaveStatus();e.End();e.NotifyParent()}d&&window.close()}}}
function lms_ConnectionLost(d){window.ConnectionLostEvent&&ConnectionLostEvent(d);lms_store.parentW&&!lms_store.parentW.closed&&lms_store.parentW.lms_ConnectionLost(d)}function lms_IsConnected(){var d=document.LmsCom;if(d)return d.IsConnected();return false}function lms_IsKPathLogoutAvailable(){return!!window.Kpath_logout_available}
function _logout(d){if(lms_store.parentW&&!lms_store.parentW.closed&&lms_store.parentW._logout)lms_store.parentW._logout(false);else if(window.Kpath_logout_URL)if(GetTopLevelLmsMode()=="LMS")window.parent.parent.location.replace(Kpath_logout_URL);else if(d)if(window.opener&&!window.opener.closed){d=window.opener.location.href;window.opener.location.replace(Kpath_logout_URL+"&RedirectURL="+escape(d));window.close()}else if(IsTouchDevice()){d=window.location.href.split("/").slice(0,5).join("/")+"/ipad.html";
window.location.replace(Kpath_logout_URL+"&RedirectURL="+escape(d))}else window.location.replace(Kpath_logout_URL);else{d=window.location.href.replace("?genctx","");window.location.replace(Kpath_logout_URL+"&RedirectURL="+escape(d))}}function lms_IsUserProfileAvailable(){__alert("lms_IsUserProfileAvailable() called");if(GetTopLevelLmsMode()!=="KPT")return false;return document.LmsCom.doGetUPKValue("upk.anonymous")=="0"}
function lms_GetUserProfileUrl(){__alert("lms_GetUserProfileUrl() called");if(Kpath_launch==false)return"";return Kpath_profile_URL+"?UPKLaunch=true"}function GetNoSound(){return lms_store.parentW&&!lms_store.parentW.closed?lms_store.parentW.GetNoSound():lms_store.noSound}function SetNoSound(d){lms_store.noSound=d}var _lms_show_all_alert=false;function __alert(d){if(_lms_show_alert||_lms_show_all_alert)alert(d+"\nfile: "+_lms_module_name)}
function __Ialert(d){if(_lms_show_alert||_lms_show_Ialert||_lms_show_all_alert)alert(d+"\nfile: "+_lms_module_name)};var urlParser=null,_lmsEnvironment="";function InitLmsEnvironment(){_lmsEnvironment=urlParser.GetParameter("toc")!=null?"TOC":urlParser.GetParameter("dhtml")!=null?"DHTML":"LMS"}function decodeHTMLString(d){return d=replaceString("&amp;","&",d)}function fixHTMLString(d){d=replaceString("<","&lt;",d);d=replaceString(">","&gt;",d);d=replaceString("'","&#39;",d);d=replaceString('"',"&#34;",d);for(var e=d.indexOf("\\\\");e>=0;){d=d.substr(0,e)+d.substr(e+1);e=d.indexOf("\\\\",e+1)}return d}
var _deviceDPI=0;
function InitUI(){if(_deviceDPI==0)_deviceDPI=getDpiInfo();if(_deviceDPI==0)setTimeout("InitUI()",100);else{if(_deviceDPI!=96)if(getDPICookie()==false){this.location.replace("../../../js/unsuppdpi.html?"+Escape.MyEscape(AbsUrl(this.location.href)));return}urlParser=new UrlParser;urlParser.Parse();concept=decodeHTMLString(concept);concept=resolveIfRelative(concept);if(concept.length==0&&assetType=="T")concept="./tpc/"+topicID+"/leadin.html";topicName=decodeHTMLString(topicName);InitLmsEnvironment();InitLmsMode("lmstart");
var d=0,e=urlParser.GetParameter("lmsChildIndex");if(e>0)d=e;e=(assetType=="B"?originalType:assetType)+"_"+topicID;if(concept.length==0)if(assetType=="B"||assetType=="C")e=null;if(_lmsMode!=null)if(urlParser.GetParameter("nosound")==null)if(Sound_Init(soundIsExported,UserPrefs.PlayAudio,null,false)==false)return;lms_InitPage(_lmsMode==null?d:-1,_lmsMode==null?window.parent:null,e,"InitUI2()")}}
function InitUI2(){urlParser.GetParameter("nosound")!=null&&SetNoSound(true);topicDescriptor==null&&LoadDescriptor();assetType=="Q"&&BuildQuestionConcept();assetType=="A"&&BuildAssessmentConcept();if(!topicDescriptor.userdefined)if(concept.length>0)concept=urlParser.GetCorrectUrl(concept,true);try{getInnerWidth()>0&&getInnerHeight()>0&&setTimeout('this.frames["myframe"].location.replace(urlParser.GetCorrectUrl("../../lmsui.html"))',100)}catch(d){return}_resize();window.onresize=resize}
function ResizeFrame(){_resize()}function resize(){setTimeout("_resize()",0)}function getInnerWidth(){if(window.innerWidth)return window.innerWidth;else if(document.documentElement.clientWidth)return document.documentElement.clientWidth;else if(document.body.clientWidth)return document.body.clientWidth}
function getInnerHeight(){if(window.innerHeight)return window.innerHeight;else if(document.documentElement.clientHeight)return document.documentElement.clientHeight;else if(document.body.clientHeight)return document.body.clientHeight}function _resize(){if(IsIE7()!=false)if(checkIEDPI()!=false){cw=getInnerWidth();ch=getInnerHeight();if(IsIE8())cw-=1;f=document.getElementById("myframe");try{f.style.width=""+cw+"px";f.style.height=""+ch+"px"}catch(d){setTimeout("InitUI2();",200)}}}
function GetBasePath(){base=this.location.href;k=base.indexOf("?");if(k<0)k=base.indexOf("#");if(k>=0)base=base.substr(0,k);k=base.lastIndexOf("/");return b=base.substr(0,k)}
function BuildQuestionConcept(){var d=topicDescriptor.userdefined;concept=topicDescriptor.concept;if(d.toLowerCase()=="true"){d=AbsUrl("../../toc/udq_callback.html");var e=0,g=0;switch(topicDescriptor.remediation.toLowerCase()){case "always":e=3;g=1;break;case "userasks":g=e=1;break;case "incorrect":e=2;g=1;break;case "resultsonly":e=0;g=1;break;case "none":g=e=0}concept+="?kpnextpage="+d+"&kpmode=0&kpremed="+e+"&kpfeedbk="+g+"&kprnda=0"}if(_lmsMode=="LMS")concept+="&lms";concept+="&question="+topicID+
"&host=player"}function AbsUrl(d){for(var e=0;e<d.length;e++){c=d.substr(e,1);if(c==":")return d}base=window.location.href;e=base.indexOf("?");var g=base.indexOf("#");if(e>=0||g>=0)base=e>=0&&g>=0?base.substr(0,e<g?e:g):e>=0?base.substr(0,e):base.substr(0,g);if(d.substr(0,3)=="../"){e=base.lastIndexOf("/");for(base=base.substr(0,e);d.substr(0,3)=="../";){e=base.lastIndexOf("/");base=base.substr(0,e);d=d.substr(3)}}else{e=base.lastIndexOf("/");base=base.substr(0,e)}return base=base+"/"+d}
function BuildAssessmentConcept(){concept=topicDescriptor.concept+"&assessment="+topicID;if(_lmsMode=="LMS")concept+="&lms";var d=urlParser.GetParameter("owner");if(d!=null)if(d.length>0)concept+="&owner="+d}function OnQuestionContinue(){parent.OnQuestionContinue&&parent.OnQuestionContinue()}function StartTopic(d,e,g){this.frames.myframe.launchTopic(d,e,g)}function SetCtxexParam(d){urlParser.AddParameter("ctxex",d)}function RoleStatusChanged(){this.frames.myframe.UpdateSeeAlso(CheckSeeAlso())}
function OpenSeeAlso(d,e){this.frames.myframe.OpenSeeAlso(d,e)}function OnNotesClosed(){this.frames.myframe.OnNotesClosed()}function ConnectionLostEvent(d){this.frames.myframe.ConnectionLostEvent(d)}var topicDescriptor=null;function topicDescriptorObj(d,e,g,j,l,m,q,r,t,u){this.title=d;this.type=e;this.tpc=g;this.playmodes=j;this.jumpInArray=l;this.leadin=m;this.concept=q;this.printitname=encodeURIComponent(r);this.userdefined=t;this.remediation=u;this.seealsoroot="";this.seealsolinks=[]}
function seeAlsoLink(d,e,g,j){this.type=d;this.title=e;this.guid=g;this.filtered=false;this.empty=j}function JumpInPoint(d,e,g){this.label=d;this.frame_id=e;this.modes=g}
function LoadDescriptor(){var d=null;try{if(window.location.href.substr(0,7).toLowerCase()=="http://"||window.location.href.substr(0,8).toLowerCase()=="https://")d=new XMLHttpRequest;if(window.location.href.substr(0,7).toLowerCase()=="file://"&&IsTouchDevice())d=new XMLHttpRequest}catch(e){}finally{if(d==null)d=new ActiveXObject("Microsoft.XMLHTTP")}d.open("GET","descriptor.xml",false);d.send();if(location.hostname==""&&d.status==0)if(d.responseXML.documentElement==null){var g=new ActiveXObject("Microsoft.XMLDOM");
g.async=false;g.loadXML(d.responseText);d={};d.responseXML=g}var j=getDescriptorItem(d,"PlayModes");jumpInArray=[];nodes=d.responseXML.getElementsByTagName("JumpIn");for(g=0;g<nodes.length;g++){n=nodes[g];if(n.textContent)label=n.textContent;else if(n.text)label=n.text;else if(n.firstChild.data)label=n.firstChild.data;for(var l=0;l<n.attributes.length;l++){r=n.attributes[l];if(r.nodeName.toLowerCase()=="frameid")frameid=r.nodeValue;if(r.nodeName.toLowerCase()=="modes")modes=r.nodeValue}jumpInArray[jumpInArray.length]=
new JumpInPoint(fixHTMLString(label),frameid,modes)}_leadIn="./toc/empty.html";nodes=d.responseXML.getElementsByTagName("Leadin");if(nodes.length>0)_leadIn="./tpc/"+topicID+"/leadin.html";_concept="";nodes=d.responseXML.getElementsByTagName("Concept");if(nodes.length>0){n=nodes[0];if(n.textContent)_concept=n.textContent;else if(n.text)_concept=n.text;else if(n.firstChild.data)_concept=n.firstChild.data;if(_concept.indexOf("odrel://")==0)_concept=resolve(_concept)}_title=getDescriptorItem(d,"Title");
_type=getDescriptorItem(d,"Type");_printitname=getDescriptorItem(d,"PrintItName");_userdefined=getDescriptorItem(d,"UserDefined");_remediation=getDescriptorItem(d,"Remediation");if(_remediation=="")_remediation="Always";topicDescriptor=new topicDescriptorObj(_title,_type,topicID,j,jumpInArray,_leadIn,_concept,_printitname,_userdefined,_remediation);nodes=d.responseXML.getElementsByTagName("SeeAlsoRoot");if(nodes.length>0){n=nodes[0];g="";if(n.textContent)g=n.textContent;else if(n.text)g=n.text;else if(n.firstChild.data)g=
n.firstChild.data;topicDescriptor.seealsoroot=g}nodes=d.responseXML.getElementsByTagName("SeeAlso");for(g=0;g<nodes.length;g++){n=nodes[g];var m=j=d="",q=false;for(l=0;l<n.attributes.length;l++){var r=n.attributes[l];if(r.nodeName=="Type")d=getTextContent(r);if(r.nodeName=="Title")j=getTextContent(r);if(r.nodeName=="Guid")m=getTextContent(r);if(r.nodeName=="Empty")q=true}if(d.length>0&&j.length>0)topicDescriptor.seealsolinks[topicDescriptor.seealsolinks.length]=new seeAlsoLink(d,j,m,q)}}
function UpdateSeeAlsoLinks(d){for(var e=0;e<d.seealsolinks.length;e++)d.seealsolinks[e].filtered=parent._getFilteredStatus(d.seealsolinks[e].guid)}
function CheckSeeAlso(){if(topicDescriptor.seealsoroot.length==0)return false;if(topicDescriptor.seealsolinks.length==0)return false;if(_lmsEnvironment=="TOC"){if(parent.CheckSeeAlso()==false)return false;UpdateSeeAlsoLinks(topicDescriptor);for(var d=0;d<topicDescriptor.seealsolinks.length;d++)if(topicDescriptor.seealsolinks[d].filtered==false)return true;return false}return true}
function getDescriptorItem(d,e){var g="";try{var j=d.responseXML.getElementsByTagName(e);if(j.length>0){n=j[0];if(n.textContent!=null)g=n.textContent;else if(n.text!=null)g=n.text;else if(n.firstChild.data!=null)g=n.firstChild.data}}catch(l){}return g}function getTextContent(d){try{if(d.textContent)return d.textContent;else if(d.text)return d.text;else if(d.firstChild.data)return d.firstChild.data;return""}catch(e){return""}};function lms_LoadAdapterComplete(){__Ialert("lms_LoadAdapterComplete() called");var d=document.LmsCom;d.Begin();var e=window.assetType;if(Kpath_launch&&e==="B")e="C";if(lms_store.cguid)switch(e){case "T":var g=d.OpenTopicStatus(lmsModes,playerModes);if(g.isComplete()){if(g.GetRequiredMode()==="None"||d.lesson_status===LMS_INCOMPLETE){g.anylaunched=true;d.SaveStatus();d.SendCompletionInfo();d.NotifyParent()}}else{d.SaveStatus();d.SendCompletionInfo();d.NotifyParent()}break;case "C":d.OpenBasicStatus();
d.status_obj.setStatus(LMS_COMPLETED);d.SaveStatus();d.SendCompletionInfo();d.NotifyParent();break;case "A":d.OpenBasicStatus();d.itemCount=window.itemCount;d.hash=window.hash;break;default:d.OpenBasicStatus()}else d.OpenBasicStatus();if(e==="B"){d.bigScoItemCount=window.bigScoItemCount;d.bigScoHash=window.bigScoHash;d.lesson_data||d.status_obj.setStatus(LMS_NOT_ATTEMPTED)}lms_initialized=true;setTimeout(lms_store.callbackfunction,1)}
function GetChildLmsCom(d){__Ialert("lms_GetChildLmsCom() called");(d.window.document.LmsCom=document.LmsCom).owner=d.window}var _lms_module_name="lms_lmstart.js",_lms_show_alert=false,_lms_show_Ialert=false;function splitUri(d){d=d.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);d.shift();return d=[d[1]+"://"+d[3],d[4],d[6]+d[8]]}
function combine(d,e){var g=e;if(g.indexOf("odrel://")==0)g=g.substr(8);if(g=="")g=".";var j=splitUri(d),l=j[0];j=j[1];if(j.charAt(0)=="/")j=j.substr(1);if(j.charAt(j.length-1)=="/")j=j.substr(0,j.length-1);if(g.charAt(g.length-1)=="/")g=g.substr(0,g.length-1);j=j.split("/");var m=g.split("/");if(m.length>2&&m[0]==""&&m[1]==""){l=l.split(":")[0]+":/";for(g=2;g<m.length;g++)l+="/"+m[g];return l}var q=[];for(g=0;g<j.length;g++)q[g]=j[g];for(g=0;g<m.length;g++)if(m[g]==".."){if(q.length>0)q=q.slice(0,
q.length-1)}else if(m[g]!=".")if(m[g]=="")q=[];else q[q.length]=m[g];j="";for(g=0;g<q.length;g++)j+="/"+q[g];return l+j}function getRootUrl(){if(typeof isTocHtml!="undefined"){var d=document.location.href;return d.substr(0,d.lastIndexOf("/"))}var e=splitUri(document.location.href);d=e[0];e=e[1];if(e.charAt(0)=="/")e=e.substr(1);e=e.split("/");var g;for(g=e.length-1;e[g]!="tpc"&&g>=0;g--);if(g>0)g-=1;for(var j="",l=0;l<g;l++)j+="/"+e[l];return d+j}
function isRelative(d){d=d.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);return d[1]==""||d[1]==undefined}function resolveIfRelative(d){return d.indexOf("odrel://")==0?resolve(d):d}function resolve(d){if(isRelative(PlayerConfig.BaseUrl)){var e=getRootUrl();e=combine(e,PlayerConfig.BaseUrl);return combine(e,d)}else return combine(PlayerConfig.BaseUrl,d)}
function resolveLinksInWebPage(){for(var d=document.getElementsByTagName("a"),e=0;e<d.length;e++)if(d[e].getAttribute("href").indexOf("odrel://")==0)d[e].href=resolve(d[e].getAttribute("href"))};var dlg_parent,dialogh_ref,device_dpi,dialog2_html,modal_dialog,dlg_width,dlg_height,dlg_autosizeheight=false,callback_end="",isopened=false;function setParent(d){dlg_parent=d}function Click1(){closeDialog();$("#graydiv").remove()}function getDPI(){return device_dpi}function setWidth(d,e){$(d).css("width",e)}function setHeight(d,e){$(d).css("height",e)}function getFullWidth(){return IsIE7()?$(window).width():document.body.scrollWidth}
function getFullHeight(){return IsIE7()?$(window).height():document.body.scrollHeight}function setPadding(d,e,g){s="<div style='padding:"+e+"px'";if(g&&g!="")s+=" class='"+g+"'";s+=">"+d+"</div>";return s}
function getContentSize(d){var e={width:0,height:0};o=$("<div style='display:visible;position:absolute;top:0px;left:0px;' id='04A98DB973UPK'>"+d+"</div>");$("body").append(o);e.width=$("#04A98DB973UPK").outerWidth(true);e.height=$("#04A98DB973UPK").outerHeight(true);$("#04A98DB973UPK").remove();return e}function showDialog3(d,e,g,j,l,m,q,r,t){showDialog2(d,e,g,j,l,m,q,r);$("body").append("<div id='04A98DB974UPK'>"+t+"</div>")}
function showDialog2(d,e,g,j,l,m,q,r){dlg_autosizeheight=l==-1?true:false;dialog2_html=d;showDialog("",e,g,j,l,m,q,"",r)}
function showDialog(d,e,g,j,l,m,q,r,t){isopened=true;if(q==0)q=96;if(e!=-1)e=PtToPx(e,q);if(g!=-1)g=PtToPx(g,q);j=PtToPx(j,q);l=PtToPx(l,q);dlg_width=j;dlg_height=l;device_dpi=q;dialogh_ref=d;modal_dialog=m;if(e==-1||g==-1){centerx=$(window).width()/2-j/2+$(document).scrollLeft();centery=$(window).height()/2-l/2+$(document).scrollTop()}else{centerx=e;centery=g}mainref=t?dialogh_ref:r&&r!=""?r+"dialog1.html":"../dialog1.html";if(d=="")mainref="../dialog2.html";d=getFullWidth();e=getFullHeight();m?
$(document.body).append('<div id="scrollarea" scrolling="no" style="display:visible;position:absolute; top:0px; left: 0px; overflow:auto; z-index: 100;width:'+d+"px;height:"+e+'px;"></div>'):$(document.body).append('<div id="scrollarea" scrolling="yes"  style="overflow:auto; z-index: 99;" onclick="Click1();"></div>');if(e<l)centery=0;$(document.body).append('<div id="ehandlerdiv" style="display:none;position:absolute; top:0px; left: 0px; width:100%; height:100%; display:none; z-index: 999;"></div>');
m?$(document.body).append('<div id="graydiv" scrolling="yes" class="pointerdiv" style="display:none;z-index: 99;width:'+d+"px;height:"+e+'px;"></div>'):$(document.body).append('<div id="graydiv" scrolling="yes" class="pointerdiv2" style="display:none;z-index: 99;" onclick="Click1();"></div>');$("#graydiv").show();$("#scrollarea").append('<div id="draggable" style="visibility:hidden;position:absolute; left:'+centerx+"px; top:"+centery+"px; width: "+j+"px; height: "+l+'px;z-index: 998; overflow:hidden;">');
$("#draggable").append('<iframe id="if1" scrolling="no" src="'+mainref+'" frameborder="0" style="width: 100%; height: 100%; margin:0px; padding:0px; position: absolute;top: 0px; left: 0px; background-color: white;"></iframe>')}function isOpenDialog(){return isopened}function removeDiv(d){$(d).remove()}function appendDiv(d){$(document.body).append(d)}
function resizeDialog(){var d=getFullWidth(),e=getFullHeight();$("#graydiv").css("width",d+"px");$("#graydiv").css("height",e+"px");$("#scrollarea").css("width",d+"px");$("#scrollarea").css("height",e+"px")}function closeDialog(){$("#ehandlerdiv").remove();$("#draggable").remove();$("#04A98DB974UPK").remove();$("#graydiv").remove();$("#scrollarea").remove();isopened=false;if(dlg_parent)callback_end&&dlg_parent.eval(callback_end);else callback_end&&eval(callback_end)}
function setOnCloseEvent(d){callback_end=d}function getOnCloseEvent(){return callback_end}function getDialog2Content(){return dialog2_html};var _simulate_120_dpi=false;function IsTouchDevice(){var d=new BrowserInfo;GetBrowserInfo(d);if(d.name=="Chrome")return null;return window.Touch}function IsMacOs(){return k=navigator.userAgent.indexOf("Macintosh")>=0}function IsFF3(){if(this.navigator)if(this.navigator.userAgent)if(this.navigator.userAgent.indexOf("Firefox/3")>0)return true;return false}function IsFF(){var d=new BrowserInfo;GetBrowserInfo(d);return d.name=="Firefox"}
function IsFF4(){var d=new BrowserInfo;GetBrowserInfo(d);if(d.name!="Firefox")return false;return d.version==4}function checkFFVersion(d){var e=new BrowserInfo;GetBrowserInfo(e);if(e.name!="Firefox")return false;return e.version==d}function IsSafari(){var d=new BrowserInfo;GetBrowserInfo(d);return d.name=="Safari"||d.name=="Chrome"}function IsExplorer(){var d=new BrowserInfo;GetBrowserInfo(d);return d.name=="MSIE"}
function IsIE7(){var d=new BrowserInfo;GetBrowserInfo(d);if(d.name!="MSIE")return false;return d.version==7}function IsIE8(){var d=new BrowserInfo;GetBrowserInfo(d);if(d.name!="MSIE")return false;return d.version==8||d.trident&&d.tridentVersion==4}function IsIE9(){var d=new BrowserInfo;GetBrowserInfo(d);if(d.name!="MSIE")return false;return d.version==9||d.trident&&d.tridentVersion==5}
function IsIE10(){var d=new BrowserInfo;GetBrowserInfo(d);if(d.name!="MSIE")return false;return d.version==10||d.trident&&d.tridentVersion==6}function IsActiveXEnabled(){var d=null;try{d=!!new ActiveXObject("htmlfile")}catch(e){d=false}return d}function IsIE10Modern(){if(IsIE10()==false)return false;return!IsActiveXEnabled()}function IsiOS(){p=navigator.platform;if(p==="iPad"||p==="iPad Simulator"||p==="iPhone"||p==="iPod")return true;return false}
function IsiOS5(){p=navigator.userAgent;return p.indexOf("CPU OS 5_")>=0}function IsiOS6(){p=navigator.userAgent;return p.indexOf("CPU OS 6_")>=0}function IsSoundSupported(){if(IsiOS())return false;swfobject.getFlashPlayerVersion();return true}function BrowserInfo(){this.name="";this.subversion=this.version=0;this.trident=false;this.tridentVersion=0}
function GetBrowserInfo(d){s=navigator.userAgent;k=-1;if(s.indexOf("Chrome")>=0){d.name="Chrome";k=s.indexOf("Chrome")+7}else if(s.indexOf("Opera")>=0){d.name="Opera";k=s.indexOf("Opera")+6}else if(s.indexOf("Firefox")>=0){d.name="Firefox";k=s.indexOf("Firefox")+8}else if(s.indexOf("Safari")>=0){d.name="Safari";k=s.indexOf("Version")+8}else if(s.indexOf("MSIE")>=0){d.name="MSIE";k=s.indexOf("MSIE")+5;var e=s.indexOf("Trident/");if(e>=0){d.trident=true;d.tridentVersion=parseInt(s.substr(e+8))}}else{d.name=
"other";d.version=0;return}d.version=parseInt(s.substr(k));d.subversion=parseInt(s.substr(k+2,1));if(d.name=="Safari"&&isNaN(d.version)){d.version=4;d.subversion=0}}function IsSupportedBrowser(){var d=new BrowserInfo;GetBrowserInfo(d);k=false;if(d.name=="MSIE"&&d.version>=7)k=true;if(d.name=="Firefox"&&(d.version>=3&&d.subversion>=5||d.version>=4))k=true;if(d.name=="Safari"&&d.version>=4)k=true;if(d.name=="Chrome"&&d.version>=18)k=true;return k}
function getDIV(d){try{if(document.all)return document.all(d);else if(document.getElementById)return document.getElementById(d);else if(document.layers){var e=document.layers.screen.document.layers[d];e||(e=document.layers[d]);return e}return 0}catch(g){return null}}
function getDIVstyle(d){try{if(document.all)return document.all(d).style;else if(document.getElementById){if(document.getElementById(d).style!=null)return document.getElementById(d).style}else if(document.layers){var e=document.layers.screen.document.layers[d];e||(e=document.layers[d]);return e}return 0}catch(g){return null}}function shiftTo(d,e,g){d=getDIVstyle(d);if(d.moveTo)d.moveTo(e,g);else{d.left=e+"px";d.top=g+"px"}}
function getUniWidth(d){try{var e=getDIV(d),g;if(d.style.width)g=parseInt(d.style.width);else if(d.style.pixelWidth)g=d.style.pixelWidth;else if(d.offsetWidth)g=d.offsetWidth;else if(document.defaultView&&document.defaultView.getComputedStyle)g=document.defaultView.getComputedStyle(e,"").getPropertyValue("width");if(typeof g=="string")g=parseInt(g);return g}catch(j){return null}}
function getUniHeight(d){try{var e=getDIV(d),g;if(d.style.height)g=parseInt(d.style.height);else if(d.style.pixelHeight)g=d.style.pixelHeight;else if(d.offsetHeight)g=d.offsetHeight;else if(document.defaultView&&document.defaultView.getComputedStyle)g=document.defaultView.getComputedStyle(e,"").getPropertyValue("height");if(typeof g=="string")g=parseInt(g);return g}catch(j){return null}}
function getClientWidth(d){try{var e=getDIV(d);return e.clientWidth?e.clientWidth:parseInt(e.width)}catch(g){return d.offsetWidth}}function getClientHeight(d){try{var e=getDIV(d);return e.clientHeight?e.clientHeight:parseInt(e.height)}catch(g){return d.offsetHeight}}function getObjHeight(d){d=getDIV(d);return d.clip?d.clip.height:d.offsetHeight}function getObjWidth(d){d=getDIV(d);return d.clip?d.clip.width:d.offsetWidth}
function getObjLeft(d){try{var e=getDIVstyle(d);return e.pixelLeft?e.pixelLeft:parseInt(e.left)}catch(g){return parseInt(d.offsetLeft)}}function getObjTop(d){try{var e=getDIVstyle(d);return e.pixelTop?e.pixelTop:parseInt(e.top)}catch(g){return parseInt(d.offsetTop)}}function getInsideWindowWidth(){return window.innerWidth?window.innerWidth:document.body.clientWidth}function getInsideWindowHeight(){return window.innerHeight?window.innerHeight:document.body.clientHeight}
function getScrollLeft(){return window.pageXOffset||window.pageXOffset==0?window.pageXOffset:document.body.scrollLeft}function getScrollTop(){return window.pageYOffset||window.pageYOffset==0?window.pageYOffset:document.body.scrollTop}function show(d,e){getDIVstyle(d).visibility="visible";if(e&&IsiOS())try{playMode=="S"&&showActObj.type=="Input"&&$("#"+d+" input").attr("readonly",true)}catch(g){}}function hide(d){getDIVstyle(d).visibility="hidden"}var __DPIwidth=0;
function getDpiInfo(){var d=document.getElementById("DPIInfoDiv");if(d!=null){__DPIwidth=d.clientWidth;__DPIwidth!=0&&document.getElementsByTagName("body")[0].removeChild(d)}return _simulate_120_dpi==true?120:__DPIwidth}function initDpiInfo(){document.write('<div id="DPIInfoDiv" style="visibility:hidden; width: 72pt; height: 1pt;">DPIINFODIV</div>')}function checkIEDPI(){return true};function filterHTML(d){d=replaceString("&","&amp;",d);d=replaceString("<","&lt;",d);return d=replaceString(">","&gt;",d)}function replaceString(d,e,g){if(g!=null)return g.replace(RegExp(d,"g"),e)}function PtToPx(d,e){return d*e/72}function PxToPt(d,e){return d/e*72}function getDPICookie(){var d=new Cookie(document,"UPKDpiDailyWarning","today","/");d.Load();if(d.DPIdailyWarning==1)return true;d.DPIdailyWarning=1;d.Store();return false};
