/* 
﻿Copyright © 1998, 2012, Oracle and/or its affiliates.  All rights reserved.*/ 
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,g){$(d).css("width",g)}function setHeight(d,g){$(d).css("height",g)}function getFullWidth(){return IsIE7()?$(window).width():document.body.scrollWidth}
function getFullHeight(){return IsIE7()?$(window).height():document.body.scrollHeight}function setPadding(d,g,m){s="<div style='padding:"+g+"px'";if(m&&m!="")s+=" class='"+m+"'";s+=">"+d+"</div>";return s}
function getContentSize(d){var g={width:0,height:0};o=$("<div style='display:visible;position:absolute;top:0px;left:0px;' id='04A98DB973UPK'>"+d+"</div>");$("body").append(o);g.width=$("#04A98DB973UPK").outerWidth(true);g.height=$("#04A98DB973UPK").outerHeight(true);$("#04A98DB973UPK").remove();return g}function showDialog3(d,g,m,q,u,v,z,B,F){showDialog2(d,g,m,q,u,v,z,B);$("body").append("<div id='04A98DB974UPK'>"+F+"</div>")}
function showDialog2(d,g,m,q,u,v,z,B){dlg_autosizeheight=u==-1?true:false;dialog2_html=d;showDialog("",g,m,q,u,v,z,"",B)}
function showDialog(d,g,m,q,u,v,z,B,F){isopened=true;if(z==0)z=96;if(g!=-1)g=PtToPx(g,z);if(m!=-1)m=PtToPx(m,z);q=PtToPx(q,z);u=PtToPx(u,z);dlg_width=q;dlg_height=u;device_dpi=z;dialogh_ref=d;modal_dialog=v;if(g==-1||m==-1){centerx=$(window).width()/2-q/2+$(document).scrollLeft();centery=$(window).height()/2-u/2+$(document).scrollTop()}else{centerx=g;centery=m}mainref=F?dialogh_ref:B&&B!=""?B+"dialog1.html":"../dialog1.html";if(d=="")mainref="../dialog2.html";d=getFullWidth();g=getFullHeight();v?
$(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:"+g+'px;"></div>'):$(document.body).append('<div id="scrollarea" scrolling="yes"  style="overflow:auto; z-index: 99;" onclick="Click1();"></div>');if(g<u)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>');
v?$(document.body).append('<div id="graydiv" scrolling="yes" class="pointerdiv" style="display:none;z-index: 99;width:'+d+"px;height:"+g+'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: "+q+"px; height: "+u+'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(),g=getFullHeight();$("#graydiv").css("width",d+"px");$("#graydiv").css("height",g+"px");$("#scrollarea").css("width",d+"px");$("#scrollarea").css("height",g+"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};function filterHTML(d){d=replaceString("&","&amp;",d);d=replaceString("<","&lt;",d);return d=replaceString(">","&gt;",d)}function replaceString(d,g,m){if(m!=null)return m.replace(RegExp(d,"g"),g)}function PtToPx(d,g){return d*g/72}function PxToPt(d,g){return d/g*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 _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 g=new BrowserInfo;GetBrowserInfo(g);if(g.name!="Firefox")return false;return g.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(g){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 g=s.indexOf("Trident/");if(g>=0){d.trident=true;d.tridentVersion=parseInt(s.substr(g+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 g=document.layers.screen.document.layers[d];g||(g=document.layers[d]);return g}return 0}catch(m){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 g=document.layers.screen.document.layers[d];g||(g=document.layers[d]);return g}return 0}catch(m){return null}}function shiftTo(d,g,m){d=getDIVstyle(d);if(d.moveTo)d.moveTo(g,m);else{d.left=g+"px";d.top=m+"px"}}
function getUniWidth(d){try{var g=getDIV(d),m;if(d.style.width)m=parseInt(d.style.width);else if(d.style.pixelWidth)m=d.style.pixelWidth;else if(d.offsetWidth)m=d.offsetWidth;else if(document.defaultView&&document.defaultView.getComputedStyle)m=document.defaultView.getComputedStyle(g,"").getPropertyValue("width");if(typeof m=="string")m=parseInt(m);return m}catch(q){return null}}
function getUniHeight(d){try{var g=getDIV(d),m;if(d.style.height)m=parseInt(d.style.height);else if(d.style.pixelHeight)m=d.style.pixelHeight;else if(d.offsetHeight)m=d.offsetHeight;else if(document.defaultView&&document.defaultView.getComputedStyle)m=document.defaultView.getComputedStyle(g,"").getPropertyValue("height");if(typeof m=="string")m=parseInt(m);return m}catch(q){return null}}
function getClientWidth(d){try{var g=getDIV(d);return g.clientWidth?g.clientWidth:parseInt(g.width)}catch(m){return d.offsetWidth}}function getClientHeight(d){try{var g=getDIV(d);return g.clientHeight?g.clientHeight:parseInt(g.height)}catch(m){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 g=getDIVstyle(d);return g.pixelLeft?g.pixelLeft:parseInt(g.left)}catch(m){return parseInt(d.offsetLeft)}}function getObjTop(d){try{var g=getDIVstyle(d);return g.pixelTop?g.pixelTop:parseInt(g.top)}catch(m){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,g){getDIVstyle(d).visibility="visible";if(g&&IsiOS())try{playMode=="S"&&showActObj.type=="Input"&&$("#"+d+" input").attr("readonly",true)}catch(m){}}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 Cookie(d,g,m,q,u,v){this.$document=d;this.$name=g;if(m=="today"){d=new Date;d.setHours(23);d.setMinutes(59);d.setSeconds(59);this.$exp=d}else this.$exp=m?new Date((new Date).getTime()+m*864E5):null;this.$path=q?q:null;this.$domain=u?u:null;this.$secure=v?true:false}
Cookie.prototype.Store=function(){if(PlayerConfig.EnableCookies){var d="",g;for(g in this)if(!(g.charAt(0)=="$"||typeof this[g]=="function")){if(d!="")d+="&";d+=g+":"+escape(this[g])}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 g=d.indexOf(this.$name+"=");if(g==-1)return false;g+=this.$name.length+1;var m=d.indexOf(";",g);if(m==-1)m=d.length;d=d.substring(g,m).split("&");for(g=0;g<d.length;g++){m=d[g].split(":");this[m[0]]=unescape(m[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}};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,g){for(var m="",q=0;q<d.length;q++){ss=d.substr(q,1);if(g==0?Escape.__Normal_Contains(ss):!Escape.__SafeUri_Contains(ss))m+=ss;else{ss=d.charCodeAt(q);a="0000"+ss.toString(16).toUpperCase();m+=(g==0?"$":Escape.SafeUri_EscapeCharacter)+a.substr(a.length-4)}}return m};
Escape.__UnEscape=function(d,g){for(var m="",q=false,u=0;u<d.length;u++)if(q){ss=d.substr(u,4);m+=String.fromCharCode(parseInt("0x"+ss));u+=3;q=false}else{ss=d.substr(u,1);if(ss==(g==0?"$":Escape.SafeUri_EscapeCharacter))q=true;else m+=ss}return m};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 g=Escape.SafeUri_UnsafeCharacters.length,m=0;m<g;m++)if(d==Escape.SafeUri_UnsafeCharacters[m])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 g in this.params)if(this.params[g]!=null)d.params[g]=this.params[g];return d};
UrlParser.prototype.Parse=function(){var d,g;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 m=0;m<d.length;m++){g=d[m];if(g.length!=0){var q=g.split("=");if(q.length==2)this.params[q[0].toLowerCase()]=q[1];else if(q.length<2)this.params[q[0].toLowerCase()]="";else this.params[q[0].toLowerCase()]=
g.substr(q[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,g){this.params[d.toLowerCase()]=g};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 g=true,m;for(m in this.params){var q=this.params[m];if(q!=null){if(g==false)d+="&";g=false;d+=q.length==0?m:m+"="+this.params[m]}}if(this.safemode)d="su="+Escape.MyEscape(d);return d};
UrlParser.prototype.GetCorrectUrl=function(d,g){if(!this.safemode)return d;var m,q=d.indexOf("#");if(q==-1)q=d.indexOf("?");if(q>=0){var u=d.substring(q+1);m=u.split("&");if(m[0].toLowerCase().substr(0,3)=="su=")return d;return d.substring(0,q+1)+"su="+Escape.SafeUriEscape(u)}else return d+(g?"":"?su=")};var _workerFunction="",_errorFunction="",_extraInfo="",_req,_url;
function AbsUrl(d){for(var g=0;g<d.length;g++){c=d.substr(g,1);if(c==":")return d}base=window.location.href;g=base.indexOf("?");var m=base.indexOf("#");if(g>=0||m>=0)base=g>=0&&m>=0?base.substr(0,g<m?g:m):g>=0?base.substr(0,g):base.substr(0,m);if(d.substr(0,3)=="../"){g=base.lastIndexOf("/");for(base=base.substr(0,g);d.substr(0,3)=="../";){g=base.lastIndexOf("/");base=base.substr(0,g);d=d.substr(3)}}else{if(d.substr(0,1)=="/")d=d.substr(1);g=base.lastIndexOf("/");base=base.substr(0,g)}return base=
base+"/"+d}
function LoadXMLDoc(d,g,m,q){_workerFunction=g;_errorFunction=m;_extraInfo=q;_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(u){}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,g,m,q,u){_returnFunction=g;_nodeName=q;u?LoadXMLDoc(d,"XMLDocArrayWorker2",m,q):LoadXMLDoc(d,"XMLDocArrayWorker",m,q)}
function XMLDocArrayWorker(d,g){_nodesArray=[];_nodes=d.responseXML.getElementsByTagName(g);for(var m=0;m<_nodes.length;m++){n=_nodes[m];(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,g){_nodesArray=[];_nodes=d.responseXML.getElementsByTagName(g);for(var m=0;m<_nodes.length;m++){n=_nodes[m];xmlname=n.attributes[0].nodeValue;xmltext="";for(var q=0;q<n.childNodes.length;q++)if(n.childNodes[q].xml)xmltext+=n.childNodes[q].xml;else{var u=new XMLSerializer;xmltext+=u.serializeToString(n.childNodes[q])}_nodesArray[_nodesArray.length]=xmlname+"="+xmltext}sfn=_returnFunction+"(_nodesArray)";setTimeout(sfn,1)};var lms_TOCState=null;function lms_LoadAdapterComplete(){__Ialert("lms_LoadAdapterComplete() called");var d=document.LmsCom;d.Begin();var g=d.ParentLmsCom;if(g&&g.bigScoItemCount){d.OpenTOCStatus(g.bigScoItemCount,g.bigScoHash);lms_TOCState=d.status_obj.getTocState();d.bigsco=true}else d.OpenBasicStatus();lms_UpdateUI(d.status_obj.getStatus());lms_initialized=true;setTimeout(lms_store.callbackfunction,1)}
function GetChildLmsCom(d){__Ialert("lms_GetChildLmsCom() called");var g=document.LmsCom,m=d.window.document.LmsCom=Kpath_launch&&d.cguid?new LmsComKPath:new LmsComBase(g);m.owner=d.window;var q=parseInt(d.childIndex,10);m.SetOrdinalNumber(q);m.lesson_data=lms_TOCState?lms_TOCState.GetStatus(q)+lms_TOCState.GetChildren(q):"";g.child=m;g.lesson_location=d.childIndex}
function ListenChildClose(){__alert("lms_ListenChildClose() called");if(_sco){var d=document.LmsCom.child;if(d.lesson_status!==LMS_NOT_ATTEMPTED){var g=d.GetOrdinalNumber(),m=Lms2Stat(d.lesson_status),q=d.score;d=d.lesson_data.substring(1);lms_TOCState.SetStatus(g,m);lms_TOCState.SetScore(g,q);lms_TOCState.SetChildren(g,d);lms_ItemStatus_Changed(g)}}}
function lms_getBookmark(){__alert("lms_getBookmark called()");var d=document.LmsCom;return d.lesson_location?parseInt(d.lesson_location,10):d.GetBookmark(this.toc_hash)}function lms_GetItemStatus(d){return lms_TOCState.GetStatus(d)}function lms_SetItemStatus(d,g){lms_TOCState.SetStatus(d,g)}function lms_ItemStatus_Changed(d){o=this.frames.mytreeframe;o.UpdateItemStatus(d)}var _lms_module_name="lms_toc.js",_lms_show_alert=false,_lms_show_Ialert=false;var lastExpressionF="",lastExpressionH="",roleStatusChanged=false,viewApplicable=false,viewSearch=false,selectorMode="A",actuallySelected,actuallyChildIndex,playerwindow,toc_safeUriMode=false,playMode="P",odsTopicID,_goToFlatMode=false,_lastSearchResultIsEmpty=false;function InitRoles(d){if(d=="NOROLES")setTimeout("Init1();",10);else{QueryParser.Parse("URI",d);QueryParser.ev&&QueryProcessor.Start(QueryParser.ev,Init0)}}
function SetRoles(d){SearchProcess_Show(true);o=this.frames.mytreeframe;o.modeDescA.treeCreated=false;o.modeDescF.treeCreated=false;o.modeDescH.treeCreated=false;o.modeDescFH.treeCreated=false;roleStatusChanged=true;if(d!="NOROLES"){QueryParser.Parse("URI",d);QueryParser.ev&&QueryProcessor.Start(QueryParser.ev,result_Roles_Search)}else o.SetTopicList("NOROLES",null,"parent.result_Search2")}
function Trim(d){if(d.length==0)return"";for(;d.substr(0,1)==" ";){d=d.substr(1);if(d.length==0)return""}for(;d.substr(d.length-1,1)==" ";)d=d.substr(0,d.length-1);return d}function IsFilteredChar(d){for(var g=0;g<14;g++)if(d==".,;:!?(){}[]\\'".substr(g,1))return" ";return d}function SearchStringFilter(d){for(var g="",m=false,q=0;q<d.length;q++){var u=d.substr(q,1);if(u=='"'){m=!m;g+=u}else g+=m==true?u:IsFilteredChar(u)}return g}
function TrimQuotes(d){if(d.length==0)return d;var g=d;if(d.substr(0,1)=='"')g=g.substr(1);if(d.substr(d.length-1,1)=='"')g=g.substr(0,g.length-1);return g}
function Select(d){SearchProcess_Show(true);if(d==0)if(viewApplicable&&viewSearch){selectorMode="FH";setTimeout("ShowFilteredHemi()",5)}else if(viewApplicable){selectorMode="H";setTimeout("ShowHemi()",5)}else if(viewSearch){selectorMode="F";setTimeout("ShowFiltered()",5)}else{selectorMode="A";setTimeout("ShowAll()",5)}else if(d==1){o=this.frames.mytreeframe;o._lastChangeIsFilterOnly=false;d=getObjectById("searchbox");var g=d.value;g=Trim(SearchStringFilter(g));d.value=TrimQuotes(g);if(g.length==0)SearchProcess_Show(false);
else{ks=g.indexOf("'");if(ks>=0)SearchProcess_Show(false);else{selectorMode="F";if(lastExpressionF!=g){o.modeDescF.treeCreated=false;o.modeDescFH.treeCreated=false;lastExpressionF=g;datasourceroot="/querydb/";QueryParser.Parse("EXPR",g);QueryParser.ev&&QueryProcessor.Start(QueryParser.ev,result_Search)}else viewApplicable?setTimeout("ShowFilteredHemi()",5):setTimeout("ShowFiltered()",5)}}}else if(d==2){o=this.frames.mytreeframe;g=hemiParam;if(g.length==0)SearchProcess_Show(false);else{selectorMode=
"H";if(lastExpressionH!=g){o.modeDescH.treeCreated=false;o.modeDescFH.treeCreated=false;lastExpressionH=g;ss="e"+g;datasourceroot="/querydb/";QueryParser.Parse("URI",ss);QueryParser.ev&&QueryProcessor.Start(QueryParser.ev,result_Search)}else viewApplicable?setTimeout("ShowFilteredHemi()",5):setTimeout("ShowHemi()",5)}}else if(d==3){o=this.frames.mytreeframe;d=getObjectById("searchbox");g=Trim(d.value);g=SearchStringFilter(g);o.modeDescF.treeCreated=false;lastExpressionF=g;selectorMode="FH1";datasourceroot=
"/querydb/";QueryParser.Parse("EXPR",g);QueryParser.ev&&QueryProcessor.Start(QueryParser.ev,result_Search)}else if(d==4){o=this.frames.mytreeframe;g=hemiParam;o.modeDescH.treeCreated=false;lastExpressionH=g;ss="e"+g;selectorMode="FH2";datasourceroot="/querydb/";QueryParser.Parse("URI",ss);QueryParser.ev&&QueryProcessor.Start(QueryParser.ev,result_Search)}else if(d==5){selectorMode="H";onTocLoaded=true}}
function result_Search2(){if(selectorMode=="F")viewApplicable?setTimeout("ShowFilteredHemi()",5):setTimeout("ShowFiltered()",5);else if(selectorMode=="H")viewSearch?setTimeout("ShowFilteredHemi()",5):setTimeout("ShowHemi()",5);else if(selectorMode=="FH1")setTimeout("Select(4)",5);else selectorMode=="FH2"||selectorMode=="FH"?setTimeout("ShowFilteredHemi()",5):setTimeout("ShowAll()",5)}function result_Roles_Search(d){o=window.frames.mytreeframe;o.SetTopicList("ROLES",d,"parent.result_Search2")}
function result_Search(d){_lastSearchResultIsEmpty=d.length==0;if(genericMode_SearchHemi==true)ShowGenToc2(d);else{o=window.frames.mytreeframe;if(selectorMode=="F")o.SetTopicList("FILTERED",d,"parent.result_Search2");else if(selectorMode=="H")o.SetTopicList("HEMI",d,"parent.result_Search2");else if(selectorMode=="FH1")o.SetTopicList("FILTERED",d,"parent.result_Search2");else selectorMode=="FH2"&&o.SetTopicList("HEMI",d,"parent.result_Search2")}}var _showBookmark=true;
function ShowAll(){if(o=this.frames.mytreeframe){dA=o.document.getElementById("treeControlHostForAll");dS=o.document.getElementById("treeControlHostForFiltered");dSf=o.document.getElementById("flatControlHostForFiltered");dH=o.document.getElementById("treeControlHostForHemi");dHf=o.document.getElementById("flatControlHostForHemi");dFH=o.document.getElementById("treeControlHostForFilteredHemi");dFHf=o.document.getElementById("flatControlHostForFilteredHemi");dA.style.display="block";dS.style.display=
"none";dSf.style.display="none";dH.style.display="none";dHf.style.display="none";dFH.style.display="none";dFHf.style.display="none";o.treeViewMode="ALL";var d=lms_getBookmark(),g=_tree_root==""?o.titles[0]:_tree_root;if(_associated_content==false&&_see_also==false&&_showBookmark){var m=g.substr(37);if(_treeIndex>=0){d=parseInt(_treeIndex,10);m=0}var q=null;try{q=parseInt(m,10)+d}catch(u){}o.createTreeControl(g,false,null,null,q)}else o.createTreeControl(g,false,null,_seealso_selecteditem);SearchResult_Show(false);
_showBookmark=false}}
function ShowFiltered(){if(o=this.frames.mytreeframe){dA=o.document.getElementById("treeControlHostForAll");dS=o.document.getElementById("treeControlHostForFiltered");dSf=o.document.getElementById("flatControlHostForFiltered");dH=o.document.getElementById("treeControlHostForHemi");dHf=o.document.getElementById("flatControlHostForHemi");dFH=o.document.getElementById("treeControlHostForFilteredHemi");dFHf=o.document.getElementById("flatControlHostForFilteredHemi");dA.style.display="none";dH.style.display=
"none";dHf.style.display="none";dFH.style.display="none";dFHf.style.display="none";var d=o.GetActualFlatView();if(_goToFlatMode==true)d=true;dS.style.display=d?"none":"block";dSf.style.display=d?"block":"none";_goToFlatMode=false;o.treeViewMode="FILTERED";o.createTreeControl(o.titles[0],d);SearchResult_Show(true);_showBookmark=false;document.getElementById("resulttext").innerHTML=filterHTML(lastExpressionF)}}
function ShowHemi(){if(o=this.frames.mytreeframe){dA=o.document.getElementById("treeControlHostForAll");dS=o.document.getElementById("treeControlHostForFiltered");dSf=o.document.getElementById("flatControlHostForFiltered");dH=o.document.getElementById("treeControlHostForHemi");dHf=o.document.getElementById("flatControlHostForHemi");dFH=o.document.getElementById("treeControlHostForFilteredHemi");dFHf=o.document.getElementById("flatControlHostForFilteredHemi");dA.style.display="none";dS.style.display=
"none";dSf.style.display="none";dFH.style.display="none";dFHf.style.display="none";var d=o.GetActualFlatView();if(_goToFlatMode==true)d=true;dH.style.display=d?"none":"block";dHf.style.display=d?"block":"none";_goToFlatMode=false;o.treeViewMode="HEMI";o.createTreeControl(o.titles[0],d);SearchResult_Show(false);_showBookmark=false}}
function ShowFilteredHemi(){if(o=this.frames.mytreeframe){dA=o.document.getElementById("treeControlHostForAll");dS=o.document.getElementById("treeControlHostForFiltered");dSf=o.document.getElementById("flatControlHostForFiltered");dH=o.document.getElementById("treeControlHostForHemi");dHf=o.document.getElementById("flatControlHostForHemi");dFH=o.document.getElementById("treeControlHostForFilteredHemi");dFHf=o.document.getElementById("flatControlHostForFilteredHemi");dA.style.display="none";dS.style.display=
"none";dSf.style.display="none";dH.style.display="none";dHf.style.display="none";var d=o.GetActualFlatView();if(_goToFlatMode==true)d=true;dFH.style.display=d?"none":"block";dFHf.style.display=d?"block":"none";_goToFlatMode=false;o.treeViewMode="FILTEREDHEMI";_goToFlatMode=false;o.createTreeControl(o.titles[0],d);SearchResult_Show(true);_showBookmark=false;document.getElementById("resulttext").innerHTML=filterHTML(lastExpressionF)}}
function EmptyContent(d){d||(d=false);return d==true?'<div style="text-align: center; color: red; font-size: 16px;">'+R_no_results+'<br/><br/><a class="tocMyRoles" href="javascript:viewAll()">'+R_no_results_linkToAll+"</a></div>":'<div style="text-align: center; color: red; font-size: 16px;">'+R_toc_emptycontent+"</div>"}function FastDoIt(){p=topicDescriptorCache[actuallySelected];if(p.playmodes.indexOf("D")>=0){HideToc();PlayFastDoIt()}bypassToc=false}var TocFirstCall=true;
function TreeFinished(d,g){if(TocFirstCall===true)if(typeof UserDefinedIASHook==="function"&&hemiParam!==null&&hemiParam!==undefined){var m={};m.Application=appParam===undefined?"":decodeURIComponent(appParam);m.ContextType="ExactMatch";m.LaunchType="Hint";if(ctxParam===undefined)m.LaunchType=shParam===undefined?"External":"SmartHelp";m.Context={};m.Context.Parts=[];if(ctxParam!==undefined)for(var q=decodeURIComponent(ctxParam).split(";"),u=0;u<q.length;u++){var v=q[u].indexOf(":"),z=q[u].substr(0,
v);v=q[u].substr(v+1);var B={};B.Id=z;B.Value=v;m.Context.Parts.push(B)}m.UDV=udvParam===undefined?"":udvParam;UserDefinedIASHook(m,this.frames.mytreeframe.foundApplicableList)}TocFirstCall=false;SetSelectionViewText();m=false;if(bypassToc==true){ooo=this.frames.mytreeframe;if(ooo.treeViewMode=="HEMI")if(ooo.GetActualFlatView()==true)if(ooo.GetActualFlatItemCounter()==1){m=true;setTimeout("FastDoIt()",100)}}if(m==false)bypassToc=false;if(g){m=this.frames.mytreeframe;dA=m.document.getElementById("treeControlHostForAll");
dS=m.document.getElementById("treeControlHostForFiltered");dSf=m.document.getElementById("flatControlHostForFiltered");dH=m.document.getElementById("treeControlHostForHemi");dHf=m.document.getElementById("flatControlHostForHemi");dFH=m.document.getElementById("treeControlHostForFilteredHemi");dFHf=m.document.getElementById("flatControlHostForFilteredHemi");if(d=="ALL")dA.innerHTML=EmptyContent();else if(d=="FILTERED"){dS.innerHTML=EmptyContent();dSf.innerHTML=EmptyContent()}else if(d=="HEMI"){dH.innerHTML=
EmptyContent(true);dHf.innerHTML=EmptyContent(true)}else if(d=="FILTEREDHEMI"){dFH.innerHTML=EmptyContent(true);dFHf.innerHTML=EmptyContent(true)}EnableSelectionViewText(false);Refresh(null)}else EnableSelectionViewText(true)}var _tocHidden=false;function HideToc(){}function ResumeToc(){}function DoItFinished(d){if(!_closing){window.focus();ResumeToc();if(d==true){opener=null;window.open("","_self");window.close()}}}var topicDescriptorCache=[];
function topicDescriptorObj(d,g,m,q,u,v,z,B,F,M){this.title=d;this.type=g;this.tpc=m;this.playmodes=q;this.jumpInArray=u;this.leadin=v;this.concept=z;this.printitname=encodeURIComponent(B);this.userdefined=F;this.remediation=M;this.seealsoroot="";this.seealsolinks=[]}function _getFilteredStatus(d){return this.frames.mytreeframe.getFilteredStatus(d)}function seeAlsoLink(d,g,m){this.type=d;this.title=g;this.guid=m;this.filtered=false}function JumpInPoint(d,g){this.label=d;this.frame_id=g}
function CheckSeeAlso(){if(_see_also==true)return false;return true}var _playConceptSound=true;function PlayConceptSound(){return _playConceptSound}function SCO_Supported(){return _sco}var _launchMode="",_lastSelectedItem="",_lastMode="Init",_lastTpc="Init";
function TreeItemSelected(d,g){_launchMode="";if(d){o=this.frames.mytreeframe;kb=o.getBaseIndex();var m=d.substr(37);if(_lastMode!=g||_lastTpc!=d)actuallyChildIndex=-2222;_lastMode=g;_lastTpc=d;if(m-kb==actuallyChildIndex){SearchProcess_Show(false);try{viewApplicable==true?this.frames.myconceptframeToc.SetCtxexParam(lastExpressionH):this.frames.myconceptframeToc.SetCtxexParam(null)}catch(q){}if(roleStatusChanged==true){try{this.frames.myconceptframeToc.RoleStatusChanged()}catch(u){}roleStatusChanged=
false}d==null&&g==null?SetSelectionViewText(null,true):SetSelectionViewText();EnableSelectionViewText(!_lastSearchResultIsEmpty);return}actuallyChildIndex=m-kb}_lastMode=g;_lastTpc=d;d==null&&g==null?SetSelectionViewText(null,true):SetSelectionViewText();EnableSelectionViewText(!_lastSearchResultIsEmpty);if(g=="HIDE")SearchProcess_Show(false);else{FocusToSearchField();if(d==null)Refresh(null);else{actuallySelected=guid=d.substr(0,36);_playConceptSound=true;topicDescriptorCache[guid]?Refresh(guid):
LoadXMLDoc("tpc/"+guid+"/descriptor.xml","TreeItemSelected_Returned_Descriptor","",guid)}}}
function _StartTopic(d){try{var g=this.frames.myconceptframeToc.location.href;if(g.indexOf("lmstart.html")<0){setTimeout("_StartTopic('"+d+"')",100);return}g=this.frames.myconceptframeToc.frames.myframe.location.href;if(g.indexOf("lmsui.html")<0){setTimeout("_StartTopic('"+d+"')",100);return}if(!this.frames.myconceptframeToc.frames.myframe.launchTopic){setTimeout("_StartTopic('"+d+"')",100);return}if(actuallySelected!=this.frames.myconceptframeToc.topicID){setTimeout("_StartTopic('"+d+"')",100);return}}catch(m){setTimeout("_StartTopic('"+
d+"')",100);return}setTimeout("this.frames['myconceptframeToc'].StartTopic('"+d+"')",100)}
function TreeItemDoubleSelected(){tdc=topicDescriptorCache[actuallySelected];try{if(tdc.type=="Topic"){UserPrefs.LoadCookie();mode=UserPrefs.DefaultPlayMode;_playConceptSound=false;if(tdc.playmodes.indexOf(mode)>=0){_launchMode=mode;_lastSelectedItem==actuallySelected&&_StartTopic(_launchMode)}else{modestr=R_mode_seeit;switch(mode){case "T":modestr=R_mode_tryit;break;case "K":modestr=R_mode_knowit;break;case "D":modestr=R_mode_doit;break;case "P":modestr=R_mode_printit;break;default:modestr=R_mode_seeit}alert(R_not_playable1+
modestr+R_not_playable2)}}}catch(d){setTimeout("TreeItemDoubleSelected()",100)}}function fixHTMLString(d){d=replaceString("<","&lt;",d);d=replaceString(">","&gt;",d);d=replaceString("'","&#39;",d);return d=replaceString('"',"&#34;",d)}function getDescriptorItem(d,g){var m="";try{var q=d.responseXML.getElementsByTagName(g);if(q.length>0){n=q[0];if(n.textContent!=null)m=n.textContent;else if(n.text!=null)m=n.text;else if(n.firstChild.data!=null)m=n.firstChild.data}}catch(u){}return m}
function TreeItemSelected_Returned_Descriptor(d,g){var m=getDescriptorItem(d,"PlayModes");jumpInArray=[];nodes=d.responseXML.getElementsByTagName("JumpIn");for(var q=0;q<nodes.length;q++){n=nodes[q];if(n.textContent)label=n.textContent;else if(n.text)label=n.text;else if(n.firstChild.data)label=n.firstChild.data;B=n.attributes[0];frameid=B.nodeValue;jumpInArray[jumpInArray.length]=new JumpInPoint(fixHTMLString(label),frameid)}_leadIn="./toc/empty.html";nodes=d.responseXML.getElementsByTagName("Leadin");
if(nodes.length>0)_leadIn="./tpc/"+g+"/leadin.html";_concept="";nodes=d.responseXML.getElementsByTagName("Concept");if(nodes.length>0){n=nodes[0];if(n.textContent)_concept=n.textContent;else if(n.text)_concept=n.text;else if(n.firstChild.data)_concept=n.firstChild.data;if(_concept.indexOf("odrel://")==0)_concept=resolve(_concept)}_title=getDescriptorItem(d,"Title");_type=getDescriptorItem(d,"Type");_printitname=getDescriptorItem(d,"PrintItName");_userdefined=getDescriptorItem(d,"UserDefined");_remediation=
getDescriptorItem(d,"Remediation");if(_remediation=="")_remediation="Always";topicDescriptorCache[g]=new topicDescriptorObj(_title,_type,g,m,jumpInArray,_leadIn,_concept,_printitname,_userdefined,_remediation);nodes=d.responseXML.getElementsByTagName("SeeAlsoRoot");if(nodes.length>0){n=nodes[0];q="";if(n.textContent)q=n.textContent;else if(n.text)q=n.text;else if(n.firstChild.data)q=n.firstChild.data;topicDescriptorCache[g].seealsoroot=q}nodes=d.responseXML.getElementsByTagName("SeeAlso");for(q=0;q<
nodes.length;q++){n=nodes[q];for(var u=m="",v="",z=0;z<n.attributes.length;z++){var B=n.attributes[z];if(B.nodeName=="Type")m=getTextContent(B);if(B.nodeName=="Title")u=getTextContent(B);if(B.nodeName=="Guid")v=getTextContent(B)}if(m.length>0&&u.length>0)topicDescriptorCache[g].seealsolinks[topicDescriptorCache[g].seealsolinks.length]=new seeAlsoLink(m,u,v)}Refresh(g)}
function getTextContent(d){try{if(d.textContent)return d.textContent;else if(d.text)return d.text;else if(d.firstChild.data)return d.firstChild.data;return""}catch(g){return""}}var lastConcept="",rcTimeout=null,nextConcept="";function EmptyHtmlLoaded(){this.frames.myconceptframeToc.location.replace(urlParser.GetCorrectUrl(nextConcept))}function SetConceptLocation(d){nextConcept=AbsUrl(d);EmptyHtmlLoaded()}
function _RefreshConcept(d){d||(d=false);if(lastConcept!="")if(lastConcept.indexOf(".htm")>0){if(d==true)_playConceptSound=false;SetConceptLocation(lastConcept)}}function RefreshConcept(){try{clearTimeout(rcTimeout)}catch(d){}}function OnUpdatePreferences(){_RefreshConcept(true)}var psInit=null;function PlaySound_Init(){try{this.frames.myconceptframeToc.PlaySound_Init()}catch(d){}}
function ShowConcept(d){if(d==lastConcept)try{if(_playConceptSound==true)psInit=setTimeout("PlaySound_Init()",500);else clearTimeout(psInit)}catch(g){}else{lastConcept=d;SetConceptLocation(d)}}
function Refresh(d){d!=null&&TreeRefreshed(d.substr(0,36));RefreshNavigationButtons();SearchProcess_Show(false);if(_conceptContainerObj==null)_conceptContainerObj=getObjectById("conceptcontainerToc");if(d==null||d=="null"){setTimeout('ShowConcept("./toc/empty.html")',1);conceptVisible=false;if(IsIE7()){d=$("#contentdiv").width();var g=$("#contentdiv").height();$("#conceptcontainerToc").css({width:d+"px",height:g+"px"});$("#myconceptframeToc").css({width:d+"px",height:g+"px"})}}else{desc=topicDescriptorCache[d];
concept=desc.concept;if(desc.type=="Outline"||desc.type=="Section"||desc.type=="Topic"){g="";if(_launchMode.length>0)g="&mode="+_launchMode;if(desc.type=="Topic"&&viewApplicable==true)if(lastExpressionH.length>0)g+="&ctxex="+lastExpressionH;concept="./tpc/"+d+"/lmstart.html?toc"+(_launchFromKPath?"&launchFromKPath":"")+"&lmsChildIndex="+actuallyChildIndex+g}if(desc.type=="Question")concept="./tpc/"+d+"/lmstart.html?toc"+(_launchFromKPath?"&launchFromKPath":"")+"&lmsChildIndex="+actuallyChildIndex;
if(desc.type=="Assessment"){o=this.frames.mytreeframe;ownerid="";if(o!=null)ownerid=o.getOwnerOfSelection().substr(0,36);concept="./tpc/"+d+"/lmstart.html?toc"+(_launchFromKPath?"&launchFromKPath":"")+"&owner="+ownerid+"&lmsChildIndex="+actuallyChildIndex}_lastSelectedItem=actuallySelected;if(concept.length==0)concept=desc.leadin;setTimeout('ShowConcept("'+concept+'")',50);conceptVisible=true;if(IsIE7()){d=$("#contentdiv").width();g=$("#contentdiv").height();$("#conceptcontainerToc").css({width:d+
"px",height:g+"px"});$("#myconceptframeToc").css({width:d+"px",height:g+"px"})}RolesRemoved()}Resize()}function LoadRuntime(d){d=topicDescriptorCache[d];var g=d.concept;if(g.length==0)g=d.leadin;setTimeout('ShowConcept("'+g+'")',50);conceptVisible=true;RolesRemoved();Resize()}function GetBasePath(){base=this.location.href;k=base.indexOf("?");if(k<0)k=base.indexOf("#");if(k>=0)base=base.substr(0,k);k=base.lastIndexOf("/");return b=base.substr(0,k)}
function ClosePlayer(){try{if(playerwindow)playerwindow.closed||playerwindow.close()}catch(d){}}
function PlayFastDoIt(){_playConceptSound=false;try{this.frames.myconceptframeToc.Sound_Stop()}catch(d){}var g="mode=D";if(viewApplicable==true)if(lastExpressionH.length>0)g+="&ctxex="+lastExpressionH;desc=topicDescriptorCache[actuallySelected];if(desc.playmodes.indexOf("P")>=0&&desc.printitname.length>0)g+="&printitname="+desc.printitname;if(bypassToc==true)g+="&fastdoit=true";if(toc_safeUriMode==true)g="su="+Escape.SafeUriEscape(g);b=GetBasePath();LaunchDoIt(b+"/tpc/"+actuallySelected+"/",g)}
function OnQuestionContinue(){(o=this.frames.mytreeframe)&&o.GoToNext()}function ShowNewToc(d){var g=GetBasePath();window.open(g+"/toc.html?sac=sac_"+d,"SacTocWnd")}
var showParameters=false,searchParam=null,hemiParam=null,appParam=null,ctxParam=null,udvParam=null,shParam=null,genericMode=false,genericMode_SearchHemi=false,searchVisible=false,conceptVisible=false,allRoles=[],_rolesRemoved=false,ctxTopicList=[],ctxTopicList2=[],onTocLoaded=false,showButtons=[],_tree_root="",_sco=false,_associated_content=false,_see_also=false,_seealso_selecteditem=0,isTocHtml=true,_selectedItemId=0,_deviceDPI=0,_launchFromKPath=false,_treeIndex=-1;
function IsReducedMode(){return _tree_root.length>0}function NoWrap(d){for(var g="",m=0;m<d.length;m++)g+=d.substr(m,1)==" "?"&nbsp;":d.substr(m,1);return g}function _getObjectById(d,g){for(var m=0;m<d.childNodes.length;m++){cni=d.childNodes[m];if(cni.id==g)return cni;else{obj=_getObjectById(cni,g);if(obj!=null)return obj}}return null}function getObjectById(d){return document.getElementById(d)}
var _ftcobj=null,_myTableObj=null,_header1DivObj=null,_treeContainerObj=null,_conceptContainerObj=null,_searchResultObj=null,_pmTableObj=null,_ctTableObj=null,_searchBoxObj=null,_changeViewObj=null,_sres0Obj=null,_sres1Obj=null,_sres2Obj=null,_resulttextObj=null,_vbordersize=10,_hbordersize=10,_sbordersize=10;function getOffsetLeft(d){var g=0;if(d.parentNode)g=getOffsetLeft(d.parentNode);return(d.offsetLeft?d.offsetLeft:0)+g}
function getOffsetTop(d){var g=0;if(d.parentNode)g=getOffsetTop(d.parentNode);return(d.offsetTop?d.offsetTop:0)+g}function coverToSep(){if(!_cover_dragged){var d=document.getElementById("sepdiv"),g=document.getElementById("cover");g.style.width=d.clientWidth+"px";g.style.height=d.clientHeight+"px";offsetLeft=getOffsetLeft(d);offsetTop=getOffsetTop(d);g.style.top=offsetTop+"px";g.style.left=offsetLeft+"px"}}
function coverToFull(){var d=document.getElementById("cover");d.style.top="0px";d.style.left="0px";d.style.width="100%";d.style.height="100%"}var _cover_dragged=false;function sepD(){_cover_dragged=true;coverToFull();var d=document.getElementById("cover");d.setCapture&&d.setCapture()}
function sepM(d){if(_cover_dragged){if(_ftcobj==null)_ftcobj=getObjectById("ftc");e=d;if(e==null)e=window.event;w=e.clientX-_sbordersize-_sbordersize/2;if(IsIE7())w+=28;if(w>200){_ftcobj.style.width=""+w+"px";$("#contentdiv").css("left",w+10+"px");if(IsIE7()){d=$("#contentdiv").width();$("#conceptcontainerToc").css("width",d+"px");$("#myconceptframeToc").css("width",d+"px")}}else w=200;if(_treeContainerObj==null)_treeContainerObj=getObjectById("treecontainer");w=_treeContainerObj.clientWidth-40;setTimeout("_HResize()",
1)}}function sepU(){_cover_dragged=false;coverToSep();var d=document.getElementById("cover");d.releaseCapture&&d.releaseCapture();document.frames&&document.frames[0].focus();if(_ftcobj==null)_ftcobj=getObjectById("ftc");d=new Cookie(document,"OnDemandToc",365);d.Load();d.Separator=_ftcobj.offsetWidth;d.Store()}function OpenSeeAlso(d,g){this.frames.myconceptframeToc.OpenSeeAlso(d,g)}function launchTopic(d,g,m){this.frames.myconceptframeToc.StartTopic(d,g,m)}
function ShowAbout(){showDialog("data/toc/about.html",-1,-1,300,375,true,_deviceDPI)}function TreeRefreshed(d){_selectedItemId=d}function ConnectionLostEvent(d){this.frames.myconceptframeToc.ConnectionLostEvent(d)}function SearchResult_Show(d){if(_searchResultObj==null)_searchResultObj=getObjectById("searchresult");_searchResultObj.style.display=d?"":"none";searchVisible=viewSearch=d;Resize()}
function SearchProcess_Show(d){if(d){document.getElementById("coversearch").style.width="100%";document.getElementById("coversearch").style.height="100%";sprd=document.getElementById("searchprdiv");sprd.style.display="block";w=Math.round(document.body.clientWidth/2-60);h=Math.round(document.body.clientHeight/2-20);sprd.style.left=document.all?w:""+w+"px";sprd.style.top=document.all?h:""+h+"px"}else{document.getElementById("coversearch").style.width="0px";document.getElementById("coversearch").style.height=
"0px";document.getElementById("searchprdiv").style.display="none"}}function Resize(){setTimeout("_Resize()",1)}function Resize0(){setTimeout("_Resize()",0)}
function _HResize(){if(checkIEDPI()!=false){isOpenDialog&&isOpenDialog()==true&&resizeDialog();coverToSep();if(_sres0Obj==null)_sres0Obj=getObjectById("sres0");if(_sres1Obj==null)_sres1Obj=getObjectById("sres1");if(_sres2Obj==null)_sres2Obj=getObjectById("sres2");if(_resulttextObj==null)_resulttextObj=getObjectById("resulttext");w0=_sres0Obj.clientWidth;w1=_sres1Obj.clientWidth;w2=_sres2Obj.clientWidth;if(w1!=0){w=w0-w1-8;_sres2Obj.style.width=""+w+"px";if(document.all)if(w>=12)_resulttextObj.style.width=
""+(w-12)+"px"}}}
function _Resize(){if(checkIEDPI()!=false){if(document.body.clientHeight<100||document.body.clientWidth<100){_HResize();return false}if(viewApplicable==true||allRoles.length>0&&PlayerConfig.EnableCookies==true)getObjectById("appandroles").className="tocSearchColor modebuttonshow";if(_myTableObj==null)_myTableObj=getObjectById("myTableToc");if(_header1DivObj==null)_header1DivObj=getObjectById("header1table");if(_treeContainerObj==null)_treeContainerObj=getObjectById("treecontainer");if(_conceptContainerObj==
null)_conceptContainerObj=getObjectById("conceptcontainerToc");if(_searchResultObj==null)_searchResultObj=getObjectById("searchresult");if(_changeViewObj==null)_changeViewObj=getObjectById("changeview");if(_pmTableObj==null)_pmTableObj=getObjectById("playmodetable");if(_ctTableObj==null)_ctTableObj=getObjectById("concepttitletable");_HResize();h=document.body.clientHeight-_hbordersize*2-_header1DivObj.clientHeight;if(IsSafari()||IsFF3())h-=2;h-=4;if(h>=0)_myTableObj.style.height=""+h+"px";var d=viewApplicable||
searchVisible;_changeViewObj.className=d?"tocSearchColor modebuttonshow":"tocSearchColor modebuttonhide";hh=0;if(searchVisible)hh=_searchResultObj.clientHeight;if(d)hh+=getObjectById("changeview").clientHeight;try{_approles_correction=46;if(document.all&&(viewApplicable==true||allRoles.length>0))_approles_correction=52;if(_tree_root!="")_approles_correction-=IsFF()||IsSafari()?19:25;_treeContainerObj.style.height=""+(h-_approles_correction-hh)+"px"}catch(g){_treeContainerObj.style.height="0px"}hh=
h;hh+=4;if(hh>=0)_conceptContainerObj.style.height=""+(hh+(IsFF()||IsSafari()?3:1))+"px";RefreshConcept();w=getObjectById("blogo").clientWidth;getObjectById("blogoframe").style.width=""+(w+20)+"px";if(IsIE7()){var m=$("#contentdiv");d=m.height();m=m.width();$("#myconceptframeToc").css({height:d+"px",width:m+"px"})}try{document.frames.myconceptframeToc.ResizeFrame()}catch(q){}}}
function MyEventKeyDown(d){if(!d)d=window.event;code=d.keyCode;if(code==27)try{if(parent.isOpenDialog()){parent.closeDialog();return}}catch(g){}if(code==13&&_inputHasFocus==true){Search_Click();return false}}function FocusToSearchField(){}function applicable_Click(){if(getObjectById("chapp").checked)_goToFlatMode=viewApplicable=true;else viewApplicable=false;Select(0)}function applicable_Clear(){getObjectById("chapp").checked=false;applicable_Click()}
function Search_Click(){if(_inputIsEmpty!=true){try{a=moduleName}catch(d){return}_goToFlatMode=viewSearch=true;FocusToSearchField();SetSelectionViewText(true);Select(1)}}function Search_Clear_Click(){getObjectById("searchbox").value="";OnInputBlur();if(viewSearch!=false){viewSearch=false;FocusToSearchField();Select(0);SearchProcess_Show(false)}}
function SetSelectionViewText(d,g){o=this.frames.mytreeframe;d=o.GetActualFlatView();g||(g=o.IsActualViewEmpty());if(g==true)document.getElementById("selectionviewtext").innerHTML="";else document.getElementById("selectionviewtext").innerHTML=d?R_toc_tree_view_in_outline:R_toc_tree_view_resultlist}function EnableSelectionViewText(d){if(viewApplicable)d=true;s=d?"visible":"hidden";document.getElementById("selectionviewtext").style.visibility=s}
function ChangeView_Click(){if(o=this.frames.mytreeframe){flatMode=o.ChangeTreeView();SetSelectionViewText(flatMode)}}var _inputIsEmpty=true,_inputHasFocus=false;function OnInputFocus(){_inputHasFocus=true;if(_inputIsEmpty==true){var d=getObjectById("searchbox");d.value="";d.className="tocSearch"}_inputIsEmpty=false}
function OnInputBlur(){_inputHasFocus=false;var d=getObjectById("searchbox");if(d.value==""){_inputIsEmpty=true;d.value=R_Toc_search;d.className="tocSearchBarText"}else{_inputIsEmpty=false;d.className="tocSearch"}}
function SearchFontSize(d){for(var g=1;g<document.styleSheets.length;g++){var m=document.styleSheets[g];if(m.rules)for(var q=0;q<m.rules.length;q++){var u=m.rules[q];if(u.selectorText==d)return u.style.fontSize}else if(m.cssRules)for(q=0;q<m.cssRules.length;q++){u=m.cssRules[q];if(u.selectorText==d)return u.style.fontSize}}return""}
function getAbsoluteXPosInToc(d){b=getObjectById("tvertical1");_vbordersize=b.clientWidth;b=getObjectById("tsep1");_sbordersize=b.clientWidth;ftcwidth=Number(String(_ftcobj.style.width).substring(0,String(_ftcobj.style.width).length-2));return ftcwidth+d+_vbordersize+_sbordersize}function getAbsoluteYPosInToc(d){b=getObjectById("thorizontal1");_hbordersize=b.clientHeight;return _header1DivObj.clientHeight+_hbordersize+d}function Toc_onCloseDialog(){$("#searchbox").focus();$("#searchbox").blur()}
function Init(){if(_deviceDPI==0)_deviceDPI=getDpiInfo();if(_deviceDPI==0)setTimeout("Init()",100);else{if(_deviceDPI!=96)if(getDPICookie()==false){this.location.replace("./../js/unsuppdpi.html?"+Escape.MyEscape(AbsUrl(this.location.href)));return}setOnCloseEvent("Toc_onCloseDialog()");ParseArguments();_see_also==false&&_associated_content==false&&InitLmsMode("toc");var d=0;if(_lmsMode!=null)d=-1;if(_see_also==true||_associated_content==true)d=-1;try{if(soundIsExported==undefined)soundIsExported=
false;if(soundIsExported==null)soundIsExported=false}catch(g){soundIsExported=false}if(_lmsMode!=null)if(urlParser.GetParameter("nosound")==null)if(Sound_Init(soundIsExported,UserPrefs.PlayAudio,null,false,"../")==false)return;if(lms_initialized==false)lms_InitPage(d,_lmsMode==null?window.opener:null,null,"Init()");else{urlParser.GetParameter("nosound")!=null&&SetNoSound(true);this.frames.mytreeframe.location.replace("./toc/outline-tree.html")}}}
function Init_treeloaded(){var d=getObjectById("header1table");h3img=getObjectById("bannerimg");w=h3img.clientWidth;h3img.style.height=""+d.clientHeight+"px";h3img.style.width=""+w+"px";b=getObjectById("thorizontal1");_hbordersize=b.clientHeight;b=getObjectById("tvertical1");_vbordersize=b.clientWidth;b=getObjectById("tsep1");_sbordersize=b.clientWidth;d=document.getElementById("searchbox");var g=parseInt(SearchFontSize(".tocSearch")),m=parseInt(d.style.height);g=Math.floor((m-g)/2);d.style.height=
""+(m-g)+"px";d.style.paddingTop=""+g+"px";try{if(_sco==false)document.title=(UIComponents.TitlePrefix==true?R_toc_title+" - ":"")+UnescapeQuotes(moduleName)}catch(q){_Resize();window.onresize=Resize0;document.getElementById("cover").onmousemove=sepM;document.getElementById("searchbox").disabled=true;document.getElementById("contentisemptydiv").innerHTML=R_toc_content_empty;document.getElementById("treecontainer").style.verticalAlign="top";document.getElementById("mytreeframe").style.display="none";
document.getElementById("contentisemptydiv").style.display="block";return}if(_resulttextObj==null)_resulttextObj=getObjectById("resulttext");if(document.all)_resulttextObj.style.width="100px";PlayerConfig.EnableCookies==true&&UserPrefs.EnablePreferences==true&&getObjectById("prefsbutton");LoadXMLDocArray("roles.xml","Roles_Returned","Roles_Error","Role",false)}function RolesRemoved(){_rolesRemoved==true&&alert(R_roles_all_removed);_rolesRemoved=false}
function Roles_Returned(d){if(UIComponents.Help===false){d={};d.length=0}for(var g=0;g<d.length;g++)allRoles[g]=d[g];d=getObjectById("hasrole");if(allRoles.length>0&&PlayerConfig.EnableCookies==true){d.style.display="inline";s0=getObjectById("sres0");s0.style.height="30px"}if(UIComponents.Help===false)setTimeout("Init1()",50);else{UserRoles.LoadCookie();d=GetTopLevelLmsMode();if(d!="Cookie"&&d!="KPT")UserRoles.Filtering=false;if(UserRoles.Filtering==true&&allRoles.length==0){UserRoles.Filtering=false;
UserRoles.StoreCookie();_rolesRemoved=true}d=getObjectById("chroles");d.checked=UserRoles.Filtering;UserRoles.Filtering==true?InitRoles(GetRolesQueryString()):setTimeout("Init1()",50)}}function Roles_Error(){setTimeout("Init1()",50)}function Init0(d){o=window.frames.mytreeframe;o.SetTopicList("ROLES",d,"parent.Init1")}function GetAllRoles(){return allRoles}function onRoles(){showDialog(GetBasePath()+"/../preferences/roles.html",-1,-1,320,290,true,_deviceDPI)}
function roles_Click(){var d=getObjectById("chroles");if(d.checked==true&&UserRoles.Roles.length==0){d.checked=false;onRoles()}else{UserRoles.Filtering=d.checked;UserRoles.StoreCookie();setRoleFiltering()}}function onUpdateRoles(){setRoleFiltering()}
function GetRolesQueryString(){if(!UserRoles.Filtering)return"NOROLES";l=UserRoles.Roles.length;if(l==0)return"NOROLES";s="r";for(var d=0;d<l;d++){rolestr=UserRoles.Roles[d];rolestr=Escape.MyUnEscape(rolestr);rolestr=rolestr.toLowerCase();rolestr=Escape.MyEscape(rolestr);s+="'"+rolestr+"'";if(d!=l-1)s+="-"}return s}function setRoleFiltering(){SetSelectionViewText(true);var d=getObjectById("chroles");UserRoles.LoadCookie();d.checked=UserRoles.Filtering;s=GetRolesQueryString();SetRoles(s)}
function Init1(){if(IsSafari())document.onkeydown=MyEventKeyDown;else document.onkeypress=MyEventKeyDown;FocusToSearchField();if(hemiParam!=null||genericMode==true){d=getObjectById("hasapp");d.style.display="inline";s0=getObjectById("sres0");s0.style.height="30px";if(!document.all)d.style.paddingLeft="7px"}else if(allRoles.length>0&&PlayerConfig.EnableCookies==true)if(!document.all){d=getObjectById("hasrole");d.style.paddingLeft="7px"}if(hemiParam==null&&genericMode==false||allRoles.length==0)document.getElementById("searchbox").style.marginTop=
IsFF3()?"-1px":"0px";if(_ftcobj==null)_ftcobj=getObjectById("ftc");d=new Cookie(document,"OnDemandToc",365);d.Load();if(d.Separator){_ftcobj.style.width=""+d.Separator+"px";$("#contentdiv").css("left",Number(d.Separator)+10+"px")}$("#contentdiv").css("top",Number($("#header1").height())+5+"px");_Resize();window.onresize=Resize0;document.getElementById("cover").onmousemove=sepM;var d=getObjectById("searchbox");d.value="";OnInputBlur();if(showNavigationButtons!=true){document.getElementById("navigation1").style.display=
"none";document.getElementById("navigation2").style.display="none";document.getElementById("nav_and_search_separator").style.display="none"}if(_tree_root!=""){document.getElementById("appandroles").style.display="none";document.getElementById("searchcontainer1").style.display="none";document.getElementById("searchcontainer2").style.display="none";document.getElementById("searchcontainer3").style.display="none";if(_associated_content==true){document.getElementById("specialcontentdiv").style.display=
"block";document.getElementById("specialcontenttext").innerHTML=R_toc_associated_content;s0=getObjectById("sres0");s0.style.height="30px"}if(_see_also==true){document.getElementById("specialcontentdiv").style.display="block";document.getElementById("specialcontenttext").innerHTML=R_toc_see_also;s0=getObjectById("sres0");s0.style.height="30px"}if(_sco==true){document.getElementById("specialcontentdiv").style.display="block";document.getElementById("specialcontenttext").innerHTML="";document.getElementById("nav_and_search_separator").style.display=
"none";s0=getObjectById("sres0");s0.style.height="30px"}if(IsFF()||IsSafari())document.getElementById("specialcontentdiv").style.paddingTop="5px"}document.getElementById("sres0").style.visibility="visible";if(genericMode==true){OnInputBlur();d=getObjectById("chapp");d.disabled=false;viewApplicable=d.checked=true;Select(5)}else if(searchParam!=null&&hemiParam!=null){d=getObjectById("searchbox");d.value=searchParam;OnInputBlur();d=getObjectById("chapp");d.disabled=false;viewApplicable=d.checked=true;
Select(3)}else if(searchParam!=null){d=getObjectById("searchbox");d.value=searchParam;OnInputBlur();Select(1)}else if(hemiParam!=null){d=getObjectById("chapp");d.disabled=false;viewApplicable=d.checked=true;Select(2)}else Select(0)}function UnescapeHemiParam(d){return replaceString("%27","'",d)}
function ParseArguments(){if(showParameters==true){var d=document.location.hash.substring(1),g=d.split("&");if(g.length==0||g[0]=="")d=document.location.search.substring(1);alert(d)}urlParser=new UrlParser;urlParser.Parse();toc_safeUriMode=urlParser.GetSafeMode();d=null;if(searchParam=urlParser.GetParameter("search"))_goToFlatMode=true;if(hemiParam=urlParser.GetParameter("ctxex")){hemiParam=UnescapeHemiParam(hemiParam);_goToFlatMode=true;appParam=urlParser.GetParameter("app");ctxParam=urlParser.GetParameter("ctx");
udvParam=urlParser.GetParameter("udv");shParam=urlParser.GetParameter("sh")}if(urlParser.GetParameter("genctx")!=null)_goToFlatMode=genericMode=true;if(d=urlParser.GetParameter("sac")||""){_tree_root=d;_associated_content=true}if(d=urlParser.GetParameter("sco")||""){_tree_root=d;_sco=true;d=GetBigScoReference(_tree_root);if(d!=null){_tree_root=d.reference;document.title=(UIComponents.TitlePrefix==true?R_toc_title+" - ":"")+UnescapeQuotes(d.title)}}if(d=urlParser.GetParameter("seealso")||""){_tree_root=
d;_see_also=true}if(d=urlParser.GetParameter("selectitem"))_seealso_selecteditem=parseInt(d,10);if(urlParser.GetParameter("launchfromkpath")!=null)_launchFromKPath=true;if(genericMode==true)searchParam=null;if(d=urlParser.GetParameter("treeindex")||"")_treeIndex=d}function BigScoReference(){this.title=this.reference=""}
function GetBigScoReference(d){d="./toc/"+d+".xml";var g=null;try{if(window.location.href.substr(0,7).toLowerCase()=="http://"||window.location.href.substr(0,8).toLowerCase()=="https://")g=new XMLHttpRequest;if(window.location.href.substr(0,7).toLowerCase()=="file://"&&IsTouchDevice())g=new XMLHttpRequest}catch(m){}finally{if(g==null)g=new ActiveXObject("Microsoft.XMLHTTP")}g.open("GET",d,false);try{g.send()}catch(q){return null}if(location.hostname==""&&g.status==0)if(g.responseXML.documentElement==
null){d=new ActiveXObject("Microsoft.XMLDOM");d.async=false;d.loadXML(g.responseText);g={};g.responseXML=d}for(var u=0;u<g.responseXML.childNodes.length;u++){d=g.responseXML.childNodes[u];if(d.nodeName=="reference"){g=new BigScoReference;for(u=0;u<d.attributes.length;u++){var v=d.attributes[u];if(v.nodeName=="link")g.reference=v.nodeValue;if(v.nodeName=="title")g.title=v.nodeValue}return g}}return null}function IndexObject(d,g){this.index=d;this.score=g}
function SortFunction(d,g){return k=g.score-d.score}function ShowGenToc(d){ctxTopicList=[];ctxTopicList2=[];for(var g=0;g<d.length;g++)ctxTopicList[ctxTopicList.length]=new IndexObject(d[g].index,d[g].score);ctxTopicList.sort(SortFunction);if(hemiParam==null)ShowGenToc2(null);else{genericMode_SearchHemi=true;Select(2)}}
function ShowGenToc2(d){genericMode_SearchHemi=false;if(d!=null){for(var g=0;g<d.length;g++){for(var m=d[g].index,q=false,u=0;u<ctxTopicList.length;u++){var v=ctxTopicList[u].index;if(m==v){q=true;break}}if(q==false)for(u=0;u<ctxTopicList2.length;u++){v=ctxTopicList2[u].index;if(m==v){q=true;break}}if(q==false)ctxTopicList2[ctxTopicList2.length]=new IndexObject(m,1)}if(ctxTopicList2.length>0){for(g=0;g<ctxTopicList.length;g++)ctxTopicList2[ctxTopicList2.length]=ctxTopicList[g];ctxTopicList=ctxTopicList2}}result_Search(ctxTopicList)}
function IsEmptyArgument(d,g){if(d.length<=g)return true;if(d.length>g+2)return false;ss=d.substr(g);if(ss=='""'||ss=="''")return true;return false}var _closing=false;
function Closing(){lms_ClosePage();_closing=true;ClosePlayer();var d=new Cookie(document,"OnDemandToc",365);d.Load();try{if(window.screenLeft!=null){d.TocLeft=window.screenLeft-4;d.TocTop=window.screenTop-30;d.TocWidth=document.body.clientWidth;d.TocHeight=document.body.clientHeight}else{d.TocLeft=window.screenX;d.TocTop=window.screenY;d.TocWidth=window.innerWidth;d.TocHeight=window.innerHeight}d.Store()}catch(g){}}
function buttonDetection(d,g){g||(g=false);var m=d.className;if(m.indexOf("previoustraversalarrow_")>-1)return g==true?"prev":"previoustraversalarrow_";if(m.indexOf("nexttraversalarrow_")>-1)return g==true?"next":"nexttraversalarrow_";return""}function buttonStatus(d){d=d.className;var g=d.indexOf("arrow_");return d.substr(g+6,3)}function buttonOver(d){var g=buttonDetection(d);if(buttonStatus(d)!="dis")if(g.length>0)d.className=g+"ovr"}
function buttonOut(d){var g=buttonDetection(d);if(buttonStatus(d)!="dis")if(g.length>0)d.className=g+"ena"}function buttonEnable(d){var g=buttonDetection(d);if(g.length>0)d.className=g+"ena"}function buttonDisable(d){var g=buttonDetection(d);if(g.length>0)d.className=g+"dis"}function buttonClick(d){if(buttonStatus(d)!="dis")buttonDetection(d,true)=="prev"?this.frames.mytreeframe.Navigation_Up():this.frames.mytreeframe.Navigation_Down()}
function RefreshNavigationButtons(){this.frames.mytreeframe.isFirstItem()?buttonDisable(document.getElementById("prevButton")):buttonEnable(document.getElementById("prevButton"));this.frames.mytreeframe.isLastItem()?buttonDisable(document.getElementById("nextButton")):buttonEnable(document.getElementById("nextButton"))}function NotSupportedYet(){alert("Coming soon ...")};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 g="",m=0;m<d.length;m++){var q="\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(m));g+=q!=-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(q):
d.charCodeAt(m)>=65281&&d.charCodeAt(m)<=65375?String.fromCharCode(d.charCodeAt(m)-65248):d.charAt(m)}return g}
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,g){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 m,q;if("URI"==d){m=/\(|\)|\+|-|[u,e,k,r,g]|!|\d|'[^']+'/g;q=["(",")","+","-","u","e","t","r","g","!","0","1","2","3","4","5","6","7","8","9"]}else{m=
RegExp("\\(|\\)|"+q_search_and+"|"+q_search_or+'|"[^"]+"|[^ \\(\\)]+(?=\\(|\\)|\\s|$)',"gi");q=["(",")",q_search_and,q_search_or]}var u=[1,2,3,3,5,5,5,5,5,4,4,4,4,4,4,4,4,4,4,4],v=[0,0,"&","|",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];if(d!="URI"){g=ToHalfWidth(g);g=g.toLowerCase()}this.pr=this.ev=null;this.PS=[];this.PS.push({st:1,se:0});for(var z,B,F=0,M="t";(z=m.exec(g))!=null;){z=z[0];var K=0;for(B in q)if(z==q[B]){K=u[B];if(v[B])z=v[B];break}if(K==5)M=z;else{if(K==3)F=0;if((K==0||K==1)&&F){if(this.SM(3,
"&"))return;F=0}if(K==0){if(z.charAt(0)=='"'||z.charAt(0)=="'")z=z.slice(1,z.length-1);if("URI"!=d){if(z.length>1){F=z[z.length-1];if(F=="%"||F=="*")z=z.slice(0,-1)}z=Escape.MyEscape(z.toLowerCase())}z=M+z;F=1}if(this.SM(K,z))return}}if(!this.SM(5,"$")){this.ev=this.PS[1].se.ev;this.pr=this.PS[1].se.pr}},SM:function(d,g){for(;;){var m=this.PT[this.PS[this.PS.length-1].st][d];if(m==10)return false;if(m==0)return true;if(m>0){this.PS.push({st:m,se:g});return false}if(m<0){var q,u=this.PS.length,v=this.PS[u-
1],z=this.PS[u-2];u=this.PS[u-3];switch(-m){case 1:q={ev:"{a:'s', d:'"+v.se.charAt(0)+"', p:'"+v.se.slice(1)+"'}",pr:v.se.slice(1)};break;case 2:if(v.se=="!")q={ev:"{a:'s', d:'"+z.se.charAt(0)+"', p:'"+z.se.slice(1)+"', m:'"+v.se+"'}"};else{q=z.se.slice(1,parseInt(v.se)+1)+"$002A";q={ev:"{a:'s', d:'"+z.se.charAt(0)+"', p:'"+z.se.slice(1)+"'}, {a:'s', d:'"+z.se.charAt(0)+"', p:'"+q+"'}, {a:'o', p:'|'}"}}q.pr=z.se.slice(1);break;case 3:q={ev:u.se.ev+", "+v.se.ev+", {a:'o', p:'"+z.se+"'}",pr:u.se.pr+
(z.se=="|"?" or ":" ")+v.se.pr};break;case 4:q={ev:z.se.ev,pr:"("+z.se.pr+")"};m=-3}if(m==-1||m==-2){q.pr=decodeURIComponent(q.pr);if(q.pr.search(/\s/)!=-1)q.pr='"'+q.pr+'"'}this.PS.length+=m;this.PS.push({st:this.PT[this.PS[this.PS.length-1].st][6],se:q})}}},o:function(d,g,m){debug.insertAdjacentHTML("beforeEnd","<div>"+d+", "+g+", "+m+"</div>");return g+d+m},e:function(d,g,m){m||(m="");g=decodeURIComponent(g);debug.insertAdjacentHTML("beforeEnd","<div>"+d+", "+g+", "+m+"</div>");return d+"="+g+
m}},QueryProcessor={rr:null,Start:function(d,g){this.rr=g;eval("this.qa = ["+d+"]");this.qp=0;this.Eval()},Eval:function(){var d=this.qa[this.qp];if(d.a=="s"){var g=d.d=="t"?false:true;if(d.m=="!")g=!g;SearchDBs[d.d].Search(decodeURIComponent(d.p),g)}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 g,m;m=0;for(g=32;g&32;){g=ReadBase64_6(d.s.charCodeAt(d.p));m<<=5;m|=g&31;d.p++}return m}function ReadBase64_ITP(d,g){for(var m=[],q,u,v=0;d.p<d.s.length;){u=ReadBase64_32(d);for(q=1==u?ReadBase64_32(d):1;q;){v+=u;m.push(new g(v));q--}}return m}
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 g="",m=0;m<d.length;m++){var q={s:d[m],p:0},u,v="";u=ReadBase64_32(q);var z;z=m==d.length-1?this.index[this.index_insert_position]:{};z.node=u>0?q.s.slice(q.p,q.p+u):0;q.p+=u;u=ReadBase64_32(q);v+=g.slice(0,u);u=ReadBase64_32(q);v+=q.s.slice(q.p,q.p+u);q.p+=u;if(v.length>0)z.key=v;for(g=v;q.p<q.s.length;){z.values=[];u=ReadBase64_32(q);z.values.push(q.s.slice(q.p,q.p+u));q.p+=u}if(m<d.length-1){this.index.splice(this.index_insert_position,0,z);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,g){this.RequestCount=0;this.search=d;this.exact_match=g;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,g;for(g in d){this.results.Or(new SearchResultSet(d[g]));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,g,m){var q,u;for(u=q=0;q<d.rs.length;q++){for(;u<this.rs.length&&this.rs[u].index<d.rs[q].index;)u++;if(u==this.rs.length||this.rs[u].index!=d.rs[q].index)this.rs.splice(u,0,d.rs[q]);else{var v=this.rs[u].weight,z=d.rs[q].weight;this.rs[u].weight=g?Math.max(v,z):v+z*m}}};
SearchResultSet.prototype.And=function(d){var g,m;for(m=g=0;g<d.rs.length&&m<this.rs.length;g++){for(;m<this.rs.length&&this.rs[m].index<d.rs[g].index;)this.rs.splice(m,1);if(m<this.rs.length&&d.rs[g].index==this.rs[m].index){this.rs[m].weight=Math.min(this.rs[m].weight,d.rs[g].weight);m++}}this.rs.splice(m,this.rs.length-m)};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 g=0;g<d.length;g++){var m=d[g].split("=");if(m[0].toUpperCase()=="PP_SOUND")this.PlayAudio=m[1];else if(m[0].toUpperCase()=="PP_LEADIN")this.ShowLeadIn=m[1];else if(m[0].toUpperCase()=="PP_MARQUEE")this.MarqueeColor=m[1];else if(m[0].toUpperCase()=="PP_SKIP")this.TryIt.EnableSkipping=m[1]=="true";else if(m[0].toUpperCase()=="PP_ENABLE")this.EnablePreferences=m[1]=="true";else if(m[0].toUpperCase()=="PP_HOTKEY"){this.DoIt.HotKey.Ctrl=
m[1].charAt(0);this.DoIt.HotKey.Shift=m[1].charAt(1);this.DoIt.HotKey.Alt=m[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,g,m){if(UserPrefs.EnablePreferences){d+="/preferences/preferences.html";h=412;var q=[];try{if(lms_IsUserProfileAvailable()){var u=lms_GetUserProfileUrl();if(u!="")q[q.length]="UserProfileUrl="+Escape.MyEscape(u)}}catch(v){}if(g)q[q.length]="nosound";if(m){q[q.length]="seeitonly";h=412}for(g=0;g<q.length;g++){d+=g==0?"?":"&";d+=q[g]}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 g=0;g<d.Roles.length;g++)this.Roles[g]=d.Roles[g]};
UserRolesClass.prototype.Compare=function(d){if(this.Filtering!=d.Filtering)return true;if(this.Roles.length!=d.Roles.length)return true;for(var g=0;g<this.Roles.length;g++)if(this.Roles[g]!=d.Roles[g])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 g=0;g<d.length;g++){var m=d[g].split("=");if(m[0].toUpperCase()=="PP_ROLEFILTERING")this.Filtering=m[1]=="true";else if(m[0].toUpperCase()=="PP_ROLES"){this.Roles=[];if(m[1])this.Roles=m[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 treeControlDB=false,bigsco=false;function ModeDesc(d){this.treeCreated=false;this.lastSelected=null;this.filteredGuids=[];this.filteredGuidList=[];this.filteredTopicCount=0;this.guidsForFlat=[];this.lastSelectedFlat=null;this.flatMode=false;this.modeLetter=d;this.flatControl=this.treeControl=null}var modeDescA=new ModeDesc("A"),modeDescF=new ModeDesc("F"),modeDescH=new ModeDesc("H"),modeDescFH=new ModeDesc("X"),treeViewMode="ALL",treeIsEmpty,_rootData="";
function GetJunctionId(d){k=d.indexOf("_");kk=d.indexOf("_",k+1);return ss=d.substr(0,kk)}var filteredGuidsR=[],filteredTopicCountR=0,rolefilter_enabled=false,selection_need=0,stl_mode="ALL",stl_callback="",stl_myTopicArray=[],stl_myscoresArray=[],stl_i=0,stl_topicMapId=-1,stl_newtMap=false,stl_topicMapPageLen=-1,global_topicMap=[],seeAlsoSelection=0,_lastChangeIsFilterOnly=false;
function SetTopicList(d,g,m){stl_mode=d;stl_callback=m;_lastChangeIsFilterOnly=false;if(d=="FILTERED"){modeDescF.filteredGuids=[];modeDescF.filteredGuidList=[];modeDescF.filteredTopicCount=g.length;modeDescF.guidsForFlat=[];modeDescF.flatMode=true}else if(d=="HEMI"){modeDescH.filteredGuids=[];modeDescH.filteredGuidList=[];modeDescH.filteredTopicCount=g.length;modeDescH.guidsForFlat=[];modeDescH.flatMode=true}else if(d=="ROLES"){filteredGuidsR=[];filteredTopicCountR=g.length;_lastChangeIsFilterOnly=
rolefilter_enabled=true}else{rolefilter_enabled=false;_lastChangeIsFilterOnly=true;eval(stl_callback+"()");return}stl_myTopicArray=[];stl_myTopicArray=g;stl_myscoresArray=[];if(g.length>0)try{if(g[0].index){stl_myTopicArray=[];for(d=0;d<g.length;d++){stl_myTopicArray[stl_myTopicArray.length]=g[d].index;stl_myscoresArray[g[d].index]=g[d].score}}}catch(q){}stl_i=0;stl_topicMapPageLen==-1?SetTopicList_LoadPageLen():SetTopicList_Next()}
function SetTopicList_LoadPageLen(){LoadXMLDocArray("../querydb/topicmap/0.xml","SetTopicList_LoadPageLen_Return","","T")}function SetTopicList_LoadPageLen_Return(d){stl_topicMapPageLen=parseInt(d[0]);SetTopicList_Next()}
function SetTopicList_Next(){fTC=modeDescF.filteredTopicCount;if(stl_mode=="HEMI")fTC=modeDescH.filteredTopicCount;if(stl_mode=="ROLES")fTC=filteredTopicCountR;if(stl_i<fTC){j=stl_myTopicArray[stl_i];a=Math.floor((j-1)/stl_topicMapPageLen);if(global_topicMap[""+a]){stl_topicMapId=a;stl_newtMap=false;setTimeout("SetTopicList_Next2()",1)}else{stl_topicMapId=a;stl_newtMap=true;LoadXMLDocArray("../querydb/topicmap/"+a+".xml","SetTopicList_Next2","","T")}}else eval(stl_callback+"()")}
function DecodeTMapArray(d){for(var g=[],m="",q=0;q<d.length;q++)if(q==0)g[g.length]=d[q];else{var u={s:d[q],p:0};l=ReadBase64_32(u);m=str=m.substr(0,l)+u.s.substr(u.p,u.s.length);g[g.length]=str}return g}function ItemDesc(d,g,m){this.type=d;this.title=g;this.empty=m;this.found=false;this.parentguid=null;this.openable=[];this.treeitemdiv=null}
function AddItemdesc(d,g,m,q,u,v,z,B,F){l=false;try{l=g[m].title.length>0}catch(M){}if(!l){g[m]=new ItemDesc(q,u,v);if(d)d.filteredGuidList[d.filteredGuidList.length]=m;AddToIndexMap(m)}g[m].parentguid=F;if(z==true)g[m].found=true;if(B.length>0)g[m].openable[g[m].openable.length]=B}
function AddTreeItemToItemDesc(d,g){md=getModeDesc();try{if(treeViewMode=="FILTEREDHEMI"){if(!md.filteredGuids)md.filteredGuids=[];if(!md.filteredGuids[d]){md.filteredGuids[d]=new ItemDesc("","",false);md.filteredGuidList[md.filteredGuidList.length]=d}AddToIndexMap(d)}md.filteredGuids[d].treeitemdiv=g}catch(m){}saveModeDesc(md)}function GetTreeItemOfItemDesc(d){md=getModeDesc();var g=null;try{g=md.filteredGuids[d].treeitemdiv}catch(m){}return g}
function FlatItemDesc(d,g,m,q,u,v){this.type=d;this.title=g;this.empty=m;this.guid=q;this.isroot=u;v||(v=0);this.score=v}function AddFlatItemdesc(d,g,m,q,u,v,z){for(var B=0;B<d.length;B++){if(d[B].guid==g)return;if(d[B].guid.substr(0,36)==g.substr(0,36))return}d[d.length]=new FlatItemDesc(m,q,u,g,v,z)}var foundApplicableList=[],foundApplicableTable=[];
function SetTopicList_Next2(d){if(stl_newtMap)global_topicMap[""+stl_topicMapId]=DecodeTMapArray(d);j=stl_myTopicArray[stl_i];a=Math.floor((j-1)/stl_topicMapPageLen);s=global_topicMap[""+stl_topicMapId][j-a*stl_topicMapPageLen];k=s.indexOf("#");_tguid=s1=s.substr(0,k);kk=s1.lastIndexOf("/");if(kk>0)_tguid=s1.substr(kk+1);d=kk<0;var g=s.substr(k+1,1)=="C",m=s.substr(k+2,1)=="E",q={s:s.substr(k+3),p:0};l=ReadBase64_32(q);s2=q.s.substr(q.p+l);title=q.s.substr(q.p,l);type=s2;k=s2.indexOf("#");if(k>=0){type=
s2.substr(0,k);s2=s4=s2.substr(k)}else s2="";s=s1+s2;k=s.indexOf("/");q=null;if(type=="Topic"||g==true){for(;k>=0;){ss=""+s.substr(0,k);if(parent.TocFirstCall){g=_tguid.substr(0,36);if(foundApplicableTable[g]!=true){foundApplicableTable[g]=true;foundApplicableList.push(g)}}if(stl_mode=="FILTERED"){AddItemdesc(modeDescF,modeDescF.filteredGuids,ss,type,title,m,false,_tguid,q);AddItemdesc(modeDescF,modeDescF.filteredGuids,ss.substr(0,36),type,title,m,false,_tguid,q)}else if(stl_mode=="HEMI"){AddItemdesc(modeDescH,
modeDescH.filteredGuids,ss,type,title,m,false,_tguid,q);AddItemdesc(modeDescH,modeDescH.filteredGuids,ss.substr(0,36),type,title,m,false,_tguid,q)}else{AddItemdesc(null,filteredGuidsR,ss,type,title,m,false,_tguid,null);AddItemdesc(null,filteredGuidsR,ss.substr(0,36),type,title,m,false,_tguid,null)}q=ss;s=ss=s.substr(k+1);k=s.indexOf("/")}if(s.length>0){ss=s;k=s.indexOf("#");if(k>0)ss=s.substr(0,k);if(stl_mode=="FILTERED"){AddItemdesc(modeDescF,modeDescF.filteredGuids,ss,type,title,m,true,"",q);AddFlatItemdesc(modeDescF.guidsForFlat,
ss,type,title,m,d)}else if(stl_mode=="HEMI"){AddItemdesc(modeDescH,modeDescH.filteredGuids,ss,type,title,m,true,"",q);_score=stl_myscoresArray[stl_myTopicArray[stl_i]];AddFlatItemdesc(modeDescH.guidsForFlat,ss,type,title,m,d,_score)}else{AddItemdesc(null,filteredGuidsR,ss,type,title,m,true,"",null);AddItemdesc(null,filteredGuidsR,ss.substr(0,36),type,title,m,true,"",null)}}}stl_i++;SetTopicList_Next()}
function TreeViewModeLetter(){if(treeViewMode=="FILTEREDHEMI")return"X";return treeViewMode.substr(0,1)}
function IsFiltered(d,g){l=0;try{l=filteredGuidsR[d].title.length}catch(m){}roles=0;if(rolefilter_enabled)roles=l>0?1:2;if(g=="ALL")if(roles==0){treeIsEmpty=false;return true}else if(roles==1){l=false;try{l=filteredGuidsR[d].openable.length>0||filteredGuidsR[d].found}catch(q){}if(l==true)treeIsEmpty=false;return l}else return false;else if(g=="FILTERED"){l=0;try{l=modeDescF.filteredGuids[d].title.length}catch(u){}if(l==0)return false;if(roles==0){treeIsEmpty=false;return true}else if(roles==1){l=
false;try{l=Cut(modeDescF.filteredGuids[d].openable,filteredGuidsR[d].openable)||modeDescF.filteredGuids[d].found&&filteredGuidsR[d].found}catch(v){}if(l==true)treeIsEmpty=false;return l}else return false}else if(g=="HEMI"){l=0;try{l=modeDescH.filteredGuids[d].title.length}catch(z){}if(l==0)return false;if(roles==0){treeIsEmpty=false;return true}else if(roles==1){l=false;try{l=Cut(modeDescH.filteredGuids[d].openable,filteredGuidsR[d].openable)||modeDescH.filteredGuids[d].found&&filteredGuidsR[d].found}catch(B){}if(l==
true)treeIsEmpty=false;return l}else return false}else if(roles==0){l=false;try{l=Cut(modeDescF.filteredGuids[d].openable,modeDescH.filteredGuids[d].openable)||modeDescF.filteredGuids[d].found&&modeDescH.filteredGuids[d].found}catch(F){}if(l)treeIsEmpty=false;return l}else if(roles==1){l=false;try{l=Cut3(modeDescF.filteredGuids[d].openable,modeDescH.filteredGuids[d].openable,filteredGuidsR[d].openable)||modeDescF.filteredGuids[d].found&&modeDescH.filteredGuids[d].found&&filteredGuidsR[d].found}catch(M){}if(l)treeIsEmpty=
false;return l}else return false}function Cut(d,g){if(g==null)return d.length>0;for(var m=0;m<d.length;m++)for(var q=0;q<g.length;q++)if(d[m]==g[q])return true;return false}function Cut3(d,g,m){if(m==null)return Cut(d,g);for(var q=0;q<d.length;q++)for(var u=0;u<g.length;u++)for(var v=0;v<m.length;v++)if(d[q]==g[u]&&g[u]==m[v])return true;return false}
function IsOpenable(d){var g=null;if(rolefilter_enabled==true)g=filteredGuidsR[d].openable;if(treeViewMode=="ALL"){if(rolefilter_enabled){l=false;try{l=g.length>0}catch(m){}return l}return true}else{if(treeViewMode=="FILTERED"){l=true;try{l=Cut(modeDescF.filteredGuids[d].openable,g)}catch(q){}}else if(treeViewMode=="HEMI"){l=true;try{l=Cut(modeDescH.filteredGuids[d].openable,g)}catch(u){}}else l=Cut3(modeDescF.filteredGuids[d].openable,modeDescH.filteredGuids[d].openable,g);return l}}
function IsAutoExpand(){return treeViewMode=="ALL"?false:treeViewMode=="FILTERED"?modeDescF.filteredTopicCount<TreeConfig.AutoExpandLimit:treeViewMode=="FILTEREDHEMI"?modeDescF.filteredTopicCount<TreeConfig.AutoExpandLimit:modeDescH.filteredTopicCount<TreeConfig.AutoExpandLimit}var treeLoadQueue=[],treeLoadQueueDivs=[],treeLoadQueuePtr=0;function Queue_Init(){treeLoadQueue=[];treeLoadQueueDivs=[];treeLoadQueuePtr=0}
function Queue_Add(d,g){treeLoadQueue[treeLoadQueue.length]=d;treeLoadQueueDivs[treeLoadQueueDivs.length]=g}
function Queue_Next(d){if(treeLoadQueuePtr<treeLoadQueue.length){d.LoadScript(treeLoadQueue[treeLoadQueuePtr],treeLoadQueueDivs[treeLoadQueuePtr]);treeLoadQueuePtr++}else if(_childItem_found){_childItem_found=false;createTreeControl(null,false,null)}else{if(selection_need>0){var g=false;if(_lastSelectedGlobal.length>0)if(rolefilter_enabled==true){l=0;try{l=filteredGuidsR[_lastSelectedGlobal].title.length}catch(m){}if(l>0)g=true}else g=true;if(g==true){selection_need=0;if(ChangeTreeView_CallBack()==
true)return}d.SelectFirstItem()}parent.TreeFinished&&parent.TreeFinished(treeViewMode,treeIsEmpty)}}
function SelectionCallBack(d){md=getModeDesc();switch(treeViewMode){case "ALL":if(_lastSelectedItem!=null)if(_lastSelectedItem.startAction==true)_lastSelectedItem.startAction=false;else{_lastSelectedItem.startAction=true;ChangeTreeView_CallBack();return}d=d==null?md.lastSelected:d;break;default:if(md.flatMode==true){SetFlatSelection();return}d=md.flatMode==true?md.lastSelectedFlat:d==null?md.lastSelected:d}if(d==null)parent.TreeItemSelected&&parent.TreeItemSelected(null,null);else{var g=d.getAttribute("tpc");
if(g==null)g=d.parentNode.getAttribute("tpc");if(g==null)g=d.parentNode.parentNode.getAttribute("tpc");if(md.flatMode==false){ChangeSelection(d);window.scrollTo(0,d.parentNode.offsetTop/2+10)}g!=null&&SetLastSelected(g,treeViewMode);parent.TreeItemSelected&&parent.TreeItemSelected(g,treeViewMode)}}
function ClearDescriptor(d,g){d.treeCreated=true;d.lastSelected=null;d.lastSelectedFlat=null;d.flatMode=g;for(var m=0;m<d.filteredGuidList.length;m++){s=d.filteredGuidList[m];d.filteredGuids[s].treeitem=null;d.filteredGuids[s].treeitemdiv=null}}function LastSelectedItem(d,g){this.guid=d;this.mode=g;this.firsdBuild=this.startAction=false}_lastSelectedItem=null;var _lastSelectedGlobal="",_lastSelectedGlobalMode="";
function SetLastSelected(d,g,m){_lastSelectedGlobal=d;_lastSelectedGlobalMode=g;if(!m)if(treeViewMode=="ALL")return;_lastSelectedItem=new LastSelectedItem(d,g)}function GetTpcAttribute(d){for(var g=null;g==null;){try{g=d.getAttribute("tpc")}catch(m){return null}if(g==null)d=d.parentNode}return g}var _childItem=null,_childItem_found=false;
function createTreeControl(d,g,m,q,u){if(d)_rootData=d;try{bigsco=parent.SCO_Supported()}catch(v){}InitTocStates();if(q)seeAlsoSelection=q;if(u)_childItem=u;fm=g==true?true:false;selection_need=1;if(treeViewMode=="ALL"){if(modeDescA.treeCreated==true){SelectionCallBack(m);return}ClearDescriptor(modeDescA,false);if(_lastSelectedItem!=null){_lastSelectedItem.startAction=true;_lastSelectedItem.firstBuild=true}else selection_need=2}else if(treeViewMode=="FILTERED"){if(modeDescF.treeCreated==true){modeDescF.flatMode=
fm;SelectionCallBack(m);return}ClearDescriptor(modeDescF,fm)}else if(treeViewMode=="FILTEREDHEMI"){if(modeDescFH.treeCreated==true){modeDescFH.flatMode=fm;SelectionCallBack(m);return}ClearDescriptor(modeDescFH,fm)}else{if(modeDescH.treeCreated==true){modeDescH.flatMode=fm;SelectionCallBack(m);return}ClearDescriptor(modeDescH,fm)}treeIsEmpty=true;if(treeViewMode=="ALL")treeControl=new TreeControl(document.getElementById("treeControlHostForAll"),d);else if(treeViewMode=="FILTERED"){treeControl=new TreeControl(document.getElementById("treeControlHostForFiltered"),
d);modeDescF.flatControl=new FlatControl("flatControlHostForFiltered");modeDescF.flatControl.Load();selection_need=modeDescF.flatMode==true?0:1}else if(treeViewMode=="FILTEREDHEMI"){treeControl=new TreeControl(document.getElementById("treeControlHostForFilteredHemi"),d);modeDescFH.flatControl=new FlatControl("flatControlHostForFilteredHemi");modeDescFH.flatControl.Load();selection_need=modeDescFH.flatMode==true?0:1}else{treeControl=new TreeControl(document.getElementById("treeControlHostForHemi"),
d);modeDescH.flatControl=new FlatControl("flatControlHostForHemi");modeDescH.flatControl.Load();selection_need=modeDescH.flatMode==true?0:1}Queue_Init();treeControl.LoadScript(treeControl.rootData+".html",treeControl.treeHost.id)}
function TreeControl(d,g){this.host=d;this.rootData=g;d.innerHTML="";this.treeHost=document.createElement("div");this.treeHost.id=g+"_"+TreeViewModeLetter();this.treeHost.className="treeControlNode";this.treeHost.onclick=this.OnClick;this.treeHost.onmouseup=this.OnMouseUp;this.treeHost.ondblclick=this.OnDoubleClick;this.host.appendChild(this.treeHost);this.loader=treeViewMode=="ALL"?document.getElementById("treeControlDataForAll"):treeViewMode=="FILTERED"?document.getElementById("treeControlDataForFiltered"):
treeViewMode=="FILTEREDHEMI"?document.getElementById("treeControlDataForFilteredHemi"):document.getElementById("treeControlDataForHemi");this.loader.className="treeControlData"}var _indexedSrc="";TreeControl.prototype.LoadScript=function(d,g){_indexedSrc=g;setTimeout("treeControl.LoadScriptInternal('"+d+"')",1)};TreeControl.prototype.LoadScriptInternal=function(d){var g=this.loader;if(g=g.contentDocument?g.contentDocument:g.contentWindow?g.contentWindow.document:null){treeControlDB=true;g.location.replace(d)}};
TreeControl.prototype.Bind=function(d){if(treeControlDB){treeControlDB=false;this.TraverseChildren(d.c,document.getElementById(_indexedSrc));_childNode_Loaded()}directMode==true?ChangeTreeView_CallBack():Queue_Next(this)};
function UnescapeQuotes(d){ss=d;for(k=ss.indexOf("&amp;");k>=0;){ss=sss=ss.substr(0,k)+"&"+ss.substr(k+5);k=ss.indexOf("&amp;")}for(k=ss.indexOf("&gt;");k>=0;){ss=sss=ss.substr(0,k)+">"+ss.substr(k+4);k=ss.indexOf("&gt;")}for(k=ss.indexOf("&lt;");k>=0;){ss=sss=ss.substr(0,k)+"<"+ss.substr(k+4);k=ss.indexOf("&lt;")}return ss}function GetClassNameFromFile(d){d=d.split("/");cname=d[d.length-1];return cname.replace(".gif","")}
TreeControl.prototype.TraverseNode=function(d,g,m,q){var u,v,z,B;u=d.e?true:false;if(treeViewMode=="ALL"){v=g.getAttribute("id");k=v.lastIndexOf("_");v=v.substr(0,k);z=d.d?d.d:d.i;AddItemdesc(modeDescA,modeDescA.filteredGuids,z,"","-",u,false,"",v);AddTreeItemToItemDesc(z,true)}d.element=document.createElement("div");v=d.element;v.className="treeControlNode";B=d.c||d.d;emptylesson=false;if(d.e)emptylesson=true;_openable=d.d?IsOpenable(d.d):false;z=v.appendChild(document.createElement("div"));guid=
d.i?d.i:d.d;z.setAttribute("tpc",guid);u=z.appendChild(document.createElement("img"));u.setAttribute("srcroot","../../img/outl_"+m);if(emptylesson||d.d&&!_openable){esrc=u.getAttribute("srcroot")+".gif";u.className=GetClassNameFromFile(esrc);u.openable=false;u.src="../../img/empty.gif"}else{esrc=u.getAttribute("srcroot")+(B?IsAutoExpand()?"o.gif":"c.gif":".gif");u.className=GetClassNameFromFile(esrc);u.src="../../img/empty.gif";u.openable=B?IsAutoExpand()?true:true:false}u=z.appendChild(document.createElement("img"));
if(bigsco){m=GetItemStatus(guid,true);u.className=_GetItemStatusFile(m);u.src="../../img/empty.gif";u.title=_GetItemStatusTitle(m);u.alt=_GetItemStatusTitle(m)}else u.src="../../img/sco_empty.gif";u=z.appendChild(document.createElement("img"));if(emptylesson){esrc="../../img/emptysection.gif";u.className=GetClassNameFromFile(esrc);u.src="../../img/empty.gif"}else{esrc=B?IsAutoExpand()&&_openable?"../../img/module_o.gif":"../../img/module_c.gif":"../../img/topic.gif";u.src="../../img/empty.gif";u.className=
GetClassNameFromFile(esrc);if(d.q)u.className=GetClassNameFromFile("../../img/question.gif");if(d.a)u.className=GetClassNameFromFile("../../img/assessment.gif")}u=z.appendChild(document.createElement("span"));ee=u.appendChild(document.createElement("a"));ee.className="";ee.style.cursor="pointer";ee.onmouseover=this.OnOverItem;ee.onmouseout=this.OnOutItem;ee.appendChild(document.createTextNode(UnescapeQuotes(d.t)));AddTreeItemToItemDesc(guid,ee);g.appendChild(v);if(B&&_openable){u=d.element.appendChild(document.createElement("table"));
u.className="treeControlChildren"+(!IsAutoExpand()?"H":"V");u.cellSpacing=0;u=u.appendChild(document.createElement("tbody"));u=u.appendChild(document.createElement("tr"));v=u.appendChild(document.createElement("td"));v.className="treeControlLine"+(q?"H":"V")+(bigsco?"W":"");v=v.appendChild(document.createElement("img"));v.src="../../img/s.gif";v=u.appendChild(document.createElement("td"));d.c&&this.TraverseChildren(d.c,v);if(d.d){v.id=d.d+"_"+TreeViewModeLetter();return v.id}}return null};
TreeControl.prototype.TraverseChildren=function(d,g){if(d){for(var m=[],q=[],u=0;u<d.length;u++)if(IsFiltered(d[u].d?d[u].d:d[u].i,treeViewMode))m[m.length]=d[u];if(m.length>0)if(g.className=="treeControlNode")if(m.length==1)q[0]=this.TraverseNode(m[0],g,"r",true);else{q[0]=this.TraverseNode(m[0],g,"f",false);u=m.length-1;for(var v=1;v<u;v++)q[v]=this.TraverseNode(m[v],g,"m",false);q[u]=this.TraverseNode(m[u],g,"l",true)}else{u=m.length-1;for(v=0;v<u;v++)q[v]=this.TraverseNode(m[v],g,"m",false);q[u]=
this.TraverseNode(m[u],g,"l",true)}if(IsAutoExpand())for(u=0;u<m.length;u++)m[u].d&&Queue_Add(m[u].d+".html",q[u]);if(_childItem!=null){v=m.length-1;for(u=0;u<m.length;u++){var z=m[u].d?m[u].d.substr(37):m[u].i.substr(37);try{z=parseInt(z,10)}catch(B){}if(z>_childItem&&u==0){_childItem=null;break}else if(z<_childItem&&u==v){if(m[u].d)Queue_Add(m[u].d+".html",q[u]);else _childItem=null;break}else if(z==_childItem){_childItem=null;_childItem_found=true;SetLastSelected(m[u].d?m[u].d:m[u].i,"ALL",true);
break}else if(z>_childItem){if(m[u-1].d)Queue_Add(m[u-1].d+".html",q[u-1]);else _childItem=null;break}}}}};TreeControl.prototype.OnOverItem=function(d){if(!d)d=window.event;target=d.target;if(!target)target=d.srcElement;if(target.className!="tselected")target.className="thover"};TreeControl.prototype.OnOutItem=function(d){if(!d)d=window.event;target=d.target;if(!target)target=d.srcElement;if(target.className!="tselected")target.className=""};
TreeControl.prototype.OnMouseUp=function(d){try{d.target.nodeName=="A"&&d.target.focus()}catch(g){}};TreeControl.prototype.OnClick=function(d){if(!d)d=window.event;target=d.target;if(!target)target=d.srcElement;treeControl.OnClickHandler(d,target)};
TreeControl.prototype.OnDoubleClick=function(d){if(!d)d=window.event;target=d.target;if(!target)target=d.srcElement;if(!target.tagName)target=target.parentNode;if(target.tagName=="A"||target.tagName=="IMG"){if(target.tagName=="IMG"){s=target.outerHTML;if(s.substr(s.length-11,9)!="topic.gif"||s.substr(s.length-14,12)!="question.gif"||s.substr(s.length-16,14)!="assessment.gif")return}target=target.parentNode.parentNode.firstChild;treeControl.OnClickHandler(d,target);parent.TreeItemDoubleSelected&&parent.TreeItemDoubleSelected()}clearTextSelection()};
function ChangeSelection(d){ee=d.tagName=="A"?d:d.childNodes[0];SetLastSelected(GetTpcAttribute(ee),treeViewMode);if(treeViewMode=="ALL"){if(modeDescA.lastSelected)modeDescA.lastSelected.className="";modeDescA.lastSelected=ee;modeDescA.lastSelected.className="tselected"}else if(treeViewMode=="FILTERED"){if(modeDescF.lastSelected)modeDescF.lastSelected.className="";modeDescF.lastSelected=ee;modeDescF.lastSelected.className="tselected"}else if(treeViewMode=="FILTEREDHEMI"){if(modeDescFH.lastSelected)modeDescFH.lastSelected.className=
"";modeDescFH.lastSelected=ee;modeDescFH.lastSelected.className="tselected"}else{if(modeDescH.lastSelected)modeDescH.lastSelected.className="";modeDescH.lastSelected=ee;modeDescH.lastSelected.className="tselected"}}
TreeControl.prototype.SelectFirstItem=function(){var d="";d=treeViewMode=="ALL"?"treeControlHostForAll":treeViewMode=="FILTERED"?"treeControlHostForFiltered":treeViewMode=="FILTEREDHEMI"?"treeControlHostForFilteredHemi":"treeControlHostForHemi";var g="",m;d=document.getElementById(d);d=d.firstChild;for(d=seeAlsoSelection>=d.childNodes.length?d.firstChild:d.childNodes[seeAlsoSelection];g=="";){try{t=d.getAttribute("tpc")}catch(q){return}if(t){g=t;m=d.lastChild}d=d.firstChild}ChangeSelection(m,true);
mode=treeViewMode;if(selection_need==1)mode="HIDE";selection_need=0;parent.TreeItemSelected&&parent.TreeItemSelected(g,treeViewMode)};
TreeControl.prototype.OnClickHandler=function(d,g){var m=false,q=true;if(!g.tagName)g=g.parentNode;if(g.tagName=="IMG"){var u=g.parentNode.parentNode.lastChild;if(u.tagName=="TABLE"){var v=g.parentNode.firstChild;if(g.openable||v.openable||u.openable)if(u.className=="treeControlChildrenV"){fsrc=v.getAttribute("srcroot")+"c.gif";v.src="../../img/empty.gif";v.className=GetClassNameFromFile(fsrc);v=v.nextSibling;v=v.nextSibling;v.src="../../img/empty.gif";v.className=GetClassNameFromFile("../../img/module_c.gif");
u.className="treeControlChildrenH";_go_closed=true}else{fsrc=v.getAttribute("srcroot")+"o.gif";v.src="../../img/empty.gif";v.className=GetClassNameFromFile(fsrc);v=v.nextSibling;v=v.nextSibling;v.src="../../img/empty.gif";v.className=GetClassNameFromFile("../../img/module_o.gif");u.className="treeControlChildrenV";u=u.firstChild.firstChild.lastChild;if(!u.firstChild){goriginal=u.id.length>36?GetJunctionId(u.id):u.id;q=false;treeControl.LoadScript(goriginal+".html",u.id)}}}else{u=g.parentNode.lastChild;
if(u.tagName=="IMG")return;ChangeSelection(u);m=true}}if(g.tagName=="A"){ChangeSelection(g);m=true}u=g.parentNode.getAttribute("tpc");if(u==null)u=g.parentNode.parentNode.getAttribute("tpc");m&&parent.TreeItemSelected&&parent.TreeItemSelected(u,treeViewMode);if(q){m=null;try{m=v.parentNode.childNodes[v.parentNode.childNodes.length-1].childNodes[0]}catch(z){}_childNode_Loaded(m)}};
function GetTableItemForThis(d){_tItem=d.parentNode;if(_tItem==null)return null;for(;_tItem.tagName!="TABLE";){_tItem=_tItem.parentNode;if(_tItem==null)return null}return _tItem}
function ShowTreeItem(d){mdActual=getModeDesc();mdSource=getModeDesc(true);_item=GetTreeItemOfItemDesc(d);if(_item==null){for(;_item==null;){var g=null;g=mdSource.filteredGuids[d];if(g==null)g=modeDescF.filteredGuids[d];if(g==null)g=modeDescH.filteredGuids[d];if(g==null)return false;d=g.parentguid;if(d==null)return false;_item=GetTreeItemOfItemDesc(d)}treeControl.LoadScript(d+".html",d+"_"+mdActual.modeLetter)}return true}
function OpenItem(d){if(d.className=="treeControlChildrenH"){f=d.parentNode.firstChild.firstChild;f.src="../../img/empty.gif";fscr=f.getAttribute("srcroot")+"o.gif";f.className=GetClassNameFromFile(fscr);f=f.nextSibling;f=f.nextSibling;f.src="../../img/empty.gif";f.className=GetClassNameFromFile("../../img/module_o.gif");d.className="treeControlChildrenV"}}
function ChangeTreeView(){retvalue=false;dA=document.getElementById("treeControlHostForAll");dS=document.getElementById("treeControlHostForFiltered");dSf=document.getElementById("flatControlHostForFiltered");dH=document.getElementById("treeControlHostForHemi");dHf=document.getElementById("flatControlHostForHemi");dFH=document.getElementById("treeControlHostForFilteredHemi");dFHf=document.getElementById("flatControlHostForFilteredHemi");if(treeViewMode=="FILTERED"){modeDescF.flatMode=!modeDescF.flatMode;
retvalue=modeDescF.flatMode;dS.style.display=modeDescF.flatMode?"none":"block";dSf.style.display=modeDescF.flatMode?"block":"none"}else if(treeViewMode=="HEMI"){modeDescH.flatMode=!modeDescH.flatMode;retvalue=modeDescH.flatMode;dH.style.display=modeDescH.flatMode?"none":"block";dHf.style.display=modeDescH.flatMode?"block":"none"}else{modeDescFH.flatMode=!modeDescFH.flatMode;retvalue=modeDescFH.flatMode;dFH.style.display=modeDescFH.flatMode?"none":"block";dFHf.style.display=modeDescFH.flatMode?"block":
"none"}ChangeTreeView_CallBack();return retvalue}var directMode=false;function _rec_SearchAInFlat(d,g){if(d.nodeName=="IMG"){attr=d.getAttribute("tpc");if(attr==g)return d}for(var m=0;m<d.childNodes.length;m++){r=_rec_SearchAInFlat(d.childNodes[m],g);if(r!=null)return r}return null}function _rec_GetFirstObjInFlat(d){if(d.nodeName=="IMG")return d;for(var g=0;g<d.childNodes.length;g++){r=_rec_GetFirstObjInFlat(d.childNodes[g]);if(r!=null)return r}return null}
function SetFlatSelection(){mdActual=getModeDesc();obj=_rec_SearchAInFlat(mdActual.flatControl.host,_lastSelectedGlobal);if(obj==null)obj=_rec_GetFirstObjInFlat(mdActual.flatControl.host);if(obj!=null)mdActual.flatControl.OnClickHandler(null,obj);else parent.TreeItemSelected&&parent.TreeItemSelected(null,null)}
function ChangeTreeView_CallBack(){mdActual=getModeDesc();mdSource=getModeDesc(true);var d=null;if(mdActual.flatMode==true){SetFlatSelection();return true}if(mdActual.flatMode==false||treeViewMode=="ALL"){var g=null;g=_lastSelectedGlobal;d=GetTreeItemOfItemDesc(g);if(d==null){if(!IsFiltered(g,treeViewMode))return false;directMode=true;return k=ShowTreeItem(g)}if(d!=null)for(_tItem=GetTableItemForThis(d);_tItem!=null;){OpenItem(_tItem);_tItem=GetTableItemForThis(_tItem)}}directMode=false;createTreeControl(null,
mdActual.flatMode,d);return true}function FlatControl(d){this.host=document.getElementById(d);this.document=this.host.document?this.host.document:this.host.ownerDocument}function showOnFlat(d){k=parseInt(d.guid.split("_")[1]);if(d.isroot==true&&k==1)return false;if(rolefilter_enabled==false)return true;ret=false;try{ret=filteredGuidsR[d.guid].found}catch(g){}return ret}
function isInOutline(d,g){if(d.filteredGuids.length==0)return true;var m=d.filteredGuids[g].parentguid;if(m==null)return false;return m.split("_")[1]=="1"?true:isInOutline(d,m)}
function getModeDesc(d){if(d==null)d=false;d=d==true?_lastSelectedGlobalMode:treeViewMode;if(d=="ALL")return modeDescA;else if(d=="FILTERED")return modeDescF;else if(d=="HEMI")return modeDescH;else if(d=="FILTEREDHEMI"){modeDescFH.guidsForFlat=[];for(d=0;d<modeDescF.guidsForFlat.length;d++){guidF=modeDescF.guidsForFlat[d];for(var g=0;g<modeDescH.guidsForFlat.length;g++){guidH=modeDescH.guidsForFlat[g];if(guidF.guid==guidH.guid)modeDescFH.guidsForFlat[modeDescFH.guidsForFlat.length]=guidF}}return modeDescFH}return null}
function saveModeDesc(d){if(treeViewMode=="ALL")modeDescA=d;else if(treeViewMode=="FILTERED")modeDescF=d;else if(treeViewMode=="HEMI")modeDescH=d;else if(treeViewMode=="FILTEREDHEMI")modeDescFH=d}
FlatControl.prototype.Load=function(){myDesc=getModeDesc();this.host.innerHTML="";div=this.host.appendChild(this.document.createElement("div"));div.className="treeControlNode";div.onclick=this.OnClick;div.ondblclick=this.OnDoubleClick;div.onmouseup=this.OnMouseUp;table=div.appendChild(this.document.createElement("table"));table.cellSpacing=0;first=true;for(var d=0,g=0;g<myDesc.guidsForFlat.length;g++){itemdesc=myDesc.guidsForFlat[g];if(showOnFlat(itemdesc)&&isInOutline(myDesc,itemdesc.guid)){d++;
if(!(d>TreeConfig.SearchResultLimit)){myDesc.actualFlatCounter=d;tr=table.appendChild(this.document.createElement("tbody"));tr=tr.appendChild(this.document.createElement("tr"));td=tr.appendChild(this.document.createElement("td"));img=td.appendChild(this.document.createElement("img"));img.className=GetClassNameFromFile(itemdesc.type=="Topic"?"../../img/topic.gif":itemdesc.empty?"../../img/emptysection.gif":"../../img/module_c.gif");img.src="../../img/empty.gif";img.setAttribute("tpc",itemdesc.guid);
td=tr.appendChild(this.document.createElement("td"));td.className="treeControlNode";a=td.appendChild(this.document.createElement("a"));if(first==true){myDesc.lastSelectedFlat=a;saveModeDesc(myDesc)}a.className=first==true?"tselected":"";first==true&&_lastChangeIsFilterOnly==false&&SetLastSelected(itemdesc.guid,treeViewMode);first=false;a.style.cursor="pointer";a.setAttribute("tpc",itemdesc.guid);a.onmouseover=this.OnOverItem;a.onmouseout=this.OnOutItem;var m=itemdesc.title;if(treeViewMode=="HEMI"&&
parent.showscore>0)m=""+Math.round(itemdesc.score*100)+" "+itemdesc.title;a.appendChild(this.document.createTextNode(m))}}}myDesc.flatMode==true&&SetFlatSelection();d=null;try{d=myDesc.lastSelectedFlat.getAttribute("tpc")}catch(q){}parent.TreeItemSelected&&parent.TreeItemSelected(d,treeViewMode)};FlatControl.prototype.OnOverItem=function(d){if(!d)d=window.event;target=d.target;if(!target)target=d.srcElement;if(target.className!="tselected")target.className="thover"};
FlatControl.prototype.OnOutItem=function(d){if(!d)d=window.event;target=d.target;if(!target)target=d.srcElement;if(target.className!="tselected")target.className=""};FlatControl.prototype.OnMouseUp=function(d){try{d.target.nodeName=="A"&&d.target.focus()}catch(g){}};FlatControl.prototype.OnClick=function(d){if(!d)d=window.event;target=d.target;if(!target)target=d.srcElement;mdActual=getModeDesc();mdActual.flatControl.OnClickHandler(d,target)};
FlatControl.prototype.OnDoubleClick=function(d){if(!d)d=window.event;target=d.target;if(!target)target=d.srcElement;mdActual=getModeDesc();mdActual.flatControl.OnClickHandler(d,target);parent.TreeItemDoubleSelected&&parent.TreeItemDoubleSelected()};
FlatControl.prototype.OnClickHandler=function(d,g){a=g;t=GetTpcAttribute(a);t!=null&&SetLastSelected(t,treeViewMode);if(!(g.tagName!="A"&&g.tagName!="IMG")){if(g.tagName!="A"){tr=g.parentNode.parentNode;for(var m=0;m<tr.childNodes.length;m++){k=tr.childNodes[m].childNodes[0];if(k.tagName=="A")a=k}}if(treeViewMode=="FILTERED")modeDescF.lastSelectedFlat.className="";else if(treeViewMode=="HEMI")modeDescH.lastSelectedFlat.className="";else modeDescFH.lastSelectedFlat.className="";a.className="tselected";
if(treeViewMode=="FILTERED")modeDescF.lastSelectedFlat=a;else if(treeViewMode=="HEMI")modeDescH.lastSelectedFlat=a;else modeDescFH.lastSelectedFlat=a;m=a.getAttribute("tpc");parent.TreeItemSelected&&parent.TreeItemSelected(m,treeViewMode)}};function GetActualFlatView(){md=getModeDesc();return md.flatMode}function GetActualFlatItemCounter(){md=getModeDesc();return md.actualFlatCounter}function IsActualViewEmpty(){md=getModeDesc();return md.filteredGuidList==0}
function getActualIndex_Flat(){md=getModeDesc();if(md.flatMode==true)for(var d=0;d<md.flatControl.host.firstChild.firstChild.childNodes.length;d++)if(md.flatControl.host.firstChild.firstChild.childNodes[d].firstChild.childNodes[1].firstChild.className=="tselected")return d;return""}
function getActualIndex_Tree(d,g){for(var m=0;m<d.length;m++)if(d[m].firstChild.childNodes[3].firstChild.className=="tselected")return m;if(g.lastSelected!=null){_tpc=g.lastSelected.parentNode.parentNode.getAttribute("tpc");for(m=0;m<d.length;m++)if(d[m].firstChild.getAttribute("tpc")==_tpc)return m}return""}function getTargetForIndex_Flat(d,g){return d.flatControl.host.firstChild.firstChild.childNodes[g].firstChild.firstChild.firstChild}
function getTargetForIndex_Tree(d){return ls[d].firstChild.childNodes[3].firstChild}function getActualImageObj_Tree(d){return d.lastSelected.parentNode.parentNode.firstChild}function getSpecifiedImageObj_Tree(d,g){return d[g].firstChild.firstChild}function getOwnerOfSelection(){var d=md.lastSelected.parentNode.parentNode.parentNode.childNodes[0].getAttribute("tpc");return md.filteredGuids[d].parentguid}function getOpenedStatus(d){s=d.className;c=s.substr(s.length-1,1);return c=="o"}
function getFilteredStatus(d){return!IsFiltered(d,"ALL")}function _getLinearStructure_Recursive(d,g){g[g.length]=d;_imgObj=d.firstChild.firstChild;if(getOpenedStatus(_imgObj)==true)for(var m=0;m<d.childNodes[1].firstChild.firstChild.childNodes[1].childNodes.length;m++)_getLinearStructure_Recursive(d.childNodes[1].firstChild.firstChild.childNodes[1].childNodes[m],g)}function getRoot(d){if(d.tagName=="DIV"&&d.id.substr(0,15)=="treeControlHost")return d.firstChild;return getRoot(d.parentNode)}
function getLinearStructure_Tree(d){var g=[];root=getRoot(d.lastSelected);for(d=0;d<root.childNodes.length;d++)_getLinearStructure_Recursive(root.childNodes[d],g);return g}
function EventKeyDown(d){if(d==null)d=window.event;d=d.which?d.which:d.keyCode;if(d==13)parent.TreeItemDoubleSelected&&parent.TreeItemDoubleSelected();else{md=getModeDesc();if(md.flatMode==true){index=getActualIndex_Flat();if(d==38){if(index>0){t=getTargetForIndex_Flat(md,index-1);md.flatControl.OnClickHandler(null,t)}}else if(d==40)if(index<md.actualFlatCounter-1){t=getTargetForIndex_Flat(md,index+1);md.flatControl.OnClickHandler(null,t)}}else{imgObj=getActualImageObj_Tree(md);_isOpenable=imgObj.openable?
imgObj.openable:imgObj.getAttribute("openable");_isOpened=getOpenedStatus(imgObj);ls=getLinearStructure_Tree(md);index=getActualIndex_Tree(ls,md);if(d==37){if(_isOpenable==true)if(_isOpened==true){treeControl.OnClickHandler(null,imgObj);return false}}else if(d==38){if(index>0){t=getTargetForIndex_Tree(index-1);treeControl.OnClickHandler(null,t)}}else if(d==39){if(_isOpenable==true)if(_isOpened==false){treeControl.OnClickHandler(null,imgObj);return false}}else if(d==40)if(index<ls.length-1){t=getTargetForIndex_Tree(index+
1);treeControl.OnClickHandler(null,t)}}}}function tree_SetFocus(){document.frames[0].document.childNodes[1].childNodes[1].focus()}function tree_Init(){document.onkeydown=EventKeyDown;parent.Init_treeloaded&&parent.Init_treeloaded()}function clearTextSelection(){document.selection&&document.selection.empty();window.getSelection&&window.getSelection().removeAllRanges()}
function GoToNext(){md=getModeDesc();if(md.flatMode==true){index=getActualIndex_Flat();if(index<md.actualFlatCounter-1){t=getTargetForIndex_Flat(md,index+1);md.flatControl.OnClickHandler(null,t)}}else{imgObj=getActualImageObj_Tree(md);_isOpenable=imgObj.openable?imgObj.openable:imgObj.getAttribute("openable");_isOpened=getOpenedStatus(imgObj);ls=getLinearStructure_Tree(md);index=getActualIndex_Tree(ls,md);if(index<ls.length-1){t=getTargetForIndex_Tree(index+1);treeControl.OnClickHandler(null,t)}}}
var _go_next=false,_go_prev=false,_go_closed=false;
function Navigation_Up(){md=getModeDesc();if(md.flatMode==false){ls=getLinearStructure_Tree(md);index=getActualIndex_Tree(ls,md);prevImgObj=getSpecifiedImageObj_Tree(ls,index-1);_isOpenable=Bool(prevImgObj.openable!=undefined?prevImgObj.openable:prevImgObj.getAttribute("openable"));_isOpened=getOpenedStatus(prevImgObj);if(_isOpenable&&!_isOpened){_go_prev=true;treeControl.OnClickHandler(null,prevImgObj);return}}var d={};d.keyCode=38;EventKeyDown(d)}
function Navigation_Down(){md=getModeDesc();if(md.flatMode==false){imgObj=getActualImageObj_Tree(md);_isOpenable=Bool(imgObj.openable!=undefined?imgObj.openable:imgObj.getAttribute("openable"));_isOpened=getOpenedStatus(imgObj);if(_isOpenable&&!_isOpened){_go_next=true;var d={};d.keyCode=39;EventKeyDown(d);return}}d={};d.keyCode=40;EventKeyDown(d)}
function isFirstItem(){md=getModeDesc();if(md.flatMode==true)index=getActualIndex_Flat();else{if(md.lastSelected==null)return true;ls=getLinearStructure_Tree(md);index=getActualIndex_Tree(ls,md)}return index==0}
function isLastItem(){md=getModeDesc();if(md.flatMode==true)return index==md.filteredTopicCount-1;else{if(md.lastSelected==null)return false;ls=getLinearStructure_Tree(md);index=getActualIndex_Tree(ls,md);if(index==ls.length-1){imgObj=getActualImageObj_Tree(md);_isOpenable=imgObj.openable;return _isOpenable==false}return false}}
function _childNode_Loaded(d){if(_go_next==true){_go_next=false;Navigation_Down()}if(_go_prev==true){md=getModeDesc();if(md.flatMode==false){ls=getLinearStructure_Tree(md);index=getActualIndex_Tree(ls,md);prevImgObj=getSpecifiedImageObj_Tree(ls,index-1);_isOpenable=Bool(prevImgObj.openable!=undefined?prevImgObj.openable:prevImgObj.getAttribute("openable"));_isOpened=getOpenedStatus(prevImgObj);if(_isOpenable&&!_isOpened){_go_prev=true;treeControl.OnClickHandler(null,prevImgObj);return}else{_go_prev=
false;Navigation_Up()}}}if(_go_closed==true){_go_closed=false;md=getModeDesc();if(md.flatMode==false){ls=getLinearStructure_Tree(md);index=getActualIndex_Tree(ls,md);index==""&&treeControl.OnClickHandler(null,d)}}}function Bool(d){if(typeof d=="boolean")return d;if(typeof d=="string"){if(d.toLowerCase()=="false")return false;if(d.toLowerCase()=="true")return true}return null}var indexMap=[],treeIndex=[];
function AddToIndexMap(d){if(bigsco!=false)if(!(d.length<=36)){var g=d.substr(0,36);d=d.substr(37);indexMap[d]=g}}var _tocStates2=null,_tocStates_initialized=false;
function InitTocStates(){if(!_tocStates_initialized){_tocStates_initialized=true;if(bigsco!=false){for(var d=0;d<parentIndex.length;d++){treeIndex[d]=[];treeIndex[d][0]=parentIndex[d]}for(d=0;d<parentIndex.length;d++){var g=parentIndex[d];treeIndex[g][treeIndex[g].length]=d}_tocStates2=[];for(d=0;d<parent.lms_TOCState.NodeCounter;d++)_tocStates2[d]=parent.lms_GetItemStatus(d);InitOneItemState(childIndexLocal2Global(0));d=parent.lms_GetItemStatus(0);g=_tocStates2[0];d!=g&&parent.lms_SetItemStatus(0,
g);updateTreeTrace()}}}function InitOneItemState(d){for(var g=index_getChildList(d),m=0;m<g.length;m++)InitOneItemState(g[m]);childIndexGlobal2Local(d);if(d!=0)_tocStates2[d]=BuildItemStatus(d,true)}function GetItemStatus(d,g){var m=d.substr(37),q=childIndexGlobal2Local(m);m=BuildItemStatus(m,g);return _tocStates2[q]=m}
function _GetItemStatusFile(d){switch(d){case "N":return"sco_notstarted";case "I":return"sco_incomplete";case "C":return"sco_completed";case "P":return"sco_passed";case "F":return"sco_failed"}return""}function _GetItemStatusTitle(d){switch(d){case "N":return R_status_tree_notstarted;case "I":return R_status_tree_inprogress;case "C":return R_status_tree_complete;case "P":return R_status_tree_passed;case "F":return R_status_tree_failed}return""}
function UpdateItemStatus(d){_tocStates2[d]=parent.lms_GetItemStatus(d);d=childIndexLocal2Global(d);RefreshItemStatus(indexMap[d]+"_"+d);BuildRootItemStatus();updateTreeTrace()}
function RefreshItemStatus(d){if(bigsco!=false){var g=getModeDesc(d).filteredGuids[d];if(g!=null){d=GetItemStatus(d);g.treeitemdiv.parentNode.parentNode.childNodes[1].setAttribute("src","../../img/empty.gif");_itemState=_GetItemStatusFile(d);g.treeitemdiv.parentNode.parentNode.childNodes[1].setAttribute("class",_itemState);g.treeitemdiv.parentNode.parentNode.childNodes[1].setAttribute("className",_itemState);g.treeitemdiv.parentNode.parentNode.childNodes[1].setAttribute("title",_GetItemStatusTitle(d));
g.treeitemdiv.parentNode.parentNode.childNodes[1].setAttribute("alt",_GetItemStatusTitle(d));g.parentguid!=null&&RefreshParentItemStatus(g.parentguid)}}}
function RefreshParentItemStatus(d){var g=d.substr(37),m=childIndexGlobal2Local(g),q=_tocStates2[m];g=BuildItemStatus(g);if(m==0)if(g=="N")return;if(g!=q){_tocStates2[m]=g;m==0&&parent.lms_SetItemStatus(0,g);updateTreeTrace();d=getModeDesc(d).filteredGuids[d];if(d!=null){d.treeitemdiv.parentNode.parentNode.childNodes[1].setAttribute("src","../../img/empty.gif");_itemState=_GetItemStatusFile(g);d.treeitemdiv.parentNode.parentNode.childNodes[1].setAttribute("class",_itemState);d.treeitemdiv.parentNode.parentNode.childNodes[1].setAttribute("className",
_itemState);d.treeitemdiv.parentNode.parentNode.childNodes[1].setAttribute("title",_GetItemStatusTitle(g));d.treeitemdiv.parentNode.parentNode.childNodes[1].setAttribute("alt",_GetItemStatusTitle(g));d.parentguid!=null&&RefreshParentItemStatus(d.parentguid)}}}function getBaseIndex(){return parseInt(_rootData.substr(37))}function childIndexLocal2Global(d){return parseInt(d)+getBaseIndex()}function childIndexGlobal2Local(d){return d-getBaseIndex()}
function index_getParent(d){if(!index_checkIndex(d))return-1;return treeIndex[d][0]}function index_getChildList(d,g){if(!index_checkIndex(d))return-1;for(var m=treeIndex[d],q=[],u=1;u<m.length;u++)if(g){if(g!=m[u])q[u-1]=m[u]}else q[u-1]=m[u];return q}function index_hasChildren(d){if(!index_checkIndex(d))return-1;return treeIndex[d].length>1}function index_checkIndex(d){if(d>treeIndex.length-1)return false;return treeIndex[d].length>0}
function BuildItemStatus(d){var g=childIndexGlobal2Local(d);return BuildItemStatus2(d,g)}function BuidStatus(d,g){if(d.indexOf("I")>=0)return"I";if(d.indexOf("N")>=0)return d.indexOf("C")>=0||d.indexOf("F")>=0||d.indexOf("P")>=0?"I":"N";if(d.indexOf("F")>=0)return g==false?"F":"C";if(d.indexOf("P")>=0)if(g==false)return"P";return"C"}
function BuildItemStatus2(d,g){var m=index_getChildList(d),q="";if(g!=0)if(conceptIndex[d]>0)q+=parent.lms_GetItemStatus(g);for(var u=0;u<m.length;u++)q+=_tocStates2[childIndexGlobal2Local(m[u])];return BuidStatus(q,m.length>0)}function BuildRootItemStatus(){var d=childIndexLocal2Global(0);d=index_getChildList(d);for(var g="",m=0;m<d.length;m++)g+=_tocStates2[childIndexGlobal2Local(d[m])];d=BuidStatus(g,d.length>0);_tocStates2[0]=d}var treeTraceOn=false,treeTraceWnd=null;
function updateTreeTrace(){try{if(treeTraceOn){if(treeTraceWnd==null)treeTraceWnd=window.open();treeTraceWnd.document.body.innerHTML="";for(var d=0;d<_tocStates2.length;d++)treeTraceWnd.document.write(" "+d+": "+_tocStates2[d]+" - "+parent.lms_GetItemStatus(d)+"<br/>")}}catch(g){}};function splitUri(d){d=d.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);d.shift();return d=[d[1]+"://"+d[3],d[4],d[6]+d[8]]}
function combine(d,g){var m=g;if(m.indexOf("odrel://")==0)m=m.substr(8);if(m=="")m=".";var q=splitUri(d),u=q[0];q=q[1];if(q.charAt(0)=="/")q=q.substr(1);if(q.charAt(q.length-1)=="/")q=q.substr(0,q.length-1);if(m.charAt(m.length-1)=="/")m=m.substr(0,m.length-1);q=q.split("/");var v=m.split("/");if(v.length>2&&v[0]==""&&v[1]==""){u=u.split(":")[0]+":/";for(m=2;m<v.length;m++)u+="/"+v[m];return u}var z=[];for(m=0;m<q.length;m++)z[m]=q[m];for(m=0;m<v.length;m++)if(v[m]==".."){if(z.length>0)z=z.slice(0,
z.length-1)}else if(v[m]!=".")if(v[m]=="")z=[];else z[z.length]=v[m];q="";for(m=0;m<z.length;m++)q+="/"+z[m];return u+q}function getRootUrl(){if(typeof isTocHtml!="undefined"){var d=document.location.href;return d.substr(0,d.lastIndexOf("/"))}var g=splitUri(document.location.href);d=g[0];g=g[1];if(g.charAt(0)=="/")g=g.substr(1);g=g.split("/");var m;for(m=g.length-1;g[m]!="tpc"&&m>=0;m--);if(m>0)m-=1;for(var q="",u=0;u<m;u++)q+="/"+g[u];return d+q}
function isRelative(d){d=d.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);return d[1]==""||d[1]==undefined}function resolveIfRelative(d){return d.indexOf("odrel://")==0?resolve(d):d}function resolve(d){if(isRelative(PlayerConfig.BaseUrl)){var g=getRootUrl();g=combine(g,PlayerConfig.BaseUrl);return combine(g,d)}else return combine(PlayerConfig.BaseUrl,d)}
function resolveLinksInWebPage(){for(var d=document.getElementsByTagName("a"),g=0;g<d.length;g++)if(d[g].getAttribute("href").indexOf("odrel://")==0)d[g].href=resolve(d[g].getAttribute("href"))};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 g=findKPathAPIFrame(window);if(g==null){g=document.createElement("iframe");g.id="KPATH_API_FRAME";g.style.display="none";document.body.appendChild(g);if(d)if(navigator.appName=="Microsoft Internet Explorer")g.attachEvent("onload",d);else g.onload=d;g.src=Kpath_Runtime_API}else setTimeout(d,1)}}
function findKPathAPIFrame(d){var g=null,m=0,q=d;try{for(;q!=null;){g=q.document.getElementById("KPATH_API_FRAME");if(g!=null)return g.contentWindow;m++;if(m>7)break;if(q===q.parent)break;q=q.parent}if(d.top.opener!=null)return findKPathAPIFrame(d.top.opener)}catch(u){}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 g=0;g<d.length;g++){strArg=d[g];var m;m=this.CheckParam(strArg,"aicc_url=");if(m!="")this.aicc_url=m.substr(0,4).toLowerCase()!="http"?LmsConfig.AiccUrlProtocol+m:m;else{m=this.CheckParam(strArg,"aicc_sid=");if(m!="")this.aicc_sid=m}}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(g){return null}};LmsComFactory.prototype.FindWindowScorm12API=function(d){for(var g=0;d.API==null&&d.parent!=null&&d.parent!=d;){g++;if(g>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(g){return null}};LmsComFactory.prototype.FindWindowScorm2004API=function(d){for(var g=0;d.API_1484_11==null&&d.parent!=null&&d.parent!=d;){g++;if(g>500){lmslog.addEntry(0,"FindScorm2004API","",R_scorm_apideep);return null}d=d.parent}return d.API_1484_11};
LmsComFactory.prototype.CheckParam=function(d,g){var m=g.length,q="";if(d.substr(0,m).toLowerCase()==g)q=d.substring(m);return q};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,g){return this.convertTotalSeconds((g-d-this.idle_time)/1E3)};
LmsComBase.prototype.convertTotalSeconds=function(d){var g=d%60;d-=g;var m=d%3600;d-=m;g=Math.round(g*100)/100;var q=g=new String(g);if(g.indexOf(".")!=-1){q=g.substring(0,g.indexOf("."));g.substring(g.indexOf(".")+1,g.length)}if(q.length<2)q="0"+q;g=q;d=d%3600!=0?0:d/3600;m=m%60!=0?0:m/60;if((new String(d)).length<2)d="0"+d;if((new String(m)).length<2)m="0"+m;return d+":"+m+":"+g};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,g){this.ParentLmsCom&&this.ParentLmsCom.doSetUPKValue(d,g)};LmsComBase.prototype.doUPKCommit=function(){this.ParentLmsCom&&this.ParentLmsCom.doUPKCommit()};LmsComBase.prototype.setInteraction=function(d,g){if(this.ParentLmsCom)return this.ParentLmsCom.setInteraction(d,g)};
LmsComBase.prototype.getAnsweredQuestions=function(){if(this.ParentLmsCom)return this.ParentLmsCom.getAnsweredQuestions();return{}};LmsComBase.prototype.setObjective=function(d,g){this.ParentLmsCom&&this.ParentLmsCom.setObjective(d,g)};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,g){this.status_obj=new LmsTopicStatus;this.status_obj.setRequiredMode(d,g);lmslog.addEntry(0,"OpenTopicStatus","RequiredMode",this.status_obj.requiredMode);this.status_obj.isScored=!!d.K;var m;m=GetTopLevelLmsMode()=="LMS"?d:g;this.status_obj.setModeavail("S",m.S);this.status_obj.setModeavail("T",m.T);this.status_obj.setModeavail("K",m.K);this.status_obj.setModeavail("D",m.D);this.status_obj.setModeavail("P",m.P);this.status_obj.setModeavail("E",m.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,g,m){this.status_obj=new LmsTopicLaunchStatus(d);this.status_obj.setRequiredMode(g,m);lmslog.addEntry(0,"OpenTopicLaunchStatus","RequiredMode",this.status_obj.requiredMode);this.status_obj.isScored=g.indexOf("K")!=-1;d=GetTopLevelLmsMode()=="LMS"?g:m;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,g){this.status_obj=new LmsAssessmentStatus;this.status_obj.hash=g;var m=this.lesson_data,q,u=null;if(m)if(this.bigsco)u=g;else{var v=m.indexOf("@");if(v>0){q=parseInt(m.substring(0,v));u=m.substring(v+1,v+q+1).replace(/ /g,"+");m=m.substring(v+q+1)}}if(g===u&&m.length===d+1){this.status_obj.savedStatus=m.charAt(0);this.status_obj.status=m.charAt(0)==="I"?LMS_INCOMPLETE:LMS_NOT_ATTEMPTED;for(q=0;q<d;q++)this.status_obj.questionstatus[q]=m.charAt(q+
1)}else{if(m&&!this.bigsco){this.status_obj.stateDiscarded=true;this.status_obj.savedStatus=m.charAt(0)}else this.status_obj.savedStatus="N";this.status_obj.status=LMS_NOT_ATTEMPTED;for(q=0;q<d;q++)this.status_obj.questionstatus[q]="N"}return this.status_obj};LmsComBase.prototype.OpenTOCStatus=function(d,g){var m=new LmsTOCStatus;this.status_obj=m;var q=new TOCState(d,g);m.setTocState(q);this.lesson_data!=null&&this.lesson_data.length>0&&q.DeserializeTOC(this.lesson_data);return m};
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(),g=this.API.LMSGetErrorString(d)+"\n"+this.API.LMSGetDiagnostic("");this.API=null;lms_ConnectionLost(d+" "+g);lmslog.addEntry(0,"LmsComScorm12.Begin","",g);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(),g=this.API.LMSGetErrorString(d)+"\n"+this.API.LMSGetDiagnostic("");this.API=null;lms_ConnectionLost(d+" "+g);lmslog.addEntry(0,"LmsComScorm12.End","",g);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 g=this.API.LMSGetValue(d),m=this.API.LMSGetLastError();if(m!=this.ErrorCodes.NoError){g=this.API.LMSGetErrorString(m);lms_ConnectionLost(m+" "+g+", "+d);lmslog.addEntry(0,"doLMSGetValue","",R_scorm_getvalfail+d+" "+g);return""}lmslog.addEntry(1,"doLMSGetValue",d,g);return g};
LmsComScorm12.prototype.doLMSSetValue=function(d,g){if(this.API==null)return"false";if(this.API.LMSSetValue(d,g)=="false"){var m=this.API.LMSGetLastError();if(m!=this.ErrorCodes.NoError&&m!=this.ErrorCodes.NotImplemented){var q=this.API.LMSGetErrorString(m);lms_ConnectionLost(m+" "+q+", "+d+", "+g);lmslog.addEntry(0,"doLMSSetValue","",R_scorm_setvalfail+d+":"+g+" "+q);return"false"}}lmslog.addEntry(1,"doLMSSetValue",d,g);return"true"};
LmsComScorm12.prototype.doLMSCommit=function(){if(this.API==null)return"false";if(this.API.LMSCommit("")=="false"){var d=this.API.LMSGetLastError(),g=this.API.LMSGetErrorString(d);lms_ConnectionLost(d+" "+g);lmslog.addEntry(0,"doLMSCommit","",g);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(),g=this.API.GetErrorString(d)+"\n"+this.API.GetDiagnostic("");this.API=null;lms_ConnectionLost(d+" "+g);lmslog.addEntry(0,"LmsComScorm2004.Begin","",g);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(),g=this.API.GetErrorString(d)+"\n"+this.API.GetDiagnostic("");this.API=null;lms_ConnectionLost(d+" "+g);lmslog.addEntry(0,"LmsComScorm2004.End","",g);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 g=this.getReportedLessonStatus();if(g===LMS_NOT_ATTEMPTED)g=this.original_lesson_status;if(g==LMS_PASSED||g==LMS_FAILED){this.doSetValue("cmi.success_status",g);this.doSetValue("cmi.completion_status",LMS_COMPLETED)}else this.doSetValue("cmi.completion_status",g);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 g=d%60;d-=g;var m=d%3600;d-=m;g=Math.round(g*100)/100;var q=g=new String(g);if(g.indexOf(".")!=-1){q=g.substring(0,g.indexOf("."));g.substring(g.indexOf(".")+1,g.length)}if(q.length<2)q="0"+q;g=q;d=d%3600!=0?0:d/3600;m=m%60!=0?0:m/60;if((new String(d)).length<2)d="0"+d;if((new String(m)).length<2)m="0"+m;return"PT"+d+"H"+m+"M"+g+"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 g=this.API.GetValue(d),m=this.API.GetLastError();if(m!=this.ErrorCodes.NoError&&m!=this.ErrorCodes.DataModelElementValueNotInitialized)if(m==this.ErrorCodes.KPathTimeout&&this.object_type_name=="LmsComKPath"){lmslog.addEntry(0,"doGetValue","","KCenter timeout");m=this.API.GetValue("upk.idle_time");lmslog.addEntry(0,"doGetValue","upk.idle_time",m);this.idle_time+=m;lmslog.addEntry(0,"doGetValue","idle_time",this.idle_time);
return this.doGetValue(d)}else{g=this.API.GetErrorString(m);lms_ConnectionLost(m+" "+g+", "+d);lmslog.addEntry(0,"doGetValue","",R_scorm_getvalfail+d+" "+g);return""}lmslog.addEntry(1,"doGetValue",d,g);return g};
LmsComScorm2004.prototype.doSetValue=function(d,g){if(this.API==null)return"false";if(this.API.SetValue(d,g)=="false"){var m=this.API.GetLastError();if(m!=this.ErrorCodes.NoError&&m!=this.ErrorCodes.UnimplementedDataModelElement)if(m==this.ErrorCodes.KPathTimeout&&this.object_type_name=="LmsComKPath"){lmslog.addEntry(0,"doSetValue","","KCenter timeout");m=this.API.GetValue("upk.idle_time");lmslog.addEntry(0,"doSetValue","upk.idle_time",m);this.idle_time+=m;lmslog.addEntry(0,"doSetValue","idle_time",
this.idle_time);return this.doSetValue(d,g)}else{var q=this.API.GetErrorString(m);lms_ConnectionLost(m+" "+q+", "+d+", "+g);lmslog.addEntry(0,"doSetValue","",R_scorm_setvalfail+d+":"+g+" "+q);return"false"}}lmslog.addEntry(1,"doSetValue",d,g);return"true"};
LmsComScorm2004.prototype.doCommit=function(){if(this.API==null)return"false";if(this.API.Commit("")=="false"){var d=this.API.GetLastError(),g=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+
" "+g);lmslog.addEntry(0,"doCommit","",g);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 g=this.getReportedLessonStatus();if(g===LMS_NOT_ATTEMPTED)this.doSetValue("cmi.completion_status",LMS_NOT_ATTEMPTED);else{if(g==LMS_PASSED||g==LMS_FAILED){this.doSetValue("cmi.success_status",g);this.doSetValue("cmi.completion_status",LMS_COMPLETED)}else this.doSetValue("cmi.completion_status",g);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 g=findKPathAPIFrame(window);if(g&&g.LoadRuntime&&this.guid){this.deferred_callback=d;var m=this;g.LoadRuntime(this.guid,0,0,0,function(q,u,v,z){m.LoadAPIAdapterCallback(q,u,v,z)})}else d()}};
LmsComKPath.prototype.LoadAPIAdapterCallback=function(d,g,m,q){if(d=="succeeded"&&g==this.guid){this.API=m.GetAPI();lmslog.addEntry(0,"LoadAPIAdapterCallback","","KPath adapter bound");try{this.deferred_callback()}catch(u){}}else{if(d=="no SCO")this.API=null;else alert(R_scorm_noapi+" "+q);lmslog.addEntry(0,"LoadAPIAdapterCallback","",q);this.deferred_callback()}};LmsComKPath.prototype.doGetUPKValue=function(d){d=this.doGetValue(d);if(d==="")d=-1;return d};
LmsComKPath.prototype.doSetUPKValue=function(d,g){this.doSetValue(d,g)};LmsComKPath.prototype.doUPKCommit=function(){this.doCommit()};
LmsComKPath.prototype.setInteraction=function(d,g){if(this.API){var m=g.status_obj,q=this.doGetValue("cmi.interactions._count");if(d==-1)d=q;d>=q&&this.doSetValue("cmi.interactions."+d+".id",g.guid);this.doSetValue("cmi.interactions."+d+".type",m.getQuestionType());this.doSetValue("cmi.interactions."+d+".timestamp",(new Date).toSCORM());this.doSetValue("cmi.interactions."+d+".weighting","1");if(m.getResult()){this.doSetValue("cmi.interactions."+d+".learner_response",m.getLearnerResponse());this.doSetValue("cmi.interactions."+
d+".result",m.getResult())}this.doCommit();return d}};LmsComKPath.prototype.getAnsweredQuestions=function(){var d={};if(!this.API)return d;for(var g=this.doGetValue("cmi.interactions._count"),m=0;m<g;m++){var q=this.doGetValue("cmi.interactions."+m+".id");d[q]={index:m};d[q].weighting=this.doGetValue("cmi.interactions."+m+".weighting");d[q].result=this.doGetValue("cmi.interactions."+m+".result")}return d};
LmsComKPath.prototype.setObjective=function(d,g){if(this.API){this.doSetValue("cmi.objectives."+d+".id",g.objectiveGuid=="PRIMARYOBJ"?"PRIMARYOBJ":"OBJ_"+g.objectiveGuid);this.doSetValue("cmi.objectives."+d+".score.scaled",g.score/100);this.doSetValue("cmi.objectives."+d+".completion_status",g.completed?"completed":"incomplete");this.doSetValue("cmi.objectives."+d+".success_status",g.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,g){this.allow_launch=false;this.aicc_url=d;this.aicc_sid=g;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 g,m,q=false;d+=" ";for(var u=d.split("\r"),v=0;v<u.length;v++){var z=u[v],B=trimValue(z.substring(0,z.indexOf("="))),F=trimValue(z.substring(z.indexOf("=")+1));
if(B.toLowerCase()=="error"){g=F;q=true}if(B.toLowerCase()=="error_text")m=F;if(B.toLowerCase()=="aicc_data"){this.aicc_data=d.substring(d.indexOf(z.substring(0,z.indexOf("=")))+z.substring(0,z.indexOf("=")).length+1);q=true}}if(q)if(g==0){u=get_group_content("core",this.aicc_data).split("\r");for(v=0;v<u.length;v++){z=u[v];B=trimValue(z.substring(0,z.indexOf("=")));F=trimValue(z.substring(z.indexOf("=")+1));if(B.toLowerCase()=="student_id")this.student_id=F;if(B.toLowerCase()=="student_name")this.student_name=
F;if(B.toLowerCase()=="lesson_status"){this.lesson_status=F.toLowerCase().charAt(0);if(F.indexOf(",")!=-1)this.lesson_flag=trimValue(F.substring(F.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(B.toLowerCase()=="lesson_location")this.lesson_location=F;if(B.toLowerCase()=="credit")this.credit=F;if(B.toLowerCase()=="score")this.score=F;if(B.toLowerCase()=="time")this.time=F}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+m);lmslog.addEntry(0,"hacpGetparam","","Unable to continue because of the following error: "+m)}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 g=this.getReportedLessonStatus();if(g===LMS_NOT_ATTEMPTED)g=this.original_lesson_status;d+=this.lesson_status===LMS_INCOMPLETE?"Lesson_Status="+g+", suspend\r\n":"Lesson_Status="+g+"\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,g){for(var m="",q=g.split("\r"),u=false,v=0;v<q.length;v++){var z=trimValue(q[v]);if(z.substr(0,1)=="[")u=z.toLowerCase().indexOf("["+d.toLowerCase()+"]")>=0?true:false;else if(u)m+=z+"\r\n"}return m}
function trimValue(d){for(var g=0,m=d.length,q=0;q<d.length;q++)if(d.substr(q,1)!=" "&&d.substr(q,1)!="\t"&&d.substr(q,1)!="\n"&&d.substr(q,1)!="\r"){g=q;break}if(q==d.length)return"";for(q=d.length-1;q>0;q--)if(d.substr(q,1)!=" "&&d.substr(q,1)!="\t"&&d.substr(q,1)!="\n"&&d.substr(q,1)!="\r"){m=q;break}if(q==0)m=0;return d.substring(g,m+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,g){this.modes[d].avail=g};
LmsTopicStatus.prototype.getModeavail=function(d){return this.modes[d].avail};LmsTopicStatus.prototype.setModestatus=function(d,g){if(this.modes[d].avail)this.modes[d].complete=g;else lmslog.addEntry(0,"setModestatus","","Invalid call of setModestatus")};LmsTopicStatus.prototype.getModestatus=function(d){return this.modes[d].complete};LmsTopicStatus.prototype.setRequiredMode=function(d,g){this.requiredMode=GetTopLevelLmsMode()=="LMS"?this._getRequiredMode(d):this._getRequiredMode(g)};
LmsTopicStatus.prototype._getRequiredMode=function(d){for(var g=0;g<6;g++)if(d["EKTSPD".charAt(g)])return"EKTSPD".charAt(g);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 g=d.split(",");for(d=0;d<=g.length-1;d++){lmslog.addEntry(0,"initTopicstat","f["+d+"]",g[d]);if(g[d].charAt(1)=="=")this.modes[g[d].charAt(0)].complete=this.modeIscomplete(g[d].substr(2,1));else if(g[d].substr(0,5)=="PASS=")this.passed=g[d].substr(5,1)=="0"?false:true;else if(g[d].substr(0,
6)=="SCORE=")this.score=g[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 g=["E","K","T","S","P","D"];for(i=0;i<g.length;i++){if(this.modes[g[i]].complete)d=true;if(g[i]===this.requiredMode)break}}lmslog.addEntry(0,"is_complete","iscomp",d);return d};
LmsTopicStatus.prototype.modeIscomplete=function(d){var g=false;lmslog.addEntry(0,"modeIscomplete","","Start");if(d=="C")g=true;else if(d=="I")g=false;lmslog.addEntry(0,"modeIscomplete","ret",g);return g};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 g=0;g<6;g++)if(d.indexOf("EKTSPD".charAt(g))!=-1)return"EKTSPD".charAt(g);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 g="";d.bigsco||(g=this.hash.length+"@"+this.hash);g+=this.status==LMS_NOT_ATTEMPTED?this.savedStatus:Lms2Stat(this.status);for(var m=0;m<this.questionstatus.length;m++)g+=this.questionstatus[m];d.lesson_data=g};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 g=this.getTocState();d.lesson_data=g.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,g){this.NodeCounter=d;this.TocVersion=g;this.InitInLookupTable()}
TOCState.prototype.SetStatus=function(d,g){this.LookUpTable[d]||(this.LookUpTable[d]=new NodeState);this.LookUpTable[d].Status=g};TOCState.prototype.GetStatus=function(d){return this.LookUpTable[d].Status};TOCState.prototype.SetScore=function(d,g){this.LookUpTable[d]||(this.LookUpTable[d]=new NodeState);this.LookUpTable[d].Score=g};TOCState.prototype.GetScore=function(d){return this.LookUpTable[d].Score};
TOCState.prototype.SetChildren=function(d,g){this.LookUpTable[d]||(this.LookUpTable[d]=new NodeState);this.LookUpTable[d].ChildrenStatus=g};TOCState.prototype.GetChildren=function(d){return this.LookUpTable[d].ChildrenStatus};
TOCState.prototype.DeserializeTOC=function(d){var g=0,m,q=d.indexOf("@");if(q>0){g=parseInt(d.substring(0,q));m=d.substring(q+1,q+g+1);if(m==this.TocVersion){d=d.substring(q+g+2);q=d.indexOf("@");if(q>0){g=parseInt(d.substring(0,q));d=d.substring(q+1,q+g+1);if(d.length==g){d=this.RLESDecode(d);this.DeserializeLookUpTable(d)}}}}};
TOCState.prototype.DeserializeLookUpTable=function(d){for(var g=0,m="",q=0;q<d.length;q++){m=d.charAt(q);this.SetStatus(g,m);for(m="";q<d.length-1&&d.charAt(q+1)>="0"&&d.charAt(q+1)<="9";){q++;m+=d.charAt(q)}m.length>0&&this.SetScore(g,parseInt(m));if(q<d.length-1&&d.charAt(q+1)=="{"){m=d.indexOf("}",q+2);this.SetChildren(g,d.substring(q+2,m));q=m}g++}};
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="",g=0;g<this.NodeCounter;g++){var m=this.LookUpTable[g].Status,q=this.LookUpTable[g].ChildrenStatus;m||(m="N");d+=m;if(q)d+="{"+q+"}"}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 g="",m=0,q="";g=d.charAt(0);for(var u=m=1;u<d.length;u++)if(d.charAt(u)==g)m++;else{if(m>2){q+="#";q+=m;q+=g}else q+=d.substring(u-m,u);g=d.charAt(u);m=1}if(m>2){q+="#";q+=m;q+=g}else q+=d.substring(u-m,u);return q};
TOCState.prototype.RLESDecode=function(d){for(var g="",m="",q=0;q<d.length;q++)if(d.charAt(q)=="#"){m="";for(q++;d.charAt(q)>="0"&&d.charAt(q)<="9";){m+=d.charAt(q);q++}m=parseInt(m);for(var u=0;u<m;u++)g+=d.charAt(q)}else g+=d.charAt(q);return g};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,g,m,q,u){this.logType=g;this.funcName=m;this.varName=q;this.msgValue=u;this.dateTime=(new Date).getTime()-d}LogEntry.prototype.GetTableRow=function(){var d="#006600";if(this.logType===1)d="#000033";var g=this.varName;if(g==="")g="&nbsp;";var m=this.msgValue;if(m==="")m="&nbsp;";var q="<tr>";q+="<td align='right'>"+this.dateTime/1E3+"</td>";q+="<td style='color:"+d+";'>"+this.funcName+"</td>";q+="<td>"+g+"</td>";q+="<td>"+m+"</td>";q+="</tr>";return q};
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,g,m,q){if(this.enabled){this.logArray.push(new LogEntry(this.startDateTime.getTime(),d,g,m,q));this.changed=true;this.traceWindow&&this.windowReady&&this.traceWindow.UpdateTraceStack()}};
Log.prototype.writeLog=function(d,g){var m=g;if(m>this.logArray.length||m==0)m=this.logArray.length;var q="<table width='600'>";q+="<tr>";q+="<th colspan=4>Session start: "+this.startDateTime+"</th>";q+="</tr>";q+="<tr>";q+="<th>time</th>";q+="<th>function</th>";q+="<th>variable</th>";q+="<th>message</th>";q+="</tr>";var u;if(d==0)for(var v=this.logArray.length-m;v<this.logArray.length;v++){u=this.logArray[v];q+=u.GetTableRow(v)}else for(v=this.logArray.length-1;v>=this.logArray.length-m;v--){u=this.logArray[v];
q+=u.GetTableRow(v)}q+="</table>";this.changed=false;this.windowReady=true;return q};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 g=d._lmsMode;if(g==null)return _GetTopLevelLmsMode(d.lms_store.parentW);return g}var lms_initialized=false,lms_store,lmslog;
function lms_InitPage(d,g,m,q){if(lms_initialized==true)setTimeout(q,1);else{__Ialert("lms_InitPage called with parameters:"+d+","+g+","+m+","+q);lms_store={window:window,childIndex:d,parentW:g,cguid:m,callbackfunction:q};if(!g||g.closed){lmslog=new Log(LmsConfig.DebugMode);InitializeLmsCom();InsertRuntimeAPI(lms_LoadRuntimeComplete)}else if(g.lms_initialized){lmslog=g.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(g){}}var hasClosed=false;
function lms_ClosePage(d){__Ialert("lms_ClosePage() called");if(hasClosed!=true){hasClosed=true;var g=document.LmsCom;if(g&&g.session_active){var m=g.child;m&&m.session_active&&m.owner&&!m.owner.closed&&m.owner.lms_ClosePage(true);(m=g.ancillaryChild)&&m.session_active&&m.owner&&!m.owner.closed&&m.owner.lms_ClosePage(true);window._closePage&&_closePage();if(g.session_active){g.SaveStatus();g.End();g.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)};playerwindow=null;
function LaunchDoIt(d,g){var m=false,q=g,u=true;if(playerwindow)playerwindow.closed||(u=false);if(u){if(u=navigator.appName.indexOf("Microsoft")!=-1?true:false)try{if(!function(){var F=window.createPopup();F.show(1,1,1,1);var M=F.document.parentWindow.screenTop==1;F.hide();return!M}()&&!IsIE10Modern()){var v=false;if(q.substr(0,3)=="su="){q=Escape.SafeUriUnEscape(q.substr(3));v=true}q+="&popup=true";if(v)q="su="+Escape.SafeUriEscape(q);m=true}}catch(z){}if(m){d+="topicgc.html";q=typeof urlParser==
"undefined"?d+"?"+q:urlParser.GetCorrectUrl(d+"?"+q);playerwindow=window.open(q,"","toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,left=1500")}else{d+="topicgcx.html";if(u){m=navigator.appVersion.split(";")[1];m=m.substr(6);m=parseFloat(m)}m=IsSafari()?screen.availWidth-361:screen.availWidth-290;u=screen.availHeight-450;v=IsSafari()?346:275;var B=400;if(PlayerConfig.EnableCookies){GICookie=new Cookie(document,"GICookie",365,"/",null,null);if(GICookie.Load())if(GICookie.Cleft>=
0&&GICookie.Ctop>=0&&GICookie.Cleft<screen.availWidth&&GICookie.Ctop<screen.availHeight){m=parseInt(GICookie.Cleft);u=parseInt(GICookie.Ctop);v=parseInt(GICookie.Cwidth);B=parseInt(GICookie.Cheight)}}q=typeof urlParser=="undefined"?d+"?"+q:urlParser.GetCorrectUrl(d+"?"+q);playerwindow=window.open(q,"","toolbar=0,scrollbars=0,location=1,statusbar=0,menubar=0,resizable=1,left="+m+",top="+u+",width="+v+",height="+B)}}else alert(R_toc_doit_err)};window.SmartMatch={};
(function(d){function g(y){return typeof y=="function"||y!=null&&y.constructor===Function}function m(y){return(typeof y=="object"||g(y))&&y!=null}function q(){function y(D){D=D.toString(16);switch(D.length){case 1:return"\\u000"+D;case 2:return"\\u00"+D;case 3:return"\\u0"+D;case 4:return"\\u"+D}return"?"}function A(D){return'"'+String(D).replace(/(["\\])/g,"\\$1").replace(/([\x00-\x1F])/g,function(H){H=H.charCodeAt(0);var I=U.charAt(H);return I=="?"?y(H):"\\"+I})+'"'}function C(D){return D<10?"0"+
D:D}function E(D,H){var I=typeof D;if(I!="object"){if(I=="string")return A(D);if(I=="number")return isFinite(D)?String(D):"null";if(I=="boolean")return D?"true":"false"}else{if(D===null)return"null";if(D.constructor===String)return A(D);if(D.constructor===Number)return isFinite(D)?String(D):"null";if(D.constructor===Boolean)return D?"true":"false";if(D.constructor===Date)return"".concat(D.getUTCFullYear(),"-",C(D.getUTCMonth()),"-",C(D.getUTCDate()),"T",C(D.getUTCHours()),":",C(D.getUTCMinutes()),
":",C(D.getUTCSeconds()),"Z");if(D.constructor!==Function){if(P(H,D))throw O;I=[];H.push(D);if(D.constructor===Array){for(var L=0,N=D.length;L<N;++L){var S=D[L];S==null||Q(S)?I.push("null"):I.push(E(S,H,String(L)))}H.pop();return"["+I.join()+"]"}for(L in D){N=D[L];if(N==null||Q(N))N===null&&I.push(A(L)+":null");else if((N=E(N,H,L))!=null)I.push(A(L)+":"+N)}H.pop();return"{"+I.join()+"}"}}}var J=/[^",:\{\}\[\] \t\r\n]|"""|"[ \t\r\n]+"]|[\}\]][ \t\r\n]*[:\{\[]|[\{\[][ \t\r\n]*[,:]|[,:][ \t\r\n]*[,:\}\]]/,
G=/"(?:[^"\\\x00-\x1F]|\\["\\\/bnfrt]|\\u[0-9a-fA-F]{4})*"|null|true|false|-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?(?:[eE][+\-]?[0-9]+)?/g,O=Error(""),Q=g,P;(function(){try{if(typeof[].indexOf=="function"&&[1,2,3,4].indexOf(3)==2){P=function(H,I){return H.indexOf(I)!=-1};return}}catch(D){}P=function(H,I){for(var L=0,N=H.length;L<N;++L)if(H[L]===I)return true;return false}})();var U="????????btn?fr??????????????????";K.EncodeObject=function(D){if(D==null||Q(D)){if(D===null)return"null"}else try{return E(D,
[],"")}catch(H){if(H!==O)throw H;}};K.DecodeObject=function(D){try{if(D!=null&&!J.test(D.replace(G,'""')))return eval("("+D+")")}catch(H){}}}function u(){var y=document.title;if(y=="")if(typeof window.R_toc_title=="string"&&typeof window.moduleName=="string")y=window.R_toc_title+" - "+R.UnescapeQuotes(window.moduleName);return y}var v={GATEWAY_EMBED:[],GATEWAY_LINK:[],TABBED_GATEWAY:1,TABBED_GATEWAY_OPEN_LAST_ACTIVE_TAB:1,GATEWAYPAGE_TEST:0,GATEWAYPAGE_MAIN_PLAYER:1,GATEWAYPAGE_EXTERNAL_PLAYER_APPLICABLE:2,
GATEWAYPAGE_EXTERNAL_PLAYER_FULL:3,GATEWAYPAGE_HELP:4,GATEWAYPAGE_URL_WITH_NOCTX:5,GATEWAYPAGE_URL_WITH_CTX:6,GATEWAYPAGE_RESOURCES:7,GATEWAY_RESOURCES_TITLE:"Linked Resources",GATEWAY_PLAYER_TITLE:"Main Player",GATEWAY_HELP_TITLE:"Help",GATEWAY_TEST_TITLE:"Test Data",TOCVIEW_ALL:0,HEMIPARAMTEST:0,HELP_URL:null,URL:{"*":"../../"},DIRECT:0,BRAND:null};v.GATEWAY_EMBED.push({Title:v.GATEWAY_PLAYER_TITLE,URL:"",Type:v.GATEWAYPAGE_MAIN_PLAYER});var z={NotDetected:-1,MicrosoftInternetExplorer:0,MozillaFirefox:1,
GoogleChrome:2},B={Type:z.NotDetected,Version:void 0,IE:void 0,FF:void 0,CR:void 0,GetVersionFn:[function(){var y=navigator.userAgent,A=y.indexOf("MSIE ");if(A!=-1){A+=5;var C=y.indexOf(";",A);if(C!=-1)return Number(y.substr(A,C-A))}return-1},null,null]},F={IsIE:function(){if(B.IE!==void 0)return B.IE;if(B.IE=navigator.userAgent.indexOf("MSIE ")!=-1){B.Type=z.MicrosoftInternetExplorer;return true}return false},IsFF:function(){if(B.FF!==void 0)return B.FF;if(B.FF=navigator.userAgent.indexOf("Firefox")!=
-1){B.Type=z.MozillaFirefox;return true}},GetVersion:function(){if(B.Version!==void 0)return B.Version;var y=B.GetVersionFn[B.Type];y=y&&y()||-1;return B.Version=y}},M={Indent:"  "},K={EncodeObject:function(y,A){try{return JSON.stringify(y,null,A?M.Indent:null)}catch(C){if(typeof TypeError=="undefined"||!C||C.constructor!==TypeError)throw C;}},DecodeObject:function(y){if(y!=null)try{return JSON.parse(y)}catch(A){}}};(function(){if(typeof window.JSON!="undefined"&&typeof(JSON.stringify&&JSON.parse)!=
"undefined")try{var y={a:"",b:0.1,c:null,d:true,e:false,f:[[{},{g:function(){return 1},h:1},new Function("return 0;"),function(){return 1},1]]},A=JSON.stringify(y);if(A=='{"a":"","b":0.1,"c":null,"d":true,"e":false,"f":[[{},{"h":1},null,null,1]]}'&&A==JSON.stringify(JSON.parse('{"a":"","b":0.1,"c":null,"d":true,"e":false,"f":[[{},{"h":1},null,null,1]]}'))&&/2345-12-23T12:34:56(?:\.789[0]*)?Z/.test(JSON.stringify(new Date(Date.UTC(2345,11,23,12,34,56,789)))))return}catch(C){}q()})();var R={WriteScript:function(y,
A){var C=y.document.getElementsByTagName("head")[0],E=y.document.createElement("script");E.type="text/javascript";E.src=A;C.appendChild(E)},AccessGranted:function(y){try{if(m(y)&&m(y.location)&&(typeof y.location.href=="string"||typeof y.location.href=="object"&&y.location.href.constructor===String))return true}catch(A){}return false},CreateScript:function(y,A){var C=document.getElementsByTagName("head")[0],E=document.createElement("script");E.type="text/javascript";E.src=A;E.setAttribute("id",y);
C.appendChild(E)},ModifyScript:function(y,A){var C=document.getElementById(y);C&&C.parentNode.removeChild(C);R.CreateScript(y,A)},ExecuteScript:function(y,A){document.getElementById(y)==null?R.CreateScript(y,A):R.ModifyScript(y,A)},AddListener:function(y,A,C){var E=false;if(C===String(C))C=document.getElementById(C);if(C.addEventListener)E=C.addEventListener(y,A,false);else if(C.attachEvent)E=C.attachEvent("on"+y,A);return E},GetClassAttribute:function(){if(!F.IsIE()||document.documentMode>=8)return"class";
return"className"},UnescapeQuotes:function(y){for(var A=y.indexOf("&amp;");A>=0;){y=y.substr(0,A)+"&"+y.substr(A+5);A=y.indexOf("&amp;")}for(A=y.indexOf("&gt;");A>=0;){y=y.substr(0,A)+">"+y.substr(A+4);A=y.indexOf("&gt;")}for(A=y.indexOf("&lt;");A>=0;){y=y.substr(0,A)+"<"+y.substr(A+4);A=y.indexOf("&lt;")}return y}};showscore=0;var T={Variables:{adjusted_maxsearch:0},Query:"querydb",DbRoot:"querydb/topicmap/",DbSize:0,DbSearchedSize:0,EcidArray:[],SearchArray:{},_EcidArray:function(y,A){this.Expr=
y||"";this.Ctx=A||null;this.List=[];this.Hits=0},FramesWithHits:[],AppName:"",AllTopics:0,TopicsPerFile:0,AllFiles:0,CurrentFile:0,CurrentIndex:0,AllScore:0,HighScore:0,LowScore:0,MinScore:0,FilteredbyMaxHit:[],FilteredbyMaxSearch:[],SetAppName:function(y){this.AppName=y},TocWin:null,_Topic:function(y){this.index=-1;this.name=this.guid=this.text="";this.hits=this.ascore=this.score=0;this.type="";this.frameid=-1;this.Process=function(){this.SetGuid();this.SetName()};this.SetGuid=function(){var A=this.text.indexOf("_");
if(A>0)this.guid=this.text.substr(0,A)};this.SetName=function(){var A=this.text.indexOf("#");A={s:this.text.substr(A+3),p:0};var C=ReadBase64_32(A),E=A.s.substr(A.p+C);this.name=A.s.substr(A.p,C);A=E.indexOf("#");if(A>=0){this.frameid=parseInt(E.substr(A+2));E=E.substr(0,A)}this.type=E};if(typeof y=="string"){this.text=y;this.Process()}},_TopicList:function(){this._tmap=[];this.Set=function(y,A){y.index=A;this._tmap.push(y)};this.Sort=function(){this._tmap.sort(this._Sort)};this._Sort=function(y,
A){return A.score-y.score};this.GetGuid=function(y){return this._tmap[y].guid};this.GetName=function(y){return this._tmap[y].name};this.GetFrameid=function(y){return this._tmap[y].frameid};this.GetIndex=function(y){return this._tmap[y].index};this.GetElementByIndex=function(y){for(var A=0;A<this._tmap.length;A++)if(this._tmap[A].index==y)return this._tmap[A];return null}},Ctx:[],CtxProcessor:{Counter:1,_type:"",_count:0,Hex:function(){return this.Counter.toString(16)},GetFile:function(){return SmartMatch.GenericSearch.Query+
this._type+"/"+this.Hex()+".xml"},Iterate:function(y){SmartMatch.GenericSearch.Ctx[this._type]=SmartMatch.GenericSearch.Ctx[this._type].concat(y);this.Counter++;try{LoadXMLDoc(SmartMatch.GenericSearch.CtxProcessor.GetFile(),"SmartMatch.GenericSearch.CtxProcessor.IterateRet")}catch(A){}},_Iterate:function(){LoadXMLDocArray(SmartMatch.GenericSearch.CtxProcessor.GetFile(),"SmartMatch.GenericSearch.CtxProcessor.Iterate","","N")},IterateRet:function(y){if(y==true)setTimeout(this._Iterate,1);else{this._count++;
this._count<2?this.Next("genctx"):setTimeout(SmartMatch.GenericSearch.StartXMLProcessor,1)}},Start:function(){this._type="ctxex";SmartMatch.GenericSearch.Ctx[this._type]=[];LoadXMLDoc(SmartMatch.GenericSearch.CtxProcessor.GetFile(),"SmartMatch.GenericSearch.CtxProcessor.IterateRet")},Next:function(y){this._type=y;SmartMatch.GenericSearch.Ctx[this._type]=[];LoadXMLDoc(SmartMatch.GenericSearch.CtxProcessor.GetFile(),"SmartMatch.GenericSearch.CtxProcessor.IterateRet")}},StartXMLProcessor:function(){SmartMatch.GenericSearch.Variables.showtestpage>
0?LoadXMLDoc(SmartMatch.GenericSearch.DbRoot+"count.xml","SmartMatch.GenericSearch.TopicsCount","",""):SmartMatch.GenericSearch._StartSearch()},TopicsCount:function(y){y=y.responseXML.getElementsByTagName("Count");if(y.length>0)SmartMatch.GenericSearch.AllTopics=y[0].firstChild.data;LoadXMLDocArray(SmartMatch.GenericSearch.DbRoot+"0.xml","SmartMatch.GenericSearch.MaxTopicsPerFile","","T")},MaxTopicsPerFile:function(y){SmartMatch.GenericSearch.TopicsPerFile=parseInt(y[0]);SmartMatch.GenericSearch.AllFiles=
Math.floor(SmartMatch.GenericSearch.AllTopics/SmartMatch.GenericSearch.TopicsPerFile)+(SmartMatch.GenericSearch.AllTopics%SmartMatch.GenericSearch.TopicsPerFile==0?0:1);LoadXMLDocArray(SmartMatch.GenericSearch.DbRoot+SmartMatch.GenericSearch.CurrentFile+".xml","SmartMatch.GenericSearch.IterateXMLFiles","","T")},IterateXMLFiles:function(y){y=DecodeTMapArray(y);SmartMatch.GenericSearch.CurrentFile++;for(var A=1;A<y.length;A++){for(var C=y[A],E=C.indexOf("/"),J=C;E>=0;){C.substr(0,E);E=C.indexOf("/");
C=J=C.substr(E+1)}C=new SmartMatch.GenericSearch._Topic(J);SmartMatch.GenericSearch.TopicList.Set(C,A+SmartMatch.GenericSearch.TopicsPerFile*(SmartMatch.GenericSearch.CurrentFile-1))}SmartMatch.GenericSearch.AllFiles==SmartMatch.GenericSearch.CurrentFile?SmartMatch.GenericSearch._StartSearch():setTimeout(SmartMatch.GenericSearch._IterateXMLFiles,1)},_IterateXMLFiles:function(){LoadXMLDocArray(SmartMatch.GenericSearch.DbRoot+SmartMatch.GenericSearch.CurrentFile+".xml","SmartMatch.GenericSearch.IterateXMLFiles",
"","T")},_StartSearch:function(){if(SmartMatch.GenericSearch.EcidArray.length>0){QueryParser.Parse("URI","g"+SmartMatch.GenericSearch.EcidArray[SmartMatch.GenericSearch.CurrentIndex].Expr);if(QueryParser.ev)try{QueryProcessor.Start(QueryParser.ev,SmartMatch.GenericSearch.Search)}catch(y){}}else SmartMatch.GenericSearch.SearchDone()},Search:function(y){var A=[];if(y=="")A.push(0);else if(y.length>SmartMatch.GenericSearch.Variables.maxhit){A.push(-1);SmartMatch.GenericSearch.EcidArray[SmartMatch.GenericSearch.CurrentIndex].Hits=
y.length;SmartMatch.GenericSearch.Variables.showtestpage>0&&SmartMatch.GenericSearch.FilteredbyMaxHit.push(SmartMatch.GenericSearch.EcidArray[SmartMatch.GenericSearch.CurrentIndex])}else for(var C=0;C<y.length;C++)A.push(y[C].index);SmartMatch.GenericSearch.EcidArray[SmartMatch.GenericSearch.CurrentIndex].List=A;SmartMatch.GenericSearch.CurrentIndex++;SmartMatch.GenericSearch.CurrentIndex<SmartMatch.GenericSearch.EcidArray.length?setTimeout(SmartMatch.GenericSearch.IterateSearch,1):SmartMatch.GenericSearch.SearchDone()},
SearchDone:function(){if(SmartMatch.GenericSearch.Variables.showtestpage>0)if(typeof CDB!="undefined"&&CDB!=null&&typeof CDB.index!="undefined")SmartMatch.GenericSearch.DbSearchedSize=CDB.index.length;SmartMatch.GenericSearch.GetTopics();var y=SmartMatch.GenericSearch.GetTopicsList();ShowGenToc(y);if(SmartMatch.GenericSearch.Variables.showtestpage>0){if(!(v.GATEWAY_EMBED.length>1))SmartMatch.GenericSearch.Utility.TestWindow=window.open("../stdhemi/context/context.html?smartmatch","_upktestpage_");
SmartMatch.GenericSearch.Utility.TestWindow&&window.focus()}},IterateSearch:function(){SmartMatch.GenericSearch._StartSearch()},GetTopics:function(){this.HighScore=0;if(SmartMatch.GenericSearch.EcidArray.length!=0){for(var y=0,A=SmartMatch.GenericSearch.EcidArray.length;y<A;y++){for(var C=SmartMatch.GenericSearch.EcidArray[y],E=0;E<C.List.length;E++){var J=C.List[E]-1;if(SmartMatch.GenericSearch.Variables.showtestpage>0){if(J>0){SmartMatch.GenericSearch.TopicList._tmap[J].score+=1;SmartMatch.GenericSearch.TopicList._tmap[J].hits++}}else if(typeof SmartMatch.GenericSearch.SearchArray[C.List[E]]!=
"undefined")SmartMatch.GenericSearch.SearchArray[C.List[E]]+=1;else SmartMatch.GenericSearch.SearchArray[C.List[E]]=1}if(C.List.length>0&&C.List[0]>=0)SmartMatch.GenericSearch.AllScore+=1}if(SmartMatch.GenericSearch.Variables.showtestpage>0){var G=0;for(y=SmartMatch.GenericSearch.TopicList._tmap.length;G<y;G++){A=SmartMatch.GenericSearch.TopicList._tmap[G];typeof A=="object"&&A!=null&&A.score>0&&A.frameid!=-1&&SmartMatch.GenericSearch.FramesWithHits.push(G+1);A.ascore=A.score;C=A.score/SmartMatch.GenericSearch.AllScore;
C=parseFloat(C.toFixed(2));A.score=parseFloat(C);if(SmartMatch.GenericSearch.HighScore<A.score)SmartMatch.GenericSearch.HighScore=A.score}}else for(G in SmartMatch.GenericSearch.SearchArray){y=parseFloat((SmartMatch.GenericSearch.SearchArray[G]/SmartMatch.GenericSearch.AllScore).toFixed(2));SmartMatch.GenericSearch.SearchArray[G]=y;if(G>0)if(SmartMatch.GenericSearch.HighScore<y)SmartMatch.GenericSearch.HighScore=y}}},GetTopicsList:function(){SmartMatch.GenericSearch.LowScore=parseFloat((SmartMatch.GenericSearch.HighScore*
SmartMatch.GenericSearch.Variables.threshold/100).toFixed(2));SmartMatch.GenericSearch.MinScore=parseFloat(SmartMatch.GenericSearch.LowScore<=parseFloat((SmartMatch.GenericSearch.Variables.minscore/100).toFixed(2))?parseFloat((SmartMatch.GenericSearch.Variables.minscore/100).toFixed(2)):this.LowScore);var y=[];if(SmartMatch.GenericSearch.Variables.showtestpage>0&&SmartMatch.GenericSearch.EcidArray.length>0)for(var A=0,C=SmartMatch.GenericSearch.TopicList._tmap.length;A<C;A++){var E=SmartMatch.GenericSearch.TopicList._tmap[A];
if(E.frameid!=-1)if(E.score>0)if(E.score>=this.MinScore){var J={index:0,score:0};J.index=E.index;J.score=E.score;y.push(J)}}else for(A in SmartMatch.GenericSearch.SearchArray){C=SmartMatch.GenericSearch.SearchArray[A];if(A>0)if(C>=this.MinScore){E={index:0,score:0};E.index=A;E.score=C;y.push(E)}}return y},CallBack:function(){typeof SmartMatch.GenericSearch.Utility.TestWindow=="object"&&SmartMatch.GenericSearch.Utility.TestWindow.SMTestPage.Show(SmartMatch.GenericSearch.Variables.showtestpage)},Utility:{TestWindow:null,
Dec2Hex:function(y){return y.toString(16).toUpperCase()},Hex2Dec:function(y){return parseInt(y,16)},GetEcid:function(y){y=y.Expr.substr(1,y.Expr.length-2);var A=y.indexOf("$");if(A>0){y=y.substr(A+1).substr(4);return Escape.MyUnEscape(y)}return""},GetPrefix:function(y){var A="";y=y.Expr.substr(1,y.Expr.length-2);var C=y.indexOf("$");if(C>0)A=y.substr(C+1).substr(0,4);return A},GetWeight:function(){return 1},GetCaption:function(y){return y.Ctx.caption}}};T.TopicList=new T._TopicList;if(R.AccessGranted(window.parent)){var V=
window.parent;if(V.location.href.indexOf("gateway.html")!=-1){var W=u();V.GatewayHelper.SetTitleFromThePlayer(W)}}d.ShowContent=function(y,A,C,E){window.setTimeout(function(){try{var J=A!=""?K.DecodeObject(A):null,G=C!=""?K.DecodeObject(C):{},O=E!=""?K.DecodeObject(E):{};SmartMatch.GenericSearch.Variables.threshold=O.Threshold;SmartMatch.GenericSearch.Variables.maxhit=O.MaxHit;SmartMatch.GenericSearch.Variables.maxsearch=O.MaxSearch;SmartMatch.GenericSearch.Variables.minscore=O.MinScore;if(y=="STDHTML"){if(G.threshold)SmartMatch.GenericSearch.Variables.threshold=
G.threshold;if(G.maxhit)SmartMatch.GenericSearch.Variables.maxhit=G.maxhit;if(G.maxsearch)SmartMatch.GenericSearch.Variables.maxsearch=G.maxsearch;if(G.minscore)SmartMatch.GenericSearch.Variables.minscore=G.minscore}if(G.showtestpage)SmartMatch.GenericSearch.Variables.showtestpage=G.showtestpage;if(G.showscore)showscore=G.showscore;SmartMatch.GenericSearch.EcidArray.length=0;if(y.length>0)if(J.length>0){SmartMatch.GenericSearch.SetAppName(y);for(G=0;G<J.length;G++){var Q="'"+y+"$"+Escape.MyEscape(J[G])+
"'",P=new SmartMatch.GenericSearch._EcidArray(Q,J[G]);SmartMatch.GenericSearch.EcidArray.push(P)}SmartMatch.GenericSearch.Variables.adjusted_maxsearch=SmartMatch.GenericSearch.EcidArray.length}setTimeout(SmartMatch.GenericSearch.StartXMLProcessor,1)}catch(U){}},100)};d.GenericSearch=T})(window.SmartMatch);
