/* 
﻿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(g){dlg_parent=g}function Click1(){closeDialog();$("#graydiv").remove()}function getDPI(){return device_dpi}function setWidth(g,j){$(g).css("width",j)}function setHeight(g,j){$(g).css("height",j)}function getFullWidth(){return IsIE7()?$(window).width():document.body.scrollWidth}
function getFullHeight(){return IsIE7()?$(window).height():document.body.scrollHeight}function setPadding(g,j,m){s="<div style='padding:"+j+"px'";if(m&&m!="")s+=" class='"+m+"'";s+=">"+g+"</div>";return s}
function getContentSize(g){var j={width:0,height:0};o=$("<div style='display:visible;position:absolute;top:0px;left:0px;' id='04A98DB973UPK'>"+g+"</div>");$("body").append(o);j.width=$("#04A98DB973UPK").outerWidth(true);j.height=$("#04A98DB973UPK").outerHeight(true);$("#04A98DB973UPK").remove();return j}function showDialog3(g,j,m,q,u,z,v,A,C){showDialog2(g,j,m,q,u,z,v,A);$("body").append("<div id='04A98DB974UPK'>"+C+"</div>")}
function showDialog2(g,j,m,q,u,z,v,A){dlg_autosizeheight=u==-1?true:false;dialog2_html=g;showDialog("",j,m,q,u,z,v,"",A)}
function showDialog(g,j,m,q,u,z,v,A,C){isopened=true;if(v==0)v=96;if(j!=-1)j=PtToPx(j,v);if(m!=-1)m=PtToPx(m,v);q=PtToPx(q,v);u=PtToPx(u,v);dlg_width=q;dlg_height=u;device_dpi=v;dialogh_ref=g;modal_dialog=z;if(j==-1||m==-1){centerx=$(window).width()/2-q/2+$(document).scrollLeft();centery=$(window).height()/2-u/2+$(document).scrollTop()}else{centerx=j;centery=m}mainref=C?dialogh_ref:A&&A!=""?A+"dialog1.html":"../dialog1.html";if(g=="")mainref="../dialog2.html";g=getFullWidth();j=getFullHeight();z?
$(document.body).append('<div id="scrollarea" scrolling="no" style="display:visible;position:absolute; top:0px; left: 0px; overflow:auto; z-index: 100;width:'+g+"px;height:"+j+'px;"></div>'):$(document.body).append('<div id="scrollarea" scrolling="yes"  style="overflow:auto; z-index: 99;" onclick="Click1();"></div>');if(j<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>');
z?$(document.body).append('<div id="graydiv" scrolling="yes" class="pointerdiv" style="display:none;z-index: 99;width:'+g+"px;height:"+j+'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(g){$(g).remove()}function appendDiv(g){$(document.body).append(g)}
function resizeDialog(){var g=getFullWidth(),j=getFullHeight();$("#graydiv").css("width",g+"px");$("#graydiv").css("height",j+"px");$("#scrollarea").css("width",g+"px");$("#scrollarea").css("height",j+"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(g){callback_end=g}function getOnCloseEvent(){return callback_end}function getDialog2Content(){return dialog2_html};function filterHTML(g){g=replaceString("&","&amp;",g);g=replaceString("<","&lt;",g);return g=replaceString(">","&gt;",g)}function replaceString(g,j,m){if(m!=null)return m.replace(RegExp(g,"g"),j)}function PtToPx(g,j){return g*j/72}function PxToPt(g,j){return g/j*72}function getDPICookie(){var g=new Cookie(document,"UPKDpiDailyWarning","today","/");g.Load();if(g.DPIdailyWarning==1)return true;g.DPIdailyWarning=1;g.Store();return false};var loader_dontclose=false;function EscEvent(){loader_dontclose==false&&top.close()}document.onstop=EscEvent;function Cookie(g,j,m,q,u,z){this.$document=g;this.$name=j;if(m=="today"){g=new Date;g.setHours(23);g.setMinutes(59);g.setSeconds(59);this.$exp=g}else this.$exp=m?new Date((new Date).getTime()+m*864E5):null;this.$path=q?q:null;this.$domain=u?u:null;this.$secure=z?true:false}
Cookie.prototype.Store=function(){if(PlayerConfig.EnableCookies){var g="",j;for(j in this)if(!(j.charAt(0)=="$"||typeof this[j]=="function")){if(g!="")g+="&";g+=j+":"+escape(this[j])}g=this.$name+"="+g;if(this.$exp)g+="; expires="+this.$exp.toGMTString();if(this.$path)g+="; path="+this.$path;if(this.$domain)g+="; domain="+this.$domain;if(this.$secure)g+="; secure=";this.$document.cookie=g}};
Cookie.prototype.Load=function(){if(!PlayerConfig.EnableCookies)return false;var g=this.$document.cookie;if(g=="")return false;var j=g.indexOf(this.$name+"=");if(j==-1)return false;j+=this.$name.length+1;var m=g.indexOf(";",j);if(m==-1)m=g.length;g=g.substring(j,m).split("&");for(j=0;j<g.length;j++){m=g[j].split(":");this[m[0]]=unescape(m[1])}return true};
Cookie.prototype.Remove=function(){if(PlayerConfig.EnableCookies){var g=this.$name+"=";if(this.$path)g+="; path="+this.$path;if(this.$domain)g+="; domain="+this.$domain;g+="; expires=Fri, 02-Jan-1970 00:00:00 GMT";this.$document.cookie=g}};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(g){this.TimeStamp=g.TimeStamp;this.PlayAudio=g.PlayAudio;this.ShowLeadIn=g.ShowLeadIn;this.MarqueeColor=g.MarqueeColor;this.TryIt.EnableSkipping=g.TryIt.EnableSkipping;this.DoIt.HotKey.Ctrl=g.DoIt.HotKey.Ctrl;this.DoIt.HotKey.Shift=g.DoIt.HotKey.Shift;this.DoIt.HotKey.Alt=g.DoIt.HotKey.Alt;this.DefaultPlayMode=g.DefaultPlayMode;this.WebPageAutoPlayback=g.WebPageAutoPlayback;this.NavbarVolume=g.NavbarVolume};
UserPreferences.prototype.Compare=function(g){if(this.PlayAudio!=g.PlayAudio)return true;if(this.ShowLeadIn!=g.ShowLeadIn)return true;if(this.MarqueeColor!=g.MarqueeColor)return true;if(this.TryIt.EnableSkipping!=g.TryIt.EnableSkipping)return true;if(this.DoIt.HotKey.Ctrl!=g.DoIt.HotKey.Ctrl)return true;if(this.DoIt.HotKey.Shift!=g.DoIt.HotKey.Shift)return true;if(this.DoIt.HotKey.Alt!=g.DoIt.HotKey.Alt)return true;if(this.DefaultPlayMode!=g.DefaultPlayMode)return true;if(this.WebPageAutoPlayback!=
g.WebPageAutoPlayback)return true;if(this.NavbarVolume!=g.NavbarVolume)return true;return false};UserPreferences.prototype.GetCookie=function(){return new Cookie(document,"OnDemandPlayer",365,"/")};
UserPreferences.prototype.LoadCookie=function(){var g=this.GetCookie();g.Load();if(!(UserPrefs.TimeStamp!="000000000000"&&(!g.TimeStamp||UserPrefs.TimeStamp>g.TimeStamp))){if(g.PlayAudio)this.PlayAudio=g.PlayAudio;if(g.ShowLeadIn)this.ShowLeadIn=g.ShowLeadIn;if(g.MarqueeColor)this.MarqueeColor=g.MarqueeColor;if(g.TryIt_EnableSkipping)this.TryIt.EnableSkipping=g.TryIt_EnableSkipping=="true";if(g.DoIt_HotKey_Ctrl)this.DoIt.HotKey.Ctrl=g.DoIt_HotKey_Ctrl;if(g.DoIt_HotKey_Shift)this.DoIt.HotKey.Shift=
g.DoIt_HotKey_Shift;if(g.DoIt_HotKey_Alt)this.DoIt.HotKey.Alt=g.DoIt_HotKey_Alt;if(g.DefaultPlayMode)this.DefaultPlayMode=g.DefaultPlayMode;if(g.WebPageAutoPlayback)this.WebPageAutoPlayback=g.WebPageAutoPlayback;if(g.NavbarVolume)this.NavbarVolume=g.NavbarVolume}};
UserPreferences.prototype.StoreCookie=function(){var g=this.GetCookie();g.TimeStamp=this.TimeStamp;g.PlayAudio=this.PlayAudio;g.ShowLeadIn=this.ShowLeadIn;g.MarqueeColor=this.MarqueeColor;g.TryIt_EnableSkipping=this.TryIt.EnableSkipping;g.DoIt_HotKey_Ctrl=this.DoIt.HotKey.Ctrl;g.DoIt_HotKey_Shift=this.DoIt.HotKey.Shift;g.DoIt_HotKey_Alt=this.DoIt.HotKey.Alt;g.DefaultPlayMode=this.DefaultPlayMode;g.WebPageAutoPlayback=this.WebPageAutoPlayback;g.NavbarVolume=this.NavbarVolume;g.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(g){g=g.split("&");for(var j=0;j<g.length;j++){var m=g[j].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(g,j,m){if(UserPrefs.EnablePreferences){g+="/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(z){}if(j)q[q.length]="nosound";if(m){q[q.length]="seeitonly";h=412}for(j=0;j<q.length;j++){g+=j==0?"?":"&";g+=q[j]}window.open(g,"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 g=this.GetCookie();g.Load();if(g.swipeInstructionShowed)this.swipeInstructionShowed=g.swipeInstructionShowed};
SessionPreferences.prototype.StoreCookie=function(){var g=this.GetCookie();g.swipeInstructionShowed=this.swipeInstructionShowed;g.Store()};var SessionPrefs=new SessionPreferences;function UserRolesClass(){this.Filtering=false;this.Roles=[]}UserRolesClass.prototype.Copy=function(g){this.Filtering=g.Filtering;this.Roles=[];for(var j=0;j<g.Roles.length;j++)this.Roles[j]=g.Roles[j]};
UserRolesClass.prototype.Compare=function(g){if(this.Filtering!=g.Filtering)return true;if(this.Roles.length!=g.Roles.length)return true;for(var j=0;j<this.Roles.length;j++)if(this.Roles[j]!=g.Roles[j])return true;return false};UserRolesClass.prototype.GetCookie=function(){return new Cookie(document,"OnDemandPlayerRoles",365,"/")};
UserRolesClass.prototype.LoadCookie=function(){var g=this.GetCookie();g.Load();this.Filtering=false;if(g.Filtering)this.Filtering=g.Filtering=="true";this.Roles=[];if(g.Roles)this.Roles=g.Roles.split("+")};UserRolesClass.prototype.StoreCookie=function(){var g=this.GetCookie();g.Filtering=this.Filtering?"true":"false";g.Roles=this.Roles.join("+");g.Store()};UserRolesClass.prototype.GetUrlParamString=function(){return"PP_ROLEFILTERING="+(this.Filtering?"true":"false")+"&PP_ROLES="+encodeURIComponent(this.Roles.join("+"))};
UserRolesClass.prototype.ParseUrlParamString=function(g){g=g.split("&");for(var j=0;j<g.length;j++){var m=g[j].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(g){window.open(g+"/preferences/roles.html","roleswin","width=500,height=318,resizable=1,scrollbars=0,top="+(screen.availHeight-286)/2+",left="+(screen.availWidth-500)/2)};var sounds=[];function SoundObj(g,j,m){_flist=j.split("+");_fct=_flist.length;this.flist=[];this.fct=0;this.duration=m;for(g=0;g<_fct;g++){s=_flist[g];if(s.substr(0,5)!="TEMP:"){this.flist[this.fct]=s;this.fct++}}}function Sound(g,j,m){if(g.indexOf(".")<0)g+=".ASX";sounds[g.substr(1)]=new SoundObj(g,j,m)};function onHelp(g){if(g.charAt(g.length-1)=="/")g=g.substr(0,g.length-1);if(g.length>0)g+="/";_top=_left=screen.availWidth/17;_height=screen.availHeight-3*_top;if(_height>500)_height=500;_width=_height*4.5/3;_height=390;_width=637;w=window.open(g+"../help/toc.html","odhelp","width="+_width+",height="+_height+",left="+_left+",top="+_top+",resizable=1,toolbar=1,scrollbars=1,location=0,menubar=0");w.focus()};var template_leadin="",template_leadout="",template_explanation="",template_pauselink="",template_knowit_leadin="",template_knowit_leadout="",template_knowit_nextstep="",template_knowit_explanation="",template_knowit_leadin_score="",template_knowit_warningL1="",template_knowit_warningL2="",template_knowit_warningL3_0="",template_knowit_warningL3_H="",template_knowit_warningL4="",template_scoring="",template_scoring_YES="",template_scoring_NO="",template_knowit_continue="",template_knowit_confirmdemo=
"",template_typingcomplete="",template_knowit_dragwarning="",template_knowit_finish_close="",template_knowit_finish_close_inassessment="",template_strinp_suppress_example=0,_template_arr=[],_template_retfv="";
function LoadTemplates(g,j){_template_retfv=j;if(document.implementation&&document.implementation.createDocument){xmlDoc=document.implementation.createDocument("","",null);xmlDoc.onload=LoadTemplates_Returned0}else if(window.ActiveXObject){xmlDoc=new ActiveXObject("Microsoft.XMLDOM");xmlDoc.onreadystatechange=function(){xmlDoc.readyState==4&&LoadTemplates_Returned0()}}else{LoadTemplates_Error();return}try{xmlDoc.load("../../template/"+g+"/template.xml")}catch(m){LoadXMLDocArray("../../template/"+
g+"/template.xml","LoadTemplates_Returned","LoadTemplates_Error","Item",true)}}function LoadTemplates_Returned0(){_nodesArray=[];for(var g=xmlDoc.getElementsByTagName("Item"),j=0;j<g.length;j++){n=g[j];xmlname=n.attributes[0].nodeValue;xmltext="";for(var m=0;m<n.childNodes.length;m++)if(n.childNodes[m].xml)xmltext+=n.childNodes[m].xml;else{var q=new XMLSerializer;xmltext+=q.serializeToString(n.childNodes[m])}_nodesArray[_nodesArray.length]=xmlname+"="+xmltext}LoadTemplates_Returned(_nodesArray)}
function LoadTemplates_Error(){alert("Common template loading error ...")}function LoadTemplates_Returned(g){_template_arr=[];for(var j=0;j<g.length;j++){k=g[j].indexOf("=");key=g[j].substr(0,k);value=g[j].substr(k+1);_template_arr[key]=value}LoadAll();setTimeout(_template_retfv,100)}function GetTemp(g){if(_template_arr[g])return _template_arr[g];return""}function Insert(g,j,m){return g.substr(0,m)+j+g.substr(m)}
function LoadAll(){template_leadin=GetTemp("leadin");template_leadout=GetTemp("leadout");template_explanation=GetTemp("continue");template_knowit_leadin=GetTemp("knowit_leadin");template_knowit_leadout=GetTemp("knowit_leadout");template_knowit_nextstep=GetTemp("knowit_nextstep");template_knowit_explanation=GetTemp("knowit_explanation");if(IsTouchDevice()){var g=' style="color:#0033cc;font-weight:bold;" href="javascript:HLink(0)"';template_leadin=R_swipe_start;var j=template_leadin.indexOf("<a");template_leadin=
Insert(template_leadin,g,j+2);g=' style="color:#0033cc;font-weight:bold;" href="javascript:HLink(2)"';template_explanation=R_swipe_continue;j=template_explanation.indexOf("<a");template_explanation=Insert(template_explanation,g,j+2);g=' style="color:#0033cc;font-weight:bold;" href="javascript:HLink(2)"';template_leadout=R_swipe_finish;j=template_leadout.indexOf("<a");template_leadout=Insert(template_leadout,g,j+2)}template_knowit_leadin_score=GetTemp("leadin_score");template_knowit_warningL1=GetTemp("knowit_warningL1");
template_knowit_warningL2=GetTemp("knowit_warningL2");template_knowit_warningL3_0=GetTemp("knowit_warningL3_0");template_knowit_warningL3_H=GetTemp("knowit_warningL3_H");template_knowit_warningL4=GetTemp("knowit_warningL4");template_scoring=GetTemp("scoring");template_scoring=template_scoring.substr(0,6)+' width="100%" '+template_scoring.substr(6);template_scoring_YES=GetTemp("scoring_YES");template_scoring_NO=GetTemp("scoring_NO");template_knowit_continue=GetTemp("knowit_continue");template_knowit_confirmdemo=
GetTemp("knowit_confirmdemo");template_typingcomplete=GetTemp("typingcomplete");template_knowit_dragwarning=GetTemp("knowit_dragwarning");template_knowit_finish_close=GetTemp("knowit_finish_close");template_knowit_finish_close_inassessment=GetTemp("knowit_finish_close_inassessment");template_strinp_suppress_example=GetTemp("strinp_suppress_example");s=GetTemplate_knowit_leadin_score("168")}function ReplaceAll(g,j,m){for(var q=g.indexOf(j);q>=0;){g=Template_Replace(g,j,m);q=g.indexOf(j)}return g}
function Template_Replace(g,j,m){var q=g.indexOf(j);if(q<0)return g;var u=g.substr(0,q);g=g.substr(q+j.length);return u+m+g}function GetTemplate_knowit_leadin_score(g){return Template_Replace(template_knowit_leadin_score,"$score$",g)}function GetTemplate_scoring(g,j,m){s=Replace(template_scoring,"$good$",g);ss=Replace(s,"$needed$",j);return Replace(ss,"$result$",m)};var _simulate_120_dpi=false;function IsTouchDevice(){var g=new BrowserInfo;GetBrowserInfo(g);if(g.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 g=new BrowserInfo;GetBrowserInfo(g);return g.name=="Firefox"}
function IsFF4(){var g=new BrowserInfo;GetBrowserInfo(g);if(g.name!="Firefox")return false;return g.version==4}function checkFFVersion(g){var j=new BrowserInfo;GetBrowserInfo(j);if(j.name!="Firefox")return false;return j.version==g}function IsSafari(){var g=new BrowserInfo;GetBrowserInfo(g);return g.name=="Safari"||g.name=="Chrome"}function IsExplorer(){var g=new BrowserInfo;GetBrowserInfo(g);return g.name=="MSIE"}
function IsIE7(){var g=new BrowserInfo;GetBrowserInfo(g);if(g.name!="MSIE")return false;return g.version==7}function IsIE8(){var g=new BrowserInfo;GetBrowserInfo(g);if(g.name!="MSIE")return false;return g.version==8||g.trident&&g.tridentVersion==4}function IsIE9(){var g=new BrowserInfo;GetBrowserInfo(g);if(g.name!="MSIE")return false;return g.version==9||g.trident&&g.tridentVersion==5}
function IsIE10(){var g=new BrowserInfo;GetBrowserInfo(g);if(g.name!="MSIE")return false;return g.version==10||g.trident&&g.tridentVersion==6}function IsActiveXEnabled(){var g=null;try{g=!!new ActiveXObject("htmlfile")}catch(j){g=false}return g}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(g){s=navigator.userAgent;k=-1;if(s.indexOf("Chrome")>=0){g.name="Chrome";k=s.indexOf("Chrome")+7}else if(s.indexOf("Opera")>=0){g.name="Opera";k=s.indexOf("Opera")+6}else if(s.indexOf("Firefox")>=0){g.name="Firefox";k=s.indexOf("Firefox")+8}else if(s.indexOf("Safari")>=0){g.name="Safari";k=s.indexOf("Version")+8}else if(s.indexOf("MSIE")>=0){g.name="MSIE";k=s.indexOf("MSIE")+5;var j=s.indexOf("Trident/");if(j>=0){g.trident=true;g.tridentVersion=parseInt(s.substr(j+8))}}else{g.name=
"other";g.version=0;return}g.version=parseInt(s.substr(k));g.subversion=parseInt(s.substr(k+2,1));if(g.name=="Safari"&&isNaN(g.version)){g.version=4;g.subversion=0}}function IsSupportedBrowser(){var g=new BrowserInfo;GetBrowserInfo(g);k=false;if(g.name=="MSIE"&&g.version>=7)k=true;if(g.name=="Firefox"&&(g.version>=3&&g.subversion>=5||g.version>=4))k=true;if(g.name=="Safari"&&g.version>=4)k=true;if(g.name=="Chrome"&&g.version>=18)k=true;return k}
function getDIV(g){try{if(document.all)return document.all(g);else if(document.getElementById)return document.getElementById(g);else if(document.layers){var j=document.layers.screen.document.layers[g];j||(j=document.layers[g]);return j}return 0}catch(m){return null}}
function getDIVstyle(g){try{if(document.all)return document.all(g).style;else if(document.getElementById){if(document.getElementById(g).style!=null)return document.getElementById(g).style}else if(document.layers){var j=document.layers.screen.document.layers[g];j||(j=document.layers[g]);return j}return 0}catch(m){return null}}function shiftTo(g,j,m){g=getDIVstyle(g);if(g.moveTo)g.moveTo(j,m);else{g.left=j+"px";g.top=m+"px"}}
function getUniWidth(g){try{var j=getDIV(g),m;if(g.style.width)m=parseInt(g.style.width);else if(g.style.pixelWidth)m=g.style.pixelWidth;else if(g.offsetWidth)m=g.offsetWidth;else if(document.defaultView&&document.defaultView.getComputedStyle)m=document.defaultView.getComputedStyle(j,"").getPropertyValue("width");if(typeof m=="string")m=parseInt(m);return m}catch(q){return null}}
function getUniHeight(g){try{var j=getDIV(g),m;if(g.style.height)m=parseInt(g.style.height);else if(g.style.pixelHeight)m=g.style.pixelHeight;else if(g.offsetHeight)m=g.offsetHeight;else if(document.defaultView&&document.defaultView.getComputedStyle)m=document.defaultView.getComputedStyle(j,"").getPropertyValue("height");if(typeof m=="string")m=parseInt(m);return m}catch(q){return null}}
function getClientWidth(g){try{var j=getDIV(g);return j.clientWidth?j.clientWidth:parseInt(j.width)}catch(m){return g.offsetWidth}}function getClientHeight(g){try{var j=getDIV(g);return j.clientHeight?j.clientHeight:parseInt(j.height)}catch(m){return g.offsetHeight}}function getObjHeight(g){g=getDIV(g);return g.clip?g.clip.height:g.offsetHeight}function getObjWidth(g){g=getDIV(g);return g.clip?g.clip.width:g.offsetWidth}
function getObjLeft(g){try{var j=getDIVstyle(g);return j.pixelLeft?j.pixelLeft:parseInt(j.left)}catch(m){return parseInt(g.offsetLeft)}}function getObjTop(g){try{var j=getDIVstyle(g);return j.pixelTop?j.pixelTop:parseInt(j.top)}catch(m){return parseInt(g.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(g,j){getDIVstyle(g).visibility="visible";if(j&&IsiOS())try{playMode=="S"&&showActObj.type=="Input"&&$("#"+g+" input").attr("readonly",true)}catch(m){}}function hide(g){getDIVstyle(g).visibility="hidden"}var __DPIwidth=0;
function getDpiInfo(){var g=document.getElementById("DPIInfoDiv");if(g!=null){__DPIwidth=g.clientWidth;__DPIwidth!=0&&document.getElementsByTagName("body")[0].removeChild(g)}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};var isOnLink=false;
function ShowInfoBlock(g){try{playMode!=null&&playMode!=""&&PlayStop()}catch(j){}var m=false;g=Escape.MyUnEscape(g);if(g.indexOf("odrel://")==0)g=resolve(g);for(var q=g;q.substr(0,3)=="../";)q=q.substr(3);if(q.substr(36)=="/index.html")m=true;if(m){m=screen.availWidth;m=(m-PlayerConfig.InfoWidth)/2;q=screen.availHeight;q=(q-PlayerConfig.InfoHeight)/2;id=window.open(g,"","top="+q+",left="+m+",width="+PlayerConfig.InfoWidth+",height="+PlayerConfig.InfoHeight+"toolbar=1,scrollbars=1,statusbar=1,resizable=1,fullscreen=0")}else{iw=PlayerConfig.InfoWidth;
ih=PlayerConfig.InfoHeight;if(PlayerConfig.InfoWidth2)if(PlayerConfig.InfoWidth2.length>0)iw=PlayerConfig.InfoWidth2;if(PlayerConfig.InfoHeight2)if(PlayerConfig.InfoHeight2.length>0)ih=PlayerConfig.InfoHeight2;m=screen.availWidth;m=(m-iw)/2;q=screen.availHeight;q=(q-ih)/2;id=window.open(g,"","top="+q+",left="+m+",width="+iw+",height="+ih+"toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,fullscreen=0")}setTimeout("Center("+m+","+q+")",500)}function OnLink(){isOnLink=true}
function OffLink(){isOnLink=false}var globalloc="";function MakeAbsolute(g){if(g.toLowerCase().substr(0,7)=="mailto:")return g;var j="";if(globalloc.length==0)for(globalloc=location.href;globalloc.indexOf("\\")!=-1;)globalloc=globalloc.replace("\\","/");j=globalloc;var m=j.indexOf("#");if(m<0)m=j.indexOf("?");if(m>=0)j=j.substr(0,m);m=j.lastIndexOf("/");return m!=-1&&g.indexOf("//")==-1?j.substr(0,m+1)+g:g}var id;function Center(g,j){try{id.focus();id.moveTo(g,j)}catch(m){}};var Escape={};Escape.SafeUri_EscapeCharacter="/";Escape.SafeUri_UnsafeCharacters=["<",">",'"',"'","%",";","(",")","&","+"];Escape.SafeUriEscape=function(g){return Escape.__Escape(g,1)};Escape.SafeUriUnEscape=function(g){return Escape.__UnEscape(g,1)};Escape.MyEscape=function(g){return Escape.__Escape(g,0)};Escape.MyUnEscape=function(g){return Escape.__UnEscape(g,0)};
Escape.__Escape=function(g,j){for(var m="",q=0;q<g.length;q++){ss=g.substr(q,1);if(j==0?Escape.__Normal_Contains(ss):!Escape.__SafeUri_Contains(ss))m+=ss;else{ss=g.charCodeAt(q);a="0000"+ss.toString(16).toUpperCase();m+=(j==0?"$":Escape.SafeUri_EscapeCharacter)+a.substr(a.length-4)}}return m};
Escape.__UnEscape=function(g,j){for(var m="",q=false,u=0;u<g.length;u++)if(q){ss=g.substr(u,4);m+=String.fromCharCode(parseInt("0x"+ss));u+=3;q=false}else{ss=g.substr(u,1);if(ss==(j==0?"$":Escape.SafeUri_EscapeCharacter))q=true;else m+=ss}return m};Escape.__Normal_Contains=function(g){return g>="0"&&g<="9"||g>="a"&&g<="z"||g>="A"&&g<="Z"};
Escape.__SafeUri_Contains=function(g){for(var j=Escape.SafeUri_UnsafeCharacters.length,m=0;m<j;m++)if(g==Escape.SafeUri_UnsafeCharacters[m])return true;if(g==Escape.SafeUri_EscapeCharacter)return true;return false};function UrlParser(){this.params=[];this.safemode=false}UrlParser.prototype.Clone=function(){var g=new UrlParser;g.params=[];g.safemode=this.safemode;for(var j in this.params)if(this.params[j]!=null)g.params[j]=this.params[j];return g};
UrlParser.prototype.Parse=function(){var g,j;g=document.location.hash.substring(1);g=g.split("&");if(g.length==0||g[0]==""){g=document.location.search.substring(1);g=g.split("&")}if(g.length>0)if(g[0].toLowerCase().substr(0,3)=="su="){this.safemode=true;g=g[0].substr(3);g=Escape.SafeUriUnEscape(g);g=g.split("&")}for(var m=0;m<g.length;m++){j=g[m];if(j.length!=0){var q=j.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()]=
j.substr(q[0].length+1)}}};UrlParser.prototype.GetSafeMode=function(){return this.safemode};UrlParser.prototype.SetSafeMode=function(g){this.safemode=g};UrlParser.prototype.GetParameter=function(g){return this.params[g.toLowerCase()]};UrlParser.prototype.AddParameter=function(g,j){this.params[g.toLowerCase()]=j};UrlParser.prototype.RemoveParameter=function(g){this.params[g.toLowerCase()]=null};UrlParser.prototype.ClearParameterList=function(){this.params=null;this.params=[]};
UrlParser.prototype.BuildParameterList=function(g){g="";var j=true,m;for(m in this.params){var q=this.params[m];if(q!=null){if(j==false)g+="&";j=false;g+=q.length==0?m:m+"="+this.params[m]}}if(this.safemode)g="su="+Escape.MyEscape(g);return g};
UrlParser.prototype.GetCorrectUrl=function(g,j){if(!this.safemode)return g;var m,q=g.indexOf("#");if(q==-1)q=g.indexOf("?");if(q>=0){var u=g.substring(q+1);m=u.split("&");if(m[0].toLowerCase().substr(0,3)=="su=")return g;return g.substring(0,q+1)+"su="+Escape.SafeUriEscape(u)}else return g+(j?"":"?su=")};function SplashWindow(){var g=document.documentElement.offsetWidth,j=document.documentElement.offsetHeight;document.open();document.writeln("<script>var splash_hidden=false;");document.writeln("function ShowSplash()");document.writeln("{if (splash_hidden==false)");document.writeln("document.getElementById('splash').style.display='block';}");document.writeln("function HideSplash()");document.writeln("{splash_hidden=true; document.getElementById('splash').style.display='none';}");document.writeln("<\/script>");
document.writeln("<DIV id='splash' style='display:none;position:absolute;left:0;top:"+(j/2-50)+";width:"+g+";height:200'>");document.writeln("<p align='center'><font color='#FF0000' face='Arial' style='font-size:11pt'>");document.writeln(R_splashtext);document.writeln("</font></p>");document.writeln("</DIV>");document.writeln("<script>setTimeout('ShowSplash()',2000);<\/script>");document.close()}SplashWindow();function getElementsByAttribute(g,j){var m=[],q=[];if(g=="id"&&document.all&&!IsFF3()){m=document.all.item(j);if(m!=null)if(m.length!=null)for(u=0;u<m.length;u++)q[q.length]=m(u);else q[q.length]=m;return q}m=document.all&&!IsFF3()?document.all:document.getElementsByTagName("*");for(var u=0;u<m.length;u++)if(g=="class"){if(RegExp("(^| )"+j+"( |$)").test(m[u].className))q[q.length]=m[u]}else if(g=="for"){if(m[u].getAttribute("htmlFor")||m[u].getAttribute("for"))if(m[u].htmlFor==j)q[q.length]=m[u]}else if(m[u].getAttribute(g)==
j)q[q.length]=m[u];return q}function getElementOfObject(g,j){var m="",q=getElementsByAttribute("id",g),u;for(u in q)for(m=q[u];m.parentNode!=null;){if(m.parentNode==j)return q[u];m=m.parentNode}return false}
var objIcon02Img,objYesImg0,objNoImg0,objDoneTypingImg0,objYesImg1,objNoImg1,objDoneTypingImg1,spanE,spanEYes,spanENo,mobjBubble=0,mobjContent=0,mobjPointer=0,mblnShowPointer=false,mAct,topPadding=38,leftPadding=14,rightPadding=14,bottomPadding=3,m_Pointed,m_PointerXpos=0,m_PointerYpos=0,m_PointerDirection=BUBB07_NOPOINTER,m_bWidth=0,m_bHeight=0,m_scrOffLeft=0,m_scrOffTop=0,BUBB07_NULL=0,BUBB07_NOPOINTER=0,BUBB07_TOPLEFT=3,BUBB07_TOPRIGHT=4,BUBB07_BOTTOMLEFT=1,BUBB07_BOTTOMRIGHT=2,BUBB07_LEFTTOP=
7,BUBB07_RIGHTTOP=8,BUBB07_LEFTBOTTOM=5,BUBB07_RIGHTBOTTOM=6,BUBB07_DEFAULTWIDTH=200-leftPadding-rightPadding,BUBB07_LEFTAREA=37,m_BubblePath="../../../img/",ash=false,abubbv02_bubbcolor=0,tID=0,setpos=true,img2on,img2off,imagesArr=[],imagesXref=[];
function cached_image(g){var j;for(j=convert(String(g),10,16);j.length<6;)j="0"+j;j=j.toLowerCase();this.imageNames=j=[m_BubblePath+"giftrk1.gif",m_BubblePath+"b"+j+"_03.gif",m_BubblePath+"b"+j+"_03over.gif",m_BubblePath+"b"+j+"_01.gif",m_BubblePath+"b"+j+"_02.gif",m_BubblePath+"b"+j+"_04.gif",m_BubblePath+"b"+j+"_06.gif",m_BubblePath+"b"+j+"_07.gif",m_BubblePath+"b"+j+"_08.gif",m_BubblePath+"b"+j+"_09.gif",m_BubblePath+"b"+j+"_anch_tl.gif",m_BubblePath+"b"+j+"_anch_tr.gif",m_BubblePath+"b"+j+"_anch_lthigh.gif",
m_BubblePath+"b"+j+"_anch_ltlow.gif",m_BubblePath+"b"+j+"_anch_rthigh.gif",m_BubblePath+"b"+j+"_anch_rtlow.gif",m_BubblePath+"b"+j+"_anch_bl.gif",m_BubblePath+"b"+j+"_anch_br.gif",m_BubblePath+"b"+j+"_03disab.gif",m_BubblePath+"b"+j+"_03empty.gif"];this.color=g;g=document.createElement("img");g.width=23;g.height=21;g.src=j[2];var m=document.createElement("img");m.width=23;m.height=21;m.src=j[1];this.imgon=g;this.imgoff=m}
function cached_images(g){abubbv02_bubbcolor=g;if(!imagesArr["c_"+g]){imagesArr["c_"+g]=new cached_image(g);imagesXref[imagesXref.length]="c_"+g}}function load_buttons(){if(document.images){img2on=imagesArr["c_"+abubbv02_bubbcolor].imgon;img2off=imagesArr["c_"+abubbv02_bubbcolor].imgoff}}function GetScrName(g){k=g.lastIndexOf("/");s=g.substr(k+1);return"../../img/"+s}
function BubbleimgOn(g,j){if(j){getElementOfObject(g,mobjBubble).style.display="none";getElementOfObject(j,mobjBubble).style.display="block"}else if(document.images)mobjBubble.all[g].src=event.offsetX>=3&&event.offsetX<=26&&event.offsetY>=7&&event.offsetX<=27?GetScrName(eval(g+"on.src")):GetScrName(eval(g+"off.src"))}
function BubbleimgOff(g,j){if(j){getElementOfObject(g,mobjBubble).style.display="block";getElementOfObject(j,mobjBubble).style.display="none"}else if(document.images)mobjBubble.all[g].src=GetScrName(eval(g+"off.src"))}function BubbleClose(){OnClose()}
function InAnchor(g){var j=false,m=g.offsetX;g=g.offsetY;switch(abubbv02_Pointer){case BUBB07_TOPLEFT:if(m>=3&&g<=38)if(37/14*(18-m)+g>38)j=true;break;case BUBB07_TOPRIGHT:if(m<=15&&g<=38)if(-34/12*(13-m)+g>1)j=true;break;case BUBB07_BOTTOMLEFT:if(m>=3)if(-3*(5-m)+g<41)j=true;break;case BUBB07_BOTTOMRIGHT:if(m<=15)if(37/13*(14-m)+g<41)j=true;break;case BUBB07_LEFTTOP:if(g>=3)if(12/37*(38-m)+g<15)j=true;break;case BUBB07_LEFTBOTTOM:if(g<=15)if(-12/37*(38-m)+g>3)j=true;break;case BUBB07_RIGHTTOP:if(g>=
3)if(12/-37*(1-m)+g<15)j=true;break;case BUBB07_RIGHTBOTTOM:if(g>=3)if(-12/-37*(1-m)+g>3)j=true}return j}function AnchorMouseDown(){InAnchor(event)||EventMouseDown(event)}function AnchorMouseUp(){InAnchor(event)||EventMouseUp(event)}
function convert(g,j,m){base="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";c=0;Result="";for(t=1;t<=g.length;t++){b=base.indexOf(g.substring(t-1,t));n=b*Math.pow(j,g.length-t);c+=n}for(a=100;c<Math.pow(m,a);)a--;for(;a>-1;){e=Math.pow(m,a);a--;d=(c-c%e)/e+1;c%=e;Ciffer=base.substring(d-1,d);Result+=Ciffer}return Result}N=document.all&&!IsFF3()?0:1;var ob=false,xi,yi,X,Y,global_moveable=true;
function bubb07_global_MD(g){if(global_moveable)if(N){ob=g.target;if(g.target.id=="blink"||g.target.id=="m_Caption"||g.target.id=="m_StaticCaption"){xi=g.target.id=="blink"||g.target.id=="m_StaticCaption"?document.getElementById("bubb_cap").offsetWidth:0;ob=true;X=g.layerX;Y=g.layerY}return false}else if(event.srcElement.id=="blink"||event.srcElement.id=="m_Caption"||event.srcElement.id=="m_StaticCaption"){xi=event.srcElement.id=="blink"||event.srcElement.id=="m_StaticCaption"?mobjBubble.all.bubb_cap.clientWidth:
0;ob=true;X=window.event.offsetX;Y=window.event.offsetY}}
function bubb07_global_MM(g){if(ob)if(IsTouchDevice()){if(ob==true){rightarea=leftarea=0;var j=g.clientX-X,m=g.clientY-Y;j=getObjLeft(mobjBubble)+j;m=getObjTop(mobjBubble)+m;X=g.clientX;Y=g.clientY;mobjBubble.style.left=j+"px";mobjBubble.style.top=m+"px";mobjContent.style.left=Number(j+leftPadding)+"px";mobjContent.style.top=Number(m+topPadding)+"px"}}else if(N){if(ob==true){rightarea=leftarea=0;j=g.pageX-X;m=g.pageY-Y;mobjBubble.style.left=j+"px";mobjBubble.style.top=m+"px";mobjContent.style.left=
Number(j+leftPadding)+"px";mobjContent.style.top=Number(m+topPadding)+"px";document.getElementById("blink").focus()}}else{if(ob==true){rightarea=leftarea=0;j=event.clientX-X-14-xi+document.body.scrollLeft-leftarea;m=event.clientY-Y+document.body.scrollTop-rightarea;mobjBubble.style.left=j+"px";mobjBubble.style.top=m+"px";mobjContent.style.left=Number(j+leftPadding)+"px";mobjContent.style.top=Number(m+topPadding)+"px"}return false}}function bubb07_global_MU(){ob&&OnBubbleMoved();ob=false}
N&&document.captureEvents(Event.MOUSEDOWN|Event.MOUSEMOVE|Event.MOUSEUP);function touch(g){if(g.originalEvent.touches&&g.originalEvent.touches.length)return g.originalEvent.touches[0];else if(g.originalEvent.changedTouches&&g.originalEvent.changedTouches.length)return g.originalEvent.changedTouches[0]}
if(IsTouchDevice()){$(document).bind("touchend",function(g){bubb07_global_MM(touch(g));ob&&g.preventDefault();ob=false});$(document).bind("touchmove",function(g){bubb07_global_MM(touch(g));ob&&g.preventDefault()});$(document).bind("touchstart",function(g){if(global_moveable){var j=touch(g);if(j.target.id=="blink"||j.target.id=="m_Caption"||j.target.id=="m_StaticCaption"){g.preventDefault();ob=true}X=j.clientX;Y=j.clientY}})}else if(document.attachEvent){document.attachEvent("onmousedown",bubb07_global_MD);
document.attachEvent("onmousemove",bubb07_global_MM);document.attachEvent("onmouseup",bubb07_global_MU)}else{document.addEventListener("mousedown",bubb07_global_MD,true);document.addEventListener("mousemove",bubb07_global_MM,true);document.addEventListener("mouseup",bubb07_global_MU,true)}function JSRect(g,j,m,q){this.m_Left=g;this.m_Top=j;this.m_Right=m;this.m_Bottom=q}
function JSBubbleInterface(g){abubbv02_bVisible=false;abubbv02_show=true;abubbv02_IconName=abubbv02_ActionText=abubbv02_CaptionText=abubbv02_Text="";abubbv02_Pointer=BUBB07_NULL;abubbv02_infos="";abubbv02_enableclose=1;m_Pointed=true;_ay=_ax=0;m_rect=new JSRect(-1,-1,-1,-1);this.m_knrect=new JSRect(-1,-1,-1,-1);this.m_bFFClearHeight=false;this.m_Name=g;this.lastbubbstyle=this.m_Caption=this.m_Text="";this.m_bMoveDefPos=this.EnabledAction=this.m_ShowAction=false;this.savedPos=null}
JSBubbleInterface.prototype.SetMode=function(g){abubbv02_CaptionText=g};JSBubbleInterface.prototype.ShowMode=function(){if(abubbv02_show==true)if(document.all&&!IsFF3())mobjBubble.all.m_Caption.innerText=abubbv02_CaptionText;else{var g=getElementsByAttribute("id","m_Caption"),j;for(j in g)g[j].textContent=abubbv02_CaptionText}};JSBubbleInterface.prototype.StartBlink=function(){BlinkTxt()};
JSBubbleInterface.prototype.EndBlink=function(){clearTimeout(tID);document.getElementById("prdiv").style.color="blue"};JSBubbleInterface.prototype.SetColor=function(g){abubbv02_bubbcolor=g};function BlinkTxt(){if(mobjContent){var g=getElementOfObject("prdiv",mobjContent);if(g)g.style.color=g.style.color=="#ccffff"||g.style.color=="rgb(204, 255, 255)"||g.style.color=="#7dc1db"||g.style.color=="rgb(125, 193, 219)"?"#003366":grayBubbles?"#7dc1db":"#ccffff"}tID=setTimeout("BlinkTxt()",750)}
JSBubbleInterface.prototype.SetEnableCloseButton=function(g){if(abubbv02_show==true){var j=document.getElementById("closebtn_"+abubbv02_bubbcolor);str="";str=g==1?"<div id='closebtn_"+abubbv02_bubbcolor+"' style='position:relative'><div><img id='img2' name='img2' src='"+imagesArr["c_"+abubbv02_bubbcolor].imageNames[1]+"' style='display:block' width='32' height='27' border='0'><img id='img2o' name='img2o' src='"+imagesArr["c_"+abubbv02_bubbcolor].imageNames[2]+"' style='display:none' width='32' height='27' border='0'></div><div style='position:absolute; left:3px; top:7px'><a onclick='BubbleClose();return false'"+
(IsTouchDevice()?"":' onMouseMove=\'BubbleimgOn("img2","img2o")\' onMouseOut=\'BubbleimgOff("img2","img2o")\'')+"><img alt='"+R_bubble_closeondemand+"' id='imghandler' name='imghandler' src='"+imagesArr["c_"+abubbv02_bubbcolor].imageNames[0]+"' style='display:block' width='23' height='20' border='0'></a></div></div></td>":g==0?'<a id="closebtn_'+abubbv02_bubbcolor+'" onclick=""><img name="img2" src="'+imagesArr["c_"+abubbv02_bubbcolor].imageNames[18]+'" width="32" height="27" border="0" alt="'+R_bubble_closeondemand+
'"></td>':'<a id="closebtn_'+abubbv02_bubbcolor+'" onclick=""><img name="img2" src="'+imagesArr["c_"+abubbv02_bubbcolor].imageNames[19]+'" width="32" height="27" border="0" alt=""></td>';if(document.all&&!IsFF3())j.outerHTML=str;else{var m=j.ownerDocument.createRange();m.setStartBefore(j);m=m.createContextualFragment(str);j.parentNode.replaceChild(m,j)}}abubbv02_enableclose=g};JSBubbleInterface.prototype.GetActionLink=function(){return getElementOfObject("m_ActionText",mobjBubble)};
JSBubbleInterface.prototype.SetPRText=function(g){if(mobjContent){var j=document.getElementById("prdiv");if(j!=null)if(document.all&&!IsFF3())j.innerText=g;else j.textContent=g}};var noactionstitle=false;JSBubbleInterface.prototype.SetActionText=function(g,j){abubbv02_ActionText=g;noactionstitle=j;this.ShowActionText()};
JSBubbleInterface.prototype.ShowActionText=function(){if(mobjBubble)if(abubbv02_show==true)if(document.all&&!IsFF3()){if(!noactionstitle)mobjBubble.all.m_ActionText.title=R_interface_action_alt;mobjBubble.all.m_ActionText.innerText=abubbv02_ActionText}else{mAct=getElementOfObject("m_ActionText",mobjBubble);if(!noactionstitle)mAct.title=R_interface_action_alt;mAct.textContent=abubbv02_ActionText}};
JSBubbleInterface.prototype.Show=function(){this.ShowActionText();abubbv02_bVisible=true;if(mobjBubble){mobjBubble.style.visibility="visible";mobjBubble.style.zIndex=2;mobjBubble.style.left=Math.abs(getObjLeft(mobjBubble))+"px";mobjContent.style.visibility="visible";mobjContent.style.zIndex=3;if(mblnShowPointer){mobjPointer.style.visibility="visible";mobjPointer.style.zIndex=4}mAct=getElementOfObject("m_ActionText",mobjBubble);mAct.style.visibility="visible"}};
JSBubbleInterface.prototype.Hide=function(){if(mobjBubble){abubbv02_bVisible=false;_ax=getObjLeft(mobjContent);_ay=getObjTop(mobjContent);mobjBubble.style.visibility="hidden";mobjBubble.style.left="-"+Math.abs(getObjLeft(mobjBubble))+"px";mobjContent.style.visibility="hidden";if(mblnShowPointer)mobjPointer.style.visibility="hidden";mAct=getElementOfObject("m_ActionText",mobjBubble);mAct.style.visibility="hidden"}};
JSBubbleInterface.prototype.IsVisible=function(){if(mobjBubble)return abubbv02_bVisible;return false};
JSBubbleInterface.prototype.SetErrorMessage=function(g){this.m_bFFClearHeight=true;var j;j=getElementOfObject("errortext",mobjContent);if(abubbv02_show==true)if(g==""){this.Hide();this.ShowText();kmbdefpos=false;RepositionBubble(this);this.Show()}else{this.SetEnableCloseButton(true);if(!j){this.Hide();this.ShowText();j=mobjContent;var m=document.createElement("span");m.ID="errortext";var q=document.createElement("b"),u=document.createElement("font");u.color="#FF0000";u.face="Arial";u.size="2";u.setAttribute("style",
"font-family:Arial; font-size:10pt;");if(document.all&&!IsFF3())u.innerText=g;else u.textContent=g;q.appendChild(u);m.appendChild(q);g=document.createElement("hr");m.appendChild(g);document.all&&!IsFF3()?j.insertBefore(m,j.children(0)):j.insertBefore(m,j.firstChild);this.RefreshBubble();kmbdefpos=false;RepositionBubble(this);this.Show()}}};JSBubbleInterface.prototype.SetIcon=function(g){if(g!="")abubbv02_IconName=g};JSBubbleInterface.prototype.SetMoveable=function(g){global_moveable=g};
JSBubbleInterface.prototype.RefreshBubble=function(){mobjContent.style.pixelWidth=BUBB07_DEFAULTWIDTH;mobjContent.style.width=BUBB07_DEFAULTWIDTH+"px"};JSBubbleInterface.prototype.SetText=function(g){abubbv02_Text=g};JSBubbleInterface.prototype.ResetContent=function(){abubbv02_IconName="";m_ShowAction="false";abubbv02_infos=""};
JSBubbleInterface.prototype.ShowText=function(){text=abubbv02_Text;if(abubbv02_show==true){var g=mobjContent;if(text=="")text='<DIV style="visibility: hidden">longtextlongtextlongtext</DIV>';g.innerHTML=text;if(abubbv02_IconName!=""){var j=document.createElement("img");j.width=32;j.height=32;j.border=0;j.align="left";j.src=m_BubblePath+abubbv02_IconName;document.all&&!IsFF3()?g.insertBefore(j,g.children(0)):g.firstChild.insertBefore(j,g.firstChild.firstChild)}var m=document.createElement("table");
m.cellspacing=0;m.cellpadding=0;m.style.marginBottom="8px";var q=document.createElement("tbody"),u=document.createElement("tr"),z=document.createElement("td");z.height=5;u.appendChild(z);q.appendChild(u);if(this.m_ShowAction||abubbv02_infos){u=document.createElement("tr");if(this.m_ShowAction){z=document.createElement("td");z.align="right";var v=document.createElement("a");v.href="javascript:OnAlternative();";j=document.createElement("img");j.width=22;j.height=22;j.border=0;j.alt=R_menu_alternatives;
j.src=m_BubblePath+"alternatives.gif";v.appendChild(j);z.appendChild(v);if(screens[showScreen].infoblocks.length>0){v=document.createElement("img");v.width=16;v.height=19;v.border=0;v.src=m_BubblePath+"icondivide.gif";z.appendChild(v)}u.appendChild(z)}if(screens[showScreen].infoblocks.length>0)for(j=0;j<screens[showScreen].infoblocks.length;j++){z=screens[showScreen].infoblocks[j];var A=document.createElement("td");A.width=25;A.border=0;v=document.createElement("a");v.href=z.url;v.title=z.tooltip;
var C=document.createElement("img");C.src=z.buttonfile;C.width=22;C.height=22;C.border=0;C.alt=z.tooltip;v.appendChild(C);A.appendChild(v);u.appendChild(A)}q.appendChild(u)}m.appendChild(q);g.appendChild(m);if(playMode=="K"){if(g=document.getElementById("img_icon02")){j=objIcon02Img.cloneNode(null);g.appendChild(j)}UpdateYesNo(false,false)}UpdateDoneTyping(false)}};
function UpdateDoneTyping(){for(var g=getElementsByAttribute("id","img_DoneTyping"),j=0;j<g.length;j++)if(objDoneTyping=g[j])if(document.all&&!IsFF3()&&objDoneTyping.childNodes.length==0||!document.all&&objDoneTyping.nodeType==1){spanE.innerHTML=R_tcbutton_title;objDoneTyping.appendChild(objDoneTypingA);objDoneTypingA.appendChild(objDoneTypingImg0);objDoneTypingImg0.appendChild(spanE);if(playMode=="K"){br=document.createElement("P");br.innerHTML="&nbsp;";br2=document.createElement("P");br2.innerHTML=
"&nbsp;";objDoneTyping.appendChild(br);objDoneTyping.appendChild(br2);objDoneTypingImg0.style.marginTop="0px"}else{br=document.createElement("p");br.style.height="42px";objDoneTyping.appendChild(br);objDoneTypingImg0.style.marginTop="10px"}objDoneTypingImg0.style.marginBottom="15px"}}
function UpdateYesNo(){var g=document.getElementById("img_YesNo");if(g)if(g.childNodes.length==0||!mobjContent.all){spanENo.innerHTML=R_nobutton_title;objNoA.appendChild(spanENo);g.appendChild(objNoA);var j=document.createTextNode("  ");g.appendChild(j);spanEYes.innerHTML=R_yesbutton_title;objYesA.appendChild(spanEYes);g.appendChild(objYesA);yesnobr=document.createElement("P");yesnobr.innerHTML="&nbsp;";g.appendChild(yesnobr)}}function YesOnClick(){HLink(11)}function YesOnMouseOver(){HLink(111)}
function YesOnMouseOut(){HLink(110)}function NoOnClick(){HLink(12)}function NoOnMouseOver(){HLink(121)}function NoOnMouseOut(){HLink(120)}function DTOnClick(){HLink(13)}function DTOnMouseOver(){HLink(131)}function DTOnMouseOut(){HLink(130)}JSBubbleInterface.prototype.SetAlternative=function(g,j){this.m_ShowAction=g;this.EnabledAction=j};
JSBubbleInterface.prototype.AddInfoBlock=function(g,j,m){m=fixHTMLString(m);abubbv02_infos+="<td width='25' border='0'><a target='_blank' href='"+j+"'><img src='"+g+"' width='22' height='22' border='0' alt='"+m+"'></img></a></td>"};var kmbdefpos=false,FirstBubble=true;
JSBubbleInterface.prototype.HandleRepos=function(){try{var g=getDIV("screen"),j=m_scrOffLeft-g.offsetLeft,m=m_scrOffTop-g.offsetTop;if(j!=0){mobjContent.style.left=Number(getObjLeft(mobjContent)-j)+"px";mobjContent.style.top=Number(getObjTop(mobjContent)-m)+"px";mobjBubble.style.left=Number(getObjLeft(mobjBubble)-j)+"px";mobjBubble.style.top=Number(getObjTop(mobjBubble)-m)+"px";if(mobjPointer){mobjPointer.style.left=Number(getObjLeft(mobjPointer)-j)+"px";mobjPointer.style.top=Number(getObjTop(mobjPointer)-
m)+"px"}}m_scrOffLeft=g.offsetLeft;m_scrOffTop=g.offsetTop}catch(q){}};JSBubbleInterface.prototype.GetBubbleLeft=function(g){if(!g)return getObjLeft(mobjBubble);switch(m_PointerDirection){case BUBB07_LEFTTOP:case BUBB07_LEFTBOTTOM:return getObjLeft(mobjPointer);default:return getObjLeft(mobjBubble)}};JSBubbleInterface.prototype.GetBubbleTop=function(g){if(!g)return getObjTop(mobjBubble);switch(m_PointerDirection){case BUBB07_TOPLEFT:case BUBB07_TOPRIGHT:return getObjTop(mobjPointer);default:return getObjTop(mobjBubble)}};
JSBubbleInterface.prototype.GetBubbleWidth=function(g){if(!g)return getClientWidth(mobjBubble);switch(m_PointerDirection){case BUBB07_LEFTTOP:case BUBB07_RIGHTTOP:case BUBB07_LEFTBOTTOM:case BUBB07_RIGHTBOTTOM:return getClientWidth(mobjBubble)+getClientWidth(mobjPointer);default:return getClientWidth(mobjBubble)}};
JSBubbleInterface.prototype.GetBubbleHeight=function(g){if(!g)return getClientHeight(mobjBubble);switch(m_PointerDirection){case BUBB07_TOPLEFT:case BUBB07_TOPRIGHT:case BUBB07_BOTTOMLEFT:case BUBB07_BOTTOMRIGHT:return getClientHeight(mobjBubble)+getClientHeight(mobjPointer);default:return getClientHeight(mobjBubble)}};JSBubbleInterface.prototype.GetBubblePointer=function(){return m_PointerDirection};
function SavedPosition(g,j,m,q,u,z,v,A,C,G){this.left=g;this.top=j;this.right=m;this.bottom=q;this.pointed=u;this.pointerDirection=z;this.pointerXpos=v;this.pointerYpos=A;this.bwidth=C;this.bheight=G}
JSBubbleInterface.prototype.RefreshPosition=function(){if(this.savedPos!=null)if(this.IsVisible()!=false){this.SetPosition(this.savedPos.left,this.savedPos.top,this.savedPos.right,this.savedPos.bottom,this.savedPos.pointed,this.savedPos.pointerDirection,this.savedPos.pointerXpos,this.savedPos.pointerYpos,this.savedPos.bwidth,this.savedPos.bheight);this.Show()}};
JSBubbleInterface.prototype.SetPosition=function(g,j,m,q,u,z,v,A,C,G){this.savedPos=new SavedPosition(g,j,m,q,u,z,v,A,C,G);mobjContent=document.getElementById("content");this.Hide();this.ShowText();this.RefreshBubble();if(m_rect.m_Left==-1&&this.m_bMoveDefPos)kmbdefpos=true;if(FirstBubble){this.m_bMoveDefPos=true;FirstBubble=false}m_rect.m_Left=g;m_rect.m_Top=j;m_rect.m_Right=m;m_rect.m_Bottom=q;m_Pointed=u;m_PointerDirection=z;m_PointerXpos=v;m_PointerYpos=A;m_bWidth=C;m_bHeight=G;mblnShowPointer=
m_Pointed;RepositionBubble(this);this.ShowMode()};
function RepositionBubble(g){g.SetEnableCloseButton(abubbv02_enableclose);var j=m_rect.m_Right,m=m_rect.m_Left,q=m_rect.m_Bottom,u=m_rect.m_Top,z=m_Pointed,v=0,A=0,C=getDIV("screen");if(m_bWidth>C.style.pixelWidth)m_bWidth=C.style.pixelWidth;var G=C.offsetLeft,F=C.offsetTop;m_scrOffLeft=C.offsetLeft;m_scrOffTop=C.offsetTop;if(abubbv02_show==true){var K=document.body.clientWidth,I=document.body.clientHeight,U=mobjContent.clientWidth,P=mobjContent.clientHeight;if(setpos){g.m_knrect.left=getObjLeft(mobjContent);
g.m_knrect.top=getObjTop(mobjContent)}if(m==-1&&z&&m_PointerDirection==0)setpos=false;if(!z){setpos=m_bWidth?false:true;if(g.m_knrect.left){mobjContent.style.left=g.m_knrect.left+"px";mobjContent.style.top=g.m_knrect.top+"px"}}if(z){setpos=false;if(mobjContent&&m_PointerDirection>0){abubbv02_Pointer=m_PointerDirection;mobjContent.style.pixelWidth=m_bWidth-28;mobjContent.style.pixelHeight=m_bHeight-41;if(m_bWidth)mobjContent.style.width=m_bWidth-28+"px";mobjContent.style.height="";if(!g.m_bFFClearHeight&&
mobjContent.clientHeight<m_bHeight-41)mobjContent.style.height=m_bHeight-41+"px";var S=0;for(v=false;!v;){if(abubbv02_Pointer==BUBB07_TOPLEFT){GetBubble("bubbTLp",abubbv02_bubbcolor);v=G+m_PointerXpos-4;A=F+m_PointerYpos;mobjPointer.style.left=v+"px";mobjPointer.style.top=A+"px";mobjBubble.style.left=Number(v-leftPadding)+"px";mobjBubble.style.top=Number(A+38)+"px";mobjContent.style.left=v+"px";mobjContent.style.top=Number(A+37+topPadding)+"px";mobjBubble.style.zIndex=2;mobjContent.style.zIndex=3;
mobjPointer.style.zIndex=4}if(abubbv02_Pointer==BUBB07_TOPRIGHT){GetBubble("bubbTRp",abubbv02_bubbcolor);v=G+m_PointerXpos-10;A=F+m_PointerYpos;mobjPointer.style.left=Number(v-5)+"px";mobjPointer.style.top=A+"px";mobjBubble.style.left=Number(v+leftPadding+rightPadding-mobjBubble.clientWidth)+"px";mobjBubble.style.top=Number(A+38)+"px";mobjContent.style.left=Number(v+leftPadding+rightPadding-mobjBubble.clientWidth+leftPadding)+"px";mobjContent.style.top=Number(A+37+topPadding)+"px";mobjBubble.style.zIndex=
2;mobjContent.style.zIndex=3;mobjPointer.style.zIndex=4}if(abubbv02_Pointer==BUBB07_BOTTOMRIGHT){GetBubble("bubbBRp",abubbv02_bubbcolor);v=G+m_PointerXpos-10;A=F+m_PointerYpos-41;mobjPointer.style.left=Number(v-5)+"px";mobjPointer.style.top=A+"px";mobjBubble.style.left=Number(v+leftPadding+rightPadding-mobjBubble.clientWidth)+"px";mobjBubble.style.top=Number(A-mobjBubble.clientHeight+3)+"px";mobjContent.style.left=Number(v+leftPadding+rightPadding-mobjBubble.clientWidth+leftPadding)+"px";mobjContent.style.top=
Number(A-mobjBubble.clientHeight+2+topPadding)+"px";mobjBubble.style.zIndex=2;mobjContent.style.zIndex=3;mobjPointer.style.zIndex=4}if(abubbv02_Pointer==BUBB07_BOTTOMLEFT){GetBubble("bubbBLp",abubbv02_bubbcolor);v=G+m_PointerXpos-4;A=F+m_PointerYpos-41;mobjPointer.style.left=v+"px";mobjPointer.style.top=A+"px";mobjBubble.style.left=Number(v-leftPadding)+"px";mobjBubble.style.top=Number(A-mobjBubble.clientHeight+3)+"px";mobjContent.style.left=v+"px";mobjContent.style.top=Number(A-mobjBubble.clientHeight+
2+topPadding)+"px";mobjBubble.style.zIndex=2;mobjContent.style.zIndex=3;mobjPointer.style.zIndex=4}if(abubbv02_Pointer==BUBB07_LEFTTOP){GetBubble("bubbLTp",abubbv02_bubbcolor);v=G+m_PointerXpos;A=F+m_PointerYpos-3;mobjPointer.style.left=v+"px";mobjPointer.style.top=A+"px";mobjBubble.style.left=Number(v-leftPadding+52)+"px";mobjBubble.style.top=Number(A-15)+"px";mobjContent.style.left=Number(v+52)+"px";mobjContent.style.top=Number(A+topPadding-16)+"px";mobjBubble.style.zIndex=2;mobjContent.style.zIndex=
3;mobjPointer.style.zIndex=4}if(abubbv02_Pointer==BUBB07_RIGHTTOP){GetBubble("bubbRTp",abubbv02_bubbcolor);v=G+m_PointerXpos-41;A=F+m_PointerYpos-3;mobjPointer.style.left=v+"px";mobjPointer.style.top=A+"px";mobjBubble.style.left=Number(v-leftPadding-mobjBubble.clientWidth+17)+"px";mobjBubble.style.top=Number(A-15)+"px";mobjContent.style.left=Number(v-leftPadding-mobjBubble.clientWidth+leftPadding+17)+"px";mobjContent.style.top=Number(A+topPadding-16)+"px";mobjBubble.style.zIndex=2;mobjContent.style.zIndex=
3;mobjPointer.style.zIndex=4}if(abubbv02_Pointer==BUBB07_RIGHTBOTTOM){GetBubble("bubbRBp",abubbv02_bubbcolor);v=G+m_PointerXpos-41;A=F+m_PointerYpos-15;mobjPointer.style.left=v+"px";mobjPointer.style.top=A+"px";mobjBubble.style.left=Number(v-leftPadding-mobjBubble.clientWidth+17)+"px";mobjBubble.style.top=Number(A-mobjBubble.clientHeight+33)+"px";mobjContent.style.left=Number(v-leftPadding-mobjBubble.clientWidth+leftPadding+17)+"px";mobjContent.style.top=Number(A-mobjBubble.clientHeight+32+topPadding)+
"px";mobjBubble.style.zIndex=2;mobjContent.style.zIndex=3;mobjPointer.style.zIndex=4}if(abubbv02_Pointer==BUBB07_LEFTBOTTOM){GetBubble("bubbLBp",abubbv02_bubbcolor);v=G+m_PointerXpos;A=F+m_PointerYpos-15;mobjPointer.style.left=v+"px";mobjPointer.style.top=A+"px";mobjBubble.style.left=Number(v-leftPadding+52)+"px";mobjBubble.style.top=Number(A-mobjBubble.clientHeight+33)+"px";mobjContent.style.left=Number(v+52)+"px";mobjContent.style.top=Number(A-mobjBubble.clientHeight+32+topPadding)+"px";mobjBubble.style.zIndex=
2;mobjContent.style.zIndex=3;mobjPointer.style.zIndex=4}if(abubbv02_Pointer==9){GetBubble("bubbLBp",abubbv02_bubbcolor);m_PointerXpos=getUniWidth(C)/2;m_PointerYpos=getUniHeight(C)/2;v=G+m_PointerXpos;A=F+m_PointerYpos-15;mobjPointer.style.left=v+"px";mobjPointer.style.top=A+"px";mobjBubble.style.left=Number(v-leftPadding+52)+"px";mobjBubble.style.top=Number(A-mobjBubble.clientHeight+33)+"px";mobjContent.style.left=Number(v+52)+"px";mobjContent.style.top=Number(A-mobjBubble.clientHeight+32+topPadding)+
"px";mobjBubble.style.zIndex=2;mobjContent.style.zIndex=3;mobjPointer.style.zIndex=4;z=false}if(getObjTop(mobjBubble)-F<0||getObjTop(mobjBubble)-F+getClientHeight(mobjBubble)>getUniHeight(C)||getObjLeft(mobjBubble)-G<0||getObjLeft(mobjBubble)-G+getClientWidth(mobjBubble)>getUniWidth(C)){S++;abubbv02_Pointer=S;v=false;switch(abubbv02_Pointer){case 1:m_PointerXpos=j-G;m_PointerYpos=u-F;break;case 2:m_PointerXpos=m-G;m_PointerYpos=u-F;break;case 3:m_PointerXpos=j-G;m_PointerYpos=q-F;break;case 4:m_PointerXpos=
m-G;m_PointerYpos=q-F;break;case 5:m_PointerXpos=j-G;m_PointerYpos=u-F;break;case 6:m_PointerXpos=m-G;m_PointerYpos=u-F;break;case 7:m_PointerXpos=j-G;m_PointerYpos=q-F;break;case 8:m_PointerXpos=m-G;m_PointerYpos=q-F;break;case 9:m_PointerXpos=getUniWidth(C)/2;m_PointerYpos=getUniHeight(C)/2;z=false;v=true}}else{g.m_bFFClearHeight=false;v=true}m_PointerDirection=abubbv02_Pointer;g.lastbubbstyle=abubbv02_Pointer}}}if(!z){g.m_bMoveDefPos=false;brect=new JSRect;brect.left=getObjLeft(mobjContent)-leftPadding;
brect.top=getObjTop(mobjContent)-topPadding;brect.right=getObjLeft(mobjContent)+U+rightPadding;brect.bottom=getObjTop(mobjContent)+P+bottomPadding;if(m_bWidth)mobjContent.style.pixelWidth=m_bWidth-28;mobjContent.style.pixelHeight=m_bHeight-41;if(m_bWidth)mobjContent.style.width=m_bWidth-28+"px";mobjContent.style.height="";if(!g.m_bFFClearHeight&&mobjContent.clientHeight<m_bHeight-41)mobjContent.style.height=m_bHeight-41+"px";setBubbleWidthToNowrapElements("getNode:NOBR","size:maxWidth");if(m_PointerXpos!=
0){mobjContent.style.pixelWidth=m_bWidth-28;mobjContent.style.pixelHeight=m_bHeight-41;if(m_bWidth)mobjContent.style.width=m_bWidth-28+"px";mobjContent.style.height="";if(!g.m_bFFClearHeight&&mobjContent.clientHeight<m_bHeight-41){mobjContent.style.height=m_bHeight-41+"px";g.m_bFFClearHeight=false}}GetBubble("bubbNp",abubbv02_bubbcolor);abubbv02_Pointer=BUBB07_NOPOINTER;v=G+m_PointerXpos-mobjBubble.clientWidth/2;A=F+m_PointerYpos-mobjBubble.clientHeight/2;if(m_PointerXpos==0){v=brect.left;A=brect.top}if(brect.right>
K&&m_PointerXpos==0)v=K-mobjContent.clientWidth-10-leftPadding-rightPadding;if(brect.bottom>I&&m_PointerXpos==0)A=I-mobjContent.clientHeight-10-topPadding-bottomPadding;if(kmbdefpos&&m_PointerXpos==0){v=K-mobjContent.clientWidth-10-leftPadding-rightPadding;A=I/2-mobjContent.clientHeight/2-topPadding-bottomPadding;brect.left=v;brect.top=A}if(v-G<0)v=0+G;if(v-G+mobjBubble.clientWidth>getUniWidth(C))v=getUniWidth(C)-mobjBubble.clientWidth+G;if(A-F<0)A=0+F;if(A-F+mobjBubble.clientHeight>getUniHeight(C))A=
getUniHeight(C)-mobjBubble.clientHeight+F;mobjBubble.style.left=v+"px";mobjBubble.style.top=A+"px";mobjContent.style.left=Number(v+leftPadding)+"px";mobjContent.style.top=Number(A+topPadding)+"px";mobjBubble.style.zIndex=2;mobjContent.style.zIndex=3;if(getObjTop(mobjBubble)<u&&getObjTop(mobjBubble)+getClientHeight(mobjBubble)>q&&getObjLeft(mobjBubble)<m&&getObjLeft(mobjBubble)+getClientWidth(mobjBubble)>j){if(m>K-j){v=m-getClientWidth(mobjBubble)-10;if(v-G<0)v=0}else{v=j+10;if(v-G+mobjBubble.clientWidth>
getUniWidth(C))v=G+getUniWidth(C)-mobjBubble.clientWidth}mobjBubble.style.left=v+"px";mobjContent.style.left=Number(v+leftPadding)+"px"}}if(mobjContent&&m==-1&&j==-1&&u==-1&&q==-1&&z&&m_PointerDirection==0){if(m_bWidth)mobjContent.style.pixelWidth=m_bWidth-28;if(m_bHeight)mobjContent.style.pixelHeight=m_bHeight-41;if(m_bWidth)mobjContent.style.width=m_bWidth-28+"px";mobjContent.style.height="";if(!g.m_bFFClearHeight&&mobjContent.clientHeight<m_bHeight-41){mobjContent.style.height=m_bHeight-41+"px";
g.m_bFFClearHeight=false}mobjContent.style.width=queryContentWidth();GetBubble("bubbNp",abubbv02_bubbcolor);abubbv02_Pointer=BUBB07_NOPOINTER;K=IsTouchDevice()?$(document.body).width():document.body.clientWidth;I=document.body.clientHeight;if(m_PointerXpos>0&&m_PointerYpos>0){v=G+m_PointerXpos-mobjBubble.clientWidth/2;A=F+m_PointerYpos-mobjBubble.clientHeight/2}else{v=K/2-mobjBubble.clientWidth/2;A=I/2-mobjBubble.clientHeight/2}if(v-G<0)v=0+G;if(v-G+mobjBubble.clientWidth>getUniWidth(C))v=getUniWidth(C)-
mobjBubble.clientWidth+G;if(A-F<0)A=0+F;if(A-F+mobjBubble.clientHeight>getUniHeight(C))A=getUniHeight(C)-mobjBubble.clientHeight+F;mobjBubble.style.left=v+"px";mobjBubble.style.top=A+"px";mobjContent.style.left=Number(v+leftPadding)+"px";mobjContent.style.top=Number(A+topPadding)+"px";mobjBubble.style.zIndex=2;mobjContent.style.zIndex=3}}$("#content a").bind("touchstart",function(J){J.stopPropagation()}).bind("touchend",function(J){J.stopPropagation()}).bind("click",function(J){J.stopPropagation()})}
var imgCntr=0;
function buildBubble(g){var j="",m,q;for(q=convert(String(g),10,16);q.length<6;)q="0"+q;q="#"+q;m="bubble_"+g;j+="<div id='"+m+"' name='"+m+"' style='position:absolute; left:100; top:100;zIndex:2;visibility:hidden'>";if(IsiOS())j+="<div style=' position: absolute; top:1px; z-index:-1; left:10px; background-color:"+q+"; right: 10px; bottom: 1px;'></div>";j+="<table ID='BubbleTable' width='266' border='0' cellspacing='0' cellpadding='0'>";j+="<tr>";j+="<td valign='top'><img src='"+imagesArr["c_"+abubbv02_bubbcolor].imageNames[3]+
"' width='14' height='27' border='0' alt=''></td>";j+="<td valign='top' bgcolor='"+(grayBubbles?"#F4F2F1":"#003166")+"' width='100%' background="+imagesArr["c_"+abubbv02_bubbcolor].imageNames[4]+">";j+="<table border='0' cellspacing='0' cellpadding='0' height='27' width='100%'>";j+="<tr>";j+="<td id='bubb_cap' valign='"+(grayBubbles?"center":"bottom")+"' nowrap><a style='cursor:default' id='m_Caption' class='CurvedBoxText'></a></td>";j+="<td id='m_StaticCaption' valign='"+(grayBubbles?"center":"bottom")+
"' width='100%' align='right'><div id='blink' style='white-space:nowrap; VISIBILITY: visible'><a id='m_ActionText' style='white-space:nowrap; cursor:pointer; text-decoration:underline;' onclick='setAOpener(event)' class='CurvedBoxNav'></a></div></td>";j+="<td>&nbsp;&nbsp;</td>";j+="</tr>";j+="<tr height='"+(grayBubbles?"0":"3")+"'>";j+="<td colspan='3'></td>";j+="</tr>";j+="</table>";j+="</td>";j+="<td valign='top'><div id='closebtn_"+g+"' style='position:relative'><div><img id='img2' name='img2' src='"+
imagesArr["c_"+abubbv02_bubbcolor].imageNames[1]+"' style='display:block' width='32' height='27' border='0'><img id='img2o' name='img2o' src='"+imagesArr["c_"+abubbv02_bubbcolor].imageNames[2]+"' style='display:none' width='32' height='27' border='0'></div><div style='position:absolute; left:3px; top:7px'><a onclick='BubbleClose();return false'"+(IsTouchDevice()?"":'onMouseMove=\'BubbleimgOn("img2","img2o")\' onMouseOut=\'BubbleimgOff("img2","img2o")\'')+"><img alt='"+R_bubble_closeondemand+"' id='imghandler' name='imghandler' src='"+
imagesArr["c_"+abubbv02_bubbcolor].imageNames[0]+"' style='display:block' width='23' height='20' border='0'></a></div></div></td>";j+="</tr>";j+="<tr>";j+=IsiOS()?"<td> <img src='"+imagesArr["c_"+abubbv02_bubbcolor].imageNames[5]+"' style='height:100%; width: 14px'/></td>":"<td style='background-image:url("+imagesArr["c_"+abubbv02_bubbcolor].imageNames[5]+")'></td>";j+="<td ID='BubbleSides' bgcolor='"+q+"' height='116'>&nbsp;</td>";j+=IsiOS()?"<td> <img src='"+imagesArr["c_"+abubbv02_bubbcolor].imageNames[6]+
"' style='height:100%; width: 32px'/></td>":"<td style='background-image:url("+imagesArr["c_"+abubbv02_bubbcolor].imageNames[6]+")'></td>";j+="</tr>";j+="<tr>";j+="<td valign='top'><img src='"+imagesArr["c_"+abubbv02_bubbcolor].imageNames[7]+"' width='14' height='14' border='0' alt=''></td>";j+="<td valign='top' width='100%'><img src='"+imagesArr["c_"+abubbv02_bubbcolor].imageNames[8]+"' width='100%' height='14px'></td>";j+="<td valign='top'><img src='"+imagesArr["c_"+abubbv02_bubbcolor].imageNames[9]+
"' width='32' height='14' border='0' alt=''></td>";j+="</tr>";j+="</table>";j+="</div>";document.write(j);m="ulPointer_"+g;ul="<div id='"+m+"' name='"+m+"' style='position:absolute; left:114; top:62;zIndex:2;visibility:hidden' onMouseDown='AnchorMouseDown(); return false' onMouseUp='AnchorMouseUp(); return false'><img src='"+imagesArr["c_"+abubbv02_bubbcolor].imageNames[10]+"' width='18' height='41' border='0' alt=''></div>";m="urPointer_"+g;ur="<div id='"+m+"' name='"+m+"' style='position:absolute; left:334; top:62;zIndex:2;visibility:hidden' onMouseDown='AnchorMouseDown(); return false' onMouseUp='AnchorMouseUp(); return false'><img src='"+
imagesArr["c_"+abubbv02_bubbcolor].imageNames[11]+"' width='18' height='41' border='0' alt=''></div>";m="lhPointer_"+g;lh="<div id='"+m+"' name='"+m+"' style='position:absolute; left:62; top:114;zIndex:2;visibility:hidden' onMouseDown='AnchorMouseDown(); return false' onMouseUp='AnchorMouseUp(); return false'><img src='"+imagesArr["c_"+abubbv02_bubbcolor].imageNames[12]+"' width='41' height='18' border='0' alt=''></div>";m="llPointer_"+g;ll="<div id='"+m+"' name='"+m+"' style='position:absolute; left:62; top:225;zIndex:2;visibility:hidden' onMouseDown='AnchorMouseDown(); return false' onMouseUp='AnchorMouseUp(); return false'><img src='"+
imagesArr["c_"+abubbv02_bubbcolor].imageNames[13]+"' width='41' height='18' border='0' alt=''></div>";m="rhPointer_"+g;rh="<div id='"+m+"' name='"+m+"' style='position:absolute; left:363; top:114;zIndex:2;visibility:hidden' onMouseDown='AnchorMouseDown(); return false' onMouseUp='AnchorMouseUp(); return false'><img src='"+imagesArr["c_"+abubbv02_bubbcolor].imageNames[14]+"' width='41' height='18' border='0' alt=''></div>";m="rlPointer_"+g;rl="<div id='"+m+"' name='"+m+"' style='position:absolute; left:363; top:225;zIndex:2;visibility:hidden' onMouseDown='AnchorMouseDown(); return false' onMouseUp='AnchorMouseUp(); return false'><img src='"+
imagesArr["c_"+abubbv02_bubbcolor].imageNames[15]+"' width='41' height='18' border='0' alt=''></div>";m="btPointer_"+g;bt="<div id='"+m+"' name='"+m+"' style='position:absolute; left:114; top:254;zIndex:2;visibility:hidden' onMouseDown='AnchorMouseDown(); return false' onMouseUp='AnchorMouseUp(); return false'><img src='"+imagesArr["c_"+abubbv02_bubbcolor].imageNames[16]+"' width='18' height='41' border='0' alt=''></div>";m="brPointer_"+g;br="<div id='"+m+"' name='"+m+"' style='position:absolute; left:334; top:254;zIndex:2;visibility:hidden' onMouseDown='AnchorMouseDown(); return false' onMouseUp='AnchorMouseUp(); return false'><img src='"+
imagesArr["c_"+abubbv02_bubbcolor].imageNames[17]+"' width='18' height='41' border='0' alt=''></div>";document.write(ul);document.write(ur);document.write(lh);document.write(ll);document.write(rh);document.write(rl);document.write(bt);document.write(br)}
function LoadAllBubbles(){for(var g=0;g<imagesXref.length;g++){var j=imagesArr[imagesXref[g]].color;abubbv02_bubbcolor=j;buildBubble(j)}document.write("<div id='content' name='content' style='position:absolute; left:114; top:138;zIndex:10;visibility:hidden'></div>");objDoneTypingA=document.createElement("SPAN");objDoneTypingA.id="bbdta";objDoneTypingA.onclick=function(){document.getElementById("bbdt0").className="button";DTOnClick()};objDoneTypingA.style.position="absolute";objDoneTypingA.style.right=
0;objDoneTypingA.style.marginTop="16px";objDoneTypingImg0=document.createElement("A");objDoneTypingImg0.id="bbdt0";objDoneTypingImg0.className="button";objDoneTypingImg0.onmousemove=function(){this.className="buttonhover"};objDoneTypingImg0.onmouseout=function(){this.className="button"};objDoneTypingImg0.style.display="block";spanE=document.createElement("SPAN");spanE.innerHTML=R_tcbutton_title;if(R_tcbutton_title.length>=18){objDoneTypingImg0.style.letterSpacing="-1px";objDoneTypingImg0.style.font=
"bold 7pt Arial"}if(playMode=="K"){objIcon02Img=document.createElement("img");objIcon02Img.src=m_BubblePath+template_knowit_icon02;spanEYes=document.createElement("SPAN");spanEYes.innerHTML=R_yesbutton_title;spanEYes.onclick=function(){document.getElementById("bbyesa").className="button"};spanENo=document.createElement("SPAN");spanENo.innerHTML=R_nobutton_title;spanENo.onclick=function(){document.getElementById("bbnoa").className="button"};objYesA=document.createElement("A");objYesA.id="bbyesa";objYesA.className=
"button";objYesA.onmousemove=function(){this.className="buttonhover"};objYesA.onmouseout=function(){this.className="button"};objYesA.onclick=YesOnClick;objYesA.style.styleFloat="right";objYesA.style.cssFloat="right";objNoA=document.createElement("A");objNoA.id="bbnoa";objNoA.className="button";objNoA.onmousemove=function(){this.className="buttonhover"};objNoA.onmouseout=function(){this.className="button"};objNoA.style.styleFloat="right";objNoA.style.cssFloat="right";objNoA.onclick=NoOnClick}}
function GetBubble(g,j){mobjBubble=document.getElementById("bubble_"+j);if(mblnShowPointer){mblnShowPointer=true;switch(g){case "bubbTLp":mobjPointer=document.getElementById("ulPointer_"+j);break;case "bubbTRp":mobjPointer=document.getElementById("urPointer_"+j);break;case "bubbBLp":mobjPointer=document.getElementById("btPointer_"+j);break;case "bubbBRp":mobjPointer=document.getElementById("brPointer_"+j);break;case "bubbLTp":mobjPointer=document.getElementById("lhPointer_"+j);break;case "bubbRTp":mobjPointer=
document.getElementById("rhPointer_"+j);break;case "bubbLBp":mobjPointer=document.getElementById("llPointer_"+j);break;case "bubbRBp":mobjPointer=document.getElementById("rlPointer_"+j);break;case "bubbNp":mblnShowPointer=false}}var m=getElementsByAttribute("id","BubbleSides"),q;for(q in m)m[q].height=mobjContent.clientHeight;m=getElementsByAttribute("id","BubbleTable");for(q in m)m[q].width=mobjContent.clientWidth+leftPadding+rightPadding;load_buttons()}
function setBubbleWidthToNowrapElements(g,j){try{g=g.split(":")[1];for(var m=mobjContent.getElementsByTagName("*"),q=0,u=0;u<m.length;u++)if(m[u].nodeName==g){var z=m[u].offsetLeft;break}if(j.indexOf("size")!=-1){for(u=0;u<m.length;u++)if(m[u].nodeName==g)if(m[u].offsetWidth>q)q=m[u].offsetWidth;if(q+z>mobjContent.clientWidth)mobjContent.style.width=q+z+"px"}if(j.indexOf("id")!=-1){var v=j.split(":")[1];for(u=0;u<m.length;u++)if(m[u].id==v){mobjContent.style.width=m[u].offsetWidth+z+"px";break}}}catch(A){}}
function queryContentWidth(){try{for(var g=mobjContent.getElementsByTagName("*"),j=0,m=0;m<g.length;m++)if(g[m].nodeName.toUpperCase()=="P"||g[m].nodeName.toUpperCase()=="NOBR"||g[m].nodeName.toUpperCase()=="SPAN"||g[m].nodeName.toUpperCase()=="DIV"||g[m].nodeName.toUpperCase()=="TABLE"){var q=g[m].offsetWidth+g[m].offsetLeft;if(q>j)j=q}return j}catch(u){}};var popupMenu=0;showAttachments=false;var fullength=0;function ActionMenu(){this.Open=_AOpen;this.Close=_AClose;this.Refresh=_ARefresh;this.IsOnScreen=_AIsOnScreen;this.PopupIsOpened=_APopupIsOpened;this.onScreen=false}function setAOpener(g){if(document.all)popupOpener=event.srcElement;else{event=g;popupOpener=event.target}OnAction()}
function _AOpen(){if(!popupMenu){popupMenu=document.createElement("DIV");document.body.appendChild(popupMenu);myspan=document.createElement("SPAN");myspan.setAttribute("id","_myspan_");myspan.setAttribute("style","font:8pt Arial;");document.body.appendChild(myspan)}nextNode=popupOpener;popupOpener.positionTop=0;for(popupOpener.positionLeft=0;nextNode.nodeName!="BODY";){popupOpener.positionTop+=nextNode.offsetTop;popupOpener.positionLeft+=nextNode.offsetLeft;nextNode=nextNode.parentNode}popupOpenerHeight=
popupOpener.offsetHeight;popupMenu.style.zIndex=1E4;popupMenu.style.position="absolute";var g=IsFF3()||IsFF4()||checkFFVersion(7)||checkFFVersion(8)||checkFFVersion(9)||IsSafari()?16:0;if(IsIE10())g+=20;popupMenu.style.top=popupOpener.positionTop+popupOpenerHeight-g-6+"px";if(document.all){popupMenu.style.left=popupOpener.positionLeft-65+"px";popupMenu.style.width="140px"}else{popupMenu.style.left=popupOpener.positionLeft-80+"px";popupMenu.style.width="125px"}popupMenu.style.display="block";popupMenu.className=
"AMenu";popupMenu.style.borderStyle="solid";popupMenu.style.borderWidth="1px";popupMenu.style.borderColor="gray";popupMenu.style.paddingTop="8px";popupMenu.style.paddingBottom="8px";popupMenu.style.paddingLeft="8px";popupMenu.style.paddingRight="8px";popupMenu.aLink="0000FF";popupMenu.link="0000FF";popupMenu.vLink="0000FF";popupMenu.text="black";this.onScreen=true}function _APopupIsOpened(){if(popupMenu==0)return false;return popupMenu.isOpen}
function _AClose(){window.setTimeout("popupMenuHide()",200);this.onScreen=false}
function OnActionSelection(g,j){this.onScreen=false;g=="Next"&&OnMenuAlternative("TeacherForward(false)");g=="Prev"&&OnMenuAlternative("TeacherBack()");g=="Start"&&OnMenuAlternative("TeacherFastBack()");g=="Alt"&&OnMenuAlternative("TeacherAlter()");g=="Conc"&&OnMenuAlternative(concepts[j].url,concepts[j].width,concepts[j].height,concepts[j].infotype,concepts[j].infokey);g=="Info"&&OnMenuAlternative(screens[showScreen].infoblocks[j].simpleurl,screens[showScreen].infoblocks[j].width,screens[showScreen].infoblocks[j].height,
screens[showScreen].infoblocks[j].infotype,screens[showScreen].infoblocks[j].infokey);g=="Prefs"&&OnMenuAlternative("OpenPreferences()");g=="Help"&&OnMenuAlternative("LaunchHelp()","../../");g=="LogOut"&&OnMenuAlternative("LogOut()");g=="CloseT"&&OnClose();g=="CloseW"&&CloseAction();g=="Resume"&&OnMenuAlternative("Menu_Resume()");g=="Printit"&&OnMenuAlternative("ShowPrintit()");g=="AskAnExpert"&&OnMenuAlternative("AskAnExpert()");g=="ProvideFeedback"&&OnMenuAlternative("ProvideFeedback()")}
function CorrectPopup(){try{obj=binterf.GetActionLink();h=obj.offsetHeight;popupMenu.show(0,h,0,0,obj);sp=popupMenu.getElementById("actionspan");hsp=sp.offsetHeight;wsp=sp.offsetWidth;popupMenu.show(0,h,wsp+20,hsp+20,obj)}catch(g){}this.onScreen=true}function IsNotIE(){var g=new BrowserInfo;GetBrowserInfo(g);return g.name!="MSIE"}
function PopupToggle(){if(popupMenu.getElementsByTagName("DIV")[1].style.display=="none"){if(IsNotIE())if(fullength>100)popupMenu.style.width=""+(fullength+40)+"px";popupMenu.getElementsByTagName("DIV")[1].style.display="block"}else{if(IsNotIE())popupMenu.style.width="140px";popupMenu.getElementsByTagName("DIV")[1].style.display="none"}showAttachments=true;CorrectPopup()}var _topLevelLmsMode="";
function CheckKPTMode(){if(_topLevelLmsMode=="")_topLevelLmsMode=GetTopLevelLmsMode();return _topLevelLmsMode=="KPT"}function lms_IsKPathPortalAvailable(){__alert("lms_IsKPathPortalAvailable() called");if(CheckKPTMode()==false)return false;if(parent.urlParser.GetParameter("launchFromKPath")==null)return"";return lms_GetKPathPortalUrl().length>0}function lms_GetKPathPortalUrl(){__alert("lms_GetKPathPortalUrl() called");if(Kpath_launch==false)return"";var g="";try{}catch(j){}return Kpath_home_URL}
function AskAnExpert(){var g=lms_GetMentoringUrl(parent.topicID);parent.showDialog(g,-1,-1,500,430,true,96,"../../../")}function ProvideFeedback(){var g=lms_GetFeedbackUrl(parent.topicID);parent.showDialog(g,-1,-1,500,430,true,96,"../../../")}function lms_IsMentoringAvailable(){__alert("lms_IsMentoringAvailable() called");return document.LmsCom.doGetUPKValue("upk.mentoring_available")&&document.LmsCom.doGetUPKValue("upk.anonymous")=="0"}
function lms_GetMentoringUrl(){__alert("lms_GetMentoringUrl() called");return Kpath_base_URL+"/Mentoring/NewMentQuest.aspx?Path="+window.location.href.split("?")[0]+"&GUID="+lms_store.cguid+"&FeedbackType=1"+_feedbackUrlArgs}function lms_IsFeedbackAvailable(){__alert("lms_IsFeedbackAvailable() called");return document.LmsCom.doGetUPKValue("upk.feedback_available")&&document.LmsCom.doGetUPKValue("upk.anonymous")=="0"}
function lms_GetFeedbackUrl(){__alert("lms_GetFeedbackUrl() called");return Kpath_base_URL+"/Mentoring/NewMentQuest.aspx?Path="+window.location.href.split("?")[0]+"&GUID="+lms_store.cguid+"&FeedbackType=2"+_feedbackUrlArgs}
function _ARefresh(g,j,m,q,u,z,v,A){if(this.onScreen){u="";u+="<div id='actionspan' style='font:8pt Arial; width:100%;' nowrap=yes>";u+="<a href='#'></a>";if(playMode=="T"){if(g){u+="<li><a href='#' onclick='OnActionSelection(\"Next\");return false;'>";u+=R_menu_nextstep;u+="</a></li>"}if(j){u+="<li><a href='#' onclick='OnActionSelection(\"Prev\");return false;'>";u+=R_menu_prevstep;u+="</a></li>"}if(m){u+="<li><a href='#' onclick='OnActionSelection(\"Start\");return false;'>";u+=R_menu_start;u+=
"</a></li>"}if(q){u+="<li><a href='#' onclick='OnActionSelection(\"Alt\");return false;'>";u+=R_menu_alternatives;u+="</a></li>";popupMenu.style.width="170px"}g=0;if(concepts.length>0){u+="<li>";u+="<a href='#' onclick='OnActionSelection(\"Conc\",\"0\");return false;'>";u+=R_menu_concepts;u+="</a></li>"}if(screens[showScreen].infoblocks.length>0){u+="<li><a href='javascript:EmptyFunction()' onclick='PopupToggle(\"infodiv\")'>";u+=R_menu_infoblocks;u+="</a></li>";u+="<div id='infodiv' style='display:none'>";
if(IsNotIE())for(g=0;g<screens[showScreen].infoblocks.length;g++){document.getElementById("_myspan_").innerHTML=fixHTMLString(screens[showScreen].infoblocks[g].tooltip);j=document.getElementById("_myspan_").offsetWidth;if(fullength<j)fullength=j;document.getElementById("_myspan_").innerHTML=""}for(g=0;g<screens[showScreen].infoblocks.length;g++){u+=IsNotIE()?"<li style='list-style-type:circle;text-indent:18px; width: "+(fullength+40)+"px;'>":"<li style='list-style-type:circle;text-indent:18px; width: 140px;'>";
u+="<a href='#' onclick='OnActionSelection(\"Info\",";u+=""+g;u+=");return false;'>";u+=fixHTMLString(screens[showScreen].infoblocks[g].tooltip);u+="</a></li>"}u+="</div>"}}if(playMode=="S"){u+="<li><a href='#' onclick='OnActionSelection(\"Resume\");return false;'>";u+=R_interface_resume;u+="</a></li>"}if(playMode=="T"||playMode=="S")if(A){u+="<li><a href='#' onclick='OnActionSelection(\"Printit\");return false;'>";u+=R_interface_printit;u+="</a></li>"}if(lms_IsMentoringAvailable()==true){u+="<li><a href='#' onclick='OnActionSelection(\"AskAnExpert\");return false;'>";
u+=R_interface_askexpert;u+="</a></li>"}if(lms_IsFeedbackAvailable()==true){u+="<li><a href='#' onclick='OnActionSelection(\"ProvideFeedback\");return false;'>";u+=R_interface_providefeedback;u+="</a></li>"}if(PlayerConfig.EnableCookies&&UserPrefs.EnablePreferences){u+="<li><a href='#' onclick='OnActionSelection(\"Prefs\");return false;'>";u+=R_menu_preferences;u+="</a></li>"}if(UIComponents.TopicHelp==true&&IsTouchDevice()==null){u+="<li><a href='#' onclick='OnActionSelection(\"Help\");return false;'>";
u+=R_menu_help;u+="</a></li>"}try{if((GetTopLevelLmsMode()=="KPT"||Kpath_launch==true)&&lms_IsKPathLogoutAvailable()){u+="<li><a href='#' onclick='OnActionSelection(\"LogOut\");return false;'>";u+=R_toctooltip_kpathlogout;u+="</a></li>"}}catch(C){}u+="<li><a href='#' onclick='OnActionSelection(\"CloseT\");return false;'>";u+=R_menu_Close;u+="</a></li>";u+="</span>";popupMenu.innerHTML=u;sH=document.getElementsByTagName("body")[0].clientHeight+getScrollTop();if(popupMenu.offsetTop+popupMenu.clientHeight>
sH)popupMenu.style.top=""+(sH-popupMenu.clientHeight)+"px";sW=document.getElementsByTagName("body")[0].clientWidth+getScrollLeft();if(popupMenu.offsetLeft+popupMenu.clientWidth>sW)popupMenu.style.left=""+(sW-popupMenu.clientWidth)+"px";setTimeout('try{popupMenu.document.all["actfocus"].focus();}catch(e){};',100);CorrectPopup()}}function popupMenuHide(){if(showAttachments==true){showAttachments=false;actionMenu.onScreen=true}else popupMenu.style.display="none"}
function _AIsOnScreen(){return this.onScreen}function EmptyFunction(){};datasourceroot="querydb/";ConvertDbSelector={t:"text",u:"ctxod",e:"ctxex",r:"role",g:"genctx"};var q_search_and=" and ",q_search_or=" or ";
function ToHalfWidth(g){for(var j="",m=0;m<g.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(g.charAt(m));j+=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):
g.charCodeAt(m)>=65281&&g.charCodeAt(m)<=65375?String.fromCharCode(g.charCodeAt(m)-65248):g.charAt(m)}return j}
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(g,j){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"==g){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],z=[0,0,"&","|",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];if(g!="URI"){j=ToHalfWidth(j);j=j.toLowerCase()}this.pr=this.ev=null;this.PS=[];this.PS.push({st:1,se:0});for(var v,A,C=0,G="t";(v=m.exec(j))!=null;){v=v[0];var F=0;for(A in q)if(v==q[A]){F=u[A];if(z[A])v=z[A];break}if(F==5)G=v;else{if(F==3)C=0;if((F==0||F==1)&&C){if(this.SM(3,
"&"))return;C=0}if(F==0){if(v.charAt(0)=='"'||v.charAt(0)=="'")v=v.slice(1,v.length-1);if("URI"!=g){if(v.length>1){C=v[v.length-1];if(C=="%"||C=="*")v=v.slice(0,-1)}v=Escape.MyEscape(v.toLowerCase())}v=G+v;C=1}if(this.SM(F,v))return}}if(!this.SM(5,"$")){this.ev=this.PS[1].se.ev;this.pr=this.PS[1].se.pr}},SM:function(g,j){for(;;){var m=this.PT[this.PS[this.PS.length-1].st][g];if(m==10)return false;if(m==0)return true;if(m>0){this.PS.push({st:m,se:j});return false}if(m<0){var q,u=this.PS.length,z=this.PS[u-
1],v=this.PS[u-2];u=this.PS[u-3];switch(-m){case 1:q={ev:"{a:'s', d:'"+z.se.charAt(0)+"', p:'"+z.se.slice(1)+"'}",pr:z.se.slice(1)};break;case 2:if(z.se=="!")q={ev:"{a:'s', d:'"+v.se.charAt(0)+"', p:'"+v.se.slice(1)+"', m:'"+z.se+"'}"};else{q=v.se.slice(1,parseInt(z.se)+1)+"$002A";q={ev:"{a:'s', d:'"+v.se.charAt(0)+"', p:'"+v.se.slice(1)+"'}, {a:'s', d:'"+v.se.charAt(0)+"', p:'"+q+"'}, {a:'o', p:'|'}"}}q.pr=v.se.slice(1);break;case 3:q={ev:u.se.ev+", "+z.se.ev+", {a:'o', p:'"+v.se+"'}",pr:u.se.pr+
(v.se=="|"?" or ":" ")+z.se.pr};break;case 4:q={ev:v.se.ev,pr:"("+v.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(g,j,m){debug.insertAdjacentHTML("beforeEnd","<div>"+g+", "+j+", "+m+"</div>");return j+g+m},e:function(g,j,m){m||(m="");j=decodeURIComponent(j);debug.insertAdjacentHTML("beforeEnd","<div>"+g+", "+j+", "+m+"</div>");return g+"="+j+
m}},QueryProcessor={rr:null,Start:function(g,j){this.rr=j;eval("this.qa = ["+g+"]");this.qp=0;this.Eval()},Eval:function(){var g=this.qa[this.qp];if(g.a=="s"){var j=g.d=="t"?false:true;if(g.m=="!")j=!j;SearchDBs[g.d].Search(decodeURIComponent(g.p),j)}else if(g.a=="o"){g.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(g){this.qa[this.qp]=g;this.Next()}};function ReadBase64_6(g){if(g==43)return 62;if(g==45)return 63;if(g<58)return g-48;return g<91?g-55:g-61}function ReadBase64_32(g){var j,m;m=0;for(j=32;j&32;){j=ReadBase64_6(g.s.charCodeAt(g.p));m<<=5;m|=j&31;g.p++}return m}function ReadBase64_ITP(g,j){for(var m=[],q,u,z=0;g.p<g.s.length;){u=ReadBase64_32(g);for(q=1==u?ReadBase64_32(g):1;q;){z+=u;m.push(new j(z));q--}}return m}
function SearchDB(g){this.db_id=g;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(g){for(var j="",m=0;m<g.length;m++){var q={s:g[m],p:0},u,z="";u=ReadBase64_32(q);var v;v=m==g.length-1?this.index[this.index_insert_position]:{};v.node=u>0?q.s.slice(q.p,q.p+u):0;q.p+=u;u=ReadBase64_32(q);z+=j.slice(0,u);u=ReadBase64_32(q);z+=q.s.slice(q.p,q.p+u);q.p+=u;if(z.length>0)v.key=z;for(j=z;q.p<q.s.length;){v.values=[];u=ReadBase64_32(q);v.values.push(q.s.slice(q.p,q.p+u));q.p+=u}if(m<g.length-1){this.index.splice(this.index_insert_position,0,v);this.index_insert_position++}}this.d()};
SearchDB.prototype.LoadScript=function(g){CDB=this;LoadXMLDocArray(datasourceroot+ConvertDbSelector[this.db_id]+"/"+g+".xml","SearchDBs."+this.db_id+".LoadScript_Callback","","N");this.request_total++;this.request_count++};SearchDB.prototype.LoadScript_Callback=function(g){CDB=this;CDB.k(g)};SearchDB.prototype.Search=function(g,j){this.RequestCount=0;this.search=g;this.exact_match=j;this.results=new SearchResultSet;if(this.search.length!=0){this.index_match=0;this.d=this.d1;this.d()}};
SearchDB.prototype.IndexSearch=function(){var g;for(g=this.index_match;g<this.index.length;g++)if(null==this.index[g].key||this.search<=this.index[g].key)break;this.index_match=g};
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 g=this.index[this.index_match].values,j;for(j in g){this.results.Or(new SearchResultSet(g[j]));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(g){this.index=g;this.weight=1}function SearchResultSet(g){this.rs=g?ReadBase64_ITP({s:g,p:0},SearchResult):[]}SearchResultSet.prototype.Or=function(g){this.AOR(g,true)};
SearchResultSet.prototype.AOR=function(g,j,m){var q,u;for(u=q=0;q<g.rs.length;q++){for(;u<this.rs.length&&this.rs[u].index<g.rs[q].index;)u++;if(u==this.rs.length||this.rs[u].index!=g.rs[q].index)this.rs.splice(u,0,g.rs[q]);else{var z=this.rs[u].weight,v=g.rs[q].weight;this.rs[u].weight=j?Math.max(z,v):z+v*m}}};
SearchResultSet.prototype.And=function(g){var j,m;for(m=j=0;j<g.rs.length&&m<this.rs.length;j++){for(;m<this.rs.length&&this.rs[m].index<g.rs[j].index;)this.rs.splice(m,1);if(m<this.rs.length&&g.rs[j].index==this.rs[m].index){this.rs[m].weight=Math.min(this.rs[m].weight,g.rs[j].weight);m++}}this.rs.splice(m,this.rs.length-m)};var EcidComparer={expstr:"",Init:function(g){if(g&&g.length>0){QueryParser.Parse("URI",g);if(QueryParser.ev)this.expstr=QueryParser.ev}else this.expstr=""},Compare:function(g){if(this.expstr.length==0)return false;if(!g)return false;eval("exparray = ["+this.expstr+"]");for(var j=0;j<exparray.length;j++){exparray[j].l=false;if(exparray[j].a.toLowerCase()=="s")for(var m=0;m<g.length;m++)if(matchString(g[m],exparray[j].p))exparray[j].l=true}EcidCompareStack.Init();for(j=0;j<exparray.length;j++)if(exparray[j].a.toLowerCase()==
"s")EcidCompareStack.Push(exparray[j]);else{g=EcidCompareStack.Pop();m=EcidCompareStack.Pop();g.l=exparray[j].p=="|"?g.l||m.l:g.l&&m.l;EcidCompareStack.Push(g)}return EcidCompareStack.Pop().l}};function StackItem(g,j,m){this.a=g;this.p=j;this.l=m}
var EcidCompareStack={Init:function(){this.stArray=[];this.pTop=-1},Push:function(g){if(this.stArray.length-this.pTop==1){this.stArray[this.stArray.length]=new StackItem(g.a,g.p,g.l);this.pTop++}else{this.pTop++;this.stArray[this.pTop]=new StackItem(g.a,g.p,g.l)}},Pop:function(){if(this.pTop!=-1)return this.stArray[this.pTop--]}};function matchCharacter(g,j){return ToHalfWidth(g)==ToHalfWidth(j)}
function replaceDotAndCircle(g){var j=null;j=g.replace(RegExp("\uff9e","g"),"#");j=j.replace(RegExp("\uff9f","g"),"*");for(g=0;g<20;g++)j=j.replace(RegExp("\u30ac\u30ae\u30b0\u30b2\u30b4\u30b6\u30b8\u30ba\u30bc\u30be\u30c0\u30c2\u30c5\u30c7\u30c9\u30d0\u30d3\u30d6\u30d9\u30dc".charAt(g),"g"),"\u30ab\u30ad\u30af\u30b1\u30b3\u30b5\u30b7\u30b9\u30bb\u30bd\u30bf\u30c1\u30c4\u30c6\u30c8\u30cf\u30d2\u30d5\u30d8\u30db".charAt(g)+"#");for(g=0;g<5;g++)j=j.replace(RegExp("\u30d1\u30d4\u30d7\u30da\u30dd".charAt(g),
"g"),"\u30cf\u30d2\u30d5\u30d8\u30db".charAt(g)+"*");return j}function matchString(g,j,m){if(!g)return false;m||(m=false);var q=g.length,u=j.length;if(q==0&&u==0)return true;if(q==0&&u!=0)return false;if(q!=0&&u==0)return false;if(q!=u)return false;g=m?g:g.toLowerCase();m=m?j:j.toLowerCase();j=replaceDotAndCircle(g);m=replaceDotAndCircle(m);if(j.length!=m.length)return false;for(g=0;g<j.length;g++)if(!matchCharacter(j.substr(g,1),m.substr(g,1)))return false;return true};var _workerFunction="",_errorFunction="",_extraInfo="",_req,_url;
function AbsUrl(g){for(var j=0;j<g.length;j++){c=g.substr(j,1);if(c==":")return g}base=window.location.href;j=base.indexOf("?");var m=base.indexOf("#");if(j>=0||m>=0)base=j>=0&&m>=0?base.substr(0,j<m?j:m):j>=0?base.substr(0,j):base.substr(0,m);if(g.substr(0,3)=="../"){j=base.lastIndexOf("/");for(base=base.substr(0,j);g.substr(0,3)=="../";){j=base.lastIndexOf("/");base=base.substr(0,j);g=g.substr(3)}}else{if(g.substr(0,1)=="/")g=g.substr(1);j=base.lastIndexOf("/");base=base.substr(0,j)}return base=
base+"/"+g}
function LoadXMLDoc(g,j,m,q){_workerFunction=j;_errorFunction=m;_extraInfo=q;_url=AbsUrl(g);_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 g=new ActiveXObject("Microsoft.XMLDOM");g.async=false;g.loadXML(_req.responseText);_req={};_req.responseXML=g}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(g,j,m,q,u){_returnFunction=j;_nodeName=q;u?LoadXMLDoc(g,"XMLDocArrayWorker2",m,q):LoadXMLDoc(g,"XMLDocArrayWorker",m,q)}
function XMLDocArrayWorker(g,j){_nodesArray=[];_nodes=g.responseXML.getElementsByTagName(j);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(g,j){_nodesArray=[];_nodes=g.responseXML.getElementsByTagName(j);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 intPos=window.location.search.toLowerCase().indexOf("aicc_url"),intPos2=window.location.search.toLowerCase().indexOf("aicc_sid");function getOnlyPath(g){for(;g.indexOf("\\")!=-1;)g=g.replace("\\","/");return g.substr(0,g.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(g){if(Kpath_launch==false)setTimeout(g,1);else{var j=findKPathAPIFrame(window);if(j==null){j=document.createElement("iframe");j.id="KPATH_API_FRAME";j.style.display="none";document.body.appendChild(j);if(g)if(navigator.appName=="Microsoft Internet Explorer")j.attachEvent("onload",g);else j.onload=g;j.src=Kpath_Runtime_API}else setTimeout(g,1)}}
function findKPathAPIFrame(g){var j=null,m=0,q=g;try{for(;q!=null;){j=q.document.getElementById("KPATH_API_FRAME");if(j!=null)return j.contentWindow;m++;if(m>7)break;if(q===q.parent)break;q=q.parent}if(g.top.opener!=null)return findKPathAPIFrame(g.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(g){this.api_type="none";this.launch_arg=g;this.aicc_sid=this.aicc_url="";this.scorm_api_2004=this.scorm_api_12=null;g=this.launch_arg.substring(1).split("&");lmslog.addEntry(0,"LmsComFactory","strArgs",g);for(var j=0;j<g.length;j++){strArg=g[j];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 g=new LmsComKPath;g.API=this.scorm_api_2004;return g}else if(this.api_type=="scorm12")return new LmsComScorm12;return PlayerConfig.EnableCookies?new LmsComCookie:new LmsComBase};
LmsComFactory.prototype.FindScorm12API=function(){try{var g=this.FindWindowScorm12API(window);if(g==null&&top.window.opener!=null&&!top.window.opener.closed)g=this.FindWindowScorm12API(top.window.opener);return g}catch(j){return null}};LmsComFactory.prototype.FindWindowScorm12API=function(g){for(var j=0;g.API==null&&g.parent!=null&&g.parent!=g;){j++;if(j>500){lmslog.addEntry(0,"FindScorm12API","",R_scorm_apideep);return null}g=g.parent}return g.API};
LmsComFactory.prototype.FindScorm2004API=function(){try{var g=this.FindWindowScorm2004API(window);if(g==null&&top.window.opener!=null&&!top.window.opener.closed)g=this.FindWindowScorm2004API(top.window.opener);return g}catch(j){return null}};LmsComFactory.prototype.FindWindowScorm2004API=function(g){for(var j=0;g.API_1484_11==null&&g.parent!=null&&g.parent!=g;){j++;if(j>500){lmslog.addEntry(0,"FindScorm2004API","",R_scorm_apideep);return null}g=g.parent}return g.API_1484_11};
LmsComFactory.prototype.CheckParam=function(g,j){var m=j.length,q="";if(g.substr(0,m).toLowerCase()==j)q=g.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(g){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(g!=null){this.Copy(g);this.ParentLmsCom=g}this.object_type_name="LmsComBase"}
LmsComBase.prototype.GetOrdinalNumber=function(){return this.ordinal_number};LmsComBase.prototype.SetOrdinalNumber=function(g){this.ordinal_number=g};LmsComBase.prototype.Copy=function(g){this.student_id=g.student_id;this.student_name=g.student_name;this.credit=g.credit;this.lesson_status=g.lesson_status;this.bigsco=g.bigsco;this.lesson_data=g.lesson_data;this.lesson_location=g.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(g){g()};LmsComBase.prototype.SendCompletionInfo=function(){};
LmsComBase.prototype.NotifyParent=function(){var g=this.ParentLmsCom;g&&!g.owner.closed&&g.owner.ListenChildClose&&g.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(g,j){return this.convertTotalSeconds((j-g-this.idle_time)/1E3)};
LmsComBase.prototype.convertTotalSeconds=function(g){var j=g%60;g-=j;var m=g%3600;g-=m;j=Math.round(j*100)/100;var q=j=new String(j);if(j.indexOf(".")!=-1){q=j.substring(0,j.indexOf("."));j.substring(j.indexOf(".")+1,j.length)}if(q.length<2)q="0"+q;j=q;g=g%3600!=0?0:g/3600;m=m%60!=0?0:m/60;if((new String(g)).length<2)g="0"+g;if((new String(m)).length<2)m="0"+m;return g+":"+m+":"+j};LmsComBase.prototype.GetBookmark=function(g){if(this.ParentLmsCom)return this.ParentLmsCom.GetBookmark(g);return 0};
LmsComBase.prototype.doGetUPKValue=function(g){if(this.ParentLmsCom)return this.ParentLmsCom.doGetUPKValue(g);return""};LmsComBase.prototype.doSetUPKValue=function(g,j){this.ParentLmsCom&&this.ParentLmsCom.doSetUPKValue(g,j)};LmsComBase.prototype.doUPKCommit=function(){this.ParentLmsCom&&this.ParentLmsCom.doUPKCommit()};LmsComBase.prototype.setInteraction=function(g,j){if(this.ParentLmsCom)return this.ParentLmsCom.setInteraction(g,j)};
LmsComBase.prototype.getAnsweredQuestions=function(){if(this.ParentLmsCom)return this.ParentLmsCom.getAnsweredQuestions();return{}};LmsComBase.prototype.setObjective=function(g,j){this.ParentLmsCom&&this.ParentLmsCom.setObjective(g,j)};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(g,j){this.status_obj=new LmsTopicStatus;this.status_obj.setRequiredMode(g,j);lmslog.addEntry(0,"OpenTopicStatus","RequiredMode",this.status_obj.requiredMode);this.status_obj.isScored=!!g.K;var m;m=GetTopLevelLmsMode()=="LMS"?g:j;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(g,j,m){this.status_obj=new LmsTopicLaunchStatus(g);this.status_obj.setRequiredMode(j,m);lmslog.addEntry(0,"OpenTopicLaunchStatus","RequiredMode",this.status_obj.requiredMode);this.status_obj.isScored=j.indexOf("K")!=-1;g=GetTopLevelLmsMode()=="LMS"?j:m;this.status_obj.setModeavail("S",g.indexOf("S")!=-1);this.status_obj.setModeavail("T",g.indexOf("T")!=-1);this.status_obj.setModeavail("K",g.indexOf("K")!=-1);this.status_obj.setModeavail("D",g.indexOf("D")!=
-1);this.status_obj.setModeavail("P",g.indexOf("P")!=-1);this.status_obj.setModeavail("E",g.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(g,j){this.status_obj=new LmsAssessmentStatus;this.status_obj.hash=j;var m=this.lesson_data,q,u=null;if(m)if(this.bigsco)u=j;else{var z=m.indexOf("@");if(z>0){q=parseInt(m.substring(0,z));u=m.substring(z+1,z+q+1).replace(/ /g,"+");m=m.substring(z+q+1)}}if(j===u&&m.length===g+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<g;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<g;q++)this.status_obj.questionstatus[q]="N"}return this.status_obj};LmsComBase.prototype.OpenTOCStatus=function(g,j){var m=new LmsTOCStatus;this.status_obj=m;var q=new TOCState(g,j);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(g){this.ParentLmsCom&&this.ParentLmsCom.utRecordType(g)};
LmsComBase.prototype.utRecordStartTime=function(g){this.ParentLmsCom&&this.ParentLmsCom.utRecordStartTime(g)};LmsComBase.prototype.utRecordEndTime=function(g){this.ParentLmsCom&&this.ParentLmsCom.utRecordEndTime(g)};LmsComBase.prototype.utRecordCompletionStatus=function(g){this.ParentLmsCom&&this.ParentLmsCom.utRecordCompletionStatus(g)};LmsComBase.prototype.utRecordSuccessStatus=function(g){this.ParentLmsCom&&this.ParentLmsCom.utRecordSuccessStatus(g)};
LmsComBase.prototype.utRecordScoreScaled=function(g){this.ParentLmsCom&&this.ParentLmsCom.utRecordScoreScaled(g)};LmsComBase.prototype.utRecordFrameViewed=function(g){this.ParentLmsCom&&this.ParentLmsCom.utRecordFrameViewed(g)};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 g=this.API.LMSGetLastError(),j=this.API.LMSGetErrorString(g)+"\n"+this.API.LMSGetDiagnostic("");this.API=null;lms_ConnectionLost(g+" "+j);lmslog.addEntry(0,"LmsComScorm12.Begin","",j);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 g=this.API.LMSGetLastError(),j=this.API.LMSGetErrorString(g)+"\n"+this.API.LMSGetDiagnostic("");this.API=null;lms_ConnectionLost(g+" "+j);lmslog.addEntry(0,"LmsComScorm12.End","",j);return false}this.API=null;lmslog.addEntry(0,"LmsComScorm12.End","","LMS session terminated");return true};
LmsComScorm12.prototype.SendCompletionInfo=function(g){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")}g||this.doLMSCommit()};LmsComScorm12.prototype.LoadAPIAdapter=function(g){this.API=null;if(GetLmsComFactory())this.API=GetLmsComFactory().scorm_api_12;g()};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(g){if(this.API==null)return"";var j=this.API.LMSGetValue(g),m=this.API.LMSGetLastError();if(m!=this.ErrorCodes.NoError){j=this.API.LMSGetErrorString(m);lms_ConnectionLost(m+" "+j+", "+g);lmslog.addEntry(0,"doLMSGetValue","",R_scorm_getvalfail+g+" "+j);return""}lmslog.addEntry(1,"doLMSGetValue",g,j);return j};
LmsComScorm12.prototype.doLMSSetValue=function(g,j){if(this.API==null)return"false";if(this.API.LMSSetValue(g,j)=="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+", "+g+", "+j);lmslog.addEntry(0,"doLMSSetValue","",R_scorm_setvalfail+g+":"+j+" "+q);return"false"}}lmslog.addEntry(1,"doLMSSetValue",g,j);return"true"};
LmsComScorm12.prototype.doLMSCommit=function(){if(this.API==null)return"false";if(this.API.LMSCommit("")=="false"){var g=this.API.LMSGetLastError(),j=this.API.LMSGetErrorString(g);lms_ConnectionLost(g+" "+j);lmslog.addEntry(0,"doLMSCommit","",j);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 g=this.API.GetLastError(),j=this.API.GetErrorString(g)+"\n"+this.API.GetDiagnostic("");this.API=null;lms_ConnectionLost(g+" "+j);lmslog.addEntry(0,"LmsComScorm2004.Begin","",j);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){g=this.doGetValue("cmi.success_status");if(g===LMS_PASSED||g===LMS_FAILED)this.lesson_status=g}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 g=this.API.GetLastError(),j=this.API.GetErrorString(g)+"\n"+this.API.GetDiagnostic("");this.API=null;lms_ConnectionLost(g+" "+j);lmslog.addEntry(0,"LmsComScorm2004.End","",j);return false}this.API=null;lmslog.addEntry(0,"LmsComScorm2004.End","","LMS session terminated");return true};
LmsComScorm2004.prototype.LoadAPIAdapter=function(g){this.API=null;if(GetLmsComFactory())this.API=GetLmsComFactory().scorm_api_2004;g()};
LmsComScorm2004.prototype.SendCompletionInfo=function(g){var j=this.getReportedLessonStatus();if(j===LMS_NOT_ATTEMPTED)j=this.original_lesson_status;if(j==LMS_PASSED||j==LMS_FAILED){this.doSetValue("cmi.success_status",j);this.doSetValue("cmi.completion_status",LMS_COMPLETED)}else this.doSetValue("cmi.completion_status",j);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")}g||this.doCommit()};LmsComScorm2004.prototype.convertTotalSeconds=function(g){var j=g%60;g-=j;var m=g%3600;g-=m;j=Math.round(j*100)/100;var q=j=new String(j);if(j.indexOf(".")!=-1){q=j.substring(0,j.indexOf("."));j.substring(j.indexOf(".")+1,j.length)}if(q.length<2)q="0"+q;j=q;g=g%3600!=0?0:g/3600;m=m%60!=0?0:m/60;if((new String(g)).length<2)g="0"+g;if((new String(m)).length<2)m="0"+m;return"PT"+g+"H"+m+"M"+j+"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(g){if(this.API==null)return"";var j=this.API.GetValue(g),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(g)}else{j=this.API.GetErrorString(m);lms_ConnectionLost(m+" "+j+", "+g);lmslog.addEntry(0,"doGetValue","",R_scorm_getvalfail+g+" "+j);return""}lmslog.addEntry(1,"doGetValue",g,j);return j};
LmsComScorm2004.prototype.doSetValue=function(g,j){if(this.API==null)return"false";if(this.API.SetValue(g,j)=="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(g,j)}else{var q=this.API.GetErrorString(m);lms_ConnectionLost(m+" "+q+", "+g+", "+j);lmslog.addEntry(0,"doSetValue","",R_scorm_setvalfail+g+":"+j+" "+q);return"false"}}lmslog.addEntry(1,"doSetValue",g,j);return"true"};
LmsComScorm2004.prototype.doCommit=function(){if(this.API==null)return"false";if(this.API.Commit("")=="false"){var g=this.API.GetLastError(),j=this.API.GetErrorString(g);if(g==this.ErrorCodes.KPathTimeout&&this.object_type_name=="LmsComKPath"){lmslog.addEntry(0,"doCommit","","KCenter timeout");g=this.API.GetValue("upk.idle_time");lmslog.addEntry(0,"doCommit","upk.idle_time",g);this.idle_time+=g;lmslog.addEntry(0,"doCommit","idle_time",this.idle_time);return this.doCommit()}else{this.API=null;lms_ConnectionLost(g+
" "+j);lmslog.addEntry(0,"doCommit","",j);return"false"}}lmslog.addEntry(1,"doCommit","","");return"true"};function LmsComKPath(g){this.allow_launch=false;if(g!=null){this.Copy(g);this.ParentLmsCom=g}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 g=LmsComKPath.prototype.BaseClass.Begin.call(this);this.doSetValue("upk.launch_from",GetTopLevelLmsMode());lmslog.addEntry(0,"LmsComKPath.Begin","","LMS session started");return g};
LmsComKPath.prototype.SendCompletionInfo=function(g){var j=this.getReportedLessonStatus();if(j===LMS_NOT_ATTEMPTED)this.doSetValue("cmi.completion_status",LMS_NOT_ATTEMPTED);else{if(j==LMS_PASSED||j==LMS_FAILED){this.doSetValue("cmi.success_status",j);this.doSetValue("cmi.completion_status",LMS_COMPLETED)}else this.doSetValue("cmi.completion_status",j);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")}g||this.doCommit()}};LmsComKPath.prototype.LoadAPIAdapter=function(g){if(this.API)g();else{var j=findKPathAPIFrame(window);if(j&&j.LoadRuntime&&this.guid){this.deferred_callback=g;var m=this;j.LoadRuntime(this.guid,0,0,0,function(q,u,z,v){m.LoadAPIAdapterCallback(q,u,z,v)})}else g()}};
LmsComKPath.prototype.LoadAPIAdapterCallback=function(g,j,m,q){if(g=="succeeded"&&j==this.guid){this.API=m.GetAPI();lmslog.addEntry(0,"LoadAPIAdapterCallback","","KPath adapter bound");try{this.deferred_callback()}catch(u){}}else{if(g=="no SCO")this.API=null;else alert(R_scorm_noapi+" "+q);lmslog.addEntry(0,"LoadAPIAdapterCallback","",q);this.deferred_callback()}};LmsComKPath.prototype.doGetUPKValue=function(g){g=this.doGetValue(g);if(g==="")g=-1;return g};
LmsComKPath.prototype.doSetUPKValue=function(g,j){this.doSetValue(g,j)};LmsComKPath.prototype.doUPKCommit=function(){this.doCommit()};
LmsComKPath.prototype.setInteraction=function(g,j){if(this.API){var m=j.status_obj,q=this.doGetValue("cmi.interactions._count");if(g==-1)g=q;g>=q&&this.doSetValue("cmi.interactions."+g+".id",j.guid);this.doSetValue("cmi.interactions."+g+".type",m.getQuestionType());this.doSetValue("cmi.interactions."+g+".timestamp",(new Date).toSCORM());this.doSetValue("cmi.interactions."+g+".weighting","1");if(m.getResult()){this.doSetValue("cmi.interactions."+g+".learner_response",m.getLearnerResponse());this.doSetValue("cmi.interactions."+
g+".result",m.getResult())}this.doCommit();return g}};LmsComKPath.prototype.getAnsweredQuestions=function(){var g={};if(!this.API)return g;for(var j=this.doGetValue("cmi.interactions._count"),m=0;m<j;m++){var q=this.doGetValue("cmi.interactions."+m+".id");g[q]={index:m};g[q].weighting=this.doGetValue("cmi.interactions."+m+".weighting");g[q].result=this.doGetValue("cmi.interactions."+m+".result")}return g};
LmsComKPath.prototype.setObjective=function(g,j){if(this.API){this.doSetValue("cmi.objectives."+g+".id",j.objectiveGuid=="PRIMARYOBJ"?"PRIMARYOBJ":"OBJ_"+j.objectiveGuid);this.doSetValue("cmi.objectives."+g+".score.scaled",j.score/100);this.doSetValue("cmi.objectives."+g+".completion_status",j.completed?"completed":"incomplete");this.doSetValue("cmi.objectives."+g+".success_status",j.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(g){this.doSetValue("upk.modes."+this.mode_index+".type",g)};LmsComKPath.prototype.utRecordStartTime=function(g){this.doSetValue("upk.modes."+this.mode_index+".start_time",g.toSCORM())};LmsComKPath.prototype.utRecordEndTime=function(g){this.doSetValue("upk.modes."+this.mode_index+".end_time",g.toSCORM())};LmsComKPath.prototype.utRecordCompletionStatus=function(g){this.doSetValue("upk.modes."+this.mode_index+".completion_status",g)};
LmsComKPath.prototype.utRecordSuccessStatus=function(g){this.doSetValue("upk.modes."+this.mode_index+".success_status",g)};LmsComKPath.prototype.utRecordScoreScaled=function(g){this.doSetValue("upk.modes."+this.mode_index+".score.scaled",g)};LmsComKPath.prototype.utRecordFrameViewed=function(g){this.doSetValue("upk.modes."+this.mode_index+".frame_viewed",g);this.doSetValue("cmi.session_time",this.computeTime(this.start_date,(new Date).getTime()));this.doCommit()};
function LmsComAICC(g,j){this.allow_launch=false;this.aicc_url=g;this.aicc_sid=j;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 g=this.hacpGetpostdata();g="command=putparam&version="+LmsConfig.AiccVersion+"&session_id="+this.aicc_sid+"&aicc_data="+escape(g)+"&";lmslog.addEntry(0,"LmsComAICC.End","params",g);g=this.app.GetData(unescape(this.aicc_url),g);lmslog.addEntry(0,"LmsComAICC.End","strData",g);g="version="+LmsConfig.AiccVersion+
"&command=ExitAU&session_id="+this.aicc_sid+"&";lmslog.addEntry(0,"LmsComAICC.End","params",g);g=this.app.GetData(unescape(this.aicc_url),g);lmslog.addEntry(0,"LmsComAICC.End","strData",g)};var closingAmp=true;
LmsComAICC.prototype.hacpGetparam=function(){lmslog.addEntry(0,"hacpGetparam","","Start");var g="";g="version="+LmsConfig.AiccVersion+"&command=GetParam&session_id="+this.aicc_sid;if(closingAmp)g+="&";lmslog.addEntry(0,"hacpGetparam","params",g);g=this.app.GetData(unescape(this.aicc_url),g);lmslog.addEntry(0,"hacpGetparam","strData",g);var j,m,q=false;g+=" ";for(var u=g.split("\r"),z=0;z<u.length;z++){var v=u[z],A=trimValue(v.substring(0,v.indexOf("="))),C=trimValue(v.substring(v.indexOf("=")+1));
if(A.toLowerCase()=="error"){j=C;q=true}if(A.toLowerCase()=="error_text")m=C;if(A.toLowerCase()=="aicc_data"){this.aicc_data=g.substring(g.indexOf(v.substring(0,v.indexOf("=")))+v.substring(0,v.indexOf("=")).length+1);q=true}}if(q)if(j==0){u=get_group_content("core",this.aicc_data).split("\r");for(z=0;z<u.length;z++){v=u[z];A=trimValue(v.substring(0,v.indexOf("=")));C=trimValue(v.substring(v.indexOf("=")+1));if(A.toLowerCase()=="student_id")this.student_id=C;if(A.toLowerCase()=="student_name")this.student_name=
C;if(A.toLowerCase()=="lesson_status"){this.lesson_status=C.toLowerCase().charAt(0);if(C.indexOf(",")!=-1)this.lesson_flag=trimValue(C.substring(C.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(A.toLowerCase()=="lesson_location")this.lesson_location=C;if(A.toLowerCase()=="credit")this.credit=C;if(A.toLowerCase()=="score")this.score=C;if(A.toLowerCase()=="time")this.time=C}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 - "+g);lmslog.addEntry(0,"hacpGetparam","","Unable to post to server "+unescape(this.aicc_url)+" - "+g)}};
LmsComAICC.prototype.hacpGetpostdata=function(){lmslog.addEntry(0,"hacpGetpostdata","","Start");var g="";g="[CORE]\r\n";g+="Lesson_Location=\r\n";var j=this.getReportedLessonStatus();if(j===LMS_NOT_ATTEMPTED)j=this.original_lesson_status;g+=this.lesson_status===LMS_INCOMPLETE?"Lesson_Status="+j+", suspend\r\n":"Lesson_Status="+j+"\r\n";lmslog.addEntry(0,"hacpGetpostdata","is_assess",this.is_assess);g+=this.score!==""?"Score="+this.score+"\r\n":"Score=\r\n";g+="Time="+this.computeTime(this.start_date,
this.end_date)+"\r\n";g+="[CORE_LESSON]\r\n";g+=this.lesson_data+"\r\n";lmslog.addEntry(0,"hacpGetpostdata","NewAiccData",g);return g};function get_group_content(g,j){for(var m="",q=j.split("\r"),u=false,z=0;z<q.length;z++){var v=trimValue(q[z]);if(v.substr(0,1)=="[")u=v.toLowerCase().indexOf("["+g.toLowerCase()+"]")>=0?true:false;else if(u)m+=v+"\r\n"}return m}
function trimValue(g){for(var j=0,m=g.length,q=0;q<g.length;q++)if(g.substr(q,1)!=" "&&g.substr(q,1)!="\t"&&g.substr(q,1)!="\n"&&g.substr(q,1)!="\r"){j=q;break}if(q==g.length)return"";for(q=g.length-1;q>0;q--)if(g.substr(q,1)!=" "&&g.substr(q,1)!="\t"&&g.substr(q,1)!="\n"&&g.substr(q,1)!="\r"){m=q;break}if(q==0)m=0;return g.substring(j,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 g=new Cookie(document,"Bookmark_"+this.toc_hash,30);g.Load();this.lesson_location=g.Location}};
LmsComCookie.prototype.End=function(){LmsComCookie.prototype.BaseClass.End.call(this);if(this.toc_hash){var g=new Cookie(document,"Bookmark_"+this.toc_hash,30);g.Load();g.Location=this.lesson_location;g.Store()}};LmsComCookie.prototype.GetBookmark=function(g){if(this.toc_hash=g){g=new Cookie(document,"Bookmark_"+this.toc_hash,30);g.Load();this.lesson_location=g.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(g){this.status=g};LmsBasicStatus.prototype.Save=function(g){g.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(g){g.lesson_data=g.bigsco?"":this.getStatusstring();g.lesson_status=this.getLMSStatus();g.score=this.getScore()};LmsTopicStatus.prototype.setModeavail=function(g,j){this.modes[g].avail=j};
LmsTopicStatus.prototype.getModeavail=function(g){return this.modes[g].avail};LmsTopicStatus.prototype.setModestatus=function(g,j){if(this.modes[g].avail)this.modes[g].complete=j;else lmslog.addEntry(0,"setModestatus","","Invalid call of setModestatus")};LmsTopicStatus.prototype.getModestatus=function(g){return this.modes[g].complete};LmsTopicStatus.prototype.setRequiredMode=function(g,j){this.requiredMode=GetTopLevelLmsMode()=="LMS"?this._getRequiredMode(g):this._getRequiredMode(j)};
LmsTopicStatus.prototype._getRequiredMode=function(g){for(var j=0;j<6;j++)if(g["EKTSPD".charAt(j)])return"EKTSPD".charAt(j);return"None"};LmsTopicStatus.prototype.GetRequiredMode=function(){return this.requiredMode};
LmsTopicStatus.prototype.initTopicstat=function(g){lmslog.addEntry(0,"initTopicstat","","Start");lmslog.addEntry(0,"initTopicstat","s string",g);lmslog.addEntry(0,"initTopicstat","s.length",g.length);if(g.length!=0){var j=g.split(",");for(g=0;g<=j.length-1;g++){lmslog.addEntry(0,"initTopicstat","f["+g+"]",j[g]);if(j[g].charAt(1)=="=")this.modes[j[g].charAt(0)].complete=this.modeIscomplete(j[g].substr(2,1));else if(j[g].substr(0,5)=="PASS=")this.passed=j[g].substr(5,1)=="0"?false:true;else if(j[g].substr(0,
6)=="SCORE=")this.score=j[g].substr(6)}}};LmsTopicStatus.prototype.clearTopicstat=function(){this.score="";this.passed=false;for(var g in this.modes)this.modes[g].complete=false};
LmsTopicStatus.prototype.getStatusstring=function(){lmslog.addEntry(0,"get_statusstring","","Start");var g="";for(x in this.modes){if(g.length!=0)g+=",";g+=this.modes[x].id+"="+(this.modes[x].complete?"C":"I")}if(this.modes.K.complete&&this.isScored)g+=",PASS="+(this.passed?"1":"0")+",SCORE="+this.score;lmslog.addEntry(0,"get_statusstring","dataString",g);return g};
LmsTopicStatus.prototype.getStatus=function(){var g="";if(this.isComplete())if(this.modes.K.avail&&this.isScored)g=this.passed?LMS_PASSED:LMS_FAILED;else{g=LMS_COMPLETED;if(this.savedStatus=="P"||this.savedStatus=="F")g=this.savedStatus}else{g=LMS_INCOMPLETE;if(this.savedStatus=="P"||this.savedStatus=="F"||this.savedStatus=="C")g=Stat2Lms(this.savedStatus)}return g};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 g=false;if(this.requiredMode==="None")g=true;else{var j=["E","K","T","S","P","D"];for(i=0;i<j.length;i++){if(this.modes[j[i]].complete)g=true;if(j[i]===this.requiredMode)break}}lmslog.addEntry(0,"is_complete","iscomp",g);return g};
LmsTopicStatus.prototype.modeIscomplete=function(g){var j=false;lmslog.addEntry(0,"modeIscomplete","","Start");if(g=="C")j=true;else if(g=="I")j=false;lmslog.addEntry(0,"modeIscomplete","ret",j);return j};LmsTopicStatus.prototype.isRequired=function(g){return this.requiredMode===g};LmsTopicLaunchStatus.prototype=new LmsTopicStatus;LmsTopicLaunchStatus.prototype.constructor=LmsTopicStatus;LmsTopicLaunchStatus.prototype.BaseClass=LmsTopicStatus.prototype;
function LmsTopicLaunchStatus(g){this.mode=this.modes[g];this.score="";this.passed=false;this.anylaunched=true}LmsTopicLaunchStatus.prototype.Save=function(g){this.BaseClass.Save.call(this,g)};LmsTopicLaunchStatus.prototype._getRequiredMode=function(g){for(var j=0;j<6;j++)if(g.indexOf("EKTSPD".charAt(j))!=-1)return"EKTSPD".charAt(j);return"None"};LmsTopicLaunchStatus.prototype.getResult=function(){return this.passed?"correct":"incorrect"};LmsTopicLaunchStatus.prototype.getQuestionType=function(){return"other"};
LmsTopicLaunchStatus.prototype.getLearnerResponse=function(){return""};function Mode(g){this.complete=this.avail=false;this.id=g}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(g){g.lesson_status=this.status;g.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(g){return this.question_type=g};LmsQuestionStatus.prototype.getLearnerResponse=function(){return this.learner_response};LmsQuestionStatus.prototype.setLearnerResponse=function(g){return this.learner_response=g};
LmsQuestionStatus.prototype.getResult=function(){return this.result};LmsQuestionStatus.prototype.setResult=function(g){return this.result=g};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(g){g.lesson_status=this.status;g.score=this.status!=LMS_INCOMPLETE&&this.status!=LMS_NOT_ATTEMPTED?this.score:"";var j="";g.bigsco||(j=this.hash.length+"@"+this.hash);j+=this.status==LMS_NOT_ATTEMPTED?this.savedStatus:Lms2Stat(this.status);for(var m=0;m<this.questionstatus.length;m++)j+=this.questionstatus[m];g.lesson_data=j};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(g){return this.score=g};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(g){g.lesson_status=this.getStatus();var j=this.getTocState();g.lesson_data=j.SerializeTOC()};LmsTOCStatus.prototype.getTocState=function(){return this.tocstate};LmsTOCStatus.prototype.setTocState=function(g){return this.tocstate=g};function NodeState(){this.Status="N";this.Score=null;this.ChildrenStatus=""}function TOCState(g,j){this.NodeCounter=g;this.TocVersion=j;this.InitInLookupTable()}
TOCState.prototype.SetStatus=function(g,j){this.LookUpTable[g]||(this.LookUpTable[g]=new NodeState);this.LookUpTable[g].Status=j};TOCState.prototype.GetStatus=function(g){return this.LookUpTable[g].Status};TOCState.prototype.SetScore=function(g,j){this.LookUpTable[g]||(this.LookUpTable[g]=new NodeState);this.LookUpTable[g].Score=j};TOCState.prototype.GetScore=function(g){return this.LookUpTable[g].Score};
TOCState.prototype.SetChildren=function(g,j){this.LookUpTable[g]||(this.LookUpTable[g]=new NodeState);this.LookUpTable[g].ChildrenStatus=j};TOCState.prototype.GetChildren=function(g){return this.LookUpTable[g].ChildrenStatus};
TOCState.prototype.DeserializeTOC=function(g){var j=0,m,q=g.indexOf("@");if(q>0){j=parseInt(g.substring(0,q));m=g.substring(q+1,q+j+1);if(m==this.TocVersion){g=g.substring(q+j+2);q=g.indexOf("@");if(q>0){j=parseInt(g.substring(0,q));g=g.substring(q+1,q+j+1);if(g.length==j){g=this.RLESDecode(g);this.DeserializeLookUpTable(g)}}}}};
TOCState.prototype.DeserializeLookUpTable=function(g){for(var j=0,m="",q=0;q<g.length;q++){m=g.charAt(q);this.SetStatus(j,m);for(m="";q<g.length-1&&g.charAt(q+1)>="0"&&g.charAt(q+1)<="9";){q++;m+=g.charAt(q)}m.length>0&&this.SetScore(j,parseInt(m));if(q<g.length-1&&g.charAt(q+1)=="{"){m=g.indexOf("}",q+2);this.SetChildren(j,g.substring(q+2,m));q=m}j++}};
TOCState.prototype.SerializeTOC=function(){var g=this.RLESEncode(this.SerializeLookupTable());return this.TocVersion.length+"@"+this.TocVersion+" "+g.length+"@"+g};TOCState.prototype.SerializeLookupTable=function(){for(var g="",j=0;j<this.NodeCounter;j++){var m=this.LookUpTable[j].Status,q=this.LookUpTable[j].ChildrenStatus;m||(m="N");g+=m;if(q)g+="{"+q+"}"}return g};
TOCState.prototype.InitInLookupTable=function(){this.LookUpTable=[];for(var g=0;g<this.NodeCounter;g++)this.LookUpTable[g]=new NodeState;this.SetStatus(0,"I")};TOCState.prototype.RLESEncode=function(g){var j="",m=0,q="";j=g.charAt(0);for(var u=m=1;u<g.length;u++)if(g.charAt(u)==j)m++;else{if(m>2){q+="#";q+=m;q+=j}else q+=g.substring(u-m,u);j=g.charAt(u);m=1}if(m>2){q+="#";q+=m;q+=j}else q+=g.substring(u-m,u);return q};
TOCState.prototype.RLESDecode=function(g){for(var j="",m="",q=0;q<g.length;q++)if(g.charAt(q)=="#"){m="";for(q++;g.charAt(q)>="0"&&g.charAt(q)<="9";){m+=g.charAt(q);q++}m=parseInt(m);for(var u=0;u<m;u++)j+=g.charAt(q)}else j+=g.charAt(q);return j};function Lms2Stat(g){return g.charAt(0).toUpperCase()}function Stat2Lms(g){return[LMS_PASSED,LMS_FAILED,LMS_COMPLETED,LMS_INCOMPLETE,LMS_NOT_ATTEMPTED]["PFCIN".indexOf(g)]}
function LogEntry(g,j,m,q,u){this.logType=j;this.funcName=m;this.varName=q;this.msgValue=u;this.dateTime=(new Date).getTime()-g}LogEntry.prototype.GetTableRow=function(){var g="#006600";if(this.logType===1)g="#000033";var j=this.varName;if(j==="")j="&nbsp;";var m=this.msgValue;if(m==="")m="&nbsp;";var q="<tr>";q+="<td align='right'>"+this.dateTime/1E3+"</td>";q+="<td style='color:"+g+";'>"+this.funcName+"</td>";q+="<td>"+j+"</td>";q+="<td>"+m+"</td>";q+="</tr>";return q};
function Log(g){this.traceWindow=null;this.logArray=[];this.enabled=g;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(g,j,m,q){if(this.enabled){this.logArray.push(new LogEntry(this.startDateTime.getTime(),g,j,m,q));this.changed=true;this.traceWindow&&this.windowReady&&this.traceWindow.UpdateTraceStack()}};
Log.prototype.writeLog=function(g,j){var m=j;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(g==0)for(var z=this.logArray.length-m;z<this.logArray.length;z++){u=this.logArray[z];q+=u.GetTableRow(z)}else for(z=this.logArray.length-1;z>=this.logArray.length-m;z--){u=this.logArray[z];
q+=u.GetTableRow(z)}q+="</table>";this.changed=false;this.windowReady=true;return q};Log.prototype.writeDetails=function(g){return this.logArray[g].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(g){if(_lmsParser==null){_lmsParser=new UrlParser;_lmsParser.Parse();if(g=="player"){if(_lmsParser.GetParameter("directlaunch")!=null)_lmsMode=Kpath_launch==true?"KPT":"Cookie"}else if(g=="lmstart"){if(_lmsParser.GetParameter("toc")==null)_lmsMode=_lmsParser.GetParameter("dhtml")!=null?Kpath_launch==true?"KPT":"Cookie":"LMS"}else if(g=="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(g){var j=g._lmsMode;if(j==null)return _GetTopLevelLmsMode(g.lms_store.parentW);return j}var lms_initialized=false,lms_store,lmslog;
function lms_InitPage(g,j,m,q){if(lms_initialized==true)setTimeout(q,1);else{__Ialert("lms_InitPage called with parameters:"+g+","+j+","+m+","+q);lms_store={window:window,childIndex:g,parentW:j,cguid:m,callbackfunction:q};if(!j||j.closed){lmslog=new Log(LmsConfig.DebugMode);InitializeLmsCom();InsertRuntimeAPI(lms_LoadRuntimeComplete)}else if(j.lms_initialized){lmslog=j.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 g=document.LmsCom;g.guid=lms_store.cguid;g.owner=window;g.LoadAPIAdapter(lms_LoadAdapterComplete)}
function lms_UpdateUI(g){try{parent&&parent.updateUI&&parent.updateUI(g)}catch(j){}}var hasClosed=false;
function lms_ClosePage(g){__Ialert("lms_ClosePage() called");if(hasClosed!=true){hasClosed=true;var j=document.LmsCom;if(j&&j.session_active){var m=j.child;m&&m.session_active&&m.owner&&!m.owner.closed&&m.owner.lms_ClosePage(true);(m=j.ancillaryChild)&&m.session_active&&m.owner&&!m.owner.closed&&m.owner.lms_ClosePage(true);window._closePage&&_closePage();if(j.session_active){j.SaveStatus();j.End();j.NotifyParent()}g&&window.close()}}}
function lms_ConnectionLost(g){window.ConnectionLostEvent&&ConnectionLostEvent(g);lms_store.parentW&&!lms_store.parentW.closed&&lms_store.parentW.lms_ConnectionLost(g)}function lms_IsConnected(){var g=document.LmsCom;if(g)return g.IsConnected();return false}function lms_IsKPathLogoutAvailable(){return!!window.Kpath_logout_available}
function _logout(g){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(g)if(window.opener&&!window.opener.closed){g=window.opener.location.href;window.opener.location.replace(Kpath_logout_URL+"&RedirectURL="+escape(g));window.close()}else if(IsTouchDevice()){g=window.location.href.split("/").slice(0,5).join("/")+"/ipad.html";
window.location.replace(Kpath_logout_URL+"&RedirectURL="+escape(g))}else window.location.replace(Kpath_logout_URL);else{g=window.location.href.replace("?genctx","");window.location.replace(Kpath_logout_URL+"&RedirectURL="+escape(g))}}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(g){lms_store.noSound=g}var _lms_show_all_alert=false;function __alert(g){if(_lms_show_alert||_lms_show_all_alert)alert(g+"\nfile: "+_lms_module_name)}
function __Ialert(g){if(_lms_show_alert||_lms_show_Ialert||_lms_show_all_alert)alert(g+"\nfile: "+_lms_module_name)};var _modeLaunch="incomplete",_feedbackUrlArgs="";function lms_LoadAdapterComplete(){__alert("lms_LoadAdapterComplete() called");var g=document.LmsCom;g.Begin();g.assessment_guid&&g.doSetUPKValue("upk.actual_guid",g.assessment_guid);g.utPushModeIndex();lms_initialized=true;setTimeout(lms_store.callbackfunction,1)}function GetChildLmsCom(g){__Ialert("lms_GetChildLmsCom() called");var j=document.LmsCom,m=g.window.document.LmsCom=new LmsComBase(j);m.owner=g.window;j.child=m}
function ListenChildClose(){__alert("lms_ListenChildClose() called");var g=document.LmsCom,j=g.child;if(j){g.status_obj.modes[j.status_obj.mode.id].complete=j.status_obj.mode.complete;g.utPopModeIndex()}}function _closePage(){var g=document.LmsCom;g.utRecordEndTime(new Date);g.utRecordCompletionStatus(_modeLaunch)}
function lms_LaunchTopic(g){__alert("lms_LaunchTopic("+g+") called");var j=document.LmsCom;if(g=="P"){j.utPushModeIndex();j.utRecordType("print_it");j.utRecordStartTime(new Date);j.utRecordEndTime(new Date);j.utRecordCompletionStatus(LMS_COMPLETED);j.utPopModeIndex();j.status_obj.setModestatus("P",true);j.SaveStatus()}}
function lms_topicStart(g,j){__alert("lms_topicStart() called with parameters: "+g+","+j);var m=document.LmsCom;m.assessment_guid?m.OpenTopicLaunchStatus(j,lmsModes+"K",playerModes+"K"):m.OpenTopicLaunchStatus(j,lmsModes,playerModes);m.lesson_status===LMS_NOT_ATTEMPTED&&m.status_obj.isComplete()&&m.status_obj.clearTopicstat();var q=["see_it","try_it","know_it","do_it","print_it","test_it"]["STKDPE".indexOf(j)];m.utRecordType(q);m.utRecordStartTime(new Date)}
function lms_topicFinish(g){__alert("lms_topicFinish() called with parameter: "+g);document.LmsCom.status_obj.mode.complete=true;_modeLaunch=LMS_COMPLETED}function lms_frameView(g,j,m){__alert("lms_frameView() called with parameter: "+g+","+j+","+m);document.LmsCom.utRecordFrameViewed(m);_feedbackUrlArgs="&FrameID="+m+"&UPKMode="+j}
function lms_knowitScore(g,j,m){__alert("lms_knowitScore called with parameter: "+g+","+j+","+m);g=document.LmsCom;g.status_obj.mode.complete=true;g.status_obj.score=j;g.status_obj.passed=m;g.utRecordSuccessStatus(m?"passed":"failed");g.utRecordScoreScaled(j/100)}function lms_getUserName(){return document.LmsCom.student_name}function lms_KPathLogout(){_logout(true)}var _lms_module_name="lms_topic.js",_lms_show_alert=false,_lms_show_Ialert=false;function splitUri(g){g=g.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);g.shift();return g=[g[1]+"://"+g[3],g[4],g[6]+g[8]]}
function combine(g,j){var m=j;if(m.indexOf("odrel://")==0)m=m.substr(8);if(m=="")m=".";var q=splitUri(g),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 z=m.split("/");if(z.length>2&&z[0]==""&&z[1]==""){u=u.split(":")[0]+":/";for(m=2;m<z.length;m++)u+="/"+z[m];return u}var v=[];for(m=0;m<q.length;m++)v[m]=q[m];for(m=0;m<z.length;m++)if(z[m]==".."){if(v.length>0)v=v.slice(0,
v.length-1)}else if(z[m]!=".")if(z[m]=="")v=[];else v[v.length]=z[m];q="";for(m=0;m<v.length;m++)q+="/"+v[m];return u+q}function getRootUrl(){if(typeof isTocHtml!="undefined"){var g=document.location.href;return g.substr(0,g.lastIndexOf("/"))}var j=splitUri(document.location.href);g=j[0];j=j[1];if(j.charAt(0)=="/")j=j.substr(1);j=j.split("/");var m;for(m=j.length-1;j[m]!="tpc"&&m>=0;m--);if(m>0)m-=1;for(var q="",u=0;u<m;u++)q+="/"+j[u];return g+q}
function isRelative(g){g=g.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);return g[1]==""||g[1]==undefined}function resolveIfRelative(g){return g.indexOf("odrel://")==0?resolve(g):g}function resolve(g){if(isRelative(PlayerConfig.BaseUrl)){var j=getRootUrl();j=combine(j,PlayerConfig.BaseUrl);return combine(j,g)}else return combine(PlayerConfig.BaseUrl,g)}
function resolveLinksInWebPage(){for(var g=document.getElementsByTagName("a"),j=0;j<g.length;j++)if(g[j].getAttribute("href").indexOf("odrel://")==0)g[j].href=resolve(g[j].getAttribute("href"))};if(!Array.prototype.last)Array.prototype.last=function(){return this.length>0?this[this.length-1]:null};if(!Array.prototype.first)Array.prototype.first=function(){return this.length>0?this[0]:null};function UPKDelegate(){this.fn=[]}UPKDelegate.prototype.Raise=function(g,j){for(var m=0;m<this.fn.length;m++)this.fn[m](g,j)};UPKDelegate.prototype.Register=function(g){this.fn.push(g)};UPKDelegate.prototype.Unregister=function(g){for(var j=0;j<this.fn.length;j++)if(this.fn[j]==g){this.fn.splice(j,1);return}alert("UPKDelegate.Unregister failed to find function")};
UPKDelegate.prototype.Count=function(){return this.fn.length};var upk=upk||{};
upk.Timeline=function(){function g(B,H){if(H=="back"){for(var L=J-1;L>=0;L--)if(I[L]==B)return L;for(L=J;L<I.length;L++)if(I[L]==B)return L}else{for(L=J;L<I.length;L++)if(I[L]==B)return L;for(L=J-1;L>=0;L--)if(I[L]==B)return L}return-1}function j(B){B=screens[B].actions[0];if(_HasSound(B)){B=B.id.substr(1)+".ASX";B=StandardTimeToMillisecs(sounds[B].duration);return isNaN(B)?0:B+300}return 0}function m(B){B=screens[B].actions[0].delay;if(B!=DELAY_INFINITE)return B*100;return 0}function q(B){if(B==
"end")return 0;return _HasSound(screens[B].actions[0])?j(B):m(B)}function u(B){if(B=="end")return 0;return screens[B].actions[0].animTime}function z(){var B=0,H=K.GetCurrentFrame();if(!H)return 0;if(H=="end")return 0;var L=screens[H].actions[0];switch(D){case "A":B+=_HasSound(L)?j(H):m(H);B+=M;break;case "D":B=M;break;case "S":B=SoundPlayer_GetTime();break;case "B":B=0}L=q(H)+u(H);if(B>L)B=L;if(R==H){if(H!="start")if(B<Q)B=Q;else Q=B}else B=0;R=H;return B}function v(B){Q=0;D="B";M=0;J=B}function A(){for(var B=
0,H=0;H<J;H++)B+=q(I[H])+u(I[H]);Z=B}function C(B){V=[];if(G(B,false))return true;V=[];return G(B,true)}function G(B,H,L){if(L==undefined)L=I.last();if(L=="end"){I.push("end");return true}var T=1;try{T=screens[L].actions.length}catch(da){}for(var ca=0;ca<T;ca++){var aa=screens[L].actions[ca].nextFrame,ba=false;if(aa==B){I.push(aa);return true}else if(aa=="end")continue;else if(_SkipFrame(screens[aa]))ba=true;if(!ba){if(H){if(ca>0){a:{for(ba=0;ba<I.length;ba++)if(V[ba]==aa){ba=true;break a}ba=false}if(ba)continue;
else V.push(aa)}}else if(g(aa)>=0)continue;I.push(aa)}if(G(B,H,aa))return true;else I.pop()}return false}function F(){W.Raise(K,{CurrentTime:K.GetCurrentTime(),TimelineDuration:E,FrameState:K.GetFrameState(),Locked:U})}var K={},I=[],U=false,P=0,S=0,J=-1;I.push("start");var E=0,Z=0,Q=0,R=0,O=false,W=new UPKDelegate,V,D="B",M;K.Init=function(B){if(O)return false;O=true;I.push(B);Q=R=0;return true};K.Lock=function(B,H){U=B;if(B==true){P=3;S=H}};K.OnProgressUpdate=function(B){W.Register(B);W.Count()==
1&&setInterval(F,300)};K.SetFrameState=function(B){D=B;M=0};K.GetFrameState=function(){return D};K.IncFrameTimeCounter=function(B){M+=B};K.CalculateTimeline=function(B){K.CalculateTimelineThrough(B)};K.CalculateTimelineThrough=function(B){I=[];I.push(StartScreen);B!="end"&&C(B);C("end");v(B=="end"?0:g(B));K.UpdateTimelineDuration()};K.UpTimelineAt=function(B,H,L){var T=g(B,H);if(L&&L.valid)T=L.timelineindex;if(T>=0&&H!="back"){v(T);A()}else{if(T>=0){I=I.slice(0,T+1);C("end")}else{I=I.slice(0,J+1);
C(B);B!="end"&&C("end");T=g(B,H)}v(T);K.UpdateTimelineDuration()}if(L&&L.valid){Q=L.resttime;R=this.GetCurrentFrame()}};K.GetCurrentFrame=function(){return I[J]};K.GetTimeline=function(){return I};K.GetCurrentFrameIndex=function(){return J};K.GetTimelineDuration=function(){return E};K.GetCurrentTime=function(){if(U==false)if(P>0){P--;if(S!=undefined)return S}return Z+z()};K.GetHistory=function(){for(var B=[],H=0;H<J;H++)B.push(I[H]);return B};K.UpdateTimelineDuration=function(){for(var B=0,H=0;H<
I.length;H++)B+=q(I[H])+u(I[H]);A();E=B};K.FrameTimeStructure=function(B,H,L,T,da){this.frameid=B;this.timelineindex=H;this.narration=L;this.animation=T;this.resttime=da};K.DeterminateCurrentFrameFromTime=function(B){var H=0,L=0,T=0;for(T=0;T<I.length;T++){var da=q(I[T]),ca=u(I[T]);H+=da+ca;if(H>=B)break;L=H}return new K.FrameTimeStructure(I[T],T,da,ca,B-L)};return K}();
function StandardTimeToMillisecs(g){g=g.split(":");var j=DELAY_INFINITE;try{j=parseFloat(g[0]*3600)+parseFloat(g[1]*60)+parseFloat(g[2]);j*=1E3}catch(m){}return j}function MillisecsToFormattedTime(g){g=(""+g/1E3).split(".");if(g.length==1){if(g[0].length<2)g[0]="0"+g[0];g[1]="00"}else{if(g[0].length<2)g[0]="0"+g[0];if(g[1].length<2)g[1]+="0"}g[0]=g[0].substr(0,2);g[1]=g[1].substr(0,2);return""+g[0]+"."+g[1]}var fidiv=document.getElementById("frameiddiv"),showtest=false;
function SetUpProgressReporting(){if(showtest){$("#frameiddiv").append("<div id='testtiming'>timing</div>");$("#frameiddiv").append("<div id='testtimeline'>timeline</div>");$("#frameiddiv").append("<input id='testback' type='button' value='Back' onclick='return testback_onclick()' />")}upk.Timeline.OnProgressUpdate(TestTimelineProgress)}function testback_onclick(){DemoPrev()}
function TestTimelineProgress(g,j){if(!j.Locked){if(SoundIsLocked)if(SoundIsLocked())return;if(showtest){var m=MillisecsToFormattedTime(j.CurrentTime)+" : "+MillisecsToFormattedTime(j.TimelineDuration);m+=" - "+j.FrameState;$("#testtiming").html(m);var q=upk.Timeline.GetTimeline(),u=upk.Timeline.GetCurrentFrameIndex();m="Cindex: "+u+" | ";for(var z=0;z<q.length;z++){if(z==u)m+="->";m+=q[z];if(z==u)m+="<-";m+=" "}$("#testtimeline").html(m)}if(navBar){navBar.setEndTime(j.TimelineDuration);navBar.setCurrentTime(j.CurrentTime)}}}
;var trackArgList,trackScoreCompleted,trackScoreRequired;function trackOnBegin(){for(var g=0;g<trackArgList.length;g++){strArg=trackArgList[g];if(strArg.substr(0,9)=="kpfeedbk="){PlayerConfig.TrackFeedBack=strArg.substr(9)=="0"?false:true;PlayerConfig.ShowScoreNeeded=PlayerConfig.TrackFeedBack}}}
function trackComplete(){for(var g="",j=0;j<trackArgList.length;j++){strArg=trackArgList[j];if(strArg.substr(0,11)=="kpnextpage=")g=strArg.substr(11)}if(g.length>0){j=""+trackScoreCompleted+"%";var m=0;if(trackScoreCompleted>=trackScoreRequired)m=1;var q="";q=g.indexOf("?")>=0||g.indexOf("#")>=0?g+"&score="+m+"&answer="+j:g+"?score="+m+"&answer="+j;if(window.parent.opener)window.parent.opener.location.href=q}}function trackIncomplete(){}var guidedParent=null,gopener=null;
function GetOpener(){if(top.window.opener)try{if(!top.window.opener.closed)if(top.window.opener.GIPlayer)gopener=guidedParent=top.window.opener.GIPlayer}catch(g){}}
var playMode="S",param_frame="",param_ctx="",param_ecid="",param_printitname="",lms_childIndex=0,lms_inAssessment=false,screenshotPath="",DEF_KWARNINGSCORELEVEL=1,KWarningLevel=0,KScoreNeeded=80,KTopicFinished=false,soundIsExported=false,KWrongScreens=[],KScoringScreen=false,KConfirmDemo=false,KConfirmCheckBox=true,KFinishClose=false,KContinueFlag=0,KGuestDemoMode=0,KRemediation1=true,KRemediation2=true,KRemediation3=true,binterf=0,def_PLAYER_CLOSE="PLAYER_CLOSE",NS4=navigator.appName=="Netscape"&&
parseInt(navigator.appVersion)==4,screens=[],screenNames=[],currentScreenObj,currentscreenName,FirstScreenName="",showLeadIn=2,firsthemialternativeindex=0,nosound=false,concepts=[],preloadImages=[],preloadImagesList=[],preloadImagesCacheSize=50,showScreen="",showAct=0,moduleName="",topicName=unescape(document.title),topicShowBubbles="",StartAction=0,Knowit_minimum=167,Rem1_minimum=200,Rem2_minimum=250,Rem4_width=300;function DummyObj(){this.type=""}
var showActObj=new DummyObj,showActInpObj,showHistory=[],historyActionMap=[],isPaused=false,DELAY_INFINITE=999,MOUSE_STEP=25,scrH=0,scrW=0,animTimeout,bullsTimeout,animPhase="",animCmd="",animSteps=0,animStepOriginal=0,anim_x,anim_y,anim_to_x,anim_to_y,screenshot=new Image,event_blocked,animObject,showFrameIDToggle=0;function InputOnFocus(){if(showActInpObj)showActInpObj.hasfocus=true}function InputOnBlur(){if(showActInpObj)showActInpObj.hasfocus=false}
function FocusMe(){try{window.focus()}catch(g){}}function FocusInpObj(){if(showActInpObj){try{showActInpObj.focus()}catch(g){}var j=document.getElementById(showActInpObj.id);j.text=j.text;SelectText(showActInpObj)}}function SelectText(g){IsTouchDevice()==null?g.select():g.setSelectionRange(0,9999)}function OnFocus(){showActObj&&showActObj.type&&showActObj.type=="Input"&&showActInpObj&&setTimeout("FocusInpObj()",10)}function OnBubbleMoved(){OnFocus()}
function OnBubbleClicked(){actionMenu&&actionMenu.IsOnScreen()&&actionMenu.Close()}function AnimObject(g,j,m){this.cmd=g;this.timeout=j;this.phase=m}function IsLeadIn(g){if(g==null)g=showActObj;return screens.start.actions[0].id==g.id}function IsLeadOut(g){if(g==null)g=showActObj;return g.nextFrame=="end"}function IsDecision(g){if(g==null)g=showActObj;return g.type=="Decision"}function IsExplanation(g){if(g==null)g=showActObj;if(IsLeadIn(g)||IsLeadOut(g))return false;return g.type=="None"}
function IsActionFrame(g){if(g==null)g=showActObj;return g.type=="Normal"}function StoredEvent(g,j,m,q){this.storedEvent=true;this.pX=g;this.pY=j;this.pShState=m;this.pButton=q}function AddToWrongScreens(g){for(var j=0;j<KWrongScreens.length;j++)if(KWrongScreens[j]==g)return;KWrongScreens[KWrongScreens.length]=g}
function GetResultInPercent(g){for(var j=0,m=0;m<showHistory.length;m++)screens[showHistory[m]].actions[0].type!="None"&&j++;m=KWrongScreens.length;if(g)if(!IsLeadOut()){g=screens[showScreen];for(var q=g.actions[0].nextFrame;q!="end";){if(g.type!="decision"&&g.type!="none"){j++;m++}g=screens[q];q=g.actions[0].nextFrame}}if(j==0)return 100;return Math.round(100-m/j*100)}
function StartDemoInKnowIt(){IsDragBegin||AddToWrongScreens(showScreen);KGuestDemoMode=1;binterf.SetMoveable(false);setTimeout("ShowScreen(showScreen)",200)}function StartDemoInTryIt(){KGuestDemoMode=1;setTimeout("ShowScreen(showScreen)",200)}
function HLink(g){if(playMode=="T")if(g==0||g==1||g==2){HLinkStart=true;TeacherForward(true)}else if(g==13)AssessStringInput(true,true)?TeacherForward(true):TeacherWrong();else if(g==130)UpdateDoneTyping(false);else g==131&&UpdateDoneTyping(true);else if(playMode=="S")if(g==0||g==1||g==2)DemoForward();else g==600&&PauseToggle();else if(g==0||g==1){HLinkStart=true;TeacherForward(true)}else if(g==2)if(KWarningLevel<DEF_KWARNINGSCORELEVEL&&KConfirmCheckBox){HideAction();KConfirmDemo=true;ShowAction()}else{KWarningLevel<
DEF_KWARNINGSCORELEVEL&&!KConfirmCheckBox&&AddToWrongScreens(showScreen);StartDemoInKnowIt()}else if(g==10)StartDemoInKnowIt();else if(g==11){KConfirmDemo=false;AddToWrongScreens(showScreen);StartDemoInKnowIt()}else if(g==110)UpdateYesNo(false,false);else if(g==111)UpdateYesNo(true,false);else if(g==12){HideAction();KConfirmDemo=false;ShowAction()}else if(g==120)UpdateYesNo(false,false);else if(g==121)UpdateYesNo(false,true);else if(g==13)AssessStringInput(true,true)?TeacherForward(true):TeacherWrong();
else if(g==130)UpdateDoneTyping(false);else if(g==131)UpdateDoneTyping(true);else if(g==125)KConfirmCheckBox=!KConfirmCheckBox;else if(g==126){KConfirmCheckBox=!KConfirmCheckBox;document.getElementsByName("KConfCB")[0].checked=!document.getElementsByName("KConfCB")[0].checked}else if(g==20)ClosePlayer(1);else if(g==30)StartDemoInKnowIt();else if(g==400){if(!trackSent){g=GetResultInPercent();page=window.open("../../../certificate/certificate.html#ModuleDesc=1&TopicDesc=1&PctComplete="+g+"&PctNeeded="+
KScoreNeeded,"print","toolbar=1,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=800,height=600,left=147,top=131")}}else if(g==500)ClosePlayer();else if(g==501){HideAction();KFinishClose=false;ShowAction()}else if(g==502)ClosePlayer(0,1);else if(g==503){lms_knowitScore(getMyGuid(),0,0);lms_topicFinish(getMyGuid());ClosePlayer()}else if(g==504){HideAction();KFinishClose=false;ShowAction()}else g==600&&PauseToggle()}
function Certification_GetModuleName(){if(moduleName.length==0)return"";return R_outline+moduleName}function Certification_GetTopicName(){if(topicName.length==0)return"";return R_topic+topicName}function OnClose(){if(playMode=="K")if(IsLeadOut())KScoringScreen?ClosePlayer(1):HLink(1);else{HideAction();KFinishClose=true;ShowAction()}else ClosePlayer()}var actionMenu=0,closedbyEnter=false;
function OnAction(){if(closedbyEnter)closedbyEnter=false;else{if(actionMenu)if(actionMenu.IsOnScreen()){actionMenu.Close();return true}if(playMode=="T"||playMode=="K"&&KGuestDemoMode==0){if(actionMenu==0)actionMenu=new ActionMenu;actionMenu.Open();RefreshActionMenu()}if(playMode=="S"||playMode=="K"&&KGuestDemoMode>0){isPaused||PauseToggle();if(actionMenu==0)actionMenu=new ActionMenu;actionMenu.Open();RefreshActionMenu()}}}function OnAlternative(){TeacherAlter()}
function RefreshActionMenu(g,j,m){if(actionMenu){var q=showActObj.nextFrame!="end"&&showActObj.type!="Decision";UserPrefs.TryIt.EnableSkipping||(q=false);var u=showHistory.length>1;actionMenu.Refresh(q,u,u,screens[showScreen].actions.length>1&&showActObj.type!="Decision",g,j,m,param_printitname.length>0)}}function OnMenuAlternative(g,j,m){CloseAction();j!=null&&m==null?LaunchHelp(j):eval(g)}function LaunchHelp(g){isPaused||PauseToggle();onHelp(g)}
function CloseAction(g){actionMenu&&actionMenu.Close();g||FocusMe()}function ShowPrintit(){param_printitname.length>0&&window.open("../../printit/"+param_printitname)}function LogOut(){lms_KPathLogout()}
function OpenPreferences(){var g=!SoundPlayerObj.IsAvailable(),j=MakeAbsolute("../../../preferences/preferences.html"),m=[];if(lms_IsUserProfileAvailable()){var q=lms_GetUserProfileUrl();if(q!="")m[m.length]="UserProfileUrl="+Escape.MyEscape(q)}if(g)m[m.length]="nosound";for(g=0;g<m.length;g++){j+=g==0?"?":"&";j+=m[g]}saved_preferences_event=getOnCloseEvent();setOnCloseEvent("preferences_return()");parent.showDialog(j,-1,-1,470,380,true,96,"../../../")}var saved_preferences_event="";
function preferences_return(){setOnCloseEvent(saved_preferences_event)}function Menu_Resume(){isPaused&&PauseToggle()}function InsertStart(){for(var g=[],j=0;j<showHistory.length;j++)g[g.length]=showHistory[j];showHistory=[];showHistory[0]="start";for(j=0;j<g.length;j++)showHistory[showHistory.length]=g[j]}function DeleteStart(){for(var g=[],j=0;j<showHistory.length;j++)g[g.length]=showHistory[j];showHistory=[];for(j=1;j<g.length;j++)showHistory[showHistory.length]=g[j]}
function OnUpdatePreferences(g){UserPrefs.Copy(g);if(showLeadIn==1||g.ShowLeadIn=="all"&&showLeadIn!=0)showHistory.length>0&&showHistory[0]!="start"&&InsertStart();else showHistory.length>0&&showHistory[0]=="start"&&DeleteStart();try{opener.OnUpdatePreferences&&opener.OnUpdatePreferences(g)}catch(j){}}function DownloadImage_(g,j,m){g.user_url=Format(j);g.user_retFn=m;g.onload=Loaded_;g.onerror=LoadError_;g.src=j}function Loaded_(){eval(this.user_retFn+'("'+this.user_url+'",true)')}
function LoadError_(){eval(this.user_retFn+'("'+this.user_url+'",false)')}function Format(g){var j="";for(i=0;i<g.length;i++){var m=g.charAt(i);j+=m=="\\"?"\\\\":m}return j}function GetImage(g,j){g.src=j}function DownloadImage(g,j){preloadImages[g]||PreloadImage(g);WaitForImage(g,j)}
function WaitForImage(g,j){var m;if(preloadImages[g].loaded){m=j+'("'+preloadImages[g].user_url+'",true)';eval(m)}else if(preloadImages[g].error){m=j+'("'+preloadImages[g].user_url+'",false)';eval(m)}else setTimeout("WaitForImage('"+g+"','"+j+"');",300)}function HandlePreloadImagesCache(){for(;preloadImagesList.length>preloadImagesCacheSize;){var g=preloadImagesList.shift();preloadImages[g]=null}}
function PreloadImage(g){if(!preloadImages[g]){preloadImagesList.push(g);preloadImages[g]=new Image;preloadImages[g].loaded=false;preloadImages[g].error=false;HandlePreloadImagesCache();DownloadImage_(preloadImages[g],g,"Preload_Return")}}function Preload_Return(g,j){if(j)preloadImages[g].loaded=true;else preloadImages[g].error=true}function ScreenObj(g,j){this.image=g;this.showBubble=j;this.actions=[];this.infoblocks=[];this.emptyinfo=true}
function Screen(g,j,m){j=new ScreenObj(j,m);currentScreenObj=screens[g]=j;currentScreenName=screenNames[screenNames.length]=g}
function FilterTryItText(g){var j=g,m=j.toLowerCase();for(g=true;g;){g=false;for(var q,u,z=0;z<m.length;z++)if(m.substr(z,5)=="href="){g=true;q=z;break}if(g){for(u=0;z<m.length;z++)if(m.substr(z,7)=="hrefend"){u=z+10;break}if(u>0){j=j.substr(0,q)+j.substr(u);m=j.toLowerCase()}else g=false}}m=j;for(g=true;g;){g=false;for(z=0;z<m.length;z++)if(m.substr(z,6)=="title="){g=true;q=z;break}if(g){for(u=0;z<m.length;z++)if(m.substr(z,8)=="titleend"){u=z+11;break}if(u>0){j=j.substr(0,q)+j.substr(u);m=j.toLowerCase()}else g=
false}}return j}function IsTextEmpty(g){for(var j=true,m=0;m<g.length;m++){var q=g.substr(m,1);if(j==true)if(q=="<")j=false;else{if(g.charCodeAt(m)!=13&&g.charCodeAt(m)!=10)return false}else if(q==">")j=true}return true}function Replace(g,j,m){var q=j.length,u=g.indexOf(j);if(u<0)return g;j=g.substr(0,u);g=g.substr(u+q);return j+m+g}
function DisplayInputTextPart(g,j,m){var q="<DIV id="+j+' style="DISPLAY: inline">',u=g.indexOf(q);if(u<0){q='<div id="'+j+'" style="display: inline;">';u=g.indexOf(q);if(u<0){q='<div id="'+j+'" style="display:inline">';u=g.indexOf(q);if(u<0){q='<DIV style="DISPLAY: inline" id='+j+">";u=g.indexOf(q);if(u<0)return g}}}j=g.substr(u+q.length);q=j.indexOf("</DIV>");if(q<0)q=j.indexOf("</div>");if(m==true)return g.substr(0,u)+j.substr(0,q)+j.substr(q+6);return g.substr(0,u)+j.substr(q+6)}
function BuildInputText(g,j){var m=false,q=false,u=false,z=false,v=false;if(playMode=="S"||playMode=="T")u=true;else if(g.par1[0]=="S"){m=true;if(template_strinp_suppress_example=="<span>0</span>")u=q=true}else if(g.par1[0]=="A"){v=m=true;if(template_strinp_suppress_example=="<span>0</span>")u=q=true}else if(g.par1[0]=="N")v=z=u=true;else z=u=true;m=DisplayInputTextPart(j,"anything",m);m=DisplayInputTextPart(m,"example",q);m=DisplayInputTextPart(m,"inputtext",u);m=DisplayInputTextPart(m,"inputalt",
z);m=DisplayInputTextPart(m,"blank",v);m=m.replace(RegExp("<SPAN></SPAN>","g"),"<SPAN> </SPAN>");m=m.replace(RegExp("\r","g"),"");return m=m.replace(RegExp("\n","g"),"")}function StartsWith(g,j){if(g.length<j.length)return false;var m=j.toLowerCase();if(g.substr(0,j.length).toLowerCase()==m)return true;return false}function RemoveNbsp(g){return g}function DummyActionObj(g,j,m,q,u){this.realAction=false;this.id=g;this.nextFrame=j;this.hotspots=m;this.type=q;this.par1=u}
function AddDummyActions(g,j){if(IsMacOs()){if(IsFF()){if(j.type=="RClick1"&&j.par1=="")g[g.length]=new DummyActionObj(j.id,j.nextFrame,j.hotspots,"RClick1","c");if(j.type=="LClick1"&&j.par1=="c")g[g.length]=new DummyActionObj(j.id,j.nextFrame,j.hotspots,"RClick1","c")}if(IsSafari()){if(j.type=="RClick1"&&j.par1=="")g[g.length]=new DummyActionObj(j.id,j.nextFrame,j.hotspots,"LClick1","c");if(j.type=="RClick1"&&j.par1=="c")g[g.length]=new DummyActionObj(j.id,j.nextFrame,j.hotspots,"LClick1","c")}}}
function ActionObj(g,j,m,q,u,z,v,A,C,G,F,K,I,U,P,S,J,E,Z,Q,R,O,W,V,D,M){this.realAction=true;this.disabledmodes=M==null?"":M;Q=RemoveNbsp(Q);(R=RemoveNbsp(R))||(R="");if(IsTextEmpty(R))R="";O||(O="");this.id=g;this.nextFrame=j;this.hotspots=m;this.bubpos=q;this.xpos=u;this.ypos=z;this.width=v;this.height=A;this.kwidth=C;this.kheight=G;this.ctx=F;if(this.ecidarray=K)for(m=0;m<this.ecidarray.length;m++){g=this.ecidarray[m];q=g.indexOf("$");sapp=g.substr(0,q+1);sctx=Escape.MyEscape(g.substr(q+1));g=
sapp+sctx;for(q=g.indexOf("$0026amp$003B");q>0;){g=g.substr(0,q+5)+g.substr(q+13);q=g.indexOf("$0026amp$003B")}this.ecidarray[m]=g}this.type=I;this.delay=U;this.par1=P;try{this.par1[1]=DecodeTagElements(P[1])}catch(B){}this.par2=DecodeInputString(S);this.par3=J;this.par4=false;this.par5=this.lastIMEtext="";this.iconname=E;this.bubcolor=Z;P="<font "+W+">";S=0;if(UserPrefs.PlayAudio!="none")S=600;if(this.type=="Input"){J=10;try{J=DecodeInputString(this.par1[1]).length}catch(H){}this.animTime=PlayerConfig.InputDelay*
J;this.animTime+=S}else if(this.type=="Key"){this.animTime=PlayerConfig.InputDelay;this.animTime+=S}else if(this.type.indexOf("Wheel")!=-1){this.animTime=PlayerConfig.WheelDelay;this.animTime+=S}else if(this.type=="None")this.animTime=0;else if(this.type=="Decision")this.animTime=0;else{this.animTime=PlayerConfig.MouseDelay*PlayerConfig.MouseSteps;this.animTime+=2*PlayerConfig.BullseyeDelay;this.animTime+=S}this.fontbegin=P;this.fontend="</font>";if(playMode=="S"&&I!="Decision")Q=g=FilterTryItText(Q);
if(this.type=="Input"&&O.length>0)O=BuildInputText(this,O);g=Q.length==0&&O.length==0?"":Q.length==0?O:O==0?Q:V?Q+"<p>"+O+"</p>":O+Q;Q=R.length==0&&O.length==0?"":R.length==0?O:O==0?R:V?R+O:O+R;if(I=="None")if(currentScreenName=="start"&&playMode!="S"){g+="<br><p class='MsoNormal'>"+P+template_leadin+"</font></p>";if(PlayerConfig.ShowScoreNeeded)Q+="###KSCORE###";Q+="<br><p class='MsoNormal'>"+P+template_knowit_leadin+"</font></p>";this.delay=999}else if(j=="end"&&playMode!="S"){g+="<br><p class='MsoNormal'>"+
P+template_leadout+"</font></p>";Q+="<br><p class='MsoNormal'>"+P+template_knowit_leadout+"</font></p>";this.delay=999}else if(U==999){g+="<br><p class='MsoNormal'>"+P+template_explanation+"</font></p>";Q+="<br><p class='MsoNormal'>"+P+template_knowit_explanation+"</font></p>"}else{if(!IsTextEmpty(g)&&this.delay!=999&&playMode=="T"){g+="<br><p class='MsoNormal'>"+P+template_explanation+"</font></p>";this.delay=999}}else if(playMode=="S")if(U==999)if(I!="Decision")g+="<br><p class='MsoNormal'>"+P+
template_explanation+"</font></p>";this.text=IsTextEmpty(g)?"":g;this.emptytext=this.text.length==0;this.ktext=IsTextEmpty(Q)?"":Q;this.kemptytext=this.ktext.length==0;D||(O="");this.knowittext=g=R.length==0&&O==0?"":R.length==0?O:O==0?R:V?R+O:O+R}function Action(g,j,m,q,u,z,v,A,C,G,F,K,I,U,P,S,J,E,Z,Q,R,O,W,V,D,M){if(currentScreenObj){var B=currentScreenObj.actions;g=new ActionObj(g,j,m,q,u,z,v,A,C,G,F,K,I,U,P,S,J,E,Z,Q,R,O,W,V,D,M);B[B.length]=g;AddDummyActions(B,g)}}
function InfoObj(g,j,m,q,u){this.buttonfile=g;this.url=j;this.tooltip=DecodeInputString(m);if(isNaN(q))q=999;this.infotype=q;this.infokey=u;this.simpleurl=j;this.height=this.width=0}
function InfoBlock(g,j,m,q,u){m||(m="");if(currentScreenObj){_buttonfile=g;_img="infobitmapimage.gif";_sb=g.toLowerCase();if(_sb.substr(_sb.length-_img.length)==_img)_buttonfile=g.substr(0,_sb.length-_img.length)+_img;g=currentScreenObj.infoblocks;g[g.length]=new InfoObj(_buttonfile,j,m,q,u);currentScreenObj.emptyinfo=false}}function ConceptObj(g,j,m,q,u,z){this.url=g;this.width=j;this.height=m;this.text=q;if(isNaN(u))u=999;this.infotype=u;this.infokey=z}
function ConceptInfo(g,j,m,q,u,z){concepts[concepts.length]=new ConceptObj(g,j,m,q,u,z)}function Animate2(g,j,m,q,u){if(isPaused)setTimeout('Animate2("'+g+'",'+j+',"'+m+'",'+q+',"'+u+'")',PlayerConfig.PausedDelay);else{j||upk.Timeline.SetFrameState("D");animObject=new AnimObject(m,q,u);KGuestDemoMode?Animate(m,q,u):PlaySound(g,j)}}var DELAY_STEP=20;
function Animate(g,j,m){animCmd=g;animPhase=m;if(j==DELAY_INFINITE*100)animPhase="";else{clearTimeout(animTimeout);if(animObject)animObject.delaystep=0;animObject.timeout=j;animTimeout=setTimeout("AnimateTimer()",DELAY_STEP);upk.Timeline.IncFrameTimeCounter(DELAY_STEP)}}
function AnimateTimer(){if(animObject)if(animObject.timeout==DELAY_INFINITE*100)if(_ShowBubble(showActObj)==true){animPhase="";return}if(isPaused){clearTimeout(animTimeout);animTimeout=setTimeout("AnimateTimer()",PlayerConfig.PausedDelay)}else{if(animObject){animObject.delaystep+=DELAY_STEP;if(animObject.delaystep<animObject.timeout){animObject.phase!="input"&&upk.Timeline.IncFrameTimeCounter(DELAY_STEP);clearTimeout(animTimeout);animTimeout=setTimeout("AnimateTimer()",DELAY_STEP);return}}eval(animCmd)}}
function AnimateKeyboard(){Animate2("stype.flv",true,"ShowScreen('"+showActObj.nextFrame+"')",PlayerConfig.InputDelay,"nostop")}
function AnimateInput(g){g||upk.Timeline.SetFrameState("A");hide("cursor");upk.Timeline.IncFrameTimeCounter(PlayerConfig.InputDelay);--animSteps;Ds=DecodeInputString(showActObj.par1[1]);if(typeof trimAnimTxt=="undefined")trimAnimTxt=0;if(Ds.length-animSteps==1){trimAnimTxt=0;g=document.styleSheets;for(var j in g)if(g[j].cssRules)for(var m in g[j].cssRules){var q="."+showActInpObj.className,u=q.toLowerCase();if(g[j].cssRules[m].selectorText==q||g[j].cssRules[m].selectorText==u){iSDFontSize=g[j].cssRules[m].style.fontSize;
break}}else for(m in g[j].rules)if(g[j].rules[m].selectorText=="."+showActInpObj.className){iSDFontSize=g[j].rules[m].style.fontSize;break}}showActInpObj.value=Ds.substr(trimAnimTxt,Ds.length-animSteps);showActInpObj.original=showActInpObj.value;try{iSD=document.getElementById("InpSizeDetect");iSD.innerHTML=showActInpObj.value;iSD.style.fontSize=iSDFontSize}catch(z){j=document.createElement("SPAN");j.id="InpSizeDetect";j.style.fontFamily="arial";j.style.fontSize=iSDFontSize;j.style.paddingRight="12px";
j.style.visibility="hidden";document.body.appendChild(j);iSD=document.getElementById("InpSizeDetect")}iSD.offsetWidth>=showActInpObj.offsetWidth&&trimAnimTxt++;DecodeInputString(showActObj.par1[1]).length-1==animSteps&&PlaySound_asyncron("strinput.flv");if(animSteps>0)Animate2("",true,"AnimateInput(true)",PlayerConfig.InputDelay,animPhase);else{show("cursor");Animate2("",true,"ShowScreen('"+showActObj.nextFrame+"')",PlayerConfig.InputDelay,"nostop")}}
function ShowBullsEye(){PlayerConfig.HideClickMark!=true&&show("bullseye")}function HideBullsEye(){hide("bullseye")}var cursor_alignment_x=25,cursor_alignment_y=25;
function AnimateMouse(g){g||upk.Timeline.SetFrameState("A");var j;show("cursor");animSteps--;if(animSteps>=0){g="hot"+showActObj.id+"_0";anim_to_x=getObjLeft(g)+getObjWidth(g)/2;anim_to_y=getObjTop(g)+getObjHeight(g)/2;g=anim_to_x-animSteps*anim_x;j=anim_to_y-animSteps*anim_y;if(!isNaN(g)&&!isNaN(j)){shiftTo("cursor",g-cursor_alignment_x,j-cursor_alignment_y);shiftTo("bullseye",g-getObjWidth("bullseye")/2,j-getObjHeight("bullseye")/2)}}if(animSteps>=0){g=PlayerConfig.MouseDelay;if(animStepOriginal>
15)if(animSteps>5&&animSteps<animStepOriginal-5)g=PlayerConfig.MinMouseDelay;upk.Timeline.IncFrameTimeCounter(g);Animate("AnimateMouse(true)",g,animPhase)}else{animSteps=parseInt(showActObj.type.substr(showActObj.type.length-1,1))*2;if(animSteps>0){ShowBullsEye();animPhase!=""&&clearTimeout(animTimeout);Animate2("sclick.flv",true,"AnimateBullseye()",PlayerConfig.BullseyeDelay,"nostop")}else if(showActObj.type.indexOf("Down")!=-1){ShowBullsEye();Animate2("sclick.flv",true,"ShowScreen('"+showActObj.nextFrame+
"')",PlayerConfig.MouseDelay,"nostop")}else if(showActObj.type.indexOf("BeginDrag")!=-1){ShowBullsEye();clearTimeout(bullsTimeout);bullsTimeout=setTimeout("DragStart()",PlayerConfig.BullseyeDelay)}else if(showActObj.type.indexOf("Up")!=-1){ShowBullsEye();clearTimeout(bullsTimeout);bullsTimeout=setTimeout("DragEnd()",PlayerConfig.BullseyeDelay)}else if(showActObj.type.indexOf("Wheel")!=-1){ShowBullsEye();Animate2("swheel.flv",true,"ShowScreen('"+showActObj.nextFrame+"')",PlayerConfig.WheelDelay,"nostop")}else ShowScreen(showActObj.nextFrame)}}
function DragStart(){Animate2("sclick.flv",true,"ShowScreen('"+showActObj.nextFrame+"')",PlayerConfig.MouseDelay,"nostop")}function DragEnd(){HideBullsEye();Animate2("sclick.flv",true,"ShowScreen('"+showActObj.nextFrame+"')",PlayerConfig.MouseDelay,"nostop")}
function AnimateBullseye(){--animSteps;upk.Timeline.IncFrameTimeCounter(PlayerConfig.BullseyeDelay);if(Math.floor(animSteps/2)==animSteps/2){HideBullsEye();animSteps>0?Animate2("sclick.flv",true,"AnimateBullseye()",PlayerConfig.BullseyeDelay,animPhase):ShowScreen(showActObj.nextFrame)}else{ShowBullsEye();animSteps>0?Animate("AnimateBullseye()",PlayerConfig.BullseyeDelay,animPhase):ShowScreen(showActObj.nextFrame)}}
function DemoNext(){upk.Timeline.Lock(true);clearTimeout(animTimeout);clearTimeout(bullsTimeout);PlayStop();HideBullsEye();ShowScreen(showActObj.nextFrame)}
function DemoPrev(){upk.Timeline.Lock(true);clearTimeout(animTimeout);clearTimeout(bullsTimeout);PlayStop();HideBullsEye();l=showHistory.length;if(l!=0){if(l==1){s=showHistory[0];showHistory.length--}else{for(s=showHistory[l-2];screens[s].actions[0].type=="Drag";){showHistory.length--;s=showHistory[showHistory.length-2]}showHistory.length-=2}ShowScreen(s,null,"back")}}
function DemoForward(g){g||(g=false);if(g||!g&&isPaused){clearTimeout(animTimeout);clearTimeout(bullsTimeout);PlayStop();HideBullsEye();setTimeout('ShowScreen("'+showActObj.nextFrame+'")',10)}else if(showActObj&&animPhase=="mouse"&&animSteps!=animStepOriginal){HideBullsEye();ShowScreen(showActObj.nextFrame)}else if(showActObj&&animPhase!="nostop")if(showActObj.type!="Input"&&showActObj.type!="Key"&&showActObj.type!="None"&&showActObj.type!="Decision"){animObject.timeout=50;PlaySound("dummy.flv")}else ShowScreen(showActObj.nextFrame)}
function TeacherFastBack(){if(showHistory.length>1)showHistory.length=0;FirstScreen(true)}function TeacherTestSkip(g){return g=="Drag"||g.indexOf("Up")!=-1}var _backStep=false;
function TeacherBack(){_backStep=true;if(showHistory.length>1){showHistory.length--;for(var g=showHistory[showHistory.length-1];showHistory.length>1&&TeacherTestSkip(screens[g].actions[0].type);){showHistory.length--;g=showHistory[showHistory.length-1]}showHistory.length--;HideAction();historyActionMap[g]?ShowScreen(g,historyActionMap[g]):ShowScreen(g)}}
function TeacherForward(g,j,m){_backStep=false;if(!event_blocked)if(!KFinishClose){KnowItForward();if(j==null)j=showActObj.nextFrame;if(m)for(var q=0;q<screens[showScreen].actions.length;q++)if(m==screens[showScreen].actions[q].id){historyActionMap[showScreen]=q;break}m=999;if(j!="end")for(;!g&&j!="end"&&TeacherTestSkip(screens[j].actions[0].type)&&m--;){showHistory[showHistory.length]=j;j=screens[j].actions[0].nextFrame}ShowScreen(j)}}
function TeacherAlter(){for(var g=true;g;){showAct++;if(showAct==screens[showScreen].actions.length)showAct=0;g=screens[showScreen].actions[showAct].realAction==false;if(g==true)g=screens[showScreen].actions[showAct].emptybubble}showHistory.length--;ShowScreen(showScreen,showAct)}function FrameIDUpdated(g){document.getElementById("frameidvalue").innerHTML=g=="start"?"Start":g.substr(1)}
function ToggleShowFrameID(){if(document.getElementById("frameiddiv").style.display=="none")document.getElementById("frameiddiv").style.display="block";else document.getElementById("frameiddiv").style.display="none"}function CheckFrameIDKeys(g){if(g!=undefined)if(g.type=="keydown"){if(g.keyCode==showFrameIDToggle)if(g.shiftKey==true)return true;try{if(g.originalCode==showFrameIDToggle)if(g.shiftKey==true)return true}catch(j){}}return false}
function TeacherWrong(g){if(showFrameIDToggle&&CheckFrameIDKeys(g)==true)ToggleShowFrameID();else if(showActObj.type!="None")if(!KFinishClose)if(!event_blocked)if(playMode=="K"){if(showActObj.type=="Input")showActObj.par2=showActInpObj.value;!IsLeadIn()&&!IsLeadOut()&&KnowItWrong()}else{g=showActObj.type=="Input"?R_wrong_input:showActObj.type=="Key"?R_wrong_key:showActObj.type=="Decision"?R_wrong_decision:R_wrong_mouse;line=showActObj.type=="Input"?"FocusInpObj()":"";if(showHistory.length>1&&TeacherTestSkip(showActObj.type)){for(var j=
showHistory[showHistory.length-1];showHistory.length>1&&TeacherTestSkip(screens[j].actions[0].type);){showHistory.length--;j=showHistory[showHistory.length-1]}showHistory.length--;line="ShowScreen('"+j+"')"}_ShowBubble(showActObj)&&binterf.SetErrorMessage(g);Animate2("ding.flv",true,"","","");if(line.length>0)if(IsTouchDevice())line=="FocusInpObj()"?FocusInpObj():setTimeout(line,0);else setTimeout(line,0)}}
function Decision(g){OffLink();Menu_Resume();ShowScreen(screens[showScreen].actions[g-1].nextFrame)}var trackSent=false;function ClosePlayer(g,j){lms_ClosePage();if(parent.isOpenDialog)if(parent.isOpenDialog()){parent.closeDialog();return}if(!trackSent){trackSent=true;try{if(opener.OnQuestionContinue_fromTopic){var m=g;m||(m=0);j||(j=0);if(m==1)m=GetResultInPercent()>=KScoreNeeded;opener.OnQuestionContinue_fromTopic(m,j)}}catch(q){}}setTimeout("TimedClosePlayer("+g+")",500)}
function TimedClosePlayer(g){PlayStop();CloseAction();KTopicFinished=g;this.blur();if(IsTouchDevice())history.back();else{try{window.opener!=null&&window.opener.focus()}catch(j){}top.close()}}function HandleResize0(){isOpenDialog&&isOpenDialog()==true&&resizeDialog();if(!IsTouchDevice()){Scroll2Action(true);HandleResize()}}
function HandleResize(){if(!IsTouchDevice())if(scrW!=0){binterf&&binterf.HandleRepos();if(NS4)if(loadWidth!=window.innerWidth||loadHeight!=window.innerHeight){history.go(0);return}var g,j,m;m=getInsideWindowHeight();g=getInsideWindowWidth();getScrollLeft();getScrollTop();g=Math.round((g-scrW)/2);if(g<0)g=0;j=Math.round((m-scrH)/2);if(j<0){j=Math.round((m-scrH)/2);if(j<0)j=0}if(IsiOS())j=0;ClearScrBorder();shiftTo("screen",g,j);if(IsTouchDevice())try{binterf.RefreshPosition()}catch(q){}StartScreen.length>
0&&SetScrBorder(g,j,scrW,scrH,1)}}function ClearScrBorder(){document.getElementById("scrborder")&&hide("scrborder")}function SetScrBorder(g,j,m,q,u){var z=document.getElementById("scrborder");if(z){if(IsFF()||IsSafari()){m-=2;q-=2}z.style.left=g-u;z.style.top=j-u;z.style.width=m+2*u;z.style.height=q+2*u;z.style.borderWidth=String(u)+"px";show("scrborder")}}function max(g,j){return g>j?g:j}function min(g,j){return g<j?g:j}
function SetActionColor(){for(var g=showActObj.id,j=UserPrefs.MarqueeColor,m=0;m<showActObj.hotspots;m++)document.getElementById("hot"+g+"_"+m+"p").style.borderColor=j}
function KnowItWrong(){if(KWarningLevel==4)Animate2("ding.flv",true,"","","");else{HideKnowItBubble();KWarningLevel++;KWarningLevel==1&&KRemediation1==false&&KWarningLevel++;KWarningLevel==2&&KRemediation2==false&&KWarningLevel++;KWarningLevel==3&&KRemediation3==false&&KWarningLevel++;KWarningLevel>=DEF_KWARNINGSCORELEVEL&&AddToWrongScreens(showScreen);Animate2("ding.flv",true,"","","");ShowKnowItBubble()}}function KnowItForward(){KWarningLevel=0}
function IsDragBegin(g){var j=showActObj.type;if(g)j=g;return j=="LBeginDrag"||j=="RBBeginDrag"||j=="MBBeginDrag"}function IsDragSequence2(g){var j=showActObj.type;if(g)j=g;return j=="Drag"}var nib_Positioned=false,nib_l,nib_t,nib_r,nib_b,nib_bCloseEnabled=true;function DecodeTagElements(g){g=replaceString("&lt;","<",g);return g=replaceString("&gt;",">",g)}function AddTopMargin(g){if(g.substr(0,17)=='<p align="right">')return ss=g.substr(0,16)+' style="margin-top: 10px;" '+g.substr(16);return g}
function ShowKnowItBubble(){binterf.m_bFFClearHeight=false;var g="";nib_Positioned=false;nib_bCloseEnabled=true;if(KFinishClose){binterf.m_bFFClearHeight=true;g=lms_inAssessment==true?template_knowit_finish_close_inassessment:template_knowit_finish_close;nib_Positioned=true;nib_bCloseEnabled=false}else if(KConfirmDemo){binterf.m_bFFClearHeight=true;g=template_knowit_confirmdemo;nib_Positioned=true}else if(IsLeadIn()){g=DecodeTagElements(R_titleformat_begin)+topicName+DecodeTagElements(R_titleformat_end);
g+=showActObj.ktext;sscore=GetTemplate_knowit_leadin_score(""+KScoreNeeded);sscore='<p id="scoretext" class="InstructText">'+sscore+"</p>";g=replaceString("###KSCORE###",sscore,g);if(PlayerConfig.ShowScoreNeeded)binterf.m_bFFClearHeight=true;nib_Positioned=false}else if(IsLeadOut()){if(KScoringScreen){binterf.m_bFFClearHeight=true;var j=GetResultInPercent(),m="";g=DecodeTagElements(R_titleformat_begin)+topicName+DecodeTagElements(R_titleformat_end);if(j>=KScoreNeeded){lms_knowitScore(getMyGuid(),
j,1);m=template_scoring_YES}else{lms_knowitScore(getMyGuid(),j,0);m=template_scoring_NO}g+=GetTemplate_scoring(""+j,""+KScoreNeeded,m)}else{g=DecodeTagElements(R_titleformat_begin)+topicName+DecodeTagElements(R_titleformat_end);g+=showActObj.ktext}nib_Positioned=false}else if(IsExplanation()){g=showActObj.knowittext+"<br><p class='MsoNormal'>"+showActObj.fontbegin+template_knowit_explanation+showActObj.fontend+"</p>";nib_Positioned=false;binterf.m_bFFClearHeight=true}else{switch(KWarningLevel){case 0:binterf.m_bFFClearHeight=
true;if(IsDragBegin())g=template_knowit_dragwarning;else{g="";if(KContinueFlag==1){g=template_knowit_continue;if(showActObj.knowittext.length>0)g+="<br><br>"}g+=showActObj.knowittext;if(showActObj.type=="Input")g+=template_typingcomplete;g+=AddTopMargin(template_knowit_nextstep)}break;case 1:binterf.m_bFFClearHeight=true;g=showActObj.knowittext.length>0?template_knowit_warningL1+"<hr>"+showActObj.knowittext:template_knowit_warningL1;if(showActObj.type=="Input")g+=template_typingcomplete;g+=AddTopMargin(template_knowit_nextstep);
break;case 2:binterf.m_bFFClearHeight=true;g=template_knowit_warningL2+showActObj.text;if(showActObj.type=="Input")g+=template_typingcomplete;g+=AddTopMargin(template_knowit_nextstep);break;case 3:binterf.m_bFFClearHeight=true;if(showActObj.hotspots==0){g=template_knowit_warningL3_0+showActObj.text;if(showActObj.type=="Input")g+=template_typingcomplete;g+=AddTopMargin(template_knowit_nextstep)}else{g=template_knowit_warningL3_H+showActObj.text;if(showActObj.type=="Input")g+=template_typingcomplete;
g+=AddTopMargin(template_knowit_nextstep);j=showActObj.id;SetActionColor();for(m=0;m<showActObj.hotspots;m++){var q="hot"+j+"_"+m;getDIV(q)&&show(q,playMode=="S")}}break;default:binterf.m_bFFClearHeight=true;g=template_knowit_warningL4}nib_Positioned=true}nib_l=nib_t=nib_r=nib_b=-1;if(nib_Positioned)if(showActObj.hotspots){j="hot"+showActObj.id+"_0";nib_l=getObjLeft(j)+getObjLeft("screen");nib_t=getObjTop(j)+getObjTop("screen");nib_r=nib_l+getObjWidth(j);nib_b=nib_t+getObjHeight(j);if(showActObj.type==
"Input")nib_b-=16}nib_Positioned=!nib_Positioned;binterf.ResetContent();binterf.SetText(g);binterf.SetColor(showActObj.bubcolor);ShowKnowItBubble2()}
function ShowKnowItBubble2(){if(IsExplanation())binterf.SetPosition(-1,-1,-1,-1,true,false,showActObj.xpos,showActObj.ypos,showActObj.kwidth,showActObj.kheight);else{w=KWarningLevel<2?showActObj.kwidth:showActObj.width;h=KWarningLevel<2?showActObj.kheight:showActObj.height;w=w<Knowit_minimum?Knowit_minimum:w;if(KWarningLevel==1||KConfirmDemo==true)w=w<Rem1_minimum?Rem1_minimum:w;if(KWarningLevel==2||KWarningLevel==3)w=w<Rem2_minimum?Rem2_minimum:w;if(KWarningLevel==4)w=Rem4_width;if(KFinishClose)w=
58;binterf.SetPosition(nib_l,nib_t,nib_r,nib_b,nib_Positioned,0,0,0,w,h)}binterf.SetEnableCloseButton(nib_bCloseEnabled?1:0);binterf.Show();if(showActObj.type=="Input"){var g=showActObj.id;SetActionColor();for(var j=0;j<showActObj.hotspots;j++){var m="hot"+g+"_"+j,q=getDIV(m);if(q){var u=getDIV(m+"p");if(KWarningLevel<3||KWarningLevel==4||KFinishClose){if(!q.LeftOriginal)q.LeftOriginal=q.offsetLeft;if(!q.TopOriginal)q.TopOriginal=q.offsetTop;q.style.left=""+(q.LeftOriginal+2)+"px";q.style.top=""+
(q.TopOriginal+2)+"px";if(!u.WidthOriginal)u.WidthOriginal=u.offsetWidth;if(!u.HeightOriginal)u.HeightOriginal=u.offsetHeight;if(!u.borderColorOriginal)u.borderColorOriginal=u.style.borderColor;u.style.border="0px";u.style.width=""+(u.WidthOriginal-4)+"px";u.style.height=""+(u.HeightOriginal-4)+"px"}else{if(u.borderColorOriginal){u.style.border="3px";u.style.borderColor=u.borderColorOriginal;u.style.borderStyle="solid"}if(u.WidthOriginal)u.style.width=""+u.WidthOriginal+"px";if(u.HeightOriginal)u.style.height=
""+u.HeightOriginal+"px";if(q.LeftOriginal)q.style.left=""+q.LeftOriginal+"px";if(q.TopOriginal)q.style.top=""+q.TopOriginal+"px"}show(m,playMode=="S")}}if(showActObj.par4){showActObj.par4=false;if(KWarningLevel==0){showActInpObj=document.layers?document.layers.screen.document.layers["hot"+showActObj.id+"_0"].document["f"+showActObj.id]["inp"+showActObj.id]:document["f"+showActObj.id+"_0"]["inp"+showActObj.id+"_0"];showActInpObj.value=showActObj.par5;showActInpObj.original=showActInpObj.value;showActInpObj.onkeyup=
EventKeyUp;showActInpObj.onkeypress=EventInputKey;showActInpObj.onpropertychange=EventPropertyChange;showActInpObj.onfocus=InputOnFocus;showActInpObj.onblur=InputOnBlur}try{showActInpObj.focus()}catch(z){}}}ShowScreen3()}function HideKnowItBubble(){for(var g=showActObj.id,j=0;j<showActObj.hotspots;j++){var m="hot"+g+"_"+j;getDIV(m)&&hide(m,playMode=="S")}binterf.ResetContent();binterf.Hide()}var soundplayed=false;function PlayStop(){SoundPlayerObj.Stop()}
function PlayPause(){SoundPlayerObj.Pause()}function PlayResume(){if(soundplayed)SoundPlayerObj.Resume();else if(bPlayerIsAvailable)if(showScreen==StartScreen)return false;return true}function GetDecisionSound(g){return g}function PlaySound_asyncron(g){UserPrefs.PlayAudio!="none"&&SoundPlayerObj.Play(g,true,false,true)}
function PlaySound(g,j,m){if(g=="dummy.flv"){PlayStop();soundplayed=false;animObject&&animObject.cmd.length>0&&Animate(animObject.cmd,animObject.timeout,animObject.phase)}else{g=GetDecisionSound(g);if(!m){animObject.fname=g;animObject.demosound=j}var q=true;j||(q=false);j=UserPrefs.PlayAudio;if(playMode=="T"||playMode=="K")if(j=="all"&&soundIsExported||q&&(j=="demo"||j=="all")){if(KScoringScreen==false&&KFinishClose==false&&(KWarningLevel==0||q)){soundplayed=true;SoundPlayerObj.Play(g,q,m);upk.Timeline.IncFrameTimeCounter(1E3)}}else animObject.cmd.length>
0&&Animate(animObject.cmd,animObject.timeout,animObject.phase);if(playMode=="S"||KGuestDemoMode)if(j=="all"&&soundIsExported||q&&(j=="demo"||j=="all")){soundplayed=true;SoundPlayerObj.Play(g,q,m);upk.Timeline.IncFrameTimeCounter(1E3)}else animObject.cmd.length>0&&Animate(animObject.cmd,animObject.timeout,animObject.phase)}}
function OnErrorPlaySound(){soundplayed=false;if(animObject)if(animObject.cmd.length>0&&playMode!="K"){if(timelineDescriptor.valid==true){if(timelineDescriptor.type=="narration")if(animObject.timeout!=DELAY_INFINITE*100)animObject.timeout=timelineDescriptor.resttime;if(timelineDescriptor.type=="animationstart")if(animObject.timeout!=DELAY_INFINITE*100)animObject.timeout=1;if(timelineDescriptor.type=="nextframe"){DemoNext();timelineDescriptor.valid=false;return}timelineDescriptor.valid=false}Animate(animObject.cmd,
animObject.timeout,animObject.phase)}}function OnEndPlaySound(){soundplayed=false;timelineDescriptor.valid=false;if(animObject)if(animObject.cmd.length>0&&playMode!="K"){animCmd=animObject.cmd;animPhase=animObject.phase;clearTimeout(animTimeout);animTimeout=setTimeout("AnimateTimer();",100);upk.Timeline.IncFrameTimeCounter(100)}}
function _HasSound(g){if(UserPrefs.PlayAudio!="all")return false;ix=g.id.substr(1)+".ASX";if(sounds[ix]){if(sounds[ix].fct==0)return false;return sounds[ix].flist[0].length>0}return false}function _HasActionArea(g){if(IsExplanation(g))return false;if(IsLeadIn(g))return false;if(IsLeadOut(g))return false;if(IsDecision(g))return false;return g.hotspots>0}
function _ShowBubble(g){f=screens[g.prevFrame];if(playMode=="S"||playMode=="T"){if(g.type=="Decision")return true;if(topicShowBubbles=="Always")return true;if(topicShowBubbles=="Never")return false;return f.showBubble=="true"?true:false}return true}function _ShowActionArea(){if(playMode=="S"&&PlayerConfig.HideActionBordersInSeeIt==true)return false;return topicShowBubbles!="Never"}
function _SkipFrame(g){a=g.actions[0];if(g.actions.length==1&&a.type=="Decision")return true;if(playMode=="S"&&a.type=="None"&&a.delay==0)return true;if(playMode=="T"&&a.type=="None"&&a.delay==0)return true;if(playMode=="S"&&a.type=="Decision"&&a.delay==0)return true;if(playMode=="K"&&a.type=="Decision")return true;if(playMode=="K"&&a.type=="None"&&a.prevFrame!="start"&&a.nextFrame!="end"&&a.knowittext.length==0)return true;if(playMode=="K")return false;_HasActionArea(a);if(!_ShowBubble(a))if(!_HasSound(a)){if(IsLeadIn(a))return true;
if(IsLeadOut(a))return true;if(IsExplanation(a))return true;if(IsDecision(a))return false;if(a.delay==DELAY_INFINITE)if(playMode=="S")return true}return false}
function FilterDecisionText(){if(IsDecision()){var g=showActObj.prevFrame,j=ecidStartDecisions[g];if(j==null){j=showActObj.text;if(IsIE10())j=replaceString("DecisionList","DecisionListIE10",showActObj.text);return j}var m=[],q="",u="",z=showActObj.text.toLowerCase(),v="<li class=decisionlist>",A='<li class="decisionlist">';if(IsIE10()){v="<li class=decisionlistie10>";A='<li class="decisionlistie10">'}var C=z.indexOf(v);if(C<0)C=z.indexOf(A);q=showActObj.text.substr(0,C);var G=z.lastIndexOf("</li>")+
5;for(u=showActObj.text.substr(G);;){if(C<0)break;var F=z.indexOf(v,C+1);if(F<0)F=z.indexOf(A,C+1);if(F>0){m[m.length]=showActObj.text.substr(C,F-C-1);C=F}else{m[m.length]=showActObj.text.substr(C,G-C);break}}for(v=0;v<m.length;v++){z=m[v].toLowerCase();A=z.length;if(z.substr(A-5)!="</li>")m[v]+="</li>"}g=screens[g].actions;for(v=0;v<g.length;v++){A=true;for(ii=0;ii<j.pathstoignore.length;ii++)if(j.pathstoignore[ii]==g[v].id)A=false;if(A)q+=m[v]}q+=u;return q}return showActObj.text}
function ShowAction(){binterf.m_bFFClearHeight=false;var g=showActObj.bubpos,j=showActObj.xpos,m=showActObj.ypos;if(playMode=="K"&&!KGuestDemoMode){ShowKnowItBubble();IsDragBegin()&&!KFinishClose&&Animate2("ding.flv",true,"","","")}else{if(showActObj.type=="None"&&showActObj.emptytext)if(!IsLeadIn()&&!IsLeadOut()){ShowScreen3();return}var q=showActObj.id;binterf.ResetContent();var u=FilterDecisionText();if(playMode=="T"&&showActObj.type=="Input")u=showActObj.text+template_typingcomplete;if(playMode==
"S"||playMode=="K"&&KGuestDemoMode){var z=template_pauselink.indexOf("HLink(600)"),v=template_pauselink.indexOf("</a>");z=template_pauselink.substr(0,z+12);v=template_pauselink.substr(v);u+=z+(isPaused?R_interface_resume:R_interface_pause)+v;binterf.m_bFFClearHeight=true}if(playMode=="T"&&IsDragBegin()&&IsTouchDevice()&&KGuestDemoMode==0){binterf.ResetContent();binterf.SetText('<p class="InstructText" style="margin-top: 0px; color: #000080; font-weight:bold;">'+R_swipe_drag+"</p>");binterf.SetIcon(showActObj.iconname);
binterf.SetColor(showActObj.bubcolor);binterf.SetPosition(-1,-1,-1,-1,true,0,0,0)}else{binterf.SetText(u);binterf.SetIcon(showActObj.iconname);binterf.SetColor(showActObj.bubcolor);if(playMode=="T"){binterf.SetAlternative(showActObj.showalternatives);for(u=0;u<screens[showScreen].infoblocks.length;u++){v=screens[showScreen].infoblocks[u];binterf.AddInfoBlock(v.buttonfile,v.url,v.tooltip)}}if(showActObj.type=="Decision"||showActObj.type=="Input")binterf.m_bFFClearHeight=true;if(showActObj.hotspots){q=
"hot"+q+"_0";l=getObjLeft(q)+getObjLeft("screen");if(l<0)l=0;t=getObjTop(q)+getObjTop("screen");if(t<0)t=0;r=l+getObjWidth(q);b=t+getObjHeight(q);if(showActObj.type=="Input")b-=16;if(showActObj.bubpos>0)binterf.SetPosition(l,t,r,b,true,g,j,m,showActObj.width,showActObj.height);else showActObj.type=="None"?binterf.SetPosition(-1,-1,-1,-1,true,g,j,m,showActObj.width,showActObj.height):binterf.SetPosition(l,t,r,b,false,g,j,m,showActObj.width,showActObj.height)}else binterf.SetPosition(-1,-1,-1,-1,true,
g,j,m,showActObj.width,showActObj.height)}ShowAction2()}}
function ShowAction2(){KGuestDemoMode==0&&!showActObj.emptybubble&&_ShowBubble(showActObj)&&binterf.Show();if(showActObj.type!="None"){SetActionColor();for(var g=showActObj.id,j=0;j<showActObj.hotspots;j++)if(j==0||showActObj.type!="Input"){var m="hot"+g+"_"+j,q=getDIV(m),u=m+"p";w=getObjWidth("screen");h=getObjHeight("screen");if(!showActObj.areacorrected){bord1=document.getElementById(u).border;if(document.getElementById(u).type=="password"){document.getElementById(u).style.fontFamily="Arial";document.getElementById(u).style.fontSize=
"12px"}hl=q.offsetLeft;if(hl<0){hw=document.getElementById(u).clientWidth;document.getElementById(u).style.width=""+(hw+hl)+"px";q.style.left=0}ht=q.offsetTop;if(ht<0){hh=document.getElementById(u).clientHeight;document.getElementById(u).style.height=hh+ht;q.style.top=0}bord=bord1*2;hl=q.offsetLeft;hw=document.getElementById(u).clientWidth+bord;ht=q.offsetTop;hh=document.getElementById(u).clientHeight+bord;var z=bord1;if(hl+hw>w-z)document.getElementById(u).style.width=""+(hw-bord-3-z)+"px";if(ht+
hh>h)document.getElementById(u).style.height=""+(hh-bord-3)+"px";showActObj.areacorrected=true}if(q)if(showActObj.type=="Input"){u=getDIV(m+"p");if(u.borderColorOriginal){u.style.border="3px";u.style.borderColor=u.borderColorOriginal;u.style.borderStyle="solid"}if(u.WidthOriginal)u.style.width=""+u.WidthOriginal+"px";if(u.HeightOriginal)u.style.height=""+u.HeightOriginal+"px";if(q.LeftOriginal)q.style.left=""+q.LeftOriginal+"px";if(q.TopOriginal)q.style.top=""+q.TopOriginal+"px";z=_ShowActionArea()==
false;if(q.style.cssText.toLowerCase().indexOf("marquee: false")>=0)z=true;if(z==true)if(!showActObj.marqueecorrected){showActObj.marqueecorrected=true;q.style.left=""+Number(getObjLeft(q)+3)+"px";q.style.top=""+Number(getObjTop(q)+3)+"px";u.style.border="0px";u.style.width=""+(u.offsetWidth-6)+"px";u.style.height=""+(u.offsetHeight-6)+"px"}show(m,playMode=="S")}else _ShowActionArea()&&show(m,playMode=="S")}}if(playMode=="S")isPaused?binterf.SetPRText(R_interface_resume):binterf.SetPRText(R_interface_pause);
ShowScreen3()}function _getObjTop(g){k=getObjTop(g)-10;if(k<0)k=0;return k}function _getObjLeft(g){k=getObjLeft(g)-10;if(k<0)k=0;return k}function ScrollToAction(){if(playMode=="K"){showScreen=="start"&&window.scrollTo(0,0);showActObj.nextFrame=="end"&&window.scrollTo(0,0);setTimeout("ShowScreen4()",5)}else Scroll2Action()}var Actionarea_left=150,Actionarea_top=32,Actionarea_right=0,Actionarea_bottom=0,Bubble_horizontal=150,Bubble_vertical=32;
function RectArea(g,j,m,q,u){this.x=g;this.y=j;this.dx=m;this.dy=q;this.bubpt=u}function combineRect(g,j){if(g.dx==0&&g.dy==0)return j;if(j.dx==0&&j.dy==0)return g;var m=min(g.x,j.x),q=min(g.y,j.y),u=max(g.x+g.dx,j.x+j.dx)-m,z=max(g.y+g.dy,j.y+j.dy)-q;return new RectArea(m,q,u,z,0)}function fitRectinRect(g,j){if(g.dx==0&&g.dy==0)return true;if(g.dx>j.dx)return false;if(g.dy>j.dy)return false;return true}
function containRect(g,j){if(g.dx==0&&g.dy==0)return true;if(g.x<j.x)return false;if(g.y<j.y)return false;if(g.x+g.dx>j.x+j.dx)return false;if(g.y+g.dy>j.y+j.dy)return false;return true}
function getArea(g,j,m){sdx=document.getElementById("screen").clientWidth;sdy=document.getElementById("screen").clientHeight;brect=new RectArea(0,0,0,0,0);brectnopadding=new RectArea(0,0,0,0,0);if(g.dx>0&&g.dy>0){brect=new RectArea(g.x,g.y,g.dx,g.dy,g.bubpt);brectnopadding=new RectArea(g.x,g.y,g.dx,g.dy,g.bubpt);switch(brect.bubpt){case BUBB07_TOPLEFT:case BUBB07_TOPRIGHT:if(brect.y>Bubble_vertical){brect.y-=Bubble_vertical;brect.dy+=Bubble_vertical}else{brect.dy+=brect.y;brect.y=0}break;case BUBB07_BOTTOMLEFT:case BUBB07_BOTTOMRIGHT:if(brect.y+
brect.dy<sdy)brect.dy+=Bubble_vertical;else brect.dy=sdy-brect.dy;break;case BUBB07_LEFTTOP:case BUBB07_LEFTBOTTOM:if(brect.x>Bubble_horizontal){brect.x-=Bubble_vertical;brect.dx+=Bubble_vertical}else{brect.dx+=brect.x;brect.x=0}break;case BUBB07_RIGHTTOP:case BUBB07_RIGHTBOTTOM:if(brect.x+brect.dx<sdx)brect.dx+=Bubble_horizontal;else brect.dx=sdx-brect.dx}}hrect=new RectArea(0,0,0,0,0);hrectnopadding=new RectArea(0,0,0,0,0);if(j.dx>0&&j.dy>0){hrect=new RectArea(j.x,j.y,j.dx,j.dy,j.bubpt);hrectnopadding=
new RectArea(j.x,j.y,j.dx,j.dy,j.bubpt);if(hrect.x>Actionarea_left){hrect.x-=Actionarea_left;hrect.dx+=Actionarea_left}else{hrect.dx+=hrect.x;hrectx=0}if(hrect.y>Actionarea_top){hrect.y-=Actionarea_top;hrect.dy+=Actionarea_top}else{hrect.dy-=hrect.y;hrect.y=0}if(hrect.x+hrect.dx<sdx)hrect.dx+=Actionarea_right;else hrect.dx=sdx-hrect.x;if(hrect.y+hrect.dy<sdy)hrect.dy+=Actionarea_bottom;else hrect.dy=sdy-hrect.y}g=combineRect(brect,hrect);if(fitRectinRect(g,m))return g;r1=combineRect(brectnopadding,
hrectnopadding);if(fitRectinRect(r1,m))return r1;if(fitRectinRect(brect,m))return brect;if(fitRectinRect(brectnopadding,m))return brectnopadding;brectnopadding.dx=m.dx;if(brectnopadding.x+brectnopadding.dx>sdx)brectnopadding.dx=sdx-brectnopadding.x;brectnopadding.dy=m.dy;if(brectnopadding.y+brectnopadding.dy>sdy)brectnopadding.dy=sdy-brectnopadding.y;return brectnopadding}function getHorizontalScrollPosition(g,j){if(g.x<j.x)return g.x;if(g.x+g.dx>j.x+j.dx)return g.x-(j.dx-g.dx);return j.x}
function getVerticalScrollPosition(g,j){if(g.y<j.y)return g.y;if(g.y+g.dy>j.y+j.dy)return g.y-(j.dy-g.dy);return j.y}function getDefinedBubbleRect(g){switch(g.bubpt){case BUBB07_TOPLEFT:case BUBB07_TOPRIGHT:case BUBB07_BOTTOMLEFT:case BUBB07_BOTTOMRIGHT:g.dy+=40+Bubble_vertical;break;case BUBB07_LEFTTOP:case BUBB07_LEFTBOTTOM:case BUBB07_RIGHTTOP:case BUBB07_RIGHTBOTTOM:g.dx+=40+Bubble_horizontal}return g}
function Scroll2Action(g){var j=getInsideWindowHeight(),m=getInsideWindowWidth(),q=getObjLeft("screen");q=getScrollLeft()-q;var u=getObjTop("screen");u=getScrollTop()-u;j=new RectArea(q,u,m,j,0);q=showActObj.id;if(showScreen=="start")q+="S";m=new RectArea(0,0,0,0,0);if(getDIV(q))m=new RectArea(binterf.GetBubbleLeft(true),binterf.GetBubbleTop(true),binterf.GetBubbleWidth(true),binterf.GetBubbleHeight(true),binterf.GetBubblePointer());q="hot"+q+"_0";u=new RectArea(0,0,0,0,0);if(getDIV(q))u=new RectArea(_getObjLeft(q),
_getObjTop(q),getObjWidth(q),getObjHeight(q),0);m=getArea(m,u,j);if(containRect(m,j))g||setTimeout("ShowScreen4()",5);else{if(showActObj.nextFrame!="end"){q=screens[showActObj.nextFrame].actions[0];for(u=true;u;){var z=q.id,v=new RectArea(0,0,0,0,0);if(getDIV(z))v=getDefinedBubbleRect(new RectArea(q.xpos,q.ypos,q.width,q.height,q.bubpos));z="hot"+z+"_0";var A=new RectArea(0,0,0,0,0);if(getDIV(z))A=new RectArea(_getObjLeft(z),_getObjTop(z),getObjWidth(z),getObjHeight(z),0);v=getArea(v,A,j);v=combineRect(m,
v);if(fitRectinRect(v,j))m=v;else u=false;if(q.nextFrame=="end")u=false;if(u)q=screens[q.nextFrame].actions[0]}}ssx=getHorizontalScrollPosition(m,j);ssy=getVerticalScrollPosition(m,j);ScrollTo(ssx,ssy,g)}}function ScrollTo(g,j,m){if(fusionmode)m?window.scrollTo(g,j):SmoothScroll(g,j);else{window.scrollTo(g,j);setTimeout("ShowScreen4()",5)}}function TimerObj(g,j,m,q,u,z,v,A){this.x=g;this.y=j;this.currentx=m;this.currenty=q;this.targetx=u;this.targety=z;this.dx=v;this.dy=A}
var timerObj=new TimerObj(0,0,0,0,0,0,0,0,0);function SmoothScroll(g,j){currentx=getScrollLeft();currenty=getScrollTop();l=PlayerConfig.PanSpeed;dx=g-currentx;dy=j-currenty;x=dx>0?l:0-l;y=dy>0?l:0-l;step=0;if(Math.abs(dx)>Math.abs(dy)){step=Math.abs(Math.round(dx/l))+1;y=Math.round(dy/step);if(y==0)y=dy>0?1:-1}else{step=Math.abs(Math.round(dy/l))+1;x=Math.round(dx/step);if(x==0)x=dx>0?1:-1}timerObj=new TimerObj(x,y,currentx,currenty,g,j,dx,dy);setTimeout("SmoothScollTimed()",5)}
function SmoothScollTimed(){if(isPaused){navBar&&navBar.setKeepHidden(false);setTimeout("SmoothScollTimed()",5)}else{navBar&&navBar.setKeepHidden(true);if(timerObj.currentx==timerObj.targetx&&timerObj.currenty==timerObj.targety){navBar&&navBar.setKeepHidden(false);setTimeout("ShowScreen4()",5)}else{timerObj.currentx+=timerObj.x;if(timerObj.dx>0){if(timerObj.targetx-timerObj.currentx<0)timerObj.currentx=timerObj.targetx}else if(timerObj.targetx-timerObj.currentx>0)timerObj.currentx=timerObj.targetx;
timerObj.currenty+=timerObj.y;if(timerObj.dy>0){if(timerObj.targety-timerObj.currenty<0)timerObj.currenty=timerObj.targety}else if(timerObj.targety-timerObj.currenty>0)timerObj.currenty=timerObj.targety;window.scrollTo(timerObj.currentx,timerObj.currenty);setTimeout("SmoothScollTimed()",5)}}}
function HideAction(){if(playMode=="K"&&!KGuestDemoMode)HideKnowItBubble();else{var g=showActObj.id;binterf.ResetContent();binterf.Hide();for(var j=0;j<showActObj.hotspots;j++){var m="hot"+g+"_"+j;getDIV(m)&&hide(m,playMode=="S")}}}var myscr="";
function ShowScreen(g,j,m,q){if(!q)timelineDescriptor.valid=false;if(g!="end")screens[g].actions[0].nextFrame=="end"?lms_frameView(getMyGuid(),playMode,"end"):lms_frameView(getMyGuid(),playMode,g);if(g!="end"){q=screens[g];for(var u=0;u==0;){var z=q.actions[0],v=z.nextFrame;if(v=="end")u=1;else if(z.delay==0||z.type=="None")q=screens[v];else u=2}}if(j==null){j=firsthemialternativeindex;firsthemialternativeindex=0}if(KGuestDemoMode==2){KWarningLevel=KGuestDemoMode=0;binterf.SetPosition(-1,-1,-1,-1,
true,0,0,0);binterf.SetMoveable(true);KContinueFlag=1;ShowScreen(g,j);KContinueFlag=2}else{if(KGuestDemoMode==1){q=screens[g].actions[0];IsDragBegin(q.type)&&showActObj.id==q.id||IsDragSequence2(q.type)||(KGuestDemoMode=2)}if(KContinueFlag==2)KContinueFlag=0;try{for(q=g;_SkipFrame(screens[q]);)q=screens[q].actions[0].nextFrame;screens[q].actions[0].nextFrame=="end"&&lms_topicFinish(getMyGuid())}catch(A){q=="end"&&lms_topicFinish(getMyGuid())}if(playMode=="S"){if(upk.Timeline.Init(q))StartScreen=q;
upk.Timeline.UpTimelineAt(q,m,timelineDescriptor);upk.Timeline.Lock(false)}if(g=="end")if(playMode=="K"&&PlayerConfig.TrackFeedBack){HideAction();KScoringScreen=true;ShowAction()}else ClosePlayer(1);else{if(showScreen!=""){showActObj.type=="Input"&&showActInpObj&&showActInpObj.blur();HideAction()}for(oldscr=g;_SkipFrame(screens[g]);){g=screens[g].actions[0].nextFrame;if(g=="end"){setTimeout('ShowScreen("end")',10);return}j=0}if(ecidStartDecisions[g])if(ecidStartDecisions[g].display)ecidDecisionStart=
true;if(ecidDecisionStart){g=FindEcidStartNextFrame(g);j=0}if(g!=oldscr)if(g!="end")screens[g].actions[0].nextFrame=="end"?lms_frameView(getMyGuid(),playMode,"end"):lms_frameView(getMyGuid(),playMode,g);showScreen=g;KGuestDemoMode||(showHistory[showHistory.length]=g);showAct=j?j:0;if(animPhase!=""){clearTimeout(animTimeout);animPhase=""}showActObj=screens[showScreen].actions[showAct];if(showActObj==null)showActObj=screens[showScreen].actions[0];myscr=g;url=screenshotPath+screens[showScreen].image;
screenshot=new Image;event_blocked=true;DownloadImage(url,"Returned")}}}function Returned(g){GetImage(screenshot,g);event_blocked=false;FrameIDUpdated(myscr);if(document.layers)document.layers.screen.document.screenshot.src=screenshot.src;else document.screenshot.src=screenshot.src;ShowScreen2()}function GetDelay(){if(KGuestDemoMode)return 200;return showActObj.delay*100}function ShowScreen2(){scr=myscr;if(showActObj.type=="Input"){showActObj.par4=false;showActObj.lastIMEtext=""}ShowAction()}
function ShowScreen3(){if(playMode=="S"||KGuestDemoMode){showCursor||hide("cursor");showCursor=true}playMode=="K"&&!KGuestDemoMode&&hide("cursor");playMode=="T"&&!KGuestDemoMode&&hide("cursor");if(showActObj.type=="Input"&&playMode!="K"||showActObj.type=="Input"&&playMode=="K"&&!showActObj.par4){showActInpObj=document.layers?document.layers.screen.document.layers["hot"+showActObj.id+"_0"].document["f"+showActObj.id]["inp"+showActObj.id]:document["f"+showActObj.id+"_0"]["inp"+showActObj.id+"_0"];showActInpObj.original=
"";showActInpObj.onkeyup=EventKeyUp;showActInpObj.onkeypress=EventInputKey;EventPropertyChange();showActInpObj.onfocus=InputOnFocus;showActInpObj.onblur=InputOnBlur;try{showActInpObj.focus()}catch(g){}setTimeout("SelectText0()",50)}ScrollToAction()}function SelectText0(){showActInpObj.value=showActObj.par2;showActInpObj.original=showActInpObj.value;SelectText(showActInpObj);_backStep=false}
function ShowPlayButtons(){var g=($(document.body).width()-192)/2,j=$(document.body).height(),m='<div id="graydiv" scrolling="yes" class="pointerdiv" onclick="onStartClick()">';m+='<img src="../../../img/ipad_playbutton.png" style="position:absolute; top: '+(j-195)/2+"px; left: "+g+'px;"/>';m+='<div id="startplayfont" ';m+='style="position:absolute; width: 100%; height: 50px; left: 0px; top: '+(j-50)+"px; text-align: center; padding-top: 10px; ";m+='background-image: url(../../../img/ipad_messagebar.png); background-repeat: repeat;">'+
R_swipe_instruction+"</div>";m+="</div>";$(document.body).append(m);$("#graydiv").bind("touchstart",function(){swipe.Init(screenwidth)});$("#graydiv").bind("touchmove",function(q){try{if(q.originalEvent.touches[1]||q.originalEvent.changedTouches[1])swipe.DetectedMulti();else swipe.IsNotZoomed()&&q.preventDefault()}catch(u){}q=q.originalEvent.touches[0]||q.originalEvent.changedTouches[0];swipe.Add(q.pageY,q.pageX)});$("#graydiv").bind("touchend",function(){if(!swipe.IsMulti())if(swipe.IsNotZoomed()!=
false){var q=swipe.GetX(),u=swipe.GetY();Math.abs(q)>Math.abs(u)||u<-30&&onStartClick()}});g=getFullHeight();$("#graydiv").css("height",g+"px");$("#startplayfont").css("top",g-50+"px")}function onStartClick(){$("#graydiv").remove();SoundPlayerObj.InitAudioPlayer();setTimeout("iPadStartingProcess(1)",200)}
function iPadStartingProcess(g){switch(g){case 0:touchIntroChecked=true;binterf.Hide();ShowPlayButtons();break;case 1:binterf.Show();if(navBar){navBar.setKeepHidden(false);navBar.show()}ShowScreen4()}}var touchIntroChecked=false;
function ShowScreen4(){HandleResize();if(IsTouchDevice()&&!touchIntroChecked)iPadStartingProcess(0);else{PreloadImages();var g="hot"+showActObj.id+"_0",j=showActObj.id.substr(1)+".ASX";if(playMode=="S"||KGuestDemoMode){showActObj.nextFrame=="end"&&Animate2(j,false,"ClosePlayer(1)",GetDelay(),"other");if(showActObj.type=="Input"){animSteps=DecodeInputString(showActObj.par1[1]).length;Animate2(j,false,"AnimateInput()",GetDelay(),"input")}else if(showActObj.type=="Key")Animate2(j,false,"AnimateKeyboard()",
GetDelay(),"keyboard");else if(showActObj.type=="None"||showActObj.type=="Decision"||!getDIV(g))Animate2(j,false,"ShowScreen('"+showActObj.nextFrame+"')",GetDelay(),"other");else{var m,q,u;anim_to_x=sx+getObjLeft(g)+getObjWidth(g)/2;anim_to_y=sy+getObjTop(g)+getObjHeight(g)/2;g=getObjLeft("cursor")+cursor_alignment_x;m=getObjTop("cursor")+cursor_alignment_y;q=anim_to_x-g-(IsiOS()?sx:0);u=anim_to_y-m-(IsiOS()?sy:0);animSteps=Math.round(Math.sqrt(q*q+u*u)/MOUSE_STEP);animSteps==0&&animSteps++;animStepOriginal=
animSteps;anim_x=q/animSteps;anim_y=u/animSteps;if(showActObj.type=="Drag"||showActObj.type.indexOf("Up")!=-1)shiftTo("bullseye",g-sx-getObjWidth("bullseye")/2,m-sy-getObjHeight("bullseye")/2);HideBullsEye();Animate2(j,false,"AnimateMouse()",GetDelay(),"mouse")}}else if(showActObj.emptybubble&&_ShowBubble(showActObj)&&showActObj.type=="None"&&scr!="start")Animate2(j,false,"ShowScreen('"+showActObj.nextFrame+"')",GetDelay(),"other");else{animObject=new AnimObject("","","");PlaySound(j,false)}}}
function PreloadImages(){if(PlayerConfig.PreloadScreenEnabled){for(var g=showActObj.nextFrame,j=3;g!="end"&&j--;){url=screenshotPath+screens[g].image;PreloadImage(url);g=screens[g].actions[0].nextFrame}for(j=0;j<screens[showScreen].actions.length;j++){g=screens[showScreen].actions[j].nextFrame;if(g!="end"){url=screenshotPath+screens[g].image;PreloadImage(url)}}}}
function GetShiftState(g){if(g==0)g=window.event;if(g.storedEvent)return g.pShState;return((g.modifiers?g.modifiers&Event.SHIFT_MASK:g.shiftKey)?"s":"")+((g.modifiers?g.modifiers&Event.CONTROL_MASK:g.ctrlKey)?"c":"")+((g.modifiers?g.modifiers&Event.ALT_MASK:g.altKey)?"a":"")}function GetButton(g){if(g==0)g=window.event;if(g.storedEvent)return g.pButton;return g.button?g.button&1?"L":g.button&2?"R":g.button&4?"M":"":g.which==1?"L":g.which==3?"R":""}
function GetMouseX(g){if(g==0)g=window.event;if(g.storedEvent)return g.pX;return g.pageX?g.type=="DOMMouseScroll"?g.screenX-getObjLeft("screen")+document.body.scrollLeft:g.pageX-getObjLeft("screen"):g.x?g.x-getObjLeft("screen")+getScrollLeft():g.layerX}
function GetMouseY(g){if(g==0)g=window.event;if(g.storedEvent)return g.pY;return g.pageY?g.type=="DOMMouseScroll"?g.screenY-getObjTop("screen")+document.body.scrollTop:g.pageY-getObjTop("screen"):g.y?g.y-getObjTop("screen")+getScrollTop():g.layerY}
function MouseInObject(g,j){if(getDIV(j)){var m=GetMouseX(g),q=GetMouseY(g),u=getObjLeft(j),z=getObjTop(j),v=getObjWidth(j),A=getObjHeight(j);if(showActObj.type=="Input"){for(var C=showActInpObj.id.substr(0,14);C.substr(C.length-1,1)=="p"||C.substr(C.length-1,1)=="x";)C=C.substr(0,C.length-1);if(C==j){v=showActInpObj.offsetWidth;A=showActInpObj.offsetHeight}}if(m>=u&&q>=z&&m<u+v&&q<z+A)return true;if(IsTouchDevice()){if(u>30)u-=30;else u=0;if(z>30)z-=30;else z=0;v+=60;A+=60;if(m>=u&&q>=z&&m<u+v&&
q<z+A)return true}}return false}function MouseInHotspot(g,j){if(j==null)j=showActObj;for(var m=0;m<j.hotspots;m++)if(MouseInObject(g,"hot"+j.id+"_"+m)&&GetShiftState(g)==j.par1)return true;return false}var touchEvents=["LClick1","LClick2","LClick3","LBeginDrag","LDown","LUp","RClick1","RClick2","RClick3","RBeginDrag","RDown","RUp","Drag"];function InArray(g,j){for(var m=0;m<j.length;m++)if(g==j[m])return true;return false}
function MouseEventControl(g,j){if(g==j)return true;if(IsTouchDevice())if(InArray(g,touchEvents)&&InArray(j,touchEvents))return true;return false}
function ActionControl(g,j,m){if(playMode=="K"&&KGuestDemoMode>0)return null;if(m==null)m=false;if(j==null){for(var q=0;q<screens[showScreen].actions.length;q++){var u=screens[showScreen].actions[q];if(MouseEventControl(u.type,g))return u}return 0}for(q=0;q<screens[showScreen].actions.length;q++){u=screens[showScreen].actions[q];if(MouseEventControl(u.type,g)&&MouseInHotspot(j,u))return u}if(m==true)return null;if(showActObj.type=="Input"){m=showActObj.nextFrame;for(q=0;q<screens[m].actions.length;q++){u=
screens[m].actions[q];if(MouseEventControl(u.type,g)&&MouseInHotspot(j,u))return u}}return 0}function ToStandard(g){g=String.fromCharCode(g);return g.toUpperCase(g).charCodeAt(0)}function ToStandard2(g){if(g>=112&&g<=123)return g;return ToStandard(g)}
function ActionKeyControl(g,j,m){m||(m=false);var q=g;if(g==107||g==187)q=43;g=GetShiftState(j);if(g.length>0)if(m)if(g.substr(0,1)=="s")g=g.substr(1);for(m=0;m<screens[showScreen].actions.length;m++){j=screens[showScreen].actions[m];if(j.type=="Key"&&(q==ToStandard(j.par1)||q==ToStandard2(j.par1))&&g==j.par2)return j}return 0}function IsDragSequence(){return screens[showScreen].actions.length==1&&screens[showScreen].actions[0].type=="Drag"}
var m_mouseStatus=0,m_p1=new StoredEvent(0,0,"",""),m_p2=new StoredEvent(0,0,"",""),m_p3=new StoredEvent(0,0,"",""),m_buttonID,DOUBLECLICKTIME=500,m_timer1=0,m_timer2=0,m_bClkEvent=false,m_begindragEvent=0;
function BDown(g){m_begindragEvent=0;g=ActionControl(m_buttonID+"BDown",g);if(showActObj.type=="Input")if(AssessStringInput(true,true)){showHistory[showHistory.length]=showActObj.nextFrame;historyActionMap[showActObj.nextFrame]=0;TeacherForward(true,g.nextFrame,g.id);return}if(g)TeacherForward(true,g.nextFrame,g.id);else{m_mouseStatus=0;FalseEvent()}}
function BBeginDrag(g){g=ActionControl(m_buttonID+"BeginDrag",g);if(showActObj.type=="Input")if(AssessStringInput(true,true)){showHistory[showHistory.length]=showActObj.nextFrame;historyActionMap[showActObj.nextFrame]=0;TeacherForward(true,g.nextFrame,g.id);return}if(g)TeacherForward(true,g.nextFrame,g.id);else{m_mouseStatus=0;FalseEvent()}}
function BUp(g){if(!isOnLink){m_begindragEvent=0;if(g=ActionControl(m_buttonID+"Up",g))TeacherForward(true,g.nextFrame,g.id);else{m_mouseStatus=0;playMode=="K"&&KScoringScreen||IsLeadIn()||IsLeadOut()||showActObj.type=="None"||FalseMouseEvent()}}}
function BClk(g){m_begindragEvent=0;g=ActionControl(m_buttonID+"Click1",g,false);if(showActObj.type=="Input")if(AssessStringInput(true,true)){showHistory[showHistory.length]=showActObj.nextFrame;historyActionMap[showActObj.nextFrame]=0;TeacherForward(true,g.nextFrame,g.id);return}g?TeacherForward(true,g.nextFrame,g.id):FalseEvent()}
function BDblClk(g){m_begindragEvent=0;g=ActionControl(m_buttonID+"Click2",g,false);if(showActObj.type=="Input")if(AssessStringInput(true,true)){showHistory[showHistory.length]=showActObj.nextFrame;historyActionMap[showActObj.nextFrame]=0;TeacherForward(true,g.nextFrame,g.id);return}g?TeacherForward(true,g.nextFrame,g.id):FalseEvent()}
function BTrplClk(g){m_begindragEvent=0;g=ActionControl(m_buttonID+"Click3",g,false);if(showActObj.type=="Input")if(AssessStringInput(true,true)){showHistory[showHistory.length]=showActObj.nextFrame;historyActionMap[showActObj.nextFrame]=0;TeacherForward(true,g.nextFrame,g.id);return}g?TeacherForward(true,g.nextFrame,g.id):FalseEvent()}
function BWheel(g){g=ActionControl("Wheel",g);if(showActObj.type=="Input")if(AssessStringInput(true,true)){showHistory[showHistory.length]=showActObj.nextFrame;historyActionMap[showActObj.nextFrame]=0;TeacherForward(true,g.nextFrame,g.id);return}g?TeacherForward(true,g.nextFrame,g.id):FalseEvent()}function FalseMouseEvent(){if(showActObj.type=="Input")if(AssessStringInput(true,true)){TeacherForward(true,showActObj.nextFrame,showActObj.id);setTimeout("FalseEvent();",300);return}FalseEvent()}
function FalseEvent(){TeacherWrong()}var g_x,g_y,g_shst,g_timer=0;
function EventMouseMove(g){if(g==null)g=window.event;if(playMode=="K"){g_x=GetMouseX(g);g_y=GetMouseY(g);g_shst=GetShiftState(g)}if(playMode=="K"&&KGuestDemoMode)return false;if(playMode=="K"&&IsDragBegin())return false;if(m_begindragEvent)if(!MouseInHotspot(g,m_begindragEvent)){TeacherForward(true,m_begindragEvent.nextFrame,m_begindragEvent.id);m_begindragEvent=0}var j=ActionControl("Drag",g);j&&TeacherForward(true,j.nextFrame,j.id);if(j=ActionControl("Move",g))if(playMode=="K"){if(g_timer==0)g_timer=
setTimeout("PointDelay();",300)}else TeacherForward(true,j.nextFrame,j.id)}function PointDelay(){var g=new StoredEvent(g_x,g_y,g_shst);g_timer=0;(act=ActionControl("Move",g))&&TeacherForward(true,act.nextFrame,act.id)}function EventDblClk(){return false}
function EventWheel(g){if(playMode=="K"&&KGuestDemoMode)return false;if(playMode=="K"&&IsDragBegin())return false;if(playMode=="K"&&KConfirmDemo>0)return false;if(playMode=="S")return false;if(m_mouseStatus!=0)return false;if(g==null)g=window.event;BWheel(g);return false}
function DocEventMouseDown(g){if(!g)g=window.event;if(g.srcElement)if(g.srcElement.id=="m_ActionText")return;if(g.target)if(g.target.id=="m_ActionText")return;if(actionMenu)if(actionMenu.IsOnScreen()){actionMenu.Close();return true}}
function EventMouseDown(g){if(actionMenu)if(actionMenu.IsOnScreen()){actionMenu.Close();return true}if(playMode=="K"&&KGuestDemoMode)return false;if(playMode=="K"&&IsDragBegin())return false;if(playMode=="K"&&KConfirmDemo>0)return false;if(playMode=="S"){if(isOnLink)return true;return false}if(g==null)g=window.event;var j=GetButton(g);m_buttonID||(m_buttonID=j);if(j=="")j=m_buttonID;if(playMode=="K"||playMode=="T")if(showActObj.type=="Input")for(var m=0;m<showActObj.hotspots;m++)if(MouseInObject(g,
"hot"+showActObj.id+"_"+m))return true;if(screens[showScreen].actions.length>0)if(screens[showScreen].actions[0].type=="Decision")return true;m=ActionControl(j+"BDown",g);var q=ActionControl(j+"BeginDrag",g),u=ActionControl(j+"Click1",g),z=ActionControl(j+"Click2",g),v=ActionControl(j+"Click3",g);switch(m_mouseStatus){case 0:m_bClkEvent=false;m_mouseStatus=1;m_p1=new StoredEvent(GetMouseX(g),GetMouseY(g),GetShiftState(g),j);m_buttonID=j;m_begindragEvent=0;if(u==0&&z==0&&v==0){m&&BDown(m_p1);q&&BBeginDrag(m_p1);
break}if(q)m_begindragEvent=q;if(z||v)m_timer1=setTimeout(Event_Mouse_Timer1,DOUBLECLICKTIME);break;case 2:if(j!=m_buttonID)break;if(m_timer1>0){clearTimeout(m_timer1);m_timer1=0}if(z&&v==0){m_mouseStatus=0;MouseInHotspot(m_p1,z)?BDblClk(g):FalseMouseEvent();break}m_mouseStatus=3;m_p3=new StoredEvent(GetMouseX(g),GetMouseY(g),GetShiftState(g),j);m_timer2=setTimeout(Event_Mouse_Timer2,DOUBLECLICKTIME);break;case 3:if(j!=m_buttonID)break;if(m_timer2>0){clearTimeout(m_timer2);m_timer2=0}m_mouseStatus=
0;v&&MouseInHotspot(m_p1,v)&&MouseInHotspot(m_p3,v)?BTrplClk(g):FalseMouseEvent();break;default:m_mouseStatus=0}return false}
function EventMouseUp(g){m_mouseStatus==2&&EventMouseDown(g);if(playMode=="K"&&KGuestDemoMode)return false;if(playMode=="K"&&IsDragBegin())return false;if(playMode=="K"&&KConfirmDemo>0)return false;if(g==null)g=window.event;var j=GetButton(g);if(j!=m_buttonID)return false;if(screens[showScreen].actions.length>0)if(screens[showScreen].actions[0].type=="Decision")return true;var m=ActionControl(j+"Click1",g),q=ActionControl(j+"Click2",g),u=ActionControl(j+"Click3",g);switch(m_mouseStatus){case 1:if(m==
0&&q==0&&u==0){m_mouseStatus=0;BUp(g);break}if(m)m_bClkEvent=MouseInHotspot(m_p1,m);if(m_timer1==0){if(m){m_mouseStatus=0;m_bClkEvent?BClk(g):BUp(g)}else{m_mouseStatus=0;FalseMouseEvent()}break}m_mouseStatus=2;m_p2=new StoredEvent(GetMouseX(g),GetMouseY(g),GetShiftState(g),j)}return false}function Event_Mouse_Timer1(){m_timer1=0;if(m_mouseStatus==2){m_bClkEvent?BClk(m_p2):BUp(m_p2);m_mouseStatus=0}}
function Event_Mouse_Timer2(){m_timer2=0;if(m_mouseStatus==3){m_mouseStatus=0;var g=ActionControl(m_buttonID+"Click2",m_p3);if(g)MouseInHotspot(m_p1,g)&&BDblClk(m_p3);else FalseMouseEvent()}}var knowit_AltF4Pressed=false;function BeforeUnload(){if(knowit_AltF4Pressed){knowit_AltF4Pressed=false;try{event.returnValue=""}catch(g){}}navigator.userAgent.indexOf("Firefox/")>0&&UnLoad();navigator.userAgent.indexOf("Safari")>0&&UnLoad()}var getCode=false;
function EventKeyPress(g){if(showActObj.type=="Input")return true;if(!getCode)return true;if(g==null)g=window.event;var j=g.which?g.which:g.keyCode;if(j>=65&&j<=90)j=String.fromCharCode(j).toUpperCase().charCodeAt(0);if(playMode=="T")if(act=ActionKeyControl(j,g,true))TeacherForward(true,act.nextFrame,act.id);else!IsLeadIn()&&!IsLeadOut()&&TeacherWrong(g);else(act=ActionKeyControl(j,g,true))?TeacherForward(true,act.nextFrame,act.id):TeacherWrong(g);return getCode=false}var _tabsemaphore=false;
function EventKeyDown(g){if(g==null)g=window.event;var j=g.which?g.which:g.keyCode;if(j>=96&&j<=105)j-=48;if(IsExplorer())if(j==9)if(_tabsemaphore==true)return false;else{_tabsemaphore=true;setInterval("_tabsemaphore=false;",10)}if(playMode=="S"&&j>=112&&j<=123){showFrameIDToggle&&CheckFrameIDKeys(g)==true&&ToggleShowFrameID();return false}if(playMode=="K")if(KFinishClose==true)return false;if(showActObj.type=="Input"){if(playMode=="S"||playMode=="K"&&KGuestDemoMode){j==13&&DemoForward();j==27&&ClosePlayer();
j==32&&PauseToggle();return false}if(j==9&&PlayerConfig.StringInputLostFocusAutoadvanceEnabled)AssessStringInput(true,true)?TeacherForward(true):TeacherWrong(g);if(j==13)if(playMode=="T"&&(UserPrefs.TryIt.EnableSkipping||IsTouchEvent()))TeacherForward(true);else AssessStringInput(true,true)?TeacherForward(true):TeacherWrong(g);if(IsSafari()&&j==27){OnClose();return false}return true}if(playMode=="K"&&KGuestDemoMode)return false;if(playMode=="K"&&IsDragBegin())return false;if(j>=65&&j<=90)j=String.fromCharCode(j).toUpperCase().charCodeAt(0);
if(j>=16&&j<=18)return true;if(j==91||j==92)return true;if(j==114||j==116||j==117||j==121){if(document.all&&!IsFF3()){g.originalCode=j;g.keyCode=0}if(playMode=="S")return false}var m;if(playMode=="S"){if(j==27){ClosePlayer();return false}else if(j==32){PauseToggle();return false}else if(j==13){if(actionMenu)if(actionMenu.IsOnScreen()){actionMenu.Close();return true}DemoForward(showActObj.delay!=DELAY_INFINITE);return false}return true}else if(playMode=="T"){if(g.keyCode==115&&g.altKey==true)return false;
if(j==13){if(actionMenu)if(actionMenu.IsOnScreen()){closedbyEnter=true;actionMenu.Close();return true}if(m=ActionKeyControl(j,g)){TeacherForward(true,m.nextFrame,m.id);return false}else if(UserPrefs.TryIt.EnableSkipping||IsTouchEvent()){TeacherForward(false);return false}else if(screens[showScreen].actions[0].type=="None"){TeacherForward(true);return false}if(!UserPrefs.TryIt.EnableSkipping&&!IsTouchEvent()){TeacherWrong(g);return false}else return true}else if(j==27){(m=ActionKeyControl(j,g))?TeacherForward(true,
m.nextFrame,m.id):ClosePlayer();return false}else if(j==9){(m=ActionKeyControl(j,g))?TeacherForward(true,m.nextFrame,m.id):TeacherWrong(g);return false}else if(j>=16&&j<=18||showActObj.type=="Input")return true;else{(m=ActionKeyControl(j,g))?TeacherForward(true,m.nextFrame,m.id):TeacherWrong(g);return false}}else{if(g.keyCode==115&&g.altKey==true){try{g.keyCode=27}catch(q){}j=27;knowit_AltF4Pressed=true}if(j==13){if(actionMenu)if(actionMenu.IsOnScreen()){actionMenu.Close();return true}if(KScoringScreen)ClosePlayer(1);
else if(IsLeadIn()||IsLeadOut())TeacherForward(true);else if(m=ActionKeyControl(j,g))TeacherForward(true,m.nextFrame,m.id);else screens[showScreen].actions[0].type=="None"?TeacherForward(true,m.nextFrame,m.id):TeacherWrong(g);return true}if(j==27){(m=ActionKeyControl(j,g))?TeacherForward(true,m.nextFrame,m.id):OnClose();return false}else if(j==9){(m=ActionKeyControl(j,g))?TeacherForward(true,m.nextFrame,m.id):TeacherWrong(g);return false}else if(j>=16&&j<=18||showActObj.type=="Input")return true;
else if(m=ActionKeyControl(j,g)){TeacherForward(true,m.nextFrame,m.id);return false}if(j>=112&&j<=123){TeacherWrong(g);return false}return getCode=true}}
function StrongAssess(g,j){g||(g=false);j||(j=false);var m=showActInpObj.value;if(j){var q=showActObj.par1[1];if(matchString(q,m,showActObj.par3))return true;q=DecodeInputString(showActObj.par1[1]);return matchString(q,m,showActObj.par3)}if(g){if(showActObj.par1[0]=="N"&&m=="")return true;if(showActObj.par1[0]=="A"&&m=="")return true}for(var u=1;u<showActObj.par1.length;u++){q=showActObj.par1[u];if(matchString(q,m,showActObj.par3))return true;q=DecodeInputString(showActObj.par1[u]);if(matchString(q,
m,showActObj.par3))return true}return false}var _assessStr_counter=0;function AssessStringInput(g,j){if(!j){_assessStr_counter++;if(_assessStr_counter==3)_assessStr_counter=0;if(_assessStr_counter!=0)return}g||(g=false);var m=false;if(playMode=="K")m=true;if(!g)return StrongAssess(false,!m);return m?showActObj.par1[0]=="N"||showActObj.par1[0]==""?StrongAssess(true,false):showActObj.par1[0]=="S"?showActInpObj.value.length>0:true:StrongAssess(g,true)}
function EventInputKey(g){if(playMode=="S"){g=window.event?window.event.keyCode:g.which?g.which:g.keyCode;if(g==27){OnClose();return false}setTimeout("showActInpObj.value=showActInpObj.original;",10);return false}if(playMode=="K"&&KGuestDemoMode){setTimeout("showActInpObj.value=showActInpObj.original;",10);return false}if(playMode=="K"&&IsDragBegin()){setTimeout("showActInpObj.value=showActInpObj.original;",10);return false}if(playMode=="T"||playMode=="K"){g=window.event?window.event.keyCode:g.which?
g.which:g.keyCode;if(g!=13)showActObj.par4=true;if(g==27){showActInpObj.value=showActObj.par5;showActInpObj.original=showActInpObj.value;OnClose();return false}}return true}var tracewindow=null;function Trace(g){tracewindow==null&&tracewindow.open("","","");tracewindow.document.writeln(g);tracewindow.document.writeln("<br>");tracewindow.scrollBy(0,100)}
function EventPropertyChange(){if(showActObj.type!="Input")if(showActObj.par4==false)return true;if(playMode=="T"||playMode=="K")PlayerConfig.StringInputAutoadvanceEnabled&&AssessStringInput(false)&&showActObj.par4==true&&TeacherForward(true,showActObj.nextFrame,showActObj.id);setTimeout("EventPropertyChange();",100);return true}function EventKeyUp(){return true}function EventCancel(){return false}
function UnLoad(){lms_ClosePage();if(playMode=="K"){trackScoreCompleted=GetResultInPercent(true);trackScoreRequired=KScoreNeeded;KTopicFinished||KScoringScreen||showActObj.nextFrame=="end"?trackComplete():trackIncomplete()}if(playMode=="S"||playMode=="T"||playMode=="K")ClosePlayer();guidedParent&&guidedParent.GITMClosed()}
function StartFrameCorrection(g){var j;if(screens[g].backActions.length==0){StartScreen="start";if(StartScreen!=g)StartAction=0}else{j="";for(var m=0;m<screens[g].backActions.length;m++)if(m==0)j=screens[g].backActions[0].prevFrame;else if(j!=screens[g].backActions[0].prevFrame){StartScreen=g;if(StartScreen!=g)StartAction=0;return}for(j=screens[g].backActions[0].prevFrame;;){if(screens[j].backActions.length==0){StartScreen="start";if(StartScreen!=g)StartAction=0;break}if(screens[j].actions[0].type==
"None")j=screens[j].backActions[0].prevFrame;else{if(screens[j].actions[0].type=="Decision"){StartScreen=j;if(StartScreen!=g)StartAction=0;break}StartScreen=g;if(StartScreen!=g)StartAction=0;break}}}}function SetStartFrame(g){if(g.length!=0)if(screens[g])StartScreen=g}
function SetStartContext(g){if(g.length!=0){var j=[];j=g.split("+");for(g=0;g<j.length;g++){ctxItem=j[g];for(var m=0;m<screenNames.length;m++){scrName=screenNames[m];scr=screens[scrName];for(var q=0;q<scr.actions.length;q++){act=scr.actions[q];if(act.ctx==ctxItem){SetStartFrame(scrName);StartFrameCorrection(StartScreen);return}}}}}}var ecidMatchingFrames=[],ecidStartDecisions={},ecidDecisionStart=false;
function SetStartEcid(g){if(g.length!=0){EcidComparer.Init(g);SearchPathForEcid(screenNames[0]);if(ecidMatchingFrames.length==1){SetStartFrame(ecidMatchingFrames[0].frameid);StartAction=ecidMatchingFrames[0].altindex;StartFrameCorrection(StartScreen)}else if(ecidMatchingFrames.length>=2){ecidDecisionStart=true;StartScreen=FindEcidStartNextFrame(screenNames[0]);StartFrameCorrection(StartScreen)}}}
function SearchPathForEcid(g){for(;;){if(g=="end")return false;var j=screens[g];j.type=j.actions[0].type.toLowerCase();if(j.type=="decision"){var m=false;ecidStartDecisions[g]={id:g,display:false,pathstoignore:[]};for(var q=0;q<j.actions.length;q++)if(SearchPathForEcid(j.actions[q].nextFrame)){if(m)ecidStartDecisions[g].display=true;m=true}else ecidStartDecisions[g].pathstoignore.push(j.actions[q].id);return m}for(m=0;m<j.actions.length;m++)if(EcidComparer.Compare(j.actions[m].ecidarray)){ecidMatchingFrames.push({frameid:g,
altindex:m});return true}g=j.actions[0].nextFrame}}function FindEcidStartNextFrame(g){var j=screens[g];j.type=j.actions[0].type.toLowerCase();if(j.type=="decision")if(ecidStartDecisions[g].display)return g;for(var m=0;m<ecidMatchingFrames.length;m++)if(g==ecidMatchingFrames[m].frameid){StartAction=ecidMatchingFrames[m].altindex;ecidDecisionStart=false;return g}for(g=0;g<j.actions.length;g++)if(j.actions[g].nextFrame!="end")if(m=FindEcidStartNextFrame(j.actions[g].nextFrame))return m}
function Skip(){return false}
function SetFlags(){for(var g=0;g<screenNames.length;g++){scrName=screenNames[g];for(var j=0,m=0;m<screens[scrName].actions.length;m++){var q=screens[scrName].actions[m].emptytext;q=screens[scrName].emptyinfo&&q;screens[scrName].actions[m].emptybubble=q;!q&&screens[scrName].actions[m].realAction==true&&j++}for(m=0;m<screens[scrName].actions.length;m++){screens[scrName].actions[m].showalternatives=j>1;if(screens[scrName].actions[m].type=="None"||screens[scrName].actions[m].type=="Decision")screens[scrName].actions[m].showalternatives=
false}}}var bActionsBuilded=false;function FrameContainer(){this.container={};this.Clear=function(){this.container={}};this.Contains=function(g){try{if(this.container[g]!=null)return true}catch(j){}return false};this.Get=function(g){if(this.Contains(g))return this.container[g];return null};this.Add=function(g,j){this.container[g]=j}}var frameContainer=new FrameContainer;function _isHiddenAction(g){try{return g.disabledmodes.indexOf(playMode)>=0}catch(j){return false}}
function _isFrameToSkip(g){if(playMode=="S"){var j=g.actions[0];if(!_isHiddenAction(j))return false}else for(var m=0;m<g.actions.length;m++){j=g.actions[m];if(!_isHiddenAction(j))return false}return true}function _createActionArray(g){var j=[];g=screens[g];for(var m=0;m<g.actions.length;m++){var q=g.actions[m];_isHiddenAction(q)||(j[j.length]=q)}return j}
function _buildActionsS(){for(var g=0;g<screenNames.length;g++){var j=screens[screenNames[g]];_isFrameToSkip(j)&&frameContainer.Add(j.actions[0].prevFrame,j.actions[0].nextFrame)}for(g=true;g;){g=false;for(var m in frameContainer.container){j=frameContainer.Get(m);var q=frameContainer.Get(j);if(q!=null&&j!=q){frameContainer.Add(m,q);g=true}}}for(g=0;g<screenNames.length;g++){j=screens[screenNames[g]];try{var u=j.actions[0].nextFrame;if(frameContainer.Contains(u))j.actions[0].nextFrame=frameContainer.Get(u)}catch(z){}}}
function _buildActionsTK(){for(var g=0;g<screenNames.length;g++){var j=screens[screenNames[g]];if(_isFrameToSkip(j))for(var m=0;m<j.backActions.length;m++)frameContainer.Add(j.backActions[m].nextFrame,j.actions[0].nextFrame)}for(g=true;g;){g=false;for(m in frameContainer.container){j=frameContainer.Get(m);var q=frameContainer.Get(j);if(q!=null&&j!=q){frameContainer.Add(m,q);g=true}}}for(g=0;g<screenNames.length;g++){m=screenNames[g];j=screens[m];j.actions=_createActionArray(m);for(m=0;m<j.actions.length;m++){q=
j.actions[m].nextFrame;if(frameContainer.Contains(q))j.actions[m].nextFrame=frameContainer.Get(q)}}}function BuildActions(){if(!bActionsBuilded){frameContainer.Clear();playMode=="S"?_buildActionsS():_buildActionsTK();bActionsBuilded=true}}var bBackActionsBuilded=false;
function BuildBackActions(){if(!bBackActionsBuilded){for(var g=0;g<screenNames.length;g++){scr=screens[screenNames[g]];scr.backActions=[]}for(g=0;g<screenNames.length;g++)if(!frameContainer.Contains(screenNames[g])){scr=screens[screenNames[g]];for(var j=0;j<scr.actions.length;j++){scr.actions[j].prevFrame=screenNames[g];s=scr.actions[j].nextFrame;if(s!="end")screens[s].backActions[screens[s].backActions.length]=scr.actions[j]}}}bBackActionsBuilded=true}
var _deviceDPI=0,swipe=new Swipe,screenwidth=0;function IsTouchEvent(){if(IsTouchDevice()){if(UserPrefs.TryIt.EnableSkipping)return true;var g=showActObj.type.toLowerCase();if(g.indexOf("click")>=0)return false;if(g.indexOf("input")>=0)return false;return true}return false}
function setiPadScreen(){if(window.innerWidth/window.innerHeight>$("#screen").width()/$("#screen").height()){$("html").css({margin:0,padding:0});$("body").css({position:"relative",margin:0,padding:0}).width(window.innerWidth/window.innerHeight*$("#screen").height());$("#screen").css("top",0);$("#screen").css("left",(window.innerWidth/window.innerHeight*$("#screen").height()-$("#screen").width())/2)}else{$("body").width($("#screen").width());$("#screen").css("left",0);$("#screen").css("top",(window.innerHeight/
window.innerWidth*$("#screen").width()-$("#screen").height())/2)}}function SetVolumeLevel(g,j){SoundPlayerObj.SetVolume(j?0:g);UserPrefs.LoadCookie();UserPrefs.NavbarVolume=j?g+1E3:g;UserPrefs.StoreCookie()}function UpdateHistoryFromTimeline(g){var j=upk.Timeline.GetTimeline();showHistory=[];for(var m=0;m<g;m++)showHistory[showHistory.length]=j[m]}
function SetTimeLevel(g){upk.Timeline.Lock(true,g);PlayStop();g=upk.Timeline.DeterminateCurrentFrameFromTime(g);timelineDescriptor=new TimelineDescriptor(true,g.frameid,g.timelineindex,g.narration,g.animation,g.resttime);UpdateHistoryFromTimeline(g.timelineindex);ShowScreen(g.frameid,"","back",true)}var navBar,fusionmode=false,showCursor=false;
function FirstScreen(g){template_pauselink='<div align="right"><span id="prbr"><br /></span><a id="prdiv" class="InstructText" href="javascript:HLink(600)">'+R_interface_pause+"</a></div>";HideSplash();if(screenwidth==0){screenwidth=$("#screen").width()+2;if(fusionmode){navBar=new upk.player.navBar("navBar1",$(document.body),{ios:IsTouchDevice()});navBar.bind({onnext:function(){DemoNext()},onprev:function(){DemoPrev()},onrefresh:function(){TeacherFastBack()},onpausetoggle:function(){PauseToggle()},
onprefs:function(){SeeItPause();OpenPreferences()},onvolumechange:function(q){SetVolumeLevel(q.volume,q.muted)},onsliderchange:function(q){SetTimeLevel(q.time)},onhelp:function(){LaunchHelp("../../")}});UserPrefs.LoadCookie();var j=UserPrefs.NavbarVolume;if(j>1E3){navBar.setVolume(j-1E3);navBar.toggleMute(true)}else navBar.setVolume(j);IsTouchDevice()?navBar.setKeepHidden(true):navBar.show()}if(IsTouchDevice()){j=document.body.className;if(j.indexOf("ipad")<0)document.body.className=j+" ipad";setiPadScreen();
$("#screen").bind("orientationchange",function(){setTimeout("setiPadScreen(); binterf.RefreshPosition(); ScrollToAction()",200)});$("#screen").bind("touchstart",function(){swipe.Init(screenwidth)});$("#screen").bind("touchmove",function(q){try{if(q.originalEvent.touches[1]||q.originalEvent.changedTouches[1])swipe.DetectedMulti();else swipe.IsNotZoomed()&&q.preventDefault()}catch(u){}q=q.originalEvent.touches[0]||q.originalEvent.changedTouches[0];swipe.Add(q.pageY,q.pageX)});$("#screen").bind("touchend",
function(){if(swipe.IsMulti())setTimeout("binterf.RefreshPosition();",100);else if(swipe.IsNotZoomed()!=false){var q=swipe.GetX(),u=swipe.GetY();if(!(Math.abs(q)>Math.abs(u))){u>30&&TeacherBack();if(u<-30)if(IsDragBegin())StartDemoInTryIt();else{q={};q.keyCode=13;EventKeyDown(q)}}}})}}if(PlayerConfig.UseCursorShadow==true){$("#cursor img").attr("src","../../../img/cursor2.png");$("#bullseye img").attr("src","../../../img/bullseye2.png")}if(_deviceDPI==0)_deviceDPI=getDpiInfo();if(_deviceDPI!=96)if(getDPICookie()==
false){loader_dontclose=true;this.location.replace("../../../js/unsuppdpi.html?"+Escape.MyEscape(AbsUrl(this.location.href)));return}InitLmsMode("player");if(!g&&lms_initialized==false){SetUpProgressReporting();GetOpener();g=window.opener==undefined?window.parent:window.opener;if(soundModes.indexOf(playMode)<0)soundIsExported=false;if(window.location.href.substr(0,7).toLowerCase()!="file://"||!IsTouchDevice())if(location.hostname=="")soundIsExported=false;if(_lmsMode!=null)if(nosound==false)if(Sound_Init(soundIsExported,
UserPrefs.PlayAudio,null,false)==false){loader_dontclose=true;return}lms_InitPage(_lmsMode==null?lms_childIndex:-1,_lmsMode==null?gopener==null?g:gopener:null,"T_"+document.getElementById("TopicId").getAttribute("topicid"),"FirstScreen()")}else{nosound==true&&SetNoSound(true);if(GetNoSound())soundIsExported=false;BuildBackActions();BuildActions();bBackActionsBuilded=false;BuildBackActions();event_blocked=false;if(playMode!="K"){if(g)StartScreen=FirstScreenName;else{SetStartFrame(param_frame);SetStartContext(param_ctx);
SetStartEcid(param_ecid);FirstScreenName=StartScreen;SetFlags()}if(StartScreen=="start")if(showLeadIn==0)StartScreen=screens.start.actions[0].nextFrame;else if(showLeadIn!=1)if(UserPrefs.ShowLeadIn=="toc")StartScreen=screens.start.actions[0].nextFrame}else{FirstScreenName=StartScreen;KWrongScreens=[]}j=getDIV("screen");scrH=getObjHeight("screen");scrW=getObjWidth("screen");window.onresize=HandleResize0;if(!IsTouchDevice())window.onscroll=HandleResize;document.body.oncontextmenu=EventCancel;window.onhelp=
Skip;document.onhelp=Skip;j.onhelp=Skip;navigator.appName.substring(0,9)!="Microsoft"&&!IsTouchDevice()&&setInterval("HandleResize()",1E3);if(document.layers){document.captureEvents(Event.KEYDOWN);if(playMode=="T"||playMode=="K")j.captureEvents(Event.MOUSEMOVE);j.captureEvents(Event.MOUSEDOWN);if(playMode=="T"||playMode=="K")j.captureEvents(Event.MOUSEUP);j.captureEvents(Event.DBLCLICK)}if(playMode=="T"||playMode=="K")j.onmousemove=EventMouseMove;j.onmousedown=EventMouseDown;document.onmousedown=
DocEventMouseDown;if(playMode=="T"||playMode=="K")j.onmouseup=EventMouseUp;j.ondblclick=EventDblClk;if(j.addEventListener)j.addEventListener("DOMMouseScroll",EventWheel,false);else j.onmousewheel=EventWheel;j.oncontextmenu=EventCancel;j.ondragstart=EventCancel;document.ondragstart=EventCancel;document.onkeydown=EventKeyDown;document.onkeypress=EventKeyPress;document.onstop=null;if(parent)parent.document.onstop=null;window.onunload=UnLoad;window.onfocus=OnFocus;curH=getObjHeight("cursor");curW=getObjWidth("cursor");
sx=j.offsetLeft;sy=j.offsetTop;shiftTo("cursor",(scrW-curW-sx-cursor_alignment_x)/2,(scrH-curH-sy-cursor_alignment_y)/2);showCursor=false;j=StartScreen;StartScreen="";HandleResize();StartScreen=j;g||(binterf=new JSBubbleInterface("bubb01"));binterf.SetEnableCloseButton(1);if(playMode=="T"){binterf.SetMode(R_mode_tryit);binterf.SetActionText(R_interface_action);binterf.SetMoveable(false)}if(playMode=="S"){binterf.SetMode(R_mode_seeit);fusionmode||binterf.SetActionText(R_interface_action);binterf.SetMoveable(false)}if(playMode==
"K"){binterf.SetMode(R_mode_knowit);binterf.SetActionText(R_interface_action);binterf.SetPosition(-1,-1,-1,-1,true,0,0,0);binterf.SetMoveable(true)}document.getElementById("frameidtext").innerHTML=R_frameid;switch(PlayerConfig.ShowFrameID.toLowerCase()){case "on":document.getElementById("frameiddiv").style.display="block";break;case "off":document.getElementById("frameiddiv").style.display="none";break;case "shiftf1":showFrameIDToggle=112;break;case "shiftf2":showFrameIDToggle=113;break;case "shiftf3":showFrameIDToggle=
114;break;case "shiftf4":showFrameIDToggle=115;break;case "shiftf5":showFrameIDToggle=116;break;case "shiftf6":showFrameIDToggle=117;break;case "shiftf7":showFrameIDToggle=118;break;case "shiftf8":showFrameIDToggle=119;break;case "shiftf9":showFrameIDToggle=120;break;case "shiftf10":showFrameIDToggle=121;break;case "shiftf11":showFrameIDToggle=122;break;case "shiftf12":showFrameIDToggle=123}lms_topicStart(getMyGuid(),playMode);ShowScreen(StartScreen,StartAction);try{window.focus()}catch(m){}playMode==
"S"&&upk.Timeline.CalculateTimelineThrough("end")}}function SetSound(g){soundIsExported=g}function SetKScore(g){KScoreNeeded=g}function HexaToDec(g){if(g.length==0)return"";try{return g.substr(0,1)+parseInt("0x"+g.substr(1))}catch(j){return""}}function ecidStr(g){return replaceString("%27","'",g)}
function ParseArguments(){var g,j;g=document.location.hash.substring(1);g=g.split("&");if(g.length==0||g[0]==""){g=document.location.search.substring(1);g=g.split("&")}if(g.length==1)if(g[0].toLowerCase().substr(0,3)=="su=")g=Escape.SafeUriUnEscape(g[0].substr(3)).split("&");for(var m=0;m<g.length;m++){j=g[m];if(j.substr(0,5).toLowerCase()=="mode=")playMode=j.substr(5,1);if(j.substr(0,9).toLowerCase()=="framehex=")param_frame=HexaToDec(j.substr(9));if(j.substr(0,6).toLowerCase()=="frame=")param_frame=
j.substr(6);if(j.substr(0,4).toLowerCase()=="ctx=")param_ctx=j.substr(4);if(j.substr(0,6).toLowerCase()=="ctxex=")param_ecid=ecidStr(j.substr(6));if(j.substr(0,8).toLowerCase()=="leadin=1")showLeadIn=1;if(j.substr(0,8).toLowerCase()=="leadin=0")showLeadIn=0;if(j.substr(0,12).toLowerCase()=="printitname=")param_printitname=j.substr(12);if(j.substr(0,8).toLowerCase()=="windowed")fusionmode=true;if(j.substr(0,11).toLowerCase()=="childindex=")lms_childIndex=parseInt(j.substr(11));if(j.substr(0,10).toLowerCase()==
"assessment")lms_inAssessment=true;if(j.substr(0,7).toLowerCase()=="nosound")nosound=true}if(playMode=="K"){trackArgList=g;trackOnBegin()}}var clicknum=1;function SoundToggle(){clicknum+=1;document.imgS.src=Math.floor(clicknum/2)==clicknum/2?"sound_isoff.gif":"sound_ison.gif"}
function OpenDialog(){day=new Date;id=day.getTime();eval("page"+id+" = window.open(MakeAbsolute(URL), '"+id+"', 'toolbar=1,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=506,height=338,left = 147,top = 131');")}
function PauseToggle(){try{if(isPaused=!isPaused){binterf.SetPRText(R_interface_resume);binterf.StartBlink();PlayPause()}else{binterf.EndBlink();binterf.SetPRText(R_interface_pause);if(!PlayResume()){navBar&&navBar.togglePause(isPaused);TeacherFastBack();return}}parent.setPauseStatus&&parent.setPauseStatus(isPaused);navBar&&navBar.togglePause(isPaused)}catch(g){isPaused=!isPaused}}function SeeItPause(){playMode=="S"&&!isPaused&&PauseToggle()}
function SeeItResume(){playMode=="S"&&isPaused&&PauseToggle()}function IsPaused(){return isPaused}function SetScrollbars(){var g=getDIV("screen"),j=g.offsetHeight,m=document.body.clientHeight;if(g.offsetWidth>document.body.clientWidth+2||j>m)document.body.scroll="auto"}function SetScreenshotPath(g){g||(g="");screenshotPath=g==""?MakeAbsolute(""):g;g!=""&&SoundPlayerObj.SetSoundPath(g)}function SetRemediationLevels(g,j,m){KRemediation1=g;KRemediation2=j;KRemediation3=m}
function SetTopicName(g){g||(g="");if(g.length>0)topicName=unescape(g)}function SetTopicShowBubbles(g){topicShowBubbles=g}function fixHTMLString(g){g=replaceString("<","&lt;",g);g=replaceString(">","&gt;",g);g=replaceString("'","&#39;",g);return g=replaceString('"',"&#34;",g)}function DecodeInputString(g){g=replaceString("&lt;","<",g);g=replaceString("&gt;",">",g);return g=replaceString("&amp;","&",g)}ParseArguments();document.writeln("<STYLE>");
if(playMode=="S"){document.writeln("A.textLink {text-decoration:none; color:black}");document.writeln(".infoblocks {display:none}")}else document.writeln("A.textLink {color:#0033cc}");document.writeln("</STYLE>");if(NS4)var loadWidth=window.innerWidth,loadHeight=window.innerHeight;function getMyGuid(){var g=this.location.href,j=g.indexOf("?");if(j>=0)g=g.substr(0,j);j=g.lastIndexOf("/");return g.substr(j-36,36)}function Swipe(){}
Swipe.prototype.Init=function(g){this.dy=this.dx=this.y=this.x=0;this.width=g;this.multi=false};Swipe.prototype.Add=function(g,j){if(this.x==0&&this.y==0){this.x=this.dx=g;this.y=this.dy=j}else{this.dx=g;this.dy=j}};Swipe.prototype.IsNotZoomed=function(){if(window.innerWidth>this.width)return true;return Math.abs(window.innerWidth-this.width)<5};Swipe.prototype.DetectedMulti=function(){this.multi=true};Swipe.prototype.IsMulti=function(){return this.multi};
Swipe.prototype.Result=function(){return""+(this.dx-this.x)+" "+(this.dy-this.y)};Swipe.prototype.GetX=function(){return this.dx-this.x};Swipe.prototype.GetY=function(){return this.dy-this.y};Swipe.prototype.GetPoint=function(){return""+this.dx+","+this.dy};var __myLogWnd=null;function MYLOGOpen(){if(__myLogWnd==null)__myLogWnd=window.open()}
function MYLOG(g){MYLOGOpen();__myLogWnd.document.write("<hr/>");__myLogWnd.document.write(g+"<br/><br/>");for(var j in g)__myLogWnd.document.write(j+": "+g[j]+"<br/>");__myLogWnd.document.write("<hr/>")}function MYLOGSimple(g){MYLOGOpen();__myLogWnd.document.write(g+"<br/>")};upk=upk||{};
$.extend(true,upk,{player:{navBar:function(g,j,m){function q(D){var M="";var B=M=0,H=0;M=Math.floor(D/1E3%60);B=Math.floor(D/6E4%60);if((H=Math.floor(D/36E5))||C>=36E5)B=(B<10?"0":"")+B;return M=(H||C>=36E5?H+":":"")+B+":"+((M<10?"0":"")+M)}var u=this;u.bind=function(D,M){E.bind(D,M)};u.show=function(){I=28;v.scaleToWindow();E.show();v.scaleToWindow()};u.hide=function(){E.hide()};u.setOptions=function(D){$.extend(v.options,D)};u.setEndTime=function(D){if(!K){C=D;E.find(".endtime").text(q(C));E.find(".timeslider").slider("option",
"max",C);u.setCurrentTime(A)}};u.setCurrentTime=function(D){if(!K){A=D;E.find(".currenttime").text(q(A));E.find(".timeslider").slider("value",A)}};u.setVolume=function(D){G=D;E.find(".volumeslider").slider("value",G)};u.setKeepHidden=function(D){P=D;if(I>0)I=28;if(P){S=false;E.hide()}else I>0&&u.show()};u.setKeepVisible=function(D){if(S=D){P=false;u.show()}};u.toggleMute=function(D){(F=D)&&E.find(".volumeslider").slider("value",0)};var z=true;u.togglePause=function(D){(z=D)?E.find(".pauseresumebutton").removeClass("pause_butt"+
J).addClass("play_butt"+J):E.find(".pauseresumebutton").removeClass("play_butt"+J).addClass("pause_butt"+J)};var v={};v.id=g;v.parentElement=j;v.options={ios:false};$.extend(v.options,m);v.create=function(){var D=$("<div>",{"class":"NavbarWrapper"+(v.options.ios?"":" small"),html:$("<div>",{"class":"NavbarOuter",html:$("<div>",{id:v.id,"class":"NavbarMain",html:$("<div>",{"class":"prevbutton previous_butt"+J,title:R_fusion_back,click:function(){E.trigger("onprev")}}).add("<div>",{"class":"pauseresumebutton pause_butt"+
J,title:R_fusion_play_pause,click:function(){E.trigger("onpausetoggle")}}).add("<div>",{"class":"nextbutton next_butt"+J,title:R_fusion_forward,click:function(){E.trigger("onnext")}}).add("<div>",{"class":"refreshbutton refresh_butt"+J,title:R_fusion_restart,click:function(){E.trigger("onrefresh")}}).add("<div>",{"class":"slidercontainer",html:$("<div>",{"class":"sliderleft slider_leftbar"+J})}).add("<div>",{"class":"helpbutton help_butt"+J,title:R_fusion_help,click:function(){E.trigger("onhelp")}}).add("<div>",
{"class":"prefsbutton prefs_butt"+J,title:R_fusion_preferences,click:function(){E.trigger("onprefs")}}).add("<div>",{"class":"timerdisplay",html:$("<span>",{"class":"currenttime",text:q(A)}).add("<span>",{text:" / "}).add("<span>",{"class":"endtime",text:q(C)})}).add("<div>",{"class":"timerleft slider_leftbar"+J}).add("<div>",{"class":"volumebutton volume_butt"+J,html:$("<div>",{"class":"volumeslidercontainer",html:$("<div>",{"class":"volumeslider"})}),click:function(){F=!F;E.trigger({type:"onvolumechange",
volume:G,muted:F});E.find(".volumeslider").slider("value",F?0:G)}})})}).add("<div>",{"class":"timeslider"})});D.appendTo(v.parentElement);D.find(".timeslider").slider({orientation:"horizontal",range:"min",change:function(M,B){E.find(".currenttime").text(q(B.value))},start:function(){K=true},stop:function(M,B){K=false;E.trigger({type:"onsliderchange",time:B.value})},slide:function(M,B){E.find(".currenttime").text(q(B.value));E.trigger({type:"onsliderslide",time:B.value})}});if(v.options.ios){D.find(".ui-slider .ui-slider-handle").addClass("sliderpointer");
D.find(".volumebutton").remove();D.find(".helpbutton").remove()}else{D.find(".prevbutton, .pauseresumebutton, .nextbutton, .refreshbutton, .helpbutton, .prefsbutton, .volumebutton").bind({mouseenter:function(){$(this).css("background-color","#cacac9")},mouseleave:function(){$(this).css("background-color","")}});D.find(".volumeslider").slider({orientation:"horizontal",range:"min",max:100,value:100,change:function(M,B){if(!F)G=B.value;(F=B.value==0)?E.find(".volumebutton").removeClass("volumebutton"+
J).addClass("volumemuted_butt"+J):E.find(".volumebutton").addClass("volumebutton"+J).removeClass("volumemuted_butt"+J);E.trigger({type:"onvolumechange",volume:G,muted:F})},slide:function(M,B){F=B.value==0;G=B.value;F?E.find(".volumebutton").removeClass("volumebutton"+J).addClass("volumemuted_butt"+J):E.find(".volumebutton").addClass("volumebutton"+J).removeClass("volumemuted_butt"+J);E.trigger({type:"onvolumechange",volume:G,muted:F})}});D.find(".ui-slider .ui-slider-handle").addClass("slider_pointer"+
J);D.find(".volumeslider.ui-slider .ui-slider-handle").addClass("volumesliderbutton");D.find(".timeslider").appendTo(".NavbarOuter")}return D};v.scaleToWindow=function(){if(v.options.ios){var D=window.orientation==0||window.orientation==180?768/45*87:1024/45*87,M=window.innerWidth/D;E.find(".NavbarOuter").css({height:87*M,top:window.pageYOffset+window.innerHeight-87*M});E.find(".NavbarMain").css({transform:"scale("+M+")","-ms-transform":"scale("+M+")","-webkit-transform":"scale("+M+")","-o-transform":"scale("+
M+")","-moz-transform":"scale("+M+")"});E.find(".NavbarMain").css({left:window.pageXOffset-(D-window.innerWidth)/2,top:0-(87-87*M)/2,width:D});var B=0,H=0;E.find(".NavbarMain > div").not(".slidercontainer").each(function(){B+=$(this).width()});E.find(".slidercontainer").prevAll().each(function(){H+=$(this).width()});E.find(".slidercontainer").css({right:B-H});E.find(".timeslider").css({left:(H+40)*M+window.pageXOffset,top:window.pageYOffset+window.innerHeight-61*M,height:35*M,width:(D-B-80)*M});E.find(".ui-slider .ui-slider-handle").css({width:45*
M,height:45*M});E.find(".ui-slider-horizontal .ui-slider-handle").css({"margin-left":-22*M,top:-5*M})}else{D=0;if(E.find(".volumeslidercontainer").is(":visible"))D=22;E.find(".NavbarOuter").css({top:$(document).scrollTop()+$(window).height()-45-D,left:$(document).scrollLeft(),width:$(window).width(),height:45+D});E.find(".NavbarMain").css({width:"100%"});H=B=0;E.find(".NavbarMain > div").not(".slidercontainer").each(function(){B+=$(this).width()});E.find(".slidercontainer").prevAll().each(function(){H+=
$(this).width()});E.find(".slidercontainer").css({left:H,width:$(window).width()-B});E.find(".timeslider").css({top:15+D,left:H+25,width:$(window).width()-B-50})}};var A=0,C=9999999,G=100,F=false,K=false,I=0,U=false,P=false,S=false,J=v.options.ios?"":"_sm",E=v.create();u.setEndTime(C);v.scaleToWindow();setInterval(function(){v.scaleToWindow()},100);setInterval(function(){if(!P){if(I<=0&&!S)E.hide();else!K&&!S&&I--;U?E.find(".volumeslidercontainer").show():E.find(".volumeslidercontainer").hide()}},
250);E.find(".ui-slider-handle").removeAttr("href");E.bind("touchmove",function(D){D.stopPropagation();D.preventDefault()});E.find(".volumebutton").bind({mouseenter:function(){U=true;E.find(".volumeslidercontainer").show()},mouseover:function(){U=true;E.find(".volumeslidercontainer").show()}});var Z=function(){U=false};E.find(".volumebutton").bind("mouseout",Z);E.find(".volumeslidercontainer").bind({mouseenter:function(){U=true;E.find(".volumeslidercontainer").show()},mouseover:function(){U=true;
E.find(".volumeslidercontainer").show()},mousedown:function(){E.find(".volumebutton").unbind("mouseout",Z);$(document).one("mouseup",function(){U=false;E.find(".volumebutton").bind("mouseout",Z)})}});var Q,R;$(document).bind({touchmove:function(){K||E.hide()},touchend:function(){P||I<=0||u.show()},click:function(){P||u.show()}});if(!v.options.ios){$(document).bind({mousemove:function(D){if(!(Q==D.clientX&&R==D.clientY||P)){u.show();Q=D.clientX;R=D.clientY}}});E.bind({mouseenter:function(){u.setKeepVisible(true)},
mouseleave:function(){u.setKeepVisible(false)}})}if(v.options.ios){var O=false,W=false,V=function(D,M){if(!(D.originalEvent.touches.length>1)){D.preventDefault();var B=D.originalEvent.changedTouches[0],H=document.createEvent("MouseEvents");H.initMouseEvent(M,true,true,window,1,B.screenX,B.screenY,B.clientX,B.clientY,false,false,false,false,0,null);D.target.dispatchEvent(H)}};E.find(".ui-slider, .ui-slider *").bind("touchstart",function(D){if(!O){O=true;W=false;V(D,"mouseover");V(D,"mousemove");V(D,
"mousedown")}}).bind("touchmove",function(D){if(O){W=true;V(D,"mousemove")}}).bind("touchend",function(D){if(O){V(D,"mouseup");V(D,"mouseout");W||V(D,"click");O=false}})}return u}}});upk.player.navBar.prototype={};
