/* 
﻿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 f="",g=0;g<d.length;g++){ss=d.substr(g,1);if(e==0?Escape.__Normal_Contains(ss):!Escape.__SafeUri_Contains(ss))f+=ss;else{ss=d.charCodeAt(g);a="0000"+ss.toString(16).toUpperCase();f+=(e==0?"$":Escape.SafeUri_EscapeCharacter)+a.substr(a.length-4)}}return f};
Escape.__UnEscape=function(d,e){for(var f="",g=false,j=0;j<d.length;j++)if(g){ss=d.substr(j,4);f+=String.fromCharCode(parseInt("0x"+ss));j+=3;g=false}else{ss=d.substr(j,1);if(ss==(e==0?"$":Escape.SafeUri_EscapeCharacter))g=true;else f+=ss}return f};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,f=0;f<e;f++)if(d==Escape.SafeUri_UnsafeCharacters[f])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 f=0;f<d.length;f++){e=d[f];if(e.length!=0){var g=e.split("=");if(g.length==2)this.params[g[0].toLowerCase()]=g[1];else if(g.length<2)this.params[g[0].toLowerCase()]="";else this.params[g[0].toLowerCase()]=
e.substr(g[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,f;for(f in this.params){var g=this.params[f];if(g!=null){if(e==false)d+="&";e=false;d+=g.length==0?f:f+"="+this.params[f]}}if(this.safemode)d="su="+Escape.MyEscape(d);return d};
UrlParser.prototype.GetCorrectUrl=function(d,e){if(!this.safemode)return d;var f,g=d.indexOf("#");if(g==-1)g=d.indexOf("?");if(g>=0){var j=d.substring(g+1);f=j.split("&");if(f[0].toLowerCase().substr(0,3)=="su=")return d;return d.substring(0,g+1)+"su="+Escape.SafeUriEscape(j)}else return d+(e?"":"?su=")};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(f){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(f){return null}}function shiftTo(d,e,f){d=getDIVstyle(d);if(d.moveTo)d.moveTo(e,f);else{d.left=e+"px";d.top=f+"px"}}
function getUniWidth(d){try{var e=getDIV(d),f;if(d.style.width)f=parseInt(d.style.width);else if(d.style.pixelWidth)f=d.style.pixelWidth;else if(d.offsetWidth)f=d.offsetWidth;else if(document.defaultView&&document.defaultView.getComputedStyle)f=document.defaultView.getComputedStyle(e,"").getPropertyValue("width");if(typeof f=="string")f=parseInt(f);return f}catch(g){return null}}
function getUniHeight(d){try{var e=getDIV(d),f;if(d.style.height)f=parseInt(d.style.height);else if(d.style.pixelHeight)f=d.style.pixelHeight;else if(d.offsetHeight)f=d.offsetHeight;else if(document.defaultView&&document.defaultView.getComputedStyle)f=document.defaultView.getComputedStyle(e,"").getPropertyValue("height");if(typeof f=="string")f=parseInt(f);return f}catch(g){return null}}
function getClientWidth(d){try{var e=getDIV(d);return e.clientWidth?e.clientWidth:parseInt(e.width)}catch(f){return d.offsetWidth}}function getClientHeight(d){try{var e=getDIV(d);return e.clientHeight?e.clientHeight:parseInt(e.height)}catch(f){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(f){return parseInt(d.offsetLeft)}}function getObjTop(d){try{var e=getDIVstyle(d);return e.pixelTop?e.pixelTop:parseInt(e.top)}catch(f){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(f){}}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 IsMozilla(){return window.navigator.appName=="Netscape"}function IsSafari(){if(!IsMozilla())return false;s=window.navigator.userAgent;return k=s.indexOf("Safari")>=0}function Get_Element(d){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}
function Get_Element_Style(d){if(document.all)return document.all(d).style;else if(document.getElementById)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}function Shift_Element_To(d,e,f){d=Get_Element_Style(d);if(d.moveTo)d.moveTo(e,f);else{d.left=e+"px";d.top=f+"px"}}function Get_Element_Height(d){d=Get_Element(d);return d.clip?d.clip.height:d.offsetHeight}
function Get_Element_Width(d){d=Get_Element(d);return d.clip?d.clip.width:d.offsetWidth}function Get_Element_Left(d){var e=Get_Element(d);if(e.offsetLeft!=null){for(d=e.offsetLeft;(e=e.offsetParent)!=null;)d+=e.offsetLeft;return d}e=Get_Element_Style(d);return e.pixelLeft?e.pixelLeft:parseInt(e.left)}
function Get_Element_Top(d){var e=Get_Element(d);if(e.offsetTop!=null){for(d=e.offsetTop;(e=e.offsetParent)!=null;)d+=e.offsetTop;return d}e=Get_Element_Style(d);return e.pixelTop?e.pixelTop:parseInt(e.top)}function Get_InsideWindowWidth(){return window.innerWidth?window.innerWidth:document.body.clientWidth}function Get_InsideWindowHeight(){return window.innerHeight?window.innerHeight:document.body.clientHeight}
function Get_ScrollLeft(){return window.pageXOffset||window.pageXOffset==0?window.pageXOffset:document.body.scrollLeft}function Get_ScrollTop(){return window.pageYOffset||window.pageYOffset==0?window.pageYOffset:document.body.scrollTop}function Show_Element(d){Get_Element_Style(d).visibility="visible"}function Hide_Element(d){Get_Element_Style(d).visibility="hidden"};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,f=0,g=d;try{for(;g!=null;){e=g.document.getElementById("KPATH_API_FRAME");if(e!=null)return e.contentWindow;f++;if(f>7)break;if(g===g.parent)break;g=g.parent}if(d.top.opener!=null)return findKPathAPIFrame(d.top.opener)}catch(j){}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 f;f=this.CheckParam(strArg,"aicc_url=");if(f!="")this.aicc_url=f.substr(0,4).toLowerCase()!="http"?LmsConfig.AiccUrlProtocol+f:f;else{f=this.CheckParam(strArg,"aicc_sid=");if(f!="")this.aicc_sid=f}}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 f=e.length,g="";if(d.substr(0,f).toLowerCase()==e)g=d.substring(f);return g};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 f=d%3600;d-=f;e=Math.round(e*100)/100;var g=e=new String(e);if(e.indexOf(".")!=-1){g=e.substring(0,e.indexOf("."));e.substring(e.indexOf(".")+1,e.length)}if(g.length<2)g="0"+g;e=g;d=d%3600!=0?0:d/3600;f=f%60!=0?0:f/60;if((new String(d)).length<2)d="0"+d;if((new String(f)).length<2)f="0"+f;return d+":"+f+":"+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 f;f=GetTopLevelLmsMode()=="LMS"?d:e;this.status_obj.setModeavail("S",f.S);this.status_obj.setModeavail("T",f.T);this.status_obj.setModeavail("K",f.K);this.status_obj.setModeavail("D",f.D);this.status_obj.setModeavail("P",f.P);this.status_obj.setModeavail("E",f.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,f){this.status_obj=new LmsTopicLaunchStatus(d);this.status_obj.setRequiredMode(e,f);lmslog.addEntry(0,"OpenTopicLaunchStatus","RequiredMode",this.status_obj.requiredMode);this.status_obj.isScored=e.indexOf("K")!=-1;d=GetTopLevelLmsMode()=="LMS"?e:f;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 f=this.lesson_data,g,j=null;if(f)if(this.bigsco)j=e;else{var m=f.indexOf("@");if(m>0){g=parseInt(f.substring(0,m));j=f.substring(m+1,m+g+1).replace(/ /g,"+");f=f.substring(m+g+1)}}if(e===j&&f.length===d+1){this.status_obj.savedStatus=f.charAt(0);this.status_obj.status=f.charAt(0)==="I"?LMS_INCOMPLETE:LMS_NOT_ATTEMPTED;for(g=0;g<d;g++)this.status_obj.questionstatus[g]=f.charAt(g+
1)}else{if(f&&!this.bigsco){this.status_obj.stateDiscarded=true;this.status_obj.savedStatus=f.charAt(0)}else this.status_obj.savedStatus="N";this.status_obj.status=LMS_NOT_ATTEMPTED;for(g=0;g<d;g++)this.status_obj.questionstatus[g]="N"}return this.status_obj};LmsComBase.prototype.OpenTOCStatus=function(d,e){var f=new LmsTOCStatus;this.status_obj=f;var g=new TOCState(d,e);f.setTocState(g);this.lesson_data!=null&&this.lesson_data.length>0&&g.DeserializeTOC(this.lesson_data);return f};
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),f=this.API.LMSGetLastError();if(f!=this.ErrorCodes.NoError){e=this.API.LMSGetErrorString(f);lms_ConnectionLost(f+" "+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 f=this.API.LMSGetLastError();if(f!=this.ErrorCodes.NoError&&f!=this.ErrorCodes.NotImplemented){var g=this.API.LMSGetErrorString(f);lms_ConnectionLost(f+" "+g+", "+d+", "+e);lmslog.addEntry(0,"doLMSSetValue","",R_scorm_setvalfail+d+":"+e+" "+g);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 f=d%3600;d-=f;e=Math.round(e*100)/100;var g=e=new String(e);if(e.indexOf(".")!=-1){g=e.substring(0,e.indexOf("."));e.substring(e.indexOf(".")+1,e.length)}if(g.length<2)g="0"+g;e=g;d=d%3600!=0?0:d/3600;f=f%60!=0?0:f/60;if((new String(d)).length<2)d="0"+d;if((new String(f)).length<2)f="0"+f;return"PT"+d+"H"+f+"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),f=this.API.GetLastError();if(f!=this.ErrorCodes.NoError&&f!=this.ErrorCodes.DataModelElementValueNotInitialized)if(f==this.ErrorCodes.KPathTimeout&&this.object_type_name=="LmsComKPath"){lmslog.addEntry(0,"doGetValue","","KCenter timeout");f=this.API.GetValue("upk.idle_time");lmslog.addEntry(0,"doGetValue","upk.idle_time",f);this.idle_time+=f;lmslog.addEntry(0,"doGetValue","idle_time",this.idle_time);
return this.doGetValue(d)}else{e=this.API.GetErrorString(f);lms_ConnectionLost(f+" "+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 f=this.API.GetLastError();if(f!=this.ErrorCodes.NoError&&f!=this.ErrorCodes.UnimplementedDataModelElement)if(f==this.ErrorCodes.KPathTimeout&&this.object_type_name=="LmsComKPath"){lmslog.addEntry(0,"doSetValue","","KCenter timeout");f=this.API.GetValue("upk.idle_time");lmslog.addEntry(0,"doSetValue","upk.idle_time",f);this.idle_time+=f;lmslog.addEntry(0,"doSetValue","idle_time",
this.idle_time);return this.doSetValue(d,e)}else{var g=this.API.GetErrorString(f);lms_ConnectionLost(f+" "+g+", "+d+", "+e);lmslog.addEntry(0,"doSetValue","",R_scorm_setvalfail+d+":"+e+" "+g);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 f=this;e.LoadRuntime(this.guid,0,0,0,function(g,j,m,q){f.LoadAPIAdapterCallback(g,j,m,q)})}else d()}};
LmsComKPath.prototype.LoadAPIAdapterCallback=function(d,e,f,g){if(d=="succeeded"&&e==this.guid){this.API=f.GetAPI();lmslog.addEntry(0,"LoadAPIAdapterCallback","","KPath adapter bound");try{this.deferred_callback()}catch(j){}}else{if(d=="no SCO")this.API=null;else alert(R_scorm_noapi+" "+g);lmslog.addEntry(0,"LoadAPIAdapterCallback","",g);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 f=e.status_obj,g=this.doGetValue("cmi.interactions._count");if(d==-1)d=g;d>=g&&this.doSetValue("cmi.interactions."+d+".id",e.guid);this.doSetValue("cmi.interactions."+d+".type",f.getQuestionType());this.doSetValue("cmi.interactions."+d+".timestamp",(new Date).toSCORM());this.doSetValue("cmi.interactions."+d+".weighting","1");if(f.getResult()){this.doSetValue("cmi.interactions."+d+".learner_response",f.getLearnerResponse());this.doSetValue("cmi.interactions."+
d+".result",f.getResult())}this.doCommit();return d}};LmsComKPath.prototype.getAnsweredQuestions=function(){var d={};if(!this.API)return d;for(var e=this.doGetValue("cmi.interactions._count"),f=0;f<e;f++){var g=this.doGetValue("cmi.interactions."+f+".id");d[g]={index:f};d[g].weighting=this.doGetValue("cmi.interactions."+f+".weighting");d[g].result=this.doGetValue("cmi.interactions."+f+".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,f,g=false;d+=" ";for(var j=d.split("\r"),m=0;m<j.length;m++){var q=j[m],l=trimValue(q.substring(0,q.indexOf("="))),r=trimValue(q.substring(q.indexOf("=")+1));
if(l.toLowerCase()=="error"){e=r;g=true}if(l.toLowerCase()=="error_text")f=r;if(l.toLowerCase()=="aicc_data"){this.aicc_data=d.substring(d.indexOf(q.substring(0,q.indexOf("=")))+q.substring(0,q.indexOf("=")).length+1);g=true}}if(g)if(e==0){j=get_group_content("core",this.aicc_data).split("\r");for(m=0;m<j.length;m++){q=j[m];l=trimValue(q.substring(0,q.indexOf("=")));r=trimValue(q.substring(q.indexOf("=")+1));if(l.toLowerCase()=="student_id")this.student_id=r;if(l.toLowerCase()=="student_name")this.student_name=
r;if(l.toLowerCase()=="lesson_status"){this.lesson_status=r.toLowerCase().charAt(0);if(r.indexOf(",")!=-1)this.lesson_flag=trimValue(r.substring(r.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(l.toLowerCase()=="lesson_location")this.lesson_location=r;if(l.toLowerCase()=="credit")this.credit=r;if(l.toLowerCase()=="score")this.score=r;if(l.toLowerCase()=="time")this.time=r}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+f);lmslog.addEntry(0,"hacpGetparam","","Unable to continue because of the following error: "+f)}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 f="",g=e.split("\r"),j=false,m=0;m<g.length;m++){var q=trimValue(g[m]);if(q.substr(0,1)=="[")j=q.toLowerCase().indexOf("["+d.toLowerCase()+"]")>=0?true:false;else if(j)f+=q+"\r\n"}return f}
function trimValue(d){for(var e=0,f=d.length,g=0;g<d.length;g++)if(d.substr(g,1)!=" "&&d.substr(g,1)!="\t"&&d.substr(g,1)!="\n"&&d.substr(g,1)!="\r"){e=g;break}if(g==d.length)return"";for(g=d.length-1;g>0;g--)if(d.substr(g,1)!=" "&&d.substr(g,1)!="\t"&&d.substr(g,1)!="\n"&&d.substr(g,1)!="\r"){f=g;break}if(g==0)f=0;return d.substring(e,f+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 f=0;f<this.questionstatus.length;f++)e+=this.questionstatus[f];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,f,g=d.indexOf("@");if(g>0){e=parseInt(d.substring(0,g));f=d.substring(g+1,g+e+1);if(f==this.TocVersion){d=d.substring(g+e+2);g=d.indexOf("@");if(g>0){e=parseInt(d.substring(0,g));d=d.substring(g+1,g+e+1);if(d.length==e){d=this.RLESDecode(d);this.DeserializeLookUpTable(d)}}}}};
TOCState.prototype.DeserializeLookUpTable=function(d){for(var e=0,f="",g=0;g<d.length;g++){f=d.charAt(g);this.SetStatus(e,f);for(f="";g<d.length-1&&d.charAt(g+1)>="0"&&d.charAt(g+1)<="9";){g++;f+=d.charAt(g)}f.length>0&&this.SetScore(e,parseInt(f));if(g<d.length-1&&d.charAt(g+1)=="{"){f=d.indexOf("}",g+2);this.SetChildren(e,d.substring(g+2,f));g=f}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 f=this.LookUpTable[e].Status,g=this.LookUpTable[e].ChildrenStatus;f||(f="N");d+=f;if(g)d+="{"+g+"}"}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="",f=0,g="";e=d.charAt(0);for(var j=f=1;j<d.length;j++)if(d.charAt(j)==e)f++;else{if(f>2){g+="#";g+=f;g+=e}else g+=d.substring(j-f,j);e=d.charAt(j);f=1}if(f>2){g+="#";g+=f;g+=e}else g+=d.substring(j-f,j);return g};
TOCState.prototype.RLESDecode=function(d){for(var e="",f="",g=0;g<d.length;g++)if(d.charAt(g)=="#"){f="";for(g++;d.charAt(g)>="0"&&d.charAt(g)<="9";){f+=d.charAt(g);g++}f=parseInt(f);for(var j=0;j<f;j++)e+=d.charAt(g)}else e+=d.charAt(g);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,f,g,j){this.logType=e;this.funcName=f;this.varName=g;this.msgValue=j;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 f=this.msgValue;if(f==="")f="&nbsp;";var g="<tr>";g+="<td align='right'>"+this.dateTime/1E3+"</td>";g+="<td style='color:"+d+";'>"+this.funcName+"</td>";g+="<td>"+e+"</td>";g+="<td>"+f+"</td>";g+="</tr>";return g};
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,f,g){if(this.enabled){this.logArray.push(new LogEntry(this.startDateTime.getTime(),d,e,f,g));this.changed=true;this.traceWindow&&this.windowReady&&this.traceWindow.UpdateTraceStack()}};
Log.prototype.writeLog=function(d,e){var f=e;if(f>this.logArray.length||f==0)f=this.logArray.length;var g="<table width='600'>";g+="<tr>";g+="<th colspan=4>Session start: "+this.startDateTime+"</th>";g+="</tr>";g+="<tr>";g+="<th>time</th>";g+="<th>function</th>";g+="<th>variable</th>";g+="<th>message</th>";g+="</tr>";var j;if(d==0)for(var m=this.logArray.length-f;m<this.logArray.length;m++){j=this.logArray[m];g+=j.GetTableRow(m)}else for(m=this.logArray.length-1;m>=this.logArray.length-f;m--){j=this.logArray[m];
g+=j.GetTableRow(m)}g+="</table>";this.changed=false;this.windowReady=true;return g};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,f,g){if(lms_initialized==true)setTimeout(g,1);else{__Ialert("lms_InitPage called with parameters:"+d+","+e+","+f+","+g);lms_store={window:window,childIndex:d,parentW:e,cguid:f,callbackfunction:g};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 f=e.child;f&&f.session_active&&f.owner&&!f.owner.closed&&f.owner.lms_ClosePage(true);(f=e.ancillaryChild)&&f.session_active&&f.owner&&!f.owner.closed&&f.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 _modeLaunch="incomplete",_feedbackUrlArgs="";function lms_LoadAdapterComplete(){__alert("lms_LoadAdapterComplete() called");var d=document.LmsCom;d.Begin();d.assessment_guid&&d.doSetUPKValue("upk.actual_guid",d.assessment_guid);d.utPushModeIndex();lms_initialized=true;setTimeout(lms_store.callbackfunction,1)}function GetChildLmsCom(d){__Ialert("lms_GetChildLmsCom() called");var e=document.LmsCom,f=d.window.document.LmsCom=new LmsComBase(e);f.owner=d.window;e.child=f}
function ListenChildClose(){__alert("lms_ListenChildClose() called");var d=document.LmsCom,e=d.child;if(e){d.status_obj.modes[e.status_obj.mode.id].complete=e.status_obj.mode.complete;d.utPopModeIndex()}}function _closePage(){var d=document.LmsCom;d.utRecordEndTime(new Date);d.utRecordCompletionStatus(_modeLaunch)}
function lms_LaunchTopic(d){__alert("lms_LaunchTopic("+d+") called");var e=document.LmsCom;if(d=="P"){e.utPushModeIndex();e.utRecordType("print_it");e.utRecordStartTime(new Date);e.utRecordEndTime(new Date);e.utRecordCompletionStatus(LMS_COMPLETED);e.utPopModeIndex();e.status_obj.setModestatus("P",true);e.SaveStatus()}}
function lms_topicStart(d,e){__alert("lms_topicStart() called with parameters: "+d+","+e);var f=document.LmsCom;f.assessment_guid?f.OpenTopicLaunchStatus(e,lmsModes+"K",playerModes+"K"):f.OpenTopicLaunchStatus(e,lmsModes,playerModes);f.lesson_status===LMS_NOT_ATTEMPTED&&f.status_obj.isComplete()&&f.status_obj.clearTopicstat();var g=["see_it","try_it","know_it","do_it","print_it","test_it"]["STKDPE".indexOf(e)];f.utRecordType(g);f.utRecordStartTime(new Date)}
function lms_topicFinish(d){__alert("lms_topicFinish() called with parameter: "+d);document.LmsCom.status_obj.mode.complete=true;_modeLaunch=LMS_COMPLETED}function lms_frameView(d,e,f){__alert("lms_frameView() called with parameter: "+d+","+e+","+f);document.LmsCom.utRecordFrameViewed(f);_feedbackUrlArgs="&FrameID="+f+"&UPKMode="+e}
function lms_knowitScore(d,e,f){__alert("lms_knowitScore called with parameter: "+d+","+e+","+f);d=document.LmsCom;d.status_obj.mode.complete=true;d.status_obj.score=e;d.status_obj.passed=f;d.utRecordSuccessStatus(f?"passed":"failed");d.utRecordScoreScaled(e/100)}function lms_getUserName(){return document.LmsCom.student_name}function lms_KPathLogout(){_logout(true)}var _lms_module_name="lms_topic.js",_lms_show_alert=false,_lms_show_Ialert=false;var appOpened=true,oPopup,oPopBody,i=0,constPad=8,popHeight=400,popWidth=275,currentPos=0,MainTopPos,MainLeftPos,newwindow="",isIE=navigator.appName.indexOf("Microsoft")!=-1?true:false,popupVersion=false,pss=document.location.hash.substring(1),pstrArgs=pss.split("&");if(pstrArgs.length==0||pstrArgs[0]==""){pss=document.location.search.substring(1);pstrArgs=pss.split("&")}
if(pstrArgs.length==1)if(pstrArgs[0].toLowerCase().substr(0,3)=="su="){safeUriMode=true;var ps=Escape.SafeUriUnEscape(pstrArgs[0].substr(3));pstrArgs=ps.split("&")}for(i=0;i<pstrArgs.length;i++)if(pstrArgs[i].substr(0,6).toLowerCase()=="popup=")popupVersion=true;var isIE55,TopPos,LeftPos;
if(isIE&&popupVersion){TopPos=screen.availHeight-popHeight-constPad;LeftPos=screen.availWidth-popWidth-constPad}else{TopPos=window.screenTop!=undefined?window.screenTop:window.screenY;LeftPos=window.screenLeft!=undefined?window.screenLeft:window.screenX}var TaskBarHeight=0,idPostFix="",eventTarget=null;
if(isIE&&popupVersion){var appVerArray=navigator.appVersion.split(";"),appVer=appVerArray[1];appVer=appVer.substr(6);appVer=parseFloat(appVer);isIE55=appVer>=5.5?true:false}else{isIE55=false;constPad=12;TaskBarHeight=25;TopPos-=TaskBarHeight}oPopup=isIE&&popupVersion?window.createPopup():window;isIE&&popupVersion||(idPostFix="FF");function getID(d){return document.all?document.all(d):document.getElementById(d)}
function oPopup_show(d,e,f,g,j){if(!popHidden&&isIE&&popupVersion){oPopup.show(d,e,f,g);if(!j){LeftPos=oPopup.document.parentWindow.screenLeft;TopPos=oPopup.document.parentWindow.screenTop}}}function RePop(){window.screenLeft>=-1E3&&window.screenTop>=-1E3&&isIE&&popupVersion&&!popHidden&&!oPopup.isOpen&&appOpened&&oPopup_show(LeftPos,TopPos,popWidth,popHeight);if(window.screenLeft<=3E3&&isIE&&popupVersion&&!popHidden)try{window.moveTo(4E3,4E3)}catch(d){}}
function InitPopUp(){if(isIE&&popupVersion){oPopBody=oPopup.document.body;oPopBody.innerHTML=getID("oContextHTML0").innerHTML;oPopBody.ondragstart=EventCancel}else{oPopBody=document.body;document.getElementById("noPopupFF").style.display="inline";if(isIE){oPopBody.onmousedown=EventCancel;oPopBody.ondragstart=EventCancel;Get_Element("cameraFF").onmousedown=function(){SSEH(this)};Get_Element("giSplitter").onmousedown=function(){GGGSplitD(this)};window.onresize=function(){GICloseAction();GIOnResize()}}else{oPopBody.addEventListener("mousedown",
function(d){EventCancel(d)},false);window.addEventListener("resize",GICloseAction,true);window.addEventListener("resize",GIOnResize,true);Get_Element("cameraFF").addEventListener("mousedown",SSEH,true);Get_Element("giSplitter").addEventListener("mousedown",GGGSplitD,true)}window.onbeforeunload=closeAp}if(!IsIE10Modern())oPopBody.oncontextmenu=EventCancel;oPopBody.style.backgroundColor=GIbgcolor?GIbgcolor:"#FEFECE";oPopBody.style.color="black";if(isIE&&popupVersion){oPopBody.style.border="solid black 3px";
oPopBody.style.borderBottomWidth="2px"}oPopBody.aLink="blue";oPopBody.vLink="blue";if(isIE&&popupVersion){oPopBody.attachEvent("onmousemove",BodyMove);oPopBody.attachEvent("onmousedown",GISizePopup)}oPopup_show(LeftPos,TopPos,popWidth,popHeight)}var PopIV=null,noStart=false;function Load(){GIPlayer=self;loadtemp();GINoCookieSave=false;InitPopUp();if(isIE&&popupVersion)PopIV=setInterval(RePop,250)}var resizdir=0,resizbdown=false;
function BodyMove(){var d=oPopBody.ownerDocument.parentWindow.event;if(d.srcElement.id=="movePopup"&&!resizbdown)resizdir="move";else if((d.srcElement.id=="resizeSE"||d.clientX>=popWidth-3&&d.y>=popHeight-15||d.clientX>=popWidth-15&&d.y>=popHeight-3)&&!resizbdown){oPopBody.style.cursor="se-resize";resizdir="se"}else if((d.clientX<=3&&d.clientY<=15||d.clientY<=3&&d.clientX<=15)&&!resizbdown){oPopBody.style.cursor="nw-resize";resizdir="nw"}else if((d.clientX<=3&&d.clientY>=popHeight-15||d.clientY>=
popHeight-3&&d.clientX<=15)&&!resizbdown){oPopBody.style.cursor="sw-resize";resizdir="sw"}else if((d.clientX>=popWidth-15&&d.clientY<=3||d.clientY<=15&&d.clientX>=popWidth-3)&&!resizbdown){oPopBody.style.cursor="ne-resize";resizdir="ne"}else if(d.clientY>=popHeight-3&&!resizbdown){oPopBody.style.cursor="s-resize";resizdir="s"}else if(d.clientX>=popWidth-3&&!resizbdown){oPopBody.style.cursor="e-resize";resizdir="e"}else if(d.clientX<=3&&!resizbdown){oPopBody.style.cursor="w-resize";resizdir="w"}else if(d.clientY<=
3&&!resizbdown){oPopBody.style.cursor="n-resize";resizdir="n"}else{oPopBody.style.cursor="auto";resizbdown||(resizdir=0)}}var captobj=null,doresize=false,rIV=null;function GIResize(){doresize=true}
function GISizePopup(){if(resizdir){var d=oPopup.document.parentWindow.event;if(d.button==1){var e=d.type;if(e=="mousedown"&&d.button==1){captobj=d.srcElement;resizeStartPos={left:LeftPos-d.screenX,width:popWidth+d.screenX,width2:popWidth-d.screenX,right:LeftPos+popWidth,top:TopPos-d.screenY,height:popHeight+d.screenY,height2:popHeight-d.screenY,bottom:TopPos+popHeight};resizbdown=true;captobj.setCapture();rIV=setInterval(GIResize,15);captobj.attachEvent("onmousemove",GISizePopup);captobj.attachEvent("onmouseup",
GISizePopup)}else if(e=="mouseup"){if(PlayerConfig.EnableCookies&&GICookie&&GICookie!=null){GICookie.Cleft=LeftPos;GICookie.Ctop=TopPos;GICookie.Cwidth=popWidth;GICookie.Cheight=ScreenshotVisible?popHeight:popHeight+SavedSSHeight;GICookie.Csss=ScreenshotVisible+1;GICookie.Store()}resizbdown=false;clearInterval(rIV);captobj.detachEvent("onmousemove",GISizePopup);captobj.detachEvent("onmouseup",GISizePopup);captobj.releaseCapture();resizeStartPos=null}else if(resizeStartPos&&doresize){doresize=false;
switch(resizdir){case "move":LeftPos=resizeStartPos.left+d.screenX;TopPos=resizeStartPos.top+d.screenY;break;case "se":popHeight=resizeStartPos.height2+d.screenY;popWidth=resizeStartPos.width2+d.screenX;if(LeftPos+popWidth>screen.width)popWidth=screen.width-LeftPos;if(TopPos+popHeight>screen.height)popHeight=screen.height-TopPos;break;case "ne":popHeight=resizeStartPos.height-d.screenY;popWidth=resizeStartPos.width2+d.screenX;TopPos=resizeStartPos.top+d.screenY;if(TopPos<0)popHeight=resizeStartPos.bottom;
if(TopPos+200>resizeStartPos.bottom)TopPos=resizeStartPos.bottom-200;if(LeftPos+popWidth>screen.width)popWidth=screen.width-LeftPos;break;case "nw":popWidth=resizeStartPos.width-d.screenX;LeftPos=resizeStartPos.left+d.screenX;popHeight=resizeStartPos.height-d.screenY;TopPos=resizeStartPos.top+d.screenY;if(LeftPos<0)popWidth=resizeStartPos.right;if(TopPos<0)popHeight=resizeStartPos.bottom;if(LeftPos+150>resizeStartPos.right)LeftPos=resizeStartPos.right-150;if(TopPos+200>resizeStartPos.bottom)TopPos=
resizeStartPos.bottom-200;break;case "sw":popHeight=resizeStartPos.height2+d.screenY;popWidth=resizeStartPos.width-d.screenX;LeftPos=resizeStartPos.left+d.screenX;if(TopPos+popHeight>screen.height)popHeight=screen.height-TopPos;if(LeftPos+150>resizeStartPos.right)LeftPos=resizeStartPos.right-150;if(LeftPos<0)popWidth=resizeStartPos.right;break;case "w":popWidth=resizeStartPos.width-d.screenX;LeftPos=resizeStartPos.left+d.screenX;if(LeftPos+150>resizeStartPos.right)LeftPos=resizeStartPos.right-150;
if(LeftPos<0)popWidth=resizeStartPos.right;break;case "n":popHeight=resizeStartPos.height-d.screenY;TopPos=resizeStartPos.top+d.screenY;if(TopPos+200>resizeStartPos.bottom)TopPos=resizeStartPos.bottom-200;if(TopPos<0)popHeight=resizeStartPos.bottom;break;case "e":popWidth=resizeStartPos.width2+d.screenX;if(LeftPos+popWidth>screen.width)popWidth=screen.width-LeftPos;break;case "s":popHeight=resizeStartPos.height2+d.screenY;if(TopPos+popHeight>screen.height)popHeight=screen.height-TopPos}if(ScreenshotVisible){if(popHeight<
200)popHeight=200}else if(popHeight<129)popHeight=129;if(popWidth<150)popWidth=150;if(ScreenshotVisible){d=oPopup.document.getElementById("split1");e=oPopup.document.getElementById("split2");var f=d.clientHeight;if(f<78)f=78;f/=d.clientHeight+e.clientHeight;if(f<0.1)f=0.1;if(f>0.9)f=0.9;d.style.height=f*100+"%";e.style.height=(1-f)*100+"%"}oPopup_show(LeftPos,TopPos,popWidth,popHeight);GITextFrame.style.width=popWidth-29}}}}var splitState=0;
function GGGSplitD(d){var e=isIE?oPopBody.ownerDocument.parentWindow.event:d;if(isIE){if(!popupVersion){d.onmousemove=function(){GGGSplitM(d)};d.onmouseup=function(){GGGSplitU(d)}}d.setCapture()}else{eventTarget=e.currentTarget;e=Get_Element("EventListenerDIV");e.style.cursor="n-resize";e.style.zIndex=4;e.addEventListener("mousemove",function(f){GGGSplitM(f)},true);e.addEventListener("mouseup",function(f){GGGSplitU(f)},true)}splitState=1}
function GGGSplitM(d){d=isIE?oPopBody.ownerDocument.parentWindow.event:d;if(splitState){d=d.clientY;var e=oPopup.document.getElementById("split1"+idPostFix),f=oPopup.document.getElementById("split2"+idPostFix),g=0;if(isIE&&popupVersion){g=e.getBoundingClientRect().top;d-=g+12}else{g=oPopup.document.getElementById("giTitlebarFF").clientHeight;d-=isIE?g+27:g+21}if(d<78)d=78;g=e.clientHeight+f.clientHeight;d/=g;if(d<0.1)d=0.1;if(d>0.9)d=0.9;e.style.height=d*100+"%";f.style.top=d*100+"%";f.style.height=
(1-d)*100+"%";GIOnResize()}}
function GGGSplitU(d){if(PlayerConfig.EnableCookies&&GICookie&&GICookie!=null){GICookie.Cleft=LeftPos;GICookie.Ctop=TopPos;GICookie.Cwidth=popWidth;GICookie.Cheight=ScreenshotVisible?popHeight:popHeight+SavedSSHeight;GICookie.Cs2=isIE&&popupVersion?oPopup.document.getElementById("split2"+idPostFix).clientHeight:oPopup.document.getElementById("split1"+idPostFix).style.height;GICookie.Csss=ScreenshotVisible+1;GICookie.Store()}splitState=0;isIE&&d.releaseCapture();eventTarget=null;if(!(isIE&&popupVersion)){d=
Get_Element("EventListenerDIV");d.style.zIndex=-1;d.style.cursor="default";if(isIE){d.onmousemove=null;d.onmouseup=null;d.releaseCapture()}else{d.removeEventListener("mousemove",function(e){SSEH(e)},true);d.removeEventListener("mouseup",function(e){SSEH(e)},true)}}}var startPos=null;
function SSEH(d){var e=isIE?oPopBody.ownerDocument.parentWindow.event:d;isIE||e.preventDefault();if(e.type=="mousedown"&&e.button==2){clearInterval(IV);IV=null;if(hpos){GICamera.scrollLeft=hpos.left-GICamera.clientWidth/2;GICamera.scrollTop=hpos.top-GICamera.clientHeight/2}else{GICamera.scrollLeft=0;GICamera.scrollTop=0}}else if(e.type=="mousedown"&&(!isIE&&e.button==0||isIE&&e.button==1)){d=isIE?d:e.currentTarget;clearInterval(IV);IV=null;startPos={top:d.scrollTop+e.screenY,left:d.scrollLeft+e.screenX};
eventTarget=d;e=Get_Element("EventListenerDIV");e.style.cursor="move";e.style.zIndex=4;if(isIE){e.onmousemove=SSEH;e.onmouseup=SSEH;e.setCapture()}else{e.addEventListener("mousemove",function(f){SSEH(f)},true);e.addEventListener("mouseup",function(f){SSEH(f)},true)}}else if(isIE&&e.type=="mousedown"&&e.button==1){clearInterval(IV);IV=null;startPos={top:d.scrollTop+e.screenY,left:d.scrollLeft+e.screenX};d.setCapture()}else if(e.type=="mouseup"){startPos=null;isIE&&popupVersion&&d.releaseCapture();
eventTarget=null;if(!(isIE&&popupVersion)){e=Get_Element("EventListenerDIV");e.style.zIndex=-1;e.style.cursor="default";if(isIE){e.onmousemove=null;e.onmouseup=null;e.releaseCapture()}else{e.removeEventListener("mousemove",function(f){SSEH(f)},true);e.removeEventListener("mouseup",function(f){SSEH(f)},true)}}}else if(startPos)if(isIE&&popupVersion){d.scrollTop=startPos.top-e.screenY;d.scrollLeft=startPos.left-e.screenX}else{eventTarget.scrollTop=startPos.top-e.screenY;eventTarget.scrollLeft=startPos.left-
e.screenX}}var popHidden=false;function HidePopup(){if(isIE&&popupVersion){oPopup_show(1,1,1,1,true);clearInterval(PopIV)}else document.title="_"+document.title;popHidden=true;GIStopCHL()}function ShowPopup(){popHidden=false;oPopup_show(LeftPos,TopPos,popWidth,popHeight);if(isIE&&popupVersion)PopIV=setInterval(RePop,250);else if(document.title.indexOf("_")==0)document.title=document.title.substr(1);contCHL&&top.GIPlayer.GIStartIV()}
function closeAp(){if(appOpened){!noStart&&GIEndFrame&&lms_topicFinish(getMyGuid());noStart||lms_ClosePage();closeAp2()}}
function closeAp2(){if(PlayerConfig.EnableCookies&&GICookie&&GICookie!=null){if(!(isIE&&popupVersion)){TopPos=window.screenTop!=undefined?window.screenTop:window.screenY;LeftPos=window.screenLeft!=undefined?window.screenLeft:window.screenX;popWidth=document.getElementById("noPopupFF").clientWidth;popHeight=document.getElementById("noPopupFF").clientHeight}if(!GINoCookieSave){GICookie.Cleft=LeftPos;GICookie.Ctop=TopPos;GICookie.Cwidth=popWidth;GICookie.Cheight=ScreenshotVisible||!(isIE&&popupVersion)?
popHeight:popHeight+SavedSSHeight;GICookie.Csss=ScreenshotVisible+1;GICookie.Store()}}clearInterval(IV);if(isIE&&popupVersion){clearInterval(PopIV);StopKeyHook();oPopup.hide()}appOpened=false;top.GIPlayer&&top.GIPlayer.GIClosePlayer();window.close()}
function SendEventToHemiFFButtonPlugin(){var d=document.getElementById("HTML2HemiFFButtonData");if(!d){d=document.createElement("HTML2HemiFFButtonData");d.setAttribute("id","HTML2HemiFFButtonData");document.documentElement.appendChild(d)}if("createEvent"in document){d.setAttribute("paramDomain",document.domain);d.setAttribute("paramTitle",document.title+" - Mozilla Firefox");var e=document.createEvent("Events");e.initEvent("StayOnTopEvent",true,false);d.dispatchEvent(e);d.removeAttribute("paramTitle");
d.removeAttribute("paramDomain")}};var template_leadin="",template_leadout="",template_explanation="",template_pauselink="",template_knowit_leadin="",template_knowit_leadout="",template_knowit_nextstep="",template_knowit_explanation="",template_knowit_leadin_score="",template_knowit_warningL1="",template_knowit_warningL2="",template_knowit_warningL3_0="",template_knowit_warningL3_H="",template_knowit_warningL4="",template_scoring="",template_scoring_YES="",template_scoring_NO="",template_knowit_continue="",template_knowit_confirmdemo=
"",template_typingcomplete="",template_knowit_dragwarning="",template_knowit_finish_close="",template_knowit_finish_close_inassessment="",template_strinp_suppress_example=0,_template_arr=[],_template_retfv="";
function LoadTemplates(d,e){_template_retfv=e;if(document.implementation&&document.implementation.createDocument){xmlDoc=document.implementation.createDocument("","",null);xmlDoc.onload=LoadTemplates_Returned0}else if(window.ActiveXObject){xmlDoc=new ActiveXObject("Microsoft.XMLDOM");xmlDoc.onreadystatechange=function(){xmlDoc.readyState==4&&LoadTemplates_Returned0()}}else{LoadTemplates_Error();return}try{xmlDoc.load("../../template/"+d+"/template.xml")}catch(f){LoadXMLDocArray("../../template/"+
d+"/template.xml","LoadTemplates_Returned","LoadTemplates_Error","Item",true)}}function LoadTemplates_Returned0(){_nodesArray=[];for(var d=xmlDoc.getElementsByTagName("Item"),e=0;e<d.length;e++){n=d[e];xmlname=n.attributes[0].nodeValue;xmltext="";for(var f=0;f<n.childNodes.length;f++)if(n.childNodes[f].xml)xmltext+=n.childNodes[f].xml;else{var g=new XMLSerializer;xmltext+=g.serializeToString(n.childNodes[f])}_nodesArray[_nodesArray.length]=xmlname+"="+xmltext}LoadTemplates_Returned(_nodesArray)}
function LoadTemplates_Error(){alert("Common template loading error ...")}function LoadTemplates_Returned(d){_template_arr=[];for(var e=0;e<d.length;e++){k=d[e].indexOf("=");key=d[e].substr(0,k);value=d[e].substr(k+1);_template_arr[key]=value}LoadAll();setTimeout(_template_retfv,100)}function GetTemp(d){if(_template_arr[d])return _template_arr[d];return""}function Insert(d,e,f){return d.substr(0,f)+e+d.substr(f)}
function LoadAll(){template_leadin=GetTemp("leadin");template_leadout=GetTemp("leadout");template_explanation=GetTemp("continue");template_knowit_leadin=GetTemp("knowit_leadin");template_knowit_leadout=GetTemp("knowit_leadout");template_knowit_nextstep=GetTemp("knowit_nextstep");template_knowit_explanation=GetTemp("knowit_explanation");if(IsTouchDevice()){var d=' style="color:#0033cc;font-weight:bold;" href="javascript:HLink(0)"';template_leadin=R_swipe_start;var e=template_leadin.indexOf("<a");template_leadin=
Insert(template_leadin,d,e+2);d=' style="color:#0033cc;font-weight:bold;" href="javascript:HLink(2)"';template_explanation=R_swipe_continue;e=template_explanation.indexOf("<a");template_explanation=Insert(template_explanation,d,e+2);d=' style="color:#0033cc;font-weight:bold;" href="javascript:HLink(2)"';template_leadout=R_swipe_finish;e=template_leadout.indexOf("<a");template_leadout=Insert(template_leadout,d,e+2)}template_knowit_leadin_score=GetTemp("leadin_score");template_knowit_warningL1=GetTemp("knowit_warningL1");
template_knowit_warningL2=GetTemp("knowit_warningL2");template_knowit_warningL3_0=GetTemp("knowit_warningL3_0");template_knowit_warningL3_H=GetTemp("knowit_warningL3_H");template_knowit_warningL4=GetTemp("knowit_warningL4");template_scoring=GetTemp("scoring");template_scoring=template_scoring.substr(0,6)+' width="100%" '+template_scoring.substr(6);template_scoring_YES=GetTemp("scoring_YES");template_scoring_NO=GetTemp("scoring_NO");template_knowit_continue=GetTemp("knowit_continue");template_knowit_confirmdemo=
GetTemp("knowit_confirmdemo");template_typingcomplete=GetTemp("typingcomplete");template_knowit_dragwarning=GetTemp("knowit_dragwarning");template_knowit_finish_close=GetTemp("knowit_finish_close");template_knowit_finish_close_inassessment=GetTemp("knowit_finish_close_inassessment");template_strinp_suppress_example=GetTemp("strinp_suppress_example");s=GetTemplate_knowit_leadin_score("168")}function ReplaceAll(d,e,f){for(var g=d.indexOf(e);g>=0;){d=Template_Replace(d,e,f);g=d.indexOf(e)}return d}
function Template_Replace(d,e,f){var g=d.indexOf(e);if(g<0)return d;var j=d.substr(0,g);d=d.substr(g+e.length);return j+f+d}function GetTemplate_knowit_leadin_score(d){return Template_Replace(template_knowit_leadin_score,"$score$",d)}function GetTemplate_scoring(d,e,f){s=Replace(template_scoring,"$good$",d);ss=Replace(s,"$needed$",e);return Replace(ss,"$result$",f)};function onHelp(d){if(d.charAt(d.length-1)=="/")d=d.substr(0,d.length-1);if(d.length>0)d+="/";_top=_left=screen.availWidth/17;_height=screen.availHeight-3*_top;if(_height>500)_height=500;_width=_height*4.5/3;_height=390;_width=637;w=window.open(d+"../help/toc.html","odhelp","width="+_width+",height="+_height+",left="+_left+",top="+_top+",resizable=1,toolbar=1,scrollbars=1,location=0,menubar=0");w.focus()};function Cookie(d,e,f,g,j,m){this.$document=d;this.$name=e;if(f=="today"){d=new Date;d.setHours(23);d.setMinutes(59);d.setSeconds(59);this.$exp=d}else this.$exp=f?new Date((new Date).getTime()+f*864E5):null;this.$path=g?g:null;this.$domain=j?j: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 f=d.indexOf(";",e);if(f==-1)f=d.length;d=d.substring(e,f).split("&");for(e=0;e<d.length;e++){f=d[e].split(":");this[f[0]]=unescape(f[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 f=d[e].split("=");if(f[0].toUpperCase()=="PP_SOUND")this.PlayAudio=f[1];else if(f[0].toUpperCase()=="PP_LEADIN")this.ShowLeadIn=f[1];else if(f[0].toUpperCase()=="PP_MARQUEE")this.MarqueeColor=f[1];else if(f[0].toUpperCase()=="PP_SKIP")this.TryIt.EnableSkipping=f[1]=="true";else if(f[0].toUpperCase()=="PP_ENABLE")this.EnablePreferences=f[1]=="true";else if(f[0].toUpperCase()=="PP_HOTKEY"){this.DoIt.HotKey.Ctrl=
f[1].charAt(0);this.DoIt.HotKey.Shift=f[1].charAt(1);this.DoIt.HotKey.Alt=f[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,f){if(UserPrefs.EnablePreferences){d+="/preferences/preferences.html";h=412;var g=[];try{if(lms_IsUserProfileAvailable()){var j=lms_GetUserProfileUrl();if(j!="")g[g.length]="UserProfileUrl="+Escape.MyEscape(j)}}catch(m){}if(e)g[g.length]="nosound";if(f){g[g.length]="seeitonly";h=412}for(e=0;e<g.length;e++){d+=e==0?"?":"&";d+=g[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 f=d[e].split("=");if(f[0].toUpperCase()=="PP_ROLEFILTERING")this.Filtering=f[1]=="true";else if(f[0].toUpperCase()=="PP_ROLES"){this.Roles=[];if(f[1])this.Roles=f[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 sounds=[];function SoundObj(d,e,f){_flist=e.split("+");_fct=_flist.length;this.flist=[];this.fct=0;this.duration=f;for(d=0;d<_fct;d++){s=_flist[d];if(s.substr(0,5)!="TEMP:"){this.flist[this.fct]=s;this.fct++}}}function Sound(d,e,f){if(d.indexOf(".")<0)d+=".ASX";sounds[d.substr(1)]=new SoundObj(d,e,f)};var isOnLink=false;
function ShowInfoBlock(d){try{playMode!=null&&playMode!=""&&PlayStop()}catch(e){}var f=false;d=Escape.MyUnEscape(d);if(d.indexOf("odrel://")==0)d=resolve(d);for(var g=d;g.substr(0,3)=="../";)g=g.substr(3);if(g.substr(36)=="/index.html")f=true;if(f){f=screen.availWidth;f=(f-PlayerConfig.InfoWidth)/2;g=screen.availHeight;g=(g-PlayerConfig.InfoHeight)/2;id=window.open(d,"","top="+g+",left="+f+",width="+PlayerConfig.InfoWidth+",height="+PlayerConfig.InfoHeight+"toolbar=1,scrollbars=1,statusbar=1,resizable=1,fullscreen=0")}else{iw=PlayerConfig.InfoWidth;
ih=PlayerConfig.InfoHeight;if(PlayerConfig.InfoWidth2)if(PlayerConfig.InfoWidth2.length>0)iw=PlayerConfig.InfoWidth2;if(PlayerConfig.InfoHeight2)if(PlayerConfig.InfoHeight2.length>0)ih=PlayerConfig.InfoHeight2;f=screen.availWidth;f=(f-iw)/2;g=screen.availHeight;g=(g-ih)/2;id=window.open(d,"","top="+g+",left="+f+",width="+iw+",height="+ih+"toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,fullscreen=0")}setTimeout("Center("+f+","+g+")",500)}function OnLink(){isOnLink=true}
function OffLink(){isOnLink=false}var globalloc="";function MakeAbsolute(d){if(d.toLowerCase().substr(0,7)=="mailto:")return d;var e="";if(globalloc.length==0)for(globalloc=location.href;globalloc.indexOf("\\")!=-1;)globalloc=globalloc.replace("\\","/");e=globalloc;var f=e.indexOf("#");if(f<0)f=e.indexOf("?");if(f>=0)e=e.substr(0,f);f=e.lastIndexOf("/");return f!=-1&&d.indexOf("//")==-1?e.substr(0,f+1)+d:d}var id;function Center(d,e){try{id.focus();id.moveTo(d,e)}catch(f){}};var popupMenu=0,aPopBody=0,innerBody=0;function ActionMenu(){this.Open=_AOpen;this.Close=_AClose;this.Refresh=_ARefresh;this.IsOnScreen=_AIsOnScreen;this.created=this.onScreen=false}
function _AOpen(){if(isIE&&popupVersion){if(!popupMenu){popupMenu=oPopup.document.parentWindow.createPopup();popupMenuBody=popupMenu.document.body}aPopBody=popupMenu.document.body;aPopBody.style.borderStyle="solid";aPopBody.style.borderWidth="1px";aPopBody.style.borderColor="gray";aPopBody.style.backgroundColor="#f7f7e7";aPopBody.style.marginTop="8px";aPopBody.style.marginBottom="8px";aPopBody.style.marginLeft="8px";aPopBody.style.marginRight="8px";aPopBody.aLink="0000FF";aPopBody.link="0000FF";aPopBody.vLink=
"0000FF";aPopBody.text="black";aPopBody.ondragstart=EventCancel;aPopBody.oncontextmenu=EventCancel}else if(this.created){aPopBody.style.maxWidth=document.getElementById("noPopupFF").clientWidth-40+"px";aPopBody.style.display="block"}else{popupMenu=window;aPopBody=document.createElement("div");aPopBody.id="actMenu";aPopBody.style.borderStyle="solid";aPopBody.style.borderWidth="1px";aPopBody.style.borderColor="gray";aPopBody.style.backgroundColor="#f7f7e7";aPopBody.aLink="0000FF";aPopBody.link="0000FF";
aPopBody.vLink="0000FF";aPopBody.text="black";innerBody=document.createElement("div");aPopBody.appendChild(innerBody);innerBody.style.marginTop="8px";innerBody.style.marginBottom="8px";innerBody.style.marginLeft="8px";innerBody.style.marginRight="8px";aPopBody.style.position="absolute";aPopBody.style.display="block";aPopBody.style.zIndex=6;aPopBody.style.overflow="auto";aPopBody.style.maxWidth=document.getElementById("noPopupFF").clientWidth-40+"px";document.body.appendChild(aPopBody);this.created=
true}this.onScreen=true}function _AClose(){if(this.onScreen){if(isIE&&popupVersion)popupMenu.hide();else{aPopBody.style.display="none";var d=Get_Element("EventListenerDIV");d.style.zIndex=-1;if(isIE)d.onmousedown=null;else d.removeEventListener("mousedown",GICloseAction,true)}this.onScreen=false}}
function OnActionSelection(d,e,f){isIE&&popupVersion&&popupMenu.hide();this.onScreen=false;d=="Alt"&&GIPlayer.GINextAlt();d=="Next"&&GIPlayer.GINextStep();d=="Pass"&&GIPlayer.GIPassStep();d=="Fail"&&GIPlayer.GIFailStep();d=="Skip"&&GIPlayer.GISkipStep();d=="TestItNotes"&&GIPlayer.openTestNotes();d=="TestItSTR"&&GIPlayer.openSTR();d=="Prev"&&GIPlayer.GIPrevStep();d=="Restart"&&GIPlayer.GIRestart();d=="Conc"&&setTimeout(concepts[e].url,20);d=="Info"&&setTimeout(GIFrames[f].infoblocks[e].url,20);d==
"PlayT"&&GIPlayer.openTM();d=="PlayD"&&GIPlayer.openDM();d=="Prefs"&&GIPlayer.GIOpenPreferences();d=="Help"&&GIPlayer.GIOpenHelp();d=="LogOut"&&GIPlayer.LogOut();d=="CloseT"&&GIPlayer.GIClosePlayer();d=="ViewOutline"&&GIPlayer.GIClosePlayer(true);d=="CloseW"&&GIPlayer.GICloseAction();d=="Printit"&&GIPlayer.GIShowPrintit();d=="AskAnExpert"&&GIPlayer.AskAnExpert();d=="ProvideFeedback"&&GIPlayer.ProvideFeedback();GICloseAction()}
function CorrectPopup(){isIE&&popupVersion&&popupMenu.show(0,0,0,0);sp=popupMenu.document.getElementById("actionspan");hsp=sp.offsetHeight;wsp=sp.offsetWidth;obj=oPopup.document.getElementById("pgiaction"+idPostFix);objh=obj.offsetHeight;if(isIE&&popupVersion)popupMenu.show(-(wsp-20),objh,wsp+20,hsp+20,obj);else{aPopBody.style.left=obj.offsetLeft+obj.offsetWidth-wsp-20+"px";aPopBody.style.top=obj.offsetTop+objh+6+"px"}ActMenu.onScreen=true}
function PopupToggle(d){if(popupMenu.document.getElementById(d).style.display=="none")popupMenu.document.getElementById(d).style.display="block";else popupMenu.document.getElementById(d).style.display="none";CorrectPopup()}var _topLevelLmsMode="";function CheckKPTMode(){if(_topLevelLmsMode=="")_topLevelLmsMode=GetTopLevelLmsMode();return _topLevelLmsMode=="KPT"}
function lms_IsKPathPortalAvailable(){__alert("lms_IsKPathPortalAvailable() called");if(CheckKPTMode()==false)return false;if(parent.urlParser.GetParameter("launchFromKPath")==null)return"";return lms_GetKPathPortalUrl().length>0}function lms_GetKPathPortalUrl(){__alert("lms_GetKPathPortalUrl() called");if(Kpath_launch==false)return"";var d="";try{}catch(e){}return Kpath_home_URL}
function AskAnExpert(){var d=lms_GetMentoringUrl(parent.topicID);h=530;w=window.open(d,"askanexpertwnd","width=550,height="+h+",resizable=1,scrollbars=0,top="+(screen.availHeight-530)/2+",left="+(screen.availWidth-550)/2);w.focus()}function ProvideFeedback(){var d=lms_GetFeedbackUrl(parent.topicID);h=530;w=window.open(d,"providefeedbackwnd","width=550,height="+h+",resizable=1,scrollbars=0,top="+(screen.availHeight-530)/2+",left="+(screen.availWidth-550)/2);w.focus()}
function lms_IsMentoringAvailable(){__alert("lms_IsMentoringAvailable() called");return document.LmsCom.doGetUPKValue("upk.mentoring_available")&&document.LmsCom.doGetUPKValue("upk.anonymous")=="0"}function lms_GetMentoringUrl(){__alert("lms_GetMentoringUrl() called");return Kpath_base_URL+"/Mentoring/NewMentQuest.aspx?Path="+window.location.href.split("?")[0]+"&GUID="+lms_store.cguid+"&FeedbackType=1"+_feedbackUrlArgs}
function lms_IsFeedbackAvailable(){__alert("lms_IsFeedbackAvailable() called");return document.LmsCom.doGetUPKValue("upk.feedback_available")&&document.LmsCom.doGetUPKValue("upk.anonymous")=="0"}function lms_GetFeedbackUrl(){__alert("lms_GetFeedbackUrl() called");return Kpath_base_URL+"/Mentoring/NewMentQuest.aspx?Path="+window.location.href.split("?")[0]+"&GUID="+lms_store.cguid+"&FeedbackType=2"+_feedbackUrlArgs}
function _ARefresh(d,e,f,g,j,m,q,l,r,u){if(this.onScreen){l="";l=isIE&&popupVersion?"<div id='actionspan' style='font:8pt Arial;width:100' nowrap='true'>":isIE?"<div id='actionspan' style='font:8pt Arial;min-width:100' nowrap='true'>":"<div id='actionspan' style='font:8pt Arial;width:100' nowrap='true'><ul style='padding-left:18px'>";if(f){l+="<li><a href='#' onclick='parent.parent.OnActionSelection(\"Alt\");return false;'>";l+=R_menu_alternatives;l+="</a></li>"}if(g){l+="<li><a href='#' onclick='parent.parent.OnActionSelection(\"Next\");return false;'>";
l+=R_menu_nextstep;l+="</a></li>"}if(j){l+="<li><a href='#' onclick='parent.parent.OnActionSelection(\"Pass\");return false;'>";l+=R_testit_markpassed;l+="</a></li>";l+="<li><a href='#' onclick='parent.parent.OnActionSelection(\"Fail\");return false;'>";l+=R_testit_markfailed;l+="</a></li>";l+="<li><a href='#' onclick='parent.parent.OnActionSelection(\"Skip\");return false;'>";l+=R_testit_markskipped;l+="</a></li>";l+="<li><a href='#' onclick='parent.parent.OnActionSelection(\"TestItNotes\");return false;'>";
l+=R_testit_opennotes;l+="</a></li>";l+="<li><a href='#' onclick='parent.parent.OnActionSelection(\"TestItSTR\");return false;'>";l+=R_testit_openstr;l+="</a></li>"}if(e){l+="<li><a href='#' onclick='parent.parent.OnActionSelection(\"Prev\");return false;'>";l+=R_menu_prevstep;l+="</a></li>";l+="<li><a href='#' onclick='parent.parent.OnActionSelection(\"Restart\");return false;'>";l+=R_menu_start;l+="</a></li>"}e=0;if(concepts.length>0){l+="<li>";l+="<a href='#' onclick='parent.parent.OnActionSelection(\"Conc\",\"0\");return false;'>";
l+=R_menu_concepts;l+="</a></li>"}f=GIState;g=GIFrames[f].actions[GIAltIndex];for(var t=j=true;j;)if(GIFrames[f].infoblocks.length>0){j=false;l+="<li><a href='#' onclick='parent.parent.PopupToggle(\"infodiv\")'>";l+=R_menu_infoblocks;l+="</a></li>";for(l+=isIE?"<div id='infodiv' style='display:none'>":"<div id='infodiv' style='display:none'><ul style='padding-left:18px'>";t;){for(e=0;e<GIFrames[f].infoblocks.length;e++){l+="<li style='list-style-type:circle;"+(isIE?"text-indent:18px":"")+"'>";l+=
"<a href='#' onclick='parent.parent.OnActionSelection(\"Info\",";l+=""+e;l+=',"'+f+"\");return false;'>";l+=GIFrames[f].infoblocks[e].tooltip;l+="</a></li>"}if(g.dn&&GIFrames[g.next].type!="decision"){f=g.next;g=GIFrames[f].actions[0]}else t=false}l+=isIE?"</div>":"</ul></div>"}else if(g.dn&&GIFrames[g.next].type!="decision"){f=g.next;g=GIFrames[f].actions[0]}else j=false;if(m||q||r){l+="<li><a href='#' onclick='parent.parent.PopupToggle(\"playdiv\")'>";l+=R_menu_play;l+="</a></li>";l+=isIE?"<div id='playdiv' style='display:block'>":
"<div id='playdiv' style='display:block'><ul style='padding-left:18px'>";if(q){l+="<li style='list-style-type:circle;"+(isIE?"text-indent:18px":"")+"'>";l+="<a href='#' onclick='parent.parent.OnActionSelection(\"PlayD\"";l+=");return false;'>";l+=R_mode_seeit;l+="</a></li>"}if(m){l+="<li style='list-style-type:circle;"+(isIE?"text-indent:18px":"")+"'>";l+="<a href='#' onclick='parent.parent.OnActionSelection(\"PlayT\"";l+=");return false;'>";l+=R_mode_tryit;l+="</a></li>"}if(r){l+="<li style='list-style-type:circle;"+
(isIE?"text-indent:18px":"")+"'>";l+="<a href='#' onclick='parent.parent.OnActionSelection(\"Printit\"";l+=");return false;'>";l+=R_interface_printit;l+="</a></li>"}l+=isIE?"</div>":"</ul></div>"}if(lms_IsMentoringAvailable()==true){l+="<li><a href='#' onclick='parent.parent.OnActionSelection(\"AskAnExpert\");return false;'>";l+=R_interface_askexpert;l+="</a></li>"}if(lms_IsFeedbackAvailable()==true){l+="<li><a href='#' onclick='parent.parent.OnActionSelection(\"ProvideFeedback\");return false;'>";
l+=R_interface_providefeedback;l+="</a></li>"}if(d){l+="<li><a href='#' onclick='parent.parent.OnActionSelection(\"Prefs\");return false;'>";l+=R_menu_preferences;l+="</a></li>"}if(UIComponents.TopicHelp==true){l+="<li><a href='#' onclick='parent.parent.OnActionSelection(\"Help\");return false;'>";l+=R_menu_help;l+="</a></li>"}try{if((GetTopLevelLmsMode()=="KPT"||Kpath_launch==true)&&lms_IsKPathLogoutAvailable()){l+="<li><a href='#' onclick='parent.parent.OnActionSelection(\"LogOut\");return false;'>";
l+=R_toctooltip_kpathlogout;l+="</a></li>"}}catch(v){}if(u){l+="<li><a href='#' onclick='parent.parent.OnActionSelection(\"ViewOutline\");return false;'>";l+=R_menu_viewoutline;l+="</a></li>"}l+="<li><a href='#' onclick='parent.parent.OnActionSelection(\"CloseT\");return false;'>";l+=R_menu_Close;l+="</a></li>";l+=isIE?"</div>":"</ul></div>";if(isIE&&popupVersion)aPopBody.innerHTML=l;else innerBody.innerHTML=l;CorrectPopup();this.onScreen=true}}function _AIsOnScreen(){return this.onScreen};var GICookie=null,GIS2=null,GISSS=null;
function setWindow(){var d=navigator.appName.indexOf("Microsoft")!=-1?true:false;if(d&&popupVersion){window.resizeTo(1,1);window.moveTo(4E3,4E3)}if(PlayerConfig.EnableCookies){GICookie=new Cookie(document,"GICookie",365,"/",null,null);if(GICookie.Load()){GIS2=GICookie.Cs2;GISSS=GICookie.Csss;if(d&&popupVersion&&GICookie.Cwidth>40&&GICookie.Cleft>=0&&GICookie.Ctop>=0&&GICookie.Cleft<screen.availWidth&&GICookie.Ctop<screen.availHeight){LeftPos=parseInt(GICookie.Cleft);TopPos=parseInt(GICookie.Ctop);
popWidth=parseInt(GICookie.Cwidth);popHeight=parseInt(GICookie.Cheight)}}}}setWindow();datasourceroot="querydb/";ConvertDbSelector={t:"text",u:"ctxod",e:"ctxex",r:"role",g:"genctx"};var q_search_and=" and ",q_search_or=" or ";
function ToHalfWidth(d){for(var e="",f=0;f<d.length;f++){var g="\u30f2\u30a1\u30a3\u30a5\u30a7\u30a9\u30e3\u30e5\u30e7\u30c3\u30fc\u30a2\u30a4\u30a6\u30a8\u30aa\u30ab\u30ad\u30af\u30b1\u30b3\u30b5\u30b7\u30b9\u30bb\u30bd\u30bf\u30c1\u30c4\u30c6\u30c8\u30ca\u30cb\u30cc\u30cd\u30ce\u30cf\u30d2\u30d5\u30d8\u30db\u30de\u30df\u30e0\u30e1\u30e2\u30e4\u30e6\u30e8\u30e9\u30ea\u30eb\u30ec\u30ed\u30ef\u30f3".indexOf(d.charAt(f));e+=g!=-1?"\uff66\uff67\uff68\uff69\uff6a\uff6b\uff6c\uff6d\uff6e\uff6f\uff70\uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79\uff7a\uff7b\uff7c\uff7d\uff7e\uff7f\uff80\uff81\uff82\uff83\uff84\uff85\uff86\uff87\uff88\uff89\uff8a\uff8b\uff8c\uff8d\uff8e\uff8f\uff90\uff91\uff92\uff93\uff94\uff95\uff96\uff97\uff98\uff99\uff9a\uff9b\uff9c\uff9d".charAt(g):
d.charCodeAt(f)>=65281&&d.charCodeAt(f)<=65375?String.fromCharCode(d.charCodeAt(f)-65248):d.charAt(f)}return e}
var QueryParser={PS:null,PT:[0,[2,3,0,0,0,0,4],[-1,-1,-1,-1,5,-1,0],[2,3,0,0,0,0,6],[0,0,0,7,0,10,0],[-2,-2,-2,-2,-2,-2,0],[0,0,8,7,0,0,0],[2,3,0,0,0,0,9],[-4,-4,-4,-4,-4,-4,0],[-3,-3,-3,-3,-3,-3,0]],Parse:function(d,e){if(window.R_search_AND)q_search_and=" "+R_search_AND.toLowerCase()+" ";if(window.R_search_OR)q_search_or=" "+R_search_OR.toLowerCase()+" ";var f,g;if("URI"==d){f=/\(|\)|\+|-|[u,e,k,r,g]|!|\d|'[^']+'/g;g=["(",")","+","-","u","e","t","r","g","!","0","1","2","3","4","5","6","7","8","9"]}else{f=
RegExp("\\(|\\)|"+q_search_and+"|"+q_search_or+'|"[^"]+"|[^ \\(\\)]+(?=\\(|\\)|\\s|$)',"gi");g=["(",")",q_search_and,q_search_or]}var j=[1,2,3,3,5,5,5,5,5,4,4,4,4,4,4,4,4,4,4,4],m=[0,0,"&","|",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];if(d!="URI"){e=ToHalfWidth(e);e=e.toLowerCase()}this.pr=this.ev=null;this.PS=[];this.PS.push({st:1,se:0});for(var q,l,r=0,u="t";(q=f.exec(e))!=null;){q=q[0];var t=0;for(l in g)if(q==g[l]){t=j[l];if(m[l])q=m[l];break}if(t==5)u=q;else{if(t==3)r=0;if((t==0||t==1)&&r){if(this.SM(3,
"&"))return;r=0}if(t==0){if(q.charAt(0)=='"'||q.charAt(0)=="'")q=q.slice(1,q.length-1);if("URI"!=d){if(q.length>1){r=q[q.length-1];if(r=="%"||r=="*")q=q.slice(0,-1)}q=Escape.MyEscape(q.toLowerCase())}q=u+q;r=1}if(this.SM(t,q))return}}if(!this.SM(5,"$")){this.ev=this.PS[1].se.ev;this.pr=this.PS[1].se.pr}},SM:function(d,e){for(;;){var f=this.PT[this.PS[this.PS.length-1].st][d];if(f==10)return false;if(f==0)return true;if(f>0){this.PS.push({st:f,se:e});return false}if(f<0){var g,j=this.PS.length,m=this.PS[j-
1],q=this.PS[j-2];j=this.PS[j-3];switch(-f){case 1:g={ev:"{a:'s', d:'"+m.se.charAt(0)+"', p:'"+m.se.slice(1)+"'}",pr:m.se.slice(1)};break;case 2:if(m.se=="!")g={ev:"{a:'s', d:'"+q.se.charAt(0)+"', p:'"+q.se.slice(1)+"', m:'"+m.se+"'}"};else{g=q.se.slice(1,parseInt(m.se)+1)+"$002A";g={ev:"{a:'s', d:'"+q.se.charAt(0)+"', p:'"+q.se.slice(1)+"'}, {a:'s', d:'"+q.se.charAt(0)+"', p:'"+g+"'}, {a:'o', p:'|'}"}}g.pr=q.se.slice(1);break;case 3:g={ev:j.se.ev+", "+m.se.ev+", {a:'o', p:'"+q.se+"'}",pr:j.se.pr+
(q.se=="|"?" or ":" ")+m.se.pr};break;case 4:g={ev:q.se.ev,pr:"("+q.se.pr+")"};f=-3}if(f==-1||f==-2){g.pr=decodeURIComponent(g.pr);if(g.pr.search(/\s/)!=-1)g.pr='"'+g.pr+'"'}this.PS.length+=f;this.PS.push({st:this.PT[this.PS[this.PS.length-1].st][6],se:g})}}},o:function(d,e,f){debug.insertAdjacentHTML("beforeEnd","<div>"+d+", "+e+", "+f+"</div>");return e+d+f},e:function(d,e,f){f||(f="");e=decodeURIComponent(e);debug.insertAdjacentHTML("beforeEnd","<div>"+d+", "+e+", "+f+"</div>");return d+"="+e+
f}},QueryProcessor={rr:null,Start:function(d,e){this.rr=e;eval("this.qa = ["+d+"]");this.qp=0;this.Eval()},Eval:function(){var d=this.qa[this.qp];if(d.a=="s"){var e=d.d=="t"?false:true;if(d.m=="!")e=!e;SearchDBs[d.d].Search(decodeURIComponent(d.p),e)}else if(d.a=="o"){d.p=="&"?this.qa[this.qp-2].And(this.qa[this.qp-1]):this.qa[this.qp-2].Or(this.qa[this.qp-1]);this.qp-=2;this.qa.splice(this.qp+1,2);this.Next()}},Next:function(){if(this.qa.length==1)this.rr(this.qa[0].rs);else{this.qp++;this.Eval()}},
ReportResult:function(d){this.qa[this.qp]=d;this.Next()}};function ReadBase64_6(d){if(d==43)return 62;if(d==45)return 63;if(d<58)return d-48;return d<91?d-55:d-61}function ReadBase64_32(d){var e,f;f=0;for(e=32;e&32;){e=ReadBase64_6(d.s.charCodeAt(d.p));f<<=5;f|=e&31;d.p++}return f}function ReadBase64_ITP(d,e){for(var f=[],g,j,m=0;d.p<d.s.length;){j=ReadBase64_32(d);for(g=1==j?ReadBase64_32(d):1;g;){m+=j;f.push(new e(m));g--}}return f}
function SearchDB(d){this.db_id=d;this.ResetIndex();this.request_count=this.request_total=0}SearchDB.prototype.ResetIndex=function(){this.index=[];this.index.push({key:null,node:"1"})};
SearchDB.prototype.k=function(d){for(var e="",f=0;f<d.length;f++){var g={s:d[f],p:0},j,m="";j=ReadBase64_32(g);var q;q=f==d.length-1?this.index[this.index_insert_position]:{};q.node=j>0?g.s.slice(g.p,g.p+j):0;g.p+=j;j=ReadBase64_32(g);m+=e.slice(0,j);j=ReadBase64_32(g);m+=g.s.slice(g.p,g.p+j);g.p+=j;if(m.length>0)q.key=m;for(e=m;g.p<g.s.length;){q.values=[];j=ReadBase64_32(g);q.values.push(g.s.slice(g.p,g.p+j));g.p+=j}if(f<d.length-1){this.index.splice(this.index_insert_position,0,q);this.index_insert_position++}}this.d()};
SearchDB.prototype.LoadScript=function(d){CDB=this;LoadXMLDocArray(datasourceroot+ConvertDbSelector[this.db_id]+"/"+d+".xml","SearchDBs."+this.db_id+".LoadScript_Callback","","N");this.request_total++;this.request_count++};SearchDB.prototype.LoadScript_Callback=function(d){CDB=this;CDB.k(d)};SearchDB.prototype.Search=function(d,e){this.RequestCount=0;this.search=d;this.exact_match=e;this.results=new SearchResultSet;if(this.search.length!=0){this.index_match=0;this.d=this.d1;this.d()}};
SearchDB.prototype.IndexSearch=function(){var d;for(d=this.index_match;d<this.index.length;d++)if(null==this.index[d].key||this.search<=this.index[d].key)break;this.index_match=d};
SearchDB.prototype.d1=function(){this.IndexSearch();if(null!=this.index[this.index_match].key&&this.search==this.index[this.index_match].key)if(!this.exact_match&&this.index[this.index_match].values.length<2){this.d=this.d2;this.d()}else{var d=this.index[this.index_match].values,e;for(e in d){this.results.Or(new SearchResultSet(d[e]));if(this.exact_match)break}QueryProcessor.ReportResult(this.results)}else if(this.index[this.index_match].node!=0){this.index_insert_position=this.index_match;this.LoadScript(this.index[this.index_match].node)}else if(this.exact_match)QueryProcessor.ReportResult(this.results);
else{this.d=this.d2;this.d()}};SearchDB.prototype.d2=function(){if(null==this.index[this.index_match].key||this.index[this.index_match].key.substring(0,this.search.length)!=this.search&&this.index[this.index_match].node==0)QueryProcessor.ReportResult(this.results);else if(this.index[this.index_match].node==0){this.results.Or(new SearchResultSet(this.index[this.index_match].values[0]));this.index_match++;this.d2()}else{this.index_insert_position=this.index_match;this.LoadScript(this.index[this.index_match].node)}};
SearchDBs={t:new SearchDB("t"),u:new SearchDB("u"),e:new SearchDB("e"),r:new SearchDB("r"),g:new SearchDB("g")};CDB=null;function SearchResult(d){this.index=d;this.weight=1}function SearchResultSet(d){this.rs=d?ReadBase64_ITP({s:d,p:0},SearchResult):[]}SearchResultSet.prototype.Or=function(d){this.AOR(d,true)};
SearchResultSet.prototype.AOR=function(d,e,f){var g,j;for(j=g=0;g<d.rs.length;g++){for(;j<this.rs.length&&this.rs[j].index<d.rs[g].index;)j++;if(j==this.rs.length||this.rs[j].index!=d.rs[g].index)this.rs.splice(j,0,d.rs[g]);else{var m=this.rs[j].weight,q=d.rs[g].weight;this.rs[j].weight=e?Math.max(m,q):m+q*f}}};
SearchResultSet.prototype.And=function(d){var e,f;for(f=e=0;e<d.rs.length&&f<this.rs.length;e++){for(;f<this.rs.length&&this.rs[f].index<d.rs[e].index;)this.rs.splice(f,1);if(f<this.rs.length&&d.rs[e].index==this.rs[f].index){this.rs[f].weight=Math.min(this.rs[f].weight,d.rs[e].weight);f++}}this.rs.splice(f,this.rs.length-f)};var EcidComparer={expstr:"",Init:function(d){if(d&&d.length>0){QueryParser.Parse("URI",d);if(QueryParser.ev)this.expstr=QueryParser.ev}else this.expstr=""},Compare:function(d){if(this.expstr.length==0)return false;if(!d)return false;eval("exparray = ["+this.expstr+"]");for(var e=0;e<exparray.length;e++){exparray[e].l=false;if(exparray[e].a.toLowerCase()=="s")for(var f=0;f<d.length;f++)if(matchString(d[f],exparray[e].p))exparray[e].l=true}EcidCompareStack.Init();for(e=0;e<exparray.length;e++)if(exparray[e].a.toLowerCase()==
"s")EcidCompareStack.Push(exparray[e]);else{d=EcidCompareStack.Pop();f=EcidCompareStack.Pop();d.l=exparray[e].p=="|"?d.l||f.l:d.l&&f.l;EcidCompareStack.Push(d)}return EcidCompareStack.Pop().l}};function StackItem(d,e,f){this.a=d;this.p=e;this.l=f}
var EcidCompareStack={Init:function(){this.stArray=[];this.pTop=-1},Push:function(d){if(this.stArray.length-this.pTop==1){this.stArray[this.stArray.length]=new StackItem(d.a,d.p,d.l);this.pTop++}else{this.pTop++;this.stArray[this.pTop]=new StackItem(d.a,d.p,d.l)}},Pop:function(){if(this.pTop!=-1)return this.stArray[this.pTop--]}};function matchCharacter(d,e){return ToHalfWidth(d)==ToHalfWidth(e)}
function replaceDotAndCircle(d){var e=null;e=d.replace(RegExp("\uff9e","g"),"#");e=e.replace(RegExp("\uff9f","g"),"*");for(d=0;d<20;d++)e=e.replace(RegExp("\u30ac\u30ae\u30b0\u30b2\u30b4\u30b6\u30b8\u30ba\u30bc\u30be\u30c0\u30c2\u30c5\u30c7\u30c9\u30d0\u30d3\u30d6\u30d9\u30dc".charAt(d),"g"),"\u30ab\u30ad\u30af\u30b1\u30b3\u30b5\u30b7\u30b9\u30bb\u30bd\u30bf\u30c1\u30c4\u30c6\u30c8\u30cf\u30d2\u30d5\u30d8\u30db".charAt(d)+"#");for(d=0;d<5;d++)e=e.replace(RegExp("\u30d1\u30d4\u30d7\u30da\u30dd".charAt(d),
"g"),"\u30cf\u30d2\u30d5\u30d8\u30db".charAt(d)+"*");return e}function matchString(d,e,f){if(!d)return false;f||(f=false);var g=d.length,j=e.length;if(g==0&&j==0)return true;if(g==0&&j!=0)return false;if(g!=0&&j==0)return false;if(g!=j)return false;d=f?d:d.toLowerCase();f=f?e:e.toLowerCase();e=replaceDotAndCircle(d);f=replaceDotAndCircle(f);if(e.length!=f.length)return false;for(d=0;d<e.length;d++)if(!matchCharacter(e.substr(d,1),f.substr(d,1)))return false;return true};var GIFrames={},GIState=null,GIChainState=null,GIFrameCC=null,GIActionCC=null,GIAdvText=null,GIScreenshot=null,GIHighlight=null,GICamera=null,GITextFrame=null,GIInfoFrame=null,GIFirstFrame=null,GIPlayer=null,GIActAction=null,GIPrevType=null,GINextState=null,GIAltIndex=0,GIChainAltIndex=0,GIOnLoad=false,GIEndFrame=false,GINoCookieSave=true,ActMenu=null,concepts=[],GIHistory=[],PlaySound=false,SoundAvail=false,AudioAction=null,P_GIRESOURCES="",GITMEnabled=false,GIDMEnabled=false,GITemplateSet=null,
GIbgcolor=null,playMode="D",testIt=false,strWindow,testNotesWindow,testReportWindow=null,testItPassed=true,startTime=(new Date).getTime(),fatSSPath="",fatTSPath="",param_ctx="",param_ecid="",param_printitname="",param_fastdoit=false,param_nosound=false,gicontextID=null,screenNames=[],safeUriMode=false,mViewOutline=false,showFrameIDToggle=false;P_GIRESOURCES="../../../img/";var SM_CYCAPTION=19,SM_CYFRAME=4;
function GIFrame(d,e,f,g){if(g)g=g.replace(/&amp;/g,"&");GIFrameCC={actions:[],infoblocks:[],sspath:e,type:f,header:g};screenNames[screenNames.length]=d;GIFrames[d]=GIFrameCC}
function GIAction(d,e,f,g,j,m,q,l,r){GIActionCC={id:d,next:e,ctx:f,ecidarray:g,text:j,dn:m,icon:q,bcolor:l,input:fixInputString(r),hotspots:[]};if(GIActionCC.ecidarray)for(d=0;d<GIActionCC.ecidarray.length;d++){s=GIActionCC.ecidarray[d];e=s.indexOf("$");sapp=s.substr(0,e+1);sctx=MyEscape(s.substr(e+1));s=sapp+sctx;for(e=s.indexOf("$0026amp$003B");e>0;){s=s.substr(0,e+5)+s.substr(e+13);e=s.indexOf("$0026amp$003B")}GIActionCC.ecidarray[d]=s}GIFrameCC.actions.push(GIActionCC)}
function InfoBlock(d,e,f,g,j){if(f){f=f.replace(/"/g,"&quot;");f=f.replace(/&amp;/g,"&")}else f="undefined";_buttonfile=d;_img="infobitmapimage.gif";_sb=d.toLowerCase();if(_sb.substr(_sb.length-_img.length)==_img)_buttonfile=d.substr(0,_sb.length-_img.length)+_img;GIFrameCC.infoblocks.push({buttonfile:_buttonfile,url:e,tooltip:f,infotype:g,infokey:j})}function GIInfoBlock(d,e,f){GIFrameCC.infoblocks.push({src:d,icon:e,alt:f})}
function GIHotspot(d,e,f,g,j){d-=3;e-=3;GIActionCC.hotspots.push({left:d,top:e,width:f-d-3,height:g-e-3,explanation:j})}function ConceptInfo(d,e,f,g,j){concepts[concepts.length]=Object({buttonfile:d,url:e,tooltip:f,infotype:g,infokey:j})}function MyEscape(d){for(var e="",f=0;f<d.length;f++){ss=d.substr(f,1);if(ss>="0"&&ss<="9"||ss>="a"&&ss<="z"||ss>="A"&&ss<="Z")e+=ss;else{ss=d.charCodeAt(f);a="0000"+ss.toString(16).toUpperCase();e+="$"+a.substr(a.length-4)}}return e}
function EventCancel(d){isIE||d.preventDefault();return false}function TeacherModeEnabled(){GITMEnabled=true}function DemoModeEnabled(){GIDMEnabled=true}function SetScreenshotPath(d){if(d!=""){fatSSPath=d+"/";SoundPlayerObj.SetSoundPath(d)}else{for(fatSSPath=document.location.href;fatSSPath.indexOf("\\")!=-1;)fatSSPath=fatSSPath.replace("\\","/");fatSSPath=fatSSPath.substr(0,fatSSPath.lastIndexOf("/")+1)}}
function startTopic(){if(noStart)this.close();else{if(window.opener){var d=new BrowserInfo;GetBrowserInfo(d);try{d.name!="Firefox"&&window.opener.blur()}catch(e){}}var f=document.location.hash.substring(1);d=f.split("&");if(d.length==0||d[0]=="")f=document.location.search.substring(1);d=f.split("&");if(d.length==1)if(d[0].toLowerCase().substr(0,3)=="su="){safeUriMode=true;d=Escape.SafeUriUnEscape(d[0].substr(3)).split("&")}for(f=0;f<d.length;f++){if(d[f].substr(0,7).toLowerCase()=="nosound")param_nosound=
true;if(d[f].substr(0,6).toLowerCase()=="testit")testIt=true}Init();InitLmsMode("player");if(_lmsMode!=null)if(param_nosound==false)if(Sound_Init(PlaySound,UserPrefs.PlayAudio,"GIClosePlayer()")==false)return;lms_InitPage(_lmsMode==null?0:-1,_lmsMode==null?window.opener:null,"T_"+document.getElementById("TopicId").getAttribute("topicid"),"FirstScreen()")}}function FirstScreen(){startTopic2()}
function startTopic2(){if(GIOnLoad){BuildBackActions();GIChainState=GIState=GIFirstFrame;lms_topicStart(getMyGuid(),"D");if(GIS2){var d=GIS2/(popHeight-60);if(d<0.1)d=0.1;if(d>0.9)d=0.9;if(isIE&&popupVersion&&GIS2.indexOf("%")==-1){oPopup.document.getElementById("split1").style.height=(1-d)*100+"%";oPopup.document.getElementById("split2").style.height=d*100+"%"}else if(GIS2.indexOf("%")>=0){oPopup.document.getElementById("split1"+idPostFix).style.height=GIS2;oPopup.document.getElementById("split2"+
idPostFix).style.top=GIS2;oPopup.document.getElementById("split2"+idPostFix).style.height=100-Number(GIS2.substring(0,GIS2.indexOf("%")))+"%"}}GISSS==1&&toggleScreenshot(true);var e=document.location.hash.substring(1);d=e.split("&");if(d.length==0||d[0]=="")e=document.location.search.substring(1);d=e.split("&");if(d.length==1)if(d[0].toLowerCase().substr(0,3)=="su="){safeUriMode=true;d=Escape.SafeUriUnEscape(d[0].substr(3)).split("&")}for(e=0;e<d.length;e++){if(d[e].substr(0,6).toLowerCase()=="frame=")GIChainState=
GIState=d[e].substr(6);if(d[e].substr(0,4).toLowerCase()=="Ctx=")param_ctx=d[e].substr(4);if(d[e].substr(0,6).toLowerCase()=="ctxex=")param_ecid=ecidStr(d[e].substr(6));if(d[e].substr(0,9).toLowerCase()=="fastdoit=")param_fastdoit=true;if(d[e].substr(0,12).toLowerCase()=="printitname=")param_printitname=d[e].substr(12)}if(SoundPlayerObj)SoundAvail=SoundPlayerObj.IsAvailable();param_nosound==true&&SetNoSound(true);if(GetNoSound())SoundAvail=false;if(testIt)GIChainState=GIState="teststart";SetStartEcid(param_ecid);
oPopup.document.getElementById("frameidtext"+idPostFix).innerHTML=R_frameid;switch(PlayerConfig.ShowFrameID.toLowerCase()){case "on":oPopup.document.getElementById("frameiddiv"+idPostFix).style.display="block";break;case "off":oPopup.document.getElementById("frameiddiv"+idPostFix).style.display="none";break;case "shiftf1":showFrameIDToggle=112;break;case "shiftf2":showFrameIDToggle=113;break;case "shiftf3":showFrameIDToggle=114;break;case "shiftf4":showFrameIDToggle=115;break;case "shiftf5":showFrameIDToggle=
116;break;case "shiftf6":showFrameIDToggle=117;break;case "shiftf7":showFrameIDToggle=118;break;case "shiftf8":showFrameIDToggle=119;break;case "shiftf9":showFrameIDToggle=120;break;case "shiftf10":showFrameIDToggle=121;break;case "shiftf11":showFrameIDToggle=122;break;case "shiftf12":showFrameIDToggle=123}if(showFrameIDToggle)document.onkeydown=CheckFrameIDKeys;RefreshStep()}else setTimeout(startTopic2,50)}function ecidStr(d){return replaceString("%27","'",d)}
var ecidMatchingFrames=[],ecidStartDecisions={},ecidDecisionStart=false;function SetStartEcid(d){if(d.length!=0){EcidComparer.Init(d);SearchPathForEcid(GIFirstFrame);if(ecidMatchingFrames.length==1){SetStartFrame(ecidMatchingFrames[0].frameid);GIChainAltIndex=GIAltIndex=ecidMatchingFrames[0].altindex;StartFrameCorrection(GIState)}else if(ecidMatchingFrames.length>=2){ecidDecisionStart=true;FindEcidStartNextFrame(GIFirstFrame);StartFrameCorrection(GIState)}}}
function SearchPathForEcid(d){for(var e=true;e;){var f=GIFrames[d];if(f.type=="end")e=false;if(f.type=="decision"){e=false;ecidStartDecisions[d]={id:d,display:false,pathstoignore:[]};for(var g=0;g<f.actions.length;g++)if(SearchPathForEcid(f.actions[g].next)){if(e)ecidStartDecisions[d].display=true;e=true}else ecidStartDecisions[d].pathstoignore.push(f.actions[g].id);return e}for(g=0;g<f.actions.length;g++)if(EcidComparer.Compare(f.actions[g].ecidarray)){ecidMatchingFrames.push({frameid:d,altindex:g});
return true}d=f.actions[0].next}return false}function FindEcidStartNextFrame(d){var e=GIFrames[d];if(e.type=="decision")if(ecidStartDecisions[d].display){GIChainState=GIState=d;return}for(var f=0;f<ecidMatchingFrames.length;f++)if(d==ecidMatchingFrames[f].frameid){GIChainState=GIState=d;GIChainAltIndex=GIAltIndex=ecidMatchingFrames[f].altindex;ecidDecisionStart=false;return}for(d=0;d<e.actions.length;d++)e.actions[d].next&&FindEcidStartNextFrame(e.actions[d].next)}
function SetParamCtx(d){gicontextID=d;SetStartContext()}var bBackActionsBuilded=false;
function BuildBackActions(){if(!bBackActionsBuilded){for(var d=null,e=0;e<screenNames.length;e++){d=GIFrames[screenNames[e]];d.backActions=[]}for(e=0;e<screenNames.length;e++){d=GIFrames[screenNames[e]];for(var f=0;f<d.actions.length;f++){d.actions[f].prevFrame=screenNames[e];if(s=d.actions[f].next)if(GIFrames[s].type!="end")GIFrames[s].backActions[GIFrames[s].backActions.length]=d.actions[f]}}}bBackActionsBuilded=true}
function StartFrameCorrection(d){var e;if(GIFrames[d].backActions.length==0)StartScreen="start";else{e="";for(var f=0;f<GIFrames[d].backActions.length;f++)if(f==0)e=GIFrames[d].backActions[0].prevFrame;else if(e!=GIFrames[d].backActions[0].prevFrame){GIChainState=GIState=d;return}for(e=GIFrames[d].backActions[0].prevFrame;;){if(GIFrames[e].backActions.length==0){GIChainState=GIState="start";break}if(GIFrames[e].type=="decision"){GIChainState=GIState=e;break}GIChainState=GIState=d;break}}}
function SetStartFrame(d){if(d.length!=0)if(GIFrames[d])GIChainState=GIState=d}function SetStartContext(){if(gicontextID.length!=0){var d=[];d=gicontextID.split("+");for(var e=0;e<d.length;e++){ctxItem=d[e];for(var f=0;f<screenNames.length;f++){scrName=screenNames[f];scr=GIFrames[scrName];for(var g=0;g<scr.actions.length;g++){act=scr.actions[g];if(act.ctx==ctxItem){SetStartFrame(scrName);StartFrameCorrection(GIState);return}}}}}}function OnClose(){top.GIPlayer.closeAp()}
function SetSound(d){if(d&&soundModes.indexOf("D")>0)PlaySound=d}var KeyHookUp=1,KeyHookTimer=0;function StartKeyHook(){StopKeyHook();PGIKeyHook.onclick=KeyHookHandler;KeyHookTimer=setInterval(KeyHookCallback,50)}function StopKeyHook(){clearInterval(KeyHookTimer)}function KeyHookCallback(){PGIKeyHook.click()}
function KeyHookHandler(){if(!(UserPrefs.DoIt.HotKey.Ctrl=="N"&&UserPrefs.DoIt.HotKey.Shift=="N"&&UserPrefs.DoIt.HotKey.Alt=="N")){var d=false;d=0;if(UserPrefs.DoIt.HotKey.Ctrl=="L")d|=3;if(UserPrefs.DoIt.HotKey.Ctrl=="R")d|=1;if(UserPrefs.DoIt.HotKey.Shift=="L")d|=54;if(UserPrefs.DoIt.HotKey.Shift=="R")d|=22;if(UserPrefs.DoIt.HotKey.Alt=="L")d|=12;if(UserPrefs.DoIt.HotKey.Alt=="R")d|=4;var e=0;if(event.ctrlLeft)e|=2;if(event.ctrlKey)e|=1;if(event.shiftLeft=="L")e|=50;if(event.shiftKey)e|=22;if(event.altLeft)e|=
8;if(event.altKey)e|=4;if(e==d){if(KeyHookUp){KeyHookUp=0;if(GIFrames[GIState].type=="end"||GIFrames[GIState].type=="testend")GIFrames[GIState].type=="end"&&testIt?GINextStep():closeAp();else testIt&&GIFrames[GIState].type=="normal"?GIPassStep():GINextStep()}}else KeyHookUp=1}}
function ToggleShowFrameID(){if(oPopup.document.getElementById("frameiddiv"+idPostFix).style.display=="none")oPopup.document.getElementById("frameiddiv"+idPostFix).style.display="block";else oPopup.document.getElementById("frameiddiv"+idPostFix).style.display="none";return false}function CheckFrameIDKeys(d){if(d==null)d=window.event;if(d!=undefined)if(d.type=="keydown")if(d.keyCode==showFrameIDToggle)if(d.shiftKey==true){ToggleShowFrameID();return false}}
function GIHilite(d){GIHighlight.innerHTML="";if(d){for(var e=UserPrefs.MarqueeColor,f=0;f<SSAList[d].a.hotspots.length;f++)GIHighlight.innerHTML+='<DIV id="gihotspot" style="position:absolute;left:'+SSAList[d].a.hotspots[f].left+"px;top:"+SSAList[d].a.hotspots[f].top+'px;z-index:2"><img id="gihotspotimg" src="'+P_GIRESOURCES+'spacer.gif" width="'+SSAList[d].a.hotspots[f].width+'" height="'+SSAList[d].a.hotspots[f].height+'" class="Area" border="3" style="border-color:'+e+'"/></DIV>';GIHighlight.style.display=
"inline"}else GIHighlight.style.display="none"}var hpos=null;function GICenterHL(){if(hpos){var d=GICamera.clientHeight/2,e=hpos.left-GICamera.clientWidth/2;if(e<0)e=0;e-=GICamera.scrollLeft;d=hpos.top-d;if(d<0)d=0;d-=GICamera.scrollTop;vl=Math.sqrt(e*e+d*d);if(vl<5){clearInterval(IV);IV=null;GICamera.scrollLeft=hpos.left-GICamera.clientWidth/2;GICamera.scrollTop=hpos.top-GICamera.clientHeight/2}else{GICamera.scrollLeft+=e*3/vl;GICamera.scrollTop+=d*3/vl}}}var contCHL=false;
function GIStopCHL(){}var SSAList=null,IV=null;
function GILoadSS(d){hpos=null;GIHighlight.innerHTML="";if(d){GIScreenshot.src=fatSSPath+SSAList[d].sspath;if(SSAList[d].imgid){for(var e in SSAList)oPopup.document.getElementById(SSAList[e].imgid).src="../../../img/stepdispl0.gif";oPopup.document.getElementById(SSAList[d].imgid).src="../../../img/stepdispl1.gif"}if(SSAList[d].a.hotspots.length>0){hpos={left:SSAList[d].a.hotspots[0].left,top:SSAList[d].a.hotspots[0].top};SSAList[d].a.hotspots[0].explanation||GIHilite(d);setTimeout(GIStartIV,500)}}}
function GIStartIV(){IV||(IV=setInterval(GICenterHL,10))}function OnUpdatePreferences(d){UserPrefs.Copy(d);setTimeout("RefreshStep()",100)}function RefreshStep(){GITextFrame.style.overflow="visible";GIState&&GIStep(GIState);GITextFrame.style.overflow="auto"}
function GIStep(d){if(isIE){GITextFrame.style.overflow="visible";StopKeyHook()}GIEndFrame=false;GIHighlight.innerHTML="";GIAdvText.innerHTML="";hpos=SSAList=AudioAction=null;var e="";if(d==null)GIClosePlayer();else{if(isIE&&popupVersion)GICamera.style.width=popWidth-18;GIChainState=GIState=d;oPopup.document.getElementById("frameidvalue"+idPostFix).innerHTML=GIFrames[GIState].type=="start"?"Start":GIState.substr(1);d="";if(isIE){switch(UserPrefs.DoIt.HotKey.Ctrl){case "L":d+="["+R_interface_left+R_interface_ctrl+
"]";break;case "R":d+="["+R_interface_right+R_interface_ctrl+"]"}switch(UserPrefs.DoIt.HotKey.Shift){case "L":if(d!="")d+=" + ";d+="["+R_interface_left+R_interface_shift+"]";break;case "R":if(d!="")d+=" + ";d+="["+R_interface_right+R_interface_shift+"]"}switch(UserPrefs.DoIt.HotKey.Alt){case "L":if(d!="")d+=" + ";d+="["+R_interface_left+R_interface_alt+"]";break;case "R":if(d!="")d+=" + ";d+="["+R_interface_right+R_interface_alt+"]"}}d=d?formatStr(R_interface_nextstep,d):R_interface_nextstep_nokey;
if(GIState=="teststart"||GIState=="testend"){GIClearAll();GIAltIndex||(GIChainAltIndex=GIAltIndex=0);if(GIState=="teststart"){GIActAction=GIFrames[GIState].actions[GIAltIndex];GINextState=GIActAction.next;lms_frameView(getMyGuid(),"D",GIState);GIAdvText.innerHTML='<span style="cursor:pointer" onclick="top.GIPlayer.GINextStep(); return false"><img src="../../../img/empty.gif" style="background-position: -198px 0px; width:22px; height:22px; background-image: url(\'../../../img/testimages.png\');" border="0" title="'+
d+'"/></span>'}else{GIEndFrame=true;if(GIHistory.length>0)GIAdvText.innerHTML='<span style="cursor:pointer" onclick="top.GIPlayer.GIPrevStep(); return false"><img src="../../../img/empty.gif" style="background-position: -176px 0px; width:22px; height:22px; background-image: url(\'../../../img/testimages.png\');" border="0" title="'+R_menu_prevstep+'"/></span><img SRC="'+P_GIRESOURCES+'spacer.gif" style="border:0;width:3px;height:1px"/>';GIAdvText.innerHTML+='<span style="cursor:pointer" onclick="top.GIPlayer.closeAp(); return false"><img src="../../../img/empty.gif" style="background-position: -220px 0px; width:22px; height:22px; background-image: url(\'../../../img/testimages.png\');" border="0" title="'+
R_bubble_closeondemand+'"/></span>'}GIgetActionText(GIActAction);GIState=="testend"&&GIGetTestResults();GITextFrame.innerHTML=GIState=="teststart"?$("#TestItIntro").html().replace(/__my_new_line__/g,"<br>"):$("#TestItEnd").html().replace(/__my_new_line__/g,"<br>");if(ScreenshotVisible){if(GIState=="teststart"){SSAList[GIActAction.id].a=GIActAction;SSAList[GIActAction.id].sspath=GIFrames[GIState].sspath;GILoadSS(GIActAction.id)}GIHilite(null)}isIE&&StartKeyHook()}if(GIFrames[GIState].type=="start"||
GIFrames[GIState].type=="end"){GIClearAll();GIAltIndex||(GIChainAltIndex=GIAltIndex=0);GIActAction=GIFrames[GIState].actions[GIAltIndex];if(GIFrames[GIState].type=="start"){lms_frameView(getMyGuid(),"D",GIState);if(UserPrefs.ShowLeadIn!="all"){GINextState=GIActAction.next;GINextStep();return false}if(GIHistory.length>0)GIAdvText.innerHTML='<span style="cursor:pointer" onclick="top.GIPlayer.GIPrevStep(); return false"><img src="../../../img/empty.gif" style="background-position: -176px 0px; width:22px; height:22px; background-image: url(\'../../../img/testimages.png\');" border="0" title="'+
R_menu_prevstep+'"/></span><img SRC="'+P_GIRESOURCES+'spacer.gif" style="border:0;width:3px;height:1px"/>';GIAdvText.innerHTML+='<span style="cursor:pointer" onclick="top.GIPlayer.GINextStep(); return false"><img src="../../../img/empty.gif" style="background-position: -198px 0px; width:22px; height:22px; background-image: url(\'../../../img/testimages.png\');" border="0" title="'+d+'"/></span>'}else{GIEndFrame=true;if(GIHistory.length>0)GIAdvText.innerHTML='<span style="cursor:pointer" onclick="top.GIPlayer.GIPrevStep(); return false"><img src="../../../img/empty.gif" style="background-position: -176px 0px; width:22px; height:22px; background-image: url(\'../../../img/testimages.png\');" border="0" title="'+
R_menu_prevstep+'"/></span><img SRC="'+P_GIRESOURCES+'spacer.gif" style="border:0;width:3px;height:1px"/>';if(testIt){GIActAction.next="testend";GIAdvText.innerHTML+='<span style="cursor:pointer" onclick="top.GIPlayer.GINextStep(); return false"><img src="../../../img/empty.gif" style="background-position: -198px 0px; width:22px; height:22px; background-image: url(\'../../../img/testimages.png\');" border="0" title="'+d+'"/></span>'}else GIAdvText.innerHTML+='<span style="cursor:pointer" onclick="top.GIPlayer.closeAp(); return false"><img src="../../../img/empty.gif" style="background-position: -220px 0px; width:22px; height:22px; background-image: url(\'../../../img/testimages.png\');" border="0" title="'+
R_bubble_closeondemand+'"/></span>'}GILoadInfoBlocks(GIInfoFrame);e+=GIgetActionText(GIActAction);GITextFrame.innerHTML=e;if(ScreenshotVisible){if(GIState=="start"){SSAList[GIActAction.id].a=GIActAction;SSAList[GIActAction.id].sspath=GIFrames[GIState].sspath;GILoadSS(GIActAction.id)}else GIScreenshot.src=fatSSPath+GIState.substr(1,GIState.length-1)+"g.png";GIHilite(null)}isIE&&StartKeyHook()}if(GIFrames[GIState].type=="decision"){if(ecidStartDecisions[GIState])if(ecidStartDecisions[GIState].display)ecidDecisionStart=
true;GIChainAltIndex=GIAltIndex=0;GIActAction=GIFrames[GIState].actions[GIAltIndex];GIClearAll();if(GIHistory.length>0)GIAdvText.innerHTML='<span style="cursor:pointer" onclick="top.GIPlayer.GIPrevStep(); return false"><img src="../../../img/empty.gif"style="background-position: -176px 0px; width:22px; height:22px; background-image: url(\'../../../img/testimages.png\');" border="0" title="'+R_menu_prevstep+'"/></span><img SRC="'+P_GIRESOURCES+'spacer.gif" style="border:0;width:3px;height:1px"/><img src="../../../img/giftrk1.gif" style="border:0;width:22;height:22"/>';
GILoadInfoBlocks(GIInfoFrame);e+=GIGetDecisionText(GIState);GITextFrame.innerHTML=e;if(ScreenshotVisible){GIScreenshot.src=fatSSPath+GIState.substr(1,GIState.length-1)+"g.png";GIHilite(null)}}if(GIFrames[GIState].type=="normal"){GIAltIndex||(GIChainAltIndex=GIAltIndex=0);GIClearAll();if(GIHistory.length>0)GIAdvText.innerHTML='<span style="cursor:pointer" onclick="top.GIPlayer.GIPrevStep(); return false"><img src="../../../img/empty.gif"style="background-position: -176px 0px; width:22px; height:22px; background-image: url(\'../../../img/testimages.png\');" border="0" title="'+
R_menu_prevstep+'"/></span><img SRC="'+P_GIRESOURCES+'spacer.gif" style="border:0;width:3px;height:1px">';if(testIt){GIAdvText.innerHTML+='<IMG SRC="'+P_GIRESOURCES+'spacer.gif" border="0" style="background-color:black; width:1px; height:20px"/><img SRC="'+P_GIRESOURCES+'spacer.gif" style="border:0;width:3px;height:1px"><span style="cursor:pointer" onclick="top.GIPlayer.GIPassStep(); return false"><img id="testpass" src="../../../img/empty.gif"  style="background-position: '+(GIFrames[GIState].actions[GIAltIndex].teststatus==
"passed"?"-44":"-66")+'px 0px; width:22px; height:22px; background-image: url(\'../../../img/testimages.png\');" border="0" title="'+(GIFrames[GIState].actions[GIAltIndex].teststatus=="passed"?R_testit_passedmarked:R_testit_markpassed)+'"/></span><img SRC="'+P_GIRESOURCES+'spacer.gif" style="border:0;width:3px;height:1px">';GIAdvText.innerHTML+='<span style="cursor:pointer" onclick="top.GIPlayer.GIFailStep(); return false"><img id="testfail" src="../../../img/empty.gif" style="background-position: '+
(GIFrames[GIState].actions[GIAltIndex].teststatus=="failed"?"-0":"-22")+'px 0px; width:22px; height:22px; background-image: url(\'../../../img/testimages.png\');" border="0" title="'+(GIFrames[GIState].actions[GIAltIndex].teststatus=="failed"?R_testit_failedmarked:R_testit_markfailed)+'"/></span><img SRC="'+P_GIRESOURCES+'spacer.gif" style="border:0;width:3px;height:1px">';GIAdvText.innerHTML+='<span style="cursor:pointer" onclick="top.GIPlayer.GISkipStep(); return false"><img id="testskip" src="../../../img/empty.gif" style="background-position: '+
(GIFrames[GIState].actions[GIAltIndex].teststatus=="skipped"?"-110":"-132")+'px 0px; width:22px; height:22px; background-image: url(\'../../../img/testimages.png\');" border="0" title="'+(GIFrames[GIState].actions[GIAltIndex].teststatus=="skipped"?R_testit_skippedmarked:R_testit_markskipped)+'"/></span>';GIAdvText.innerHTML+='<img SRC="'+P_GIRESOURCES+'spacer.gif" style="border:0;width:3px;height:1px"><IMG SRC="'+P_GIRESOURCES+'spacer.gif" border="0" style="background-color:black; width:1px; height:20px"/><img SRC="'+
P_GIRESOURCES+'spacer.gif" style="border:0;width:3px;height:1px">';GIAdvText.innerHTML+='<span style="cursor:pointer" onclick="top.GIPlayer.openTestNotes(); return false"><img src="../../../img/empty.gif" style="background-position: -154px 0px; width:22px; height:22px; background-image: url(\'../../../img/testimages.png\');" border="0" title="'+R_testit_opennotes+'"/></span><img SRC="'+P_GIRESOURCES+'spacer.gif" style="border:0;width:3px;height:1px">';GIAdvText.innerHTML+='<span style="cursor:pointer" onclick="top.GIPlayer.openSTR(); return false"><img src="../../../img/empty.gif" style="background-position: -88px 0px; width:22px; height:22px; background-image: url(\'../../../img/testimages.png\');" border="0" title="'+
R_testit_openstr+'"/></span>';switch(GIFrames[GIState].actions[GIAltIndex].teststatus){case "passed":GITestStatus.innerHTML=R_testit_passed.toUpperCase();break;case "failed":GITestStatus.innerHTML=R_testit_failed.toUpperCase();break;case "skipped":GITestStatus.innerHTML=R_testit_skipped.toUpperCase()}}else GIAdvText.innerHTML+='<span style="cursor:pointer" onclick="top.GIPlayer.GINextStep(); return false"><img src="../../../img/empty.gif" style="background-position: -198px 0px; width:22px; height:22px; background-image: url(\'../../../img/testimages.png\');" border="0" title="'+
d+'"/></span>';if(GIFrames[GIState].actions.length>1)for(d=1;d<GIFrames[GIState].actions.length;d++)GetTextWT(GIFrames[GIState].actions[d].text)!=""&&GIShowAltsPic();GIActAction=GIFrames[GIState].actions[GIAltIndex];GILoadInfoBlocks(GIInfoFrame);e+=GIgetActionText(GIActAction);GITextFrame.innerHTML=e;if(ScreenshotVisible){e=GIActAction;SSAList[e.id].a=GIActAction;for(SSAList[e.id].sspath=GIFrames[GIState].sspath;e.dn&&GIFrames[e.next].type!="decision";){SSAList[GIFrames[e.next].actions[0].id].a=GIFrames[e.next].actions[0];
SSAList[GIFrames[e.next].actions[0].id].sspath=GIFrames[e.next].sspath;e=GIFrames[e.next].actions[0]}GILoadSS(GIActAction.id)}isIE&&StartKeyHook()}GIRefreshActionMenu();bubbc=GIActAction.bcolor;for(GIbgcolor=bubbc.toString(16);GIbgcolor.length<6;)GIbgcolor="0"+GIbgcolor;GIbgcolor="#"+GIbgcolor;oPopBody.style.backgroundColor=GIbgcolor?GIbgcolor:"#FEFECE";AudioAction=GIActAction;GIState!="teststart"&&GIState!="testend"&&SoundAvail&&PlaySound&&UserPrefs.PlayAudio=="all"&&PlayAudio();if(isIE&&popupVersion)GITextFrame.style.width=
popWidth-29;if(!popupVersion){GIInfoFrame.style.right=GIAdvText.clientWidth+10+"px";GIInfoFrame.style.left="0px"}if(isIE)GITextFrame.style.overflow="auto";GIOnResize();setTimeout(GIOnResize,500)}}function GITMClosed(){ShowPopup()}function IsPrimaryDisplay(){primarydisplay=true;var d=window.open("","","width=10,height=10");if(d.screenLeft<0||d.screenLeft>this.screen.width)primarydisplay=false;if(d.screenTop<0||d.screenTop>this.screen.height)primarydisplay=false;d.close();return primarydisplay}
function openSTR(){if(isTestItOnTouchDevice()){$("<iframe/>",{src:"../../testitstr.html"}).appendTo($("#embedded_dialog"));$("#embedded_dialog").show();$("#noPopupFF").hide()}else{HidePopup();strWindow=top.window.open("../../testitstr.html?","teststr","scrollbars=yes,left=150,top=150,width=500,height=300,resizable=yes")}}
function fillSTRBox(d){var e=1,f="",g=null;f+=jQuery.trim($("#TopicName").text())+"\n";f+="\n"+jQuery.trim(R_testit_str)+":\n";for(var j=0;j<GIHistory.length;j++)if(GIHistory[j].type!="decision"&&GIHistory[j].type!="start"&&GIHistory[j].type!="end"&&GIHistory[j].type!="teststart"&&GIHistory[j].type!="testend"){g=GIFrames[GIHistory[j].frame].actions[GIHistory[j].altindex];if(g.teststatus!="skipped"){f+=e+". "+jQuery.trim($(g.text.replace(/(<br>|<\/p>)/gi," ")).text().replace(/[\s\xA0]+/g," "))+"\n";
e++}for(;g.dn&&GIFrames[g.next].type!="decision"&&GIFrames[g.next].type!="end";){g=GIFrames[g.next].actions[0];if(g.teststatus!="skipped"){f+=e+". "+jQuery.trim($(g.text.replace(/(<br>|<\/p>)/gi," ")).text().replace(/[\s\xA0]+/g," "))+"\n";e++}}}g=GIFrames[GIState].actions[GIAltIndex];f+=e+". "+jQuery.trim($(g.text.replace(/(<br>|<\/p>)/gi," ")).text().replace(/[\s\xA0]+/g," "))+"\n";for(e++;g.dn&&GIFrames[g.next].type!="decision"&&GIFrames[g.next].type!="end";){g=GIFrames[g.next].actions[0];f+=e+
". "+jQuery.trim($(g.text.replace(/(<br>|<\/p>)/gi," ")).text().replace(/[\s\xA0]+/g," "))+"\n";e++}d.fillText(f)}
function openTestNotes(){if(testNotesWindow==null||testNotesWindow.closed)if(isTestItOnTouchDevice()){$("<iframe/>",{src:"../../testitnotes.html"}).appendTo($("#embedded_dialog"));$("#embedded_dialog").show();$("#noPopupFF").hide()}else{HidePopup();testNotesWindow=top.window.open("../../testitnotes.html?","testnotes","scrollbars=yes,left=150,top=150,width=500,height=300,resizable=yes")}else testNotesWindow.focus()}
function fillTestNotesBox(d){d.fillText(GIFrames[GIState].actions[GIAltIndex].testnotes)}function saveTestNotes(d){GIFrames[GIState].actions[GIAltIndex].testnotes=d}function isTestItOnTouchDevice(){return IsTouchDevice()||IsIE10Modern()}function removeEmbeddedDialog(){$("#embedded_dialog iframe").remove();$("#embedded_dialog").hide();$("#noPopupFF").show()}function OnClosingChildWindow(){isTestItOnTouchDevice()==false&&ShowPopup()}
function openTM(){SoundPlayerObj&&SoundAvail&&PlaySound&&SoundPlayerObj.Stop();HidePopup();var d=window.location.href;d.substring(0,d.lastIndexOf("/")+1);d="mode=T&frame="+GIState;if(safeUriMode)d="su="+Escape.SafeUriEscape(d);top.window.open("topic.html?"+d,"tplayer","toolbar=0,location=0,statusbar=0,menubar=0,scrollbars=1,resizable=0,fullscreen=1,left=0,top=0,width="+screen.width+",height="+screen.height)}
function openDM(){SoundPlayerObj&&SoundAvail&&PlaySound&&SoundPlayerObj.Stop();HidePopup();var d=window.location.href;d.substring(0,d.lastIndexOf("/")+1);d="mode=S&frame="+GIState;if(safeUriMode)d="su="+Escape.SafeUriEscape(d);top.window.open("topic.html?"+d,"dplayer","toolbar=0,location=0,statusbar=0,menubar=0,scrollbars=1,resizable=0,fullscreen=1,left=0,top=0,width="+screen.width+",height="+screen.height)}function LogOut(){lms_KPathLogout()}
function PlayAudio(){SoundPlayerObj&&SoundPlayerObj.Play(AudioAction.id.substring(1)+".ASX")}function PlayStop(){SoundPlayerObj&&SoundPlayerObj.Stop()}function OnEndPlaySound(){SoundPlayerObj&&SoundPlayerObj.Stop();if(AudioAction.dn&&GIFrames[AudioAction.next].type!="decision"){AudioAction=GIFrames[AudioAction.next].actions[0];setTimeout(PlayAudio,300)}}
function OnErrorPlaySound(){SoundPlayerObj&&SoundPlayerObj.Stop();if(AudioAction.dn&&GIFrames[AudioAction.next].type!="decision"){AudioAction=GIFrames[AudioAction.next].actions[0];setTimeout(PlayAudio,300)}}
function GIGetDecisionText(d){var e="<span style='font: 9pt Arial'>"+GIFrames[GIState].header+"<BR><BR>";popupVersion||(e+="<ul style='padding: 0 0 0 18px; margin: 0;'>");for(var f=0;f<GIFrames[d].actions.length;f++){var g=GIFrames[d].actions[f],j=false;if(ecidStartDecisions[d])if(ecidStartDecisions[d].display)for(var m=0;m<ecidStartDecisions[d].pathstoignore.length;m++)if(ecidStartDecisions[d].pathstoignore[m]==g.id)j=true;if(!j){j=g.text.replace(/&amp;/g,"&");e+="<li><a href='#' onclick='top.GIPlayer.GINextStep(\""+
g.next+"\"); return false'>";e+=j;e+="</a><BR></li>"}}popupVersion||(e+="</ul>");e+="</span>";return e}function Replace(d,e,f){var g=d.indexOf(e);if(g<0)return d;e=d.substr(0,g);d=d.substr(g+6);return e+f+d}function GIShowFrameID(d){oPopup.document.getElementById("frameidvalue"+idPostFix).innerHTML=d}
function GIgetActionText(d){var e="";SSAList=[];SSAList[d.id]={fid:null,a:null,imgid:null};if(d.icon)e+='<img style="float:left;margin-right:5px;margin-bottom:5px" align="left" border="0" src="'+P_GIRESOURCES+d.icon+'"/> ';if(d.text==null)e+="";else{if(d.input)d.text=BuildInputText(d.input,d.text);if(d.dn&&GIFrames[d.next].type!="decision")if(ScreenshotVisible){e+="<img id='lss"+d.id+"' title='"+R_interface_filmstrip+"' style='cursor:pointer' align='right' src='../../../img/stepdispl1.gif' onclick='parent.GIShowFrameInChain(\""+
GIState+'","'+d.id+'","'+GIAltIndex+"\");'/>";var f="lss"+d.id;SSAList[d.id].imgid=f}else e+="<img style='width:13px;height:9px' align='right' src='../../../img/s.gif'/>";e+="<span>"+d.text+"</span>";if(testIt&&GIFrames[GIState].type!="start"&&GIFrames[GIState].type!="end"&&jQuery.trim($("#ExpectedTestResults_"+GIState).html())!=""){e+="<span style='font-family:Arial; font-size:10pt;'><br><span style='font-weight:bold'>"+R_testit_expectedresults+":</span><br>";e+=$("#ExpectedTestResults_"+GIState).html().replace(/__my_new_line__/g,
"<br>");e+="<br></span>"}}for(;d.dn&&GIFrames[d.next].type!="decision";){var g=d.next;d=GIFrames[d.next].actions[0];if(d.input)d.text=BuildInputText(d.input,d.text);e+='<br/><div style="clear:both"></div><B style="font-family:Arial;font-size:9pt"/>'+R_bubletext_then+"</B><BR>";if(d.icon)e+='<img  style="float:left;margin-right:5px;margin-bottom:5px" align="left" border="0" src="'+P_GIRESOURCES+d.icon+'"/> ';if(ScreenshotVisible){e+="<img id='lss"+d.id+"' title='"+R_interface_filmstrip+"' style='cursor:pointer' align='right' src='../../../img/stepdispl0.gif' onclick='parent.GIShowFrameInChain(\""+
g+'","'+d.id+"\"); '/>";f="lss"+d.id;SSAList[d.id]={fid:null,a:null,imgid:f}}else e+="<img style='width:13px;height:9px' align='right' src='../../../img/s.gif'/>";e+="<span>"+d.text+"</span>";if(testIt&&GIFrames[g].type!="start"&&GIFrames[g].type!="end"&&jQuery.trim($("#ExpectedTestResults_"+g).html())!=""){e+="<span style='font-family:Arial; font-size:10pt;'><br><span style='font-weight:bold'>"+R_testit_expectedresults+":</span><br>";e+=$("#ExpectedTestResults_"+g).html().replace(/__my_new_line__/g,
"<br>");e+="<br></span>"}}GINextState=d.next;return e}
function GIGetTestResults(){testItPassed=true;for(var d=0,e=0,f=0,g=0;g<GIHistory.length;g++)if(GIHistory[g].type!="decision"&&GIHistory[g].type!="start"&&GIHistory[g].type!="end"&&GIHistory[g].type!="teststart"&&GIHistory[g].type!="testend")switch(GIFrames[GIHistory[g].frame].actions[GIHistory[g].altindex].teststatus){case "passed":d++;break;case "failed":e++;break;default:f++}if(e)testItPassed=false;$("#TestResults").html("");g="";g+="<span style='font-weight:bold'>"+R_testit_summary+":</span><br>";
g+='<div style="margin-bottom:3px; margin-top:3px"><img src="../../../img/empty.gif" style="background-position: -144px 0px; width:16px; height:16px; background-image: url(\'../../../img/navimages.png\'); float:left; margin-left:20px" border="0" /><div style="float:left; margin-left:5px;"> '+R_testit_passed+': <span style="font-weight:bold;">'+d+'</span></div><div style="clear:both"></div></div>';g+='<div style="margin-bottom:3px; margin-top:3px"><img src="../../../img/empty.gif" style="background-position: -128px 0px; width:16px; height:16px; background-image: url(\'../../../img/navimages.png\'); float:left; margin-left:20px" border="0" /><div style="float:left; margin-left:5px;"> '+
R_testit_failed+': <span style="font-weight:bold;">'+e+'</span></div><div style="clear:both"></div></div>';g+='<div style="margin-bottom:3px; margin-top:3px"><img src="../../../img/empty.gif" style="background-position: -160px 0px; width:16px; height:16px; background-image: url(\'../../../img/navimages.png\'); float:left; margin-left:20px" border="0" /><div style="float:left; margin-left:5px;"> '+R_testit_skipped+': <span style="font-weight:bold;">'+f+'</span></div><div style="clear:both"></div></div>';
g+="<span>"+R_testit_stepnum+': <span style="font-weight:bold">'+(d+e+f)+"</span></span><br>";g+="<span>"+R_testit_result+': <span style="font-weight:bold">'+(e?R_testit_failed.toUpperCase():R_testit_passed.toUpperCase())+"</span></span><br><br>";g+='<a href="#" onclick="top.GIPlayer.GITestItReport()">'+R_testit_viewreport+":</a>";$("#TestResults").append(g)}function GIShowFrameInChain(d,e,f){GIChainState=d;GIChainAltIndex=f||0;parent.GILoadSS(e);parent.GIShowFrameID(d.substr(1))}
function DisplayInputTextPart(d,e,f){var g="<DIV id="+e+' style="DISPLAY: inline">',j=d.indexOf(g);if(j<0){g='<div id="'+e+'" style="display: inline;">';j=d.indexOf(g);if(j<0){g='<div id="'+e+'" style="display:inline">';j=d.indexOf(g);if(j<0){g='<DIV style="DISPLAY: inline" id='+e+">";j=d.indexOf(g);if(j<0)return d}}}e=d.substr(j+g.length);g=e.indexOf("</DIV>");if(g<0)g=e.indexOf("</div>");if(f==true)return d.substr(0,j)+e.substr(0,g)+e.substr(g+6);return d.substr(0,j)+e.substr(g+6)}
function BuildInputText(d,e){var f=false,g=false,j=false,m=false,q=false;if(d[0]=="S"){f=true;if(template_strinp_suppress_example=="<span>0</span>")j=g=true}else if(d[0]=="A"){q=f=true;if(template_strinp_suppress_example=="<span>0</span>")j=g=true}else if(d[0]=="N")q=m=j=true;else m=j=true;f=DisplayInputTextPart(e,"anything",f);f=DisplayInputTextPart(f,"example",g);f=DisplayInputTextPart(f,"inputtext",j);f=DisplayInputTextPart(f,"inputalt",m);f=DisplayInputTextPart(f,"blank",q);f=f.replace(RegExp("<SPAN></SPAN>",
"g"),"<SPAN> </SPAN>");f=f.replace(RegExp("\r","g"),"");return f=f.replace(RegExp("\n","g"),"")}function GIClearAll(){GITextFrame.innerHTML="";GIInfoFrame.innerHTML="";GIInfoFrame.innerHTML+='<span id="GIST"></span>';GIInfoFrame.innerHTML+='<span id="GIAlts'+idPostFix+'"></span>';GITestStatus.innerHTML=""}function GIRestart(){var d=GIHistory[0].frame;GIHistory=null;GIHistory=[];GINextStep(d,true)}
function GIPrevStep(){var d=GIHistory[GIHistory.length-1];GIRHist(GIHistory.length-1);GINextStep(d.frame,true,d.altindex)}
function GINextStep(d,e,f){try{if(testNotesWindow)if(testNotesWindow.saveNotes){testNotesWindow.saveNotes();testNotesWindow=null}}catch(g){}strWindow&&strWindow.close();if(d){if(GIFrames[d].type=="decision"&&GIFrames[d].actions.length==1){GINextStep(GIFrames[d].actions[0].next);return false}e||GIHistory.push({frame:GIState,type:GIFrames[GIState].type,altindex:GIAltIndex});if(ecidDecisionStart){FindEcidStartNextFrame(d);d=GIState;f=null}GIFrames[d].type=="end"?lms_frameView(getMyGuid(),"D","end"):
lms_frameView(getMyGuid(),"D",d);if(f)GIChainAltIndex=GIAltIndex=f;else GIAltIndex=null;GIClearAll();GIStep(d)}else{GIFrames[GINextState].type=="end"?lms_frameView(getMyGuid(),"D","end"):lms_frameView(getMyGuid(),"D",GINextState);if(GIFrames[GINextState].type=="decision"&&GIFrames[GINextState].actions.length==1){GINextStep(GIFrames[GINextState].actions[0].next);return false}e||GIHistory.push({frame:GIState,type:GIFrames[GIState].type,altindex:GIAltIndex});if(f)GIChainAltIndex=GIAltIndex=f;else GIAltIndex=
null;GIClearAll();GIStep(GINextState)}}function GetTextWT(d){for(var e,f;d.indexOf("<")!=-1;){e=d.indexOf("<");var g=d.substring(0,e);f=d.indexOf(">",e);e=d.substring(e+1,f);if(e=="/P"||e=="/p"||e.substr(0,1)=="p"||e.substr(0,1)=="P"||e=="BR"||e=="br")g+="&nbsp";d=d.substring(f+1);d=g+d}return d}
function GILoadInfoBlocks(d){for(var e=GIState,f=GIFrames[e].actions[GIAltIndex],g=true,j=true;g;)if(GIFrames[e].infoblocks.length>0){g=false;var m="";if(GIFrames[GIState].actions.length>1&&GIFrames[GIState].type!="decision")m='<img SRC="'+P_GIRESOURCES+'spacer.gif" style="border:0;width:3px;height:1px"><IMG SRC="'+P_GIRESOURCES+'spacer.gif" border="0" style="background-color:black; width:1px; height:20px"/>';var q=oPopup.document.createElement("span");d.appendChild(q);for(q.innerHTML=m;j;){for(q=
0;q<GIFrames[e].infoblocks.length;q++){m=GIFrames[e].infoblocks[q];m="<img SRC='"+P_GIRESOURCES+"spacer.gif' style='border:0;width:3px;height:1px'><span style='cursor:pointer' onclick=\""+m.url+'"/><IMG SRC="'+P_GIRESOURCES+m.buttonfile+'" border="0" title="'+m.tooltip+'"/></span>';var l=oPopup.document.createElement("span");d.appendChild(l);l.innerHTML=m}if(f.dn&&GIFrames[f.next].type!="decision"){e=f.next;f=GIFrames[e].actions[0]}else j=false}}else if(f.dn&&GIFrames[f.next].type!="decision"){e=
f.next;f=GIFrames[e].actions[0]}else g=false}function GINextAlt(){try{if(testNotesWindow)if(testNotesWindow.saveNotes){testNotesWindow.saveNotes();testNotesWindow=null}}catch(d){}strWindow&&strWindow.close();GIAltIndex+=1;GIChainAltIndex=GIAltIndex;if(GIAltIndex>=GIFrames[GIState].actions.length)GIChainAltIndex=GIAltIndex=0;if(GetTextWT(GIFrames[GIState].actions[GIAltIndex].text)==""){GINextAlt();return false}RefreshStep()}
function GIShowAltsPic(){oPopup.document.getElementById("GIAlts"+idPostFix).innerHTML='<span style="cursor:pointer" onclick="top.GIPlayer.GINextAlt(); return false"><IMG SRC="'+P_GIRESOURCES+'alternatives.gif" border="0" title="'+R_menu_alternatives+'"/></span>'}
function GIPassStep(){GIFrames[GIState].actions[GIAltIndex].teststatus="passed";for(a=GIFrames[GIState].actions[GIAltIndex];a.dn&&GIFrames[a.next].type!="decision"&&GIFrames[a.next].type!="end";){a=GIFrames[a.next].actions[0];a.teststatus="passed"}GINextStep()}
function GIFailStep(){GIFrames[GIState].actions[GIAltIndex].teststatus="failed";for(a=GIFrames[GIState].actions[GIAltIndex];a.dn&&GIFrames[a.next].type!="decision"&&GIFrames[a.next].type!="end";){a=GIFrames[a.next].actions[0];a.teststatus="failed"}GINextStep()}
function GISkipStep(){if(GIFrames[GIState].actions[GIAltIndex].teststatus!="passed"&&GIFrames[GIState].actions[GIAltIndex].teststatus!="failed"){GIFrames[GIState].actions[GIAltIndex].teststatus="skipped";for(a=GIFrames[GIState].actions[GIAltIndex];a.dn&&GIFrames[a.next].type!="decision"&&GIFrames[a.next].type!="end";){a=GIFrames[a.next].actions[0];a.teststatus="skipped"}}GINextStep()}
function GetBasePathTestIt(){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)}var testScriptLoaded=false,testItLoadI;
function GITestItReport(){testReportWindow&&testReportWindow.close();var d="../../testitsummary/"+$("#TestItReportFileName").text();if(isTestItOnTouchDevice()){d=GetBasePathTestIt()+"/"+d;var e=$("#noPopupFF").width(),f=$("#noPopupFF").height();showDialog(d,0,0,e,f,false,96,"../../../",false)}else testReportWindow=top.window.open(d,"testreport","toolbar=1,location=1,statusbar=1,menubar=1,scrollbars=1,resizable=1,fullscreen=0");testScriptLoaded=false;testItLoadI=setInterval(GITestScript,1500)}
function GITestScript(){if(!testScriptLoaded)try{if(isTestItOnTouchDevice()){var d=$("#if1").contents().find("head"),e=document.createElement("script");e.type="text/javascript";e.src=GetBasePathTestIt()+"/../../../js/jquery.min.js";d[0].appendChild(e);e=document.createElement("script");e.type="text/javascript";e.src=GetBasePathTestIt()+"/../../testitreportload.js";d[0].appendChild(e)}else{var f=testReportWindow.document.getElementsByTagName("HEAD").item(0),g=testReportWindow.document.createElement("script"),
j=testReportWindow.document.createElement("script");g.type="text/javascript";j.type="text/javascript";g.src="../../js/jquery.min.js";j.src="../testitreportload.js";f.appendChild(g);setTimeout(function(){f.appendChild(j)},1E3)}}catch(m){}}function GITestItReportLoad(){if(!testScriptLoaded){testScriptLoaded=true;clearInterval(testItLoadI);GILoadTestItScripts()}}
function GILoadTestItScripts(){if(isTestItOnTouchDevice()){var d=$("#if1").contents().find("HEAD"),e=document.createElement("script");e.type="text/javascript";e.src=GetBasePathTestIt()+"/../../../js/resource.js";d[0].appendChild(e);e=document.createElement("script");e.type="text/javascript";e.src=GetBasePathTestIt()+"/../../testitreport.js";d[0].appendChild(e);d=$("#if1").contents().find("#if1").contents().find("head");$("<link/>",{type:"text/css",href:"../../../css/navimages.css",rel:"stylesheet"}).appendTo(d)}else{d=
testReportWindow.document.getElementsByTagName("HEAD").item(0);e=testReportWindow.document.createElement("link");e.type="text/css";e.href="../../css/navimages.css";e.rel="stylesheet";var f=testReportWindow.document.createElement("script"),g=testReportWindow.document.createElement("script");f.type="text/javascript";g.type="text/javascript";f.src="../../js/resource.js";g.src="../testitreport.js";d.appendChild(e);d.appendChild(f);d.appendChild(g)}}
function GITestItReportReady(){if(isTestItOnTouchDevice()){$("#draggable").css({overflow:"",left:"0",top:"0",right:"0",bottom:"0",width:"",height:"",visibility:"visible"}).attr("scrolling","yes");$("#if1").contents().find("#closebtn + div").css("overflow","").end().find("#dlg2").css({left:"0",top:"0",right:"0",bottom:"0",width:"auto",height:"auto",cursor:"auto"}).end().find("#if1").contents().find("html, body").css({width:"100%",height:"100%",margin:"0",padding:"0",overflow:"auto"})}var d=isTestItOnTouchDevice()?
document.getElementById("if1").contentWindow:testReportWindow,e;for(e in GIFrames){for(var f=GIFrames[e],g=0;g<f.actions.length;g++){var j=f.actions[g],m="";if(j.testnotes){m=j.testnotes.replace(/([^>]?)\n/g,"__my_new_line__");var q=[[/&/g,"&amp;"],[/</g,"&lt;"],[/>/g,"&gt;"],[/"/g,"&quot;"]],l;for(l in q)m=m.replace(q[l][0],q[l][1]);m=m.replace(/__my_new_line__/g,"<br>")}if(m=="")m="<br>";d.fillActionTesterNotes(e,j.id,m);d.fillActionTestResult(e,j.id,j.teststatus);d.fillTestResults(testItPassed)}f=
(new Date).getTime()-startTime;seconds=Math.floor(f/1E3%60);seconds=(seconds<10?"0":"")+seconds;minutes=Math.floor(f/6E4%60);minutes=(minutes<10?"0":"")+minutes;hours=Math.floor(f/36E5);hours=(hours<10?"0":"")+hours;d.fillActualTime(hours+":"+minutes+":"+seconds);(f=lms_getUserName())&&f!=""&&d.fillTestName(f)}}
function GIOpenAction(){if(isIE)for(var d=0;d<oPopup.document.all.length;d++)oPopup.document.all[d].detachEvent("onclick",GICloseAction);else{d=Get_Element("EventListenerDIV");d.style.cursor="default";d.style.zIndex=-1;d.removeEventListener("mousedown",GICloseAction,true)}var e=d=100;d=LeftPos+popWidth-234;e=TopPos+30;ActMenu&&ActMenu.Open(d,e);GIRefreshActionMenu();setTimeout(GIAttachEvent,100)}
function GIAttachEvent(){if(isIE&&popupVersion)for(var d=0;d<oPopup.document.all.length;d++)oPopup.document.all[d].attachEvent("onclick",GICloseAction);else{d=Get_Element("EventListenerDIV");d.style.cursor="default";d.style.zIndex=4;if(isIE)d.onmousedown=GICloseAction;else d.addEventListener("mousedown",GICloseAction,true)}}function GICloseAction(){ActMenu&&ActMenu.Close()}function GIRHist(d){for(var e=[],f=0;f<d;f++)e[f]=GIHistory[f];GIHistory=[];for(f=0;f<e.length;f++)GIHistory[f]=e[f]}
function GIRefreshActionMenu(){if(ActMenu){var d=false;if(GIHistory.length>0)d=true;var e=false;if(GIFrames[GIState].actions.length>1&&GIFrames[GIState].type!="decision")e=true;var f=false,g=false;if(GIFrames[GIState].type!="decision"&&(GIFrames[GIState].type!="end"||testIt)&&GIState!="testend")if(testIt&&GIFrames[GIState].type!="start"&&GIState!="teststart")g=true;else f=true;var j=UserPrefs.EnablePreferences;PlayerConfig.EnableCookies||(j=false);ActMenu.Refresh(j,d,e,f,g,GITMEnabled,GIDMEnabled,
true,param_printitname.length>0,param_fastdoit)}}function GIShowPrintit(){if(param_printitname.length>0){lms_LaunchTopic("P");IsIE10()&&param_printitname.indexOf(".pdf",param_printitname.length-4)!==-1?window.open("../../pdfgateway.html?printit/"+param_printitname):window.open("../../printit/"+param_printitname)}}function GIOpenHelp(){onHelp("../../")}
function GIClosePlayer(d){if(PlayerConfig.EnableCookies&&GICookie&&GICookie!=null){if(!(isIE&&popupVersion)){TopPos=window.screenTop!=undefined?window.screenTop:window.screenY;LeftPos=window.screenLeft!=undefined?window.screenLeft:window.screenX;popWidth=document.getElementById("noPopupFF").clientWidth;popHeight=document.getElementById("noPopupFF").clientHeight}if(!GINoCookieSave){GICookie.Cleft=LeftPos;GICookie.Ctop=TopPos;GICookie.Cwidth=popWidth;GICookie.Cheight=ScreenshotVisible||!(isIE&&popupVersion)?
popHeight:popHeight+SavedSSHeight;GICookie.Csss=ScreenshotVisible+1;GICookie.Store()}}GICloseAction();GIPlayer&&GIPlayer.close();testNotesWindow&&testNotesWindow.close();strWindow&&strWindow.close();if(window.opener)try{if(d||mViewOutline){mViewOutline=true;window.opener.DoItFinished(false)}else window.opener.DoItFinished(param_fastdoit)}catch(e){}}function OnClosingPreferences(){ShowPopup();setTimeout("RefreshStep()",100)}
function GIOpenPreferences(){HidePopup();OpenPreferencesDialog("../../..",!SoundAvail)}function GIOnResize(){if(!popupVersion){var d=GIAdvText.clientHeight;if(GIInfoFrame.clientHeight>GIAdvText.clientHeight)d=GIInfoFrame.clientHeight;GITextFrame.style.bottom=d+(testIt?30:12)+"px"}}function Init(){ActMenu=new ActionMenu;Init2()}
function Init2(){oPopup.document.getElementById("GITwisty"+idPostFix).title=R_interface_graphic;oPopup.document.getElementById("gititle"+idPostFix).innerHTML="&nbsp "+(testIt?R_mode_testit:R_mode_doit);if(closebtn=oPopup.document.getElementById("gicloseod"+idPostFix))closebtn.title=R_bubble_closeondemand;GITestStatus=oPopup.document.getElementById("PGITestStatus"+idPostFix);GIInfoFrame=oPopup.document.getElementById("PGIInfoFrame"+idPostFix);GITextFrame=oPopup.document.getElementById("PGITextFrame"+
idPostFix);GITextFrameJ=$("#PGITextFrame"+idPostFix);oPopup.document.getElementById("pgiaction"+idPostFix).innerHTML='<span title="'+R_interface_action_alt+'" style="CURSOR:pointer;TEXT-DECORATION:underline;FONT-SIZE:9pt;COLOR:#ccffff;FONT-WEIGHT:normal;FONT-FAMILY:Arial,Helvetica,sans-serif" onclick="top.GIPlayer.GIOpenAction(this);">'+R_interface_action+"</span>";GIAdvText=oPopup.document.getElementById("PGIAdvText"+idPostFix);GIScreenshot=oPopup.document.getElementById("PGIScreenshot"+idPostFix);
GIScreenshot.title=R_interface_graphic_alt;GIHighlight=oPopup.document.getElementById("PGIHighlight"+idPostFix);GICamera=oPopup.document.getElementById("camera"+idPostFix);$("#esttime").text(R_testit_estimate+": ");$("#testsetup").text(R_testit_setup+": ");if(testIt)if(popupVersion)oPopup.document.getElementById("PGITestStatusRow").style.display="block";else{$("#PGITextFrame"+idPostFix).css("bottom","52px");$("#PGIAdvText"+idPostFix).css("bottom","24px");$("#PGIInfoFrame"+idPostFix).css("bottom",
"24px");$("#PGITestStatus"+idPostFix).css("display","block")}var d=Math.random().toString();d=d.substr(d.length-8);document.title=testIt?R_mode_testit:R_mode_doit;if(IsFF())document.title=(testIt?R_mode_testit:R_mode_doit)+" "+d;SendEventToHemiFFButtonPlugin();GIOnLoad=true}var ScreenshotVisible=1,SavedSSHeight=0,SavedSSHeight2=0;
function toggleScreenshot(d){if(ScreenshotVisible){oPopup.document.getElementById("GITwisty"+idPostFix).src="../../../img/twistydown"+(d?"0":"1")+".gif";if(isIE&&popupVersion){d=oPopup.document.getElementById("split2");var e=d.getBoundingClientRect().top;SavedSSHeight=popHeight-e;SavedSSHeight2=d.clientHeight;popHeight=e;oPopup.document.getElementById("sstoggle1").style.display="none";oPopup.document.getElementById("sstoggle2").style.display="none";oPopup.document.getElementById("sstoggle3").style.display=
"none"}else{SavedSSHeight=oPopup.document.getElementById("split1"+idPostFix).style.height;oPopup.document.getElementById("split2"+idPostFix).style.display="none"}oPopup.document.getElementById("split1"+idPostFix).style.height="100%";ScreenshotVisible=0;oPopup_show(LeftPos,TopPos,popWidth,popHeight)}else{oPopup.document.getElementById("GITwisty"+idPostFix).src="../../../img/twistyup1.gif";if(isIE&&popupVersion){SavedSSHeight2||(SavedSSHeight2=100);popHeight+=SavedSSHeight;oPopup.document.getElementById("sstoggle1").style.display=
"inline";oPopup.document.getElementById("sstoggle2").style.display="inline";oPopup.document.getElementById("sstoggle3").style.display="inline";d=SavedSSHeight2/(popHeight-60);if(d<0.1)d=0.1;if(d>0.9)d=0.9;oPopup.document.getElementById("split1").style.height=(1-d)*100+"%";oPopup.document.getElementById("split2").style.height=d*100+"%";if(popHeight>screen.height)popHeight=screen.height;oPopup_show(LeftPos,TopPos,popWidth,popHeight);LeftPos=oPopup.document.parentWindow.screenLeft;TopPos=oPopup.document.parentWindow.screenTop}else{oPopup.document.getElementById("split1"+
idPostFix).style.height=SavedSSHeight;oPopup.document.getElementById("split2"+idPostFix).style.top=SavedSSHeight;oPopup.document.getElementById("split2"+idPostFix).style.height=100-Number(SavedSSHeight.substring(0,SavedSSHeight.indexOf("%")))+"%";oPopup.document.getElementById("split2"+idPostFix).style.display="block"}ScreenshotVisible=1}if(PlayerConfig.EnableCookies&&GICookie&&GICookie!=null){GICookie.Cleft=LeftPos;GICookie.Ctop=TopPos;GICookie.Cwidth=popWidth;GICookie.Cheight=ScreenshotVisible?
popHeight:popHeight+SavedSSHeight;GICookie.Csss=ScreenshotVisible+1;GICookie.Cs2=isIE&&popupVersion?SavedSSHeight2:SavedSSHeight;GICookie.Store()}RefreshStep()}function DecodeInputString(d){return d=replaceString("&lt;","<",d)}function replaceString(d,e,f){for(var g=0;g<f.length;g++)if(f.substring(g,g+d.length)==d)f=f.substring(0,g)+e+f.substring(g+d.length,f.length);return f}
function fixInputString(d){if(d)for(var e=0;e<d.length;e++){d[e]=replaceString("<","&lt;",d[e]);d[e]=replaceString(">","&gt;",d[e])}return d}function getMyGuid(){var d=this.location.href,e=d.indexOf("?");if(e>=0)d=d.substr(0,e);e=d.lastIndexOf("/");return d.substr(e-36,36)}function formatStr(d){for(var e=arguments,f=1;f<e.length;f++){var g="{"+(f-1)+"}",j=d.indexOf(g);if(j>=0)d=d.substr(0,j)+e[f]+d.substr(j+g.length)}return d}
if(Array.prototype.push==null)Array.prototype.push=function(d){return this[this.length]=d};
if(typeof HTMLElement!="undefined"&&!HTMLElement.prototype.insertAdjacentElement){HTMLElement.prototype.insertAdjacentElement=function(d,e){switch(d){case "beforeBegin":this.parentNode.insertBefore(e,this);break;case "afterBegin":this.insertBefore(e,this.firstChild);break;case "beforeEnd":this.appendChild(e);break;case "afterEnd":this.nextSibling?this.parentNode.insertBefore(e,this.nextSibling):this.parentNode.appendChild(e)}};HTMLElement.prototype.insertAdjacentHTML=function(d,e){var f=this.ownerDocument.createRange();
f.setStartBefore(this);f=f.createContextualFragment(e);this.insertAdjacentElement(d,f)};HTMLElement.prototype.insertAdjacentText=function(d,e){var f=document.createTextNode(e);this.insertAdjacentElement(d,f)}};var _workerFunction="",_errorFunction="",_extraInfo="",_req,_url;
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 f=base.indexOf("#");if(e>=0||f>=0)base=e>=0&&f>=0?base.substr(0,e<f?e:f):e>=0?base.substr(0,e):base.substr(0,f);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{if(d.substr(0,1)=="/")d=d.substr(1);e=base.lastIndexOf("/");base=base.substr(0,e)}return base=
base+"/"+d}
function LoadXMLDoc(d,e,f,g){_workerFunction=e;_errorFunction=f;_extraInfo=g;_url=AbsUrl(d);_req=null;try{if(window.location.href.substr(0,7).toLowerCase()=="http://"||window.location.href.substr(0,8).toLowerCase()=="https://")_req=new XMLHttpRequest;if(window.location.href.substr(0,7).toLowerCase()=="file://"&&IsTouchDevice())_req=new XMLHttpRequest}catch(j){}finally{if(_req==null)_req=new ActiveXObject("Microsoft.XMLHTTP")}_req.onreadystatechange=state_Change;_req.open("GET",_url,true);_req.send(null)}
function state_Change(){if(_req.readyState==4)if(_req.status==200)eval(_workerFunction+"(_req,_extraInfo)");else if(_req.status==0){if(_req.responseXML.documentElement==null){var d=new ActiveXObject("Microsoft.XMLDOM");d.async=false;d.loadXML(_req.responseText);_req={};_req.responseXML=d}eval(_workerFunction+"(_req,_extraInfo)")}else if(_url.substr(0,3)=="../")LoadXMLDoc(_url.substr(3),_workerFunction,_errorFunction,_extraInfo);else if(_errorFunction.length>0){alert(_url+" not found. Logged...");
eval(_errorFunction+"(_extraInfo)")}else alert("Problem retrieving data: "+_req.statusText)}var _returnFunction="",_nodes,_nodesArray=[];function LoadXMLDocArray(d,e,f,g,j){_returnFunction=e;_nodeName=g;j?LoadXMLDoc(d,"XMLDocArrayWorker2",f,g):LoadXMLDoc(d,"XMLDocArrayWorker",f,g)}
function XMLDocArrayWorker(d,e){_nodesArray=[];_nodes=d.responseXML.getElementsByTagName(e);for(var f=0;f<_nodes.length;f++){n=_nodes[f];(s=n.textContent?n.textContent:n.text)||(s="");k=s.length;if(k>=2)if(s.substr(0,1)=='"'&&s.substr(k-1,1)=='"')s=ss=s.substr(1,k-2);_nodesArray[_nodesArray.length]=s}sfn=_returnFunction+"(_nodesArray)";setTimeout(sfn,1)}
function XMLDocArrayWorker2(d,e){_nodesArray=[];_nodes=d.responseXML.getElementsByTagName(e);for(var f=0;f<_nodes.length;f++){n=_nodes[f];xmlname=n.attributes[0].nodeValue;xmltext="";for(var g=0;g<n.childNodes.length;g++)if(n.childNodes[g].xml)xmltext+=n.childNodes[g].xml;else{var j=new XMLSerializer;xmltext+=j.serializeToString(n.childNodes[g])}_nodesArray[_nodesArray.length]=xmlname+"="+xmltext}sfn=_returnFunction+"(_nodesArray)";setTimeout(sfn,1)};function filterHTML(d){d=replaceString("&","&amp;",d);d=replaceString("<","&lt;",d);return d=replaceString(">","&gt;",d)}function replaceString(d,e,f){if(f!=null)return f.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};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,f){s="<div style='padding:"+e+"px'";if(f&&f!="")s+=" class='"+f+"'";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,f,g,j,m,q,l,r){showDialog2(d,e,f,g,j,m,q,l);$("body").append("<div id='04A98DB974UPK'>"+r+"</div>")}
function showDialog2(d,e,f,g,j,m,q,l){dlg_autosizeheight=j==-1?true:false;dialog2_html=d;showDialog("",e,f,g,j,m,q,"",l)}
function showDialog(d,e,f,g,j,m,q,l,r){isopened=true;if(q==0)q=96;if(e!=-1)e=PtToPx(e,q);if(f!=-1)f=PtToPx(f,q);g=PtToPx(g,q);j=PtToPx(j,q);dlg_width=g;dlg_height=j;device_dpi=q;dialogh_ref=d;modal_dialog=m;if(e==-1||f==-1){centerx=$(window).width()/2-g/2+$(document).scrollLeft();centery=$(window).height()/2-j/2+$(document).scrollTop()}else{centerx=e;centery=f}mainref=r?dialogh_ref:l&&l!=""?l+"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<j)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: "+g+"px; height: "+j+'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};
