var PlayerJSVersion="Jan_28_2021_V1",CONTENTTYPE={NONE:"0",EPILEARN:"1",ASSESSMENT:"2",PRESENTATION:"3"},ATTACHMENTTYPE={NONE:"n",STEP:"s",URL:"u",CONTENT:"c"},POSITION={LEFT:"L",CENTER:"C",RIGHT:"R",TOP:"T",BOTTOM:"B",MIDDLE:"M"},TRACKERUSERTYPE={PORTAL:"-1",DOMAIN:"1",CUSTOM:"2"},MODECONSIDERATTEMPTPREF={AllATTEMPTS:"1",COMPLETEDATTEMPTS:"4"},CONTENTDELETIONSTATUS={CONTENT_AVAILABLE:0,CONTENT_DELETED:1,CONTENT_NOT_AVAILABLE:2},TRACKERMODESTATUS={COMPLETED:"2",NOTCOMPLETED:"1",NONE:"0"},FWPOSITION=
{STATIC:"S",TOPLEFT:"TL",TOPCENTER:"TC",TOPRIGHT:"TR",MIDDLELEFT:"ML",MIDDLECENTER:"MC",MIDDLERIGHT:"MR",BOTTOMLEFT:"BL",BOTTOMCENTER:"BC",BOTTOMRIGHT:"BR"},VCRBUTTON={AUDIO:"audio",CALLOUT:"callout",STOP:"stop",PREVIOUS:"previous",NEXT:"next",PLAY:"play"},DATATYPE={INT:1,BOOL:2,NONE:0},IMAGERESIZE={FITTOCANVAS:"1",WRTBIGIMAGE:"2",FULLIMAGE:"3"},MSGTYPE={ERROR:0,INFO:1},ANNOTATION={NONE:"none",OUTERREGION:"OCR",INNERREGION:"ICR",MOUSEPOINTER:"MP",MOUSEDRAG:"MOUSEDRAG",CALLOUT:"CO",STICKYNOTE:"SN",
EQUIVALENTCLICKREGION:"EQC",EQUIVALENTDROPREGION:"EQD",CONFUSIONREGION:"CR",ROLLOVERIMAGE:"ROI",DROPREGION:"DPR",CROPREGION:"CRP",HIGHLIGHTER:"HL",NAVIGATIONREGION:"NR",TUTORIMAGE:"TI",CALLOUTTEXTBOX:"CTB"},PLAYABLEOBJECTTYPES={AUDIO:"Audio",VIDEO:"Video",CALLOUTSTICKY:"Callout Sticky",CALLOUTSTICKYCOLLECTION:"CSN Collection",CONTROLREGION:"Control Region",TYPETEXT:"Typetext",DELAY:"Delay",CURSORMOVE:"Cursor Move",CURSORAUDIO:"Cursor Audio",KEYPRESS:"Key Press",HIGHLIGHTER:"Highlighter",NAVIGATIONREGION:"Navigation Region",
QUESTION:"Question",TUTORIMAGE:"Tutor Image",CALLOUTTEXTBOX:"Callout TextBox"},PLAYABLEOBJECTS={OCR_BLINK:"OCR_Blink",OCR_NOBLINK:"OCR_NoBlink",ICR_BLINK:"ICR_Blink",ICR_NOBLINK:"ICR_NoBlink",DR_BLINK:"DR_Blink",DR_NOBLINK:"DR_NoBlink",CURSORMOVE_ANIM:"Cur_Move",DRAG_ANIM:"Drag_Anim",CURSORAUDIO_ANIM:"Cur_Audio",CALLOUTSTICKYNOTE:"COSN",CALLOUTSTICKYCOLLECTION:"CSN_COL",ROLLOVERIMAGE:"ROI",CONTINUELAYER:"Continue",STEPAUDIO:"Step_Aud",FEEDBACKAUDIO:"Feed_Aud",DELAY:"Delay",DELAY_SV:"Delay_SV",TYPETEXT_ANIM:"Typetext",
KEYPRESS_ANIM:"Keypress",SCREENVIDEO:"Screen_Vid",HOMEVIDEO:"Home_Vid",TEXTBOX_NORMAL:"TEXTBOX_NORMAL",TEXTBOX_PASSWORD:"TEXTBOX_PASSWORD",TEXTBOX_MULTILINE:"TEXTBOX_MULTILINE",OCR_BLINK_HINT:"OCR_Blink HINT",ICR_BLINK_HINT:"ICR_Blink HINT",DR_BLINK_HINT:"DR_Blink HINT",CALLOUTSTICKYNOTE_HINT:"COSN HINT",DELAY_HINT:"Delay_Hint",HIGHLIGHTER:"High_Region",HIGHLIGHTER_HINT:"High_Region_Hint",NAVIGATIONREGION:"Navigation Region",QUESTION:"Question",TUTORIMAGE:"Tutor Image",CALLOUTTEXTBOX:"Callout TextBox"},
PLAYABLEOBJECTS2={OCR_BLINK:"2OCR_Blink",OCR_NOBLINK:"2OCR_NoBlink",ICR_BLINK:"2ICR_Blink",ICR_NOBLINK:"2ICR_NoBlink",DR_BLINK:"2DR_Blink",DR_NOBLINK:"2DR_NoBlink",CURSORMOVE_ANIM:"2Cur_Move",DRAG_ANIM:"2Drag_Anim",CURSORAUDIO_ANIM:"2Cur_Audio",CALLOUTSTICKYNOTE:"2COSN",ROLLOVERIMAGE:"2ROI",CONTINUELAYER:"2Continue",STEPAUDIO:"2Step_Aud",DELAY:"2DELAY",DELAY_SV:"2DELAY_SV",TYPETEXT_ANIM:"2Typetext",KEYPRESS_ANIM:"2Keypress",SCREENVIDEO:"2Screen_Vid",TEXTBOX_NORMAL:"2TEXTBOX_NORMAL",TEXTBOX_PASSWORD:"2TEXTBOX_PASSWORD",
TEXTBOX_MULTILINE:"2TEXTBOX_MULTILINE",OCR_BLINK_HINT:"2OCR_Blink HINT",ICR_BLINK_HINT:"2ICR_Blink HINT",DR_BLINK_HINT:"2DR_Blink HINT",CALLOUTSTICKYNOTE_HINT:"2COSN HINT",DELAY_HINT:"2DELAY HINT",HIGHLIGHTER:"2High_Region",HIGHLIGHTER_HINT:"2High_Region_Hint",NAVIGATIONREGION:"2Navigation Region",QUESTION:"2Question",TUTORIMAGE:"2Tutor Image",CALLOUTTEXTBOX:"2Callout TextBox"},PLAYSTATE={NONE:"NONE",PLAYING:"PLAYING",PAUSED:"PAUSED",STOPPED:"STOPPED",READY:"READY",PLAYENDED:"PLAYENDED",ERROR:"ERROR",
BUSY:"BUSY",NOTINITIALIZED:"NOT INITIALIZED",INITIALIZED:"INITIALIZED"},CONTROLREGION={NONE:"",RECTANGLE:"RE",ROUNDRECTANGLE:"RR",OVAL:"OV",FREESHAPE:"FS",HIGHLIGHTER:"HL"},ORIENTATION={NONE:0,NW:1,NE:2,SE:3,SW:4},SHAPES={NONE:-1,RECTANGLE:"0",OVAL:"2"},STEPTYPE={NONE:0,MOUSE:"M",TYPETEXT:"T",KEYEVENT:"K",INFOSTEP:"I",WINDOWACTIVATE:"S",VARIATION:"V",NAVIGATION:"N"},FRAMETYPE={CLUSTER:"cl",FRAME:"fr"},MEDIATYPE={NONE:0,STEPAUDIO:"SA",FEEDBACKAUDIO:"FA",SCREENVIDEO:"SV",EXTNVIDEO:"EV",ANNOTATIONAUDIO:"AA"},
FEEDBACKTYPE={NONE:"0",HINT:"1",DIFM:"2",TRY:"3"},MEDIAFORMAT={NONE:0,MP3:"MP3",WAV:"WAV",OGG:"OGG",MP4:"MP4",OGV:"OGV",WEBM:"WEBM"},EVENTTYPE={NONE:"",CLICK:"CL",DOUBLECLICK:"DC",DRAG:"DG",TYPETEXT:"TT",KEYPRESS:"KP",EQCLICK:"EQCL",EQDOUBLECLICK:"EQDC",EQDRAG:"EQDG",EQKEYPRESS:"EQKP"},MOUSEBUTTON={NONE:"",LEFT:"L",MIDDLE:"M",RIGHT:"R"},CURSORBUTTON={NONE:0,DOWN:"D",UP:"U",HOVER:"H"},CURSORDIRECTION={NONE:0,UP:"UP",DOWN:"DOWN",LEFT:"LEFT",RIGHT:"RIGHT"},AXIS={NONE:0,X:"X",Y:"Y"},MODETYPE={NONE:"0",
SHOW:"1",GUIDE:"2",TEST:"3",DOC:"4"},TASKTYPE={START:"S",PROCESS:"P",QUESTION:"Q",MANUAL:"M",END:"E"},MIQTYPE={NONE:"NONE",MANUAL:"Manual",QUESTION:"Question",INFOSTEP:"Infostep",MODEINDICATOR:"ModeIndicator",ASSESSMENT:"Assessment",WORKFLOW:"Workflow",VARIATION:"Variation"},MITYPE={SMSTART:"sm_start",SMEND:"sm_end",GMSTART:"gm_start",GMEND:"gm_end",TMSTART:"tm_start",TMEND:"tm_end"},MILOCATION={START:"start",END:"end"},INFOSTEPTYPE={SCENARIO:"ist_1",INFO:"ist_2",NOTE:"ist_3",PREREQUISITE:"ist_4"},
AUDIOPLAYBACKMODE={BEFORE:"BEFORE",AFTER:"AFTER",DURING:"DURING"},BLINKMODE={NONE:"NONE",BEFOREPLAY:"BEFOREPLAY",AFTERPLAY:"AFTERPLAY"},BUTTONSTATE={ENABLED:0,DISABLED:1,CLICKED:2,NORMAL:3,SELECTED:4,HIDDEN:5},ZINDEX={CANVAS:98,TEMPLATE:99,SCREENVIDEO:101,CONTROLREGION:100,MOUSERECEIVER:300,CALLOUT:301,NAVREGION:302,FEEDBAKDIALOG:303,TEXTBOXRECEIVER:310,ROLLOVERIMAGE:315,ROLLCALLOUT:320,VALIDATEBUTTON:350,CUECARD:500,POPUP:510,RESULTICON:550,CURSOR:551,MODEINDICATOR:601,TOOLTIP:602,NINTWORKFLOW:100,
INTWORKFLOW:101,PIDIALOG:200},TRACKLOCATION={NONE:"NONE",START:"START",BETWEEN:"BETWEEN",END:"END"},TYPETEXT_VALIDATION_RULE={BUTTON:"0",CHARACTER:"1",TIMER:"2",NEXTACTION:"3"},TEXTBOX_TYPE={NORMAL:"1",PASSWORD:"2",MULTILINE:"3"},RESULTTYPE={WRONG:"wrong",CORRECT:"correct",WRONGFIRSTHALF:"wrong first half",WRONGSECONDHALF:"wrong 2nd half"},READYSTATE={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},METHOD={GET:"GET",POST:"POST"},HTTPSTATUS={OK:200,CREATED:201,UNAUTHORIZED:401},ECMSERRORS={NONE:0,
FAILED_TO_CONNECT:1,SERVER_SIDE_ERROR:2,FAULTY_RETURN_DATA:3,CONTENT_DELETD:4,CONTENT_NOT_AVAILABLE:5,ACCESS_DENIED:6,FAILED_TO_PROCESS_RETURNED_DATA:7},SCORMERRORS={NONE:200,CREATED:201},EPILEANVIEW={HOME:"home",SIM:"sim"},COMPLETEPREF={ANYSTEP:1,LASTSTEP:2,ALLSTEP:3,LASTSCORESTEP:4},CCBEHAVIOURTM={SHOWALWAYS:0,SHOWONCOMPLETE:1,SHOWNEVER:2,SHOWCCONLY:3},CMDVALUES={ASSESSMESNT:"EPI"},SCORMERRORCODES={OPENERNOTAVAILABLE:-2146823281,APINULL:"api is null"},STEPSTATUS={NOTATTEMPTED:"-1",INCORRECT:"0",
CORRECT:"1"},HOMESUMMARYCALLER={PSIM:"psim",SCORM:"scorm",TRACKER:"tracker"},PLAYMODE={AUTOPLAY:"autoplay",EVENT:"event"},TESTMODEAUDIOOPTION={BEFORE:"1",AFTER:"2"},VALIDATEPOSITION={TOP:"1",BOTTOM:"2",RIGHT:"3"},NAVSTEPTYPE={NONE:"-1",STOP:"0",NAVIGATE:"1"},SURVEYQUESTIONTYPE={NONE:"0",SINGLE:"1",MULTIPLE:"2",RATE:"3"},QUESTIONTYPE={NONE:"0",SINGLE:"1",MULTIPLE:"2",BUTTON:"3"},g_ContinueButton=null,g_TypetextAudioFile="",g_ClickAudioFile="",g_DblClickAudioFile="",g_ChkAudioFile="",g_objGS=null,g_objTR=
null,g_objIPL=null,g_objML=null,g_objAudio=null,g_objRIL=null,g_objTrackerData=null,g_objTracker=null,g_objScorm=null,g_Completed=false,g_CloseWindow=false,g_ErrorFlag=false,g_AdjX=0,g_AdjY=0,g_objEpnPlayer,g_objCCMover,g_objEHS=null,g_CurrentStepType,LauncherErrors=[];clsCord=function(d,b){this.x=parseFloat(d);this.y=parseFloat(b)};
clsRect=function(d){this.Height=this.Width=this.Top=this.Left=0;if(d!=""&&d!=void 0)d=d.split("|"),this.Left=parseFloat(d[0]),this.Top=parseFloat(d[1]),this.Width=parseFloat(d[2]),this.Height=parseFloat(d[3])};function g_GetAtrValue(d,b,c){var e;try{switch(c){case DATATYPE.INT:e=parseFloat(d.getAttribute(b));isNaN(e)&&(e=0);break;case DATATYPE.BOOL:e=d.getAttribute(b).ToBoolean();break;default:e=d.getAttribute(b)}e==void 0&&(e="")}catch(a){}return e}
Date.prototype.toHHMMSS=function(){var d;try{h=(h=this.getHours())<10?"0"+h:h,m=(m=this.getMinutes())<10?"0"+m:m,s=(s=this.getSeconds())<10?"0"+s:s,d=h+":"+m+":"+s}catch(b){d=this}return d};String.prototype.ToBoolean=function(){return/^true$/i.test(this)||/^TRUE$/i.test(this)||/^1$/i.test(this)||/^yes$/i.test(this)||/^YES$/i.test(this)};String.prototype.HTMLDecode=function(){var d;d=this.replace(/&gt;/g,">");d=d.replace(/&lt;/g,"<");d=d.replace(/&quot;/g,"'");return d=d.replace(/&amp;/g,"&")};
String.prototype.Trim=function(){return this.replace(/^\s+|\s+$/g,"")};String.prototype.LTrim=function(){return this.replace(/^\s+/,"")};String.prototype.RTrim=function(){return this.replace(/\s+$/,"")};g_MergeArray=function(d,b){try{for(var c in b)d.push(b[c])}catch(e){}};
function g_GetSuitableMediaForCurrentBrowser(d,b){var c=null;try{if(b.MediaFiles.length==0)return c;for(var e in b.MediaFiles)if(c=b.MediaFiles[e],c.MediaType==d){if(c.MediaFormat!="")if(CanCurrentBrowserPlayThisMedia(c.MediaFormat)==true)break;else c=null}else c=null}catch(a){g_WriteToLog("Common","g_GetSuitableMediaForCurrentBrowser","",a,LOG.EXCEPTION)}return c}
function CanCurrentBrowserPlayThisMedia(d){var b=false;try{var c=uid_json.settings;if(BROWSER.LEGACY==true)for(var e in c.media.avformat_legacy)if(c.media.avformat_legacy[e]==d){b=true;break}if(BROWSER.IE==true&&BROWSER.LEGACY==false)for(e in c.media.avformat_ie){if(c.media.avformat_ie[e]==d){b=true;break}}else if(BROWSER.FIREFOX==true)for(e in c.media.avformat_firefox){if(c.media.avformat_firefox[e]==d){b=true;break}}else if(BROWSER.OPERA==true)for(e in c.media.avformat_opera){if(c.media.avformat_opera[e]==
d){b=true;break}}else if(BROWSER.CHROME==true)for(e in c.media.avformat_chrome){if(c.media.avformat_chrome[e]==d){b=true;break}}else if(BROWSER.SAFARI==true)if(g_objGS.General.IsIPadBrowser==true)for(e in c.media.avformat_safariipad){if(c.media.avformat_safariipad[e]==d){b=true;break}}else for(e in c.media.avformat_safari)if(c.media.avformat_safari[e]==d){b=true;break}}catch(a){g_WriteToLog("Common","CanCurrentBrowserPlayThisMedia","",a,LOG.EXCEPTION)}return b}
function g_SetBasicPlaybackAudio(){var d=false;try{BROWSER.IE==true||BROWSER.SAFARI==true?(g_TypetextAudioFile=g_StaticURL+g_objGS.BasicAudioFiles.type_mp3,g_ClickAudioFile=g_StaticURL+g_objGS.BasicAudioFiles.click_mp3,g_DblClickAudioFile=g_StaticURL+g_objGS.BasicAudioFiles.dblclick_mp3,g_ChkAudioFile=g_StaticURL+g_objGS.BasicAudioFiles.chk_mp3):(g_TypetextAudioFile=g_StaticURL+g_objGS.BasicAudioFiles.type_wav,g_ClickAudioFile=g_StaticURL+g_objGS.BasicAudioFiles.click_wav,g_DblClickAudioFile=g_StaticURL+
g_objGS.BasicAudioFiles.dblclick_wav,g_ChkAudioFile=g_StaticURL+g_objGS.BasicAudioFiles.chk_wav),d=true}catch(b){g_WriteToLog("Common","g_SetBasicPlaybackAudio","",b,LOG.EXCEPTION)}return d}function g_Decrypt(d){return d}String.prototype.toTitleCase=function(){return this.toLowerCase().replace(/(^[a-z]| [a-z])/g,function(d){return d.toUpperCase()})};if(typeof String.prototype.trim!=="function")String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};
function g_QuitEpilearn(){var d=true;try{g_Completed=true,window.returnValue="",g_CloseWindow==true&&g_HideAndClose()}catch(b){d=false,g_WriteToLog("Common","g_QuitEpilearn","",b,LOG.EXCEPTION),g_CriticalError()}return d}
function g_HideAndClose(){var d=true;try{g_objEpnPlayer.Stop();g_objTR.Hide();var b=true;switch(g_CommandArgs[CMDARGS.LAUNCHSOURCE]){case LAUNCHSOURCETYPE.PRESENTATIONEDITOR:b=false;break;case LAUNCHSOURCETYPE.PRESENTATIONOUTPUT:b=false}b&&window.close()}catch(c){d=false,g_WriteToLog("Common","g_HideAndClose","",c,LOG.EXCEPTION),g_CriticalError()}return d}
function g_CreateCookie(d,b,c){var e=true;try{var a="";if(c){var f=new Date;f.setTime(f.getTime()+c*864E5);a="; expires="+f.toGMTString()}b=b.replace("\\","\\\\");document.cookie=d+"="+b+a+"; path=/"}catch(n){e=false,g_WriteToLog("Common","g_CreateCookie","",n,LOG.EXCEPTION),g_CriticalError()}return e}
function g_ReadCookie(d){try{d+="=";for(var b=document.cookie.split(";"),c=0;c<b.length;c++){for(var e=b[c];e.charAt(0)==" ";)e=e.substring(1,e.length);if(e.indexOf(d)==0)return e.substring(d.length,e.length)}return null}catch(a){g_WriteToLog("Common","g_ReadCookie","",a,LOG.EXCEPTION)}}function g_EraseCookie(d){createCookie(d,"",-1)}
function g_GetCSSForTD(d){var b="";try{d.wd!=void 0&&(b+="width: "+d.wd+";"),d.ht!=void 0&&(b+="height: "+d.ht+";"),d.pd!=void 0&&(b+="padding: "+d.pd+";"),d.pdr!=void 0&&(b+="padding-right: "+d.pdr+";"),d.pdl!=void 0&&(b+="padding-left: "+d.pdl+";"),d.pdb!=void 0&&(b+="padding-bottom: "+d.pdb+";"),d.pdt!=void 0&&(b+="padding-top: "+d.pdt+";"),d.ff!=void 0&&(b+="font-family: "+d.ff+";"),d.fs!=void 0&&(b+="font-size: "+d.fs+";"),d.fw!=void 0&&(b+="font-weight: "+d.fw+";"),d.fc!=void 0&&(b+="color: "+
d.fc+";"),d.ta!=void 0&&(b+="text-align: "+d.ta+";"),d.va!=void 0&&(b+="vertical-align: "+d.va+";"),d.bgc!=void 0&&(b+="background-color: "+d.bgc+";"),d.bw!=void 0&&(b+="border-width: "+d.bw+";"),d.bbs!=void 0&&(b+="border-bottom-style: "+d.bbs+";"),d.bc!=void 0&&(b+="border-color: "+d.bc+";"),d.wb!=void 0&&(b+="word-break: "+d.wb+";"),d.cr!=void 0&&(b+="cursor: "+d.cr+";"),d.bs!=void 0&&(b+="border-style: "+d.bs+";"),d.dc!=void 0&&(b+="text-decoration: "+d.dc+";"),d.mr!=void 0&&(b+="margin: "+d.mr+
";"),d.br!=void 0&&(b+="border-radius: "+d.br+";"),d.mrl!=void 0&&(b+="margin-left: "+d.mrl+";"),d.mrt!=void 0&&(b+="margin-top: "+d.mrt+";"),d.mrr!=void 0&&(b+="margin-right: "+d.mrr+";"),d.mrb!=void 0&&(b+="margin-bottom: "+d.mrb+";"),d.web_us!=void 0&&(b+="-webkit-user-select: "+d.web_us+";"),d.moz_us!=void 0&&(b+="-moz-user-select: "+d.moz_us+";"),d.ms_us!=void 0&&(b+="-ms-user-select: "+d.ms_us+";"),d.us!=void 0&&(b+="user-select: "+d.us+";"),d.tp!=void 0&&(b+="top: "+d.tp+";"),d.lf!=void 0&&
(b+="left: "+d.lf+";"),d.ct!=void 0&&(b+=d.ct==""?'content: "";':"content: "+d.ct+";"),d.web_tf!=void 0&&(b+="-webkit-transform: "+d.web_tf+";"),d.ms_tf!=void 0&&(b+="-ms-transform: "+d.ms_tf+";"),d.tf!=void 0&&(b+="transform: "+d.tf+";"),d.ds!=void 0&&(b+="display: "+d.ds+";"),d.ps!=void 0&&(b+="position: "+d.ps+";"),d.op!=void 0&&(b+="opacity: "+d.op+";"),d.bxs!=void 0&&(b+="box-shadow: "+d.bxs+";")}catch(c){b="",g_WriteToLog("Common","g_GetCSSForTD","",c,LOG.EXCEPTION)}return b}
function g_HtmlEncode(d){sRetData=d;try{var b;b=d.replace(/&/g,"&amp;");b=b.replace(/>/g,"&gt;");b=b.replace(/</g,"&lt;");b=b.replace(/"/g,"&quot;");sRetData=b=b.replace(/\'/g,"&#39;")}catch(c){}return sRetData}String.prototype.replaceAll=function(d,b){return this.replace(RegExp(d,"g"),b)};
window.onbeforeunload=function(){try{if(g_Completed==false){if((g_objTracker!=void 0||g_objScorm!=void 0)&&(g_objTracker!=null||g_objScorm!=null))if(g_objTracker.Enabled==true||g_objScorm.Enabled==true)if(g_objTrackerData.Modes.length>0)if(g_objScorm.Enabled==true)if(g_objScorm.Status==SCORMSTATUS.BROWSED||g_objScorm.Status==SCORMSTATUS.REVIEWED){if(g_objEpnPlayer.Finalize()==false)throw"Error @ g_objEpnPlayer.Initialize";}else if(g_objTrackerData.Modes.length==1&&g_objTrackerData.Modes[0].Tasks[0].Process[0].Steps.length==
1){if(g_objEpnPlayer.Finalize()==false)throw"Error @ g_objEpnPlayer.Finalize";}else{if(g_objScorm.Handler.PreFinalize()==false)throw"Error @ g_objScorm.Handler.PreFinalize";return messages_json.general.messages.stay_on_page.text}else return messages_json.general.messages.stay_on_page.text;else if(g_objEpnPlayer.Finalize()==false)throw"Error @ g_objEpnPlayer.Initialize";window.returnValue=""}}catch(d){g_WriteToLog("PlayerHtm","onbeforeunload",d,"",LOG.EXCEPTION),g_CriticalError()}};
window.onunload=function(){};window.oncontextmenu=function(){return false};window.document.oncontextmenu=function(){return false};
function LoadEpiLearn(){try{g_WriteToLog("PlayerHtm","LoadEpiLearn","Player Version",PlayerJSVersion,LOG.SPECIAL),g_objEpnPlayer=new clsEpilearnPlayer,g_objEpnPlayer.onInitComplete=g_objEpnPlayer_onInitComplete,g_objEpnPlayer.onLoadComplete=g_objEpnPlayer_onLoadComplete,setTimeout(InitializeEpiLearn,100)}catch(d){g_WriteToLog("PlayerHtm","LoadEpiLearn",d,"",LOG.EXCEPTION),g_CriticalError()}}
function InitializeEpiLearn(){try{if(g_objEpnPlayer.Initialize()==false)throw"Error @ g_objEpnPlayer.Initialize";}catch(d){g_WriteToLog("PlayerHtm","InitializeEpiLearn",d,"",LOG.EXCEPTION),g_CriticalError()}}
function g_objEpnPlayer_onInitComplete(d){try{if(d==false)throw"g_objEpnPlayer_onInitComplete bSuccess=false";if(g_objTracker.Engine.EpiLearn_Started()==false)throw"Error @ g_objTracker.EpiLearn_Started";if(g_objEpnPlayer.Load()==false)throw"Error @ g_objEpnPlayer.Load";}catch(b){g_WriteToLog("PlayerHtm","g_objEpnPlayer_onInitComplete",b,"",LOG.EXCEPTION),g_CriticalError()}}
function g_objEpnPlayer_onLoadComplete(d){try{if(d==false)throw"g_objEpnPlayer_onLoadComplete bSuccess=false";g_objPB.Hide();g_objGS.General.PlayState=PLAYSTATE.READY;document.body.style.cursor="default";g_objTR.SetBusyFlag(false);if(g_objEpnPlayer.Play()==false)throw"Error @ g_objEpnPlayer.Load";}catch(b){g_WriteToLog("PlayerHtm","g_objEpnPlayer_onLoadComplete",b,"",LOG.EXCEPTION),g_CriticalError()}}
function clsEFXData(){this.Tasks={};this.BasicImages={};this.EndResLoc=this.StartResLoc="";this.BigHeight=this.BigWidth=0;this.VPathMode="";this.VPathOptions=[];this.AudioFile=""}
function clsProcessTaskData(){this.Steps=[];this.TotalDisplayableSteps=this.TotalTrackableSteps=0;this.Type=TASKTYPE.PROCESS;this.ResLoc=this.PrevResLoc=this.NextResLoc="";this.BPT=0;this.CaptionText="";this.BigHeight=this.BigWidth=0;this.Rendered=false;this.Weightage=0;this.GetStepObject=function(d){var b=null;try{this.Steps[d-1]!=void 0&&(b=this.Steps[d-1])}catch(c){ME.Log("GetStepObject",LOG.EXCEPTION,"",c)}return b};this.TotalCountableStepCount=0}
function clsManualTaskData(){clsStatusBarData.call(this);this.Type=TASKTYPE.MANUAL;this.Caption=this.ContentData=this.CaptionText=this.ResLoc=this.PrevResLoc=this.NextResLoc="";this.Rendered=false}function clsQuestionTaskData(){clsStatusBarData.call(this);this.Type=TASKTYPE.QUESTION;this.CaptionText=this.DescriptionText=this.ResLoc=this.PrevResLoc=this.NextResLoc="";this.QuestionInfo={};this.Caption=this.DefaultChoiceText="";this.Rendered=false}
function clsStepData(){this.SlNo=this.StepIndex=0;this.DiffImages=[];this.Type=STEPTYPE.NONE;this.TPSID="";this.StepTransitionDelay=-1;this.AnnotationControls=[];this.MediaFiles=[];this.EventControls={};this.EventValidators={};this.SubStepCount=0;this.IsSubStep=false;this.Caption="";this.NotesControl={};this.GroupStepParentIndex=0;this.InfoStepCaptionText=this.InfoStepDescription="";this.StatusBarData=null;this.InfoStepThemeID="";this.InfoStepContinue=false;this.InfoStepTransition=0;this.InfoAsm=
false;this.InMode={};this.InfoWorkFlowShapes={};this.Weightage=0;this.PCaption="";this.VariationOptions={};this.VariationAutoPlayTM=this.VariationAutoPlayGM=this.VariationAutoPlaySM=false;this.Jump="";this.StopOrNav=NAVSTEPTYPE.NONE;this.Question=null;this.AudioTrackFile="";this.AudioTrackEnd=this.AudioTrackStart=-1}function clsStatusBarData(){this.Duration=0;this.MoveOnTimer=this.ShowContinueButton=false}
function clsConfusionRegionData(){this.Type=ANNOTATION.CONFUSIONREGION;this.Height=this.Width=this.Top=this.Left=0;this.Text=""}function clsControlRegionData(){this.Thickness=this.Height=this.Width=this.Top=this.Left=0;this.Color="";this.Type=ANNOTATION.NONE;this.Cords="";this.Shape=CONTROLREGION.NONE}
function clsNavigationRegionData(){this.Id="";this.Thickness=this.Height=this.Width=this.Top=this.Left=0;this.Color="";this.Type=ANNOTATION.NAVIGATIONREGION;this.Cords="";this.Shape=CONTROLREGION.NONE;this.Jump=this.End=this.Start=this.DisabledColor=this.Gradient=this.BGColor=this.BorderColor=this.Text=""}function clsHighlightRegionData(){this.Thickness=this.Height=this.Width=this.Top=this.Left=0;this.Color="";this.Type=ANNOTATION.HIGHLIGHTER}
function clsDiffImageData(){this.ID="";this.ImagePath=new String("");this.ImageHeight=this.ImageWidth=this.ImageTop=this.ImageLeft=0;this.IsFullImage=false}function clsCalloutStickyData(){this.Type=ANNOTATION.NONE;this.Height=this.Width=this.Top=this.Left=0;this.Text="";this.Orientation=ORIENTATION.NONE;this.Shape=SHAPES.NONE;this.ImageKey="";this.QSD=this.Seq=this.AutoAnnotation=this.RollOverImageIndex=this.Interval=this.Duration=0;this.MediaFiles=[];this.RefId=this.Id="";this.Region=null}
function clsRolloverData(){this.Type=ANNOTATION.NONE;this.StickyNoteData=null;this.Height=this.Width=this.Top=this.Left=0;this.ImageKey="";this.Duration=this.RollOverImageIndex=0}function clsMouseData(){this.Type=ANNOTATION.NONE;this.CursorKeyHover=this.CursorKeyDown=this.CursorKeyNormal="";this.MouseUpY=this.MouseUpX=this.MouseDownY=this.MouseDownX=0;this.EventType=EVENTTYPE.NONE}
function clsTypeTextData(){this.Type=EVENTTYPE.NONE;this.Text="";this.IsPassword=this.UseInputBox=false;this.BgColor=this.ForeColor="";this.Font={Name:"",Size:1,Bold:false,Italic:false,Underline:false,Strike:0};this.Rule=TYPETEXT_VALIDATION_RULE.BUTTON;this.Characters=this.Timer=0;this.RegexVal="";this.RuleID=-1}function clsKeyEventData(){this.Type=EVENTTYPE.NONE;this.KeyModifier=this.KeyValue=""}
function clsMouseEventData(){this.Type=EVENTTYPE.NONE;this.KeyModifier=this.MouseModifier=this.MouseButton=""}function clsMediaData(){this.MediaType=MEDIATYPE.NONE;this.MediaFormat=MEDIAFORMAT.NONE;this.Src="";this.Height=this.Width=0;this.bApplyResizeFactor=true}
function clsEventData(){this.Event=EVENTTYPE.NONE;this.Shift=this.Alt=this.Ctrl=false;this.Y2=this.X2=this.Y1=this.X1=this.Y=this.X=this.KeyCode=0;this.MouseButton=MOUSEBUTTON.NONE;this.Text="";this.MouseModifier=MOUSEBUTTON.NONE;this.CharCode=-1}function clsEventValidationData(){clsEventData.call(this);this.Shape=CONTROLREGION.NONE;this.DY2=this.DX2=this.DY1=this.DX1=0;this.Cords="";this.BaseEvent=EVENTTYPE.NONE;this.RegexVal="";this.RuleID=-1}
function clsQuestionData(){this.Text="";this.Type=QUESTIONTYPE.NONE;this.Category=this.Cord="";this.Choices=[];this.JumpWrong=this.JumpCorrect=this.CorrectAnswer=this.TextWrong=this.TextCorrect=""}function clsChoiceData(){this.Value=this.ID=this.Text="";this.Control=null}function clsTutorImageData(){this.Height=this.Width=this.Top=this.Left=0;this.Src=this.Cords="";this.Duration=this.Seq=0;this.Type=ANNOTATION.TUTORIMAGE}
function clsCalloutTextboxData(){this.Height=this.Width=this.Top=this.Left=0;this.Src=this.Cords="";this.Duration=this.Seq=0;this.Type=ANNOTATION.CALLOUTTEXTBOX;this.Text="";this.Thickness=0;this.BGColor=this.Color="";this.Transparent=0}clsEFXDataCC=function(){this.Name="epiance software";this.Tasks=[];this.VPathMode=this.TMDescription="";this.VPathOptions=[];this.AllVariationOptions=[]};
clsTaskDataCC=function(d){this.TaskType=d;this.ResLoc="";this.NextResLocs=null;this.Caption="";this.Steps=[];this.Choices=null;this.ProcessTestData=this.TMDescription="";this.Rendered=false};clsStepDataCC=function(){this.StepIndex=this.TPSID=0;this.StepType=this.Caption=this.FrameType="";this.IsEVAttached=this.IsSVAttached=this.IsSAAttached=false;this.Steps=[];this.InMode={};this.SlNoTM=this.SlNoGM=this.SlNoSM="";this.VariationOptions={};this.Visible=true};
function clsDataReader(){function d(a){var f=true;try{if(a==false)return b();efx_json==void 0&&D.Log("Script_Loaded",LOG.ERROR,"data.js might have some errors","");a=true;try{var n="";r=new clsEFXData;var g=0;if(g_CommandArgs[CMDARGS.VSPA]!=void 0){r.VPathMode=g_CommandArgs[CMDARGS.VSPA];for(var d in g_CommandArgs[CMDARGS.VARIATIONPATHS]){var k={};k.TPSID=g_CommandArgs[CMDARGS.VARIATIONPATHS][d].TPSID;k.Value=g_CommandArgs[CMDARGS.VARIATIONPATHS][d].Value.trim();r.VPathOptions.push(k)}}else r.VPathMode=
"",uid_json.settings.mode_show.variationpath=="1"&&(r.VPathMode+="SM"),uid_json.settings.mode_guide.variationpath=="1"&&(r.VPathMode+="GM"),uid_json.settings.mode_test.variationpath=="1"&&(r.VPathMode+="TM");if(r.VPathMode.indexOf("SM")!=-1)g_objGS.General.VPathSetForSM=1;if(r.VPathMode.indexOf("GM")!=-1)g_objGS.General.VPathSetForGM=1;if(r.VPathMode.indexOf("TM")!=-1)g_objGS.General.VPathSetForTM=1;for(g=0;g<efx_json.tsk.length;g++)switch(n=efx_json.tsk[g].id,n.toUpperCase()){case TASKTYPE.START:r.StartResLoc=
efx_json.tsk[g].nrl;break;case TASKTYPE.PROCESS:var o=efx_json.tsk[g];d=true;try{var p=new clsProcessTaskData;p.ResLoc=o.rl;L=p.ResLoc;p.NextResLoc=o.nrl;p.BPT=o.t;var q=o.wh.split("|");p.BigWidth=parseFloat(q[0]);p.BigHeight=parseFloat(q[1]);if(p.BigWidth>r.BigWidth)r.BigWidth=p.BigWidth;if(p.BigHeight>r.BigHeight)r.BigHeight=p.BigHeight;g_objGS.General.GlobalAudio=false;if(o.md!=void 0&&uid_json.settings.general.singleaudio=="1"){g_objGS.General.GAFiles=[];for(x in o.md){var u="data/"+L+"/media/"+
o.md[0].src;D.Log("ConstructProcessTask",LOG.TRACE,"Global Audio",u);g_objGS.General.GAFiles.push(u)}g_objGS.General.GlobalAudio=true}J=D.ContentPath+g_URLPathSeperator+p.ResLoc+g_URLPathSeperator+"media"+g_URLPathSeperator;H=C=1;for(i in o)if((i.indexOf("cl_")==0||i.indexOf("s_")==0)&&e(p,o[i],false)==false)throw"Failed To Add Step to Process";var k=p,A=true;try{var B=void 0;for(B in K){var E=false,v;for(v in k.Steps)if(k.Steps[v].TPSID==K[B].Start&&(E=true),E&&(r.VPathMode.indexOf("SM")!=-1&&(k.Steps[v].InMode[MODETYPE.SHOW]=
false),r.VPathMode.indexOf("GM")!=-1&&(k.Steps[v].InMode[MODETYPE.GUIDE]=false),r.VPathMode.indexOf("TM")!=-1&&(k.Steps[v].InMode[MODETYPE.TEST]=false),k.Steps[v].TPSID==K[B].End))break}}catch(G){A=false,D.Log("UpdateInModeForNonDefaultOption",LOG.EXCEPTION,"",G)}if(A==false)throw"Error @ UpdateInModeForNonDefaultOption";k=p;A=true;try{for(var B=k.Weightage=0,N=k.Steps.length,B=E=0;B<N;B++){E=0;if(k.Steps[B].InMode[MODETYPE.TEST]==true&&(k.Steps[B].Type!=STEPTYPE.INFOSTEP&&k.Steps[B].Type!=STEPTYPE.WINDOWACTIVATE&&
k.Steps[B].Type!=STEPTYPE.VARIATION&&k.Steps[B].Type!=STEPTYPE.NAVIGATION||k.Steps[B].Type==STEPTYPE.WINDOWACTIVATE&&k.Steps[B].Question!=null))k.Steps[B].IsSubStep==true?k.Steps[B+1]!=void 0?k.Steps[B+1].IsSubStep==false&&(E=1):E=1:k.Steps[B].SubStepCount==0&&(E=1);E!=0&&(E=Number(k.Steps[B].Weightage));k.Steps[B].Weightage=E;k.Weightage+=E}}catch(ba){A=false,D.Log("UpdateProcessWeightage",LOG.EXCEPTION,"",ba)}if(A==false)throw"Error @ UpdateProcessWeightage";p.TotalSteps=p.Steps.length;r.Tasks[p.ResLoc]=
p}catch(ca){d=false,D.Log("ConstructProcessTask",LOG.EXCEPTION,"ResLoc="+L,ca)}if(d==false)throw"Errro @ ConstructProcessTask";break;case TASKTYPE.QUESTION:var aa=efx_json.tsk[g];d=true;try{var V=new clsQuestionTaskData;V.ResLoc=aa.rl;V.NextResLoc=aa.nrl;var ea=aa.trpr.split("|");V.ShowContinueButton=ea[0].ToBoolean();if(parseFloat(ea[1])!=-1)V.MoveOnTimer=true;if(V.MoveOnTimer==true&&(V.Duration=parseFloat(ea[1])*1E3,V.Duration<=0))V.Duration=1E3;if(aa.ch==void 0)throw"Question choice missing";var ga=
aa.ch,k=void 0,A="",B=1;if(ga.length==0)throw"Question choice missing";for(k=0;k<ga.length;k++){A=ga[k].nrl;V.QuestionInfo[B]={ID:A,Text:g_Decrypt(ga[k].ch_data)};if(V.NextResLoc==A)V.DefaultChoiceText=k+1;B++}V.CaptionText=aa.tskcap_data;V.Caption=V.CaptionText;V.DescriptionText=g_Decrypt(aa.qtxt_data);r.Tasks[V.ResLoc]=V}catch(ra){d=false,D.Log("ConstructQuestionTask",LOG.EXCEPTION,"",ra)}if(d==false)throw"Error @ ConstructQuestionTask";break;case TASKTYPE.MANUAL:var ka=efx_json.tsk[g];d=true;try{var na=
new clsManualTaskData;na.ResLoc=ka.rl;na.NextResLoc=ka.nrl;var ma=ka.trpr.split("|");na.ShowContinueButton=ma[0].ToBoolean();if(parseFloat(ma[1])!=-1)na.MoveOnTimer=true;if(na.MoveOnTimer==true&&(na.Duration=parseFloat(ma[1])*1E3,na.Duration<=0))na.Duration=1E3;na.ContentData=g_Decrypt(ka.dstxt_data);na.CaptionText=g_Decrypt(ka.tskcap_data);na.Caption=na.CaptionText;r.Tasks[na.ResLoc]=na}catch(oa){d=false,D.Log("ConstructManualTask",LOG.EXCEPTION,"",oa)}if(d==false)throw"Error @ ConstructManualTask";
break;case TASKTYPE.END:r.EndResLoc=efx_json.tsk[g].rl}if(M==true)throw"Drop Region not available. Corrupted EFX?";o=true;try{for(id in u=q=p="",r.Tasks)if(p=r.Tasks[id].ResLoc,q=r.Tasks[id].NextResLoc,r.Tasks[id].Type==TASKTYPE.QUESTION)for(idq in r.Tasks[id].QuestionInfo){if(u=r.Tasks[id].QuestionInfo[idq].ID,r.Tasks[u]!=void 0)r.Tasks[u].PrevResLoc=p}else if(r.Tasks[q]!=void 0)r.Tasks[q].PrevResLoc=p}catch(Q){o=false,D.Log("UpdatePrevResLocs",LOG.EXCEPTION,"",Q)}if(o==false)throw"Error @ UpdatePrevResLocs";
var W=new clsCuecardDataBuilder;D.CuecardData=W.Create(r);if(D.CuecardData==null)throw"clsCuecardDataBuilder.Create returned a null";D.CuecardData.Name=g_objGS.General.DefaultEFX;if(I==true&&uid_json.settings.mousebutton.consider==true&&c("n",g_objGS.MouseButtonFiles.nothing)==false)throw"Error @ AddToBasicImageData";g_objGS.General.SingleStep=false;W=0;for(id in r.Tasks)if(r.Tasks[id].Type==TASKTYPE.PROCESS){for(i in r.Tasks[id].Steps)if(r.Tasks[id].Steps[i].IsSubStep==false&&W++,W>1)break;if(W>
1)break}if(W==1)g_objGS.General.SingleStep=true}catch(da){a=false,D.Log("Read",LOG.EXCEPTION,"",da)}if(a==false)throw"Error @ Read()";}catch(sa){f=false,D.Log("Script_Loaded",LOG.EXCEPTION,"",sa)}D.onInitComplete(f)}function b(){var a=true;try{this.onload=null,D.Log("Script_LoadError",LOG.EXCEPTION,"data.js not loaded >",""),a=false}catch(c){a=false,D.Log("Script_LoadError",LOG.EXCEPTION,"",c)}D.onInitComplete(a)}function c(a,c){var b=true;try{r.BasicImages[a]==null&&(D.Log("AddToBasicImageData",
LOG.TRACE,"ImageKey > "+a,c),r.BasicImages[a]=c.replace("\\","/"))}catch(e){b=false,D.Log("AddToBasicImageData",LOG.EXCEPTION,"ImagePath="+c,e)}return b}function e(c,b,d){var o=true;try{if(b.sy!=void 0){var p;p=new clsStepData;var q;q=b.im;p.Type=b.sy.toUpperCase();if(p.Type==STEPTYPE.NONE)throw"Invalid Step Type";N=b.id;p.TPSID=N;if(b.fa!=void 0){var u=b.fa.split("|");p.AudioTrackFile="data/"+L+"/media/"+u[0];p.AudioTrackStart=Math.abs(Number(u[1]));p.AudioTrackEnd=Math.abs(Number(u[2]))}if(b.sw!=
void 0)p.Weightage=Number(b.sw);if(b.jm!=void 0)p.Jump=b.jm;if(b.jm!=void 0)p.Jump=b.jm;if(p.Type==STEPTYPE.NAVIGATION&&b.son!=void 0)p.StopOrNav=b.son;u=null;if(b.text!=void 0){for(I in b.text)if(b.text[I].id==g_objGS.General.Language){u=b.text[I];break}u==null&&(D.Log("ConstructProcessTask",LOG.ERROR,"TPSID="+N+", TextNode not found for LangKey = ",g_objGS.General.Language),D.Log("ConstructProcessTask",LOG.ERROR,"Selecting first available TextNode",""),u=b.text[0])}else u=b;p.Caption=u.htxt_data!=
void 0?u.htxt_data:"";p.PCaption=u.ptxt_data!=void 0?u.ptxt_data:"";if(u.nt!=void 0)for(var E in u.nt)switch(u.nt[E].id){case "s":p.NotesControl[MODETYPE.SHOW]=u.nt[E].htxt_data;break;case "g":p.NotesControl[MODETYPE.GUIDE]=u.nt[E].htxt_data;break;case "t":p.NotesControl[MODETYPE.TEST]=u.nt[E].htxt_data;break;case "d":p.NotesControl[MODETYPE.DOC]=u.nt[E].htxt_data}b.inmd!=void 0?(aTemp=b.inmd.split("|"),p.InMode[MODETYPE.SHOW]=aTemp[0]=="1"?true:false,p.InMode[MODETYPE.GUIDE]=aTemp[1]=="1"?true:false,
p.InMode[MODETYPE.TEST]=aTemp[2]=="1"?true:false):(p.InMode[MODETYPE.SHOW]=true,p.InMode[MODETYPE.GUIDE]=true,p.InMode[MODETYPE.TEST]=true);p.SubStepCount=b.ss!=void 0?Number(b.ss):0;d=p.SubStepCount>0?true:false;if(d==true)c.GetStepObject(C).SubStepCount=p.SubStepCount;d==false&&(C=H);p.GroupStepParentIndex=C;p.StepIndex=H++;if(p.Type==STEPTYPE.INFOSTEP){p.InfoStepDescription=u.htxt_data;p.InfoStepCaptionText=u.infcap_data;p.Caption=p.InfoStepCaptionText;p.StatusBarData=new clsStatusBarData;if(b.oist==
"1"&&uid_json.infosteps!=void 0&&eval("uid_json.infosteps.ist_"+b.ist)!=void 0)p.InfoStepThemeID=b.ist;var v=b.trpr.split("|");p.InfoStepContinue=v[0]==0?false:true;p.InfoStepTransition=parseInt(v[1]);p.InfoAsm=b.ssy=="1"?true:false;p.InfoWorkFlowShapes=b.shapes||[];if(p.InfoWorkFlowShapes.length>0&&g_objGS.General.WorkflowArray===null)g_objGS.General.WorkflowArray=[];if(f(p.StatusBarData,b)==false)throw"Failed @ SetContinueLayerData";}else if(p.Type==STEPTYPE.VARIATION)if(p.InfoStepDescription=u.htxt_data,
p.InfoStepCaptionText=u.infcap_data,p.Caption=p.InfoStepCaptionText,p.VariationOptions=[],b.ops!=void 0){for(var J in b.ops){q={};E=null;if(b.ops[J].text!=void 0){for(I in b.ops[J].text)if(b.ops[J].text[I].id==g_objGS.General.Language){E=b.ops[J].text[I];break}E==null&&(D.Log("ConstructProcessTask",LOG.ERROR,"TPSID="+N+", TextNode not found for LangKey = ",g_objGS.General.Language),D.Log("ConstructProcessTask",LOG.ERROR,"Selecting first available TextNode",""),E=b.ops[J].text[0])}if(E!=null)q.HTMLCaption=
E.htxt_data,q.PlainCaption=E.ptxt_data;q.Start=b.ops[J].st;q.End=b.ops[J].en;q.Jump=b.ops[J].jm;q.Value=b.ops[J].v;q.Name="";q.Default=b.ops[J].df;q.EndCompleted=false;q.TPSID=p.TPSID;if(r!=void 0&&g_CommandArgs[CMDARGS.VSPA]!=void 0)for(var I=0;I<r.VPathOptions.length;I++)if(r.VPathOptions[I].TPSID==p.TPSID&&r.VPathOptions[I].Value==q.Value){q.Name=r.VPathOptions[I].Name;if(r.VPathMode.indexOf("SM")!=-1)q.Default="1";if(r.VPathMode.indexOf("GM")!=-1)q.Default="1";if(r.VPathMode.indexOf("TM")!=-1)q.Default=
"1";break}else{if(r.VPathMode.indexOf("SM")!=-1)q.Default="0";if(r.VPathMode.indexOf("GM")!=-1)q.Default="0";if(r.VPathMode.indexOf("TM")!=-1)q.Default="0"}else if(q.Default=="1")E={},E.TPSID=b.id,E.Value=q.Value,r.VPathOptions.push(E);p.VariationOptions.push(q);q.Default=="0"&&K.push(q)}if(a(p)==false)throw"Error @ UpdateVariationAutoPlayFlag";}else throw"Options not available for variation step";else{if(b.ss!=void 0)p.SubStepCount=Number(b.ss);p.IsSubStep=d;if(b.dl!=void 0)v=b.dl.split("|"),p.StepTransitionDelay=
v[1]*1E3;if(b.im!=void 0&&B(c.ResLoc,p,q)==false)throw"Failed @ GetDifferentialInfo";if(b.an!=void 0&&n(p,b)==false)throw"Failed @ SetAnnotationControlValues";if(g(p,b)==false)throw"Failed @ SetEventControlValues";if(p.Type==STEPTYPE.WINDOWACTIVATE){p.StatusBarData=new clsStatusBarData;if(f(p.StatusBarData,b)==false)throw"Failed @ SetContinueLayerData";if(b.asm!=void 0&&A(p,b)==false)throw"Failed @ ReadQuestionData";}}if(k(p,b)==false)throw"Failed @ SetMediaControlValues";b=true;p.Type==STEPTYPE.INFOSTEP&&
uid_json.settings.cuecard.numberinfosteps=="0"&&(b=false);p.Type==STEPTYPE.WINDOWACTIVATE&&uid_json.settings.cuecard.numbersystemoutcomesteps=="0"&&(b=false);d==false&&c.TotalDisplayableSteps++;(p.Type==STEPTYPE.MOUSE||p.Type==STEPTYPE.TYPETEXT||p.Type==STEPTYPE.KEYEVENT)&&c.TotalCountableStepCount++;b==true?p.SlNo=c.TotalDisplayableSteps:(p.SlNo=-1,c.TotalDisplayableSteps--);p.Type!=STEPTYPE.INFOSTEP&&p.Type!=STEPTYPE.WINDOWACTIVATE&&d==false&&c.TotalTrackableSteps++;c.Steps.push(p)}else for(I in b)if((I.indexOf("cl_")==
0||I.indexOf("s_")==0)&&e(c,b[I],false)==false)throw"Failed To Add Step to Process";}catch(G){o=false,D.Log("AddStepToProcess",LOG.EXCEPTION,"Failed for TPSID = "+N+", ResLoc = "+L,G)}return o}function a(a){var b=true;try{if(g_CommandArgs[CMDARGS.VARIATIONSHIDE]!=void 0){if(g_CommandArgs[CMDARGS.VARIATIONSHIDE][a.TPSID]=="1"){if(g_objGS.General.VPathSetForSM==1)a.VariationAutoPlaySM=true;if(g_objGS.General.VPathSetForGM==1)a.VariationAutoPlayGM=true;if(g_objGS.General.VPathSetForTM==1)a.VariationAutoPlayTM=
true}}else{if(uid_json.settings.mode_show.variationpath=="1"&&uid_json.settings.mode_show.hidevariationstep=="1")a.VariationAutoPlaySM=true;if(uid_json.settings.mode_guide.variationpath=="1"&&uid_json.settings.mode_guide.hidevariationstep=="1")a.VariationAutoPlayGM=true;if(uid_json.settings.mode_test.variationpath=="1"&&uid_json.settings.mode_test.hidevariationstep=="1")a.VariationAutoPlayTM=true}}catch(c){b=false,D.Log("UpdateVariationAutoPlayFlag",LOG.EXCEPTION,"",c)}return b}function f(a,b){var c=
true;try{var e=b.trpr.split("|");a.ShowContinueButton=e[0].ToBoolean();if(parseFloat(e[1])>=0&&(a.MoveOnTimer=true,a.Duration=parseFloat(e[1])*1E3,a.Duration<=0))a.Duration=1E3}catch(f){c=false,D.Log("SetContinueLayerData",LOG.EXCEPTION,"",f)}return c}function n(a,b){var e=true;try{var f=b.an,g,n,d,k=true;for(n=0;n<f.length;n++){g=f[n];d="";d=g.id;k=true;switch(d.toUpperCase()){case ANNOTATION.OUTERREGION:k=v(a,g,ANNOTATION.OUTERREGION);break;case ANNOTATION.INNERREGION:k=v(a,g,ANNOTATION.INNERREGION);
break;case ANNOTATION.MOUSEPOINTER:var o=a,C=g,A=true;try{var r=new clsMouseData;r.Type=ANNOTATION.MOUSEPOINTER;var B=C.cord.split("|");r.MouseDownX=parseFloat(B[0]);r.MouseDownY=parseFloat(B[1]);r.MouseUpX=parseFloat(B[2]);r.MouseUpY=parseFloat(B[3]);var H=C.pr.split("|");r.EventType=H[0].toUpperCase();r.CursorKeyNormal=H[1];r.CursorKeyDown=H[2];r.CursorKeyHover=H[3];if(c(r.CursorKeyNormal,q(r.CursorKeyNormal))==false)throw"Error @ AddToBasicImageData";if(c(r.CursorKeyDown,q(r.CursorKeyDown))==false)throw"Error @ AddToBasicImageData";
if(c(r.CursorKeyHover,q(r.CursorKeyHover))==false)throw"Error @ AddToBasicImageData";o.AnnotationControls.push(r)}catch(J){A=false,D.Log("SetMouseInfo",LOG.EXCEPTION,"",J)}k=A;break;case ANNOTATION.CALLOUT:k=E(a,g,ANNOTATION.CALLOUT,b);break;case ANNOTATION.HIGHLIGHTER:var o=a,C=g,I=ANNOTATION.HIGHLIGHTER,A=true;try{var K=new clsHighlightRegionData;K.Type=I;var N=C.cord.split("|");K.Left=parseFloat(N[0]);K.Top=parseFloat(N[1]);K.Width=parseFloat(N[2]);K.Height=parseFloat(N[3]);if(C.key!=void 0){var M=
C.key.split("|");K.Thickness=M[0];K.Color=M[1]}o.AnnotationControls.push(K)}catch(V){A=false,D.Log("SetHighlightRegionInfo",LOG.EXCEPTION,"",V)}k=A;break;case ANNOTATION.STICKYNOTE:g.contid==void 0&&(k=E(a,g,ANNOTATION.STICKYNOTE,b));break;case ANNOTATION.EQUIVALENTCLICKREGION:k=v(a,g,ANNOTATION.EQUIVALENTCLICKREGION);break;case ANNOTATION.CONFUSIONREGION:o=a;C=g;A=true;try{var ea=new clsConfusionRegionData,ga=C.cord.split("|");ea.Left=parseFloat(ga[0]);ea.Top=parseFloat(ga[1]);ea.Width=parseFloat(ga[2]);
ea.Height=parseFloat(ga[3]);var ra=null;for(i in C.text)if(C.text[i].id==g_objGS.General.Language){ra=C.text[i];break}ra==null&&(D.Log("SetConfusionRegionInfo",LOG.ERROR,"TextNode not found for LangKey = ",g_objGS.General.Language),D.Log("SetConfusionRegionInfo",LOG.ERROR,"Selecting first available TextNode",""),ra=C.text[0]);ea.Text=g_Decrypt(ra.an_data);o.AnnotationControls.push(ea)}catch(ka){A=false,D.Log("SetConfusionRegionInfo",LOG.EXCEPTION,"",ka)}k=A;break;case ANNOTATION.DROPREGION:k=p(a,
g,ANNOTATION.DROPREGION);break;case ANNOTATION.EQUIVALENTDROPREGION:k=p(a,g,ANNOTATION.EQUIVALENTDROPREGION);break;case ANNOTATION.NAVIGATIONREGION:var o=a,C=g,na=ANNOTATION.NAVIGATIONREGION,A=true;try{var ma=new clsNavigationRegionData;ma.Id=D.GetUniqueID();ma.Type=na;var oa=C.cord.split("|");ma.Left=parseFloat(oa[0]);ma.Top=parseFloat(oa[1]);ma.Width=parseFloat(oa[2]);ma.Height=parseFloat(oa[3]);if(C.key!=void 0){var Q=C.key.split("|");ma.BorderColor=Q[0];ma.BGColor=Q[1];ma.Gradient=Q[2];ma.DisabledColor=
Q[3]}if(C.text!=void 0)for(i in C.text)if(C.text[i].id==g_objGS.General.Language){ma.Text=C.text[i].an_data;break}if(C.st!=void 0)ma.Start=C.st;if(C.en!=void 0)ma.End=C.en;if(C.jm!=void 0)ma.Jump=C.jm;if(C.cord!=void 0)ma.Cords=C.cord;o.AnnotationControls.push(ma)}catch(W){A=false,D.Log("SetNavigationRegionInfo",LOG.EXCEPTION,"",W)}k=A;break;case ANNOTATION.TUTORIMAGE:o=a;C=g;A=true;try{var da=new clsTutorImageData,sa=C.cord.split("|"),qa=D.ContentPath+g_URLPathSeperator+L+g_URLPathSeperator+"cimages"+
g_URLPathSeperator;da.Left=parseFloat(sa[0]);da.Top=parseFloat(sa[1]);da.Width=parseFloat(sa[2]);da.Height=parseFloat(sa[3]);da.Src=qa+C.src;if(C.pr!=void 0){var va=C.pr.split("|");da.Duration=parseFloat(va[0])*1E3;da.Seq=parseInt(va[1])}o.AnnotationControls.push(da)}catch(Aa){A=false,D.Log("SetTutorImageInfo",LOG.EXCEPTION,"",Aa)}k=A;break;case ANNOTATION.CALLOUTTEXTBOX:o=a;C=g;A=true;try{var pa=new clsCalloutTextboxData,Fa=C.cord.split("|");pa.Left=parseFloat(Fa[0]);pa.Top=parseFloat(Fa[1]);pa.Width=
parseFloat(Fa[2]);pa.Height=parseFloat(Fa[3]);var Na=G(C.text);pa.Text=g_Decrypt(Na.an_data);if(C.pr!=void 0){var Ca=C.pr.split("|");pa.Color=Ca[0];pa.Thickness=parseInt(Ca[1]);pa.BGColor=Ca[2];pa.Transparent=parseInt(Ca[3]);pa.Duration=parseFloat(Ca[4])*1E3;pa.Seq=parseInt(Ca[5])}o.AnnotationControls.push(pa)}catch(Ja){A=false,D.Log("SetCalloutTextboxInfo",LOG.EXCEPTION,"",Ja)}k=A}if(k==false)throw"Error in Creating Annotaion Controls for "+d;}var Da,za,Ga;for(n=0;n<f.length;n++)if(g=f[n],d=g.id.toUpperCase(),
Da=null,d==ANNOTATION.ROLLOVERIMAGE){Da=g;za=null;for(Ga=0;Ga<f.length;Ga++)if(g=f[Ga],d=g.id.toUpperCase(),d==ANNOTATION.STICKYNOTE&&g.contid!=void 0&&g.contid==Da.contid){za=g;break}var Ha;if(Ha=Da!=null&&za!=null){k=a;r=Da;B=za;H=true;try{var ta=new clsRolloverData;ta.StickyNoteData=u(B,ANNOTATION.STICKYNOTE);if(ta.StickyNoteData==null)throw"GetCalloutStickynoteInfo return null";ta.Type=ANNOTATION.ROLLOVERIMAGE;var Oa=r.cord;ta.ImageKey=r.src;var wa=Oa.split("|");ta.Left=parseFloat(wa[0]);ta.Top=
parseFloat(wa[1]);ta.Width=parseFloat(wa[2]);ta.Height=parseFloat(wa[3]);ta.Duration=Number(uid_json.settings.general.rolloverautohideduration);if(c(ta.ImageKey,"data"+g_URLPathSeperator+"common"+g_URLPathSeperator+ta.ImageKey)==false)throw"Error @ AddToBasicImageData";if(r.dly!=void 0)ta.Duration=Number(r.dly)*1E3;k.AnnotationControls.push(ta)}catch(Ta){H=false,D.Log("SetRolloverInfo",LOG.EXCEPTION,"",Ta)}Ha=H==false}if(Ha)throw"Error @ SetRolloverInfo";}}catch(Ka){e=false,D.Log("SetAnnotationControlValues",
LOG.EXCEPTION,"",Ka)}return e}function g(a,b){var c=true;try{if(b.ev!=void 0){var e=b.ev,f,g,n;for(g=0;g<e.length;g++){f=e[g];n="";n=f.id.toUpperCase();if(n==EVENTTYPE.TYPETEXT){a.EventControls[n]=new clsTypeTextData;var d=a.EventControls[n],k=f,p=true;try{d.Type=EVENTTYPE.TYPETEXT;var q=k.pr.split("|");d.UseInputBox=parseFloat(q[0]);d.IsPassword=parseFloat(q[1]);var C=k.fon.split("|");d.Font.Bold=parseFloat(C[0])==1?true:false;d.Font.Italic=parseFloat(C[1])==1?true:false;d.Font.Underline=parseFloat(C[2]);
d.Font.Strike=parseFloat(C[3]);d.Font.Name=C[4];d.Font.Size=parseFloat(C[5]);d.ForeColor=C[6];d.BgColor=C[7];k.ev_data!=void 0?d.Text=g_Decrypt(k.ev_data):D.Log("SetTypeTextInfo",LOG.ERROR,"Typtetext does not contains text-to-be typed ?","blank text considered for TPSID = "+N);var u=k.vr.split("|");d.Rule=u[0];d.Timer=parseFloat(u[3])*1E3;d.Characters=parseFloat(u[4]);if(u.length==6&&(d.RuleID=parseFloat(u[5]),d.RuleID>2&&(d.RegexVal=uid_json.settings.template.regex["r"+d.RuleID],d.RegexVal==void 0||
d.RegexVal=="")))throw"RegEx Val Empty for RuleID "+d.RuleID;}catch(A){p=false,D.Log("SetTypeTextInfo",LOG.EXCEPTION,"",A)}if(p==false)throw"Error @ SetTypeTextInfo";}else if(n==EVENTTYPE.KEYPRESS||n==EVENTTYPE.EQKEYPRESS){var k=a,p=f,r=n,B=true;try{k.EventControls[r]=new clsKeyEventData;k.EventControls[r].Type=r;var E=p.kk.split("|");k.EventControls[r].KeyValue=E[0];if(k.EventControls[r].KeyValue=="")D.Log("SetKeyPressEventInfo",LOG.ERROR,"Keypress value not found in data.js","hardcoded ENTER key considered"),
k.EventControls[r].KeyValue="ENTER";k.EventControls[r].KeyModifier=E[1]}catch(H){B=false,D.Log("SetKeyPressEventInfo",LOG.EXCEPTION,"",H)}if(B==false)throw"Error @ SetKeyPressEventInfo";}else if(a.EventControls[n]=new clsMouseEventData,a.EventControls[n].Type=n,o(a.EventControls[n],f)==false)throw"Error @ SetMouseEventInfo";n==EVENTTYPE.DOUBLECLICK&&(I=true);if(n==EVENTTYPE.DRAG){k=false;for(i in a.AnnotationControls)if(a.AnnotationControls[i].Type==ANNOTATION.DROPREGION){k=true;break}k==false&&(k=
"The DROP region is missing for following step\n\n",k+="Process Id : "+L+"_"+a.TPSID+"\n",k+="Step No : "+a.StepIndex+"\n",k+="Step Caption : "+a.PCaption+"\n\n",alert(k),M=true)}}}}catch(v){c=false,D.Log("SetEventControlValues",LOG.EXCEPTION,"",v)}return c}function k(a,b){var c=true;try{if(g_objGS.General.GlobalAudio==true)return true;if(b.md!=void 0){var e=b.md,f,g,n,d="";for(g=0;g<e.length;g++)if(f=e[g],f.lk==g_objGS.General.Language){n="";n=f.id;alMediaProps=f.pr.split("|");d=f.src;if(d=="")throw"Media Src not found in data.js";
d.toUpperCase().substr(0,4)!="HTTP"&&(d=J+d);var k=new clsMediaData;k.MediaType=n.toUpperCase();k.MediaFormat=alMediaProps[0].toUpperCase();k.Src=d;k.Width=alMediaProps[1]!=void 0?alMediaProps[1]:-1;k.Height=alMediaProps[2]!=void 0?alMediaProps[2]:-1;if(k!=null&&(a.MediaFiles.push(k),k.MediaType==MEDIATYPE.STEPAUDIO))g_objGS.General.StepAudioAvailable=true}}}catch(p){c=false,D.Log("SetMediaControlValues",LOG.EXCEPTION,"",p)}return c}function o(a,b){var e=true;try{var f=b.km.split("|");a.KeyModifier=
f[0];a.MouseButton=f[1];a.MouseModifier=f[2];if(a.MouseButton=="")D.Log("SetMouseEventInfo",LOG.ERROR,"Defaul LEFT Button considered as Mouse Button missing for ",""),a.MouseButton="L";if(a.Type==EVENTTYPE.CLICK||a.Type==EVENTTYPE.DOUBLECLICK||a.Type==EVENTTYPE.DRAG){var g=(a.MouseButton+a.MouseModifier).toLowerCase(),f="";if(uid_json.settings.mousebutton.consider==false)return e;if(uid_json.settings.mousebutton.ignoreleft==true&&g=="l")return e;if(uid_json.settings.mousebutton.ignoreright==true&&
g=="r")return e;switch(g){case "l":f="left";break;case "lm":f="left_middle";break;case "m":f="middle";break;case "ml":f="middle_left";break;case "mr":f="middle_right";break;case "n":f="nothing";break;case "r":f="right";break;case "rm":f="right_middle"}if(f=="")throw"Mouse Button ID Mapping failed for > "+g;if(c(g,g_objGS.MouseButtonFiles[f])==false)throw"Error @ AddToBasicImageData";}}catch(n){e=false,D.Log("SetMouseEventInfo",LOG.EXCEPTION,"",n)}return e}function v(a,b,c){var e=true;try{var f=new clsControlRegionData;
f.Type=c;var g=b.cord.split("|");f.Left=parseFloat(g[0]);f.Top=parseFloat(g[1]);f.Width=parseFloat(g[2]);f.Height=parseFloat(g[3]);if(b.pr!=void 0){var n=b.pr.split("|");f.Thickness=parseFloat(n[2]);f.Shape=n[0].toUpperCase();f.Color=n[1];f.Id=n[3];f.RefId=n[4]}if(b.fscords!=void 0)f.Cords=b.fscords;a.AnnotationControls.push(f)}catch(d){e=false,D.Log("SetControlRegionInfo",LOG.EXCEPTION,"",d)}return e}function p(a,b,c){var e=true;try{var f=new clsControlRegionData;f.Type=c;var g=b.cord.split("|");
f.Left=parseFloat(g[0]);f.Top=parseFloat(g[1]);f.Width=parseFloat(g[2]);f.Height=parseFloat(g[3]);if(b.pr!=void 0){var n=b.pr.split("|");f.Thickness=parseFloat(n[1]);f.Shape=CONTROLREGION.RECTANGLE;f.Color=n[0]}if(b.cord!=void 0)f.Cords=b.cord;a.AnnotationControls.push(f)}catch(d){e=false,D.Log("SetDropRegionInfo",LOG.EXCEPTION,"",d)}return e}function q(a){var b="";try{var c="";switch(a){case "1":c="mp_normal_select";break;case "2":c="mp_help_select";break;case "3":c="mp_working_in_background";break;
case "4":c="mp_busy";break;case "5":c="mp_precision_select";break;case "6":c="mp_text_select";break;case "7":c="mp_handwriting";break;case "8":c="mp_unavailable";break;case "9":c="mp_vertical_resize";break;case "10":c="mp_horizontal_resize";break;case "11":c="mp_diagonal_resize_ne";break;case "12":c="mp_diagonal_resize_nw";break;case "13":c="mp_move";break;case "14":c="mp_alternate_select";break;case "15":c="mp_link_select"}b=g_objGS.CursorFiles[c]}catch(e){b="",D.Log("SetMouseInfo",LOG.EXCEPTION,
"",e)}return b}function E(a,b,c,e){var f=true;try{var g=e.asm;if(uid_json.settings.mode_show.turnoffcallout=="1"&&uid_json.settings.mode_guide.turnoffcallout=="1"&&uid_json.settings.mode_test.turnoffcallout=="1")return true;var n=u(b,c),b=n;try{for(c=0;c<e.an.length;c++)if(e.an[c].id=="cor"&&e.an[c].pr!=void 0&&e.an[c].pr.split("|")[3]!=void 0&&e.an[c].pr.split("|")[3]==b.RefId){var d=new clsControlRegionData;d.Type="3";var k=e.an[c].cord.split("|");d.Left=parseFloat(k[0]);d.Top=parseFloat(k[1]);
d.Width=parseFloat(k[2]);d.Height=parseFloat(k[3]);if(e.an[c].pr!=void 0){var p=e.an[c].pr.split("|");d.Thickness=parseFloat(p[2]);d.Shape=p[0].toUpperCase();d.Color=p[1];d.Id=p[3];d.RefId=p[4]}if(e.an[c].fscords!=void 0)d.Cords=e.an[c].fscords;b.Region=d}}catch(o){D.Log("SetControlRegionToCallout",LOG.EXCEPTION,"",o)}n=b;if(n==null)throw"GetCalloutStickynoteInfo returned null";if(uid_json.settings.callout.csscsnqsd!=void 0&&uid_json.settings.callout.csscsnqsd.enable=="1")n.QSD=g==void 0?0:1;g_objGS.General.CalloutsAvailable=
true;a.AnnotationControls.push(n)}catch(q){f=false,D.Log("SetCalloutStickynoteInfo",LOG.EXCEPTION,"",q)}return f}function u(a,b){var e=null;try{var e=new clsCalloutStickyData,f="";e.Type=b;var g=a.cord,n=a.key;e.ImageKey=a.src;var d=g.split("|"),k=n.split("|");e.Left=parseFloat(d[0]);e.Top=parseFloat(d[1]);e.Width=parseFloat(d[2]);e.Height=parseFloat(d[3]);e.AutoAnnotation=parseFloat(k[4]);e.Id=k[6];e.RefId=k[7];if(e.Type==ANNOTATION.CALLOUT){var f=k[1],g=e,p=ORIENTATION.NONE;try{switch(parseFloat(f)){case ORIENTATION.NE:p=
ORIENTATION.NE;break;case ORIENTATION.NW:p=ORIENTATION.NW;break;case ORIENTATION.SE:p=ORIENTATION.SE;break;case ORIENTATION.SW:p=ORIENTATION.SW}}catch(o){D.Log("GetCalloutStickyOrientation",LOG.EXCEPTION,"",o)}g.Orientation=p;if(e.Orientation==ORIENTATION.NONE)throw"Invalid Callout orientation";e.Shape=k[0].toUpperCase();e.Duration=parseFloat(k[3])*1E3;k[5]!=void 0?e.Seq=k[5]!=void 0?parseInt(k[5]):0:(e.Seq=0,e.Duration=0)}else{if(a.contid!=void 0)e.RollOverImageIndex=a.contid;e.Orientation=ORIENTATION.NONE;
e.Shape=SHAPES.NONE;e.Duration=parseFloat(k[1])*1E3;k[4]!=void 0?e.Seq=k[4]!=void 0?parseInt(k[4]):0:(e.Seq=0,e.Duration=0)}if(c(e.ImageKey,"data"+g_URLPathSeperator+"common"+g_URLPathSeperator+e.ImageKey)==false)throw"Error @ AddToBasicImageData";f=null;if(a.text!=void 0){for(i in a.text)if(a.text[i].id==g_objGS.General.Language){f=a.text[i];break}f==null&&(D.Log("GetCalloutStickynoteInfo",LOG.ERROR,"TextNode not found for LangKey = ",g_objGS.General.Language),D.Log("GetCalloutStickynoteInfo",LOG.ERROR,
"Selecting first available TextNode",""),f=a.text[0])}else f=a;e.Text=g_Decrypt(f.an_data);var q;a:{f=e;k=true;try{if(g_objGS.General.GlobalAudio==true){q=true;break a}if(a.md!=void 0){var C=a.md,u,r,A,p="";for(r=0;r<C.length;r++)if(u=C[r],u.lk==g_objGS.General.Language){A="";A=u.id;alMediaProps=u.pr.split("|");p=u.src;if(p=="")throw"Media Src not found in data.js";p.toUpperCase().substr(0,4)!="HTTP"&&(p=J+p);var B=new clsMediaData;B.MediaType=A.toUpperCase();B.MediaFormat=alMediaProps[0].toUpperCase();
B.Src=p;B.Width=alMediaProps[1]!=void 0?alMediaProps[1]:-1;B.Height=alMediaProps[2]!=void 0?alMediaProps[2]:-1;if(B!=null&&(f.MediaFiles.push(B),B.MediaType==MEDIATYPE.ANNOTATIONAUDIO))g_objGS.General.StepAudioAvailable=true}}}catch(E){k=false,D.Log("SetAnnotationMediaControlValues",LOG.EXCEPTION,"",E)}q=k}if(q==false)throw"Error @ SetAnnotationMediaControlValues";}catch(H){e=null,D.Log("GetCalloutStickynoteInfo",LOG.EXCEPTION,"",H)}return e}function B(a,b,c){var e=true;try{var f,g,n="",d=D.ContentPath+
g_URLPathSeperator+a+g_URLPathSeperator+"images"+g_URLPathSeperator;for(g=0;g<c.length;g++){f=new clsDiffImageData;f.ID=c[g].id;var k=c[g].pr.split("|");f.IsFullImage=!k[0].ToBoolean();f.ImageLeft=parseFloat(k[1]);f.ImageTop=parseFloat(k[2]);f.ImageWidth=parseFloat(k[3]);f.ImageHeight=parseFloat(k[4]);n=k[5];if(n=="")throw"Step Image Name is missing";f.ImagePath=(d+n.Trim()).replace("\\","/");b.DiffImages.push(f)}}catch(p){e=false,D.Log("GetDifferentialInfo",LOG.EXCEPTION,"",p)}return e}function A(a,
b){var c=true;try{var e=new clsQuestionData;e.Text=G(b.asm.text);e.Type=b.asm.qy;e.Cord=b.asm.cord;e.Category=b.asm.ct;e.TextCorrect=G(b.asm.ctext);e.TextWrong=G(b.asm.wtext);e.JumpCorrect=b.asm.jmc;e.JumpWrong=b.asm.jmw;e.CorrectAnswer=b.asm.ans;e.Choices=[];if(b.asm.ch[0]==void 0)b.asm.ch=[].push(b.asm.ch);for(var f in b.asm.ch){var g=new clsChoiceData;g.ID=b.id+"_"+b.asm.ch[f].id;g.Text=G(b.asm.ch[f].text);e.Choices.push(g)}a.Question=e}catch(n){c=false,D.Log("ReadQuestionData",LOG.EXCEPTION,"",
n)}return c}function G(a){var b=null;try{if(a!=void 0){for(i in a)if(a[i].id==g_objGS.General.Language){b=a[i];break}b==null&&(b=TextNode[0])}}catch(c){b=null,D.Log("GetTextNode",LOG.EXCEPTION,"",c)}return b}clsPlayerBase.call(this,"clsDataReader");this.ContentPath="";this.CuecardData=null;var D=this,r=null,H=1,C=1,J="",I=false,L="",N="",M=false,K=[];this.Initialize=function(){var a=true;try{if(D.onInitComplete==void 0)throw"onInitComplete event not binded";var b=new clsScriptLoader;b.onLoadComplete=
d;b.Load("data/data.js")}catch(c){a=false,D.Log("Initialize",LOG.EXCEPTION,"",c)}return a};this.GetEFXDataObject=function(){return r};this.GetTask=function(a){var b=null;try{b=a==void 0||a==""?r.Tasks[r.StartResLoc]:r.Tasks[a]}catch(c){D.Log("GetTask",LOG.EXCEPTION,"",c)}return b}}
var FlyWeight=function(){var d={},b=function(b){var e=null;try{d[b]=new clsControlRegionPlayer(b),e=d[b]}catch(a){g_WriteToLog("FlyWeight","GetControlRegionObject","",a,LOG.EXCEPTION)}return e};return{GetObject:function(c,e,a){var f=null;try{sFwtKey=c;if(c==PLAYABLEOBJECTS.CALLOUTSTICKYNOTE||c==PLAYABLEOBJECTS.CALLOUTSTICKYNOTE_HINT||c==PLAYABLEOBJECTS.ROLLOVERIMAGE||c==PLAYABLEOBJECTS.HIGHLIGHTER||c==PLAYABLEOBJECTS.HIGHLIGHTER_HINT||c==PLAYABLEOBJECTS.NAVIGATIONREGION||c==PLAYABLEOBJECTS.TUTORIMAGE||
c==PLAYABLEOBJECTS.CALLOUTTEXTBOX||c==PLAYABLEOBJECTS2.CALLOUTSTICKYNOTE||c==PLAYABLEOBJECTS2.CALLOUTSTICKYNOTE_HINT||c==PLAYABLEOBJECTS2.ROLLOVERIMAGE||c==PLAYABLEOBJECTS2.HIGHLIGHTER||c==PLAYABLEOBJECTS2.HIGHLIGHTER_HINT||c==PLAYABLEOBJECTS2.NAVIGATIONREGION||c==PLAYABLEOBJECTS2.TUTORIMAGE||c==PLAYABLEOBJECTS2.CALLOUTTEXTBOX)sFwtKey+=e;if(d[sFwtKey]==null){switch(c){case PLAYABLEOBJECTS.OCR_BLINK:f=b(sFwtKey);break;case PLAYABLEOBJECTS.ICR_BLINK:f=b(sFwtKey);break;case PLAYABLEOBJECTS.DR_BLINK:f=
b(sFwtKey);break;case PLAYABLEOBJECTS.OCR_BLINK_HINT:f=b(sFwtKey);break;case PLAYABLEOBJECTS.ICR_BLINK_HINT:f=b(sFwtKey);break;case PLAYABLEOBJECTS.DR_BLINK_HINT:f=b(sFwtKey);break;case PLAYABLEOBJECTS.OCR_NOBLINK:f=b(sFwtKey);break;case PLAYABLEOBJECTS.ICR_NOBLINK:f=b(sFwtKey);break;case PLAYABLEOBJECTS.DR_NOBLINK:f=b(sFwtKey);break;case PLAYABLEOBJECTS.CURSORMOVE_ANIM:d[sFwtKey]=new clsCursorMovePlayer(c);f=d[sFwtKey];break;case PLAYABLEOBJECTS.DRAG_ANIM:d[sFwtKey]=new clsDragPlayer(c);f=d[sFwtKey];
break;case PLAYABLEOBJECTS.CURSORAUDIO_ANIM:d[sFwtKey]=new clsCursorAudioPlayer(c);f=d[sFwtKey];break;case PLAYABLEOBJECTS.TYPETEXT_ANIM:d[sFwtKey]=new clsTypeTextPlayer(c);f=d[sFwtKey];break;case PLAYABLEOBJECTS.STEPAUDIO:d[sFwtKey]=new clsAudioPlayer(c);f=d[sFwtKey];break;case PLAYABLEOBJECTS.FEEDBACKAUDIO:d[sFwtKey]=new clsAudioPlayer(c);f=d[sFwtKey];break;case PLAYABLEOBJECTS.SCREENVIDEO:d[sFwtKey]=new clsVideoPlayer(c);f=d[sFwtKey];break;case PLAYABLEOBJECTS.HOMEVIDEO:d[sFwtKey]=new clsVideoPlayer(c);
d[sFwtKey].controls=true;f=d[sFwtKey];break;case PLAYABLEOBJECTS.DELAY:d[sFwtKey]=new clsDelayPlayer(c);f=d[sFwtKey];break;case PLAYABLEOBJECTS.DELAY_SV:d[sFwtKey]=new clsDelayPlayer(c);f=d[sFwtKey];break;case PLAYABLEOBJECTS.DELAY_HINT:d[sFwtKey]=new clsDelayPlayer(c);f=d[sFwtKey];break;case PLAYABLEOBJECTS.KEYPRESS_ANIM:d[sFwtKey]=new clsKeypressPlayer(c);f=d[sFwtKey];break;case PLAYABLEOBJECTS.CONTINUELAYER:d[sFwtKey]=new clsContinuePlayer(c);f=d[sFwtKey];break;case PLAYABLEOBJECTS.HIGHLIGHTER:f=
b(sFwtKey);break;case PLAYABLEOBJECTS.HIGHLIGHTER_HINT:f=b(sFwtKey);break;case PLAYABLEOBJECTS.CALLOUTSTICKYNOTE:d[sFwtKey]=new clsCalloutStickynotePlayer(c+"_"+e);f=d[sFwtKey];break;case PLAYABLEOBJECTS.ROLLOVERIMAGE:d[sFwtKey]=new clsRolloverPlayer(c);f=d[sFwtKey];break;case PLAYABLEOBJECTS.CALLOUTSTICKYNOTE_HINT:d[sFwtKey]=new clsCalloutStickynotePlayer(c+"_"+e);f=d[sFwtKey];break;case PLAYABLEOBJECTS.TEXTBOX_NORMAL:d[sFwtKey]=new clsTextBox(TEXTBOX_TYPE.NORMAL);f=d[sFwtKey];break;case PLAYABLEOBJECTS.TEXTBOX_PASSWORD:d[sFwtKey]=
new clsTextBox(TEXTBOX_TYPE.PASSWORD);f=d[sFwtKey];break;case PLAYABLEOBJECTS.MULTILINE:d[sFwtKey]=new clsTextBox(TEXTBOX_TYPE.MULTILINE);f=d[sFwtKey];break;case PLAYABLEOBJECTS.NAVIGATIONREGION:d[sFwtKey]=new clsNavigationRegionPlayer(sFwtKey);f=d[sFwtKey];break;case PLAYABLEOBJECTS.QUESTION:d[sFwtKey]=new clsQSDPlayer(sFwtKey);f=d[sFwtKey];break;case PLAYABLEOBJECTS.TUTORIMAGE:d[sFwtKey]=new clsTutorImagePlayer(c+"_"+e);f=d[sFwtKey];break;case PLAYABLEOBJECTS.CALLOUTTEXTBOX:d[sFwtKey]=new clsCalloutTextboxPlayer(c+
"_"+e),f=d[sFwtKey]}if(f==null)switch(c){case PLAYABLEOBJECTS2.OCR_BLINK:f=b(sFwtKey);break;case PLAYABLEOBJECTS2.ICR_BLINK:f=b(sFwtKey);break;case PLAYABLEOBJECTS2.DR_BLINK:f=b(sFwtKey);break;case PLAYABLEOBJECTS2.OCR_BLINK_HINT:f=b(sFwtKey);break;case PLAYABLEOBJECTS2.ICR_BLINK_HINT:f=b(sFwtKey);break;case PLAYABLEOBJECTS2.DR_BLINK_HINT:f=b(sFwtKey);break;case PLAYABLEOBJECTS2.OCR_NOBLINK:f=b(sFwtKey);break;case PLAYABLEOBJECTS2.ICR_NOBLINK:f=b(sFwtKey);break;case PLAYABLEOBJECTS2.DR_NOBLINK:f=
b(sFwtKey);break;case PLAYABLEOBJECTS2.CURSORMOVE_ANIM:d[sFwtKey]=new clsCursorMovePlayer(c);f=d[sFwtKey];break;case PLAYABLEOBJECTS2.DRAG_ANIM:d[sFwtKey]=new clsDragPlayer(c);f=d[sFwtKey];break;case PLAYABLEOBJECTS2.CURSORAUDIO_ANIM:d[sFwtKey]=new clsCursorAudioPlayer(c);f=d[sFwtKey];break;case PLAYABLEOBJECTS2.TYPETEXT_ANIM:d[sFwtKey]=new clsTypeTextPlayer(c);f=d[sFwtKey];break;case PLAYABLEOBJECTS2.STEPAUDIO:d[sFwtKey]=new clsAudioPlayer(c);f=d[sFwtKey];break;case PLAYABLEOBJECTS2.SCREENVIDEO:d[sFwtKey]=
new clsVideoPlayer(c);f=d[sFwtKey];break;case PLAYABLEOBJECTS2.DELAY:d[sFwtKey]=new clsDelayPlayer(c);f=d[sFwtKey];break;case PLAYABLEOBJECTS2.DELAY_SV:d[sFwtKey]=new clsDelayPlayer(c);f=d[sFwtKey];break;case PLAYABLEOBJECTS2.DELAY_HINT:d[sFwtKey]=new clsDelayPlayer(c);f=d[sFwtKey];break;case PLAYABLEOBJECTS2.KEYPRESS_ANIM:d[sFwtKey]=new clsKeypressPlayer(c);f=d[sFwtKey];break;case PLAYABLEOBJECTS2.CONTINUELAYER:d[sFwtKey]=new clsContinuePlayer(c);f=d[sFwtKey];break;case PLAYABLEOBJECTS2.HIGHLIGHTER:f=
b(sFwtKey);break;case PLAYABLEOBJECTS2.HIGHLIGHTER_HINT:f=b(sFwtKey);break;case PLAYABLEOBJECTS2.CALLOUTSTICKYNOTE:d[sFwtKey]=new clsCalloutStickynotePlayer(c+"_"+e);f=d[sFwtKey];break;case PLAYABLEOBJECTS2.ROLLOVERIMAGE:d[sFwtKey]=new clsRolloverPlayer(c);f=d[sFwtKey];break;case PLAYABLEOBJECTS2.CALLOUTSTICKYNOTE_HINT:d[sFwtKey]=new clsCalloutStickynotePlayer(c+"_"+e);f=d[sFwtKey];break;case PLAYABLEOBJECTS2.TEXTBOX_NORMAL:d[sFwtKey]=new clsTextBox(TEXTBOX_TYPE.NORMAL);f=d[sFwtKey];break;case PLAYABLEOBJECTS2.TEXTBOX_PASSWORD:d[sFwtKey]=
new clsTextBox(TEXTBOX_TYPE.PASSWORD);f=d[sFwtKey];break;case PLAYABLEOBJECTS2.MULTILINE:d[sFwtKey]=new clsTextBox(TEXTBOX_TYPE.MULTILINE);f=d[sFwtKey];break;case PLAYABLEOBJECTS2.NAVIGATIONREGION:d[sFwtKey]=new clsNavigationRegionPlayer(sFwtKey);f=d[sFwtKey];break;case PLAYABLEOBJECTS2.QUESTION:d[sFwtKey]=new clsQSDPlayer(sFwtKey);f=d[sFwtKey];break;case PLAYABLEOBJECTS2.TUTORIMAGE:d[sFwtKey]=new clsTutorImagePlayer(c+"_"+e);f=d[sFwtKey];break;case PLAYABLEOBJECTS2.CALLOUTTEXTBOX:d[sFwtKey]=new clsCalloutTextboxPlayer(c+
"_"+e),f=d[sFwtKey]}if(f==null)throw"objRet is null";if(a==void 0)a=g_objTR.CanvasDIV;if(f.Initialize(a)==false)throw"Error @ Initialize for > "+f.Name;}else f=d[sFwtKey]}catch(n){f=null,g_WriteToLog("FlyWeight","GetObject","",n,LOG.EXCEPTION)}return f},LoadContinueLayer:function(b,e,a){var f=true;try{var n;n=messages_json.psim.statustext!=void 0?messages_json.psim.statustext:messages_json.psim.canvas.statustext;var g=n.no_timer.text;if(e.MoveOnTimer==true)switch(a){case MIQTYPE.NONE:g=n.wa_timer.text;
break;case MIQTYPE.MANUAL:g=n.manual_timer.text;break;case MIQTYPE.QUESTION:g=n.question_timer.text;g=g.replace(/%2/g,e.DefaultChoiceText);break;case MIQTYPE.INFOSTEP:g=n.infostep_timer.text}else if(a==MIQTYPE.QUESTION)g=n.question_notimer.text;b.ShowContinueButton=e.ShowContinueButton;b.MoveOnTimer=e.MoveOnTimer;b.Duration=e.Duration;b.StatusBarMessage=g;if(b.Load()==false)throw"Error @ objContPalyer.Load";}catch(d){f=false,g_WriteToLog("FlyWeight","LoadContinueLayer","",d,LOG.EXCEPTION)}return f},
Stop:function(){var b=true;try{d[PLAYABLEOBJECTS.CURSORMOVE_ANIM]!=null&&d[PLAYABLEOBJECTS.CURSORMOVE_ANIM].Stop(true),d[PLAYABLEOBJECTS2.CURSORMOVE_ANIM]!=null&&d[PLAYABLEOBJECTS2.CURSORMOVE_ANIM].Stop(true)}catch(e){b=false,g_WriteToLog("FlyWeight","Stop","",e,LOG.EXCEPTION)}return b},ShiftCursor:function(){var b=true;try{d[PLAYABLEOBJECTS.CURSORMOVE_ANIM]!=null&&d[PLAYABLEOBJECTS.CURSORMOVE_ANIM].ShiftCursorForScroll(),d[PLAYABLEOBJECTS2.CURSORMOVE_ANIM]!=null&&d[PLAYABLEOBJECTS2.CURSORMOVE_ANIM].ShiftCursorForScroll()}catch(e){b=
false,g_WriteToLog("FlyWeight","ShiftCursor","",e,LOG.EXCEPTION)}return b}}}();
function clsWizardSettings(){function d(f){var g=true;try{if(f==false)return TemplateFile_Load_Error();uid_json==void 0&&o.Log("Script_Loaded",LOG.ERROR,"uid.js might have some error","");o.Log("UID_onLoadComplete",LOG.SPECIAL,"ETPX Version",uid_json.about.lmd);f=true;try{if(uid_json.settings.template.msgfiles!=void 0)if(g_CommandArgs[CMDARGS.UILANGUAGE]!=void 0)for(i in uid_json.settings.template.msgfiles){if(i==g_CommandArgs[CMDARGS.UILANGUAGE].toLowerCase()){k=g_StaticURL+"ui/"+uid_json.settings.template.msgfiles[i].file+
".js";o.General.Language=i;break}}else for(i in uid_json.settings.template.msgfiles){if(uid_json.settings.template.msgfiles[i].pr=="1"){k=g_StaticURL+"ui/"+uid_json.settings.template.msgfiles[i].file+".js";break}}else k=g_StaticURL+"ui/"+uid_json.settings.template.msgfile+".js",o.General.Language="epi";o.Log("LoadMessageFile",LOG.SPECIAL,"CMDARGS.UILANGUAGE",g_CommandArgs[CMDARGS.UILANGUAGE]);o.Log("LoadMessageFile",LOG.SPECIAL,"ME.General.Language",o.General.Language);g_objScriptLoader.onLoadComplete=
a;g_objScriptLoader.Load(k)}catch(n){f=false,o.Log("LoadMessageFile",LOG.EXCEPTION,"",n)}if(f==false)throw"Error @ LoadMessageFile";if(BROWSER.LEGACY==false){f=true;try{uid_json.psim.layout.specs.variationoption_active!=void 0&&b("button_active",uid_json.psim.layout.specs.variationoption_active.css),uid_json.psim.layout.specs.variationoption_active_hover!=void 0&&b("button_active:hover",uid_json.psim.layout.specs.variationoption_active_hover.css),uid_json.psim.layout.specs.variationoption_disabled!=
void 0&&b("button_disabled",uid_json.psim.layout.specs.variationoption_disabled.css),uid_json.psim.layout.specs.variationoption_disabled_hover!=void 0&&b("button_disabled:hover",uid_json.psim.layout.specs.variationoption_disabled_hover.css),uid_json.psim.layout.specs.variationoption_last!=void 0&&b("button_last",uid_json.psim.layout.specs.variationoption_last.css),uid_json.psim.layout.h5dobjects.qsd!=void 0&&(uid_json.psim.layout.h5dobjects.qsd.spec.button_normal!=void 0&&c("q_button_normal",uid_json.psim.layout.h5dobjects.qsd.spec.button_normal.css),
uid_json.psim.layout.h5dobjects.qsd.spec.button_hover!=void 0&&c("q_button_normal:hover",uid_json.psim.layout.h5dobjects.qsd.spec.button_hover.css))}catch(d){f=false,o.Log("AddButtonCssClasses",LOG.EXCEPTION,"",d)}if(f==false)throw"Error @ AddButtonCssClasses";var u;if(u=uid_json.psim.layout.h5dobjects.qsd!=void 0){f=true;try{var B="",A=uid_json.psim.layout.h5dobjects.qsd.spec;A.choice_container!=void 0&&(B+=e("Choice_Container",A.choice_container.css));A.choice_container_input!=void 0&&(B+=e("Choice_Container input",
A.choice_container_input.css));A.checkmark_checkbox!=void 0&&(B+=e("Checkmark_Checkbox",A.checkmark_checkbox.css));A.checkmark_radio!=void 0&&(B+=e("Checkmark_Radio",A.checkmark_radio.css));A.checkbox_radio_hover!=void 0&&(B+=e("Choice_Container:hover input ~ .Checkmark_Checkbox",A.checkbox_radio_hover.css),B+=e("Choice_Container:hover input ~ .Checkmark_Radio",A.checkbox_radio_hover.css));A.checkbox_radio_checked!=void 0&&(B+=e("Choice_Container input:checked ~ .Checkmark_Checkbox",A.checkbox_radio_checked.css),
B+=e("Choice_Container input:checked ~ .Checkmark_Radio",A.checkbox_radio_checked.css));A.checkbox_radio_checked!=void 0&&(B+=e("Choice_Container input:checked ~ .Checkmark_Checkbox",A.checkbox_radio_checked.css),B+=e("Choice_Container input:checked ~ .Checkmark_Radio",A.checkbox_radio_checked.css));A.checkbox_radio_after!=void 0&&(B+=e("Checkmark_Checkbox:after",A.checkbox_radio_after.css),B+=e("Checkmark_Radio:after",A.checkbox_radio_after.css));A.choice_container_input_checked_after!=void 0&&(B+=
e("Choice_Container input:checked ~ .Checkmark_Checkbox:after",A.choice_container_input_checked_after.css),B+=e("Choice_Container input:checked ~ .Checkmark_Radio:after",A.choice_container_input_checked_after.css));A.checkbox_checkmark_after!=void 0&&(B+=e("Choice_Container .Checkmark_Checkbox:after",A.checkbox_checkmark_after.css));A.radio_checkmark_after!=void 0&&(B+=e("Choice_Container .Checkmark_Radio:after",A.radio_checkmark_after.css));var G=document.createElement("style");G.innerHTML=B;document.body.appendChild(G)}catch(D){f=
false,o.Log("AddCheckboxAndRadioCssClasses",LOG.EXCEPTION,"",D)}u=f==false}if(u)throw"Error @ AddCheckboxAndRadioCssClasses";}}catch(r){g=false,o.Log("UID_onLoadComplete",LOG.EXCEPTION,"",r)}if(g==false)o.onInitComplete(g)}function b(a,b){var c=true;try{var e=g_GetCSSForTD(b),f="."+a+"{ "+e+"\t-webkit-border-radius: 3px; -moz-border-radius: 3px; \ttext-shadow: -1px -1px 0 rgba(0,0,0,0.3); \tdisplay:inline-block; \tbackground-image: -webkit-gradient(linear, left top, left bottom, from("+b.bgc+"), to("+
b.gc+")); \tbackground-image: -webkit-linear-gradient(top, "+b.bgc+", "+b.gc+"); \tbackground-image: -moz-linear-gradient(top, "+b.bgc+", "+b.gc+"); \tbackground-image: -ms-linear-gradient(top, "+b.bgc+", "+b.gc+"); \tbackground-image: -o-linear-gradient(top, "+b.bgc+", "+b.gc+"); \tbackground-image: linear-gradient(to bottom, "+b.bgc+", "+b.gc+");filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr="+b.bgc+", endColorstr="+b.gc+"); }",g=document.createElement("style");g.innerHTML=
f;document.body.appendChild(g)}catch(n){c=false,o.Log("AddButtonClassToHeader",LOG.EXCEPTION,"",n)}return c}function c(a,b){var c=false;try{var f="",f=e(a,b),g=document.createElement("style");g.innerHTML=f;document.body.appendChild(g)}catch(n){c=false,o.Log("AddClassToStyle",LOG.EXCEPTION,"",n)}return c}function e(a,b){try{var c=g_GetCSSForTD(b),e="."+a+"{ "+c+"}"}catch(f){o.Log("AppendStyleText",LOG.EXCEPTION,"",f)}return e}function a(a){var b=true;try{if(a==false)return MsgFile_Load_Error();messages_json==
void 0&&o.Log("Script_Loaded",LOG.ERROR,k+" might have some error","");a=true;try{if(uid_json.settings==null)throw"uid_json.settings are empty";var c=uid_json.settings;c.template.rtl=c.template.rtl=="1"?"rtl":"ltr";switch(c.controlregion.blinkoption){case "0":c.controlregion.blinkoption=BLINKMODE.NONE;break;case "1":c.controlregion.blinkoption=BLINKMODE.BEFOREPLAY;break;case "2":c.controlregion.blinkoption=BLINKMODE.AFTERPLAY}switch(c.media.playbackoption){case "0":c.media.playbackoption=AUDIOPLAYBACKMODE.BEFORE;
break;case "1":c.media.playbackoption=AUDIOPLAYBACKMODE.DURING;break;case "2":c.media.playbackoption=AUDIOPLAYBACKMODE.AFTER}switch(c.stepimage.imageresizeoption){case "1":c.stepimage.imageresizeoption=IMAGERESIZE.FITTOCANVAS;break;case "2":c.stepimage.imageresizeoption=IMAGERESIZE.WRTBIGIMAGE;break;case "3":c.stepimage.imageresizeoption=IMAGERESIZE.FULLIMAGE;break;default:c.stepimage.imageresizeoption=IMAGERESIZE.FITTOCANVAS}g(c.speed,"level");g(c.callout,"delay");g(c.stepimage,"maxdiffimageperstep");
g(c.stepimage,"diffimageblocksize");g(c.controlregion,"blinkduration");g(c.controlregion,"blinkinterval");n(c.controlregion,"overidecolor");g(c.general,"rolloverautohideduration");g(c.general,"steptransitiondelay");g(c.general,"enableexternallinks");n(c.cuecard,"numberinfosteps");n(c.cuecard,"numbersystemoutcomesteps");n(c.cuecard,"clusteratflatcuecard");n(c.cuecard,"treeview");n(c.cuecard,"htmltext");n(c.mousebutton,"mousebutton");n(c.mousebutton,"ignoreleft");n(c.mousebutton,"ignoreright");n(c.general,
"rewind");n(c.general,"autoplay");n(c.general,"cursormoveanimation");n(c.mode_show,"available");n(c.mode_show,"screenvideo");n(c.mode_show,"displaycalloutatload");n(c.mode_show,"stepselectable");n(c.mode_show,"enablerollover");n(c.mode_show,"launchcuecard");n(c.mode_guide,"available");n(c.mode_guide,"screenvideo");n(c.mode_guide,"displaycalloutatload");n(c.mode_guide,"stepselectable");n(c.mode_guide,"enablerollover");n(c.mode_guide,"highlighter");n(c.mode_guide,"launchcuecard");n(c.mode_guide,"enableaudio");
n(c.mode_test,"available");if(DEVICE.TOUCH==true)n(c.mode_test,"hidefortouchdevice"),c.mode_test.hidefortouchdevice==true&&(c.mode_test.available=false);n(c.mode_test,"screenvideo");n(c.mode_test,"displaystepdescinnotes");n(c.mode_test,"stepselectable");n(c.mode_test,"enablerollover");n(c.mode_test,"highlighter");n(c.mode_test,"launchcuecard");n(c.mode_test,"bookmark");n(c.mode_test,"promptbookmarkmsg");n(c.mode_test,"enableaudio");n(c.mode_doc,"available");n(c.notes,"customnotesoverridesstepdesc");
n(c.notes,"usestepdesc");n(c.highlighter,"overidecolor");f(c.speed,"cursorspeedfactors",[70,50,25,10,5]);f(c.speed,"typetextspeedfactors",[500,350,200,100,50]);f(c.general,"zoomfactors",[50,75,100,125,150,200]);f(c.media,"avformat_legacy");f(c.media,"avformat_ie");f(c.media,"avformat_safari");f(c.media,"avformat_chrome");f(c.media,"avformat_firefox");f(c.media,"avformat_opera");f(c.media,"avformat_safariipad");n(c.media,"consider_clickaudio");n(c.media,"consider_dblclickaudio");n(c.media,"consider_typetextaudio");
n(c.media,"consider_keypressaudio");n(c.template,"processinfo");n(c.template,"modeindicator");n(c.template,"modeindicatorstart");n(c.template,"notes");n(c.template,"cuecard");o.General.HomeAvailable=uid_json.settings.template.processinfo;o.General.ModeIndicatorAvailable=uid_json.settings.template.modeindicator;o.General.ModeIndicatorStartAvailable=uid_json.settings.template.modeindicatorstart}catch(e){a=false,o.Log("ReadSettings",LOG.EXCEPTION,"",e)}if(a==false)throw"Error @ ReadResources";}catch(d){b=
false,o.Log("MsgFile_onLoadComplete",LOG.EXCEPTION,"",d)}o.onInitComplete(b)}function f(a,b,c){var e=true;try{var f=a[b].split("|");if(f.length==0)f=c;else{var g=true;for(i in f)if(f[i]==NaN){g=false;break}else{var n=Number(f[i]);f[i]=isNaN(n)?f[i]:n}g==false&&(f=c)}a[b]=f}catch(d){e=false,o.Log("MakeArray",LOG.EXCEPTION,"key="+b+"Errored",d)}return e}function n(a,b){var c=true;try{a[b]=a[b]=="0"?false:true}catch(e){c=false,o.Log("MakeBoolean",LOG.EXCEPTION,"key="+b+"Errored",e)}return c}function g(a,
b){var c=true;try{a[b]=parseFloat(a[b])}catch(e){c=false,o.Log("MakeFloat",LOG.EXCEPTION,"key="+b+"Errored",e)}return c}clsPlayerBase.call(this,"clsWizardSettings");this.General={ResizeFactor:1,ActiveMode:MODETYPE.SHOW,ActiveResLoc:"",ActiveStepID:1,AudioButtonEnabled:true,CalloutButtonEnabled:true,PlayState:PLAYSTATE.NONE,TrackLocation:TRACKLOCATION.NONE,Busy:false,SingleStep:false,StepAudioAvailable:false,ScreenVideoAvailable:false,BasicAudioAvailable:false,IsIPadBrowser:false,CalloutsAvailable:false,
TotalNoModes:0,HomeAudioEnabled:true,HomeAvailable:false,GlobalAudio:false,GAFiles:null,GlobalAudioCurFile:"",GlobalAudioCurTime:0,ModeIndicatorAvailable:false,ModeIndicatorAvailableStart:false,ActiveView:EPILEANVIEW.HOME,Language:"epi",WorkflowArray:null,ModeChanged:true,TMAttemptCount:0,VPathSetForSM:0,VPathSetForGM:0,VPathSetForTM:0};this.Settings={};this.BasicAudioFiles={};this.CursorFiles={};this.MouseButtonFiles={};var k="",o=this;this.Initialize=function(){var a=true;try{if(o.onInitComplete==
null)throw"onInitComplete not binded";if(String(navigator.userAgent).toUpperCase().indexOf("IPAD")!=-1)o.Log("SettingsFile_Loaded",LOG.SPECIAL,"ME.General.IsIPadBrowser=true","g_objGS.General.BasicAudioAvailable = false"),o.General.IsIPadBrowser=true;g_objScriptLoader.onLoadComplete=d;g_objScriptLoader.Load(g_StaticURL+"ui/uid.js")}catch(b){a=false,o.Log("Initialize",LOG.EXCEPTION,"",b)}return a};this.SetResizeFactor=function(a,b){var c=true;try{var e=Number(g_objTR.CanvasWidth)/a,f=Number(g_objTR.CanvasHeight)/
b;if(uid_json.settings.stepimage.imageresizeoption!=IMAGERESIZE.FULLIMAGE)if(e>=1&&f>=1)this.General.ResizeFactor=1;else{o.General.ResizeFactor=e<f?e:f;o.General.ResizeFactor=Math.round(this.General.ResizeFactor*100)/100;var g=uid_json.settings.general.defaultzoom==void 0?0:Number(uid_json.settings.general.defaultzoom)/100;if(g>0)uid_json.settings.stepimage.imageresizeoption=IMAGERESIZE.FULLIMAGE;if(g>o.General.ResizeFactor)o.General.ResizeFactor=g}if(g_objTR.SetPopZoomValue()===false)throw"Error @ SetPopZoomValue";
}catch(n){c=false,o.Log("ReadSettings",LOG.EXCEPTION,"",n)}return c};this.GetDragFromText=function(){var a;a=messages_json.psim.commonmsg!=void 0?messages_json.psim.commonmsg:messages_json.psim.canvas.commonmsg;var b="";try{b='<span style="'+a.drag_from.css+'">'+a.drag_from.text+"</span>"}catch(c){o.Log("GetDragFromText",LOG.EXCEPTION,"",c)}return b};this.GetDragToText=function(){var a;a=messages_json.psim.commonmsg!=void 0?messages_json.psim.commonmsg:messages_json.psim.canvas.commonmsg;var b="";
try{b='<span style="'+a.drag_to.css+'">'+a.drag_to.text+"</span>"}catch(c){o.Log("GetDragFromText",LOG.EXCEPTION,"",c)}return b}}
function clsEpilearnPlayer(){function d(){var a=true;try{if(g_objGS.General.HomeAvailable==true)return a;switch(g_objGS.General.ActiveMode){case MODETYPE.SHOW:if(qa.ShowOver==true){if(uid_json.settings.mode_guide.available==true&&qa.GuideOver==false)g_objGS.General.ActiveMode=MODETYPE.GUIDE;else if(uid_json.settings.mode_test.available==true&&qa.TestOver==false)g_objGS.General.ActiveMode=MODETYPE.TEST;g_objGS.General.ActiveStepID="1";g_objGS.General.ActiveResLoc=""}break;case MODETYPE.GUIDE:if(qa.GuideOver==
true){if(uid_json.settings.mode_test.available==true&&qa.TestOver==false)g_objGS.General.ActiveMode=MODETYPE.TEST;else if(uid_json.settings.mode_show.available==true&&qa.ShowOver==false)g_objGS.General.ActiveMode=MODETYPE.SHOW;g_objGS.General.ActiveStepID="1";g_objGS.General.ActiveResLoc=""}break;case MODETYPE.TEST:if(qa.TestOver==true){if(uid_json.settings.mode_show.available==true&&qa.ShowOver==false)g_objGS.General.ActiveMode=MODETYPE.SHOW;else if(uid_json.settings.mode_guide.available==true&&
qa.GuideOver==false)g_objGS.General.ActiveMode=MODETYPE.GUIDE;g_objGS.General.ActiveStepID="1";g_objGS.General.ActiveResLoc=""}else{var b;if(g_objScorm.Enabled===true)b=g_objScorm.BookMark.Weightage;else if(g_objTracker.Enabled==true)b=g_objTracker.BookMark.Weightage;if(b===-1)g_objGS.General.ActiveStepID="1",g_objGS.General.ActiveResLoc=""}}}catch(c){a=false,Q.Log("GetActiveDataFromBookmark",LOG.EXCEPTION,"",c)}return a}function b(){try{if(g_objGS.General.PlayState!=PLAYSTATE.PLAYING&&(g_objGS.General.PlayState=
PLAYSTATE.PLAYING,g_objGS.General.ActiveMode==MODETYPE.SHOW&&g_objTR.SetVCRPlayButtonIcon()==false))throw"Error @ g_objTR.SetVCRPlayButtonIcon";if(W.TaskAfterMIPlayerPlayComplete()===false)throw"Error @ m_objCH.TaskAfterMIPlayerPlayComplete() ";}catch(a){Q.Log("g_objTR_onMIContinueClicked",LOG.EXCEPTION,"",a),B()}}function c(a){try{if(a==false)throw"g_objGS rasied onInitComplete(false)";g_objTracker.TextDirection=uid_json.settings.template.rtl;if(uid_json.settings.general.partialresulttracker!=void 0&&
g_CommandArgs[CMDARGS.EPNPARTIAL]!="1")uid_json.settings.general.partialresulttracker="0",Q.Log("g_objGS_onInitComplete",LOG.TRACE,"ECMS Old Version","Partial Results = 0 ");W.ContentPath="data";if(g_CommandArgs[CMDARGS.LAUNCHSOURCE]==LAUNCHSOURCETYPE.PRESENTATIONEDITOR){if(g_objTracker.Engine=new clsTrackerEpnEngine,g_objTR.Initialize()==false)throw"Error @ g_objTR.Initialize";}else if(g_objPB.SetMessage(messages_json.general.messages.initalize_tracker.text),g_objTracker.CUserID=g_CommandArgs[CMDARGS.PORTALUSERID]||
0,g_objTracker.Initialize(CONTENTTYPE.EPILEARN)==false)throw"Error @ g_objTracker.Initialize";}catch(b){Q.Log("g_objGS_onInitComplete",LOG.EXCEPTION,"",b),Q.onInitComplete(false)}}function e(a){try{if(a==false)throw"g_objTR rasied onInitComplete(false)";g_objCCMover=null;if(uid_json.settings.cuecard.cc_move==="1"&&g_objTR.Cuecard.Available===true&&(g_objCCMover=new clsCuecardMover,g_objCCMover.Initialize()==false))throw"Error @ g_objCCMover.Initialize";if(uid_json.settings.mode_test.available==true||
g_objGS.General.HomeAvailable==true)if(g_objTracker.Engine.Enabled=true,g_objTracker.ContentPreferences==null){g_objTracker.ContentPreferences=new clsTrackerEpnPreference;var b=COMPLETEPREF.LASTSTEP;switch(Number(uid_json.settings.mode_show.modecompleteoption)){case COMPLETEPREF.ANYSTEP:b=COMPLETEPREF.ANYSTEP;break;case COMPLETEPREF.LASTSTEP:b=COMPLETEPREF.LASTSTEP;break;case COMPLETEPREF.ALLSTEP:b=COMPLETEPREF.ALLSTEP}g_objTracker.ContentPreferences.SMPref.CompletePref=b;b=COMPLETEPREF.LASTSTEP;
switch(Number(uid_json.settings.mode_guide.modecompleteoption)){case COMPLETEPREF.ANYSTEP:b=COMPLETEPREF.ANYSTEP;break;case COMPLETEPREF.LASTSTEP:b=COMPLETEPREF.LASTSTEP;break;case COMPLETEPREF.ALLSTEP:b=COMPLETEPREF.ALLSTEP}g_objTracker.ContentPreferences.GMPref.CompletePref=b;g_objTracker.ContentPreferences.TMPassScore=Number(uid_json.settings.mode_test.passscore)}if(g_objGS.General.HomeAvailable==true&&(da=new clsHomePlayer,g_objTR.Home.onPIButtonClick=U,g_objTR.Home.onPIDialogButtonClick=fa,g_objTR.Home.onNextButtonClick=
ha,g_objTR.Home.onPrevButtonClick=ja,g_objTR.Home.onAudioButtonClick=ia,g_objTR.Home.onCloseRequested=ea,g_objTR.Home.onResumeClick=la,g_objTR.Home.onMaximizeButtonClick=R,da.onLoadComplete=q,da.onPlayComplete=u,da.Initialize()==false))throw"Error @ m_objHP.Initialize";if(g_objTracker.Enabled==true){var c=messages_json.general.submitform,e=uid_json.psim.layout.h5dobjects,f=new clsCustomFormCSSText;f.LabelCSS=g_GetCSSForTD(e.submitform.spec.label.css);f.InputBoxCSS=g_GetCSSForTD(e.submitform.spec.inputbox.css);
f.RequiredFieldCSS=g_GetCSSForTD(e.submitform.spec.required.css);f.NoteCSS=g_GetCSSForTD(e.submitform.spec.note.css);if(e.submitform.spec.srvheader!=void 0)f.SurveyHeaderCSS=g_GetCSSForTD(e.submitform.spec.srvheader.css);if(e.submitform.spec.srvtitle!=void 0)f.SurveyTitleCSS=g_GetCSSForTD(e.submitform.spec.srvtitle.css);if(e.submitform.spec.stars!=void 0)f.StarCSS=g_GetCSSForTD(e.submitform.spec.stars.css);f.RequiredFieldtext=c.required.text;if(g_objTracker.CreateCustomForm(g_objTR.TrackerFormHolder,
f)==false)throw"Error @ g_objTracker.CreateCustomForm";}W.CanvasHolder=g_objTR.CanvasDIV;W.CanvasWidth=g_objTR.CanvasWidth;W.CanvasHeight=g_objTR.CanvasHeight;a=true;try{b=true;try{if(g_objScorm.Enabled==true){if(g_objScorm.BookMark.SMCompleted!=null&&Number(g_objScorm.BookMark.SMCompleted)>0)qa.ShowOver=true;if(g_objScorm.BookMark.GMCompleted!=null&&Number(g_objScorm.BookMark.GMCompleted)>0)qa.GuideOver=true;if(g_objScorm.BookMark.TMPassed!=null&&Number(g_objScorm.BookMark.TMPassed)>0)qa.TestOver=
true;if(g_objGS.General.ActiveMode==MODETYPE.TEST&&g_objScorm.BookMark.Weightage!=-1)qa.TestOver=false}else if(g_objTracker.Enabled==true&&g_objTracker.BookMark.LastResloc!=""){if(g_objTracker.BookMark.SMOver==true)qa.ShowOver=true;if(g_objTracker.BookMark.GMOver==true)qa.GuideOver=true;if(g_objTracker.BookMark.TMOver==true)qa.TestOver=true}}catch(g){b=false,Q.Log("UpdateModeStatusForBookmark",LOG.EXCEPTION,"",g)}if(b==false)throw"error @ UpdateModeStatusForBookmark";if(g_objScorm.BookMark.Mode!=
null&&g_objScorm.BookMark.Mode!=""){if(g_objGS.General.ActiveMode=g_objScorm.BookMark.Mode,g_objGS.General.ActiveResLoc=g_objScorm.BookMark.ResLoc,g_objGS.General.ActiveStepID=g_objScorm.BookMark.StepID,d()==false)throw"error @ GetActiveDataFromBookmark";}else if(g_CommandArgs[CMDARGS.LAUNCHMODE]!=null)switch(g_CommandArgs[CMDARGS.LAUNCHMODE]){case "SM":if(uid_json.settings.mode_show.available==true)g_objGS.General.ActiveMode=MODETYPE.SHOW;break;case "GM":if(uid_json.settings.mode_guide.available==
true)g_objGS.General.ActiveMode=MODETYPE.GUIDE;break;case "TM":if(uid_json.settings.mode_test.available==true)g_objGS.General.ActiveMode=MODETYPE.TEST}else if(g_objTracker.BookMark&&(g_objTracker.BookMark.ModetypeID!=""||g_objTracker.BookMark.ModetypeID!=0))if(g_objGS.General.ActiveMode=g_objTracker.BookMark.ModetypeID,g_objGS.General.ActiveResLoc=g_objTracker.BookMark.LastResloc,g_objGS.General.ActiveStepID=g_objTracker.BookMark.LastVisitedStep,d()==false)throw"error @ GetActiveDataFromBookmark";
}catch(n){a=false,Q.Log("SetActiveModeProcessStep",LOG.EXCEPTION,"",n)}if(a==false)throw"Error @ SetActiveModeProcessStep";g_objPB.SetMessage(messages_json.general.messages.reading_content.text);if(W.Initialize()==false)throw"Error @ m_objCH.Initialize";}catch(k){Q.Log("g_objTR_onInitComplete",LOG.EXCEPTION,"",k),Q.onInitComplete(false)}}function a(a){Q.Log("m_objML_onLoadComplete",LOG.ENTRY,"bSuccess",a);var b=true;try{g_objML.onLoadComplete=null;if(a==false)throw"m_objML rasied m_objML_onLoadComplete(false)";
if(g_objGS.General.GlobalAudio==true){if(g_objGS.General.GlobalAudioCurFile=g_objGS.General.GAFiles[0],g_objAudio.Load(g_objGS.General.GAFiles[0])==false)throw"Error @ g_objAudio.Load";}else g()}catch(c){b=false,Q.Log("m_objML_onLoadComplete",LOG.EXCEPTION,"",c)}if(b==false)Q.onInitComplete(b)}function f(a){Q.Log("g_objAudio_onLoadComplete",LOG.ENTRY,"bSuccess",a);var b=true;try{g_objAudio.onLoadComplete=null;if(a==false)throw"g_objAudio raised g_objAudio_onLoadComplete(false)";g()}catch(c){b=false,
Q.Log("g_objAudio_onLoadComplete",LOG.EXCEPTION,"",c)}if(b==false)Q.onInitComplete(b)}function n(a){try{if(g_objAudio.PlayState!=PLAYSTATE.PLAYING)return true;var b=a.CurrentTime;if(b!=0){pa==null&&(pa=W.GetProcessDataObject());var c=W.GetCurrentStepIndex(),e=pa.Steps[c-1];if(e.AudioTrackEnd!=-1&&b>=e.AudioTrackEnd/1E7)if(c++,pa.Steps[c-1]==null){if(W.TaskAfterEFXPlayCompleted(W.EFXData.EndResLoc)==false)throw"Error @ m_objCH.TaskAfterEFXPlayCompleted";}else if(Q.Log("g_objAudio_onPlayStateChange",
LOG.TRACE,"LoadStep",c),Q.Log("g_objAudio_onPlayStateChange",LOG.TRACE,"CurrentTime",b),A(W.CurResloc,c)==false)throw"Error @ LoadStep";}}catch(f){Q.Log("g_objAudio_onPlayStateChange",LOG.EXCEPTION,"",f)}}function g(){var a=true;try{g_objTR.EFXData=W.EFXData;if(g_objTR.BuildCuecard(W.GetCuecardDataObject())==false)throw"Error @ g_objTR.BuildCuecard";g_objGS.General.StepAudioAvailable==false&&g_objGS.General.BasicAudioAvailable==false&&g_objTR.ManageButtonEnableState(VCRBUTTON.AUDIO,false);g_objGS.General.CalloutsAvailable==
false&&g_objTR.ManageButtonEnableState(VCRBUTTON.CALLOUT,false)}catch(b){a=false,Q.Log("CompleteInitialize",LOG.EXCEPTION,"",b)}Q.onInitComplete(a)}function k(a){try{if(a==false)throw"m_objCH rasied onInitComplete(false)";if(g_objML.Initialize()==false)throw"Error @ g_objML.Initialize";if(g_objML.Load()==false)throw"Error @ g_objML.Load";if(g_objGS.General.HomeAvailable==true){a="";a=g_objTracker.ContentPreferences.Title!=void 0&&g_objTracker.ContentPreferences.Title!=""?g_objTracker.ContentPreferences.Title:
efx_json.title;if(g_objTR.Home.DisplayEpilearnTitle(a)==false)throw"Error @ g_objTR.Home.DisplayEpilearnTitle";if(g_objTR.Home.DisplayEpilearnVersion(efx_json.version,efx_json.efxid)==false)throw"Error @ g_objTR.Home.DisplayEpilearnVersion";document.title=a}}catch(b){Q.Log("m_objCH_onInitComplete",LOG.EXCEPTION,"",b),Q.onInitComplete(false)}}function o(a){var b=true;try{if(a==false)throw"m_objCH_onLoadComplete bSuccess=false";}catch(c){b=false,Q.Log("m_objCH_onLoadComplete",LOG.EXCEPTION,"",c)}Q.onLoadComplete(b)}
function v(){B()}function p(a){try{if(a==false)throw"m_objCH_onPlayComplete bSuccess = false";if(W.UpdateSimViewOnEFXPlayComplete()==false)throw"Error @ m_objCH.UpdateSimViewOnEFXPlayComplete()";}catch(b){Q.Log("m_objCH_onPlayComplete",LOG.EXCEPTION,"",b),B()}}function q(a){var b=true;try{if(a==false)throw"m_objHP_onLoadComplete bSuccess=false";}catch(c){b=false,Q.Log("m_objHP_onLoadComplete",LOG.EXCEPTION,"",c)}Q.onLoadComplete(b)}function E(a){try{if(a==false)throw"m_objHP_onLoadComplete2 bSuccess=false";
if(da.Play()==false)throw"Error @ m_objHP.Play()";}catch(b){B(),Q.Log("m_objHP_onLoadComplete2",LOG.EXCEPTION,"",b)}}function u(a){try{a==false&&B()}catch(b){Q.Log("m_objHP_onPlayComplete",LOG.EXCEPTION,"",b),B()}}function B(){try{g_CommandArgs[CMDARGS.LAUNCHSOURCE]!=LAUNCHSOURCETYPE.PRESENTATIONOUTPUT&&alert(messages_json.general.messages.critical_error.text)}catch(a){alert("Critical error. Contact your system administrator for support.")}}function A(a,b){try{if(g_objTR.Stop()==false)throw"Error @ g_objTR.Stop";
if(g_objTR.HideFeedback()==false)throw"Error @ g_objTR.HideFeedback";if(g_objGS.General.PlayState==PLAYSTATE.PLAYENDED)g_objGS.General.PlayState=PLAYSTATE.PAUSED;if(W.Load(a,b)==false)throw"Error @ m_objCH.Load";}catch(c){Q.Log("m_objCH_onLoadComplete",LOG.EXCEPTION,"",c),B()}}function G(){try{if(g_objGS.General.PlayState==PLAYSTATE.PLAYENDED){if(g_objTracker.Engine.Mode_Started(g_objGS.General.ActiveMode)==false)throw"g_objTracker.Mode_Started ";g_objGS.General.PlayState=PLAYSTATE.PLAYING;if(W.Load("",
1)==false)throw"Error @ m_objCH.Load";}else if(g_objGS.General.PlayState=PLAYSTATE.PLAYING,W.Play()==false)throw"Error @ m_objCH.Play()";}catch(a){Q.Log("g_objTR_onVCRPlayClick",LOG.EXCEPTION,"",a),B()}}function D(){try{if(g_objGS.General.PlayState=PLAYSTATE.PAUSED,W.Pause()==false)throw"Error @ m_objCH.Pause";}catch(a){Q.Log("g_objTR_onVCRPauseClick",LOG.EXCEPTION,"",a),B()}}function r(){try{if(Y()==false)throw"Error @ StopCanvasActivities";g_objGS.General.PlayState=PLAYSTATE.STOPPED;if(g_objGS.General.ActiveMode==
MODETYPE.SHOW&&g_objTR.SetVCRPlayButtonIcon()==false)throw"Error @ g_objTR.SetVCRPlayButtonIcon";if(g_objTR.ManageButtonEnableState(VCRBUTTON.STOP,false)==false)throw"Error @ g_objTR.ManageButtonEnableState";if(g_objAudio.Stop()==false)throw"Error @ g_objAudio.Stop";if(W.Load("",1)==false)throw"Error @ m_objCH.Load";}catch(a){Q.Log("g_objTR_onVCRStopClick",LOG.EXCEPTION,"",a),B()}}function H(a,b){try{if(W.Stop()==false)throw"Error @ m_objCH.Stop";if(A(a,Number(b))==false)throw"Error @ LoadStep";if(W.ClearSelectedVariationArray()==
false)throw"Error @ m_objCH.ClearSelectedVariationArray";}catch(c){Q.Log("g_objTR_onStepLoadRequested",LOG.EXCEPTION,"",c),B()}}function C(){try{if(W.Stop()==false)throw"Error @ m_objCH.Stop";if(W.Reload()==false)throw"Error @ m_objCH.ReloadStep";}catch(a){Q.Log("g_objTR_onStepReloadRequested",LOG.EXCEPTION,"",a),B()}}function J(){try{if(g_objGS.General.TrackLocation!=TRACKLOCATION.START){if(W.Stop()==false)throw"Error @ m_objCH.Stop";var a=W.GetPrevStepIndex(),b=W.GetCurrentTaskResLoc();a==-1&&(a=
1,b=W.GetPreviousTaskResLoc(b));if(W.LoadStartStepOfVariationOnPrevClick()==false&&A(b,a)==false)throw"Error @ LoadStep";}}catch(c){Q.Log("g_objTR_onVCRPrevClick",LOG.EXCEPTION,"",c),B()}}function I(){try{if(W.Stop()==false)throw"Error @ m_objCH.Stop";g_objGS.General.WorkflowArray.length===1&&g_objTR.ManageWorkFlowHomeButtonState(BUTTONSTATE.DISABLED);var a=g_objGS.General.WorkflowArray.pop();if(W.Load(a.ResLoc,a.StepID)==false)throw"Error @ m_objCH.Load";}catch(b){Q.Log("g_objTR_onWorkFlowHomeClicked",
LOG.EXCEPTION,"",b),B()}}function L(){try{if(g_objGS.General.TrackLocation!=TRACKLOCATION.END){if(W.Stop()==false)throw"Error @ m_objCH.Stop";if(g_objGS.General.GlobalAudio==true&&g_objAudio.Stop()==false)throw"Error @ g_objAudio.Stop";var a=W.GetNextStepIndex(),b=W.GetCurrentTaskResLoc();a==-1&&(a=1,b=W.GetNextTaskResLoc(b));if(W.LoadJumpStepOfVariationOnNextClick()==false&&A(b,a)==false)throw"Error @ LoadStep";}}catch(c){Q.Log("g_objTR_onVCRNextClick",LOG.EXCEPTION,"",c),B()}}function N(a){var b=
true,c=0;try{switch(a.AttachmentType){case ATTACHMENTTYPE.URL:var e=window.open(a.Attachment,"_blank");break;case ATTACHMENTTYPE.CONTENT:a.Attachment=encodeURIComponent(a.Attachment);e=window.open();e.location=id+"\\"+a.Attachment;break;case ATTACHMENTTYPE.STEP:Q.JumpTo("",a.Attachment)}}catch(f){b=false,Q.Log("g_objTR_onWFShapeClicked",LOG.EXCEPTION,"",f),c=f.number}try{b==false&&!(BROWSER.IE==true&&c==-2147023673)&&B()}catch(g){}}function M(a){try{if(a.Start!=""){if(W.SetCurrentVariationOption(a)==
false)throw"Error @m_objCH.SetCurrentVariationOption()";Q.JumpTo("",a.Start)}else a.Jump!=""&&Q.JumpTo("",a.Jump)}catch(b){Q.Log("g_objTR_onVariationOptionClicked",LOG.EXCEPTION,"",b)}}function K(){try{if(W.Stop()==false)throw"Error @ m_objCH.Stop";var a=W.GetNextStepIndex(),b=W.GetCurrentTaskResLoc();a==-1&&(a=1,b=W.GetNextTaskResLoc(b));if(b==W.EFXData.EndResLoc){var c=W.GetSelectedVariations();if(c!=null&&c.length>0){c[c.length-1].EndCompleted=true;var e=c[c.length-1].Jump;c.pop();oa(e)}else if(W.TaskAfterEFXPlayCompleted(b)==
false)throw"Error @ m_objCH.TaskAfterEFXPlayCompleted()";}else if(W.PlayVariationDefaultOptionOnContinueClick()==false&&A(b,a)==false)throw"Error @ LoadStep";}catch(f){Q.Log("g_objTR_onVCRNextClick",LOG.EXCEPTION,"",f),B()}}function F(){}function T(){}function S(a){try{g_objGS.General.AudioButtonEnabled=a;if(a==false&&g_objGS.General.PlayState!=PLAYSTATE.PLAYENDED&&W.RemoveAudio()==false)throw"Error @ m_objCH.RemoveAudio";if(g_objGS.General.GlobalAudio==true&&g_objAudio.Mute(!a)==false)throw"Error @ g_objAudio.Mute";
}catch(b){Q.Log("g_objTR_onAudioButtonClick",LOG.EXCEPTION,"",b),B()}}function O(a){try{if(g_objGS.General.CalloutButtonEnabled=a,a==false&&g_objGS.General.PlayState!=PLAYSTATE.PLAYENDED&&W.RemoveCallout()==false)throw"Error @ m_objCH.RemoveCallout";}catch(b){Q.Log("g_objTR_onCalloutButtonClick",LOG.EXCEPTION,"",b),B()}}function P(){try{g_objGS.General.ActiveView=EPILEANVIEW.HOME;if(W.ClearSelectedVariationArray()==false)throw"Error @ m_objCH.ClearSelectedVariationArray";if(g_objTR.Show()==false)throw"Error @ g_objTR.Show";
if(W.Stop()==false)throw"Error @ m_objCH.Stop";if(g_objTracker.Engine.Mode_Ended()==false)throw"g_objTracker.Mode_Ended";if(g_objScorm.Enabled==true){if(da.ShowSummaryDetails(HOMESUMMARYCALLER.SCORM,false)==false)throw"error @ ShowSummaryDetails";}else if(g_objTracker.Enabled==true){if(da.ShowSummaryDetails(HOMESUMMARYCALLER.TRACKER,false)==false)throw"error @ ShowSummaryDetails";}else if(da.ShowSummaryDetails(HOMESUMMARYCALLER.PSIM,false)==false)throw"error @ ShowSummaryDetails";if(uid_json.settings.general.partialresulttracker!=
void 0&&uid_json.settings.general.partialresulttracker=="1"&&W.onProcessPlayComplete()==false)throw"error @ ME.onProcessPlayComplete()";}catch(a){Q.Log("g_objTR_onHomeClicked",LOG.EXCEPTION,"",a),B(),B()}}function z(a){try{if(a==MODETYPE.TEST&&uid_json.settings.mode_test.limitattempt=="1"){if(g_objGS.General.TMAttemptCount>=Number(uid_json.settings.mode_test.maxattempt)){var b=messages_json.general.messages.tm_attempt_msg.text.replace("%1",uid_json.settings.mode_test.maxattempt);b!=""&&(b+="\n\n");
b+=messages_json.general.messages.tm_attempt_exceed_msg.text;alert(b);setTimeout(g_objTR.ResetTestModeButton,100);return}g_objGS.General.TMAttemptCount++}g_objGS.General.ActiveView=EPILEANVIEW.SIM;if(da.Stop()==false)throw"Error @ m_objHP.Stop";if(g_objTR.Show()==false)throw"Error @ g_objTR.Show()";g_objGS.General.ModeChanged=true;if(W.ClearSelectedVariationArray()==false)throw"Error @ m_objCH.ClearSelectedVariationArray";if(Z(a)==false)throw"Error @ ModeChangeRequested(eModeType)";}catch(c){Q.Log("g_objTR_onModeChangeRequestedFromHome",
LOG.EXCEPTION,"",c),B()}}function X(a){try{if(a==MODETYPE.TEST&&uid_json.settings.mode_test.limitattempt=="1"){if(g_objGS.General.TMAttemptCount>=Number(uid_json.settings.mode_test.maxattempt)){var b=messages_json.general.messages.tm_attempt_msg.text.replace("%1",uid_json.settings.mode_test.maxattempt);b!=""&&(b+="\n\n");b+=messages_json.general.messages.tm_attempt_exceed_msg.text;alert(b);setTimeout(g_objTR.ResetTestModeButton,100);return}g_objGS.General.TMAttemptCount++}if(a==MODETYPE.SHOW&&g_objGS.General.ActiveMode!=
MODETYPE.SHOW)g_objGS.General.PlayState=PLAYSTATE.STOPPED;g_objGS.General.Busy=false;g_objTR.SetBusyFlag(false);if(g_objGS.General.ActiveMode==a)g_objGS.General.ModeChanged=false;else if(g_objGS.General.ModeChanged=true,W.ClearSelectedVariationArray()==false)throw"Error @ m_objCH.ClearSelectedVariationArray";if(Z(a)==false)throw"Error @ ModeChangeRequested(eModeType)";}catch(c){Q.Log("g_objTR_onModeChangeRequested",LOG.EXCEPTION,"",c),B()}}function Z(a){var b=true;try{if(g_objGS.General.WorkflowArray!==
null&&(g_objGS.General.WorkflowArray=[],g_objTR.ManageWorkFlowHomeButtonState(BUTTONSTATE.DISABLED)==false))throw"error @ g_objTR.ManageWorkFlowHomeButtonState";if(g_objTracker.Engine.Mode_Started(a)==false)throw"g_objTracker.Mode_Started ";if(Y()==false)throw"Error @ StopCanvasActivities";if(g_objGS.General.ActiveMode!=MODETYPE.SHOW&&a==MODETYPE.SHOW&&(g_objGS.General.PlayState=PLAYSTATE.PLAYING,g_objTR.SetVCRPlayButtonIcon()==false))throw"Error @ g_objTR.SetVCRPlayButtonIcon";g_objGS.General.ActiveMode=
a;if(g_objGS.General.PlayState!=PLAYSTATE.PLAYING&&(g_objGS.General.PlayState=PLAYSTATE.PLAYING,g_objGS.General.ActiveMode==MODETYPE.SHOW&&g_objTR.SetVCRPlayButtonIcon()==false))throw"Error @ g_objTR.SetVCRPlayButtonIcon";if(g_objTR.ManageSimViewForModeChange()==false)throw"Error @ g_objTR.ManageSimViewForModeChange";if(W.SetMode()==false)throw"Error @ m_objCH.SetMode";if(g_objTR.Cuecard.Reset()==false)throw"Error @ g_objTR.Cuecard.Reset";if(na()==false)throw"Error @ HandleCalloutMuteSettings";if(ka()==
false)throw"Error @ HandleCalloutTurnOffSettings";if(uid_json.settings.general.singleaudio=="1")if(g_objTR.ManageButtonEnableState(VCRBUTTON.AUDIO,false),g_objGS.General.ActiveMode!=MODETYPE.SHOW){if(g_objAudio.Stop()==false)throw"Error @ g_objAudio.Stop";}else if(g_objAudio.SetCurrentTime(0)==false)throw"Error @ g_objAudio.SetCurrentTime";if(W.Load("",1)==false)throw"Error @ m_objCH.Load";Q.m_TMVisitedNavRegions=[]}catch(c){b=false,Q.Log("ModeChangeRequested",LOG.EXCEPTION,"",c)}return b}function Y(){var a=
true;try{if(g_objTR.HideFeedback()==false)throw"Error @ g_objTR.HideFeedback";if(W.Stop()==false)throw"Error @ m_objCH.Stop";if(FlyWeight.Stop()==false)throw"Error @ FlyWeight.Stop ";}catch(b){a=false,Q.Log("StopCanvasActivities",LOG.EXCEPTION,"",b)}return a}function U(a){try{if(da.Stop()==false)throw"Error @ m_objHP.Stop";if(da.Load(a)==false)throw"Error @ m_objHP.Load";}catch(b){Q.Log("m_objHP_PIbtnClicked",LOG.EXCEPTION,"",b)}}function fa(){try{if(da.ShowPIDialog()==false)throw"Error @ m_objHP.ShowPIDialog";
}catch(a){Q.Log("m_objHP_PIDialogbtnClicked",LOG.EXCEPTION,"",a)}}function R(){try{if(da.MaximizePIData()==false)throw"Error @ m_objHP.MaximizePIData";}catch(a){Q.Log("m_objHP_onMaximizeButtonClick",LOG.EXCEPTION,"",a)}}function la(){try{if(g_objGS.General.ActiveMode===MODETYPE.TEST)g_objTrackerData.TMResumed=true;g_objGS.General.ActiveView=EPILEANVIEW.SIM;if(g_objTR.Show()==false)throw"Error @ g_objTR.Show";if(g_objTracker.Engine.Mode_Started(g_objGS.General.ActiveMode)==false)throw"g_objTracker.Mode_Started ";
if(g_objTR.ManageSimViewForModeChange()==false)throw"Error @ g_objTR.ManageSimViewForModeChange";if(W.SetMode()==false)throw"Error @ m_objCH.SetMode()";if(W.Load(g_objGS.General.ActiveResLoc,g_objGS.General.ActiveStepID)==false)throw"Error @ m_objCH.Load";}catch(a){Q.Log("m_objHP_ResumeBtnClicked",LOG.EXCEPTION,"",a)}}function ha(){try{da.DisplayNextParagraph()}catch(a){Q.Log("m_objHP_NextBtnClicked",LOG.EXCEPTION,"",a)}}function ja(){try{da.DisplayPrevParagraph()}catch(a){Q.Log("m_objHP_PrevBtnClicked",
LOG.EXCEPTION,"",a)}}function ia(){try{da.ManageHomeAudio()}catch(a){Q.Log("m_objHP_AudiobtnClicked",LOG.EXCEPTION,"",a)}}function ba(a){var b=true;try{if(a==false)if(g_objTracker.Error!=ECMSERRORS.NONE){var c=g_objTracker.ErrorMessage;uid_json.settings.general.quitwhentrackerfails=="1"?(c=c.replace("%1",tracker_json.TrackerURL),alert(c),g_CloseWindow=true,g_QuitEpilearn(),b=false):(c=c.replace("%1",tracker_json.TrackerURL),c+="\n\n"+messages_json.general.tracker.allow_on_error.text,alert(c))}else throw"g_objTracker_onInitComplete > bSuccess=false";
if(b==true&&(g_objPB.SetMessage(messages_json.general.messages.initalize_scorm.text),g_objScorm.Initialize(CONTENTTYPE.EPILEARN)==false))throw"Error @ g_objScorm.Initialize";}catch(e){Q.Log("g_objTracker_onInitComplete",LOG.EXCEPTION,"",e),Q.onInitComplete(false)}}function ca(a){var b=true;try{if(a==false)if(g_objScorm.Handler.ErrorCode==SCORMERRORCODES.OPENERNOTAVAILABLE||g_objScorm.Handler.ErrorCode==SCORMERRORCODES.APINULL){Q.Log("g_objScorm_onInitComplete",LOG.ERROR,"g_objScorm.Handler.ErrorCode=",
g_objScorm.Handler.ErrorCode);var c=messages_json.general.messages.scorm_error.text;uid_json.settings.general.quitwhenscormfails=="1"?(alert(c),g_CloseWindow=true,g_QuitEpilearn(),b=false):(sTrkMsg=messages_json.general.messages.scorm_error_continue.text,alert(sTrkMsg))}else throw"Error @ g_objScorm_onInitComplete, bSuccess=false ";if(b==true){if(g_objScorm.Enabled===true){try{if(window.dialogArguments)try{sa=window.dialogArguments}catch(e){}if(window.opener)try{sa=window.opener}catch(f){}}catch(g){Q.Log("GetParentWindow",
LOG.EXCEPTION,"",g)}sa.g_ScormEnabled=true}else if(window.document.URL.toUpperCase().substr(0,4)=="HTTP"&&g_objTracker.Enabled==true&&g_objTracker.GenPreferences.EnablePortal==true){var n=aa(window.document.URL),d=aa(g_objTracker.URL);if(n.hostname==d.hostname&&g_CommandArgs[CMDARGS.LAUNCHMODE]==null&&Number(g_objTracker.ContentPreferences.Session)!=1)return c=messages_json.general.tracker.content_access_denied.text,alert(c),g_CloseWindow=true,g_QuitEpilearn(),false}if(g_objScorm.Enabled==true&&g_objTracker.Enabled==
true)g_objTracker.CustomFormAvailable=false;g_objPB.SetMessage(messages_json.general.messages.rendering_template.text);g_objTracker.Engine.Enabled=g_objTracker.Engine.Enabled||g_objScorm.Enabled;if(g_objTR.Initialize()==false)throw"Error @ g_objTR.Initialize";}}catch(k){Q.Log("g_objScorm_onInitComplete",LOG.EXCEPTION,"",k),Q.onInitComplete(false)}}function aa(a){try{var b=document.createElement("a");b.href=a;return b}catch(c){}}function V(){try{if(g_objTracker.ValidateCustomForm()==false)throw"Error @ g_objTracker.ValidateCustomForm()";
if(g_objTracker.CustomFieldsValidated==false)g_objTR.SubmitFormCancelled();else if(g_objTracker.SendResults()==false)throw"Error @ g_objTracker.SendResults()";}catch(a){B(),Q.Log("g_objTR_onSendRequested",LOG.EXCEPTION,"",a)}}function ea(){try{if(g_CloseWindow=true,Q.Finalize()==false)throw"Error @ ME.Finalize()";}catch(a){B(),Q.Log("g_objTR_onCloseRequested",LOG.EXCEPTION,"",a)}}function ga(a){try{if(a==true){if(va===true){a=true;try{g_objTrackerData.Modes=[],g_objTrackerData.Summary.Modes[MODETYPE.SHOW].Attempts=
0,g_objTrackerData.Summary.Modes[MODETYPE.SHOW].TrackerCompleted=0,g_objTrackerData.Summary.Modes[MODETYPE.SHOW].NotCompleted=0,g_objTrackerData.Summary.Modes[MODETYPE.GUIDE].Attempts=0,g_objTrackerData.Summary.Modes[MODETYPE.GUIDE].TrackerCompleted=0,g_objTrackerData.Summary.Modes[MODETYPE.GUIDE].NotCompleted=0,g_objTrackerData.Summary.Modes[MODETYPE.TEST].Attempts=0,g_objTrackerData.Summary.Modes[MODETYPE.TEST].TrackerCompleted=0,g_objTrackerData.Summary.Modes[MODETYPE.TEST].NotCompleted=0}catch(b){a=
false,Q.Log("DeleteTrackerDataAlreadySent",LOG.EXCEPTION,"",b)}if(a==false)throw"Error @ DeleteTrackerDataAlreadySent()";Aa=true;g_objTracker.Enabled=true}else g_objTracker.Enabled=false;g_objTR.TrackerForm.ShowLoadingImage(true);g_objTracker.CrossDomainPost===false&&g_objTR.TrackerForm.ShowStatus(true);g_objScorm.Enabled==true?ra():g_objTracker.CrossDomainPost===false?setTimeout(g_QuitEpilearn,500):setTimeout(g_QuitEpilearn,1)}else g_objTracker.Enabled=true,va==true?g_objTR.TrackerForm.Hide():(g_objTR.TrackerForm.ShowLoadingImage(false),
g_objTR.TrackerForm.ShowStatus(false))}catch(c){B(),Q.Log("g_objTracker_onSendComplete",LOG.EXCEPTION,"",c)}}function ra(){try{if(g_objScorm.SendResults()==false)throw"Error @ g_objScorm.SendResults";sa.g_ScormStatus=g_objScorm.Status;g_QuitEpilearn()}catch(a){B(),Q.Log("SendScormResultsAndQuit",LOG.EXCEPTION,"",a)}}function ka(){var a=true;try{var b=false;g_objGS.General.ActiveMode==MODETYPE.SHOW&&uid_json.settings.mode_show.turnoffcallout=="1"?b=true:g_objGS.General.ActiveMode==MODETYPE.GUIDE&&
uid_json.settings.mode_guide.turnoffcallout=="1"?b=true:g_objGS.General.ActiveMode==MODETYPE.TEST&&uid_json.settings.mode_test.turnoffcallout=="1"&&(b=true);if(b==true&&g_objTR.SetCalloutState(BUTTONSTATE.DISABLED)==false)throw"Error @ g_objTR.SetCalloutState";}catch(c){a=false,Q.Log("HandleCalloutTurnOffSettings",LOG.EXCEPTION,"",c)}return a}function na(){var a=true;try{var b=false;g_objGS.General.ActiveMode==MODETYPE.SHOW&&uid_json.settings.mode_show.mutecallout=="1"?b=true:g_objGS.General.ActiveMode==
MODETYPE.GUIDE&&uid_json.settings.mode_guide.mutecallout=="1"?b=true:g_objGS.General.ActiveMode==MODETYPE.TEST&&uid_json.settings.mode_test.mutecallout=="1"&&(b=true);if(b==true&&(g_objGS.General.CalloutButtonEnabled=false,g_objTR.SetCalloutState(BUTTONSTATE.CLICKED)==false))throw"Error @ g_objTR.SetCalloutState";}catch(c){a=false,Q.Log("HandleCalloutMuteSettings",LOG.EXCEPTION,"",c)}return a}function ma(){var a=true;try{if(Q.Finalize(true)==false)throw"Error @ ME.Finalize()";}catch(b){a=false,Q.Log("m_objCH_onProcessPlayComplete",
LOG.EXCEPTION,"",b)}return a}function oa(a){try{a!=""&&Q.JumpTo("",a)}catch(b){Q.Log("m_objCH_onVariationCompleted",LOG.EXCEPTION,"",b)}}clsPlayerBase.call(this,"clsEpilearnPlayer");var Q=this,W=new clsCanvasHandler,da=null,sa=null,qa={ShowOver:false,GuideOver:false,TestOver:false,DocOver:false},va,Aa=false;this.m_TMVisitedNavRegions=[];var pa=null;this.Initialize=function(){var g=true;try{if(Q.onInitComplete==null)throw"onInitComplete not binded";g_objGS=new clsWizardSettings;g_objTR=new clsTemplateRenderer;
g_objML=new clsMediaLoader;g_objTracker=new clsTracker;g_objScorm=new clsScorm;g_objAudio=new clsAudioPlayer;if(g_objAudio.Initialize()==false)throw"Erroro @ g_objAudio.Initialize";var d=true;try{g_objGS.onInitComplete=c,g_objTR.onInitComplete=e,g_objTR.onVCRPlayClick=G,g_objTR.onVCRPauseClick=D,g_objTR.onVCRStopClick=r,g_objTR.onVCRFirstClick=T,g_objTR.onVCRLastClick=F,g_objTR.onVCRPrevClick=J,g_objTR.onVCRNextClick=L,g_objTR.onWorkFlowHomeClicked=I,g_objTR.onContinueClick=K,g_objTR.onWFShapeClicked=
N,g_objTR.onVariationOptionClicked=M,g_objTR.onModeChangeRequested=X,g_objTR.onModeChangeRequestedFromHome=z,g_objTR.onHomeClicked=P,g_objTR.onAudioButtonClick=S,g_objTR.onCalloutButtonClick=O,g_objTR.onStepLoadRequested=H,g_objTR.onStepReloadRequested=C,g_objTR.onMIContinueClicked=b,g_objTR.onInfoStepContinueClicked=L,W.onInitComplete=k,W.onLoadComplete=o,W.onPlayComplete=p,W.onError=v,W.onProcessPlayComplete=ma,W.onVariationCompleted=oa,W.onAutoPlayDefaultVariationOption=M,g_objML.onLoadComplete=
a,g_objTR.onSendRequested=V,g_objTR.onCloseRequested=ea,g_objTracker.onInitComplete=ba,g_objTracker.onSendComplete=ga,g_objScorm.onInitComplete=ca,g_objAudio.onPlayStateChange=n,g_objAudio.onLoadComplete=f}catch(q){d=false,Q.Log("AttachEvents",LOG.EXCEPTION,"",q)}if(d==false)throw"Error @ AttachEvents";if(g_objGS.Initialize()==false)throw"Erroro @ g_objGS.Initialize";}catch(u){g=false,Q.Log("Initialize",LOG.EXCEPTION,"",u)}return g};this.Load=function(){var a=true;try{if(Q.onLoadComplete==null)throw"onLoadComplete not binded";
var b=false;if(g_objGS.General.HomeAvailable==true)if(g_objScorm.Enabled==true)if(g_objGS.General.ActiveResLoc==""&&g_objScorm.Status!=SCORMSTATUS.BROWSED&&g_objScorm.Status!=SCORMSTATUS.REVIEWED)Q.onLoadComplete(true);else{if(g_objGS.General.ActiveResLoc!=""&&(b=true),da.LoadSummaryDetails(HOMESUMMARYCALLER.SCORM,b,qa)==false)throw"error @ LoadSummaryDetails";}else if(g_objTracker.Enabled==true)if(g_objGS.General.ActiveResLoc=="")Q.onLoadComplete(true);else{if(da.LoadSummaryDetails(HOMESUMMARYCALLER.TRACKER,
true,qa)==false)throw"error @ LoadSummaryDetails";}else q(true);else{if(g_objTracker.Engine.Mode_Started(g_objGS.General.ActiveMode)==false)throw"Error @ g_objTracker.Mode_Started";if(g_objTR.Cuecard.Reset()==false)throw"Error @ g_objTR.Cuecard.Reset";if(na()==false)throw"Error @ HandleCalloutMuteSettings";if(W.Load(g_objGS.General.ActiveResLoc,g_objGS.General.ActiveStepID)==false)throw"Error @ m_objCH.Load";}}catch(c){a=false,Q.Log("Load",LOG.EXCEPTION,"",c)}return a};this.onNavigationRegionClicked=
function(a){try{if(a.Start!=""){if(W.SetCurrentVariationOption(a)==false)throw"Error @m_objCH.SetCurrentVariationOption()";Q.JumpTo("",a.Start)}else a.Jump!=""&&Q.JumpTo("",a.Jump)}catch(b){Q.Log("onNavigationRegionClicked",LOG.EXCEPTION,"",b)}};this.Play=function(){try{W.onLoadComplete=null;if(g_objGS.General.HomeAvailable==true){g_objGS.General.PlayState=PLAYSTATE.PLAYING;g_objGS.General.ActiveView=EPILEANVIEW.HOME;if(g_objTR.Show()==false)throw"Error @ g_objTR.Show";da.onLoadComplete=E;if(da.SummaryLoaded==
false&&da.Load(1)==false)throw"Error @ m_objHP.Load";if(g_objGS.General.ActiveMode==MODETYPE.SHOW&&g_objTR.SetVCRPlayButtonIcon()==false)throw"Error @ g_objTR.SetVCRPlayButtonIcon";}else{g_objGS.General.ActiveView=EPILEANVIEW.SIM;if(g_objTR.Show()==false)throw"Error @ g_objTR.Show";if(g_objTR.ManageSimViewForModeChange()==false)throw"Error @ g_objTR.ManageSimViewForModeChange";var a=false;if(g_objGS.General.ActiveMode==MODETYPE.SHOW&&uid_json.settings.general.autoplay==true)a=true;else if(g_objGS.General.ActiveMode==
MODETYPE.GUIDE||g_objGS.General.ActiveMode==MODETYPE.TEST)a=true;if(a==true){g_objGS.General.PlayState=PLAYSTATE.PLAYING;if(g_objGS.General.ActiveMode==MODETYPE.SHOW&&g_objTR.SetVCRPlayButtonIcon()==false)throw"Error @ g_objTR.SetVCRPlayButtonIcon";if(W.Play()==false)throw"Error @ m_objCH.Play";}else g_objGS.General.PlayState=PLAYSTATE.PAUSED,g_objGS.General.ModeIndicatorAvailable==false&&g_objGS.General.ActiveMode==MODETYPE.SHOW&&g_objTR.SetFocus(VCRBUTTON.PLAY);if(g_objGS.General.ModeIndicatorAvailable==
true){var b=MITYPE.SMSTART;switch(g_objGS.General.ActiveMode){case MODETYPE.SHOW:b=MITYPE.SMSTART;break;case MODETYPE.GUIDE:b=MITYPE.GMSTART;break;case MODETYPE.TEST:b=MITYPE.TMSTART}g_objTR.MIRenderer.SetFocus(b)}}if(na()==false)throw"Error @ HandleCalloutMuteSettings";if(ka()==false)throw"Error @ HandleCalloutTurnOffSettings";uid_json.settings.general.singleaudio=="1"&&g_objTR.ManageButtonEnableState(VCRBUTTON.AUDIO,false)}catch(c){Q.Log("Play",LOG.EXCEPTION,"",c),B()}};this.Stop=function(){try{if(g_objTR.Stop()==
false)throw"Error @ g_objTR.Stop";if(W.Stop()==false)throw"Error @ m_objCH.Stop";}catch(a){}};this.Finalize=function(a){var b=true;try{va=a;if(g_objGS.General.ActiveView==EPILEANVIEW.SIM){if(W.Stop()==false)throw"Error @ m_objCH.Stop";}else if(da.Stop()==false)throw"Error @ m_objCH.Stop";if(g_objTrackerData!=null&&g_objTrackerData.Modes.length==0&&Aa!==true)g_objTracker.Enabled=false;if(g_objTracker.Enabled==true||g_objScorm.Enabled==true){if(g_objTracker.Engine.FinalizeTrackerData()==false)throw"Error @ FinalizeTrackerData";
if(g_objTR.ToggleTrackerPage(va)==false)throw"Error @ g_objTR.ToggleTrackerPage()";var c=true;try{var e=false;if(g_objTrackerData.Modes.length>0){var f=g_objTrackerData.Modes[g_objTrackerData.Modes.length-1];if(f.ModeType===MODETYPE.TEST)if(g_objScorm.Enabled==true){g_ErrorFlag=false;a:{var g=false;try{if(uid_json.settings.mode_test.bookmark==false||uid_json.settings.mode_test.promptbookmarkmsg==false){e=g;break a}if(g_objScorm.PromptTMBookmark==false||f.ScormCompleted==true){e=g;break a}var n=true;
if((sco_json.tmonly=="1"?true:false)==false){var d=true,k=true;uid_json.settings.mode_show.available==true&&Number(g_objScorm.BookMark.SMCompleted)==0&&g_objTrackerData.Summary.Modes[MODETYPE.SHOW].ScormCompleted==0&&(d=false);uid_json.settings.mode_guide.available==true&&Number(g_objScorm.BookMark.GMCompleted)==0&&g_objTrackerData.Summary.Modes[MODETYPE.GUIDE].ScormCompleted==0&&(k=false);if(d==false||k==false)n=false;n==false?f.ScormCompleted==false&&f.Score<g_objScorm.TMPassScore&&(g=true):g_objTrackerData.Summary.Modes[MODETYPE.TEST].ScormPassed==
0&&Number(g_objScorm.BookMark.TMPassed)==0&&(uid_json.settings.general.lessonstatusoption=="1"?g_objTrackerData.Summary.Modes[MODETYPE.TEST].ScormCompleted==0&&(g=true):g=true)}else g_objTrackerData.Summary.Modes[MODETYPE.TEST].ScormPassed==0&&(g=true)}catch(o){g_ErrorFlag=true,Q.Log("ConfirmBookmarkForScorm",LOG.EXCEPTION,"",o)}e=g}if(g_ErrorFlag==true)throw"Error @ ConfirmBookmarkForScorm";}else if(g_objTracker.Enabled==true){g=g_ErrorFlag=false;try{g_objTracker.BookMark.TMOver==false&&g_objTracker.ContentPreferences.TMBookmark===
true&&g_objTracker.ContentPreferences.TMBookmarkPromptMsg===true&&f.TrackerStatus===TRACKERMODESTATUS.NOTCOMPLETED&&f.TrackerCompleted==false&&(g=true)}catch(p){g_ErrorFlag=true,Q.Log("ConfirmBookmarkForTracker",LOG.EXCEPTION,"",p)}e=g;if(g_ErrorFlag==true)throw"Error @ ConfirmBookmarkForTracker";}}if(e===true&&confirm(messages_json.general.messages.confirm_bookmark.text)===true)g_objTrackerData.ConsiderWeightage=true}catch(C){c=false,Q.Log("ConfirmBookmarkIfRequired",LOG.EXCEPTION,"",C)}if(c==false)throw"Error @ ConfirmBookmarkIfRequired()";
if(g_objTracker.Enabled==true)if(g_objTracker.CustomFormAvailable==false){if(g_objTracker.SendResults()==false)throw"Error @ g_objTracker.SendResults";}else if(a!==true){if(g_objTR.ToggleSubmitButton(true)==false)throw"Error @ ToggleSubmitButton(true)";if(g_objTR.ToggleCloseButton(true)==false)throw"Error @ ToggleCloseButton(true)";if(g_objTracker.SetFocus()==false)throw"Error @ g_objTracker.SetFocus";}else{if(g_objTR.ToggleSubmitButton(false)==false)throw"Error @ ToggleSubmitButton(false)";if(g_objTR.ToggleCloseButton(false)==
false)throw"Error @ ToggleCloseButton(true)";if(g_objTracker.SendResults()==false)throw"Error @ g_objTracker.SendResults";}else g_objScorm.Enabled==true&&ra()}else g_QuitEpilearn()}catch(q){b=false,Q.Log("Finalize",LOG.EXCEPTION,"",q)}return b};this.JumpTo=function(a,b){var c=true;try{if(W.Stop()==false)throw"Error @ m_objCH.Stop";if(g_objTR.Stop()==false)throw"Error @ g_objTR.Stop";if(g_objTR.HideFeedback()==false)throw"Error @ g_objTR.HideFeedback";if(g_objGS.General.PlayState==PLAYSTATE.PLAYENDED)g_objGS.General.PlayState=
PLAYSTATE.PAUSED;if(W.JumpTo(a,b)==false)throw"Error @ m_objCH.JumpTo";}catch(e){c=false,Q.Log("JumpTo",LOG.EXCEPTION,"",e)}return c}}
function clsCanvasHandler(){function d(a,b){var c=true;try{if(b==void 0)throw"StepIndex is not supplied, it should be one. undefined not allowed";if(q.CurStepIndex<1)throw"StepIndex should be more that 0";if(g_objTR.Cuecard.ShowTMDescForProcess(a)==false)throw"Error @ g_objTR.Cuecard.ShowTMDescForProcess";if(g_objTR.SetAudioAnimation(false)==false)throw"Error @ g_objTR.SetAudioAnimation";if(g_objTR.SetStepCountMessage("")==false)throw"Error @ g_objTR.SetStepCountMessage";if(g_objTR.Cuecard.HighlightStep(a,
b)==false)throw"Error @ g_objTR.Cuecard.HighlightStep";r=E.GetTask(a);if(r==null)throw"Failed to get task "+a;if(a==""&&r!=null)a=r.ResLoc;if(r==null)throw"Failed to get task "+a;q.CurResloc=r.ResLoc;if(g_objTR.Cuecard.ShowTMDescForProcess(a)==false)throw"Error @ g_objTR.Cuecard.ShowTMDescForProcess";var e=true;try{g_objGS.General.TrackLocation=TRACKLOCATION.BETWEEN;if(r.PrevResLoc==""&&q.CurStepIndex==1)g_objGS.General.TrackLocation=TRACKLOCATION.START;else if(r.NextResLoc==q.EFXData.EndResLoc)if(r.Type==
TASKTYPE.PROCESS)if(g_objGS.General.PlayState==PLAYSTATE.PLAYENDED)g_objGS.General.TrackLocation=TRACKLOCATION.END;else{if(r.Steps.length==Number(q.CurStepIndex))g_objGS.General.TrackLocation=TRACKLOCATION.END}else g_objGS.General.TrackLocation=TRACKLOCATION.END;if(g_objTR.SetVCRButtonEnableState()==false)throw"Error @ g_objTR.SetVCRButtonEnableState()";}catch(f){e=false,q.Log("SetTrackLocation",LOG.EXCEPTION,"",f)}if(e==false)throw"Error @ SetTrackLocation";switch(r.Type){case TASKTYPE.PROCESS:if((b==
1||g_objTracker.Engine.CurResloc=="")&&r.ResLoc!=g_objTracker.Engine.CurResloc){if(g_objTracker.Engine.Task_Started(r)==false)throw"Error @ g_objTracker.Task_Started";if(g_objTracker.Engine.Process_Started(r)==false)throw"Error @ g_objTracker.Process_Started";}var e=b,g=true;try{if(e==void 0||e==""||e==-1)e=1;D=u;u.ProcessTaskData=r;if(uid_json.settings.stepimage.imageresizeoption==IMAGERESIZE.WRTBIGIMAGE&&g_objGS.SetResizeFactor(r.BigWidth,r.BigHeight)==false)throw"Error @ g_objGS.SetResizeFactor";
if(u.Load(e)==false)throw"Error @ m_objProcessPlayer.Load";}catch(n){g=false,q.Log("LoadProcessPlayer",LOG.EXCEPTION,"",n)}if(g==false)throw"Error @ LoadProcessPlayer";break;case TASKTYPE.QUESTION:e=true;try{D=A;if(A.Load(r)==false)throw"Error @ m_objQuestionPlayer.Load";if(g_objTR.ToggleCanvasAndMIQ(false,false)==false)throw"Error @ g_objTR.ToggleCanvasAndMIQ";}catch(d){e=false,q.Log("LoadQuestionPlayer",LOG.EXCEPTION,"",d)}if(e==false)throw"Error @ LoadMIQPlayer";break;case TASKTYPE.MANUAL:e=true;
try{D=B;if(B.Load(r)==false)throw"Error @ m_objManualPlayer.Load";if(g_objTR.ToggleCanvasAndMIQ(false,false)==false)throw"Error @ g_objTR.ToggleCanvasAndMIQ";}catch(k){e=false,q.Log("LoadManualPlayer",LOG.EXCEPTION,"",k)}if(e==false)throw"Error @ LoadMIQPlayer";}q.CurStepIndex=b}catch(o){c=false,q.Log("LoadNext()",LOG.EXCEPTION,"",o)}return c}function b(a){var b=true;try{if(a==false)throw"m_objMIPlayer_onPlayComplete bSuccess=false";if(q.TaskAfterMIPlayerPlayComplete()==false)throw"Error @ ME.TaskAfterMIPlayerPlayComplete";
}catch(c){b=false,q.Log("m_objMIPlayer_onPlayComplete",LOG.EXCEPTION,"",c)}if(b==false)q.onError()}function c(a,b){var c=true;try{if(D=G,G.Load(a,b)==false)throw"Error @ m_objMIPlayer.Load";}catch(e){c=false,q.Log("LoadModeIndicatorPlayer",LOG.EXCEPTION,"",e)}return c}function e(a){try{if(a==false)throw"m_objDREFX.Initialize raised Flase flag";q.EFXData=E.GetEFXDataObject();if(g_objIPL.Initialize(q.EFXData)==false)throw"Error @ g_objIPL.Initialize";}catch(b){q.Log("m_objDREFX_onInitComplete",LOG.EXCEPTION,
"",b),q.onInitComplete(false)}}function a(a){var b=true;try{if(a==false)throw"g_objIPL.Initialize raised false flag";if(B.Initialize()==false)throw"Error @ m_objManualPlayer.Initialize";if(A.Initialize()==false)throw"Error @ m_objQuestionPlayer.Initialize";u.CanvasHolder=q.CanvasHolder;if(u.Initialize()==false)throw"Error @ m_objProcessPlayer.Initialize";q.Initialized=PLAYSTATE.INITIALIZED}catch(c){b=false,q.Log("g_objIPL_onInitComplete",LOG.EXCEPTION,"",c)}q.onInitComplete(b)}function f(a){try{if(a==
q.EFXData.EndResLoc){if(q.TaskAfterEFXPlayCompleted(a)==false)throw"Error @ ME.TaskAfterEFXPlayCompleted()";}else if(d(a,1)==false)throw"Error @  LoadNext()";}catch(b){q.Log("m_objQuestionPlayer_onChoiceClick",LOG.EXCEPTION,"",b),q.onError(false)}}function n(a){try{if(g_objGS.General.PlayState==PLAYSTATE.NONE)v(a);else if(a==false)q.onError();else if(g_objGS.General.PlayState==PLAYSTATE.PLAYING&&p()==false)throw"Error @ PlayCanvas()";}catch(b){v(false),q.Log("m_objActivePlayer_onLoadComplete",LOG.EXCEPTION,
"",b)}}function g(a){try{if(a==false)throw"ProcessPlayer returned onPlayComplete(false)";if(q.onProcessPlayComplete==null)throw"ME.onProcessPlayComplete == null";if(g_objGS.General.GlobalAudio==true&&g_objGS.General.ActiveMode==MODETYPE.SHOW){if(g_objAudio.SetCurrentTime(0)==false)throw"Error @ g_objAudio.SetCurrentTime";if(g_objAudio.Stop()==false)throw"Error @ g_objAudio.Stop";}if(q.TaskAfterEFXPlayCompleted(r.NextResLoc)==false)throw"Error @ ME.TaskAfterEFXPlayCompleted";}catch(b){q.Log("m_objProcessPlayer_onPlayComplete",
LOG.EXCEPTION,"",b),q.onError()}}function k(a){try{if(a==false)throw"QuestionPlayer returned PlayComplete(false)";if(q.TaskAfterEFXPlayCompleted(r.NextResLoc)==false)throw"Error @ ME.TaskAfterEFXPlayCompleted";}catch(b){q.Log("m_objQuestionPlayer_onPlayComplete",LOG.EXCEPTION,"",b),q.onError()}}function o(a){try{if(a==false)throw"ManualPlayer returned PlayComplete(false)";if(q.TaskAfterEFXPlayCompleted(r.NextResLoc)==false)throw"Error @ ME.TaskAfterEFXPlayCompleted";}catch(b){q.Log("m_objManualPlayer_onPlayComplete",
LOG.EXCEPTION,"",b),q.onError()}}function v(a){try{q.onLoadComplete(a)}catch(b){q.onLoadComplete(false)}}function p(){var a=true;try{if(g_objGS.General.ActiveMode==MODETYPE.SHOW&&g_objTR.ManageButtonEnableState(VCRBUTTON.STOP,true)==false)throw"Error @ g_objTR.ManageButtonEnableState";if(D.Play()==false)throw"Error @ m_objActivePlayer.Play";}catch(b){a=false,q.Log("Play",LOG.EXCEPTION,"",b)}return a}clsPlayerBase.call(this,"clsCanvasHandler");this.EFXData="EFXData";this.CanvasHolder=null;this.ContentFileName=
this.ContentPath="";this.CanvasHeight=this.CanvasWidth=0;this.CurStepIndex=-1;this.CurResloc="-1";this.onProcessPlayComplete=this.onError=null;var q=this,E=new clsDataReader,u=new clsProcessPlayer,B=new clsManualPlayer,A=new clsQuestionPlayer,G=new clsModeIndicatorPlayer,D=null,r=null;this.onAutoPlayDefaultVariationOption=this.onVariationCompleted=null;this.Initialize=function(){var c=true;try{if(q.Initialized==PLAYSTATE.INITIALIZED)throw"Already initialized";if(q.CanvasHolder==null)throw"CanvasHolder not supplied";
if(q.onInitComplete==null)throw"ME.onInitComplete not binded";if(q.onLoadComplete==null)throw"ME.onLoadComplete not binded";if(q.onPlayComplete==null)throw"ME.onPlayComplete not binded";if(q.onVariationCompleted==null)throw"onVariationCompleted not binded";if(q.onAutoPlayDefaultVariationOption==null)throw"onAutoPlayDefaultVariationOption not binded";g_objIPL=new clsImagePreloader;var d=true;try{E.onInitComplete=e,g_objIPL.onInitComplete=a,u.onLoadComplete=n,u.onPlayComplete=g,u.onVariationCompleted=
q.onVariationCompleted,u.onAutoPlayDefaultVariationOption=q.onAutoPlayDefaultVariationOption,A.onPlayComplete=k,A.onLoadComplete=n,A.onChoiceClick=f,B.onPlayComplete=o,B.onLoadComplete=n,G.onLoadComplete=n,G.onPlayComplete=b}catch(p){d=false,q.Log("AttachEvents",LOG.EXCEPTION,"",p)}if(d==false)throw"Error @ AttachEvents";if(g_objGS.General.ModeIndicatorAvailable==true&&G.Initialize()==false)throw"Error @ m_objMIPlayer.Initialize";E.ContentPath=q.ContentPath;if(E.Initialize(q.CanvasHolder,q.ContentFileName)==
false)throw"Error @ m_objDREFX.Initialize";}catch(r){c=false,q.Log("Initialize",LOG.EXCEPTION,"",r)}return c};this.Reload=function(){var a=true;try{if(u.bReloaded=true,d(q.CurResloc,u.CurrentStepIndex)===false)throw"Error @ LoadNext()";}catch(b){a=false,q.Log("ReLoad",LOG.EXCEPTION,"",b)}return a};this.Load=function(a,b){var e=true;try{a=a||"";b=b||1;if(q.Initialized!=PLAYSTATE.INITIALIZED)throw"Not Initialized";q.CurStepIndex=Number(b);if(g_objGS.General.ModeIndicatorAvailable===true&&g_objGS.General.ModeIndicatorStartAvailable===
true&&a==""){if(c(g_objGS.General.ActiveMode,MILOCATION.START)==false)throw"Error @ LoadModeIndicatorPlayer";}else{if(g_objGS.General.ModeIndicatorAvailable===true){if(g_objTR.ShowCanvas()==false)throw"Error @ g_objTR.ShowCanvas";if(g_objTR.MIRenderer.Hide()==false)throw"Error @ g_objTR.MIRenderer.Hide";}if(d(a,b)==false)throw"Error @  LoadNext()";}}catch(f){e=false,q.Log("Load",LOG.EXCEPTION,"",f)}return e};this.TaskAfterMIPlayerPlayComplete=function(){var a=true;try{if(g_objTR.ShowCanvas()==false)throw"Error @ g_objTR.ShowCanvas";
if(g_objTR.MIRenderer.Hide()==false)throw"Error @ g_objTR.MIRenderer.Hide";if(G.Stop()==false)throw"Error @ m_objMIPlayer.Stop";if(d("",1)==false)throw"Error @  LoadNext()";}catch(b){a=false,q.Log("TaskAfterMIPlayerPlayComplete",LOG.EXCEPTION,"",b)}if(a==false)q.onError()};this.GetCurrentTaskResLoc=function(){var a="";try{if(r!=null)a=r.ResLoc}catch(b){q.Log("GetCurrentTaskResLoc",LOG.EXCEPTION,"",b)}return a};this.GetPreviousTaskResLoc=function(a){var b=new String("");try{if(q.EFXData.Tasks[a]!=
void 0)b=q.EFXData.Tasks[a].PrevResLoc}catch(c){q.Log("GetPreviousTaskResLoc",LOG.EXCEPTION,"ignore this error",c)}return b};this.GetNextTaskResLoc=function(a){var b=new String("");try{if(q.EFXData.Tasks[a]!=void 0)b=q.EFXData.Tasks[a].NextResLoc}catch(c){q.Log("GetNextTaskResLoc",LOG.EXCEPTION,"ignore this error",c)}return b};this.GetPrevStepIndex=function(){var a=-1;try{if(r.Type==TASKTYPE.PROCESS)for(var b,c=-1,e=r.GetStepObject(u.CurrentStepIndex),c=e.IsSubStep==true?e.GroupStepParentIndex-1:
u.CurrentStepIndex-1;;){b=r.GetStepObject(c);if(b==null)break;if(b.IsSubStep==true)c=b.GroupStepParentIndex,b=r.GetStepObject(c);if(b.InMode[g_objGS.General.ActiveMode]==true){a=c;break}c--}}catch(f){q.Log("GetPrevStepIndex",LOG.EXCEPTION,"",f)}return a};this.GetNextStepIndex=function(){var a=-1;try{if(r.Type==TASKTYPE.PROCESS)for(var b,c=u.CurrentStepIndex+1;;){b=r.GetStepObject(c);if(b==null)break;if(b.IsSubStep==true){var e=r.GetStepObject(b.GroupStepParentIndex),c=e.GroupStepParentIndex+e.SubStepCount+
1;b=r.GetStepObject(c)}if(b.InMode[g_objGS.General.ActiveMode]==true){a=c;break}c++}}catch(f){q.Log("GetNextStepIndex",LOG.EXCEPTION,"",f)}return a};this.GetProcessDataObject=function(){return r};this.GetCurrentStepIndex=function(){return u.CurrentStepIndex};this.JumpTo=function(a,b){var c=true;try{var e=0;for(i in r.Steps)if(r.Steps[i].TPSID==b){e=i;break}e++;var f={ResLoc:q.CurResloc,StepID:u.CurrentStepIndex};g_objGS.General.WorkflowArray!=void 0&&(g_objGS.General.WorkflowArray.push(f),g_objTR.ManageWorkFlowHomeButtonState(BUTTONSTATE.NORMAL));
if(d(a,e)===false)throw"Error @ LoadNext()";}catch(g){c=false,q.Log("JumpTo",LOG.EXCEPTION,"",g)}return c};this.TaskAfterEFXPlayCompleted=function(a){var b=true;try{if(g_objTR.Stop()==false)throw"Error @ g_objTR.Stop";if(g_objAudio.Stop()==false)throw"Error @ g_objAudio.Stop";if(a==q.EFXData.EndResLoc){if(g_objTracker.Engine.Mode_Ended()==false)throw"g_objTracker.Mode_Ended";if(g_objGS.General.ModeIndicatorAvailable==true){if(c(g_objGS.General.ActiveMode,MILOCATION.END)==false)throw"Error @ LoadModeIndicatorPlayer";
}else if(q.UpdateSimViewOnEFXPlayComplete()==false)throw"Error @ ME.UpdateSimViewOnEFXPlayComplete";if(uid_json.settings.general.partialresulttracker!=void 0&&uid_json.settings.general.partialresulttracker=="1"&&q.onProcessPlayComplete()==false)throw"error @ ME.onProcessPlayComplete()";}else if(d(a,1)==false)throw"Error @ LoadNext";}catch(e){b=false,q.Log("ME.TaskAfterEFXPlayCompleted",LOG.EXCEPTION,"",e)}return b};this.UpdateSimViewOnEFXPlayComplete=function(){var a=true;try{var b;b=messages_json.psim.statustext!=
void 0?messages_json.psim.statustext:messages_json.psim.canvas.statustext;if(uid_json.settings.general.rewind==true&&g_objGS.General.ActiveMode==MODETYPE.SHOW){if(g_objTracker.Engine.Mode_Started(g_objGS.General.ActiveMode)==false)throw"g_objTracker.Mode_Started ";g_objGS.General.PlayState=PLAYSTATE.PAUSED;if(g_objTR.SetVCRPlayButtonIcon()==false)throw"Error @ g_objTR.SetVCRPlayButtonIcon";if(d("",1)==false)throw"Error @ LoadNext";}else{g_objGS.General.PlayState=PLAYSTATE.PLAYENDED;var c="",e=uid_json.psim.layout.specs.statusbar;
switch(g_objGS.General.ActiveMode){case MODETYPE.SHOW:c="<span style='"+g_GetCSSForTD(e.play_completed.css)+"'>"+b.sm_statustext_play_completed.text+"</span>";break;case MODETYPE.GUIDE:c="<span style='"+g_GetCSSForTD(e.play_completed.css)+"'>"+b.gm_statustext_play_completed.text+"</span>";break;case MODETYPE.TEST:c="<span style='"+g_GetCSSForTD(e.play_completed.css)+"'>"+b.tm_statustext_play_completed.text+"</span>"}if(g_objGS.General.ActiveMode==MODETYPE.SHOW){if(g_objTR.SetVCRPlayButtonIcon()==
false)throw"Error @ g_objTR.SetVCRPlayButtonIcon";}else{var f;if(f=g_objGS.General.ActiveMode==MODETYPE.TEST&&g_objGS.General.ModeIndicatorAvailable==false){b=true;try{var g;g=messages_json.psim.cuecard!=void 0?messages_json.psim.cuecard:messages_json.psim.canvas.cuecard.common;var n=e="",n=g_objTrackerData.Modes[g_objTrackerData.Modes.length-1].Score,e=g_objScorm.Enabled==true?g_objScorm.TMPassScore:g_objTracker.Enabled==true?g_objTracker.ContentPreferences.TMPassScore:uid_json.settings.mode_test.passscore,
k="",k=Number(n)>=Number(e)?g.result_pass.text:g.result_fail.text,k=k.replace("%1",e),k=k.replace("%2",n);if(g_objTR.Cuecard.SetResultText(k)==false)throw"Error @ g_objTR.Cuecard.SetResultText";if(Number(uid_json.settings.mode_test.cuecardbehavior)==CCBEHAVIOURTM.SHOWONCOMPLETE&&g_objTR.Cuecard.ShowStepDetails()==false)throw"Error @ g_objTR.Cuecard.ShowStepDetails";}catch(o){b=false,q.Log("DisplayTestResult",LOG.EXCEPTION,"",o)}f=b==false}if(f)throw"Error @ DisplayTestResult";}if(g_objTR.StatusBar.Show(bContinueVisible=
false)==false)throw"Error @ g_objTR.StatusBar.Show";if(g_objTR.StatusBar.SetMessage(c)==false)throw"Error @ g_objTR.StatusBar.SetMessage";}}catch(p){a=false,q.Log("UpdateSimViewOnEFXPlayComplete",LOG.EXCEPTION,"",p)}return a};this.GetTask=function(a){return E.GetTask(a)};this.Play=function(){var a=true;try{if(p()==false)throw"Error @ PlayCanvas";}catch(b){a=false,q.Log("Play",LOG.EXCEPTION,"",b)}return a};this.Pause=function(){try{D!=null&&D.Pause()}catch(a){q.Log("Pause",LOG.EXCEPTION,"",a)}};this.Stop=
function(){try{if(D!=null){if(g_objGS.General.GlobalAudio==true&&g_objGS.General.ActiveMode==MODETYPE.SHOW&&g_objAudio.Pause()==false)throw"Error @ g_objAudio.Play";if(D.Stop()==false)throw"Error @ m_objActivePlayer.Stop";D=null}}catch(a){q.Log("Stop",LOG.EXCEPTION,"",a)}};this.GetCuecardDataObject=function(){var a=null;try{a=E.CuecardData}catch(b){q.Log("GetCuecardDataObject",LOG.EXCEPTION,"",b)}return a};this.RemoveAudio=function(){var a=true;try{if(D.RemoveAudio!=void 0&&D.RemoveAudio()==false)throw"Error @ m_objActivePlayer.RemoveAudio";
}catch(b){a=false,q.Log("RemoveAudio",LOG.EXCEPTION,"",b)}return a};this.RemoveCallout=function(){var a=true;try{if(D.RemoveCallout!=void 0&&D.RemoveCallout()==false)throw"Error @ m_objActivePlayer.RemoveCallout";}catch(b){a=false,q.Log("RemoveCallout",LOG.EXCEPTION,"",b)}return a};this.SetMode=function(){var a=true;try{if(u.SetMode()==false)throw"Error @ m_objProcessPlayer.SetMode";}catch(b){a=false,q.Log("SetMode",LOG.EXCEPTION,"",b)}return a};this.SetCurrentVariationOption=function(a){var b=true;
try{if(u.SetCurrentVariationOption(a)==false)throw"Error @ m_objProcessPlayer.SetCurrentVariationOption";}catch(c){b=false,q.Log("SetCurrentVariationOption",LOG.EXCEPTION,"",c)}return b};this.PlayVariationDefaultOptionOnContinueClick=function(){var a=true;try{u.PlayVariationDefaultOptionOnContinueClick()==false&&(a=false)}catch(b){a=false,q.Log("PlayVariationDefaultOptionOnContinueClick",LOG.EXCEPTION,"",b)}return a};this.ClearSelectedVariationArray=function(){var a=true;try{if(u.ClearSelectedVariationArray()==
false)throw"Error @ m_objProcessPlayer.ClearSelectedVariationArray";}catch(b){a=false,q.Log("ClearSelectedVariationArray",LOG.EXCEPTION,"",b)}return a};this.LoadJumpStepOfVariationOnNextClick=function(){var a=false;try{if(u.SelectedVariations.length>0){var b=u.SelectedVariations[u.SelectedVariations.length-1];r.GetStepObject(u.CurrentStepIndex).TPSID==b.End&&(q.JumpTo("",b.Jump),a=true)}}catch(c){a=false,q.Log("LoadJumpStepOfVariation",LOG.EXCEPTION,"",c)}return a};this.LoadStartStepOfVariationOnPrevClick=
function(){var a=false;try{if(u.SelectedVariations.length>0){var b=u.SelectedVariations[u.SelectedVariations.length-1];r.GetStepObject(u.CurrentStepIndex).TPSID==b.Start&&(q.JumpTo("",b.TPSID),a=true)}}catch(c){a=false,q.Log("LoadJumpStepOfVariation",LOG.EXCEPTION,"",c)}return a};this.GetSelectedVariations=function(){try{return u.SelectedVariations}catch(a){q.Log("GetSelectedVariations",LOG.EXCEPTION,"",a)}return null}}
clsCuecardDataBuilder=function(){function d(a){var c=new clsStepDataCC;try{c.TPSID=a.id;c.FrameType=FRAMETYPE.CLUSTER;if(a.incue=="0")c.Visible=false;var g=null;if(a.text!=void 0){for(i in a.text)if(a.text[i].id==g_objGS.General.Language){g=a.text[i];break}g==null&&(e.Log("ExtractClusterData",LOG.ERROR,"TextNode not found for LangKey = ",g_objGS.General.Language),e.Log("ExtractClusterData",LOG.ERROR,"Selecting first available TextNode",""),g=a.text[0])}else g=a;c.Caption=g.htxt_data;if(c.Caption.length==
0)c.Caption="-";for(var n in a)n.indexOf("cl_")==0?(g=null,g=d(a[n]),g!=null&&c.Steps.push(g)):n.indexOf("s_")==0&&(g=null,f++,g=b(a[n]),g!=null&&c.Steps.push(g))}catch(k){c=null,e.Log("ExtractClusterData",LOG.EXCEPTION,"",k)}return c}function b(a){var b=new clsStepDataCC;try{if(a.ss==void 0||a.ss=="0"){if(a.incue=="0")b.Visible=false;b.TPSID=a.id;b.FrameType=FRAMETYPE.FRAME;b.StepIndex=f;var d=a.sy.toUpperCase();b.StepType=d;var B=null;if(a.text!=void 0){for(i in a.text)if(a.text[i].id==g_objGS.General.Language){B=
a.text[i];break}B==null&&(e.Log("ExtractStepData",LOG.ERROR,"TextNode not found for LangKey = ",g_objGS.General.Language),e.Log("ExtractStepData",LOG.ERROR,"Selecting first available TextNode",""),B=a.text[0])}else B=a;b.Caption=d==STEPTYPE.INFOSTEP?g_Decrypt(B.infcap_data):d==STEPTYPE.VARIATION?B.ptxt_data:uid_json.settings.cuecard.htmltext=="1"?g_Decrypt(B.htxt_data):g_Decrypt(B.ptxt_data);B=true;d==STEPTYPE.INFOSTEP&&uid_json.settings.cuecard.numberinfosteps=="0"&&(B=false);d==STEPTYPE.WINDOWACTIVATE&&
uid_json.settings.cuecard.numbersystemoutcomesteps=="0"&&(B=false);if(d==STEPTYPE.VARIATION){var A,d={HideForSM:false,HideForGM:false,HideForTM:false};try{if(g_CommandArgs[CMDARGS.VARIATIONSHIDE]!=void 0){if(g_CommandArgs[CMDARGS.VARIATIONSHIDE][b.TPSID]=="1"){if(g_objGS.General.VPathSetForSM==1)d.HideForSM=true;if(g_objGS.General.VPathSetForGM==1)d.HideForGM=true;if(g_objGS.General.VPathSetForTM==1)d.HideForTM=true}}else{if(uid_json.settings.mode_show.variationpath=="1"&&uid_json.settings.mode_show.hidevariationstep==
"1")d.HideForSM=true;if(uid_json.settings.mode_guide.variationpath=="1"&&uid_json.settings.mode_guide.hidevariationstep=="1")d.HideForGM=true;if(uid_json.settings.mode_test.variationpath=="1"&&uid_json.settings.mode_test.hidevariationstep=="1")d.HideForTM=true}}catch(G){d=null,e.Log("CheckWhetherToHideVariationStepForMode",LOG.EXCEPTION,"",G)}A=d;A!=null&&(A.HideForSM==true&&k.push(b),A.HideForGM==true&&o.push(b),A.HideForTM==true&&v.push(b))}b.IsSAAttached=c(a,MEDIATYPE.STEPAUDIO);b.IsSVAttached=
c(a,MEDIATYPE.SCREENVIDEO);b.IsEVAttached=c(a,MEDIATYPE.EXTNVIDEO);a:{a=b;try{for(x in p.Tasks)if(p.Tasks[x].Type==TASKTYPE.PROCESS)for(y in p.Tasks[x].Steps)if(a.TPSID==p.Tasks[x].Steps[y].TPSID){a.InMode[MODETYPE.SHOW]=p.Tasks[x].Steps[y].InMode[MODETYPE.SHOW];a.InMode[MODETYPE.GUIDE]=p.Tasks[x].Steps[y].InMode[MODETYPE.GUIDE];a.InMode[MODETYPE.TEST]=p.Tasks[x].Steps[y].InMode[MODETYPE.TEST];p.Tasks[x].Steps[y].VariationAutoPlaySM==true&&(a.InMode[MODETYPE.SHOW]=false);p.Tasks[x].Steps[y].VariationAutoPlayGM==
true&&(a.InMode[MODETYPE.GUIDE]=false);p.Tasks[x].Steps[y].VariationAutoPlayTM==true&&(a.InMode[MODETYPE.TEST]=false);break a}}catch(D){e.Log("UpdateInModeFromEfxObject",LOG.EXCEPTION,"",D)}}b.SlNo="";b.SlNoSM="";b.SlNoGM="";b.SlNoTM="";if(B==true){if(b.InMode[MODETYPE.SHOW]==true&&b.Visible==true)b.SlNoSM=n++;if(b.InMode[MODETYPE.GUIDE]==true&&b.Visible==true)b.SlNoGM=g++;if(b.InMode[MODETYPE.TEST]==true&&b.Visible==true)b.SlNoTM=m_SlNoTM++}}else b.Visible=false,b.TPSID=a.id}catch(r){b=null,e.Log("ExtractStepData",
LOG.EXCEPTION,"",r)}return b}function c(a,b){var c=false;try{if(a.md!=void 0){var f=a.md,g,n;for(g=0;g<f.length;g++)n=f[g].id.toUpperCase(),n==b&&(c=true)}}catch(d){e.Log("IsMediaAvailable",LOG.EXCEPTION,"",d)}return c}clsPlayerBase.call(this,"clsCuecardDataBuilder");var e=this,a=null,f=new Number(0),n=new Number(1),g=new Number(1);new Number(1);var k=[],o=[],v=[],p;this.Create=function(c){try{p=c;var k,o;a=new clsEFXDataCC;a.TMDescription=efx_json.tm_desc!=void 0?efx_json.tm_desc:"";for(k=0;k<efx_json.tsk.length;k++)switch(o=
efx_json.tsk[k].id.toUpperCase(),o){case TASKTYPE.START:var B=new clsTaskDataCC(TASKTYPE.START);B.ResLoc=efx_json.tsk[k].rl;B.NextResLocs=Array(efx_json.tsk[k].nrl);B.Caption="Start";a.Tasks.push(B);break;case TASKTYPE.PROCESS:var A,v=efx_json.tsk[k],D=new clsTaskDataCC(TASKTYPE.PROCESS);try{for(c in D.ResLoc=v.rl,D.NextResLocs=Array(v.nrl),D.Caption=v.tskcap_data,D.ProcessTestData=v.ptd.HTMLDecode()||"",D.TMDescription=v.tm_desc!=void 0?v.tm_desc:"",c=void 0,m_SlNoTM=g=n=1,f=0,v)if(c.indexOf("cl_")==
0){var r=null,r=d(v[c]);r!=null&&D.Steps.push(r)}else c.indexOf("s_")==0&&(r=null,f++,r=b(v[c]),r!=null&&D.Steps.push(r))}catch(H){D=null,e.Log("ExtractTaskData",LOG.EXCEPTION,"",H)}A=D;if(A==null)throw"ExtractTaskData returned null";a.Tasks.push(A);break;case TASKTYPE.QUESTION:var C=new clsTaskDataCC(TASKTYPE.QUESTION);C.ResLoc=efx_json.tsk[k].rl;C.Caption=g_Decrypt(efx_json.tsk[k].tskcap_data);var J=efx_json.tsk[k].ch,I,c=[],r=[];for(I=0;I<J.length;I++)c.push(J[I].nrl),r.push(J[I].ch_data);C.NextResLocs=
c;C.Choices=r;a.Tasks.push(C);break;case TASKTYPE.MANUAL:var L=new clsTaskDataCC(TASKTYPE.MANUAL);L.ResLoc=efx_json.tsk[k].rl;L.NextResLocs=Array(efx_json.tsk[k].nrl);L.Caption=g_Decrypt(efx_json.tsk[k].tskcap_data);a.Tasks.push(L);break;case TASKTYPE.END:var N=new clsTaskDataCC(TASKTYPE.END);N.ResLoc=efx_json.tsk[k].rl;N.Caption="End";a.Tasks.push(N)}}catch(M){a=null,e.Log("Create",LOG.EXCEPTION,"",M)}return a}};
function clsImagePreloader(){function d(){g.Log("InitiateStepImagePreload",LOG.ENTRY);var a=null;try{for(var f=Number(uid_json.settings.stepimage.diffimageblocksize)*Number(uid_json.settings.stepimage.maxdiffimageperstep);f>0;){var n=new Image;n.onload=c;n.onerror=e;A.push(n);f--}if(A.length==0)throw g.Log("InitiateStepImagePreload",LOG.TRACE,"uid_json.settings.stepimage.diffimageblocksize",uid_json.stepimage.general.diffimageblocksize),g.Log("InitiateStepImagePreload",LOG.TRACE,"uid_json.settings.stepimage.maxdiffimageperstep",
uid_json.stepimage.general.maxdiffimageperstep),"Failed to create Image Array for Preload...why ???";for(var d in k.Tasks)k.Tasks[d].Type==TASKTYPE.PROCESS&&G.push(k.Tasks[d]);if(G.length==0)throw"Failed to create ArrayList of Process from EFXDATA Object...???";p=G[D++];if(b()==false)throw"error @ LoadStepImagesForPreLoad";}catch(o){a=null,g.Log("InitiateStepImagePreload",LOG.EXCEPTION,"",o)}return a}function b(){var a=true;try{for(var b=B=u=0,c="",e=[];;){if(q<p.Steps.length){var f=p.Steps[q],n=
"";try{f.Type!=STEPTYPE.INFOSTEP?E<f.DiffImages.length?(n=f.DiffImages[E].ImagePath,E++,E==f.DiffImages.length-1&&(q++,E=0)):(q++,E=0):(q++,E=0)}catch(d){n="",g.Log("ExtractStepImageSrcFromStep",LOG.EXCEPTION,"",d)}c=n;c!=""&&e.push(c)}else if(D<G.length)p=G[D++],E=q=0;else break;b++;if(b==A.length)break}B=e.length;var b=0,k;for(k in e)A[b++].src=e[k]}catch(o){a=false,g.Log("LoadStepImagesForPreLoad",LOG.EXCEPTION,"",o)}return a}function c(){try{u++,B==u&&p!=null&&setTimeout(b,100)}catch(a){g.Log("PreLoadStepImage_onLoad",
LOG.EXCEPTION,"",a)}}function e(){try{u++,g.Log("onBasicImage_LoadError",LOG.ERROR,"Step Image Preload error for > ",this.src)}catch(a){g.Log("onBasicImage_LoadError",LOG.EXCEPTION,"",a)}}function a(){var a=true;try{v.length>0?n(v.pop()):(g.Initialized=PLAYSTATE.INITIALIZED,g.onInitComplete(true))}catch(b){a=false,g.Log("onBasicImage_Loaded",LOG.EXCEPTION,"",b)}try{if(a==false)g.onInitComplete(false)}catch(c){g.Log("onBasicImage_Loaded",LOG.EXCEPTION,"2",c)}}function f(){try{g.Log("onBasicImage_LoadError",
LOG.EXCEPTION,"",this.src),g.onInitComplete(false)}catch(a){g.Log("onBasicImage_LoadError",LOG.EXCEPTION,"",a)}}function n(b){var c=true;try{g.Log("LoadBasicImage",LOG.TRACE,"Loading Basic Image > ",o[b].ImagePath),o[b].onload=a,o[b].onerror=f,o[b].src=o[b].ImagePath}catch(e){c=false,g.Log("LoadBasicImage",LOG.EXCEPTION,"2",e)}try{if(c==false)g.onInitComplete(false)}catch(n){g.Log("LoadBasicImage",LOG.EXCEPTION,"2",n)}}clsPlayerBase.call(this,"clsImagePreloader");var g=this,k,o={},v=[],p,q=Number(0),
E=Number(0),u=Number(0),B=Number(0),A=[],G=[],D=Number(0);this.Initialize=function(a){var b=true;try{if(g.onInitComplete==null)throw"onInitComplete not binded";k=a;var c=true;try{for(var e in a.BasicImages){var f=new Image;f.ImagePath=a.BasicImages[e];f.ImageKey=e;o[e]=f;v.push(e)}}catch(p){c=false,g.Log("LoadBasicImage",LOG.EXCEPTION,"2",p)}if(c==false)throw"Failed to create basic image objects";if(v.length>0){if(n(v.pop())==false)throw"Error @ LoadBasicImage";}else g.Initialized=PLAYSTATE.INITIALIZED,
g.onInitComplete(true);window.document.URL.toUpperCase().substr(0,4)=="HTTP"&&setTimeout(d,10)}catch(u){b=false,g.Log("Initialize",LOG.EXCEPTION,"",u)}return b};this.GetBasicImage=function(a){var b=null;try{b=o[a]}catch(c){b=null,g.Log("GetBasicImage",LOG.EXCEPTION,"",c)}return b}}
function clsMediaLoader(){function d(){e.Log("g_objTR_onEnableAudioClick",LOG.ENTRY);try{if(a.Load(g_ChkAudioFile)==false)throw"Error @ m_objStepAudio.Load";}catch(c){e.Log("g_objTR_onEnableAudioClick",LOG.EXCEPTION,"",c),b(false)}}function b(b){e.Log("RaiseOnLoadEvent",LOG.ENTRY);try{if(a!=null)a.onLoadComplete=null;if(g_objTR.HideAudioEnableWindow()==false)throw"Error @ HideAudioEnableWindow";e.onLoadComplete(b)}catch(c){e.Log("RaiseOnLoadEvent",LOG.EXCEPTION,"",c),e.onLoadComplete(false)}}function c(){b(true)}
clsPlayerBase.call(this,"clsMediaLoader");var e=this,a=null;this.Initialize=function(){var b=true;try{if(e.Initialized==PLAYSTATE.INITIALIZED)return true;if(g_objGS.General.StepAudioAvailable==true){a=FlyWeight.GetObject(PLAYABLEOBJECTS.STEPAUDIO);if(a==null)throw"m_objStepAudio is null";a.onLoadComplete=c}e.Initialized=PLAYSTATE.INITIALIZED}catch(n){b=false,e.Log("Initialize",LOG.EXCEPTION,"",n)}return b};this.Load=function(){var c=true;try{if(e.Initialized==PLAYSTATE.NOTINITIALIZED)throw"Object not initialized";
if(e.onLoadComplete==null)throw"onLoadComplete event not binded";if(g_objGS.General.IsIPadBrowser==true&&a!=null){if(g_objTR.onEnableAudioClick=d,g_objTR.ShowAudioEnableWindow()==false)throw"Error @ ShowAudioEnableWindow";}else b(true)}catch(n){c=false,e.Log("Load",LOG.EXCEPTION,"",n)}return c}}
function clsHomePlayer(){var d,b,c,e,a,f,n,g;function k(a){var e=true;try{d=a.ShowOver,b=a.GuideOver,c=a.TestOver}catch(f){e=false,A.Log("UpdateModeStatusForBookmark",LOG.EXCEPTION,"",f)}return e}function o(){var a=true;try{if(g_objScorm.Enabled==true)for(i in g_objTrackerData.Summary.Modes)switch(i){case MODETYPE.SHOW:g_objTrackerData.Summary.Modes[i].ScormCompleted>0&&(d=true);break;case MODETYPE.GUIDE:g_objTrackerData.Summary.Modes[i].ScormCompleted>0&&(b=true);break;case MODETYPE.TEST:g_objTrackerData.Summary.Modes[i].ScormPassed>
0&&(c=true)}else for(i in g_objTrackerData.Summary.Modes)switch(i){case MODETYPE.SHOW:g_objTrackerData.Summary.Modes[i].TrackerCompleted>0&&(d=true);break;case MODETYPE.GUIDE:g_objTrackerData.Summary.Modes[i].TrackerCompleted>0&&(b=true);break;case MODETYPE.TEST:g_objTrackerData.Summary.Modes[i].TrackerCompleted>0&&(c=true)}}catch(e){a=false,A.Log("UpdateModeStatusForCurrLaunch",LOG.EXCEPTION,"",e)}return a}function v(){var k=true;try{var o=messages_json.phome.pisummary;e=o.modevisitsummary_pagetitle.text;
var p=b==true?m_CorrectImage:m_WrongImage,u=c==true?m_CorrectImage:m_WrongImage;a='<img src="'+(d==true?m_CorrectImage:m_WrongImage)+'">';f='<img src="'+p+'">';n='<img src="'+u+'">';p=true;try{if(u=false,uid_json.settings.mode_show.available==true&&d==false&&(u=true),uid_json.settings.mode_guide.available==true&&b==false&&(u=true),uid_json.settings.mode_test.available==true&&c==false&&(u=true),N==true&&u==true){var q=messages_json.phome.pisummary,r="<span id='EpnResume' href='#' style='cursor:pointer;"+
q.link_resume.css+"'>"+q.link_resume.text+"</span>",C="<span id='EpnResume' href='#' style='cursor:pointer;"+q.link_start.css+"'>"+q.link_start.text+"</span>",B="<span id='EpnResume' href='#' style='cursor:pointer;"+q.link_startagain.css+"'>"+q.link_startagain.text+"</span>";switch(g_objGS.General.ActiveMode){case MODETYPE.SHOW:if(d==true){if(uid_json.settings.mode_guide.available==true&&b==false)g_objGS.General.ActiveMode=MODETYPE.GUIDE,f=C;else if(uid_json.settings.mode_test.available==true&&c==
false)g_objGS.General.ActiveMode=MODETYPE.TEST,n=C;g_objGS.General.ActiveStepID="1";g_objGS.General.ActiveResLoc=""}else a=r;break;case MODETYPE.GUIDE:if(b==true){if(uid_json.settings.mode_test.available==true&&c==false)g_objGS.General.ActiveMode=MODETYPE.TEST,n=C;else if(uid_json.settings.mode_show.available==true&&d==false)g_objGS.General.ActiveMode=MODETYPE.SHOW,a=C;g_objGS.General.ActiveStepID="1";g_objGS.General.ActiveResLoc=""}else f=r;break;case MODETYPE.TEST:if(c==true){if(uid_json.settings.mode_show.available==
true&&d==false)g_objGS.General.ActiveMode=MODETYPE.SHOW,a=C;else if(uid_json.settings.mode_guide.available==true&&b==false)g_objGS.General.ActiveMode=MODETYPE.GUIDE,f=C;g_objGS.General.ActiveStepID="1";g_objGS.General.ActiveResLoc=""}else if(n=r,(g_objScorm.Enabled===true?g_objScorm.BookMark.Weightage:g_objTracker.BookMark.Weightage)===-1)n=B,g_objGS.General.ActiveStepID="1",g_objGS.General.ActiveResLoc=""}}}catch(E){p=false,A.Log("GetActiveModeAndSMGMTMData",LOG.EXCEPTION,"",E)}if(p==false)throw"Error @ GetActiveModeAndSMGMTMData";
q="";q+="<table align='center' cellpadding=0 cellspacing=0 border=0>";uid_json.settings.mode_show.available==true&&(q+="<tr>",q+="<td style= '"+g_objTR.Home.CSS.Modename+"' ><span style='"+o.modevisitsummary_sm.css+"'>"+o.modevisitsummary_sm.text+"</span></td>",q+="<td width=20 align=center>:</td>",q+="<td style='"+g_objTR.Home.CSS.Result+"'>"+a+"</td>",q+="</tr>");uid_json.settings.mode_guide.available==true&&(q+="<tr>",q+="<td style='"+g_objTR.Home.CSS.Modename+"'><span style='"+o.modevisitsummary_gm.css+
"'>"+o.modevisitsummary_gm.text+"</span></td>",q+="<td width=20 align=center>:</td>",q+="<td style='"+g_objTR.Home.CSS.Result+"'>"+f+"</td>",q+="</tr>");uid_json.settings.mode_test.available==true&&(q+="<tr>",q+='<td style="'+g_objTR.Home.CSS.Modename+"\"><span style='"+o.modevisitsummary_tm.css+"'>"+o.modevisitsummary_tm.text+"</span></td>",q+="<td width=20 align=center>:</td>",q+="<td style='"+g_objTR.Home.CSS.Result+"'>"+n+"</td>",q+="</tr>");q+="</table>";g=q}catch(v){k=false,A.Log("GetHomePageTitleAndBody",
LOG.EXCEPTION,"",v)}return k}function p(a){try{A.onLoadComplete(a)}catch(b){A.Log("m_objHomePOM_onLoadComplete",LOG.EXCEPTION,"",b)}}function q(a){try{A.onPlayComplete(a)}catch(b){A.Log("m_objHomePOM_onPlayComplete",LOG.EXCEPTION,"",b)}}function E(){var a=true;try{if(g_objTR.Home.ShowHideAudioButton(false)==false)throw"Error @ g_objTR.Home.ShowHideAudioButton";if(g_objTR.Home.SetSelectedStateForPIButton(0)==false)throw"Error @ g_objTR.Home.SetSelectedStateForPIButton";if(g_objTR.Home.HidePrevNextHomeButtons()==
false)throw"Error @ g_objTR.Home.HidePrevNextHomeButtons";D=e;r=g;if(g_objTR.Home.DisplayPITitle(D)==false)throw"Error @ g_objTR.Home.DisplayPITitle";if(g_objTR.Home.DisplayPIData(r)==false)throw"Error @ g_objTR.Home.DisplayPIData";}catch(b){a=false,A.Log("SetControlsStateAndDisplaySummary",LOG.EXCEPTION,"",b)}return a}function u(a){var b=true;try{C=H=r=D="";G=false;if(efx_json.processinfo!=void 0){var c=efx_json.processinfo["btn_"+a],e=new Number(0),f=null;if(c.text!=void 0){for(i in c.text)if(c.text[i].id==
g_objGS.General.Language){f=c.text[i];break}f==null&&(A.Log("ReadCurrentPIData",LOG.ERROR,"TextNode not found for LangKey = ",g_objGS.General.Language),A.Log("ReadCurrentPIData",LOG.ERROR,"Selecting first available TextNode",""),f=c.text[0])}else f=c;for(I.length=0;e>=0&&f.paragraphs!=void 0;){if(f.paragraphs[e]!=void 0)I.push(f.paragraphs[e].htmltext);else break;e++}J=0;I.length>J&&(r=I[J]);if(B(c)==false)throw"Error @ ReadMediaInfo";}uid_json.settings.general.enableexternallinks!=void 0&&g_objTracker.Enabled==
true&&uid_json.settings.general.enableexternallinks==true&&g_objTracker.ContentPreferences.ExtLinks.Enable==true&&eval("g_objTracker.ContentPreferences.ExtLinks.Btn_"+a)!=""&&(r=eval("g_objTracker.ContentPreferences.ExtLinks.Btn_"+a),G=true);D=eval("messages_json.phome.pibuttons.phbtn_"+a).text;H!=""&&C==""?g_objTR.Home.ShowHideAudioButton(true):g_objTR.Home.ShowHideAudioButton(false)}catch(g){b=false,A.Log("ReadCurrentPIData",LOG.EXCEPTION,"",g)}return b}function B(a){var b=true;try{if(A.MediaFiles=
[],a.md!=void 0){var c=a.md,e,f,g,a="",n=false,d=false;for(f=0;f<c.length;f++)if(e=c[f],e.lk==g_objGS.General.Language){g="";g=e.id;alMediaProps=e.pr.split("|");a=e.src;if(a=="")throw"Media Src not found in EfxContent.htm";a.toUpperCase().substr(0,4)!="HTTP"&&(a="data"+g_URLPathSeperator+"processinfo"+g_URLPathSeperator+"media"+g_URLPathSeperator+a);var k=new clsMediaData;k.MediaType=g.toUpperCase();k.MediaFormat=alMediaProps[0].toUpperCase();k.Src=a;k.Width=alMediaProps[1]!=void 0?alMediaProps[1]:
-1;k.Height=alMediaProps[2]!=void 0?alMediaProps[2]:-1;k.MediaType==MEDIATYPE.EXTNVIDEO&&(n=true);k.MediaType==MEDIATYPE.STEPAUDIO&&(d=true);k!=null&&A.MediaFiles.push(k)}if(n==true){var o=g_GetSuitableMediaForCurrentBrowser(MEDIATYPE.EXTNVIDEO,A);if(o!=null)C=o.Src}if(d==true){var p=g_GetSuitableMediaForCurrentBrowser(MEDIATYPE.STEPAUDIO,A);if(p!=null)H=p.Src}}}catch(q){b=false,A.Log("ReadMediaInfo",LOG.EXCEPTION,"",q)}return b}clsPlayerBase.call(this,"clsHomePlayer");var A=this,G=false,D="",r="",
H="",C="",J=0,I=[],L=null;e="";g="";d=false;b=false;c=false;a="";f="";n="";var N=false;this.MediaFiles=[];this.PlayState=PLAYSTATE.NONE;this.SummaryLoaded=false;var M=new clsPlayableObjectManager("HomePOM");this.Initialize=function(){var a=true;try{A.Initialized=PLAYSTATE.INITIALIZED;L==null&&(L=g_objTR.Home.GetVideoHolder());if(L==null)throw"Error @ g_objTR.Home.GetVideoHolder";if(A.onPlayComplete==null)throw"ME.onPlayComplete not binded";if(A.onLoadComplete==null)throw"ME.onLoadComplete not binded";
if(g_objTR.Home.DisplayPIData("<center><br/><img src='ui/images/icons/lbg.gif' /></center>")==false)throw"Error @ g_objTR.Home.DisplayPIData";m_CorrectImage=g_objRIL.ImageList.home_correct.src;m_WrongImage=g_objRIL.ImageList.home_wrong.src;M.onLoadComplete=p;M.onPlayComplete=q}catch(b){a=false,A.Log("Initialize",LOG.EXCEPTION,"",b)}return a};this.Load=function(a){var b=true;try{A.PlayState=PLAYSTATE.READY;if(A.Stop()==false)throw"Error @ Stop";g_objTR.Home.Controls.Maximize!=null&&g_objTR.Home.Controls.Maximize.Show();
var c=true;try{if(g_objTR.Home.SetSelectedStateForPIButton(a)==false)throw"Error @ g_objTR.Home.SetSelectedStateForPIButton";if(u(a)==false)throw"Error @ ReadCurrentPIData";var e=false;if(C==""){var f=null;if(H!=""&&g_objGS.General.HomeAudioEnabled==true){f=FlyWeight.GetObject(PLAYABLEOBJECTS.STEPAUDIO);if(f==null)throw"Error @ FlyWeight.GetObject(PLAYABLEOBJECTS.STEPAUDIO)";if(f.Load(H)==false)throw"Error @ FlyWeight.LoadAudioControl";}if(f!=null&&M.Add(f,null)==false)throw"Error @ m_objHomePOM.Add";
}else if(e=true,I.length=0,f=new clsMediaData,f.Src=C,f.Width=parseInt(L.style.width),f.Height=parseInt(L.style.height),f.bApplyResizeFactor=false,f!=null){g_objTR.Home.Controls.Maximize!=null&&g_objTR.Home.Controls.Maximize.Hide();var g=FlyWeight.GetObject(PLAYABLEOBJECTS.HOMEVIDEO,0,L);if(g==null)throw"Error @ FlyWeight.GetObject(PLAYABLEOBJECTS.HOMEVIDEO)";if(g.Load(f)==false)throw"Error @ objHomeVideo.Load";if(M.Add(g,null)==false)throw"Error @ m_objHomePOM.Add";if(g_objTR.Home.ShowVideoHolder()==
false)throw"Error @ g_objTR.Home.ShowVideoHolder";}if(g_objTR.Home.DisplayPITitle(D)==false)throw"Error @ g_objTR.Home.DisplayPITitle";if(e==false){e=r;if(G==true){var f=r,n=efx_json.efxid;if(g_objTracker.ContentPreferences.EfxId!="")n!=g_objTracker.ContentPreferences.EfxId&&A.Log("LoadPIData",LOG.EXCEPTION," [ IGNORE FYI ] Button_"+a+" > EfxIds are different","EfxId @ data.js = "+n+" and EfxId @ ECMS = "+g_objTracker.ContentPreferences.EfxId),n=g_objTracker.ContentPreferences.EfxId;f=f.replace(/@efxid@/g,
n);A.Log("LoadPIData",LOG.SPECIAL,"Button_"+a+" > ExtUrl = ",f);e='<iframe frameborder=0 style="position:absolute;width:100%;height:100%;top:0px;left:0px;" src=\''+f+"'></iframe>"}if(g_objTR.Home.DisplayPIData(e)==false)throw"Error @ g_objTR.Home.DisplayPIData";}I.length>1?g_objTR.Home.EnablePrevNextHomeButtons(false,true):g_objTR.Home.HidePrevNextHomeButtons()}catch(d){c=false,A.Log("LoadPIData",LOG.EXCEPTION,"",d)}if(c==false)throw"error @ LoadPIData";if(M.Load()==false)throw"Error @ m_objHomePOM.Load";
}catch(k){b=false,A.Log("Load",LOG.EXCEPTION,"",k)}return b};this.Play=function(){var a=true;try{if(M.Play()==false)throw"Error @ m_objHomePOM.Play";}catch(b){a=false,A.Log("Play",LOG.EXCEPTION,"",b)}return a};this.Stop=function(){var a=true;try{if(g_objTR.Home.ClearPIData()==false)throw"Error @ g_objTR.Home.ClearPIData";if(g_objTR.Home.HideVideoHolder()==false)throw"Error @ g_objTR.Home.HideVideoHolder";if(M.Stop()==false)throw"Error @ m_objHomePOM.Stop";}catch(b){a=false,A.Log("Stop",LOG.EXCEPTION,
"",b)}return a};this.LoadSummaryDetails=function(a,b,c){try{if(A.ShowSummaryDetails(a,b,c)==false)throw"Error @ Stop";A.SummaryLoaded=true;A.onLoadComplete(true)}catch(e){A.Log("LoadSummaryDetails",LOG.EXCEPTION,"",e),A.onLoadComplete(false)}};this.ShowSummaryDetails=function(a,b,c){try{G=false;if(A.Stop()==false)throw"Error @ Stop";g_objTR.Home.Controls.Maximize!=null&&g_objTR.Home.Controls.Maximize.Hide();switch(a){case HOMESUMMARYCALLER.PSIM:b=true;try{N=false;if(o()==false)throw"Error @ UpdateModeStatusForCurrLaunch";
if(v()==false)throw"Error @ GetHomePageTitleAndBody";if(E()==false)throw"Error @ SetControlsStateAndDisplaySummary";}catch(e){b=false,A.Log("ShowLocalLaunchSummary",LOG.EXCEPTION,"",e)}if(b==false)throw"error @ ShowLocalLaunchSummary";break;case HOMESUMMARYCALLER.SCORM:a=true;try{if(g_objScorm.Status==SCORMSTATUS.BROWSED||g_objScorm.Status==SCORMSTATUS.REVIEWED){b=true;try{g="<table align='center' cellpadding=0 cellspacing=0 border=0><tr><td style='"+(g_objScorm.Status==SCORMSTATUS.BROWSED?g_objTR.Home.CSS.Preview:
g_objTR.Home.CSS.Review)+"'><span style='"+(g_objScorm.Status==SCORMSTATUS.BROWSED?messages_json.general.messages.scorm_inpreviewmode.css:messages_json.general.messages.scorm_inreviewmode.css)+"'>"+(g_objScorm.Status==SCORMSTATUS.BROWSED?messages_json.general.messages.scorm_inpreviewmode.text:messages_json.general.messages.scorm_inreviewmode.text)+"</span></td></tr></table>"}catch(f){b=false,A.Log("GetReviewOrPreviewMsg",LOG.EXCEPTION,"",f)}if(b==false)throw"Error @ GetReviewOrPreviewMsg";}else{if(b==
true){if(N=true,k(c)==false)throw"Error @ UpdateModeStatusForBookmark";}else if(N=false,o()==false)throw"Error @ UpdateModeStatusForCurrLaunch";if(v()==false)throw"Error @ GetHomePageTitleAndBody";}if(E()==false)throw"Error @ SetControlsStateAndDisplaySummary";}catch(n){a=false,A.Log("ShowScormSummary",LOG.EXCEPTION,"",n)}if(a==false)throw"error @ ShowScormSummary";break;case HOMESUMMARYCALLER.TRACKER:a=true;try{if(b==true){if(N=true,k(c)==false)throw"Error @ UpdateModeStatusForBookmark";}else if(N=
false,o()==false)throw"Error @ UpdateModeStatusForCurrLaunch";if(v()==false)throw"Error @ GetHomePageTitleAndBody";if(E()==false)throw"Error @ SetControlsStateAndDisplaySummary";}catch(d){a=false,A.Log("ShowTrackerSummary",LOG.EXCEPTION,"",d)}if(a==false)throw"error @ ShowTrackerSummary";}}catch(p){A.Log("ShowSummaryDetails",LOG.EXCEPTION,"",p)}};this.DisplayNextParagraph=function(){try{if(J++,I.length>1&&(J+1==I.length?g_objTR.Home.EnablePrevNextHomeButtons(true,false):g_objTR.Home.EnablePrevNextHomeButtons(true,
true)),r=I[J],g_objTR.Home.DisplayPIData(r)==false)throw"Error @ g_objTR.Home.DisplayPIData";}catch(a){A.Log("DisplayNextParagraph",LOG.EXCEPTION,"",a)}};this.DisplayPrevParagraph=function(){try{if(J--,I.length>1&&(J==0?g_objTR.Home.EnablePrevNextHomeButtons(false,true):g_objTR.Home.EnablePrevNextHomeButtons(true,true)),r=I[J],g_objTR.Home.DisplayPIData(r)==false)throw"Error @ g_objTR.Home.DisplayPIData";}catch(a){A.Log("DisplayPrevParagraph",LOG.EXCEPTION,"",a)}};this.ManageHomeAudio=function(){try{if(g_objGS.General.HomeAudioEnabled==
true){if(M.Remove(PLAYABLEOBJECTTYPES.AUDIO)==false)throw"Error @ m_objHomePOM.Remove";g_objGS.General.HomeAudioEnabled=false}else g_objGS.General.HomeAudioEnabled=true}catch(a){A.Log("ManageHomeAudio",LOG.EXCEPTION,"",a)}};this.ShowPIDialog=function(){try{return g_objTR.Home.PIDialogBody.innerHTML="<iframe frameborder=0 style=\"position:absolute;width:100%;height:100%;top:20px;left:0px;\" src='data/pid/index.htm'></iframe>",g_objTR.Home.PIDialogHeader.innerHTML="<table border=0 width=100% height=100% cellpadding=0 cellspacing=0><tr><td align=center>"+
messages_json.phome.pibuttons.pidlauncher.text+"</td></tr></table>",g_objTR.Home.PIDialog.style.display=g_inline,g_objTR.Home.PIDialog.focus(),true}catch(a){A.Log("ShowPIDialog",LOG.EXCEPTION,"",a)}};this.MaximizePIData=function(){try{var a="";if(G==true){var b=r,c=efx_json.efxid;if(g_objTracker.ContentPreferences.EfxId!="")c=g_objTracker.ContentPreferences.EfxId;b=b.replace(/@efxid@/g,c);a='<iframe frameborder=0 style="position:absolute;width:100%;height:100%;top:20px;left:0px;" src=\''+b+"'></iframe>"}else a=
r;g_objTR.Home.PIDialogBody.innerHTML=a;g_objTR.Home.PIDialogHeader.innerHTML="<table border=0 width=100% height=100% cellpadding=0 cellspacing=0><tr><td align=center>"+D+"</td></tr></table>";g_objTR.Home.PIDialog.style.display=g_inline;g_objTR.Home.PIDialog.focus();return true}catch(e){A.Log("MaximizePIData",LOG.EXCEPTION,"",e)}}}
function clsModeIndicatorPlayer(){function d(a){try{e.onInitComplete(a)}catch(b){e.Log("MIPOM_onInitComplete",LOG.EXCEPTION,"",b)}}function b(a){try{e.onLoadComplete(a)}catch(b){e.Log("MIPOM_onLoadComplete",LOG.EXCEPTION,"",b)}}function c(a){try{e.onPlayComplete(a)}catch(b){e.Log("MIPOM_onPlayComplete",LOG.EXCEPTION,"",b)}}clsPlayerBase.call(this,"clsModeIndicatorPlayer");var e=this;this.PlayState=PLAYSTATE.NONE;var a=new clsPlayableObjectManager("MIPOM"),f="",n="",g="",k=null,o=null;this.Initialize=
function(){var f=true;try{e.Initialized=PLAYSTATE.INITIALIZED;k=FlyWeight.GetObject(PLAYABLEOBJECTS.DELAY);if(k==null)throw"Error @ FlyWeight.GetObject(PLAYABLEOBJECTS.DELAY)";if(k.Initialize()==false)throw"Error @ objDelay.Initialize";a.onInitComplete=d;a.onLoadComplete=b;a.onPlayComplete=c}catch(g){f=false,e.Log("Initialize",LOG.EXCEPTION,"",g)}return f};this.Load=function(b,c){var d=true;try{o=messages_json.modeindicator;e.PlayState=PLAYSTATE.READY;if(e.Stop()==false)throw"Error @ Stop";var E=
true;try{switch(b){case MODETYPE.SHOW:g=c==MILOCATION.START?MITYPE.SMSTART:MITYPE.SMEND;break;case MODETYPE.GUIDE:g=c==MILOCATION.START?MITYPE.GMSTART:MITYPE.GMEND;break;case MODETYPE.TEST:g=c==MILOCATION.START?MITYPE.TMSTART:MITYPE.TMEND}}catch(u){E=false,e.Log("GetSubType",LOG.EXCEPTION,"",u)}if(E==false)throw"Error @ GetSubType";if(g_objTR.MIRenderer.SetFooterMessage(g,"")==false)throw"Error @ g_objTR.MIRenderer.SetFooterMessage";E=true;try{n=f="";if(o[g].title!=void 0)f=o[g].title.text;if(o[g].body!=
void 0)n=o[g].body.text,g==MITYPE.TMSTART&&uid_json.settings.mode_test.limitattempt=="1"&&(n+="<br/><br/><br/>"+messages_json.general.messages.tm_attempt_msg.text.replace("%1",uid_json.settings.mode_test.maxattempt),n+="<br/><br/>"+messages_json.general.messages.tm_maxattempt.text.replace("%1",g_objGS.General.TMAttemptCount))}catch(B){E=false,e.Log("GetTitleAndBody",LOG.EXCEPTION,"",B)}if(E==false)throw"Error @ GetTitleAndBody";var A;if(A=g==MITYPE.TMEND){E=true;try{var G="",D="",D=g_objTrackerData.Modes[g_objTrackerData.Modes.length-
1].Score,G=g_objScorm.Enabled==true?g_objScorm.TMPassScore:g_objTracker.Enabled==true?g_objTracker.ContentPreferences.TMPassScore:uid_json.settings.mode_test.passscore;g_objTracker.ContentPreferences.LatestTMPassScore=Number(G);g_objTracker.ContentPreferences.LatestTMScore=Number(D);g_objTracker.ContentPreferences.LatestTMResult=Number(D)>=Number(G)?true:false}catch(r){E=false,e.Log("UpdateTMPassFailStatus",LOG.EXCEPTION,"",r)}A=E==false}if(A)throw"Error @ UpdateEpnPassFailStatus";if(g_objTR.ManageModeIndicator(n,
f,g)==false)throw"Error @ g_objTR.ManageModeIndicator";if(uid_json.modeindicators[g].autonavigate=="1"){k.Duration=uid_json.modeindicators[g].interval;if(k.Load()==false)throw"Error @ m_ObjDelay.Load";if(k.Duration>0&&a.Add(k,null)==false)throw"Error @ objMIPOM.Add";k.onPlayStateChange=e.ObjDelay_onPlayStateChange}else if(g_objTR.MIRenderer.SetFooterMessage(g,"")==false)throw"Error @ g_objTR.SetModeIndicatorDelayMessage";if(a.Load()==false)throw"Error @ objHomePOM.Load";}catch(H){d=false,e.Log("Load",
LOG.EXCEPTION,"",H)}return d};this.Play=function(){var b=true;try{if(a.POCount>0){var c=o[g].footer.text.replace(/%1/g,k.Timeleft/1E3);if(g_objTR.MIRenderer.SetFooterMessage(g,c)==false)throw"Error @ g_objTR.MIRenderer.SetFooterMessage";if(a.Play()==false)throw"Error @ objMIPOM.Play";}}catch(f){b=false,e.Log("Play",LOG.EXCEPTION,"",f)}return b};this.Stop=function(){var b=true;try{if(a.Stop()==false)throw"Error @ objMIPOM.Stop";}catch(c){b=false,e.Log("Stop",LOG.EXCEPTION,"",c)}return b};this.ObjDelay_onPlayStateChange=
function(b){try{e.PlayState=b.PlayState;var c="";if(b.Timeleft>0){if(b.Timeleft%1E3==0&&(c=o[g].footer.text.replace(/%1/g,b.Timeleft/1E3),g_objTR.MIRenderer.SetFooterMessage(g,c)==false))throw"Error @ g_objTR.SetModeIndicatorDelayMessage";}else if(g_objTR.MIRenderer.SetFooterMessage(g,c)==false)throw"Error @ g_objTR.SetModeIndicatorDelayMessage";a.CurObject_onPlayStateChange(b)}catch(f){e.Log("ObjDelay_onPlayStateChange",LOG.EXCEPTION,"",f),e.PlayState=PLAYSTATE.ERROR}}}
clsPlayableObject=function(d){this.ID=d.ID;this.Object=d;this.NextObjects=null;this.Count=this.WaitCount=0;this.Complete=false;this._POType=d.ClassName;this._POName=d.ObjectName};
clsPlayableObjectManager=function(d){function b(b){try{var c=null,f;for(f in a){c=a[f];if(c.ID==b)return c;if(c.NextObjects!=null)for(var d in c.NextObjects)if(c.NextObjects[d]!=null&&c.NextObjects[d].ID==b)return c.NextObjects[d]}}catch(v){e.Log("GetPOObject",LOG.EXCEPTION,"",v)}return null}function c(){var b=true;try{clearInterval(f);var g=0,d;for(d in a)a[d].Object.PlayState==PLAYSTATE.READY||a[d].Object.PlayState==PLAYSTATE.ERROR||a[d].Object.PlayState==PLAYSTATE.STOPPED?g++:e.Log("VerifyForReadyFlags",
LOG.SPECIAL,"Player's Load not completed for > ",a[d].Object.ClassName);a.length==g?(e.PlayState=PLAYSTATE.READY,e.onLoadComplete(true)):f=setInterval(c,100)}catch(o){b=false,e.Log("VerifyForReadyFlags",LOG.EXCEPTION,"",o)}try{b==false&&(clearInterval(f),e.onLoadComplete(false))}catch(v){e.Log("VerifyForReadyFlags",LOG.EXCEPTION,"2",v)}}clsPlayerBase.call(this,"clsPlayableObjectManager",d);var e=this,a=[],f;this.POCount=0;this.Rewind=false;this.PlayState=PLAYSTATE.INITIALIZED;this.Add=function(c,
f){var d=true;try{if(c!=null){if(c.ID=="")throw"CurObj.ID is empty for > "+c.ClassName;var o=b(c.ID);if(o==null){c.onPlayStateChange=e.CurObject_onPlayStateChange;if(c.POType==PLAYABLEOBJECTTYPES.AUDIO)c.onPlayStateChange2=c.PlayAsync==true?e.CurObject_onPlayStateChange2:null;o=new clsPlayableObject(c)}if(f!=null||f!=void 0){var v=null,p=null,q=[],E;for(E in f){v=f[E];p=b(v.ID);if(p==null){v.onPlayStateChange=e.CurObject_onPlayStateChange;if(v.POType==PLAYABLEOBJECTTYPES.AUDIO)v.onPlayStateChange2=
v.PlayAsync==true?e.CurObject_onPlayStateChange2:null;p=new clsPlayableObject(v)}q.push(p)}o.NextObjects=q}a.push(o)}e.POCount=a.length}catch(u){d=false,e.Log("Add",LOG.EXCEPTION,"",u)}return d};this.AddObjects=function(a,b){var c=true;try{for(var f in a)if(e.Add(a[f],b)==false)throw"Error @ ME.Add(CurObjects[nIdx],NextObject)";}catch(d){c=false,e.Log("AddObjects",LOG.EXCEPTION,"",d)}return c};this.Load=function(){var b=true;try{clearInterval(f);if(e.onLoadComplete==null)throw"ME.onLoadComplete is not binded";
var g,d,o;for(o in a){g=a[o];for(var v in a)if(d=a[v].NextObjects,d!=null)for(var p in d)d[p].ID==g.ID&&g.WaitCount++}try{g="<table width=100% height=100% border=1 cellpadding=0 cellspacing=0 style='font-size:12px'>";g+="<tr style='background-color:rgb(228,255,202);fontweight:bold;color:#00f'>";g+="<td style='padding:2px;'>Object</td>";g+="<td style='padding:2px;'>NextObjects</td>";g+="<td style='padding:2px;'>WaitCount</td>";g+="</tr>";d="";var q,E;for(E in a){q=a[E].NextObjects;d="";if(q!=null)for(var u in q)d+=
q[u]._POName+" , ";g+="<tr style='background-color:rgb(228,255,202)'>";g+="<td style='padding:2px;'>"+a[E]._POName+"</td>";g+="<td style='padding:2px;'>"+d+"</td>";g+="<td style='padding:2px;'>"+a[E].WaitCount+"</td>";g+="</tr>"}g+="</table>";e.Log("LogPOMList",LOG.POM,e.ObjectName,g)}catch(B){e.Log("LogPOMList",LOG.EXCEPTION,"",B)}c()}catch(A){b=false,e.Log("Load",LOG.EXCEPTION,"",A)}return b};this.Play=function(){var b=true;try{if(e.onPlayComplete==null)throw"onPlayComplete is not binded";e.PlayState=
PLAYSTATE.PLAYING;if(a.length==0)e.PlayState=PLAYSTATE.PLAYENDED,e.onPlayComplete(true);else{e.Log("Play",LOG.POM,e.ObjectName,"Play Started");for(var c in a){var f=a[c];if(f.Complete==false&&f.Object!=null&&f.WaitCount==f.Count&&f.Object.Play()==false)throw"Error @ objPO.Object.Play";}}}catch(d){b=false,e.Log("Play",LOG.EXCEPTION,"",d)}return b};this.Pause=function(){var b=true;try{for(var c in a)if(a[c].Object.Pause()==false)throw"Error @ m_PlayableObjects[index1].Object.Pause";e.PlayState=PLAYSTATE.PAUSED}catch(f){b=
false,e.Log("Pause",LOG.EXCEPTION,"",f)}return b};this.Stop=function(){var b=true;try{clearInterval(f);for(var c in a)if(a[c].Object.onPlayStateChange=null,a[c].Complete=false,a[c].Count=0,a[c].Object.Stop()==false)throw"Error @ m_PlayableObjects[index1].Object.Stop";a=[];a.length=0;e.POCount=0;e.PlayState=PLAYSTATE.STOPPED}catch(d){b=false,e.Log("Stop",LOG.EXCEPTION,"",d)}return b};this.Remove=function(b){var c=true;try{e.Log("Remove",LOG.POM,e.ObjectName,b);var f=b;if(b==PLAYABLEOBJECTTYPES.CALLOUTSTICKY)f=
PLAYABLEOBJECTTYPES.CALLOUTSTICKYCOLLECTION;if(b==PLAYABLEOBJECTTYPES.AUDIO&&g_objTR.SetAudioAnimation(false)==false)throw"Error @ g_objTR.SetAudioAnimation";for(var d in a){if(a[d]==void 0)break;if(a[d].Object.POType==b||a[d].Object.POType==f||a[d].Object.POType==PLAYABLEOBJECTTYPES.TUTORIMAGE||a[d].Object.POType==PLAYABLEOBJECTTYPES.CALLOUTTEXTBOX){a[d].Complete=true;a[d].Count=0;var v=false;a[d].Object.PlayState!=PLAYSTATE.PLAYENDED&&(v=true);if(a[d].Object.Stop()==false)throw"Error @ m_PlayableObjects[index1].Object.Stop";
if(v==true&&e.UpdateNextObjectsAndPlayIfRequired(a[d].Object)==false)throw"Error @ UpdateNextObjectsAndPlayIfRequired";}if(f==PLAYABLEOBJECTTYPES.AUDIO&&(a[d].Object.POType==PLAYABLEOBJECTTYPES.CALLOUTSTICKYCOLLECTION||a[d].Object.POType==PLAYABLEOBJECTTYPES.CALLOUTSTICKY)&&a[d].Object.StopAudio()==false)throw"Error @ m_PlayableObjects[index1].Object.StopAudio";}}catch(p){c=false,e.Log("Remove",LOG.EXCEPTION,"",p)}return c};this.UpdateDelayDuration=function(b){var c=true;try{for(var f in a)if(a[f].Object.POType==
PLAYABLEOBJECTTYPES.DELAY){if(a[f].Object.ChangeDuration(b)==false)throw"Error @ Delay.ChangeDuration";break}}catch(d){c=false,e.Log("UpdateDelayDuration",LOG.EXCEPTION,"",d)}return c};this.Hide=function(){var b=true;try{for(var c in a)if(a[c].Object.Hide!=void 0&&a[c].Object.Hide()==false)throw"Error @ m_PlayableObjects[index1].Object.Hide for POType = "+a[c].Object.POType;}catch(f){b=false,e.Log("Hide",LOG.EXCEPTION,"",f)}return b};this.CurObject_onPlayStateChange2=function(a){var b=true;try{if(g_objGS.General.ActiveView==
EPILEANVIEW.SIM&&g_objTR.SetAudioAnimation(a.PlayState==PLAYSTATE.PLAYING?true:false)==false)throw"Error @ g_objTR.SetAudioAnimation";}catch(c){b=false,e.Log("CurObject_onPlayStateChange2",LOG.EXCEPTION,"",c)}return b};this.CurObject_onPlayStateChange=function(a){var b=true;try{if(a.POType==PLAYABLEOBJECTTYPES.AUDIO&&g_objGS.General.ActiveView==EPILEANVIEW.SIM&&a.PlayAsync==false&&g_objTR.SetAudioAnimation(a.PlayState==PLAYSTATE.PLAYING?true:false)==false)throw"Error @ g_objTR.SetAudioAnimation";
if(a.PlayState==PLAYSTATE.ERROR)b=false;else if(a.PlayState==PLAYSTATE.PLAYENDED&&e.UpdateNextObjectsAndPlayIfRequired(a)==false)throw"Error @ UpdateNextObjectsAndPlayIfRequired";}catch(c){b=false,e.Log("CurObject_onPlayStateChange",LOG.EXCEPTION,"",c)}try{if(b==false)e.Log("CurObject_onPlayStateChange",LOG.ERROR,"Error due to > ",a.ClassName),e.PlayState=PLAYSTATE.ERROR,e.onPlayComplete(false)}catch(f){e.Log("CurObject_onPlayStateChange",LOG.EXCEPTION,"2",f)}};this.POPlayCompleted=function(){var b=
true;try{e.Log("POPlayCompleted",LOG.POM,e.ObjectName,"Play Ended");e.PlayState=PLAYSTATE.PLAYENDED;if(e.onPlayComplete!=null)e.onPlayComplete(true);else e.Log("POPlayCompleted",LOG.POM,e.ObjectName,"onPlayComplete is not binded");if(e.Rewind==true)for(var c in a)a[c].Complete=g_objGS.General.CalloutButtonEnabled==false&&a[c].Object.POType==PLAYABLEOBJECTTYPES.CALLOUTSTICKY?true:false}catch(f){b=false,e.Log("POPlayCompleted",LOG.EXCEPTION,"",f)}return b};this.UpdateNextObjectsAndPlayIfRequired=function(c){var f=
true;try{new Boolean(false);var d=b(c.ID);if(d==null)throw"Object not found in m_PlayableObjects for object"+c.ClassName;d.Complete=true;c=0;for(index1 in a)a[index1].Complete==true&&c++;if(c==a.length){if(e.POPlayCompleted()==false)throw"Error @ POPlayCompleted";return f}if(d.NextObjects!=null){for(var o in d.NextObjects)d.NextObjects[o]!=void 0&&d.NextObjects[o].Count++;if(e.PlayState==PLAYSTATE.PLAYING)for(index3 in d=null,a)if(d=a[index3],d!=void 0&&d.Count==d.WaitCount&&d.Complete==false&&d.Object.Play()==
false)throw"Error @ objNextPO.Object.Play";}}catch(v){f=false,e.Log("UpdateNextObjectsAndPlayIfRequired",LOG.EXCEPTION,"",v)}return f}};
clsPOMLoader=function(){clsPlayerBase.call(this,"clsPOMLoader");var d=this,b=[];this.Count=0;this.Add=function(c){var e=true;try{if(c!=void 0||c!=null)b.push(c);else throw"objPOM is undefined or null";d.Count=b.length}catch(a){e=false,d.Log("Add",LOG.EXCEPTION,"",a)}return e};this.Reset=function(){var c=true;try{b=[],d.Count=b.length}catch(e){c=false,d.Log("Reset",LOG.EXCEPTION,"",e)}return c};this.Load=function(){var c=true;try{if(d.onLoadComplete==null)throw"ME.onLoadComplete is null";if(b.length==
0)throw"POM objects not added";b[0].onLoadComplete=d.objPOM_onLoadComplete;if(b[0].Load()==false)throw"Error @ m_POMList[0].Load() for >"+b[0].ObjectName;}catch(e){c=false,d.Log("Load",LOG.EXCEPTION,"",e)}return c};this.objPOM_onLoadComplete=function(c){var e=true;try{if(c==false)throw"objPOM_onLoadComplete.bSuccess=false for >"+b[0].ObjectName;b[0].onLoadComplete=null;b.splice(0,1);d.Count=b.length;if(b.length>0){if(b[0].onLoadComplete=d.objPOM_onLoadComplete,b[0].Load()==false)throw"Error @ m_POMList[0].Load() for >"+
b[0].ObjectName;}else{d.onLoadComplete(c);return}}catch(a){e=false,d.Log("objPOM_onLoadComplete",LOG.EXCEPTION,"",a)}try{if(e==false)d.onLoadComplete(false)}catch(f){d.Log("objPOM_onLoadComplete",LOG.EXCEPTION,"2",f)}}};
clsPOMPlayer=function(){clsPlayerBase.call(this,"clsPOMPlayer");var d=this,b=[];this.Count=0;this.Add=function(c){var e=true;try{if(c!=void 0||c!=null)b.push(c);else throw"objPOM is undefined or null";d.Count=b.length}catch(a){e=false,d.Log("Add",LOG.EXCEPTION,"",a)}return e};this.Reset=function(){var c=true;try{b=[],d.Count=b.length}catch(e){c=false,d.Log("Reset",LOG.EXCEPTION,"",e)}return c};this.Play=function(){var c=true;try{if(d.onPlayComplete==null)throw"ME.onPlayComplete is null";if(b.length==
0)throw"POM objects not added";b[0].onPlayComplete=d.objPOM_onPlayComplete;if(b[0].Play()==false)throw"Error @ m_POMList[0].Play() for >"+b[0].ObjectName;}catch(e){c=false,d.Log("Play",LOG.EXCEPTION,"",e)}return c};this.objPOM_onPlayComplete=function(c){var e=true;try{if(c==false)throw"objPOM_onPlayComplete.bSuccess=false for >"+b[0].ObjectName;b[0].onPlayComplete=null;b.splice(0,1);d.Count=b.length;if(b.length>0){if(b[0].onPlayComplete=d.objPOM_onPlayComplete,b[0].Play()==false)throw"Error @ m_POMList[0].Play() for >"+
b[0].ObjectName;}else{d.onPlayComplete(c);return}}catch(a){e=false,d.Log("objPOM_onPlayComplete",LOG.EXCEPTION,"",a)}try{if(e==false)d.onPlayComplete(false)}catch(f){d.Log("objPOM_onPlayComplete",LOG.EXCEPTION,"2",f)}}};
function clsProcessPlayer(){function d(a){var b=true;try{var c="",c=a.NotesControl[g_objGS.General.ActiveMode];c==void 0&&(c="");if(g_objGS.General.ActiveMode!=MODETYPE.TEST){if(uid_json.settings.notes.usestepdesc==true)if(c=="")c=a.Caption;else if(uid_json.settings.notes.customnotesoverridesstepdesc==false)c=a.Caption}else if(uid_json.settings.notes.usestepdesc==true&&uid_json.settings.notes.customnotesoverridesstepdesc==true)if(c=="")c=a.Caption;else if(uid_json.settings.notes.customnotesoverridesstepdesc==
false)c=a.Caption;if(g_objTR.SetNotesMessage(c)==false)throw"Error @ g_objTR.SetNotesMessage";}catch(e){b=false,C.Log("SetNotesMessage",LOG.EXCEPTION,"",e)}return b}function b(a){var b=true;try{var c="",e;e=messages_json.psim.commonmsg!=void 0?messages_json.psim.commonmsg.step_progress_format.text:messages_json.psim.canvas.commonmsg.step_progress_format.text;e==""?c=String(a.SlNo)+"/"+String(C.ProcessTaskData.TotalDisplayableSteps):(c=e.replace("%1",String(a.SlNo)),c=c.replace("%2",String(C.ProcessTaskData.TotalDisplayableSteps)));
a.SlNo==-1&&(c="");g_objLoger.Enable==true&&(c+="&nbsp;&nbsp;&nbsp;&nbsp;"+a.TPSID);if(g_objTR.SetStepCountMessage(c)==false)throw"Error @ g_objTR.SetStepCountMessage";if(uid_json.settings.general.uistepprogressbar!=void 0&&uid_json.settings.general.uistepprogressbar=="1"&&a.SlNo!=-1){var f=parseInt(a.SlNo)/parseInt(C.ProcessTaskData.TotalDisplayableSteps)*100;if(g_objTR.SetStepProgressValue(f)==false)throw"Error @ g_objTR.SetStepProgressValue";}if(c==""&&g_objTR.HideProgressBar()==false)throw"Error @ g_objTR.HideProgressBar";
}catch(d){b=false,C.Log("SetStepProgressMessage",LOG.EXCEPTION,"",d)}return b}function c(a,c){var e=true;try{F=I;if(O!=null&&O()==false)throw"Error @ m_PrevPlayerStopRef";if(q(a)==false)throw"Error @ IsStatusBarRequired";if(g_objTR.Cuecard.HighlightStep("","")==false)throw"Error @ g_objTR.Cuecard.HighlightStep";if(g_objTR.Cuecard.HighlightStep(C.ProcessTaskData.ResLoc,c)==false)throw"Error @ g_objTR.Cuecard.HighlightStep";if(b(a)==false)throw"Error @ SetStepProgressMessage";if(I.Load(C.ProcessTaskData.ResLoc,
a)==false)throw"Error @ m_objInfoPlayer.Load";if(g_objTR.ToggleCanvasAndMIQ(false,false)==false)throw"g_objTR.ToggleCanvasAndMIQ";if(d(a)==false)throw"Error @ SetNotesMessage";}catch(f){e=false,C.Log("LoadInfoStep",LOG.EXCEPTION,"",f)}return e}function e(a){try{if(a==false)throw"m_objSID_onLoadComplete = false";if(O!=null&&O()==false)throw"Error @ m_PrevPlayerStopRef";if(g_objTR.ToggleCanvasAndMIQ(bShowCanvas=true)==false)throw"g_objTR.ToggleCanvasAndMIQ";F=K;if(g_objGS.General.ActiveMode==MODETYPE.SHOW&&
P>0&&X==true)g_objGS.General.Busy=false,g_objTR.SetBusyFlag(false),z=setTimeout(function(){g_objGS.General.Busy=true;g_objTR.SetBusyFlag(true);if(K.Load(C.CurrentStepIndex)==false)throw"Error @ m_PlayBeginDelay";},P);else if(K.Load(C.CurrentStepIndex)==false)throw"Error @ m_objActiveModeHandler.Load";}catch(b){C.Log("m_objSID_onLoadComplete",LOG.EXCEPTION,"",b),C.onLoadComplete(false)}}function a(a){try{g_objTR.onCanvasScrollOver=null;if(a==false)throw"g_objTR_onCanvasScrollOver=FALSE";(S==STEPTYPE.MOUSE||
S==STEPTYPE.TYPETEXT)&&g_objGS.General.ActiveMode==MODETYPE.SHOW&&g_objTR.SetFocus(VCRBUTTON.PLAY);if(F.Play()==false)throw"Error @ m_objActivePlayer.Play";var b;if(b=S==STEPTYPE.MOUSE||S==STEPTYPE.TYPETEXT){var c;if(c=g_objTR.Cuecard.Available==true&&g_objTR.Cuecard.Visible==true){a=true;try{if(g_objCCMover!=null&&g_objTR.CCBusy===false&&g_objTR.IsFixedCC===false&&(g_objCCMover.ProcessTaskData=C.ProcessTaskData,g_objCCMover.Move(C.CurrentStepIndex)==false))throw"Error @ Move";}catch(e){a=false,C.Log("MoveCCForStepImage",
LOG.EXCEPTION,"",e)}c=a==false}b=c}if(b)throw"Error @ MoveCCForStepImage";}catch(f){C.Log("m_objSIL_onLoadComplete",LOG.EXCEPTION,"",f)}}function f(a){C.Log("m_objInfoPlayer_onLoadComplete",LOG.ENTRY,"bSuccess",a);try{document.body.style.cursor="default";g_objGS.General.Busy=false;g_objTR.SetBusyFlag(false);if(a==false)throw"m_objInfoPlayer_onLoadComplete = false";if(g()==false)throw"error @ ManageStatusbarDisplay";if(g_objGS.General.PlayState==PLAYSTATE.PLAYING){if(C.Play()==false)throw"Error @ ME.Play";
}else C.onLoadComplete(true)}catch(b){C.Log("m_objInfoPlayer_onLoadComplete",LOG.EXCEPTION,"",b),C.onLoadComplete(false)}}function n(a){C.Log("m_objActiveModeHandler_onLoadComplete",LOG.ENTRY,"bSuccess",a);try{document.body.style.cursor="default";g_objGS.General.Busy=false;g_objTR.SetBusyFlag(false);if(a==false)throw"m_objActiveModeHandler_onLoadComplete = false";var b=C.ProcessTaskData.GetStepObject(C.CurrentStepIndex);if(b.Question==null||b.Question==void 0){if(g()==false)throw"error @ ManageStatusbarDisplay";
}else if(g_objTR.StatusBar.Hide()==false)throw"Error @ g_objTR.StatusBar.Hide";if(g_objGS.General.GlobalAudio==true&&b.AudioTrackStart!=-1&&g_objGS.General.ActiveMode==MODETYPE.SHOW){if(g_objGS.General.GlobalAudioCurFile!=b.AudioTrackFile){C.Log("m_objActiveModeHandler_onLoadComplete",LOG.TRACE,"Changing the track",b.AudioTrackFile);g_objGS.General.GlobalAudioCurFile=b.AudioTrackFile;g_objAudio.onLoadComplete=C.g_objAudio_onLoadComplete;if(g_objAudio.Load(b.AudioTrackFile)==false)throw"Error @ g_objAudio.Load";
return}if(g_objAudio.PlayState!=PLAYSTATE.PLAYING){if(g_objAudio.SetCurrentTime(b.AudioTrackStart/1E7)==false)throw"Error @ g_objAudio.SetCurrentTime";if(g_EnableLoger==true&&g_objTR.SetNotesMessage(b.AudioTrackFile+" > "+b.AudioTrackStart/1E7+"  == "+b.AudioTrackEnd/1E7)==false)throw"Error @ g_objTR.SetNotesMessage";}}if(g_objGS.General.PlayState==PLAYSTATE.PLAYING){if(C.Play()==false)throw"Error @ ME.Play";}else C.onLoadComplete(true)}catch(c){C.Log("m_objActiveModeHandler_onLoadComplete",LOG.EXCEPTION,
"",c),C.onLoadComplete(false)}}function g(){var a=true;try{var b=FlyWeight.GetObject(PLAYABLEOBJECTS.CONTINUELAYER);if(T==true)if(b.Visible=true,b.ShowContinueButton==true){if(g_objTR.StatusBar.Show(b.ShowContinueButton)==false)throw"Error @ g_objTR.StatusBar.Show";}else g_objGS.General.ActiveMode==MODETYPE.SHOW&&g_objTR.SetFocus(VCRBUTTON.PLAY);else if(b.Visible=false,g_objTR.StatusBar.Hide()==false)throw"Error @ g_objTR.StatusBar.Hide";}catch(c){a=false,C.Log("ManageStatusbarDisplay",LOG.EXCEPTION,
"",c)}return a}function k(a){C.Log("m_objInfoPlayer_onPlayComplete",LOG.ENTRY,"bSuccess",a);try{if(a==false)throw"m_objInfoPlayer_onPlayComplete = false";else S==STEPTYPE.VARIATION?C.PlayVariationDefaultOptionOnContinueClick(C.CurrentStepIndex):g_objGS.General.ActiveMode==MODETYPE.SHOW?v():B()}catch(b){C.Log("m_objInfoPlayer_onPlayComplete",LOG.EXCEPTION,"",b),C.onPlayComplete(false)}}function o(a){C.Log("m_objActiveModeHandler_onPlayComplete",LOG.ENTRY,"bSuccess",a);try{if(a==false)throw"m_objActiveModeHandler_onPlayComplete = false";
else{if(FlyWeight.ShiftCursor()==false)throw"Error @ FlyWeight.ShiftCursor";g_objGS.General.ActiveMode==MODETYPE.SHOW?v():(g_objGS.General.ActiveMode==MODETYPE.GUIDE||g_objGS.General.ActiveMode==MODETYPE.TEST)&&B()}}catch(b){C.Log("m_objActiveModeHandler_onPlayComplete",LOG.EXCEPTION,"",b),C.onPlayComplete(false)}}function v(){try{if(g_objGS.General.PlayState==PLAYSTATE.PLAYING){C.CurrentStepIndex++;if(D()==false)throw"Error @ SetTrackLocation";for(var a;;){a=C.ProcessTaskData.GetStepObject(C.CurrentStepIndex);
if(a==null)break;if(a.InMode[g_objGS.General.ActiveMode]==true)break;C.CurrentStepIndex++}if(a!=null){if(C.SelectedVariations.length>0){if(C.SelectedVariations[C.SelectedVariations.length-1].EndCompleted==true){var e=C.SelectedVariations[C.SelectedVariations.length-1].Jump;C.SelectedVariations.pop();C.onVariationCompleted(e);return}if(a.TPSID==C.SelectedVariations[C.SelectedVariations.length-1].End)C.SelectedVariations[C.SelectedVariations.length-1].EndCompleted=true}S=a.Type;if(g_objTracker.Engine.Step_Started(a,
K.Result)==false)throw"g_objTracker.Step_Started ";O=F.Stop;if(a.Type==STEPTYPE.INFOSTEP){if(c(a,C.CurrentStepIndex)==false)throw"Error @ LoadInfoStep";}else if(a.Type==STEPTYPE.VARIATION){if(H(a)==false)throw"Error @LoadVariationStep";}else if(a.Type==STEPTYPE.NAVIGATION)if(a.StopOrNav==NAVSTEPTYPE.STOP)C.onPlayComplete(true);else{if(a.StopOrNav==NAVSTEPTYPE.NAVIGATE&&a.Jump!="")C.onVariationCompleted(a.Jump)}else{if(q(a)==false)throw"Error @ IsStatusBarRequired";if(b(a)==false)throw"Error @ SetStepProgressMessage";
if(d(a)==false)throw"Error @ SetNotesMessage";if(g_objTR.Cuecard.HighlightStep(C.ProcessTaskData.ResLoc,C.CurrentStepIndex)==false)throw"Error @ g_objTR.Cuecard.HighlightStep";C.Log("TaskAfter_Infostep_Or_ShowMode_OnPlayComplete",LOG.SPECIAL,"Loading Next Step for > StepIndex > ",C.CurrentStepIndex);if(r(a)==false)throw"Error @ SetSVFlag";if(J.Load(C.CurrentStepIndex)==false)throw"Error @ m_objSID.Load";}}else{if(C.SelectedVariations.length>0)C.SelectedVariations[C.SelectedVariations.length-1].EndCompleted=
true;C.CurrentStepIndex--;if(G()==false)throw"Error @ ProcessPlayCompleted";}}}catch(f){C.Log("TaskAfter_Infostep_Or_ShowMode_OnPlayComplete",LOG.EXCEPTION,"",f),C.onPlayComplete(false)}}function p(a){var b=true;try{if(K.PlayMode=PLAYMODE.EVENT,a.Type==STEPTYPE.WINDOWACTIVATE)K.PlayMode=PLAYMODE.AUTOPLAY;else if(C.bReloaded==false&&K.Result==false&&a.SubStepCount>0&&a.IsSubStep==true)K.PlayMode=PLAYMODE.AUTOPLAY}catch(c){b=false,C.Log("SetAutoPlayStatus",LOG.EXCEPTION,"",c)}return b}function q(a){var b=
true;try{T=a.Type==STEPTYPE.WINDOWACTIVATE?true:false}catch(c){b=false,C.Log("IsStatusBarRequired",LOG.EXCEPTION,"",c)}return b}function E(a){var b=true;try{var c=K.Result;if(a.Question!=null)c=K.PlayableObjectsList_CurStep.QUESTION.Result;if(A(a.StepIndex,c)==false)throw"Error @ SetCuecardResultIcon";if(g_objTracker.Engine.Step_Ended("",c)==false)throw"g_objTracker.Step_Ended ";}catch(e){b=false,C.Log("ActionAfter_SeperateStep",LOG.EXCEPTION,"",e)}return b}function u(a){try{for(var b=null;;){b=C.ProcessTaskData.GetStepObject(a);
if(b==null)break;if(b.InMode[g_objGS.General.ActiveMode]==true)break;a++}}catch(c){b=null,C.Log("GetNextStep",LOG.EXCEPTION,"",c)}return b}function B(){try{var a=null,e=1,f=C.ProcessTaskData.GetStepObject(C.CurrentStepIndex);if(f.Type==STEPTYPE.INFOSTEP||f.Type==STEPTYPE.WINDOWACTIVATE){if(f.Question!=null&&E(f)==false)throw"Error @ ActionAfter_SeperateStep";}else if(a=C.ProcessTaskData.GetStepObject(C.CurrentStepIndex+e),f.EventControls[EVENTTYPE.TYPETEXT]&&f.EventControls[EVENTTYPE.TYPETEXT].Rule==
TYPETEXT_VALIDATION_RULE.NEXTACTION){e=2;if(a.SubStepCount>0)if(a.IsSubStep==false){if(E(f)==false)throw"Error @ ActionAfter_SeperateStep";if(g_objTR.Cuecard.HighlightStep(C.ProcessTaskData.ResLoc,C.CurrentStepIndex+1)==false)throw"Error @ g_objTR.Cuecard.HighlightStep";}else{var g=C.ProcessTaskData.GetStepObject(f.GroupStepParentIndex),n=u(g.GroupStepParentIndex+g.SubStepCount+1),k;if(k=g.GroupStepParentIndex+g.SubStepCount==n.StepIndex-1){var g=a,o=true;try{var B=n=false;switch(K.ResultType){case RESULTTYPE.WRONGFIRSTHALF:B=
true;break;case RESULTTYPE.WRONGSECONDHALF:n=true;break;case RESULTTYPE.CORRECT:n=B=true}B=n&&B;if(A(f.StepIndex,B)==false)throw"Error @ SetCuecardResultIcon";if(g!=null&&g_objTracker.Engine.Step_Started(g,n)==false)throw"g_objTracker.Step_Started ";if(g_objTracker.Engine.Step_Ended("",B)==false)throw"g_objTracker.Step_Ended ";}catch(v){o=false,C.Log("ActionAfter_NextAction_GroupStep",LOG.EXCEPTION,"",v)}k=o==false}if(k)throw"Error @ ActionAfter_NextAction_GroupStep";}else{k=a;g=true;try{n=o=false;
switch(K.ResultType){case RESULTTYPE.WRONGFIRSTHALF:n=true;break;case RESULTTYPE.WRONGSECONDHALF:o=true;break;case RESULTTYPE.CORRECT:o=n=true}if(A(f.StepIndex,o)==false)throw"Error @ SetCuecardResultIcon";if(k!=null){if(A(k.StepIndex,n)==false)throw"Error @ SetCuecardResultIcon";if(g_objTracker.Engine.Step_Started(k,o)==false)throw"g_objTracker.Step_Started ";}if(g_objTracker.Engine.Step_Ended("",n)==false)throw"g_objTracker.Step_Ended ";}catch(D){g=false,C.Log("ActionAfter_NextAction_SeperateStep",
LOG.EXCEPTION,"",D)}if(g==false)throw"Error @ ActionAfter_NextAction_SeperateStep";if(g_objTR.Cuecard.HighlightStep(C.ProcessTaskData.ResLoc,C.CurrentStepIndex+1)==false)throw"Error @ g_objTR.Cuecard.HighlightStep";}if(C.SelectedVariations.length>0){if(C.SelectedVariations[C.SelectedVariations.length-1].EndCompleted==true){var z=C.SelectedVariations[C.SelectedVariations.length-1].Jump;C.SelectedVariations.pop();C.onVariationCompleted(z);return}if(a.TPSID==C.SelectedVariations[C.SelectedVariations.length-
1].End)C.SelectedVariations[C.SelectedVariations.length-1].EndCompleted=true}a=null}else if(f.SubStepCount>0){if(f.IsSubStep!=false&&(a==null||a.IsSubStep==false)){g=C.ProcessTaskData.GetStepObject(f.GroupStepParentIndex);a=u(g.GroupStepParentIndex+g.SubStepCount+1);f=true;try{o=K.Result;if((a==null||a.IsSubStep==false)&&A(g.StepIndex,o)==false)throw"Error @ SetCuecardResultIcon";if(g_objTracker.Engine.Step_Ended("",o)==false)throw"g_objTracker.Step_Ended ";}catch(I){f=false,C.Log("ActionAfter_GroupStep",
LOG.EXCEPTION,"",I)}if(f==false)throw"Error @ ActionAfter_GroupStep";}}else if(E(f)==false)throw"Error @ ActionAfter_SeperateStep";for(C.CurrentStepIndex+=e;;){a=C.ProcessTaskData.GetStepObject(C.CurrentStepIndex);if(a==null)break;if(a.InMode[g_objGS.General.ActiveMode]==true)break;C.CurrentStepIndex++}if(a!=null){S=a.Type;if(C.SelectedVariations.length>0){if(C.SelectedVariations[C.SelectedVariations.length-1].EndCompleted==true){z=C.SelectedVariations[C.SelectedVariations.length-1].Jump;C.SelectedVariations.pop();
C.onVariationCompleted(z);return}if(a.TPSID==C.SelectedVariations[C.SelectedVariations.length-1].End)C.SelectedVariations[C.SelectedVariations.length-1].EndCompleted=true}if(g_objTracker.Engine.Step_Started(a,K.Result)==false)throw"g_objTracker.Step_Started ";O=F.Stop;if(a.Type==STEPTYPE.INFOSTEP){if(c(a,C.CurrentStepIndex)==false)throw"Error @ LoadInfoStep";}else if(a.Type==STEPTYPE.VARIATION){if(H(a)==false)throw"Error @LoadVariationStep";}else if(a.Type==STEPTYPE.NAVIGATION)if(a.StopOrNav==NAVSTEPTYPE.STOP)C.onPlayComplete(true);
else{if(a.StopOrNav==NAVSTEPTYPE.NAVIGATE)C.onVariationCompleted(a.TPSID)}else{if(q(a)==false)throw"Error @ IsStatusBarRequired";if(p(a)==false)throw"Error @ SetAutoPlayStatus()";if(b(a)==false)throw"Error @ SetStepProgressMessage";if(d(a)==false)throw"Error @ g_objTR.SetNotesMessage";if(g_objTR.Cuecard.HighlightStep(C.ProcessTaskData.ResLoc,C.CurrentStepIndex)==false)throw"Error @ g_objTR.Cuecard.HighlightStep";C.Log("TaskAfter_Infostep_Or_GuideTestMode_OnPlayComplete",LOG.SPECIAL,"Loading Next Step for > StepIndex > ",
C.CurrentStepIndex);if(r(a)==false)throw"Error @ SetSVFlag";g_CurrentStepType=a.Type;if(J.Load(C.CurrentStepIndex)==false)throw"Error @ m_objSID.Load";}}else{if(C.SelectedVariations.length>0)C.SelectedVariations[C.SelectedVariations.length-1].EndCompleted=true;C.CurrentStepIndex-=e;if(G()==false)throw"Error @ ProcessPlayCompleted";}}catch(L){C.Log("TaskAfter_Infostep_Or_GuideTestMode_OnPlayComplete",LOG.EXCEPTION,"",L),C.onPlayComplete(false)}}function A(a,b){var c=true;try{if(C.Log("SetCuecardResultIcon",
LOG.EVENTLIST,"Result > "+g_objGS.General.ActiveMode,K.ResultType),g_objTR.Cuecard.DisplayResultIcon(C.ProcessTaskData.ResLoc,a,b)==false)throw"Error @ g_objTR.Cuecard.DisplayResultIcon";}catch(e){c=false,C.Log("SetCuecardResultIcon",LOG.EXCEPTION,"",e)}return c}function G(){var a=true;try{if(C.SelectedVariations.length>0&&C.SelectedVariations[C.SelectedVariations.length-1].EndCompleted==true){var b=C.SelectedVariations[C.SelectedVariations.length-1].Jump;C.SelectedVariations.pop();C.onVariationCompleted(b);
return true}if(K.Stop()==false)throw"Error @ m_objActiveModeHandler.Load";C.onPlayComplete(true)}catch(c){a=false,C.Log("ProcessPlayCompleted",LOG.EXCEPTION,"",c)}return a}function D(){var a=true;try{if(C.CurrentStepIndex==1)g_objGS.General.TrackLocation=TRACKLOCATION.START;else{for(var b,c=C.CurrentStepIndex+1;;){b=C.ProcessTaskData.GetStepObject(c);if(b==null)break;if(b.InMode[g_objGS.General.ActiveMode]==true)break;c++}var e=-1;if(b!=null)if(b.IsSubStep==true||b.SubStepCount>0)var f=C.ProcessTaskData.GetStepObject(b.GroupStepParentIndex),
e=f.GroupStepParentIndex+f.SubStepCount+1;else e=c-1;if(Number(e)==-1||Number(e)>C.ProcessTaskData.Steps.length)g_objGS.General.TrackLocation=TRACKLOCATION.END;else{for(c=C.CurrentStepIndex-1;;){b=C.ProcessTaskData.GetStepObject(c);if(b==null)break;if(b.InMode[g_objGS.General.ActiveMode]==true)break;c--}g_objGS.General.TrackLocation=b==null?TRACKLOCATION.START:TRACKLOCATION.BETWEEN}}if(g_objTR.SetVCRButtonEnableState()==false)throw"Error @ g_objTR.SetVCRButtonEnableState()";}catch(d){a=false,C.Log("SetTrackLocation",
LOG.EXCEPTION,"",d)}return a}function r(a){var b=true;try{for(md in X=false,a.MediaFiles)if(a.MediaFiles[md].MediaType==MEDIATYPE.SCREENVIDEO){X=true;break}}catch(c){b=false,C.Log("SetSVFlag",LOG.EXCEPTION,"",c)}return b}function H(a){var b=true;try{var e=false;g_objGS.General.ActiveMode==MODETYPE.SHOW&&a.VariationAutoPlaySM==true?e=true:g_objGS.General.ActiveMode==MODETYPE.GUIDE&&a.VariationAutoPlayGM==true?e=true:g_objGS.General.ActiveMode==MODETYPE.TEST&&a.VariationAutoPlayTM==true&&(e=true);if(e==
true){if(Z(a)==false)throw"Error @ AutoPlayDefaultVariationOption";}else if(c(a,C.CurrentStepIndex)==false)throw"Error @ LoadInfoStep";}catch(f){b=false,C.Log("LoadVariationStep",LOG.EXCEPTION,"",f)}return b}clsPlayerBase.call(this,"clsProcessPlayer");this.ProcessTaskData=this.CanvasHolder=null;this.CurrentStepIndex=-1;this.bReloaded=false;var C=this,J=new clsStepImageDisplayer,I=new clsInfoStepPlayer,L=new clsSMHandler,N=new clsGMHandler,M=new clsTMHandler,K=null,F=null,T=false,S=STEPTYPE.NONE,O=
null,P=0,z,X=false;this.onAutoPlayDefaultVariationOption=this.onVariationCompleted=null;this.SelectedVariations=[];this.Initialize=function(){var a=true;try{if(C.CanvasHolder==null)throw"CanvasHolder not provided";if(C.onVariationCompleted==null)throw"onVariationCompleted not binded";if(J.Initialize(C.CanvasHolder)==false)throw"Error @ m_objSID.Initialize";if(I.Initialize()==false)throw"Error @ m_objInfoPlayer.Initialize";if(L.Initialize(C.CanvasHolder)==false)throw"Error @ m_objSMHandler.Initialize";
if(N.Initialize(C.CanvasHolder)==false)throw"Error @ m_objGMHandler.Initialize";if(M.Initialize(C.CanvasHolder)==false)throw"Error @ m_objTMHandler.Initialize";switch(g_objGS.General.ActiveMode){case MODETYPE.SHOW:K=L;break;case MODETYPE.GUIDE:K=N;break;case MODETYPE.TEST:K=M}uid_json.settings.general.playbegindelay!=void 0&&(P=parseInt(uid_json.settings.general.playbegindelay))}catch(b){a=false,C.Log("Initialize",LOG.EXCEPTION,"",b)}return a};this.Load=function(a){var g=true;try{if(C.onLoadComplete==
null)throw"onLoadComplete is not binded)";if(C.ProcessTaskData==null)throw"ProcessTaskData is null";var u=C.ProcessTaskData.GetStepObject(a);if(u.Type==STEPTYPE.NAVIGATION){if(u.StopOrNav==NAVSTEPTYPE.STOP)C.onPlayComplete(true);else if(u.StopOrNav==NAVSTEPTYPE.NAVIGATE&&u.Jump!="")C.onVariationCompleted(u.Jump);return g}if(g_objTR.SetAudioAnimation(false)==false)throw"Error @ g_objTR.SetAudioAnimation";O=null;clearTimeout(z);z=0;K.ProcessTaskData=C.ProcessTaskData;F=K;K.PlayMode=PLAYMODE.EVENT;if(C.SelectedVariations.length>
0&&C.SelectedVariations[C.SelectedVariations.length-1].EndCompleted==true){var A=C.SelectedVariations[C.SelectedVariations.length-1].Jump;C.SelectedVariations.pop();C.onVariationCompleted(A);return}for(var B;;){B=C.ProcessTaskData.GetStepObject(a);if(B==null)break;if(B.InMode[g_objGS.General.ActiveMode]==true)break;a++}if(B==null)if(a>C.ProcessTaskData.Steps.length){C.CurrentStepIndex=a-1;if(G()==false)throw"Error @ ProcessPlayCompleted";return true}else throw"ObjStep is null";if(q(B)==false)throw"Error @ IsStatusBarRequired";
C.CurrentStepIndex=Number(a);if(D()==false)throw"Error @ SetTrackLocation()";g_CurrentStepType=B.Type;if(C.bReloaded==false&&(g_objTrackerData!=null&&g_objTrackerData.Modes[0].Tasks[0].Process[0].Steps.length>0||B.Type==STEPTYPE.WINDOWACTIVATE)&&p(B)==false)throw"Error @ SetAutoPlayStatus()";if(B.Type==STEPTYPE.WINDOWACTIVATE||B.Type==STEPTYPE.INFOSTEP)K.PlayMode=PLAYMODE.AUTOPLAY;J.ProcessTaskData=C.ProcessTaskData;u=true;try{J.onLoadComplete=e,I.onLoadComplete=f,I.onPlayComplete=k,L.onLoadComplete=
n,L.onPlayComplete=o,N.onLoadComplete=n,N.onPlayComplete=o,M.onLoadComplete=n,M.onPlayComplete=o}catch(E){u=false,C.Log("AttachEvents",LOG.EXCEPTION,"",E)}if(u==false)throw"Error @ AttachEvents";if(g_objTracker.Engine.Step_Started(B)==false)throw"g_objTracker.Step_Started ";S=B.Type;m_CurStepIndex=a;if(r(B)==false)throw"Error @ SetSVFlag";if(B.Type==STEPTYPE.INFOSTEP){if(C.bReloaded==true&&J.Reset()==false)throw"error @ m_objSID.Reset";if(c(B,a)==false)throw"Error @ LoadInfoStep";}else if(B.Type==
STEPTYPE.VARIATION){if(C.bReloaded==true&&J.Reset()==false)throw"error @ m_objSID.Reset";if(H(B)==false)throw"Error @LoadVariationStep";}else{if(b(B)==false)throw"Error @ SetStepProgressMessage";if(d(B)==false)throw"Error @ SetNotesMessage";if(g_objTR.Cuecard.HighlightStep(C.ProcessTaskData.ResLoc,a,B.SubStepCount)==false)throw"Error @ g_objTR.Cuecard.HighlightStep";if(J.Load(a)==false)throw"Error @ m_objSID.Load";}C.bReloaded=false;if(C.SelectedVariations.length>0&&B.TPSID==C.SelectedVariations[C.SelectedVariations.length-
1].End)C.SelectedVariations[C.SelectedVariations.length-1].EndCompleted=true}catch(v){g=false,C.Log("Load",LOG.EXCEPTION,"",v)}return g};this.g_objAudio_onLoadComplete=function(a){try{g_objAudio.onLoadComplete=null;if(a==false)throw"g_objAudio raised g_objAudio_onLoadComplete(false)";var b=C.ProcessTaskData.GetStepObject(C.CurrentStepIndex);if(g_objAudio.SetCurrentTime(b.AudioTrackStart/1E7)==false)throw"Error @ g_objAudio.SetCurrentTime";if(g_EnableLoger==true&&g_objTR.SetNotesMessage(b.AudioTrackFile+
" "+b.AudioTrackStart/1E7)==false)throw"Error @ g_objTR.SetNotesMessage";if(g_objGS.General.PlayState==PLAYSTATE.PLAYING){if(C.Play()==false)throw"Error @ ME.Play";}else C.onLoadComplete(true)}catch(c){C.Log("g_objAudio_onLoadComplete",LOG.EXCEPTION,"",c),C.onLoadComplete(false)}};this.Play=function(){var b=true;try{if(C.onPlayComplete==null)throw"onPlayComplete ios not binded)";g_objTR.onCanvasScrollOver=a;if(g_objTR.StartCanvasScroll()==false)throw"g_objTR.StartCanvasScroll";if(g_objGS.General.GlobalAudio==
true&&g_objGS.General.ActiveMode==MODETYPE.SHOW){var c=C.ProcessTaskData.GetStepObject(C.CurrentStepIndex);if(c.AudioTrackStart!=-1){C.Log("Play",LOG.TRACE,"AudioTrack",c.AudioTrackStart+" , "+c.AudioTrackEnd);if((g_objAudio.PlayState==PLAYSTATE.READY||g_objAudio.PlayState==PLAYSTATE.PAUSED||g_objAudio.PlayState==PLAYSTATE.STOPPED)&&g_objAudio.Play()==false)throw"Error @ g_objAudio.Play";if(g_objTR.SetAudioAnimation(true)==false)throw"Error @ g_objTR.SetAudioAnimation";}else if(g_objAudio.PlayState==
PLAYSTATE.PLAYING){if(g_objAudio.Pause()==false)throw"Error @ g_objAudio.Pause";if(g_objTR.SetAudioAnimation(false)==false)throw"Error @ g_objTR.SetAudioAnimation";}}if(g_ContinueButton!=null)try{g_ContinueButton.SetFocus!=void 0?g_ContinueButton.SetFocus():g_ContinueButton.focus(),g_ContinueButton=null}catch(e){}}catch(f){b=false,C.Log("Play",LOG.EXCEPTION,"",f)}return b};this.Pause=function(){var a=true;try{if(F.Pause()==false)throw"Error @ m_objActivePlayer.Pause";if(g_objGS.General.GlobalAudio==
true&&g_objGS.General.ActiveMode==MODETYPE.SHOW&&g_objAudio.PlayState==PLAYSTATE.PLAYING){if(g_objAudio.Pause()==false)throw"Error @ g_objAudio.Pause";if(g_objTR.SetAudioAnimation(false)==false)throw"Error @ g_objTR.SetAudioAnimation";}}catch(b){a=false,C.Log("Pause",LOG.EXCEPTION,"",b)}return a};this.Stop=function(){var a=true;try{if(F!=null){if(J.Stop()==false)throw"Error @ m_objSID.Stop";if(g_objTR.Stop()==false)throw"Error @ ME.g_objTR.Stop";if(F.Stop()==false)throw"Error @ m_objActivePlayer.Stop";
J.onLoadComplete=null;I.onLoadComplete=null;I.onPlayComplete=null;L.onLoadComplete=null;L.onPlayComplete=null;N.onLoadComplete=null;N.onPlayComplete=null;M.onLoadComplete=null;M.onPlayComplete=null}}catch(b){a=false,C.Log("Stop",LOG.EXCEPTION,"",b)}return a};this.RemoveAudio=function(){var a=true;try{if(F!=null&&F.RemoveAudio()==false)throw"Error @ m_objActivePlayer.RemoveAudio";}catch(b){a=false,C.Log("RemoveAudio",LOG.EXCEPTION,"",b)}return a};this.RemoveCallout=function(){var a=true;try{if(F.RemoveCallout!=
void 0&&F.RemoveCallout()==false)throw"Error @ m_objActivePlayer.RemoveCallout";}catch(b){a=false,C.Log("RemoveCallout",LOG.EXCEPTION,"",b)}return a};this.SetMode=function(){var a=true;try{switch(g_objGS.General.ActiveMode){case MODETYPE.SHOW:K=L;break;case MODETYPE.GUIDE:K=N;break;case MODETYPE.TEST:K=M}}catch(b){a=false,C.Log("SetMode",LOG.EXCEPTION,"",b)}return a};this.SetCurrentVariationOption=function(a){var b=true;try{if(C.SelectedVariations.length>0&&C.SelectedVariations[C.SelectedVariations.length-
1].TPSIP==a.TPSID)return C.SelectedVariations[C.SelectedVariations.length-1]=a,b;C.SelectedVariations.push(a)}catch(c){b=false,C.Log("SetCurrentVariationOption",LOG.EXCEPTION,"",c)}return b};var Z=function(a){var b=true;try{if(C.onAutoPlayDefaultVariationOption==null)throw"onAutoPlayDefaultVariationOption not binded";switch(g_objGS.General.ActiveMode){case MODETYPE.SHOW:for(var c in a.VariationOptions)if(g_objGS.General.VPathSetForSM==1&&a.VariationOptions[c].Default=="1"){a.VariationOptions[c].EndCompleted=
false;C.onAutoPlayDefaultVariationOption(a.VariationOptions[c]);break}break;case MODETYPE.GUIDE:for(c in a.VariationOptions)if(g_objGS.General.VPathSetForGM==1==true&&a.VariationOptions[c].Default=="1"){a.VariationOptions[c].EndCompleted=false;C.onAutoPlayDefaultVariationOption(a.VariationOptions[c]);break}break;case MODETYPE.TEST:for(c in a.VariationOptions)if(g_objGS.General.VPathSetForTM==1&&a.VariationOptions[c].Default=="1"){a.VariationOptions[c].EndCompleted=false;C.onAutoPlayDefaultVariationOption(a.VariationOptions[c]);
break}}}catch(e){b=false,C.Log("AutoPlayDefaultVariationOption",LOG.EXCEPTION,"",e)}return b};this.PlayVariationDefaultOptionOnContinueClick=function(){var a=true;try{for(var b;;){b=C.ProcessTaskData.GetStepObject(C.CurrentStepIndex);if(b==null)break;if(b.InMode[g_objGS.General.ActiveMode]==true)break}if(b.Type!=STEPTYPE.VARIATION)a=false;else if(Z(b)==false)throw"Error @ AutoPlayDefaultVariationOption";}catch(c){a=false,C.Log("PlayVariationDefaultOptionOnContinueClick",LOG.EXCEPTION,"",c)}return a};
this.ClearSelectedVariationArray=function(){var a=true;try{C.SelectedVariations=[]}catch(b){a=false,C.Log("ClearSelectedVariationArray",LOG.EXCEPTION,"",b)}return a}}
function clsStepImageDisplayer(){function d(f){var d=true;try{if(f==false)throw"m_objSIL fired onLoadComplete=FALSE";c.ScrollRequired=false;f=true;try{var v=0;if(n==true){var p=Number(a[0].ImageWidth),q=Number(a[0].ImageHeight);uid_json.settings.stepimage.imageresizeoption!=IMAGERESIZE.WRTBIGIMAGE&&g_objGS.SetResizeFactor(p,q);uid_json.settings.stepimage.imageresizeoption!=IMAGERESIZE.FULLIMAGE&&g_objTR.AdjustCanvas(p*g_objGS.General.ResizeFactor,q*g_objGS.General.ResizeFactor);m_objCanvas.clearRect()}else v=
a.length-1;var E=a.length,u,B,A,G,D,r,H,C;for(u=v;u<E;){var J=e.LoadedStepImageTags[u];B=a[u];A=B.ImageWidth;G=B.ImageHeight;D=B.ImageLeft*g_objGS.General.ResizeFactor;r=B.ImageTop*g_objGS.General.ResizeFactor;H=A*g_objGS.General.ResizeFactor;C=G*g_objGS.General.ResizeFactor;B.IsFullImage==true&&m_objCanvas.SetCanvasDimension(B.ImageWidth*g_objGS.General.ResizeFactor,B.ImageHeight*g_objGS.General.ResizeFactor);m_objCanvas.drawImage(u,J,0,0,A,G,D,r,H,C);u++}if(uid_json.settings.stepimage.imageresizeoption==
IMAGERESIZE.FULLIMAGE)if(p=Number(a[0].ImageWidth)*g_objGS.General.ResizeFactor,q=Number(a[0].ImageHeight)*g_objGS.General.ResizeFactor,p<g_objTR.CanvasWidth&&q<g_objTR.CanvasHeight){if(g_objTR.AdjustCanvas(p,q)==false)throw"Error @ g_objTR.AdjustCanvas";}else{E=true;try{var I=Number(g_objTR.CanvasWidth),L=Number(g_objTR.CanvasHeight);B=u=0;A={l:-1,t:-1,r:-1,b:-1,w:-1,h:-1};r=D=G=null;var N=c.ProcessTaskData.GetStepObject(g),M;for(M in N.AnnotationControls){var K=N.AnnotationControls[M],F=K.Type.toUpperCase();
F==ANNOTATION.OUTERREGION?G=K:F==ANNOTATION.CALLOUT||F==ANNOTATION.CALLOUT?D==null?D=K:K.AutoAnnotation==1&&(D=K):F==ANNOTATION.DROPREGION&&(r=K)}A=b(A,G);A=b(A,D);A=b(A,r);if(N.EventControls[EVENTTYPE.TYPETEXT]&&N.EventControls[EVENTTYPE.TYPETEXT].Rule==TYPETEXT_VALIDATION_RULE.NEXTACTION){G=null;var T=c.ProcessTaskData.GetStepObject(++g);for(M in T.AnnotationControls)K=T.AnnotationControls[M],F=K.Type.toUpperCase(),F==ANNOTATION.OUTERREGION&&(G=K);A=b(A,G)}A.l-=10;A.t-=10;A.r+=10;A.b+=10;A.l=Math.round(A.l,
0);A.t=Math.round(A.t,0);A.r=Math.round(A.r,0);A.b=Math.round(A.b,0);N.Type==STEPTYPE.WINDOWACTIVATE&&(A.b+=g_objTR.StatusBarHeight);if(A.l<0)A.l=0;if(A.t<0)A.t=0;A.w=A.r-A.l;A.h=A.b-A.t;var S=Number(g_objTR.CanvasScrollLeft),O=Number(g_objTR.CanvasScrollTop);if(A.w>0||A.h>0){A.w>I?u=A.l:A.r>I-g_objTR.CanvasScrollBarWidthHeight&&(u=I-(A.l+A.w)-g_objTR.CanvasScrollBarWidthHeight);A.h>L?B=A.t:A.b>L-g_objTR.CanvasScrollBarWidthHeight&&(B=L-(A.t+A.h)-g_objTR.CanvasScrollBarWidthHeight);u=Math.abs(u,0);
B=Math.abs(B,0);M=N=true;A.l>S&&A.r<S+I&&(N=false);A.t>O&&A.b<O+L&&(M=false);c.ScrollRequired=false;if(N||M)c.ScrollRequired=true;if(g_objTR.SetScrollCanvasValues(u,B,p,q,c.ScrollRequired)==false)throw"Error @ g_objTR.ScrollCanvasTo";}}catch(P){E=false,c.Log("RepositionCanvas",LOG.EXCEPTION,"",P)}if(E==false)throw"Error @ RepositionCanvas";}}catch(z){f=false,c.Log("PaintCanvasWithImages",LOG.EXCEPTION,"",z)}if(f==false)throw"PaintCanvasWithImages";}catch(X){d=false,c.Log("m_objSIL_onLoadComplete",
LOG.EXCEPTION,"",X)}c.onLoadComplete(d)}function b(a,b){try{if(b==null)return a;var e=Number(b.Left)*g_objGS.General.ResizeFactor,f=Number(b.Top)*g_objGS.General.ResizeFactor,d=e+Number(b.Width)*g_objGS.General.ResizeFactor,g=f+Number(b.Height)*g_objGS.General.ResizeFactor;if(a.l==-1)a.l=e,a.t=f,a.r=d,a.b=g;else{if(a.l>e)a.l=e;if(a.t>f)a.t=f;if(a.r<d)a.r=d;if(a.b<g)a.b=g}}catch(n){bRet=false,c.Log("GetRegion",LOG.EXCEPTION,"",n)}return a}clsPlayerBase.call(this,"clsStepImageDisplayer");var c=this,
e=new clsStepImageLoader,a=[],f=[],n=false,g=-1;this.ScrollRequired=false;this.ProcessTaskData=null;this.Initialize=function(a){var b=true;try{if(c.Initialized==PLAYSTATE.INITIALIZED)throw"Already initialized";if(a==null)throw"holderDiv not supplied";m_objCanvas=BROWSER.LEGACY==true?new clsStepImageRendererDiv(a):new clsStepImageRendererCanvas(a);m_objCanvas.create();if(e.Initialize(a)==false)throw"Erroro @ m_objSIL.Initialize";c.Initialized=PLAYSTATE.INITIALIZED}catch(f){b=false,c.Log("Initialize",
LOG.EXCEPTION,"",f)}return b};this.Load=function(b){c.Log("Load",LOG.ENTRY,"StepIndex",b);var o=true;try{g_objGS.General.Busy=true;g_objTR.SetBusyFlag(true);if(c.onLoadComplete==null)throw"ME.onLoadComplete = null";if(m_objCanvas==null)throw"m_objCanvas is null";g=b;var v=true;try{for(var p=[],q=b;;){var E=false,u=c.ProcessTaskData.GetStepObject(q);for(A in u.DiffImages)p.push(u.DiffImages[A]),E=u.DiffImages[A].IsFullImage;if(E==true)break;q--;if(q<0)break}if(p.length==0)throw"Failed to collect DI objects for stepindex > "+
b;for(var q=[],B=p.length-1;B>=0;)q.push(p[B]),B--;n=true;if(q.length-1==a.length)for(var A in a)if(a[A].ImagePath!=q[A].ImagePath){n=true;break}else n=false;a.length=0;for(B=f.length=0;B<q.length;)a.push(q[B]),f.push(q[B].ImagePath),B++}catch(G){v=false,c.Log("GetStepImagesToBeLoaded",LOG.EXCEPTION,"",G)}if(v==false)throw"Error @ GetStepImagesToBeLoaded";if(a.length==0)throw"Failed to collect DI objects for StepIndex = "+b;e.onLoadComplete=d;if(e.Load(f)==false)throw"Error @ m_objSIL.Load";}catch(D){o=
false,c.Log("Load",LOG.EXCEPTION,"",D)}return o};this.Stop=function(){var a=true;try{c.onLoadComplete=null;if(e.Stop()==false)throw"Error @ ME.m_objSIL.Stop";e.onLoadComplete=null}catch(b){a=false,c.Log("Stop",LOG.EXCEPTION,"",b)}return a};this.Reset=function(){var b=true;try{a.length=0}catch(e){b=false,c.Log("Reset",LOG.EXCEPTION,"",e)}return b}}
function clsStepImageLoader(){function d(){e.Log("LoadImage",LOG.ENTRY);var a=true;try{if(e.m_CurImgIndex>e.LoadedStepImageTags.length-1){e.Log("LoadImage",LOG.SPECIAL,"ME.m_CurImgIndex > ME.LoadedStepImageTags.length-1","Create New IMG Element");var d,g=null;try{var k=e.CreateHTMLElement("img");e.CanvasHolder.appendChild(k);g=document.getElementById(k.id);g.ImageLoaded=false;g.ImagePath="";g.onload=e.StepImage_Loaded;g.onerror=e.StepImage_LoadError}catch(o){g=null,e.Log("GetImageElement",LOG.EXCEPTION,
"",o)}d=g;if(d==null)throw"GetImageElement returned null";e.LoadedStepImageTags.push(d)}var v=b(e.LoadedStepImageTags[e.m_CurImgIndex].src);e.Log("LoadImage",LOG.SPECIAL,"Loaded Image @ IMG-"+e.m_CurImgIndex,v);var p=e.m_RequestedStepImageSRCs[e.m_CurImgIndex].replace(/\\/g,"/");if(v==p)return e.Log("LoadImage",LOG.SPECIAL,"IMG-"+e.m_CurImgIndex+" is already has "+v,"SKIPPED"),c(),true;e.Log("LoadImage",LOG.SPECIAL,"Loading Step Image, Src > ",e.m_RequestedStepImageSRCs[e.m_CurImgIndex]);e.Log("LoadImage",
LOG.SPECIAL,"Wait till","Image_onLoad or Image_onError");e.LoadedStepImageTags[e.m_CurImgIndex].ImagePath=e.m_RequestedStepImageSRCs[e.m_CurImgIndex];e.LoadedStepImageTags[e.m_CurImgIndex].ImageLoaded=false;e.LoadedStepImageTags[e.m_CurImgIndex].src=e.m_RequestedStepImageSRCs[e.m_CurImgIndex]}catch(q){a=false,e.Log("LoadImage",LOG.EXCEPTION,"",q)}return a}function b(a){var b=a;try{var c=a.lastIndexOf("_files");c!=-1&&(c+=7,b=a.substr(c))}catch(d){b=a,e.Log("GetImageFileName",LOG.EXCEPTION,"",d)}return b}
function c(){var a=true;try{if(e.m_CurImgIndex!=-1)if(e.LoadedStepImageTags[e.m_CurImgIndex].ImageLoaded=true,e.m_CurImgIndex++,e.m_CurImgIndex==e.m_RequestedStepImageSRCs.length)e.onLoadComplete(true);else{if(d()==false)throw"Error @ LoadImage";}else e.Log("LoadNextImage",LOG.EXCEPTION,"m_CurImgIndex=-1","???")}catch(b){a=false,e.Log("LoadNextImage",LOG.EXCEPTION,"ME.m_CurImgIndex",e.m_CurImgIndex)}if(a==false)e.onLoadComplete(false)}clsPlayerBase.call(this,"clsStepImageLoader");this.CanvasHolder=
null;this.LoadedStepImageTags=[];this.m_RequestedStepImageSRCs=null;this.m_CurImgIndex=-1;var e=this,a=0;this.Initialize=function(a){var b=true;try{if(a==null)throw"CanvasHolder not supplied";e.CanvasHolder=a}catch(c){b=false,e.Log("Initialize",LOG.EXCEPTION,"",c)}return b};this.Load=function(a){e.Log("Load",LOG.ENTRY,"StepImageSRCs",a.length);var c=true;try{if(e.onLoadComplete==null)throw"onLoadComplete = null";if(a.length==0)throw"StepImageSRCs.length = 0";e.m_RequestedStepImageSRCs=a;a=true;try{if(e.LoadedStepImageTags.length==
0)e.m_CurImgIndex=0;else{e.Log("BeginImageLoading",LOG.SPECIAL,"ME.LoadedStepImageTags.Length",e.LoadedStepImageTags.length);for(i in e.LoadedStepImageTags)e.Log("BeginImageLoading",LOG.SPECIAL,i,b(e.LoadedStepImageTags[i].src));if(e.LoadedStepImageTags[0].ImagePath==e.m_RequestedStepImageSRCs[0]){e.Log("BeginImageLoading",LOG.SPECIAL,"Step is from same loaded block","First Image is matiching");for(var g=0,k=e.LoadedStepImageTags.length,g=0;g<k;g++)if(e.LoadedStepImageTags[g].ImagePath==e.m_RequestedStepImageSRCs[g]){if(e.LoadedStepImageTags[g].ImageLoaded==
false)break}else break;e.m_CurImgIndex=g;e.Log("BeginImageLoading",LOG.SPECIAL,"Image Load will start from > ME.m_CurImgIndex= ",e.m_CurImgIndex)}else{e.Log("BeginImageLoading",LOG.SPECIAL,"Step is from DIFFERENT BLOCK","Reset all previous images");for(g in e.LoadedStepImageTags)e.LoadedStepImageTags[g].ImagePath="",e.LoadedStepImageTags[g].ImageLoaded=false;e.m_CurImgIndex=0}}if(e.m_CurImgIndex==e.m_RequestedStepImageSRCs.length)e.Log("BeginImageLoading",LOG.SPECIAL,"ME.m_CurImgIndex == ME.m_RequestedStepImageSRCs.length",
"Raise onLoadComplete(true) event "),e.onLoadComplete(true);else if(d()==false)throw"Error @ LoadImage";}catch(o){a=false,e.Log("BeginImageLoading",LOG.EXCEPTION,"",o)}if(a==false)throw"Erroro @ BeginImageLoading";}catch(v){c=false,e.Log("Load",LOG.EXCEPTION,"",v)}return c};this.Stop=function(){var b=true;try{clearTimeout(a),a=0,e.onLoadComplete=null,e.m_CurImgIndex=-1}catch(c){b=false,e.Log("Stop",LOG.EXCEPTION,"",c)}return b};this.StepImage_Loaded=function(){e.Log("StepImage_Loaded",LOG.ENTRY);
try{e.onLoadComplete!=null&&(a=setTimeout(c,1))}catch(b){e.Log("StepImage_Loaded",LOG.EXCEPTION,"",b)}};this.StepImage_LoadError=function(){try{e.Log("StepImage_LoadError",LOG.EXCEPTION,"Image Load Error",this.src),e.onLoadComplete(false)}catch(a){e.Log("StepImage_LoadError",LOG.EXCEPTION,"",a)}}}
clsStepImageRendererDiv=function(d){clsPlayerBase.call(this,"clsStepImageRendererDiv");var b=this,c=null,e={};this.create=function(){try{var a=b.CreateHTMLElement("div");a.style.display=g_inline;a.style.visibility="visible";d.appendChild(a);c=document.getElementById(a.id);c.style.zIndex=ZINDEX.CANVAS}catch(e){bRet=false,b.Log("create",LOG.EXCEPTION,"",e)}};this.clearRect=function(){try{for(var a in e)e[a].style.display="none",e[a].style.backgroundImage="",e[a].style.left="0px",e[a].style.top="0px",
e[a].style.filter=""}catch(c){bRet=false,b.Log("clearRect",LOG.EXCEPTION,"",c)}};this.drawImage=function(a,f,d,g,k,o,v,p,q,E){try{e[a]==null&&(e[a]=b.CreateHTMLElement("div"),c.appendChild(e[a]));tempdiv=e[a];tempdiv.style.display=g_inline;tempdiv.style.visibility="visible";tempdiv.style.width=k+"px";tempdiv.style.height=o+"px";tempdiv.style.left=v+"px";tempdiv.style.top=p+"px";tempdiv.style.filter="";try{tempdiv.style.background='url("'+f.src+'") -'+d+"px -"+g+"px";tempdiv.style.filter="progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand')";
if(k!=q)tempdiv.filters.item(0).M11=g_objGS.General.ResizeFactor;if(o!=E)tempdiv.filters.item(0).M22=g_objGS.General.ResizeFactor}catch(u){}}catch(B){bRet=false,b.Log("drawImage",LOG.EXCEPTION,"",B)}};this.SetCanvasDimension=function(a,e){try{c.style.width=a+"px",c.style.height=e+"px"}catch(d){bRet=false,b.Log("SetCanvasDimension",LOG.EXCEPTION,"",d)}}};
clsStepImageRendererCanvas=function(d){clsPlayerBase.call(this,"clsStepImageRendererCanvas");var b=this,c=null,e=null;this.create=function(){try{var a=b.CreateHTMLElement("canvas");a.style.display=g_inline;a.style.visibility="visible";d.appendChild(a);c=document.getElementById(a.id);e=c.getContext("2d")}catch(f){bRet=false,b.Log("create",LOG.EXCEPTION,"",f)}};this.clearRect=function(){try{e.clearRect(0,0,c.width,c.height)}catch(a){bRet=false,b.Log("clearRect",LOG.EXCEPTION,"",a)}};this.drawImage=
function(a,c,d,g,k,o,v,p,q,E){try{e.drawImage(c,d,g,k,o,v,p,q,E)}catch(u){bRet=false,b.Log("drawImage",LOG.EXCEPTION,"",u)}};this.SetCanvasDimension=function(a,e){try{c.width=a,c.height=e}catch(d){bRet=false,b.Log("SetCanvasDimension",LOG.EXCEPTION,"",d)}}};
var PlaySeqCreatorKeypress=function(){var d;return{Construct:function(b,c){var e=false;try{g_WriteToLog("PlaySeqCreatorKeypress","Construct","","",LOG.TRACE),d=b,d.STEP_AUDIO!=null&&d.CONSIDER_AUDIO_IN_POM==true?uid_json.settings.media.playbackoption==AUDIOPLAYBACKMODE.AFTER?(d.CALLOUT_STICKY!=null?(c.Add(d.KEYPRESS_ANIM,d.CALLOUT_STICKY),c.AddObjects(d.CALLOUT_STICKY,Array(d.STEP_AUDIO))):c.Add(d.KEYPRESS_ANIM,Array(d.STEP_AUDIO)),c.Add(d.STEP_AUDIO,Array(d.DELAY))):(c.Add(d.STEP_AUDIO,Array(d.KEYPRESS_ANIM)),
d.CALLOUT_STICKY!=null?(c.Add(d.KEYPRESS_ANIM,d.CALLOUT_STICKY),c.AddObjects(d.CALLOUT_STICKY,Array(d.DELAY))):c.Add(d.KEYPRESS_ANIM,Array(d.DELAY))):d.CALLOUT_STICKY!=null?(c.Add(d.KEYPRESS_ANIM,d.CALLOUT_STICKY),c.AddObjects(d.CALLOUT_STICKY,Array(d.DELAY))):c.Add(d.KEYPRESS_ANIM,Array(d.DELAY)),c.Add(d.DELAY,null),e=true}catch(a){g_WriteToLog("PlaySeqCreatorKeypress","Construct","",a,LOG.EXCEPTION)}return e}}}(),PlaySeqCreatorMouse=function(){try{var d;MouseStep_BlinkBefore_AudioBefore=function(b){var e=
false;try{g_WriteToLog("PlaySeqCreatorMouse","MouseStep_BlinkBefore_AudioBefore","","",LOG.TRACE);var a=[];d.STEP_AUDIO!=null&&d.CONSIDER_AUDIO_IN_POM==true?a.push(d.STEP_AUDIO):a.push(d.CURSORMOVE_ANIM);b.Add(d.OCR_Blink,a);d.ICR_Blink!=null&&b.Add(d.ICR_Blink,a);d.DR_Blink!=null&&b.Add(d.DR_Blink,a);d.STEP_AUDIO!=null&&d.CONSIDER_AUDIO_IN_POM==true&&b.Add(d.STEP_AUDIO,Array(d.CURSORMOVE_ANIM));a=[];a.push(d.OCR_NoBlink);d.ICR_NoBlink!=null&&a.push(d.ICR_NoBlink);d.DR_NoBlink!=null&&a.push(d.DR_NoBlink);
a.push(d.CURSORAUDIO_ANIM);d.DRAG_ANIM!=null?(b.Add(d.CURSORMOVE_ANIM,a),b.AddObjects(a,Array(d.DRAG_ANIM)),d.CALLOUT_STICKY!=null?(b.Add(d.DRAG_ANIM,d.CALLOUT_STICKY),b.AddObjects(d.CALLOUT_STICKY,Array(d.DELAY))):b.Add(d.DRAG_ANIM,Array(d.DELAY))):(d.CALLOUT_STICKY!=null&&g_MergeArray(a,d.CALLOUT_STICKY),b.Add(d.CURSORMOVE_ANIM,a),b.AddObjects(a,Array(d.DELAY)));b.Add(d.DELAY,null);e=true}catch(f){g_WriteToLog("PlaySeqCreatorMouse","MouseStep_BlinkBefore_AudioBefore","",f,LOG.EXCEPTION)}return e};
MouseStep_BlinkNone_AudioBefore=function(b){var e=false;try{var a=[];g_WriteToLog("PlaySeqCreatorMouse","MouseStep_BlinkNone_AudioBefore","","",LOG.TRACE);d.STEP_AUDIO!=null&&d.CONSIDER_AUDIO_IN_POM==true&&b.Add(d.STEP_AUDIO,Array(d.CURSORMOVE_ANIM));a.length=0;a.push(d.OCR_Blink);d.ICR_Blink!=null&&a.push(d.ICR_Blink);a.push(d.CURSORAUDIO_ANIM);d.DRAG_ANIM!=null?(b.Add(d.CURSORMOVE_ANIM,a),b.AddObjects(a,[d.DR_Blink,d.DRAG_ANIM]),d.CALLOUT_STICKY!=null?(b.Add(d.DR_Blink,d.CALLOUT_STICKY),b.Add(d.DRAG_ANIM,
d.CALLOUT_STICKY),b.AddObjects(d.CALLOUT_STICKY,Array(d.DELAY))):(b.Add(d.DR_Blink,Array(d.DELAY)),b.Add(d.DRAG_ANIM,Array(d.DELAY)))):(d.CALLOUT_STICKY!=null&&g_MergeArray(a,d.CALLOUT_STICKY),b.Add(d.CURSORMOVE_ANIM,a),b.AddObjects(a,Array(d.DELAY)));b.Add(d.DELAY,null);e=true}catch(f){g_WriteToLog("PlaySeqCreatorMouse","MouseStep_BlinkNone_AudioBefore","",f,LOG.EXCEPTION)}return e};MouseStep_BlinkAfter_AudioBefore=function(b){var e=false;try{g_WriteToLog("PlaySeqCreatorMouse","MouseStep_BlinkAfter_AudioBefore",
"","",LOG.TRACE);var a=[];d.STEP_AUDIO!=null&&d.CONSIDER_AUDIO_IN_POM==true&&b.Add(d.STEP_AUDIO,Array(d.CURSORMOVE_ANIM));a.push(d.OCR_Blink);d.ICR_Blink!=null&&a.push(d.ICR_Blink);d.DR_Blink!=null&&a.push(d.DR_Blink);b.Add(d.CURSORMOVE_ANIM,a);if(d.DRAG_ANIM!=null)b.AddObjects(a,Array(d.CURSORAUDIO_ANIM)),b.Add(d.CURSORAUDIO_ANIM,Array(d.DRAG_ANIM)),d.CALLOUT_STICKY!=null?(b.Add(d.DRAG_ANIM,d.CALLOUT_STICKY),b.AddObjects(d.CALLOUT_STICKY,Array(d.DELAY))):b.Add(d.DRAG_ANIM,Array(d.DELAY));else{var f=
[];f.push(d.CURSORAUDIO_ANIM);d.CALLOUT_STICKY!=null&&g_MergeArray(f,d.CALLOUT_STICKY);b.AddObjects(a,f);b.AddObjects(f,Array(d.DELAY))}b.Add(d.DELAY,null);e=true}catch(n){g_WriteToLog("PlaySeqCreatorMouse","MouseStep_BlinkAfter_AudioBefore","",n,LOG.EXCEPTION)}return e};MouseStep_BlinkBefore_AudioDuring=function(b){var e=false;try{g_WriteToLog("PlaySeqCreatorMouse","MouseStep_BlinkBefore_AudioDuring","","",LOG.TRACE);var a=[];d.STEP_AUDIO!=null&&d.CONSIDER_AUDIO_IN_POM==true&&a.push(d.STEP_AUDIO);
a.push(d.CURSORMOVE_ANIM);b.Add(d.OCR_Blink,a);d.ICR_Blink!=null&&b.Add(d.ICR_Blink,a);d.DR_Blink!=null&&b.Add(d.DR_Blink,a);a=[];a.push(d.OCR_NoBlink);d.ICR_NoBlink!=null&&a.push(d.ICR_NoBlink);d.DR_NoBlink!=null&&a.push(d.DR_NoBlink);a.push(d.CURSORAUDIO_ANIM);d.DRAG_ANIM!=null?(d.STEP_AUDIO!=null&&d.CONSIDER_AUDIO_IN_POM==true&&b.Add(d.STEP_AUDIO,a),b.Add(d.CURSORMOVE_ANIM,a),b.AddObjects(a,Array(d.DRAG_ANIM)),d.CALLOUT_STICKY!=null?(b.Add(d.DRAG_ANIM,d.CALLOUT_STICKY),b.AddObjects(d.CALLOUT_STICKY,
Array(d.DELAY))):b.Add(d.DRAG_ANIM,Array(d.DELAY))):(d.CALLOUT_STICKY!=null&&g_MergeArray(a,d.CALLOUT_STICKY),d.STEP_AUDIO!=null&&d.CONSIDER_AUDIO_IN_POM==true&&b.Add(d.STEP_AUDIO,a),b.Add(d.CURSORMOVE_ANIM,a),b.AddObjects(a,Array(d.DELAY)));b.Add(d.DELAY,null);e=true}catch(f){g_WriteToLog("PlaySeqCreatorMouse","MouseStep_BlinkBefore_AudioDuring","",f,LOG.EXCEPTION)}return e};MouseStep_BlinkNone_AudioDuring=function(b){var e=false;try{g_WriteToLog("PlaySeqCreatorMouse","MouseStep_BlinkNone_AudioDuring",
"","",LOG.TRACE);var a=[];a.length=0;a.push(d.OCR_Blink);d.ICR_Blink!=null&&a.push(d.ICR_Blink);a.push(d.CURSORAUDIO_ANIM);d.DRAG_ANIM!=null?(d.STEP_AUDIO!=null&&d.CONSIDER_AUDIO_IN_POM==true&&b.Add(d.STEP_AUDIO,a),b.Add(d.CURSORMOVE_ANIM,a),b.AddObjects(a,[d.DR_Blink,d.DRAG_ANIM]),d.CALLOUT_STICKY!=null?(b.Add(d.DR_Blink,d.CALLOUT_STICKY),b.Add(d.DRAG_ANIM,d.CALLOUT_STICKY),b.AddObjects(d.CALLOUT_STICKY,Array(d.DELAY))):(b.Add(d.DR_Blink,Array(d.DELAY)),b.Add(d.DRAG_ANIM,Array(d.DELAY)))):(d.CALLOUT_STICKY!=
null&&g_MergeArray(a,d.CALLOUT_STICKY),d.STEP_AUDIO!=null&&d.CONSIDER_AUDIO_IN_POM==true&&b.Add(d.STEP_AUDIO,a),b.Add(d.CURSORMOVE_ANIM,a),b.AddObjects(a,Array(d.DELAY)));b.Add(d.DELAY,null);e=true}catch(f){g_WriteToLog("PlaySeqCreatorMouse","MouseStep_BlinkNone_AudioDuring","",f,LOG.EXCEPTION)}return e};MouseStep_BlinkAfter_AudioDuring=function(b){var e=false;try{g_WriteToLog("PlaySeqCreatorMouse","MouseStep_BlinkAfter_AudioDuring","","",LOG.TRACE);var a=[];a.push(d.OCR_Blink);d.ICR_Blink!=null&&
a.push(d.ICR_Blink);d.DR_Blink!=null&&a.push(d.DR_Blink);d.STEP_AUDIO!=null&&d.CONSIDER_AUDIO_IN_POM==true&&b.Add(d.STEP_AUDIO,a);b.Add(d.CURSORMOVE_ANIM,a);if(d.DRAG_ANIM!=null)b.AddObjects(a,Array(d.CURSORAUDIO_ANIM)),b.Add(d.CURSORAUDIO_ANIM,Array(d.DRAG_ANIM)),d.CALLOUT_STICKY!=null?(b.Add(d.DRAG_ANIM,d.CALLOUT_STICKY),b.AddObjects(d.CALLOUT_STICKY,Array(d.DELAY))):b.Add(d.DRAG_ANIM,Array(d.DELAY));else{var f=[];f.push(d.CURSORAUDIO_ANIM);d.CALLOUT_STICKY!=null&&g_MergeArray(f,d.CALLOUT_STICKY);
b.AddObjects(a,f);b.AddObjects(f,Array(d.DELAY))}b.Add(d.DELAY,null);e=true}catch(n){g_WriteToLog("PlaySeqCreatorMouse","MouseStep_BlinkAfter_AudioDuring","",n,LOG.EXCEPTION)}return e};MouseStep_BlinkBefore_AudioAfter=function(b){var e=false;try{g_WriteToLog("PlaySeqCreatorMouse","MouseStep_BlinkBefore_AudioAfter","","",LOG.TRACE);var a=[];b.Add(d.OCR_Blink,Array(d.CURSORMOVE_ANIM));d.ICR_Blink!=null&&b.Add(d.ICR_Blink,Array(d.CURSORMOVE_ANIM));d.DR_Blink!=null&&b.Add(d.DR_Blink,Array(d.CURSORMOVE_ANIM));
a.length=0;a.push(d.OCR_NoBlink);d.ICR_NoBlink!=null&&a.push(d.ICR_NoBlink);d.DR_NoBlink!=null&&a.push(d.DR_NoBlink);a.push(d.CURSORAUDIO_ANIM);d.CALLOUT_STICKY!=null&&d.DRAG_ANIM==null&&g_MergeArray(a,d.CALLOUT_STICKY);d.STEP_AUDIO!=null&&d.CONSIDER_AUDIO_IN_POM==true?(b.Add(d.CURSORMOVE_ANIM,Array(d.STEP_AUDIO)),b.Add(d.STEP_AUDIO,a)):b.Add(d.CURSORMOVE_ANIM,a);d.DRAG_ANIM!=null?(b.AddObjects(a,Array(d.DRAG_ANIM)),d.CALLOUT_STICKY!=null?(b.Add(d.DRAG_ANIM,d.CALLOUT_STICKY),b.AddObjects(d.CALLOUT_STICKY,
Array(d.DELAY))):b.Add(d.DRAG_ANIM,Array(d.DELAY))):b.AddObjects(a,Array(d.DELAY));b.Add(d.DELAY,null);e=true}catch(f){g_WriteToLog("PlaySeqCreatorMouse","MouseStep_BlinkBefore_AudioAfter","",f,LOG.EXCEPTION)}return e};MouseStep_BlinkNone_AudioAfter=function(b){var e=false;try{g_WriteToLog("PlaySeqCreatorMouse","MouseStep_BlinkNone_AudioAfter","","",LOG.TRACE);var a=[];d.STEP_AUDIO!=null&&d.CONSIDER_AUDIO_IN_POM==true&&b.Add(d.CURSORMOVE_ANIM,Array(d.STEP_AUDIO));a.push(d.CURSORAUDIO_ANIM);a.push(d.OCR_Blink);
d.ICR_Blink!=null&&a.push(d.ICR_Blink);d.CALLOUT_STICKY!=null?d.DRAG_ANIM!=null?(d.STEP_AUDIO!=null&&d.CONSIDER_AUDIO_IN_POM==true?b.Add(d.STEP_AUDIO,a):b.Add(d.CURSORMOVE_ANIM,a),b.AddObjects(a,[d.DR_Blink,d.DRAG_ANIM]),b.Add(d.DR_Blink,d.CALLOUT_STICKY),b.Add(d.DRAG_ANIM,d.CALLOUT_STICKY),b.AddObjects(d.CALLOUT_STICKY,Array(d.DELAY))):(g_MergeArray(a,d.CALLOUT_STICKY),d.STEP_AUDIO!=null&&d.CONSIDER_AUDIO_IN_POM==true?b.Add(d.STEP_AUDIO,a):b.Add(d.CURSORMOVE_ANIM,a),b.AddObjects(a,Array(d.DELAY))):
(d.STEP_AUDIO!=null&&d.CONSIDER_AUDIO_IN_POM==true?b.Add(d.STEP_AUDIO,a):b.Add(d.CURSORMOVE_ANIM,a),d.DRAG_ANIM!=null?(b.AddObjects(a,[d.DR_Blink,d.DRAG_ANIM]),b.Add(d.DR_Blink,Array(d.DELAY)),b.Add(d.DRAG_ANIM,Array(d.DELAY))):b.AddObjects(a,Array(d.DELAY)));b.Add(d.DELAY,null);e=true}catch(f){g_WriteToLog("PlaySeqCreatorMouse","MouseStep_BlinkNone_AudioAfter","",f,LOG.EXCEPTION)}return e};MouseStep_BlinkAfter_AudioAfter=function(b){var e=false;try{g_WriteToLog("PlaySeqCreatorMouse","MouseStep_BlinkAfter_AudioAfter",
"","",LOG.TRACE);var a=[];a.push(d.OCR_Blink);d.ICR_Blink!=null&&a.push(d.ICR_Blink);d.DR_Blink!=null&&a.push(d.DR_Blink);d.STEP_AUDIO!=null&&d.CONSIDER_AUDIO_IN_POM==true?(b.Add(d.CURSORMOVE_ANIM,Array(d.STEP_AUDIO)),b.Add(d.STEP_AUDIO,a)):b.Add(d.CURSORMOVE_ANIM,a);if(d.DRAG_ANIM!=null)b.AddObjects(a,Array(d.CURSORAUDIO_ANIM)),b.Add(d.CURSORAUDIO_ANIM,Array(d.DRAG_ANIM)),d.CALLOUT_STICKY!=null?(b.Add(d.DRAG_ANIM,d.CALLOUT_STICKY),b.AddObjects(d.CALLOUT_STICKY,Array(d.DELAY))):b.Add(d.DRAG_ANIM,
Array(d.DELAY));else{var f=[];f.push(d.CURSORAUDIO_ANIM);d.CALLOUT_STICKY!=null&&g_MergeArray(f,d.CALLOUT_STICKY);b.AddObjects(a,f);b.AddObjects(f,Array(d.DELAY))}b.Add(d.DELAY,null);e=true}catch(n){g_WriteToLog("PlaySeqCreatorMouse","MouseStep_BlinkAfter_AudioAfter","",n,LOG.EXCEPTION)}return e};return{Construct:function(b,e){var a=false;try{switch(d=b,uid_json.settings.media.playbackoption){case AUDIOPLAYBACKMODE.BEFORE:switch(uid_json.settings.controlregion.blinkoption){case BLINKMODE.BEFOREPLAY:a=
MouseStep_BlinkBefore_AudioBefore(e);break;case BLINKMODE.NONE:a=MouseStep_BlinkNone_AudioBefore(e);break;case BLINKMODE.AFTERPLAY:a=MouseStep_BlinkAfter_AudioBefore(e)}break;case AUDIOPLAYBACKMODE.AFTER:switch(uid_json.settings.controlregion.blinkoption){case BLINKMODE.BEFOREPLAY:a=MouseStep_BlinkBefore_AudioAfter(e);break;case BLINKMODE.NONE:a=MouseStep_BlinkNone_AudioAfter(e);break;case BLINKMODE.AFTERPLAY:a=MouseStep_BlinkAfter_AudioAfter(e)}break;case AUDIOPLAYBACKMODE.DURING:switch(uid_json.settings.controlregion.blinkoption){case BLINKMODE.BEFOREPLAY:a=
MouseStep_BlinkBefore_AudioDuring(e);break;case BLINKMODE.NONE:a=MouseStep_BlinkNone_AudioDuring(e);break;case BLINKMODE.AFTERPLAY:a=MouseStep_BlinkAfter_AudioDuring(e)}}}catch(f){g_WriteToLog("PlaySeqCreatorMouse","Construct","",f,LOG.EXCEPTION)}return a}}}catch(b){}}(),PlaySeqCreatorScreenVideo=function(){var d;return{Construct:function(b,c){var e=true;try{g_WriteToLog("PlaySeqCreatorScreenVideo","Construct","","",LOG.TRACE);d=b;if(d.STEP_AUDIO!=null&&d.CONSIDER_AUDIO_IN_POM==true)if(uid_json.settings.media.playbackoption==
AUDIOPLAYBACKMODE.BEFORE){if(d.CALLOUT_STICKY!=null&&uid_json.settings.callout.showinscreenvideo==true){var a=Array(d.SCREEN_VIDEO);g_MergeArray(a,d.CALLOUT_STICKY);c.Add(d.STEP_AUDIO,a);c.AddObjects(d.CALLOUT_STICKY,Array(d.DELAY))}else c.Add(d.STEP_AUDIO,Array(d.SCREEN_VIDEO));c.Add(d.SCREEN_VIDEO,Array(d.DELAY))}else uid_json.settings.media.playbackoption==AUDIOPLAYBACKMODE.AFTER?(c.Add(d.SCREEN_VIDEO,Array(d.STEP_AUDIO)),d.CALLOUT_STICKY!=null&&uid_json.settings.callout.showinscreenvideo==true&&
c.AddObjects(d.CALLOUT_STICKY,Array(d.STEP_AUDIO)),c.Add(d.STEP_AUDIO,Array(d.DELAY))):(c.Add(d.STEP_AUDIO,Array(d.DELAY)),c.Add(d.SCREEN_VIDEO,Array(d.DELAY)),d.CALLOUT_STICKY!=null&&uid_json.settings.callout.showinscreenvideo==true&&c.AddObjects(d.CALLOUT_STICKY,Array(d.DELAY)));else c.Add(d.SCREEN_VIDEO,Array(d.DELAY)),d.CALLOUT_STICKY!=null&&uid_json.settings.callout.showinscreenvideo==true&&c.AddObjects(d.CALLOUT_STICKY,Array(d.DELAY));c.Add(d.DELAY,null)}catch(f){e=false,g_WriteToLog("PlaySeqCreatorScreenVideo",
"Construct","",f,LOG.EXCEPTION)}return e}}}(),PlaySeqCreatorTypetext=function(){var d;return{Construct:function(b,c){var e=false;try{g_WriteToLog("PlaySeqCreatorTypetext","Construct","","",LOG.TRACE);d=b;var a=[];d.STEP_AUDIO!=null&&d.CONSIDER_AUDIO_IN_POM==true?uid_json.settings.media.playbackoption==AUDIOPLAYBACKMODE.AFTER?(d.OCR_Blink.HideOnPlayComplete=false,c.Add(d.OCR_Blink,Array(d.TYPETEXT_ANIM)),d.CALLOUT_STICKY!=null?(c.Add(d.TYPETEXT_ANIM,d.CALLOUT_STICKY),c.AddObjects(d.CALLOUT_STICKY,
Array(d.STEP_AUDIO))):c.Add(d.TYPETEXT_ANIM,Array(d.STEP_AUDIO)),c.Add(d.STEP_AUDIO,Array(d.DELAY))):(uid_json.settings.controlregion.blinkoption==BLINKMODE.BEFOREPLAY?(c.Add(d.OCR_Blink,Array(d.STEP_AUDIO)),a.push(d.OCR_NoBlink),a.push(d.TYPETEXT_ANIM),c.Add(d.STEP_AUDIO,a),c.Add(d.OCR_NoBlink,null)):(d.OCR_Blink.HideOnPlayComplete=false,c.Add(d.STEP_AUDIO,Array(d.OCR_Blink)),c.Add(d.OCR_Blink,Array(d.TYPETEXT_ANIM))),d.CALLOUT_STICKY!=null?(c.Add(d.TYPETEXT_ANIM,d.CALLOUT_STICKY),c.AddObjects(d.CALLOUT_STICKY,
Array(d.DELAY))):c.Add(d.TYPETEXT_ANIM,Array(d.DELAY))):(d.OCR_Blink.HideOnPlayComplete=false,c.Add(d.OCR_Blink,Array(d.TYPETEXT_ANIM)),d.CALLOUT_STICKY!=null?(c.Add(d.TYPETEXT_ANIM,d.CALLOUT_STICKY),c.AddObjects(d.CALLOUT_STICKY,Array(d.DELAY))):c.Add(d.TYPETEXT_ANIM,Array(d.DELAY)));c.Add(d.DELAY,null);e=true}catch(f){g_WriteToLog("PlaySeqCreatorTypetext","Construct","",f,LOG.EXCEPTION)}return e}}}(),PlaySeqCreatorWindowActivate=function(){try{var d;AudioBefore=function(b){var e=false;try{g_WriteToLog("PlaySeqCreatorWindowActivate",
"AudioBefore","","",LOG.TRACE),d.STEP_AUDIO!=null?d.QUESTION!=null?(d.QUESTION.JumpTo=g_objEpnPlayer.JumpTo,d.CALLOUT_STICKY!=null?(b.Add(d.STEP_AUDIO,d.CALLOUT_STICKY),b.AddObjects(d.CALLOUT_STICKY,Array(d.QUESTION))):b.Add(d.STEP_AUDIO,Array(d.QUESTION)),b.Add(d.QUESTION,null)):d.CONTINUELAYER!=null?(d.CALLOUT_STICKY!=null?(b.Add(d.STEP_AUDIO,d.CALLOUT_STICKY),b.AddObjects(d.CALLOUT_STICKY,Array(d.CONTINUELAYER))):b.Add(d.STEP_AUDIO,Array(d.CONTINUELAYER)),b.Add(d.CONTINUELAYER,null)):(d.CALLOUT_STICKY!=
null?(b.Add(d.STEP_AUDIO,d.CALLOUT_STICKY),b.AddObjects(d.CALLOUT_STICKY,Array(d.DELAY))):b.Add(d.STEP_AUDIO,Array(d.DELAY)),b.Add(d.DELAY,null)):d.QUESTION!=null?(d.QUESTION.JumpTo=g_objEpnPlayer.JumpTo,d.CALLOUT_STICKY!=null&&b.AddObjects(d.CALLOUT_STICKY,Array(d.QUESTION)),b.Add(d.QUESTION,null)):d.CONTINUELAYER!=null?(d.CALLOUT_STICKY!=null&&b.AddObjects(d.CALLOUT_STICKY,Array(d.CONTINUELAYER)),b.Add(d.CONTINUELAYER,null)):(d.CALLOUT_STICKY!=null&&b.AddObjects(d.CALLOUT_STICKY,Array(d.DELAY)),
b.Add(d.DELAY,null)),e=true}catch(a){g_WriteToLog("PlaySeqCreatorWindowActivate","AudioBefore","",a,LOG.EXCEPTION)}return e};AudioAfter=function(b){var e=false;try{g_WriteToLog("PlaySeqCreatorWindowActivate","AudioAfter","","",LOG.TRACE),d.STEP_AUDIO!=null?d.QUESTION!=null?(d.QUESTION.JumpTo=g_objEpnPlayer.JumpTo,d.CALLOUT_STICKY!=null&&b.AddObjects(d.CALLOUT_STICKY,Array(d.QUESTION)),b.Add(d.QUESTION,Array(d.STEP_AUDIO)),b.Add(d.STEP_AUDIO,null)):d.CONTINUELAYER!=null?(d.CALLOUT_STICKY!=null&&b.AddObjects(d.CALLOUT_STICKY,
Array(d.STEP_AUDIO)),b.Add(d.STEP_AUDIO,Array(d.CONTINUELAYER)),b.Add(d.CONTINUELAYER,null)):(d.CALLOUT_STICKY!=null&&b.AddObjects(d.CALLOUT_STICKY,Array(d.STEP_AUDIO)),b.Add(d.STEP_AUDIO,Array(d.DELAY)),b.Add(d.DELAY,null)):d.QUESTION!=null?(d.QUESTION.JumpTo=g_objEpnPlayer.JumpTo,d.CALLOUT_STICKY!=null&&b.AddObjects(d.CALLOUT_STICKY,Array(d.QUESTION)),b.Add(d.QUESTION,null)):d.CONTINUELAYER!=null?(d.CALLOUT_STICKY!=null&&b.AddObjects(d.CALLOUT_STICKY,Array(d.CONTINUELAYER)),b.Add(d.CONTINUELAYER,
null)):(d.CALLOUT_STICKY!=null&&b.AddObjects(d.CALLOUT_STICKY,Array(d.DELAY)),b.Add(d.DELAY,null)),e=true}catch(a){g_WriteToLog("PlaySeqCreatorWindowActivate","AudioAfter","",a,LOG.EXCEPTION)}return e};AudioDuring=function(b){var e=false;try{g_WriteToLog("PlaySeqCreatorWindowActivate","AudioDuring","","",LOG.TRACE);var a=[];if(d.STEP_AUDIO!=null)if(d.QUESTION!=null)if(d.QUESTION.JumpTo=g_objEpnPlayer.JumpTo,d.CALLOUT_STICKY!=null){a.push(d.STEP_AUDIO);for(var f in d.CALLOUT_STICKY)a.push(d.CALLOUT_STICKY[f]);
b.AddObjects(a,Array(d.QUESTION));b.Add(d.QUESTION,null)}else a.push(d.STEP_AUDIO),a.push(d.QUESTION),b.AddObjects(a,null);else if(d.CONTINUELAYER!=null)if(d.CALLOUT_STICKY!=null){a.push(d.STEP_AUDIO);for(f in d.CALLOUT_STICKY)a.push(d.CALLOUT_STICKY[f]);b.AddObjects(a,Array(d.CONTINUELAYER));b.Add(d.CONTINUELAYER,null)}else a.push(d.STEP_AUDIO),a.push(d.CONTINUELAYER),b.AddObjects(a,null);else{if(d.CALLOUT_STICKY!=null)for(f in a.push(d.STEP_AUDIO),d.CALLOUT_STICKY)a.push(d.CALLOUT_STICKY[f]);else a.push(d.STEP_AUDIO);
a.push(d.DELAY);b.AddObjects(a,null)}else d.QUESTION!=null?(d.QUESTION.JumpTo=g_objEpnPlayer.JumpTo,d.CALLOUT_STICKY!=null&&b.AddObjects(d.CALLOUT_STICKY,Array(d.QUESTION)),b.Add(d.QUESTION,null)):d.CONTINUELAYER!=null?(d.CALLOUT_STICKY!=null&&b.AddObjects(d.CALLOUT_STICKY,Array(d.CONTINUELAYER)),b.Add(d.CONTINUELAYER,null)):(d.CALLOUT_STICKY!=null&&b.AddObjects(d.CALLOUT_STICKY,Array(d.DELAY)),b.Add(d.DELAY,null));e=true}catch(n){g_WriteToLog("PlaySeqCreatorWindowActivate","AudioDuring","",n,LOG.EXCEPTION)}return e};
return{Construct:function(b,e){var a=false;try{switch(d=b,uid_json.settings.media.playbackoption){case AUDIOPLAYBACKMODE.BEFORE:a=AudioBefore(e);break;case AUDIOPLAYBACKMODE.AFTER:a=AudioAfter(e);break;case AUDIOPLAYBACKMODE.DURING:a=AudioDuring(e)}}catch(f){g_WriteToLog("PlaySeqCreatorWindowActivate","Construct","",f,LOG.EXCEPTION)}return a}}}catch(b){}}();
browserspec_json={browser_splkeys_to_be_ignored_in_textbox_keydown:[{key:"CTRL+B"},{key:"CTRL+C"},{key:"CTRL+D"},{key:"CTRL+F"},{key:"CTRL+H"},{key:"CTRL+J"},{key:"CTRL+I"},{key:"CTRL+K"},{key:"CTRL+L"},{key:"CTRL+M"},{key:"CTRL+N"},{key:"CTRL+O"},{key:"CTRL+P"},{key:"CTRL+Q"},{key:"CTRL+R"},{key:"CTRL+S"},{key:"CTRL+T"},{key:"CTRL+U"},{key:"CTRL+V"},{key:"CTRL+W"},{key:"CTRL+X"},{key:"CTRL+Y"},{key:"CTRL+Z"},{key:"CTRL+F11"},{key:"CTRL+F12"},{key:"CTRL+107"},{key:"CTRL+109"},{key:"CTRL+188"},{key:"CTRL+1"},
{key:"CTRL+2"},{key:"CTRL+3"},{key:"CTRL+4"},{key:"CTRL+5"},{key:"CTRL+SHIFT+A"},{key:"CTRL+SHIFT+B"},{key:"CTRL+SHIFT+C"},{key:"CTRL+SHIFT+D"},{key:"CTRL+SHIFT+E"},{key:"CTRL+SHIFT+F"},{key:"CTRL+SHIFT+G"},{key:"CTRL+SHIFT+H"},{key:"CTRL+SHIFT+I"},{key:"CTRL+SHIFT+J"},{key:"CTRL+SHIFT+K"},{key:"CTRL+SHIFT+L"},{key:"CTRL+SHIFT+N"},{key:"CTRL+SHIFT+O"},{key:"CTRL+SHIFT+P"},{key:"CTRL+SHIFT+T"},{key:"CTRL+SHIFT+W"},{key:"CTRL+SHIFT+Z"},{key:"CTRL+SHIFT+DELETE"},{key:"CTRL+ALT+A"},{key:"CTRL+ALT+B"},
{key:"CTRL+ALT+E"},{key:"CTRL+ALT+F"},{key:"CTRL+ALT+L"},{key:"SHIFT+ESCAPE"},{key:"SHIFT+DELETE"},{key:"SHIFT+F3"},{key:"SHIFT+F4"},{key:"SHIFT+F7"},{key:"SHIFT+F12"},{key:"ALT+LEFT"},{key:"ALT+RIGHT"},{key:"ALT+HOME"},{key:"CTRL+ALT+SHIFT+U"},{key:"ESCAPE"},{key:"ENTER"},{key:"F1"},{key:"F3"},{key:"F4"},{key:"F5"},{key:"F7"},{key:"F11"},{key:"F12"},{key:"91"},{key:"92"},{key:"231"}],keys_allowed_in_textbox:{SHIFT:16,CTRL:17,ALT:18,CAPSLOCK:20,BACKSPACE:8,DELETE:46,LEFT:37,UP:38,RIGHT:39,DOWN:40,
INSERT:45,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,SPACE:32,COLON:59},combination_keys_allowed_in_textbox:[{key:"CTRL+A"}],keycodes:{ESCAPE:27,ESC:27,TAB:9,CAPS_LOCK:20,ENTER:13,BACKSPACE:8,DELETE:46,DEL:46,LEFT:37,UP:38,RIGHT:39,DOWN:40,INSERT:45,INS:45,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,SCROLL_LOCK:145,PAUSE:19,LEFT_WINDOWS:91,RIGHT_WINDOWS:92,SPACE:32,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUM_LOCK:144,NUM_STAR:106,NUM_PLUS:107,NUM_MINUS:109,NUM_DOT:110,
NUM_SLASH:111,NUM_ENTER:13,NUM_0:96,NUM_1:97,NUM_2:98,NUM_3:99,NUM_4:100,NUM_5:101,NUM_6:102,NUM_7:103,NUM_8:104,NUM_9:105},keycodes_spl:{data:[{chr:"`",vl:"192"},{chr:"~",vl:"192"},{chr:"!",vl:"49"},{chr:"@",vl:"50"},{chr:"#",vl:"51"},{chr:"$",vl:"52"},{chr:"%",vl:"53"},{chr:"^",vl:"54"},{chr:"&",vl:"55"},{chr:"*",vl:"106"},{chr:"(",vl:"57"},{chr:")",vl:"48"},{chr:"_",vl:"189"},{chr:"-",vl:"189"},{chr:"+",vl:"107"},{chr:"=",vl:"187"},{chr:"{",vl:"219"},{chr:"}",vl:"221"},{chr:"[",vl:"219"},{chr:"]",
vl:"221"},{chr:"|",vl:"220"},{chr:"\\",vl:"220"},{chr:":",vl:"186"},{chr:";",vl:"186"},{chr:'"',vl:"222"},{chr:"'",vl:"222"},{chr:"<",vl:"188"},{chr:">",vl:"190"},{chr:",",vl:"188"},{chr:".",vl:"190"},{chr:"?",vl:"191"},{chr:"/",vl:"191"},{chr:"_",vl:"226"},{chr:"_",vl:"231"}]},div_ignore_keys:{SHIFT:16,CTRL:17,ALT:18},div_ignore_keys_automation:{comma:188,backspace:8},maximum_double_click_wait_time:800,minimum_double_click_wait_time:200,double_click_max_interval_time:400,textbox_validkeys:[{key:"A"},
{key:"B"},{key:"C"},{key:"D"},{key:"E"},{key:"F"},{key:"G"},{key:"H"},{key:"I"},{key:"J"},{key:"K"},{key:"L"},{key:"M"},{key:"N"},{key:"O"},{key:"P"},{key:"Q"},{key:"R"},{key:"S"},{key:"T"},{key:"U"},{key:"V"},{key:"W"},{key:"X"},{key:"Y"},{key:"Z"},{key:"0"},{key:"1"},{key:"2"},{key:"3"},{key:"4"},{key:"5"},{key:"6"},{key:"7"},{key:"8"},{key:"9"},{key:"96"},{key:"97"},{key:"98"},{key:"99"},{key:"100"},{key:"101"},{key:"102"},{key:"103"},{key:"104"},{key:"105"},{key:"106"},{key:"107"},{key:"109"},
{key:"110"},{key:"111"},{key:"186"},{key:"187"},{key:"188"},{key:"189"},{key:"190"},{key:"191"},{key:"192"},{key:"219"},{key:"220"},{key:"221"},{key:"222"},{key:"47"},{key:"42"},{key:"45"},{key:"43"},{key:"72"},{key:"173"},{key:"61"},{key:"229"},{key:"231"},{key:"226"},{key:"244"},{key:"243"}],efx_keymodifier_values:{ctrl:"1|3|5|7|17|25",alt:"4|5|6|7|20|28",shift:"2|3|6|7|26|18"},drag_cursor_shift_value:"10",valid_numoff_5_keycodes:{NUM_12:"12"}};
function clsEventReceiver(){function d(b){try{b.Text=a.GetText(),e.onValidate(b)}catch(c){e.Log("m_objMKR_onValidate",LOG.EXCEPTION,"",c)}}function b(b){try{b.Text=a.GetText(),e.onValidate(b)}catch(c){e.Log("m_objTKR_onValidate",LOG.EXCEPTION,"",c)}}function c(){try{e.onError()}catch(a){e.Log("m_obj_onError",LOG.EXCEPTION,"",a)}}clsPlayerBase.call(this,"clsEventReceiver");var e=this,a=null,f=null;this.onError=this.onValidate=null;this.Enable=false;this.Initialize=function(){var n=true;try{if(f=new clsMouseAndKeyEventReceiver,
f.onValidate=d,f.onError=c,a=new clsTextAndKeyEventReceiver,a.onValidate=b,a.onError=c,f.Initialize()==false)throw"Error @ m_objMKR.Initialize";}catch(g){n=false,e.Log("Initialize",LOG.EXCEPTION,"",g)}return n};this.Load=function(b){var c=true;try{if(e.onValidate==null)throw"onValidate event not binded";if(e.onError==null)throw"onError event not binded";if(a.Load(b)==false)throw"Error @ m_objTKR.Load";if(f.Load()==false)throw"Error @ m_objMKR.Load";}catch(d){c=false,e.Log("Load",LOG.EXCEPTION,"",
d)}return c};this.Show=function(){var b=true;try{setTimeout(a.Show,100);if(f.Show()==false)throw"Error @ m_objMKR.Show";e.Enable=true}catch(c){b=false,e.Log("Show",LOG.EXCEPTION,"",c)}return b};this.Hide=function(){var b=true;try{if(a.Hide()==false)throw"Error @ m_objTKR.Hide";if(f.Hide()==false)throw"Error @ m_objMKR.Hide";e.Enable=false}catch(c){b=false,e.Log("Hide",LOG.EXCEPTION,"",c)}return b};this.SetFocus=function(){var b=true;try{if(f.SetFocus()==false)throw"Error @ m_objMKR.SetFocus";if(a.SetFocus()==
false)throw"Erroro @ m_objTKR.SetFocus";}catch(c){b=false,e.Log("SetFocus",LOG.EXCEPTION,"",c)}return b};this.Stop=function(){var b=true;try{if(a.Stop()==false)throw"Error @ m_objTKR.Stop";e.Enable=false}catch(c){b=false,e.Log("Stop",LOG.EXCEPTION,"",c)}return b};this.FireMouseDown=function(a){var b=true;try{f.FireMouseDown(a)}catch(c){b=false,e.Log("FireMouseDown",LOG.EXCEPTION,"",c)}return b};this.FireMouseUp=function(a){var b=true;try{f.FireMouseUp(a)}catch(c){b=false,e.Log("FireMouseUp",LOG.EXCEPTION,
"",c)}return b}}
function clsEventValidator(){function d(a){var b=false;try{for(var c in E)if(E[c].Event==EVENTTYPE.TYPETEXT)switch(E[c].RuleID){case 0:b=true;break;case 1:E[c].Text.toUpperCase()==a.Text.toUpperCase()&&(b=true);break;case 2:E[c].Text==a.Text&&(b=true);break;default:RegExp(E[c].RegexVal).test(a.Text)==true&&(b=true)}}catch(e){q.Error=true,q.Log("IsValidTypeText",LOG.EXCEPTION,"",e)}return b}function b(a){var b=false;try{for(var c in B)B[c].Shape==CONTROLREGION.RECTANGLE||B[c].Shape==CONTROLREGION.ROUNDRECTANGLE?
n(B[c].X1,B[c].Y1,B[c].X2,B[c].Y2,a.X1,a.Y1)==true&&(b=true):B[c].Shape==CONTROLREGION.OVAL?g(B[c],a)==true&&(b=true):k(B[c],a)==true&&(b=true)}catch(e){q.Error=true,q.Log("IsInteractedXY_InsideOfAnyInnerRegion",LOG.EXCEPTION,"",e)}return b}function c(a){var b=false;try{for(var c in u)if(u[c].Shape==CONTROLREGION.RECTANGLE&&n(u[c].X1,u[c].Y1,u[c].X2,u[c].Y2,a.X1,a.Y1)==true)b=true,q.ConfusionText=u[c].Text}catch(e){q.Error=true,q.Log("IsInteractedXY_InsideOfAnyConfusionRegion",LOG.EXCEPTION,"",e)}return b}
function e(b){var c=false;try{for(var e in E)if(E[e].Event==EVENTTYPE.DOUBLECLICK&&a(E[e],b)==true){c=true;break}}catch(f){q.Error=true,q.Log("IsAnyOneOfDoubleClickEventIsValid",LOG.EXCEPTION,"",f)}return c}function a(a,b){var c=false;try{if(f(a,b)==false)return c;var e=false;try{a.MouseButton==b.MouseButton&&a.MouseModifier==b.MouseModifier&&(e=true)}catch(d){q.Error=true,q.Log("IsValidMouseButtonAndModifier",LOG.EXCEPTION,"",d)}if(e==false)return c;if(a.Shape==CONTROLREGION.RECTANGLE||a.Shape==
CONTROLREGION.ROUNDRECTANGLE){if(n(a.X1,a.Y1,a.X2,a.Y2,b.X1,b.Y1)==false)return c}else if(a.Shape==CONTROLREGION.OVAL){if(g(a,b)==false)return c}else if(k(a,b)==false)return c;c=true}catch(o){q.Error=true,q.Log("IsValidMouseEvent_ForFromRegion",LOG.EXCEPTION,"",o)}return c}function f(a,b){var c=false;try{a.Ctrl==b.Ctrl&&a.Alt==b.Alt&&a.Shift==b.Shift&&(c=true)}catch(e){q.Error=true,q.Log("IsValidKeyModifier",LOG.EXCEPTION,"",e)}return c}function n(a,b,c,e,f,d){var g=false;try{f>=a&&d>=b&&f<=c&&d<=
e&&(g=true)}catch(n){q.Error=true,q.Log("IsInteractedXY_InsideReactangle",LOG.EXCEPTION,"",n)}return g}function g(a,b){var c=false;try{var e=b.Y1,f=(a.Y2-a.Y1)/2+a.Y1,d=(a.X2-a.X1)/2,g=(a.Y2-a.Y1)/2,n=Math.pow(b.X1-((a.X2-a.X1)/2+a.X1),2)/Math.pow(d,2),k=Math.pow(e-f,2)/Math.pow(g,2);n+k<1&&(c=true)}catch(o){q.Error=true,q.Log("IsInteractedXY_InsideOval",LOG.EXCEPTION,"",o)}return c}function k(a,b){var c=false;try{var e=b.X1,f=b.Y1,d=a.Cords.length,g=[],n=[],k=0;for(k in a.Cords)g.push(a.Cords[k].x),
n.push(a.Cords[k].y);var o,p,k=false;for(o=0,p=d-1;o<d;p=o++)n[o]>f!=n[p]>f&&e<(g[p]-g[o])*(f-n[o])/(n[p]-n[o])+g[o]&&(k=!k);c=k}catch(u){q.Error=true,q.Log("IsInteractedXY_InsideFreeShape",LOG.EXCEPTION,"",u)}return c}function o(a){var b=true;try{var c=a.EventControls,e;for(e in c){A=new clsEventValidationData;var f=c[e],d=true;try{if(f.Type==EVENTTYPE.TYPETEXT)A.RuleID=f.RuleID,A.RegexVal=f.RegexVal;A.Text=f.Text;if(A.Text==void 0)A.Text=""}catch(g){d=false,q.Log("GetData_TypeTextEvent",LOG.EXCEPTION,
"",g)}if(d==false)throw"Error @ GetData_TypeTextEvent";var n=c[e],d=true;try{var k=n.BaseEvent=n.Type;if(n.Type==EVENTTYPE.EQCLICK)k=EVENTTYPE.CLICK;if(n.Type==EVENTTYPE.EQDOUBLECLICK)k=EVENTTYPE.DOUBLECLICK;if(n.Type==EVENTTYPE.EQDRAG)k=EVENTTYPE.DRAG;if(n.Type==EVENTTYPE.EQKEYPRESS)k=EVENTTYPE.KEYPRESS;A.Event=k;if(n.BaseEvent==void 0)n.BaseEvent=""}catch(o){d=false,q.Log("GetData_AdjustEvent",LOG.EXCEPTION,"",o)}if(d==false)throw"Error @ GetData_AdjustEvent";var r=c[e],d=true;try{r.KeyModifier!=
void 0?(A.Ctrl=(Number(r.KeyModifier)&1)===1?true:false,A.Shift=(Number(r.KeyModifier)&2)===2?true:false,A.Alt=(Number(r.KeyModifier)&4)===4?true:false):(A.Ctrl=false,A.Alt=false,A.Shift=false)}catch(B){d=false,q.Log("GetData_KeyModifier",LOG.EXCEPTION,"",B)}if(d==false)throw"Error @ GetData_KeyModifier";var v=c[e],d=true;try{var D=MOUSEBUTTON.NONE;if(v.MouseButton!=void 0)D=v.MouseButton;var G=MOUSEBUTTON.NONE;if(v.MouseModifier!=void 0)G=v.MouseModifier;A.MouseButton=D;A.MouseModifier=G}catch(Z){d=
false,q.Log("GetData_MouseButtonAndModifier",LOG.EXCEPTION,"",Z)}if(d==false)throw"Error @ GetData_MouseButtonAndModifier";var Y=c[e],d=true;try{var U=0;if(Y.KeyValue!=void 0){var fa=Y.KeyValue.toUpperCase();if(fa.length==1){var R=fa,la=0;try{var ha=browserspec_json.keycodes_spl.data;for(Idx=0;Idx<ha.length;Idx++)if(ha[Idx].chr===R){la=ha[Idx].vl;break}}catch(ja){la=-1,q.Log("GetSpecialKeyPressed",LOG.EXCEPTION,"",ja)}U=la;if(U==-1)throw"error @ GetSpecialKeyPressed";U==0?U=fa.toUpperCase().charCodeAt(0):
A.CharCode=fa.toUpperCase().charCodeAt(0)}else{R="";switch(fa){case "NUM /":R="NUM_SLASH";break;case "NUM *":R="NUM_STAR";break;case "NUM -":R="NUM_MINUS";break;case "NUM +":R="NUM_PLUS";break;default:R=fa.replace(" ","_")}U=browserspec_json.keycodes[R]}}A.KeyCode=U}catch(ia){d=false,q.Log("GetData_KeyCode",LOG.EXCEPTION,"",ia)}if(d==false)throw"Error @ GetData_KeyCode";var ba=c[e],d=true;try{var ca=la=R=U=0,aa=CONTROLREGION.RECTANGLE,V=null,ea=void 0,ga=void 0;for(ga in a.AnnotationControls)if(ba.Type==
EVENTTYPE.CLICK||ba.Type==EVENTTYPE.DOUBLECLICK||ba.Type==EVENTTYPE.DRAG||ba.Type==EVENTTYPE.TYPETEXT){if(a.AnnotationControls[ga].Type==ANNOTATION.OUTERREGION){V=a.AnnotationControls[ga];break}}else if((ba.Type==EVENTTYPE.EQCLICK||ba.Type==EVENTTYPE.EQDOUBLECLICK||ba.Type==EVENTTYPE.EQDRAG)&&a.AnnotationControls[ga].Type==ANNOTATION.EQUIVALENTCLICKREGION){V=a.AnnotationControls[ga];break}if(V!=null){U=V.Left+V.Thickness;R=V.Top+V.Thickness;la=U+(V.Width-V.Thickness*2);ca=R+(V.Height-V.Thickness*
2);if(V.Shape!=CONTROLREGION.NONE)aa=V.Shape;ea=p(V.Cords,V.Thickness)}U=Math.round(U*g_objGS.General.ResizeFactor);R=Math.round(R*g_objGS.General.ResizeFactor);la=Math.round(la*g_objGS.General.ResizeFactor);ca=Math.round(ca*g_objGS.General.ResizeFactor);A.X1=Number(U);A.Y1=Number(R);A.X2=Number(la);A.Y2=Number(ca);A.Shape=aa;A.Cords=ea}catch(ra){d=false,q.Log("GetData_ControlRegion",LOG.EXCEPTION,"",ra)}if(d==false)throw"Error @ GetData_ControlRegion";d=a;U=true;try{for(la in R=null,la=void 0,d.AnnotationControls){var ka=
new clsEventValidationData;if(d.AnnotationControls[la].Type==ANNOTATION.CONFUSIONREGION){R=d.AnnotationControls[la];if(R!=null){var na=R.Left,ma=R.Top,oa=na+R.Width,Q=ma+R.Height;aryCords=p(R.Cords,0)}na=Math.round(na*g_objGS.General.ResizeFactor);ma=Math.round(ma*g_objGS.General.ResizeFactor);oa=Math.round(oa*g_objGS.General.ResizeFactor);Q=Math.round(Q*g_objGS.General.ResizeFactor);ka.X1=Number(na);ka.Y1=Number(ma);ka.X2=Number(oa);ka.Y2=Number(Q);ka.Shape=CONTROLREGION.RECTANGLE;ka.Cords=aryCords;
ka.Text=R.Text;u.push(ka)}}}catch(W){U=false,q.Log("GetData_ConfusionRegion",LOG.EXCEPTION,"",W)}if(U==false)throw"Error @ GetData_ConfusionRegion";var da=c[e],d=true;try{ca=la=R=U=0;V=null;ea=void 0;for(ea in a.AnnotationControls)if(da.Type==EVENTTYPE.DRAG){if(a.AnnotationControls[ea].Type==ANNOTATION.DROPREGION){V=a.AnnotationControls[ea];break}}else if(da.Type==EVENTTYPE.EQDRAG&&a.AnnotationControls[ea].Type==ANNOTATION.EQUIVALENTDROPREGION){V=a.AnnotationControls[ea];break}if(V!=null)U=V.Left,
R=V.Top,la=V.Left+V.Width,ca=V.Top+V.Height;U=Math.round(U*g_objGS.General.ResizeFactor);R=Math.round(R*g_objGS.General.ResizeFactor);la=Math.round(la*g_objGS.General.ResizeFactor);ca=Math.round(ca*g_objGS.General.ResizeFactor);A.DX1=Number(U);A.DY1=Number(R);A.DX2=Number(la);A.DY2=Number(ca)}catch(sa){d=false,q.Log("GetData_DropRegion",LOG.EXCEPTION,"",sa)}if(d==false)throw"Error @ GetData_DropRegion";var qa;if(qa=DEVICE.TOUCH===true){d=A;try{if(d.Event===EVENTTYPE.TYPETEXT||d.Event===EVENTTYPE.KEYPRESS){if(d.Event===
EVENTTYPE.KEYPRESS)d.KeyCode=13}else d.Event=EVENTTYPE.CLICK,d.MouseButton=MOUSEBUTTON.LEFT,d.Alt=false,d.Ctrl=false,d.Shift=false}catch(va){q.Log("ConvertEVDForTouchScreenDevices",LOG.EXCEPTION,"",va)}qa=false}if(qa)throw"Error @ ConvertEVDForTouchScreenDevices";E.push(A)}}catch(Aa){b=false,q.Log("PrepareEVDList",LOG.EXCEPTION,"",Aa)}return b}function v(a){var b=true;try{var c=0,e=0,f=0,d=0,g=null,n;for(n in a.AnnotationControls)if(a.AnnotationControls[n].Type==ANNOTATION.INNERREGION){g=a.AnnotationControls[n];
break}if(g!=null)c=g.Left+g.Thickness,e=g.Top+g.Thickness,f=c+(g.Width-g.Thickness*2),d=e+(g.Height-g.Thickness*2),c=Math.round(c*g_objGS.General.ResizeFactor),e=Math.round(e*g_objGS.General.ResizeFactor),f=Math.round(f*g_objGS.General.ResizeFactor),d=Math.round(d*g_objGS.General.ResizeFactor),A=new clsEventValidationData,A.X1=Number(c),A.Y1=Number(e),A.X2=Number(f),A.Y2=Number(d),A.Shape=g.Shape,A.Cords=p(g.Cords,g.Thickness),B.push(A)}catch(k){b=false,q.Log("PrepareEVDListForInnerRegions",LOG.EXCEPTION,
"",k)}return b}function p(a){var b=[];try{if(a!=""){for(var c=a.split("|"),a=0;a<c.length;a+=2)b.push(new clsCord(c[a],c[a+1]));for(var e,f,a=0;a<b.length;a++)e=b[a].x,f=b[a].y,e=Math.round(e*g_objGS.General.ResizeFactor),f=Math.round(f*g_objGS.General.ResizeFactor),b[a].x=e,b[a].y=f}}catch(d){b.length=0,q.Log("GetCordsArray",LOG.EXCEPTION,"",d)}return b}clsPlayerBase.call(this,"clsEventValidator");var q=this,E=null,u=null,B=null,A=null,G,D,r;this.Result=false;this.ConfusionText="";this.EVDListAvailable=
this.Error=this.ClickEventAvailable=this.WaitForDoubleClick=false;this.BaseEvent=EVENTTYPE.NONE;this.Load=function(a,b){var c=true;try{q.EVDListAvailable=false;if(a==null)throw"objStep = null";G=a.SlNo;D=a.StepIndex;r=a.TPSID;E=[];B=[];u=[];if(o(a)==false)throw"Error @ PrepareEVDList";if(v(a)==false)throw"Error @ PrepareEVDListForInnerRegions";if(b!=null){if(o(b)==false)throw"Error @ PrepareEVDList";if(v(b)==false)throw"Error @ PrepareEVDListForInnerRegions";}if(E.length>0)q.EVDListAvailable=true;
q.BaseEvent=EVENTTYPE.NONE;for(k in E)if(E[k].Event==EVENTTYPE.CLICK){q.BaseEvent=EVENTTYPE.CLICK;break}try{var e="<table width=100% height=100% border=1 cellpadding=0 cellspacing=0 style='font-size:12px'>";e+="<tr style='background-color:#e1e1e1'>";e+="<td style='padding:2px;'>Ev,BEv</td>";e+="<td style='padding:2px;'>KM-CAS</td>";e+="<td style='padding:2px;'>CR Data</td>";e+="<td style='padding:2px;'>DR Data</td>";e+="<td style='padding:2px;'>Shape</td>";e+="<td style='padding:2px;'>Cords</td>";
e+="<td style='padding:2px;'>KeyCode</td>";e+="<td style='padding:2px;'>CharCode</td>";e+="<td style='padding:2px;'>MB, MM</td>";e+="<td style='padding:2px;'>Text</td>";e+="<td style='padding:2px;'>RuleID</td>";e+="</tr>";for(i in E){var f=E[i],d="";if(f.Cords!=""){var g=0;for(g in f.Cords)d+="&nbsp;"+f.Cords[g].x,d+="&nbsp;"+f.Cords[g].y,d+=" "}e+="<tr>";e+="<td style='padding:2px;'>"+f.Event+" "+f.BaseEvent+"</td>";e+="<td style='padding:2px;'>"+f.Ctrl+" "+f.Alt+" "+f.Shift+"</td>";e+="<td style='padding:2px;'>"+
f.X1+" "+f.Y1+" "+f.X2+" "+f.Y2+"</td>";e+="<td style='padding:2px;'>"+f.DX1+" "+f.DY1+" "+f.DX2+" "+f.DY2+"</td>";e+="<td style='padding:2px;'>"+f.Shape+"</td>";e+="<td style='padding:2px;'>"+d+"</td>";e+="<td style='padding:2px;'>"+f.KeyCode+"</td>";e+="<td style='padding:2px;'>"+f.CharCode+"</td>";e+="<td style='padding:2px;'>"+f.MouseButton+" "+f.MouseModifier+"</td>";e+="<td style='padding:2px;'>"+f.Text+"</td>";e+="<td style='padding:2px;'>"+f.RuleID+"</td>";e+="</tr>"}if(B.length>0)for(i in B){f=
B[i];d="";if(f.Cords!="")for(g in g=0,f.Cords)d+="&nbsp;"+f.Cords[g].x,d+="&nbsp;"+f.Cords[g].y,d+=" ";e+="<tr>";e+="<td style='padding:2px;'>ICR Details</td>";e+="<td style='padding:2px;'></td>";e+="<td style='padding:2px;'>"+f.X1+" "+f.Y1+" "+f.X2+" "+f.Y2+"</td>";e+="<td style='padding:2px;'></td>";e+="<td style='padding:2px;'>"+f.Shape+"</td>";e+="<td style='padding:2px;'>"+d+"</td>";e+="<td style='padding:2px;'></td>";e+="<td style='padding:2px;'></td>";e+="<td style='padding:2px;'></td>";e+=
"<td style='padding:2px;'></td>";e+="</tr>"}e+="</table>";f="EVD List";f+="<br/>Sl No > "+G;f+="<br/>Step Index > "+D;f+="<br/>TPS ID > "+r;q.Log("LogEVDList",LOG.EVENTLIST,f,e)}catch(n){q.Log("LogEVDList",LOG.EXCEPTION,"",n)}q.WaitForDoubleClick=false;q.ClickEventAvailable=false;for(var k in E)if(E[k].Event==EVENTTYPE.DOUBLECLICK)q.WaitForDoubleClick=true;else if(E[k].Event==EVENTTYPE.CLICK)q.ClickEventAvailable=true}catch(p){c=false,q.Log("Load",LOG.EXCEPTION,"",p)}return c};this.Validate=function(g){var k=
true;try{q.ConfusionText="";q.Result=false;var o=q.Error=false;try{for(var p in E)if(E[p].Event==g.Event){o=true;break}}catch(u){q.Error=true,q.Log("IsEventPresent",LOG.EXCEPTION,"",u)}if(o==false&&c(g)==true)return true;switch(g.Event){case EVENTTYPE.CLICK:var r=false;try{for(var A in E)if(E[A].Event==EVENTTYPE.CLICK&&a(E[A],g)==true){r=true;break}}catch(v){q.Error=true,q.Log("IsAnyOneOfClickEventIsValid",LOG.EXCEPTION,"",v)}if(r==true)if(B.length>0){if(b(g)==false)q.Result=true}else q.Result=true;
else if(c(g)==true)q.Result=false;break;case EVENTTYPE.DOUBLECLICK:if(e(g)==true)if(B.length>0){if(b(g)==false)q.Result=true}else q.Result=true;break;case EVENTTYPE.TYPETEXT:if(d(g)==true)q.Result=true;break;case EVENTTYPE.KEYPRESS:A=false;try{for(r in E){var D;if(D=E[r].Event==EVENTTYPE.KEYPRESS){var G;a:{var S=E[r],O=g,o=false;try{if(f(S,O)==false){G=o;break a}if(S.KeyCode==O.KeyCode||S.CharCode==O.KeyCode)o=true;else if(O.KeyCode>=48&&O.KeyCode<=57)S.KeyCode==O.KeyCode+48&&(o=true);else if(O.KeyCode>=
96&&O.KeyCode<=105)S.KeyCode==O.KeyCode-48&&(o=true);else if(O.KeyCode>=109&&O.KeyCode<=111)S.KeyCode==O.KeyCode+80&&(o=true);else if(S.KeyCode=="53")for(x in browserspec_json.valid_numoff_5_keycodes)if(O.KeyCode==browserspec_json.valid_numoff_5_keycodes[x]){o=true;break}}catch(P){q.Error=true,q.Log("IsValidKeyPress",LOG.EXCEPTION,"",P)}G=o}D=G==true}if(D){A=true;break}}}catch(z){q.Error=true,q.Log("IsAnyOneOfKeyPressEventIsValid",LOG.EXCEPTION,"",z)}if(A==true)q.Result=true;break;case EVENTTYPE.DRAG:r=
false;try{for(O in E)if(E[O].Event==EVENTTYPE.DRAG&&a(E[O],g)==true&&n(E[O].DX1,E[O].DY1,E[O].DX2,E[O].DY2,g.X2,g.Y2)==true){r=true;break}r==true&&B.length>0&&(r=b(g)==false?true:false)}catch(X){q.Error=true,q.Log("IsValidDrag",LOG.EXCEPTION,"",X)}if(r==true)q.Result=true}}catch(Z){k=false,q.Log("Validate",LOG.EXCEPTION,"",Z)}return k};this.GetEVDList=function(){return E};this.Validate2=function(a){var b=true;try{switch(q.Result=false,q.Error=false,a.Event){case EVENTTYPE.CLICK:if(e(a)==true)q.Result=
true}}catch(c){b=false,q.Log("Validate2",LOG.EXCEPTION,"",c)}return b};this.Validate3=function(a){var b=true;try{if(q.Result=false,q.Error=false,d(a)==true)q.Result=true}catch(c){b=false,q.Log("Validate3",LOG.EXCEPTION,"",c)}return b}}
function clsEventHandlingSystem(){function d(){try{v.Log("DoubleClickEvent_NotOccured",LOG.SPECIAL,"waited for DC event to happen for > ",browserspec_json.maximum_double_click_wait_time+" mili-sec");u=0;if(c()==false)throw"Error @ StopEventReceiver";r=r==RESULTTYPE.CORRECT&&p!=null?RESULTTYPE.WRONGSECONDHALF:RESULTTYPE.WRONG;e()}catch(b){v.Log("DoubleClickEvent_NotOccured",LOG.EXCEPTION,"",b),a()}}function b(a,b){var c=true;try{r=RESULTTYPE.WRONG;try{if(v.PerformedEventType=a.Event,v.X1=a.X1,v.Y1=
a.Y1,v.X=a.X,v.Y=a.Y,a.Event==EVENTTYPE.TYPETEXT||a.Event==EVENTTYPE.KEYPRESS){if(p!=null)v.X1=p.Left,v.Y1=p.Top;v.X=v.X1;v.Y=v.Y1;if(a.Event==EVENTTYPE.TYPETEXT){var e=g_objTR.GetCanvasScrollLeft(),f=g_objTR.GetCanvasScrollTop();e==0&&(e=-g_objTR.GetCanvasLeft());f==0&&(f=-g_objTR.GetCanvasTop());var d=Math.round(p.Left-e+g_objTR.CanvasAbsoluteLeft),g=Math.round(p.Top-f+g_objTR.CanvasAbsoluteTop);v.X=d;v.Y=g;g_objTR.IsFixedCC==true&&(v.X-=g_AdjX,v.Y-=g_AdjY)}if(a.Event==EVENTTYPE.KEYPRESS)v.X=g_objTR.CanvasAbsoluteLeft+
g_objTR.CanvasWidth/2,v.Y=g_objTR.CanvasAbsoluteTop+g_objTR.CanvasHeight/2,g_objTR.IsFixedCC==true&&(v.X-=g_AdjX,v.Y-=g_AdjY)}}catch(n){bRet=false,v.Log("UpdateInteractedCords",LOG.EXCEPTION,"",n)}if(b==true){if(E.Validate2(a)==false)throw"Error @ m_objEV.Validate1";}else if(E.Validate(a)==false)throw"Error @ m_objEV.Validate2";if(E.Error==true)throw"m_objEV.Error=true";bValid=E.Result;v.ConfusionText=E.ConfusionText;if(bValid==true)r=RESULTTYPE.CORRECT;if(p!=null){if(p.Rule==TYPETEXT_VALIDATION_RULE.NEXTACTION){if(E.Validate3(a)==
false)throw"Error @ m_objEV.Validate3";if(E.Error==true)throw"m_objEV.Error=true";var k=E.Result;if(bValid==true&&k==true)r=RESULTTYPE.CORRECT;else if(bValid==false&&k==true)r=RESULTTYPE.WRONGSECONDHALF;else if(bValid==true&&k==false)r=RESULTTYPE.WRONGFIRSTHALF;else if(bValid==false&&k==false)r=RESULTTYPE.WRONG}}else if(bValid==false)r=RESULTTYPE.WRONG}catch(o){c=false,v.Log("ValidateEvent",LOG.EXCEPTION,"",o)}return c}function c(){try{if(q.Stop()==false)throw"Error @ m_objER.Stop";if(v.Hide()==false)throw"Error @ ME.Hide";
}catch(a){bRet=false,v.Log("StopEventReceiver",LOG.EXCEPTION,"",a)}}function e(){try{if(v.onEventPerformed==null)throw"ME.onEventPerformed is not binded";if(q.Hide()==false)throw"Error @ m_objER.Hide";v.onEventPerformed(r)}catch(b){bRet=false,v.Log("RaiseFinalEvent",LOG.EXCEPTION,"",b),a()}}function a(){if(v.onError!=null)v.onError()}function f(f){try{if(f==void 0)throw"Event Data undefined";r=RESULTTYPE.WRONG;if(E.BaseEvent==EVENTTYPE.CLICK&&f.Event==EVENTTYPE.DRAG){var g=Math.abs(f.X1-f.X2),k=Math.abs(f.Y1-
f.Y2),o=Number(browserspec_json.drag_cursor_shift_value);if(g<=o&&k<=o)v.Log("m_objER_onValidate",LOG.SPECIAL,"Drag Event Converted to Click","Cursor Shift > "+g+" , "+k),f.Event=EVENTTYPE.CLICK,f.X2=f.X1,f.Y2=f.Y1}n(f,"yellow");clearTimeout(B);B=0;if(DEVICE.TOUCH==true){M=false;g=true;try{if(p!=null&&f.Event===EVENTTYPE.KEYPRESS){if(p.Rule===TYPETEXT_VALIDATION_RULE.NEXTACTION&&H===false&&C===true){if(q.SetFocus()==false)throw"Error @ m_objER.SetFocus";M=true}if(p.Rule===TYPETEXT_VALIDATION_RULE.TIMER||
p.Rule===TYPETEXT_VALIDATION_RULE.BUTTON)f.Event=EVENTTYPE.TYPETEXT}}catch(A){g=false,v.Log("RaiseFinalEvent",LOG.EXCEPTION,"",A),a()}if(g==false)throw"Error @ clsEventHandlingSystem -> ValidateEventForTSDevice";if(M==true)return v.Log("m_objER_onValidate",LOG.SPECIAL,"DEVICE.TOUCH","Event Ignored"),false;else{v.Log("m_objER_onValidate",LOG.SPECIAL,"DEVICE.TOUCH","Event Modified");n(f,"yellow");if(c()==false)throw"Error @ StopEventReceiver";if(b(f)==false)throw"Error @ ValidateEvent";e();return true}}g=
false;E.WaitForDoubleClick==true&&f.Event==EVENTTYPE.CLICK&&u==0?g=true:(clearTimeout(u),u=0);if(g){if(b(f)==false)throw"Error @ ValidateEvent";if(r==RESULTTYPE.WRONG||r==RESULTTYPE.WRONGSECONDHALF){if(b(f,true)==false)throw"Error @ ValidateEvent";if(r==RESULTTYPE.WRONG){if(c()==false)throw"Error @ StopEventReceiver";e()}else u=setTimeout(d,browserspec_json.maximum_double_click_wait_time)}else{v.Log("m_objER_onValidate",LOG.SPECIAL,"event valid","");if(c()==false)throw"Error @ StopEventReceiver";
e()}}else{if(b(f)==false)throw"Error @ ValidateEvent";if(r==RESULTTYPE.CORRECT&&E.ClickEventAvailable==true&&f.Event==EVENTTYPE.CLICK)B=setTimeout(e,browserspec_json.minimum_double_click_wait_time);else{if(c()==false)throw"Error @ StopEventReceiver";r==RESULTTYPE.CORRECT?B=setTimeout(e,100):e()}}}catch(D){v.Log("m_objER_onValidate",LOG.EXCEPTION,"",D),a()}}function n(a,b){try{if(a!=void 0){var c="<table width=100% height=100% border=1 cellpadding=0 cellspacing=0 style='font-size:12px'>";c+="<tr style='background-color:"+
b+"'>";c+="<td style='padding:2px;'>Event</td>";c+="<td style='padding:2px;'>MB</td>";c+="<td style='padding:2px;'>Cord</td>";c+="<td style='padding:2px;'>KM</td>";c+="<td style='padding:2px;'>KeyCode</td>";c+="<td style='padding:2px;'>MM</td>";c+="<td style='padding:2px;'>Text</td>";c+="</tr>";c+="<tr>";c+="<td style='padding:2px;'>"+a.Event+"</td>";c+="<td style='padding:2px;'>"+a.MouseButton+"</td>";c+="<td style='padding:2px;'>"+(a.X1+","+a.Y1+","+a.X2+","+a.Y2)+"</td>";c+="<td style='padding:2px;'>"+
a.Ctrl+","+a.Alt+","+a.Shift+"</td>";c+="<td style='padding:2px;'>"+a.KeyCode+"</td>";c+="<td style='padding:2px;'>"+a.MouseModifier+"</td>";c+="<td style='padding:2px;'>"+a.Text+"</td>";c+="</tr>";c+="</table>";var e="Event Performed";e+="<br/>Sl No > "+A;e+="<br/>Step Index > "+G;e+="<br/>TPS ID > "+D;v.Log("LogEVD",LOG.EVENTLIST,e,c)}}catch(f){v.Log("LogEVD",LOG.EXCEPTION,"",f)}}function g(){a()}function k(){try{var f=new clsEventData;f.Event=EVENTTYPE.TYPETEXT;f.Text=p.GetText();n(f);if(c()==
false)throw"Error @ StopEventReceiver";if(b(f)==false)throw"Error @ ValidateEvent";e()}catch(d){bRet=false,v.Log("g_objTR_onValidateButtonClick",LOG.EXCEPTION,"",d),a()}}function o(){try{var f=new clsEventData;f.Event=EVENTTYPE.KEYPRESS;f.KeyCode=13;if(p!=null)f.Text=p.GetText();if(c()==false)throw"Error @ StopEventReceiver";if(b(f)==false)throw"Error @ ValidateEvent";e()}catch(d){bRet=false,v.Log("g_objTR_onTSProceedButtonClick",LOG.EXCEPTION,"",d),a()}}clsPlayerBase.call(this,"clsEventHandlingSystem");
var v=this,p=null,q=null,E=null,u=0,B=0,A,G,D,r=RESULTTYPE.WRONG;this.onError=this.onEventPerformed=null;this.Y=this.X=this.Y1=this.X1=0;this.ConfusionText="";this.PerformedEventType=EVENTTYPE.NONE;var H=false,C=false,J=false,I=false,L=false,N="",M=false;this.Initialize=function(){var a=true;try{if(v.onEventPerformed==null)throw"onEventPerformed event not binded";if(v.onError==null)throw"onError event not binded";q=new clsEventReceiver;q.onValidate=f;q.onError=g;if(q.Initialize()==false)throw"Error @ m_objER.Initialize";
E=new clsEventValidator}catch(b){a=false,v.Log("Initialize",LOG.EXCEPTION,"",b)}return a};this.Load=function(a,b){var c=true;try{if(a==null)throw"objStep is null";A=a.SlNo;G=a.StepIndex;D=a.TPSID;if(v.onEventPerformed==null)throw"ME.onEventPerformed is not binded";if(E.Load(a,b)==false)throw"Error @ m_objEV.Load";var e=true;try{p=null;if(a.EventControls==void 0||a.EventControls==null)throw"No objStep.EventControls ???";g_objTR.EventReceiverTextBox=null;if(a.EventControls[EVENTTYPE.TYPETEXT]!=void 0){var f=
null;for(i in a.AnnotationControls)if(a.AnnotationControls[i].Type==ANNOTATION.OUTERREGION){f=a.AnnotationControls[i];break}if(f==null)throw"Outer Region Annotation Control not found";var d=PLAYABLEOBJECTS.TEXTBOX_NORMAL;if(a.EventControls[EVENTTYPE.TYPETEXT].IsPassword==true)d=PLAYABLEOBJECTS.TEXTBOX_PASSWORD;p=FlyWeight.GetObject(d);if(p==null)throw"Error @ FlyWeight.GetObject(PLAYABLEOBJECTS.TEXTBOX_?) for "+d;p.SetText("");p.Left=f.Left+f.Thickness-1;p.Top=f.Top+f.Thickness-1;p.Width=f.Width-
f.Thickness*2-1;p.Height=f.Height-f.Thickness*2-1;p.BgColor=a.EventControls[EVENTTYPE.TYPETEXT].BgColor;p.FontSize=a.EventControls[EVENTTYPE.TYPETEXT].Font.Size;p.FontName=a.EventControls[EVENTTYPE.TYPETEXT].Font.Name;p.FontBold=a.EventControls[EVENTTYPE.TYPETEXT].Font.Bold;p.FontItalic=a.EventControls[EVENTTYPE.TYPETEXT].Font.Italic;p.FontStrike=a.EventControls[EVENTTYPE.TYPETEXT].Font.Strike;p.ForeColor=a.EventControls[EVENTTYPE.TYPETEXT].ForeColor;p.Rule=a.EventControls[EVENTTYPE.TYPETEXT].Rule;
p.Interval=a.EventControls[EVENTTYPE.TYPETEXT].Timer;p.Characters=a.EventControls[EVENTTYPE.TYPETEXT].Characters;p.Hidden=!a.EventControls[EVENTTYPE.TYPETEXT].UseInputBox;if(p.Load()==false)throw"Error @ m_objTB.Load is null";}}catch(g){e=false,v.Log("CreateTextBox",LOG.EXCEPTION,"",g)}if(e==false)throw"Error @ CreateTextBox";if(q.Load(p)==false)throw"Error @ m_objER.Load";var n;if(n=DEVICE.TOUCH==true){e=true;try{I=false;f=b!=null?b:a;d=true;N="";try{for(var k in f.EventControls)if(f.EventControls[k].Type==
EVENTTYPE.KEYPRESS)N=f.EventControls[k].KeyValue}catch(u){d=false,v.Log("GetCurStepKeyValue",LOG.EXCEPTION,"",u)}if(d==false)throw"Error @ ";J=C=H=false;var r=E.GetEVDList(),B;for(B in r){switch(r[B].Event){case EVENTTYPE.KEYPRESS:H=true;var M=r[B];k=true;L="";try{f="",M.Alt==true&&(f+="Alt"),M.Ctrl==true&&(f+=f==""?"Ctrl ":"+ Ctrl "),M.Shift==true&&(f+=f==""?"Shift ":"+ Shift"),N!=""&&(f+=f==""?N:"+ "+N),L=f}catch(la){k=false,v.Log("GetProceedDialogMessage",LOG.EXCEPTION,"",la)}if(k==false)throw"Error @ GetProceedDialogMessage";
break;case EVENTTYPE.CLICK:C=true;break;case EVENTTYPE.TYPETEXT:J=true}r[B].Alt=false;r[B].Ctrl=false;r[B].Shift=false;r[B].MouseModifier=""}p!=null?p.Rule==TYPETEXT_VALIDATION_RULE.NEXTACTION&&H==true&&C===false&&(I=true):H==true&&C===false&&(I=true);if(I==true){if(g_objTR.ChangeMessageForTSProceedDiv(L)==false)throw"Error @ clsEventHandlingSystem-> ChangeMessageForTSProceedDiv";r=true;try{var ha=g_objTR.CanvasWidth,ja=g_objTR.CanvasHeight,M=B=0,ia=g_objTR.TSProceedDivWidth,ba=g_objTR.TSProceedDivHeight;
if(J==false)B=ha/2-ia,M=ja/2-ba;else{var ca=g_objTR.GetCanvasScrollLeft(),aa=g_objTR.GetCanvasScrollTop();ca==0&&(ca=-g_objTR.GetCanvasLeft());aa==0&&(aa=-g_objTR.GetCanvasTop());var V=Math.round(p.Left-ca+g_objTR.CanvasAbsoluteLeft),ea=Math.round(p.Top-aa+g_objTR.CanvasAbsoluteTop),ga=Math.round(p.Width),ra=Math.round(p.Height);g_objTR.IsFixedCC=true;V-=g_AdjX;ea-=g_AdjY;var ka;B=V+10;M=ea;ka=15;ha-(V+ga+ka)>=ia?(g_objTR.ValidatePos=VALIDATEPOSITION.RIGHT,B=V+ga+ka):ja-(ea+ra+ka)>=ba?(g_objTR.ValidatePos=
VALIDATEPOSITION.BOTTOM,M=ea+ra+ka):(g_objTR.ValidatePos=VALIDATEPOSITION.TOP,M=ea-ba)}if(g_objTR.MoveTSProceedButton(B,M)==false)throw"Error @ g_objTR.MoveTSProceedButton";}catch(na){r=false,v.Log("RepositionProceedDialog",LOG.EXCEPTION,"",na)}if(r==false)throw"Error @ m_objTB.Load is null";g_objTR.onTSProceedButtonClick=o}}catch(ma){e=false,v.Log("CollectDetailsForTouchScreen",LOG.EXCEPTION,"",ma)}n=e==false}if(n)throw"Error @ CollectDetailsForTouchScreen";}catch(oa){c=false,v.Log("Load",LOG.EXCEPTION,
"",oa)}return c};this.Show=function(){var a=true;try{if(E.EVDListAvailable){if(q.Show()==false)throw"Error @ m_objER.Show";if(I==true&&g_objTR.ShowTSProceedButton(g_objTR.ValidatePos)==false)throw"Error @ g_objTR.ShowValidateButton";if(q.SetFocus()==false)throw"Error @ m_objER.SetFocus";if(uid_json.settings.stepimage.imageresizeoption==IMAGERESIZE.FULLIMAGE&&g_objTR.ScrollCanvasToOriginalPosition()==false)throw"Error @ g_objTR.ScrollCanvasToOriginalPosition";if(p!=null)if(p.Rule==TYPETEXT_VALIDATION_RULE.BUTTON){var b=
true;try{var c=g_objTR.GetCanvasScrollLeft(),e=g_objTR.GetCanvasScrollTop();c==0&&(c=-g_objTR.GetCanvasLeft());e==0&&(e=-g_objTR.GetCanvasTop());var f=g_objTR.CanvasWidth,d=g_objTR.CanvasHeight,g=Math.round(p.Left-c+g_objTR.CanvasAbsoluteLeft),n=Math.round(p.Top-e+g_objTR.CanvasAbsoluteTop),o=Math.round(p.Width),r=Math.round(p.Height);g_objTR.IsFixedCC==true&&(g-=g_AdjX,n-=g_AdjY);var e=c=0,u=g_objTR.ValidateDivWidth,A=g_objTR.ValidateDivHeight,B,c=g+10,e=n;B=15;f-(g+o+B)>=u?(g_objTR.ValidatePos=
VALIDATEPOSITION.RIGHT,c=g+o+B,e-=A/2,c+=20):d-(n+r+B)>=A?(g_objTR.ValidatePos=VALIDATEPOSITION.BOTTOM,e=n+r+B):(g_objTR.ValidatePos=VALIDATEPOSITION.TOP,e=n-A);if(g_objTR.MoveValidateButton(c,e)==false)throw"Error @ g_objTR.MoveValidateButton";}catch(C){b=false,v.Log("CreateTextBox",LOG.EXCEPTION,"",C)}if(b==false)throw"Error @ m_objTB.Load is null";g_objTR.onValidateButtonClick=k;if(g_objTR.ShowValidateButton(g_objTR.ValidatePos)==false)throw"Error @ g_objTR.ShowValidateButton";}else if(g_objTR.onValidateButtonClick=
null,g_objTR.HideValidateButton()==false)throw"Error @ g_objTR.HideValidateButton";}}catch(D){a=false,v.Log("Show",LOG.EXCEPTION,"",D)}return a};this.Hide=function(){var a=true;try{if(q.Hide()==false)throw"Error @ m_objER.Hide";if(g_objTR.HideValidateButton()==false)throw"Error @ g_objTR.HideValidateButton";if(g_objTR.HideTSProceedButton()==false)throw"Error @ g_objTR.HideTSProceedButton";}catch(b){a=false,v.Log("Hide",LOG.EXCEPTION,"",b)}return a};this.FireMouseDown=function(a){var b=true;try{q.Enable==
true&&q.FireMouseDown(a)}catch(c){b=false,v.Log("FireMouseDown",LOG.EXCEPTION,"",c)}return b};this.FireMouseUp=function(a){var b=true;try{q.Enable==true&&q.FireMouseUp(a)}catch(c){b=false,v.Log("FireMouseUp",LOG.EXCEPTION,"",c)}return b};this.GetText=function(){var a="";try{p!=null&&(a=p.GetText())}catch(b){v.Log("GetText",LOG.EXCEPTION,"",b)}return a};this.SetText=function(a){try{p!=null&&(sRet=p.SetText(a))}catch(b){v.Log("GetText",LOG.EXCEPTION,"",b)}};this.Stop=function(){var a=true;try{if(c()==
false)throw"Error @ StopEventReceiver";}catch(b){a=false,v.Log("Stop",LOG.EXCEPTION,"",b)}return a}}
function clsKeypressEventInvoker(){function d(d){var g=true,k=true;try{clearTimeout(f);f=0;var o=d=d==void 0?event:d,v=false;try{var o=o==void 0?event:o,p=browserspec_json.div_ignore_keys;for(i in p)if(p[i]==o.keyCode){v=true;break}if(g_EnableAutomationFlag==true)for(i in p=browserspec_json.div_ignore_keys_automation,p)if(p[i]==o.keyCode){v=true;break}}catch(q){c.Log("IgnoreThisKey",LOG.EXCEPTION,"",q)}if(v==false){e=new clsEventData;e.Ctrl=d.ctrlKey;e.Alt=d.altKey;e.Shift=d.shiftKey;e.KeyCode=d.keyCode;
e.Event=EVENTTYPE.KEYPRESS;o=true;try{d=d==void 0?event:d,d.stopPropagation?(d.preventDefault(),d.stopPropagation()):(d.cancelBubble=true,d.returnValue=false,d.keyCode=0)}catch(E){o=false,c.Log("StopEvent",LOG.EXCEPTION,"",E)}if(o==false)throw"Error @ StopEvent";a.onkeydown=null;f=setTimeout(b,100);g=false}}catch(u){k=false,c.Log("InputDiv_onkeydown 1",LOG.EXCEPTION,"",u)}try{if(k==false)c.onError()}catch(B){c.Log("InputDiv_onkeydown 2",LOG.EXCEPTION,"",B)}return g}function b(){var a=true;try{c.onValidate(e)}catch(b){a=
false,c.Log("RaiseEvent",LOG.EXCEPTION,"",b),c.onError()}return a}clsPlayerBase.call(this,"clsKeypressEventInvoker");var c=this,e,a,f;this.onError=this.onValidate=null;this.BindEvents=function(b){var e=true;try{a=b,b.onkeydown=d}catch(f){c.Log("BindEvents",LOG.EXCEPTION,"",f),e=false}return e}}
function clsMouseAndKeyEventReceiver(){clsPlayerBase.call(this,"clsMouseAndKeyEventReceiver");var d=this,b=null,c=null,e=null;this.onError=this.onValidate=null;this.Initialize=function(){var a=true;try{var f=d.CreateHTMLElement("div");f.style.display="none";f.style.visibility="visible";if(BROWSER.LEGACY==false)f.style.backgroundColor="rgba(255,255,255,0)";f.style.zIndex=ZINDEX.MOUSERECEIVER;f.style.left="0px";f.style.top="0px";f.style.width=g_objTR.CanvasDIV.scrollWidth+"px";f.style.height=g_objTR.CanvasDIV.scrollHeight+
"px";g_objTR.CanvasDIV.appendChild(f);b=document.getElementById(f.id);g_objTR.EventReceiverDiv=b;b.tabIndex=1;b.style.outline="0px dashed #fff";if(BROWSER.LEGACY==true)b.innerHTML="<img src='"+g_objRIL.ImageList.legacy_browser_holder.src+"' width='100%' height='100%' />",b.style.filter="alpha(opacity=1)";b.onselectstart=function(){return false};b.ondragstart=function(){return false};if(d.onValidate==null)throw"onValidate event not binded";if(d.onError==null)throw"onError event not binded";e=new clsKeypressEventInvoker;
if(e.BindEvents(b)==false)throw"Error @ m_objKPR.BindEvents ";e.onValidate=d.onValidate;e.onError=d.onError;c=new clsMouseEventInvoker;if(c.BindEvents(b)==false)throw"Error @ m_objMER.BindEvents ";c.onValidate=d.onValidate;c.onError=d.onError}catch(n){a=false,d.Log("Initialize",LOG.EXCEPTION,"",n)}return a};this.Load=function(){var a=true;try{b.style.width=g_objTR.CanvasDIV.style.width,b.style.height=g_objTR.CanvasDIV.style.height}catch(c){a=false,d.Log("Load",LOG.EXCEPTION,"",c)}return a};this.Show=
function(){var a=true;try{if(b.style.display=g_inline,e.BindEvents(b)==false)throw"Error @ m_objKPR.BindEvents ";}catch(c){a=false,d.Log("Show",LOG.EXCEPTION,"",c)}return a};this.Hide=function(){var a=true;try{if(c.Stop()==false)throw"Error @ m_objMER.Stop";b.style.display="none"}catch(e){a=false,d.Log("Hide",LOG.EXCEPTION,"",e)}return a};this.SetFocus=function(){var a=true;try{g_objTR.EventReceiverDiv=b;b.style.display=g_inline;var c=Number(g_objTR.CanvasScrollLeft),e=Number(g_objTR.CanvasScrollTop);
BROWSER.IE==false?b.focus():c==0&&e==0?b.focus():g_CurrentStepType==STEPTYPE.KEYEVENT&&b.focus()}catch(g){a=false,d.Log("SetFocus",LOG.EXCEPTION,"",g)}return a};this.FireMouseDown=function(a){var b=true;try{c.FireMouseDown(a)}catch(e){b=false,d.Log("FireMouseDown",LOG.EXCEPTION,"",e)}return b};this.FireMouseUp=function(a){var b=true;try{c.FireMouseUp(a)}catch(e){b=false,d.Log("FireMouseUp",LOG.EXCEPTION,"",e)}return b}}
function clsMouseMetaData(){this.Y=this.X=this.Button=this.Time=-1;this.Shift=this.Alt=this.Ctrl=false}
function clsMouseEventInvoker(){function d(a){var b=true;try{var a=a==void 0?event:a,c=new clsMouseMetaData;c.Time=(new Date).getTime();c.Button=a.button;c.X=a.clientX;c.Y=a.clientY;c.Ctrl=a.ctrlKey;c.Alt=a.altKey;c.Shift=a.shiftKey;if(n.length==1&&(n[0].X!=c.X||n[0].Y!=c.Y))n=[];n.push(c)}catch(e){b=false,f.Log("InputDiv_Mousedown 1",LOG.EXCEPTION,"",e)}try{if(b==false)f.onError()}catch(d){f.Log("InputDiv_Mousedown 2",LOG.EXCEPTION,"",d)}}function b(b){var d=true;try{b=b==void 0?event:b;if(n.length>
0){var k=new clsMouseMetaData;k.Time=(new Date).getTime();k.Button=b.button;k.X=b.clientX;k.Y=b.clientY;k.Ctrl=b.ctrlKey;k.Alt=b.altKey;k.Shift=b.shiftKey;g.push(k)}var q=n.length,E=g.length,k=null;if(BROWSER.LEGACY==true)if(q==1&&E==1)k=c();else if(q==2&&E==1){var u=null;try{if(n[1].Button-n[0].Button==g[0].Button){var B=MOUSEBUTTON.NONE,B=e(n[0].Button);n[1].X==g[0].X&&n[1].Y==g[0].Y?u=a(EVENTTYPE.CLICK,B,n[1],g[0]):(u=a(EVENTTYPE.DRAG,B,n[1],g[0]),n=[],g=[])}else n=[],g=[]}catch(A){u=null,f.Log("CheckFor_ClickDrag_YES_MouseModifier",
LOG.EXCEPTION,"",A)}k=u}else{if(q==1&&E==2){B=null;try{u=g[1].Time-n[0].Time,f.Log("CheckFor_DoubleClick_NO_MouseModifier",LOG.SPECIAL,"iTimeDiff ",u),u<=browserspec_json.double_click_max_interval_time?n[0].X==g[0].X&&n[0].Y==g[0].Y&&(B=a(EVENTTYPE.DOUBLECLICK,MOUSEBUTTON.NONE,n[0],g[0]),n=[],g=[]):n[0].X!=g[1].X&&n[0].Y==g[1].Y&&(B=a(EVENTTYPE.DRAG,MOUSEBUTTON.NONE,n[0],g[1]),n=[],g=[])}catch(G){f.Log("CheckFor_DoubleClick_NO_MouseModifier",LOG.EXCEPTION,"",G),B=null}k=B}}else if(q==1&&E==1)k=c();
else if(q==2&&E==1){B=null;try{if(n[1].Button==g[0].Button){var D=MOUSEBUTTON.NONE,D=e(n[0].Button);n[1].X==g[0].X&&n[1].Y==g[0].Y?B=a(EVENTTYPE.CLICK,D,n[1],g[0]):(B=a(EVENTTYPE.DRAG,D,n[1],g[0]),n=[],g=[])}else n=[],g=[]}catch(r){B=null,f.Log("CheckFor_ClickDrag_YES_MouseModifier",LOG.EXCEPTION,"",r)}k=B}else if(q==2&&E==2){B=null;try{var H=g[1].Time-n[0].Time;f.Log("CheckFor_DoubleClick_NO_MouseModifier",LOG.SPECIAL,"iTimeDiff ",H);if(n[0].Button==n[1].Button)if(H<=browserspec_json.double_click_max_interval_time)n[0].X==
g[0].X&&n[0].Y==g[0].Y&&n[1].X==g[1].X&&n[1].Y==g[1].Y&&(B=a(EVENTTYPE.DOUBLECLICK,MOUSEBUTTON.NONE,n[1],g[0]),n=[],g=[]);else if(n[1].X==g[1].X&&n[1].Y==g[1].Y){var B=a(EVENTTYPE.CLICK,MOUSEBUTTON.NONE,n[1],g[1]),C=n[1],J=g[1];n=[];g=[];n.push(C);g.push(J)}else B=a(EVENTTYPE.DRAG,MOUSEBUTTON.NONE,n[1],g[1]),n=[],g=[]}catch(I){f.Log("CheckFor_DoubleClick_NO_MouseModifier",LOG.EXCEPTION,"",I),B=null}k=B}else if(q==3&&E==2){B=null;try{var L=g[1].Time-n[1].Time,N=MOUSEBUTTON.NONE,N=e(n[0].Button);if(n[1].Button==
n[2].Button)if(L<=browserspec_json.double_click_max_interval_time)n[1].X==g[0].X&&n[1].Y==g[0].Y&&n[2].X==g[1].X&&n[2].Y==g[1].Y&&(B=a(EVENTTYPE.DOUBLECLICK,N,n[1],g[0]),n=[],g=[]);else if(n[1].X==g[1].X&&n[1].Y==g[1].Y){var B=a(EVENTTYPE.CLICK,N,n[1],g[1]),M=n[0],K=n[2],F=g[1];n=[];g=[];n.push(M);n.push(K);g.push(F)}else B=a(EVENTTYPE.DRAG,MOUSEBUTTON.NONE,n[1],g[1]),n=[],g=[]}catch(T){f.Log("CheckFor_DoubleClick_YES_MouseModifier",LOG.EXCEPTION,"",T),B=null}k=B}var S;if(S=k!=null){B=true;try{if(f.onValidate==
null)throw"onValidate event not binded";f.onValidate(k)}catch(O){B=false,f.Log("RaiseMouseEvent",LOG.EXCEPTION,"",O)}S=B==false}if(S)throw"Error @ RaiseMouseEvent";S=true;try{b=b==void 0?event:b;if(b==void 0)b=window.event;b.stopPropagation?b.stopPropagation():b.cancelBubble=true;b.returnValue=false}catch(P){S=false,f.Log("StopEvent",LOG.EXCEPTION,"",P)}if(S==false)throw"Error @ StopEvent";}catch(z){d=false,f.Log("InputDiv_Mouseup 1",LOG.EXCEPTION,"",z)}try{if(d==false)f.onError()}catch(X){f.Log("InputDiv_Mouseup 2",
LOG.EXCEPTION,"",X)}return false}function c(){var b=null;try{n[0].X==g[0].X&&n[0].Y==g[0].Y?b=a(EVENTTYPE.CLICK,MOUSEBUTTON.NONE,n[0],g[0]):(b=a(EVENTTYPE.DRAG,MOUSEBUTTON.NONE,n[0],g[0]),n=[],g=[])}catch(c){f.Log("CheckFor_ClickDrag_NO_MouseModifier",LOG.EXCEPTION,"",c),b=null}return b}function e(a){try{if(BROWSER.LEGACY==true)switch(a){case 1:btnTypeName=MOUSEBUTTON.LEFT;break;case 4:btnTypeName=MOUSEBUTTON.MIDDLE;break;case 2:btnTypeName=MOUSEBUTTON.RIGHT}else switch(a){case 0:btnTypeName=MOUSEBUTTON.LEFT;
break;case 1:btnTypeName=MOUSEBUTTON.MIDDLE;break;case 2:btnTypeName=MOUSEBUTTON.RIGHT}}catch(b){btnTypeName=MOUSEBUTTON.NONE,f.Log("GetMouseButtonType",LOG.EXCEPTION,"",b)}return btnTypeName}function a(a,b,c,d){var g=new clsEventData;try{g.MouseButton=e(d.Button);var n=k.getBoundingClientRect();g.Event=a;g.Ctrl=d.Ctrl;g.Alt=d.Alt;g.Shift=d.Shift;g.KeyCode=0;g.X1=c.X-n.left;g.Y1=c.Y-n.top;g.X2=d.X-n.left;g.Y2=d.Y-n.top;g.X=c.X;g.Y=c.Y;if(g_objTR.IsFixedCC==true)g.X=c.X-g_AdjX,g.Y=c.Y-g_AdjY;g.Text=
"";g.MouseModifier=b}catch(B){g=null,f.Log("GetEventData",LOG.EXCEPTION,"",B)}return g}clsPlayerBase.call(this,"clsMouseEventInvoker");var f=this,n=[],g=[],k;this.onError=this.onValidate=null;this.BindEvents=function(a){var c=true;try{k=a,a.onmousedown=d,a.onmouseup=b}catch(e){c=false,f.Log("BindEvents",LOG.EXCEPTION,"",e)}return c};this.Stop=function(){var a=true;try{n=[],g=[]}catch(b){a=false,f.Log("Stop",LOG.EXCEPTION,"",b)}return a};this.FireMouseDown=function(a){var b=true;try{d(a)}catch(c){b=
false,f.Log("FireMouseDown",LOG.EXCEPTION,"",c)}return b};this.FireMouseUp=function(a){var c=true;try{b(a)}catch(e){c=false,f.Log("FireMouseUp",LOG.EXCEPTION,"",e)}return c}}
function clsTextAndKeyEventReceiver(){clsPlayerBase.call(this,"clsTextAndKeyEventReceiver");var d=this,b=null,c=null,e=null;this.onError=this.onValidate=null;this.Load=function(a){var f=true;try{if(d.onValidate==null)throw"onValidate event not binded";if(d.onError==null)throw"onError event not binded";c=a;if(c!=null){b=c.GetTextBox();if(b==null)throw"Error @ m_InputTextbox is null";e=new clsTextboxEventInvoker;e.onValidate=d.onValidate;e.onError=d.onError;if(e.BindEvents(c)==false)throw"Error @ m_objTBInvoker.BindEvents";
}}catch(n){f=false,d.Log("Load",LOG.EXCEPTION,"",n)}return f};this.GetText=function(){var a="";try{if(b!=null)a=b.value}catch(c){d.Log("GetText",LOG.EXCEPTION,"",c)}return a};this.SetFocus=function(){var a=true;try{if(c!=null){g_objTR.EventReceiverTextBox=b;b.style.display=g_inline;try{b.focus()}catch(e){}}}catch(n){a=false,d.Log("SetFocus",LOG.EXCEPTION,"",n)}return a};this.Show=function(){var a=true;try{c!=null&&c.Show()}catch(b){a=false,d.Log("Show",LOG.EXCEPTION,"",b)}return a};this.Hide=function(){var a=
true;try{if(c!=null&&c.Hide()==false)throw"Error @ m_objTB.Hide";}catch(b){a=false,d.Log("Hide",LOG.EXCEPTION,"",b)}return a};this.Stop=function(){var a=true;try{e!=null&&e.Stop()}catch(b){a=false,d.Log("Stop",LOG.EXCEPTION,"",b)}return a}}
function clsTextboxEventInvoker(){function d(b){var d=true,n=true;try{b=b==void 0?event:b;clearTimeout(A);A=0;var k=false;b.keyCode==browserspec_json.keycodes.TAB?k=true:e(b,browserspec_json.browser_splkeys_to_be_ignored_in_textbox_keydown)==true&&(k=true);if(k){if(c(b)==false)throw"Error @ StoreEventData";if(a(b)==false)throw"Error @ StopEvent";o.Rule!=TYPETEXT_VALIDATION_RULE.BUTTON&&(A=setTimeout(f,100),d=false)}}catch(p){n=false,g.Log("m_InputTextbox_onkeydown 1",LOG.EXCEPTION,"",p)}try{if(n==
false)g.onError()}catch(u){g.Log("m_InputTextbox_onkeydown 2",LOG.EXCEPTION,"",u)}return d}function b(b){var d=true;try{var b=b==void 0?event:b,p=false,u=false;if(e(b,browserspec_json.textbox_validkeys,true)==true)p=true;else{var q=b,B=false;try{var q=q==void 0?event:q,E=browserspec_json.keys_allowed_in_textbox;for(i in E)if(E[i]==q.keyCode){B=true;break}}catch(N){g.Log("IgnoreThisKey",LOG.EXCEPTION,"",N)}if(B==true||e(b,browserspec_json.combination_keys_allowed_in_textbox)==true){if(b.keyCode==browserspec_json.keycodes.BACKSPACE||
b.keyCode==browserspec_json.keycodes.DELETE)clearTimeout(A),A=0,clearTimeout(v),v=0,k.value.length>0&&k.value.length!=G.length&&o.Rule!=TYPETEXT_VALIDATION_RULE.BUTTON&&(p=true)}else o.Rule!=TYPETEXT_VALIDATION_RULE.BUTTON&&(u=true)}if(u||p){if(c(b)==false)throw"Error @ StoreEventData";if(a(b)==false)throw"Error @ StopEvent";}if(u==true)A=setTimeout(f,100);else{var M;if(M=p==true){b=true;try{o.Rule==TYPETEXT_VALIDATION_RULE.TIMER?(clearTimeout(v),v=0,v=setTimeout(n,Number(o.Interval))):o.Rule==TYPETEXT_VALIDATION_RULE.CHARACTER&&
k.value.length>=o.Characters&&n()}catch(K){b=false,g.Log("RaiseEventForTypeText",LOG.EXCEPTION,"",K)}M=b==false}if(M)throw"Error @ RaiseEventForTypeText";}G=k.value}catch(F){d=false,g.Log("m_InputTextbox_onkeyup 1",LOG.EXCEPTION,"",F)}try{if(d==false)g.onError()}catch(T){g.Log("m_InputTextbox_onkeyup 2",LOG.EXCEPTION,"",T)}return false}function c(a){var b=true;try{a=a==void 0?event:a,p=a.ctrlKey,q=a.altKey,E=a.shiftKey,u=a.keyCode,B=k.value}catch(c){g.Log("StoreEventData",LOG.EXCEPTION,"",c),b=false}return b}
function e(a,b,c){var e=false;try{var a=a==void 0?event:a,f,d=false,n=false,k=false,o=0;for(i in b){k=n=d=false;f=b[i].key.split("+");for(j in f)switch(f[j].toUpperCase()){case "CTRL":d=true;break;case "ALT":n=true;break;case "SHIFT":k=true;break;default:o=f[j].length==1?f[j].toUpperCase().charCodeAt(0):browserspec_json.keycodes[f[j].toUpperCase()]!=void 0?browserspec_json.keycodes[f[j].toUpperCase()]:Number(f[j])}if(c==true)k=a.shiftKey;if(d==a.ctrlKey&&n==a.altKey&&k==a.shiftKey&&o==a.keyCode){e=
true;break}}}catch(p){g.Log("IsTheseKeysPressed",LOG.EXCEPTION,"",p)}return e}function a(a){var b=true;try{a=a==void 0?event:a,a.stopPropagation?(a.preventDefault(),a.stopPropagation()):(a.cancelBubble=true,a.returnValue=false,a.keyCode=0)}catch(c){b=false,g.Log("StopEvent",LOG.EXCEPTION,"",c)}return b}function f(){var a=true;try{clearTimeout(A);A=0;if(g.onValidate==null)throw"onValidate event not binded";m_objED=new clsEventData;m_objED.Ctrl=p;m_objED.Alt=q;m_objED.Shift=E;m_objED.KeyCode=u;m_objED.Text=
B;m_objED.Event=EVENTTYPE.KEYPRESS;g.onValidate(m_objED)}catch(b){a=false,g.Log("RaiseEventForKeyPress",LOG.EXCEPTION,"",b)}return a}function n(){try{clearTimeout(v);v=0;m_objED=new clsEventData;m_objED.Ctrl=p;m_objED.Alt=q;m_objED.Shift=E;m_objED.KeyCode=u;m_objED.Text=B;m_objED.Event=EVENTTYPE.TYPETEXT;if(g.onValidate==null)throw"onValidate event not binded";g.onValidate(m_objED)}catch(a){g.Log("RaiseValidateTextEvent",LOG.EXCEPTION,"",a)}}clsPlayerBase.call(this,"clsTextboxEventInvoker");var g=
this,k=null,o=null,v,p=false,q=false,E=false,u=0,B="",A,G="";this.onError=this.onValidate=null;this.BindEvents=function(a){var c=true;try{o=a,k=a.GetTextBox(),k.onkeydown=d,k.onkeyup=b}catch(e){g.Log("BindEvents",LOG.EXCEPTION,"",e),c=false}return c};this.Stop=function(){var a=true;try{clearTimeout(A),A=0,clearTimeout(v),v=0}catch(b){a=false,g.Log("Stop",LOG.EXCEPTION,"",b)}return a}}
function clsTextBox(d){clsPlayerBase.call(this,"clsTextBox");var b=this,c=null;this.FontName=this.FontSize=this.Height=this.Width=this.Top=this.Left=0;this.FontStrike=this.FontItalic=this.FontBold=false;this.BgColor="#FFFFFF";this.ForeColor="#000000";this.Rule=TYPETEXT_VALIDATION_RULE.BUTTON;this.Interval=3E3;this.Characters=3;this.Hidden=false;this.Initialize=function(e){var a=true;try{if(e==null)throw"holderDiv is not supplied";var f="text";switch(d){case TEXTBOX_TYPE.NORMAL:f="text";break;case TEXTBOX_TYPE.PASSWORD:f=
"password"}var n;d==TEXTBOX_TYPE.MULTILINE?n=b.CreateHTMLElement("textarea"):(n=b.CreateHTMLElement("input"),n.type=f);n.style.display="none";n.style.visibility="visible";n.style.zIndex=ZINDEX.TEXTBOXRECEIVER;n.style.borderWidth="1px";n.style.borderColor="#a0a0a0";n.style.borderStyle="solid";e.appendChild(n);c=document.getElementById(n.id)}catch(g){a=false,b.Log("Initialize",LOG.EXCEPTION,"",g)}return a};this.Load=function(){var e=true;try{b.Left*=g_objGS.General.ResizeFactor;b.Top*=g_objGS.General.ResizeFactor;
b.Width*=g_objGS.General.ResizeFactor;b.Height*=g_objGS.General.ResizeFactor;if(c==null)throw"text box is null";var a=0,a=Math.round(Number(b.FontSize)*g_objGS.General.ResizeFactor);a<8&&(a=8);b.Hidden==true?(c.style.left="-10px",c.style.top="-10px",c.style.width="1px",c.style.height="1px"):(c.style.left=b.Left+"px",c.style.top=b.Top+"px",c.style.width=b.Width+"px",c.style.height=b.Height+"px");if(uid_json.settings.template.rtl=="rtl")c.style.direction="rtl";c.style.backgroundColor=b.BgColor;c.style.fontFamily=
b.FontName;c.style.fontSize=String(a)+"pt";if(b.FontBold==true)c.style.fontWeight="bold";if(b.FontItalic==true)c.style.fontStyle="italic";c.style.color=b.ForeColor}catch(f){e=false,b.Log("Load",LOG.EXCEPTION,"",f)}return e};this.GetBoundingRect=function(){var e=null;try{e=c.getBoundingClientRect()}catch(a){e=null,b.Log("GetBoundingRect",LOG.EXCEPTION,"",a)}return e};this.GetTextBox=function(){return c};this.Show=function(){var e=true;try{if(b.Hidden==true)c.value="";c.style.display=g_inline;c.style.visibility=
"visible";c.focus()}catch(a){e=false,b.Log("Show",LOG.EXCEPTION,"",a)}return e};this.Hide=function(){var e=true;try{c.style.display="none",c.style.visibility="hidden"}catch(a){e=false,b.Log("Hide",LOG.EXCEPTION,"",a)}return e};this.GetText=function(){return c.value};this.SetText=function(b){c.value=b}}
function clsModeBase(){function d(a,b){try{return a.Seq<b.Seq?-1:a.Seq>b.Seq?1:0}catch(e){c.Log("Compare",LOG.EXCEPTION,"",e)}}function b(a,b,e,d,k){d=true;try{if(g_objGS.General.ActiveMode==MODETYPE.SHOW&&uid_json.settings.mode_show.turnoffcallout=="1")return true;if(g_objGS.General.ActiveMode==MODETYPE.GUIDE&&uid_json.settings.mode_guide.turnoffcallout=="1")return true;if(g_objGS.General.ActiveMode==MODETYPE.TEST&&uid_json.settings.mode_test.turnoffcallout=="1")return true;if(g_objGS.General.CalloutButtonEnabled==
true){var o=c.GetCalloutStickyObject(e,b.CALLOUTSTICKYNOTE,k);if(o==null)throw"objPO_CS = null";if(a.CALLOUT_STICKY==null)a.CALLOUT_STICKY=[];a.CALLOUT_STICKY.push(o)}}catch(v){d=false,c.Log("CreateCalloutStickyObjects",LOG.EXCEPTION,"",v)}return d}clsPlayerBase.call(this,"clsModeBase");var c=this;this.m_StepIndex=0;var e=false;this.PlayableObjectsList_CurStep={OCR_Blink:null,OCR_NoBlink:null,ICR_Blink:null,ICR_NoBlink:null,DR_Blink:null,DR_NoBlink:null,CURSORMOVE_ANIM:null,DRAG_ANIM:null,CURSORAUDIO_ANIM:null,
CALLOUT_STICKY:null,HIGHLIGHTERS:null,ROLLOVERNOTES:null,CONTINUELAYER:null,STEP_AUDIO:null,DELAY:null,TYPETEXT_ANIM:null,KEYPRESS_ANIM:null,SCREEN_VIDEO:null,CONSIDER_AUDIO_IN_POM:true,QUESTION:null,TUTORIMAGE:null,CALLOUTTEXTBOX:null};this.ProcessTaskData=null;this.objLoadPOM_CurStep=new clsPlayableObjectManager("LoadPOM_CurStep");this.objDIFMPOM_CurStep=new clsPlayableObjectManager("DifmPOM_CurStep");this.objCurrentStep=null;this.objPOMLoader=new clsPOMLoader;this.objPOMPlayer=new clsPOMPlayer;
this.CreatePlayableObjects=function(a,f,d){var g=true;try{var k;a:{var o=true;try{for(x in d.AnnotationControls)if(d.AnnotationControls[x].MediaFiles!=void 0&&d.AnnotationControls[x].MediaFiles.length>0){k=true;break a}var v=false;switch(g_objGS.General.ActiveMode){case MODETYPE.SHOW:v=true;break;case MODETYPE.GUIDE:uid_json.settings.mode_guide.enableaudio==true&&(v=true);break;case MODETYPE.TEST:uid_json.settings.mode_test.enableaudio==true&&(v=true)}if(v==true){var p=g_GetSuitableMediaForCurrentBrowser(MEDIATYPE.STEPAUDIO,
d);if(p!=null&&g_objGS.General.AudioButtonEnabled==true){var q=FlyWeight.GetObject(f.STEPAUDIO);if(q==null)throw"Error @ FlyWeight.GetObject(FWPOTypes.STEPAUDIO)";if(q.Load(p.Src)==false)throw"Error @ Audio.Load";a.STEP_AUDIO=q}}}catch(E){o=false,c.Log("CreateStepAudioObject",LOG.EXCEPTION,"",E)}k=o}if(k==false)throw"Error @ CreateStepAudioObject";var u;if(u=g_objGS.General.ActiveMode==MODETYPE.SHOW){var B=true;try{var A=null,G="";switch(g_objGS.General.ActiveMode){case MODETYPE.SHOW:G="mode_show";
break;case MODETYPE.GUIDE:G="mode_guide";break;case MODETYPE.TEST:G="mode_test"}if(uid_json.settings[G].screenvideo===true&&(A=g_GetSuitableMediaForCurrentBrowser(MEDIATYPE.SCREENVIDEO,d),A!=null)){var D=FlyWeight.GetObject(f.SCREENVIDEO);if(D==null)throw"Error @ FlyWeight.GetObject(FWPOTypes.SCREENVIDEO)";if(D.Load(A)==false)throw"Error @ Video.Load";a.SCREEN_VIDEO=D}}catch(r){B=false,c.Log("CreateScreenVideoObject",LOG.EXCEPTION,"",r)}u=B==false}if(u)throw"Error @ CreateScreenVideoObject";var H=
1,C=1,J=1,I=1,L;for(L in d.AnnotationControls)switch(d.AnnotationControls[L].Type.toUpperCase()){case ANNOTATION.OUTERREGION:if(d.EventControls[EVENTTYPE.TYPETEXT]!=void 0){var N=uid_json.settings.textbox,M=d.AnnotationControls[L];if(N.decreasedimesions==true){if(M.Width>N.maxwidth)M.Width=Number(N.maxwidth);if(M.Height>N.maxheight)M.Height=Number(N.maxheight)}}var K=a,F=f,T=d.AnnotationControls[L],S=true;try{var O=FlyWeight.GetObject(F.OCR_BLINK);O.HideOnPlayComplete=false;O.EnableBlink=uid_json.settings.controlregion.blinkoption==
BLINKMODE.NONE?false:true;O.CaptionText="";if(K.DR_Blink!=null)O.CaptionText=g_objGS.GetDragFromText();if(c.LoadControlRegion(O,T,ANNOTATION.OUTERREGION)==false)throw"Error @ LoadControlRegion";if(uid_json.settings.controlregion.blinkoption==BLINKMODE.BEFOREPLAY){O.HideOnPlayComplete=true;K.OCR_Blink=O;var P=FlyWeight.GetObject(F.OCR_NOBLINK);P.EnableBlink=false;P.CaptionText=O.CaptionText;if(c.LoadControlRegion(P,T,ANNOTATION.OUTERREGION)==false)throw"Error @ LoadControlRegion";K.OCR_NoBlink=P}else K.OCR_Blink=
O}catch(z){S=false,c.Log("CreateOuterControlRegionObject",LOG.EXCEPTION,"",z)}if(S==false)throw"Error @ CreateOuterControlRegionObject 1";break;case ANNOTATION.INNERREGION:var X=a,Z=f,Y=d.AnnotationControls[L],U=true;try{var fa=FlyWeight.GetObject(Z.ICR_BLINK);fa.HideOnPlayComplete=false;fa.EnableBlink=uid_json.settings.controlregion.blinkoption==BLINKMODE.NONE?false:true;fa.CaptionText="";if(c.LoadControlRegion(fa,Y,ANNOTATION.INNERREGION)==false)throw"Error @ LoadControlRegion";if(uid_json.settings.controlregion.blinkoption==
BLINKMODE.BEFOREPLAY){fa.HideOnPlayComplete=true;X.ICR_Blink=fa;var R=FlyWeight.GetObject(Z.ICR_NOBLINK);R.EnableBlink=false;R.CaptionText="";if(c.LoadControlRegion(R,Y,ANNOTATION.INNERREGION)==false)throw"Error @ LoadControlRegion";X.ICR_NoBlink=R}else X.ICR_Blink=fa}catch(la){U=false,c.Log("CreateControlRegionObject",LOG.EXCEPTION,"",la)}if(U==false)throw"Error @ CreateInnerControlRegionObject 2";break;case ANNOTATION.MOUSEPOINTER:var ha=a,ja=f,ia=d.AnnotationControls[L],ba=d.EventControls,ca=true;
try{var aa=FlyWeight.GetObject(ja.CURSORMOVE_ANIM);if(aa==null)throw"FlyWeight.GetObject(FWPOTypes.CURSORMOVE_ANIM)";aa.Interval=Number(uid_json.settings.speed.cursorspeedfactors[uid_json.settings.speed.level]);aa.Orientation=ia.Orientation;aa.MouseDownX=ia.MouseDownX*g_objGS.General.ResizeFactor;aa.MouseDownY=ia.MouseDownY*g_objGS.General.ResizeFactor;aa.MouseUpX=ia.MouseUpX*g_objGS.General.ResizeFactor;aa.MouseUpY=ia.MouseUpY*g_objGS.General.ResizeFactor;aa.CursorNormal_Image=g_objIPL.GetBasicImage(ia.CursorKeyNormal);
aa.CursorDown_Image=g_objIPL.GetBasicImage(ia.CursorKeyDown);aa.CursorHover_Image=g_objIPL.GetBasicImage(ia.CursorKeyHover);var V=void 0;for(V in ba)if(V.toUpperCase()==EVENTTYPE.CLICK||V.toUpperCase()==EVENTTYPE.DOUBLECLICK||V.toUpperCase()==EVENTTYPE.DRAG){aa.MouseEventData=ba[V];break}if(aa.Load()==false)throw"Error @ CursMove.Load";ha.CURSORMOVE_ANIM=aa;var ea=FlyWeight.GetObject(ja.CURSORAUDIO_ANIM);if(ea==null)throw"Error @ FlyWeight.GetObject(FWPOTypes.CURSORAUDIO_ANIM)";ea.CursorMovePlayer=
ha.CURSORMOVE_ANIM;if(ea.Load()==false)throw"Error @ CursorAudio Load";ha.CURSORAUDIO_ANIM=ea;if(ia.EventType==EVENTTYPE.DRAG){var ga=FlyWeight.GetObject(ja.DRAG_ANIM);if(ga==null)throw"FlyWeight.GetObject(FWPOTypes.DRAG_ANIM)";ga.CursorMovePlayer=ha.CURSORMOVE_ANIM;if(ga.Load()==false)throw"Error @ DragPlayer.Load";ha.DRAG_ANIM=ga}}catch(ra){ca=false,c.Log("CreateCursorMoveAndRelatedObjects",LOG.EXCEPTION,"",ra)}if(ca==false)throw"Error @ CreateCursorMoveAndRelatedObjects";break;case ANNOTATION.DROPREGION:var ka=
a,na=f,ma=d.AnnotationControls[L],oa=true;try{var Q=FlyWeight.GetObject(na.DR_BLINK);if(Q==null)throw"FlyWeight.GetObject(FWPOTypes.DR_BLINK)";Q.EnableBlink=uid_json.settings.controlregion.blinkoption==BLINKMODE.NONE?false:true;Q.CaptionText=g_objGS.GetDragToText();if(c.LoadControlRegion(Q,ma,ANNOTATION.DROPREGION)!=true)throw"Error @ LoadControlRegion ";if(uid_json.settings.controlregion.blinkoption==BLINKMODE.BEFOREPLAY){Q.HideOnPlayComplete=true;ka.DR_Blink=Q;var W=FlyWeight.GetObject(na.DR_NOBLINK);
if(W==null)throw"FlyWeight.GetObject(FWPOTypes.DR_NOBLINK)";W.EnableBlink=false;W.CaptionText=Q.CaptionText;if(c.LoadControlRegion(W,ma,ANNOTATION.DROPREGION)!=true)throw"LoadControlRegion";ka.DR_NoBlink=W}else ka.DR_Blink=Q;if(ka.OCR_Blink!=null){var da=g_objGS.GetDragFromText();ka.OCR_Blink.CaptionText=da;if(ka.OCR_NoBlink!=null)ka.OCR_NoBlink.CaptionText=da}}catch(sa){oa=false,c.Log("CreateDragRelatedObjects",LOG.EXCEPTION,"",sa)}if(oa==false)throw"Error @ CreateDragRelatedObjects";break;case ANNOTATION.HIGHLIGHTER:var qa=
c.objCurrentStep,va=true;try{switch(e=false,g_objGS.General.ActiveMode){case MODETYPE.SHOW:e=true;break;case MODETYPE.GUIDE:qa.Type==STEPTYPE.WINDOWACTIVATE?e=uid_json.settings.mode_guide.highlighterwa=="0"?false:true:uid_json.settings.mode_guide.highlighter==true&&(e=true);break;case MODETYPE.TEST:qa.Type==STEPTYPE.WINDOWACTIVATE?e=uid_json.settings.mode_test.highlighterwa=="0"?false:true:uid_json.settings.mode_test.highlighter==true&&(e=true)}}catch(Aa){va=false,c.Log("CheckForHighlightersConsideration",
LOG.EXCEPTION,"",Aa)}if(va==false)throw"Error @ CheckForHighlightersConsideration";if(e==true){var pa=a,Fa=true;try{var Na=c.GetHighlightRegionObject(d.AnnotationControls[L],f.HIGHLIGHTER,J);if(Na==null)throw"objPO_HlR = null";if(pa.HIGHLIGHTERS==null)pa.HIGHLIGHTERS=[];pa.HIGHLIGHTERS.push(Na)}catch(Ca){Fa=false,c.Log("CreateHighlightRegionObject",LOG.EXCEPTION,"",Ca)}if(Fa==false)throw"Error @ CreateHighlightRegionObject";J++}break;case ANNOTATION.CALLOUT:if(b(a,f,d.AnnotationControls[L],ANNOTATION.CALLOUT,
H)==false)throw"Error @ CreateCalloutStickyObjects";H++;break;case ANNOTATION.STICKYNOTE:if(b(a,f,d.AnnotationControls[L],ANNOTATION.STICKYNOTE,H)==false)throw"Error @ CreateCalloutStickyObjects";H++;break;case ANNOTATION.ROLLOVERIMAGE:var Ja=a,Da=f,za=d.AnnotationControls[L],Ga=C,Ha=true;try{var ta=false;g_objGS.General.ActiveMode==MODETYPE.SHOW&&uid_json.settings.mode_show.enablerollover==true?ta=true:g_objGS.General.ActiveMode==MODETYPE.GUIDE&&uid_json.settings.mode_guide.enablerollover==true?
ta=true:g_objGS.General.ActiveMode==MODETYPE.TEST&&uid_json.settings.mode_test.enablerollover==true&&(ta=true);if(ta==true){var Oa=c.GetCalloutStickyObject(za.StickyNoteData,Da.CALLOUTSTICKYNOTE,H,ZINDEX.ROLLCALLOUT);if(Oa==null)throw"objPO_CS = null";var wa=FlyWeight.GetObject(Da.ROLLOVERIMAGE,Ga);if(wa==null)throw" Error @ FlyWeight.GetObject for callout/sticky";wa.Type=za.Type;wa.Left=za.Left;wa.Top=za.Top;wa.Width=za.Width;wa.Height=za.Height;wa.Duration=za.Duration;wa.ImageKey=za.ImageKey;wa.StickyNote=
Oa;if(wa.Load()==false)throw"Error @ RolloverObject.Load";if(Ja.ROLLOVERNOTES==null)Ja.ROLLOVERNOTES=[];Ja.ROLLOVERNOTES.push(wa)}}catch(Ta){Ha=false,c.Log("CreateRolloverNoteObjects",LOG.EXCEPTION,"",Ta)}if(Ha==false)throw"Error @ CreateRolloverNoteObjects";H++;C++;break;case ANNOTATION.NAVIGATIONREGION:var Ka=a,ab=true;try{var ya=c.GetNavigationRegionObject(d.AnnotationControls[L],f.NAVIGATIONREGION,I);if(ya==null)throw"objPO_NR = null";if(Ka.NAVIGATIONREGIONS==null)Ka.NAVIGATIONREGIONS=[];Ka.NAVIGATIONREGIONS.push(ya)}catch(Ua){ab=
false,c.Log("CreateNavigationRegionObjects",LOG.EXCEPTION,"",Ua)}if(ab==false)throw"Error @ CreateNavigationRegionObjects";I++;break;case ANNOTATION.TUTORIMAGE:var ua;a:{var La=a,Pa=true;try{if(g_objGS.General.ActiveMode==MODETYPE.SHOW&&uid_json.settings.mode_show.turnoffcallout=="1"){ua=true;break a}if(g_objGS.General.ActiveMode==MODETYPE.GUIDE&&uid_json.settings.mode_guide.turnoffcallout=="1"){ua=true;break a}if(g_objGS.General.ActiveMode==MODETYPE.TEST&&uid_json.settings.mode_test.turnoffcallout==
"1"){ua=true;break a}if(g_objGS.General.CalloutButtonEnabled==true){var Qa=c.GetTutorImageObject(d.AnnotationControls[L],f.TUTORIMAGE,I);if(Qa==null)throw"objPO_TI = null";if(La.CALLOUT_STICKY==null)La.CALLOUT_STICKY=[];La.CALLOUT_STICKY.push(Qa)}}catch(kb){Pa=false,c.Log("CreateTutorImageObjects",LOG.EXCEPTION,"",kb)}ua=Pa}if(ua==false)throw"Error @ CreateTutorImageObjects";I++;break;case ANNOTATION.CALLOUTTEXTBOX:var Ma;a:{var Va=a,bb=true;try{if(g_objGS.General.ActiveMode==MODETYPE.SHOW&&uid_json.settings.mode_show.turnoffcallout==
"1"){Ma=true;break a}if(g_objGS.General.ActiveMode==MODETYPE.GUIDE&&uid_json.settings.mode_guide.turnoffcallout=="1"){Ma=true;break a}if(g_objGS.General.ActiveMode==MODETYPE.TEST&&uid_json.settings.mode_test.turnoffcallout=="1"){Ma=true;break a}if(g_objGS.General.CalloutButtonEnabled==true){var cb=c.GetCalloutTextboxObject(d.AnnotationControls[L],f.CALLOUTTEXTBOX,I);if(cb==null)throw"objPO_CTB = null";if(Va.CALLOUT_STICKY==null)Va.CALLOUT_STICKY=[];Va.CALLOUT_STICKY.push(cb)}}catch(lb){bb=false,c.Log("CreateCalloutTextboxObjects",
LOG.EXCEPTION,"",lb)}Ma=bb}if(Ma==false)throw"Error @ CreateCalloutTextboxObjects";I++}for(var db in d.EventControls)switch(db.toUpperCase()){case EVENTTYPE.TYPETEXT:var Ia=a,Ea=d.EventControls[db],eb=true;try{var xa=FlyWeight.GetObject(f.TYPETEXT_ANIM);if(xa==null)throw"Error @ FlyWeight.GetObject(FWPOTypes.TYPETEXT_ANIM)";var Ra=Ia.OCR_Blink.Thickness;xa.IsPassword=Ea.IsPassword;xa.Left=Ia.OCR_Blink.Left+Ra;xa.Top=Ia.OCR_Blink.Top+Ra;xa.Width=Ia.OCR_Blink.Width-Ra*2;xa.Height=Ia.OCR_Blink.Height-
Ra*2;xa.FontName=Ea.Font.Name;xa.FontSize=Ea.Font.Size;xa.FontBold=Ea.Font.Bold;xa.FontItalic=Ea.Font.Italic;xa.ForeColor=Ea.ForeColor;xa.BgColor=Ea.BgColor;xa.Text=Ea.Text;if(xa.Load()==false)throw"Error @ Typetext.Load";Ia.TYPETEXT_ANIM=xa}catch(mb){eb=false,c.Log("CreateTypeTextObject",LOG.EXCEPTION,"",mb)}if(eb==false)throw"Error @ CreateTypeTextObject";break;case EVENTTYPE.KEYPRESS:var nb=a,fb=true;try{var Wa=FlyWeight.GetObject(f.KEYPRESS_ANIM);if(Wa==null)throw"Error @ FlyWeight.GetObject(FWPOTypes.KEYPRESS_ANIM)";
if(Wa.Load()==false)throw"Error @ objPOKeyPress.Load";nb.KEYPRESS_ANIM=Wa}catch(ob){fb=false,c.Log("CreateKeyPressObject",LOG.EXCEPTION,"",ob)}if(fb==false)throw"Error @ CreateKeyPressObject";}var gb=true;try{if(d.Type==STEPTYPE.WINDOWACTIVATE)if(d.Question!=null){var Xa=FlyWeight.GetObject(f.QUESTION);if(Xa==null)throw"Error @ FlyWeight.GetObject(FWPOTypes.QUESTION)";a.QUESTION=Xa;Xa.Load(d);a.CONTINUELAYER=null}else{var Ya=FlyWeight.GetObject(f.CONTINUELAYER);if(Ya==null)throw"Error @ FlyWeight.GetObject(FWPOTypes.CONTINUELAYER)";
if(FlyWeight.LoadContinueLayer(Ya,d.StatusBarData,MIQTYPE.NONE)!=true)throw"Error @ FlyWeight.LoadContinueLayer";a.CONTINUELAYER=Ya}}catch(pb){gb=false,c.Log("CreateWindowActivateRelatedObjects",LOG.EXCEPTION,"",pb)}if(gb==false)throw"Error @ CreateWindowActivateRelatedObjects";var hb=true;try{var Sa=FlyWeight.GetObject(f.DELAY);if(Sa==null)throw"Error @ FlyWeight.GetObject(FWPOTypes.DELAY)";var Ba=d.StepTransitionDelay;if(d.AudioTrackStart!=-1&&g_objGS.General.ActiveMode==MODETYPE.SHOW&&g_objGS.General.GlobalAudio==
true)Ba=36E6;else if(Ba==-1){var Ba=uid_json.settings.general.steptransitiondelay,Za=0;if(a.CALLOUT_STICKY!=null){var ib=0,$a=0,jb=false;for(i in a.CALLOUT_STICKY)if(a.CALLOUT_STICKY[i].Type==ANNOTATION.CALLOUT||a.CALLOUT_STICKY[i].Type==ANNOTATION.STICKYNOTE||a.CALLOUT_STICKY[i].Type==ANNOTATION.TUTORIMAGE||a.CALLOUT_STICKY[i].Type==ANNOTATION.CALLOUTTEXTBOX)$a+=a.CALLOUT_STICKY[i].DurationOrg,ib++,a.CALLOUT_STICKY[i].Seq>0&&(jb=true);jb==true?Ba=0:Za=$a>0?$a:Number(ib*uid_json.settings.callout.delay)}Za>
Ba&&(Ba=Za)}Ba<1E3&&(Ba=500);Sa.Duration=Ba;if(Sa.Load()==false)throw"Error @ Delay.Load";a.DELAY=Sa}catch(qb){hb=false,c.Log("CreateStepInterventionDelayObject",LOG.EXCEPTION,"",qb)}if(hb==false)throw"Error @ CreateStepInterventionDelayObject";}catch(rb){g=false,c.Log("CreatePlayableObjects",LOG.EXCEPTION,"",rb)}return g};this.RemoveAudioCommon=function(){var a=true;try{if(c.objLoadPOM_CurStep.Remove(PLAYABLEOBJECTTYPES.AUDIO)==false)throw"objLoadPOM_CurStep.Remove";if(c.objDIFMPOM_CurStep.Remove(PLAYABLEOBJECTTYPES.AUDIO)==
false)throw"objDIFMPOM_CurStep.Remove";}catch(b){a=false,c.Log("RemoveAudioCommon",LOG.EXCEPTION,"",b)}return a};this.RemoveCalloutCommon=function(){var a=true;try{if(c.objDIFMPOM_CurStep.Remove(PLAYABLEOBJECTTYPES.CALLOUTSTICKY)==false)throw"objDIFMPOM_CurStep.Remove 1";if(c.objLoadPOM_CurStep.Remove(PLAYABLEOBJECTTYPES.CALLOUTSTICKY)==false)throw"objDIFMPOM_CurStep.Remove 2";if(c.objDIFMPOM_CurStep.UpdateDelayDuration(c.GetStepDelay(c.objCurrentStep))==false)throw"objDIFMPOM_CurStep.UpdateDelayDuration 1";
if(c.objLoadPOM_CurStep.UpdateDelayDuration(c.GetStepDelay(c.objCurrentStep))==false)throw"objDIFMPOM_CurStep.UpdateDelayDuration 2";}catch(b){a=false,c.Log("RemoveCalloutCommon",LOG.EXCEPTION,"",b)}return a};this.GetStepDelay=function(a){var b=0;try{b=a.StepTransitionDelay>uid_json.settings.general.steptransitiondelay?a.StepTransitionDelay:uid_json.settings.general.steptransitiondelay}catch(e){c.Log("GetStepDelay",LOG.EXCEPTION,"",e)}return b};this.LoadControlRegion=function(a,b,e){var d=true;try{var k=
b.Color;if(uid_json.settings.controlregion.overidecolor==true)switch(e){case ANNOTATION.OUTERREGION:k=uid_json.settings.controlregion.outerregioncolor;break;case ANNOTATION.INNERREGION:k=uid_json.settings.controlregion.innerregioncolor;break;case ANNOTATION.DROPREGION:k=uid_json.settings.controlregion.dropregioncolor}a.Type=b.Shape;a.Left=b.Left;a.Top=b.Top;a.Width=b.Width;a.Height=b.Height;a.Thickness=b.Thickness;a.Color=k;a.Duration=uid_json.settings.controlregion.blinkduration;a.Interval=uid_json.settings.controlregion.blinkinterval;
a.FreeShapeCords=b.Cords;a.MinimumHeight=c.objCurrentStep.Type==STEPTYPE.TYPETEXT?true:false;var o=Number(uid_json.settings.mode_show.outerregionbuffer);o==0&&(o=Number(b.Thickness));a.Buffer=o;if(a.Load()==false)throw"Error @ ControlRegion.Load";}catch(v){d=false,c.Log("LoadControlRegion","",v,LOG.EXCEPTION)}return d};this.FinalizeLoadPOM=function(a,b){var e=true;try{if(a.NAVIGATIONREGIONS!=null){for(var d=a.NAVIGATIONREGIONS,k=0;k<d.length;k++){if(b.Add(d[k])==false)throw"Error @ ME.objLoadPOM_CurStep.Add 1 or 2";
d[k].onNavigationRegionClicked=function(){g_objEpnPlayer.onNavigationRegionClicked(this)}}a.NAVIGATIONREGIONS=null}if(a.STEP_AUDIO!=null&&a.CONSIDER_AUDIO_IN_POM==true&&b.Add(a.STEP_AUDIO)==false)throw"Error @ ME.objLoadPOM_CurStep.Add Step Audio";if(a.CALLOUT_STICKY!=null){var o=false;uid_json.settings.mode_show.displaycalloutatload==true&&g_objGS.General.ActiveMode==MODETYPE.SHOW?o=true:uid_json.settings.mode_guide.displaycalloutatload==true&&g_objGS.General.ActiveMode==MODETYPE.GUIDE?o=true:uid_json.settings.mode_test.displaycalloutatload==
true&&g_objGS.General.ActiveMode==MODETYPE.TEST&&(o=true);if(o==true){d=a.CALLOUT_STICKY;for(k=0;k<d.length;k++){if(b.Add(d[k])==false)throw"Error @ ME.objLoadPOM_CurStep.Add 1 or 2";d.splice(k,1);k-=1}a.CALLOUT_STICKY=d.length==0?null:d}}if(a.HIGHLIGHTERS!=null){d=a.HIGHLIGHTERS;for(k=0;k<d.length;k++){if(b.Add(d[k])==false)throw"Error @ ME.objLoadPOM_CurStep.Add 1 or 2";d.splice(k,1);k-=1}a.HIGHLIGHTERS=null}if(a.ROLLOVERNOTES!=null){d=a.ROLLOVERNOTES;for(k=0;k<d.length;k++)if(b.Add(d[k])==false)throw"Error @ ME.objLoadPOM_CurStep.Add 1 or 2";
a.ROLLOVERNOTES=null}}catch(v){e=false,c.Log("FinalizeLoadPOM",LOG.EXCEPTION,"",v)}return e};this.FinalizeDIFMPOM=function(a,b,e){var d=true;try{if(a.SCREEN_VIDEO!=null){if(PlaySeqCreatorScreenVideo.Construct(a,b)==false)throw"Error @ PlaySeqCreatorScreenVideo.Construct";}else switch(e.Type){case STEPTYPE.MOUSE:if(PlaySeqCreatorMouse.Construct(a,b)==false)throw"Error @ PlaySeqCreatorMouse.Construct";break;case STEPTYPE.TYPETEXT:if(PlaySeqCreatorTypetext.Construct(a,b)==false)throw"Error @ PlaySeqCreatorTypetext.Construct";
break;case STEPTYPE.KEYEVENT:if(PlaySeqCreatorKeypress.Construct(a,b)==false)throw"Error @ PlaySeqCreatorKeypress.Construct";break;case STEPTYPE.WINDOWACTIVATE:if(PlaySeqCreatorWindowActivate.Construct(a,b)==false)throw"Error @ PlaySeqCreatorWindowActivate.Construct";}}catch(k){d=false,c.Log("FinalizeDIFMPOM",LOG.EXCEPTION,"",k)}return d};this.InitializeCommon=function(){var a=true;try{if(FlyWeight.GetObject(PLAYABLEOBJECTS.STEPAUDIO)==null)throw"Error @ FlyWeight.GetObject(PLAYABLEOBJECTS.STEPAUDIO)";
}catch(b){a=false,c.Log("InitializeCommon",LOG.EXCEPTION,"",b)}return a};this.LoadCommon=function(a){var b=true;try{c.m_StepIndex=a;if(c.onLoadComplete==null)throw"onLoadComplete is not binded";if(c.onPlayComplete==null)throw"onPlayComplete is not binded";var e=true;try{c.PlayableObjectsList_CurStep.SCREEN_VIDEO!=null&&c.PlayableObjectsList_CurStep.SCREEN_VIDEO.Hide(),c.PlayableObjectsList_CurStep.OCR_Blink=null,c.PlayableObjectsList_CurStep.OCR_NoBlink=null,c.PlayableObjectsList_CurStep.ICR_Blink=
null,c.PlayableObjectsList_CurStep.ICR_NoBlink=null,c.PlayableObjectsList_CurStep.DR_Blink=null,c.PlayableObjectsList_CurStep.DR_NoBlink=null,c.PlayableObjectsList_CurStep.CURSORMOVE_ANIM=null,c.PlayableObjectsList_CurStep.DRAG_ANIM=null,c.PlayableObjectsList_CurStep.CURSORAUDIO_ANIM=null,c.PlayableObjectsList_CurStep.CALLOUT_STICKY=null,c.PlayableObjectsList_CurStep.HIGHLIGHTERS=null,c.PlayableObjectsList_CurStep.EQUIVALENTREGION=null,c.PlayableObjectsList_CurStep.CONFUSIONREGION=null,c.PlayableObjectsList_CurStep.ROLLOVERNOTES=
null,c.PlayableObjectsList_CurStep.CONTINUELAYER=null,c.PlayableObjectsList_CurStep.STEP_AUDIO=null,c.PlayableObjectsList_CurStep.DELAY=null,c.PlayableObjectsList_CurStep.TYPETEXT_ANIM=null,c.PlayableObjectsList_CurStep.KEYPRESS_ANIM=null,c.PlayableObjectsList_CurStep.SCREEN_VIDEO=null,c.PlayableObjectsList_CurStep.CONSIDER_AUDIO_IN_POM=true,c.PlayableObjectsList_CurStep.QUESTION=null}catch(g){e=false,c.Log("ResetObjects_CurStep",LOG.EXCEPTION,"",g)}if(e==false)throw"Error @ ResetObjects_CurStep";
c.objCurrentStep=null;c.objCurrentStep=c.ProcessTaskData.GetStepObject(a);if(c.objCurrentStep==null)throw"ME.objCurrentStep=null";if(c.objLoadPOM_CurStep.Stop()==false)throw"Error @ objLoadPOM_CurStep.Stop";if(c.objDIFMPOM_CurStep.Stop()==false)throw"Error @ objDIFMPOM_CurStep.Stop";if(c.CreatePlayableObjects(c.PlayableObjectsList_CurStep,PLAYABLEOBJECTS,c.objCurrentStep)==false)throw"Error @ CreatePlayableObjects";a=false;if(g_objGS.General.ActiveMode==MODETYPE.SHOW&&c.PlayableObjectsList_CurStep.CALLOUT_STICKY!=
null)for(var k in c.PlayableObjectsList_CurStep.CALLOUT_STICKY)if(c.PlayableObjectsList_CurStep.CALLOUT_STICKY[k].Seq>0||c.PlayableObjectsList_CurStep.CALLOUT_STICKY[k].AudioSrc!=""){a=true;break}if(a==true){c.PlayableObjectsList_CurStep.CALLOUT_STICKY.sort(d);c.Log("LoadCommon",LOG.TRACE,"Callout/Sticky","Sequence");for(x in c.PlayableObjectsList_CurStep.CALLOUT_STICKY)c.Log("LoadCommon",LOG.TRACE,c.PlayableObjectsList_CurStep.CALLOUT_STICKY[x].Seq,c.PlayableObjectsList_CurStep.CALLOUT_STICKY[x].Text);
var o=new clsCalloutStickynoteCollectionPlayer(PLAYABLEOBJECTS.CALLOUTSTICKYCOLLECTION);if(o.Initialize()==false)throw"Error @ objCSNCol.Initialize";o.Objects=c.PlayableObjectsList_CurStep.CALLOUT_STICKY;if(o.Load()==false)throw"Error @ objCSNCol.Load";a=0;for(k in c.PlayableObjectsList_CurStep.CALLOUT_STICKY)a+=c.PlayableObjectsList_CurStep.CALLOUT_STICKY[k].Duration;if(a>0&&(c.PlayableObjectsList_CurStep.DELAY.Duration=200,c.PlayableObjectsList_CurStep.DELAY.Load()==false))throw"Error @ Delay.Load";
c.PlayableObjectsList_CurStep.CALLOUT_STICKY=[];c.PlayableObjectsList_CurStep.CALLOUT_STICKY.push(o)}o=k=false;if(c.PlayableObjectsList_CurStep.STEP_AUDIO!=null)if(g_objGS.General.ActiveMode==MODETYPE.TEST){switch(uid_json.settings.mode_test.audioplayoption){case TESTMODEAUDIOOPTION.BEFORE:c.objCurrentStep.Type==STEPTYPE.WINDOWACTIVATE?o=true:k=true;break;case TESTMODEAUDIOOPTION.AFTER:o=true}if(k==true){var v=FlyWeight.GetObject(PLAYABLEOBJECTS.STEPAUDIO);if(g_objGS.General.ActiveMode==MODETYPE.TEST)v.PlayAsync=
true}}else o=true;c.PlayableObjectsList_CurStep.CONSIDER_AUDIO_IN_POM=k;if(c.FinalizeLoadPOM(c.PlayableObjectsList_CurStep,c.objLoadPOM_CurStep,c.objCurrentStep)==false)throw"Error @ FinalizeLoadPOM";c.PlayableObjectsList_CurStep.CONSIDER_AUDIO_IN_POM=o;if(c.FinalizeDIFMPOM(c.PlayableObjectsList_CurStep,c.objDIFMPOM_CurStep,c.objCurrentStep)==false)throw"Error @ FinalizeDIFMPOM";}catch(p){b=false,c.Log("LoadCommon",LOG.EXCEPTION,"",p)}return b};this.GetCalloutStickyObject=function(a,b,e,d){var k=
null;try{k=FlyWeight.GetObject(b,e);if(k==null)throw" Error @ FlyWeight.GetObject for callout/sticky";k.ZIndex=d;k.Type=a.Type;k.Left=a.Left;k.Top=a.Top;k.Width=a.Width;k.Height=a.Height;k.Orientation=a.Orientation;k.Shape=a.Shape;k.DurationOrg=a.Duration;k.objCRData=a.Region;if(g_objGS.General.ActiveMode==MODETYPE.SHOW){k.Duration=k.DurationOrg;var o=g_GetSuitableMediaForCurrentBrowser(MEDIATYPE.ANNOTATIONAUDIO,a);k.AudioSrc=o!=null?o.Src:""}else k.Duration=0,k.AudioSrc="";k.QSD=a.QSD==1?true:false;
k.Seq=a.Seq;k.ImageKey=a.ImageKey;k.Text=a.Text;k.RolllOverNotes=false;k.AutoAnnotation=a.AutoAnnotation;if(a.RollOverImageIndex!=0)k.RolllOverNotes=true;if(k.Load()==false)throw"Error @ CalloutSticky.Load";}catch(v){k=null,c.Log("GetCalloutStickyObject",LOG.EXCEPTION,"",v)}return k};this.GetNavigationRegionObject=function(a,b,e,d){var k=null;try{k=FlyWeight.GetObject(b,e);if(k==null)throw" Error @ FlyWeight.GetObject for Navigation Region";k.ZIndex=d;k.Type=a.Type;k.Left=a.Left;k.Top=a.Top;k.Width=
a.Width;k.Height=a.Height;k.CaptionText=a.Text;k.BorderColor=a.BorderColor;k.BGColor=a.BGColor;k.GradiantColor=a.Gradient;k.DisabledColor=a.DisabledColor;k.Start=a.Start;k.End=a.End;k.Jump=a.Jump;k.NavRegionId=a.Id;if(k.Load()==false)throw"Error @ clsNavigationRegionObject.Load";}catch(o){k=null,c.Log("GetNavigationRegionObject",LOG.EXCEPTION,"",o)}return k};this.GetTutorImageObject=function(a,b,e){var d=null;try{d=FlyWeight.GetObject(b,e);if(d==null)throw" Error @ FlyWeight.GetObject for tutor image";
d.Left=a.Left;d.Top=a.Top;d.Width=a.Width;d.Height=a.Height;d.Seq=a.Seq;d.ImgSrc=a.Src;d.Duration=a.Duration;d.DurationOrg=a.Duration;if(d.Load()==false)throw"Error @ clsTutorImagePlayer.Load";}catch(k){d=null,c.Log("GetTutorImageObject",LOG.EXCEPTION,"",k)}return d};this.GetCalloutTextboxObject=function(a,b,e){var d=null;try{d=FlyWeight.GetObject(b,e);if(d==null)throw" Error @ FlyWeight.GetObject for tutor image";d.Left=a.Left;d.Top=a.Top;d.Width=a.Width;d.Height=a.Height;d.Seq=a.Seq;d.ImgSrc=a.Src;
d.Duration=a.Duration;d.DurationOrg=a.Duration;d.Text=a.Text;d.Thickness=a.Thickness;d.Color=a.Color;d.BGColor=a.BGColor;d.Transparent=a.Transparent;if(d.Load()==false)throw"Error @ clsCalloutTextboxPlayer.Load";}catch(k){d=null,c.Log("GetCalloutTextboxObject",LOG.EXCEPTION,"",k)}return d};this.GetHighlightRegionObject=function(a,b,e,d){var k=null;try{k=FlyWeight.GetObject(b,e);if(k==null)throw" Error @ FlyWeight.GetObject for HighlightRegion";k.EnableBlink=false;k.ZIndex=d;k.Type=a.Type;k.Left=a.Left;
k.Top=a.Top;k.Width=a.Width;k.Height=a.Height;k.Color=a.Color;if(uid_json.settings.highlighter.overidecolor==true)k.Color=uid_json.settings.highlighter.color;k.Thickness=a.Thickness;k.BackgroundColor=k.Color;k.Opacity=uid_json.settings.highlighter.opacity;if(k.Load()==false)throw"Error @ HighlightRegion.Load";}catch(o){k=null,c.Log("GetHighlightRegionObject",LOG.EXCEPTION,"",o)}return k};this.PauseCommon=function(){var a=true;try{if(g_objGS.General.ActiveMode==MODETYPE.SHOW&&c.objLoadPOM_CurStep.Pause()==
false)throw"Error @ objLoadPOM_CurStep.Pause";if(c.objDIFMPOM_CurStep.Pause()==false)throw"Error @ objDIFMPOM_CurStep.Pause";}catch(b){a=false,c.Log("PauseCommon",LOG.EXCEPTION,"",b)}return a};this.StopCommon=function(){var a=true;try{if(c.objLoadPOM_CurStep.Stop()==false)throw"Error @ objLoadPOM_CurStep.Stop";if(c.objDIFMPOM_CurStep.Stop()==false)throw"Error @ objDIFMPOM_CurStep.Stop";}catch(b){a=false,c.Log("StopCommon",LOG.EXCEPTION,"",b)}return a};this.objPOMPlayer_onPlayComplete_FORDIFM=function(a){try{c.onPlayComplete(a)}catch(b){c.Log("objPOMPlayer_onPlayComplete_FORDIFM",
LOG.EXCEPTION,"",b)}};this.objPOMPlayer_onPlayComplete_FORLOAD=function(a){try{c.onLoadComplete(a)}catch(b){c.Log("ME.objPOMPlayer_onPlayComplete_FORLOAD",LOG.EXCEPTION,"",b)}};this.objPOMPlayer_onLoadComplete_FORLOAD=function(a){try{c.onLoadComplete(a)}catch(b){c.Log("ME.objPOMPlayer_onLoadComplete_FORLOAD",LOG.EXCEPTION,"",b)}}}
function clsGTModeBase(){function d(a,b,e){var d=true;try{b.SCREEN_VIDEO=null;b.DELAY=null;var k=true;try{var o=null;if(uid_json.settings.mode_test.screenvideo===true||uid_json.settings.mode_guide.screenvideo===true)if(o=g_GetSuitableMediaForCurrentBrowser(MEDIATYPE.SCREENVIDEO,e),o!=null){var v=FlyWeight.GetObject(a.SCREENVIDEO);if(v==null)throw"Error @ FlyWeight.GetObject(FWPOTypes.SCREENVIDEO)";if(v.Load(o)==false)throw"Error @ Video.Load";b.SCREEN_VIDEO=v}}catch(p){k=false,c.Log2("clsGTModeBase",
"CreateScreenVideoObject",LOG.EXCEPTION,"",p)}if(k==false)throw"Error @ CreateScreenVideoObject";var q;if(q=b.SCREEN_VIDEO!=null){k=true;try{var E=FlyWeight.GetObject(a.DELAY_SV);if(E==null)throw"Error @ FlyWeight.GetObject(FWPOTypes.DELAY)";var u=e.StepTransitionDelay;if(u==-1)u=uid_json.settings.general.steptransitiondelay;u<1E3&&(u=500);E.Duration=u;if(E.Load()==false)throw"Error @ Delay.Load";b.DELAY=E}catch(B){k=false,c.Log2("clsGTModeBase","CreateDelayObjectForSV",LOG.EXCEPTION,"",B)}q=k==false}if(q)throw"Error @ CreateDelayObjectForSV";
}catch(A){d=false,c.Log2("clsGTModeBase","CreatePlayableObjects_ForSV",LOG.EXCEPTION,"",A)}return d}function b(a,b){var e=true;try{if(a.SCREEN_VIDEO!=null){if(b.Add(a.SCREEN_VIDEO,Array(a.DELAY))==false)throw"Error @ objPOM.Add";if(b.Add(a.DELAY,null)==false)throw"Error @ objPOM.Add";}}catch(d){e=false,c.Log2("clsGTModeBase","FinalizeSVPOM",LOG.EXCEPTION,"",d)}return e}clsModeBase.call(this,"clsGTModeBase");var c=this;this.objLoadPOM_NextStep=new clsPlayableObjectManager("LoadPOM_NextStep");this.objDIFMPOM_NextStep=
new clsPlayableObjectManager("DifmPOM_NextStep");this.objSVPOM_CurStep=new clsPlayableObjectManager("SVPOM_CurStep");this.objSVPOM_NextStep=new clsPlayableObjectManager("SVPOM_NextStep");this.objNextStep=null;this.PlayableObjectsList_NextStep={OCR_Blink:null,OCR_NoBlink:null,ICR_Blink:null,ICR_NoBlink:null,DR_Blink:null,DR_NoBlink:null,CURSORMOVE_ANIM:null,DRAG_ANIM:null,CURSORAUDIO_ANIM:null,CALLOUT_STICKY:null,HIGHLIGHTERS:null,ROLLOVERNOTES:null,CONTINUELAYER:null,STEP_AUDIO:null,DELAY:null,TYPETEXT_ANIM:null,
KEYPRESS_ANIM:null,SCREEN_VIDEO:null,CONSIDER_AUDIO_IN_POM:true,NAVIGATIONREGIONS:null};this.PlayableObjectsList_SV_CurStep={SCREEN_VIDEO:null,DELAY:null};this.PlayableObjectsList_SV_NextStep={SCREEN_VIDEO:null,DELAY:null};this.PlayMode=PLAYMODE.EVENT;var e=this.ResultType=this.Result=false;this.LoadCommonGT=function(a){var f=true;try{c.Result=false;c.ResultType=RESULTTYPE.WRONG;var n=true;try{c.PlayableObjectsList_NextStep.SCREEN_VIDEO!=null&&c.PlayableObjectsList_NextStep.SCREEN_VIDEO.Hide(),c.PlayableObjectsList_NextStep.OCR_Blink=
null,c.PlayableObjectsList_NextStep.OCR_NoBlink=null,c.PlayableObjectsList_NextStep.ICR_Blink=null,c.PlayableObjectsList_NextStep.ICR_NoBlink=null,c.PlayableObjectsList_NextStep.DR_Blink=null,c.PlayableObjectsList_NextStep.DR_NoBlink=null,c.PlayableObjectsList_NextStep.CURSORMOVE_ANIM=null,c.PlayableObjectsList_NextStep.DRAG_ANIM=null,c.PlayableObjectsList_NextStep.CURSORAUDIO_ANIM=null,c.PlayableObjectsList_NextStep.CALLOUT_STICKY=null,c.PlayableObjectsList_NextStep.EQUIVALENTREGION=null,c.PlayableObjectsList_NextStep.CONFUSIONREGION=
null,c.PlayableObjectsList_NextStep.ROLLOVERNOTES=null,c.PlayableObjectsList_NextStep.CONTINUELAYER=null,c.PlayableObjectsList_NextStep.STEP_AUDIO=null,c.PlayableObjectsList_NextStep.DELAY=null,c.PlayableObjectsList_NextStep.TYPETEXT_ANIM=null,c.PlayableObjectsList_NextStep.KEYPRESS_ANIM=null,c.PlayableObjectsList_NextStep.SCREEN_VIDEO=null,c.PlayableObjectsList_NextStep.CONSIDER_AUDIO_IN_POM=true}catch(g){n=false,c.Log2("clsGTModeBase","ResetObjects_NextStep",LOG.EXCEPTION,"",g)}if(n==false)throw"Error @ ResetObjects_NextStep";
if(c.objLoadPOM_NextStep.Stop()==false)throw"Error @ objLoadPOM_NextStep.Stop";if(c.objDIFMPOM_NextStep.Stop()==false)throw"Error @ objDIFMPOM_NextStep.Stop";if(c.objSVPOM_CurStep.Stop()==false)throw"Error @ objDIFMPOM_NextStep.Stop";if(c.objSVPOM_NextStep.Stop()==false)throw"Error @ objDIFMPOM_NextStep.Stop";e=false;switch(g_objGS.General.ActiveMode){case MODETYPE.GUIDE:uid_json.settings.mode_guide.screenvideo===true&&(e=true);break;case MODETYPE.TEST:uid_json.settings.mode_test.screenvideo===true&&
(e=true)}if(e==true){if(c.objSVPOM_CurStep.Stop()==false)throw"Error @ m_objHintPOM_CurStep.Stop";if(c.objSVPOM_NextStep.Stop()==false)throw"Error @ m_objHintPOM_NextStep.Stop";}if(c.LoadCommon(a)==false)throw"Error @ ME.LoadCommon";if(g_objEHS.Hide()==false)throw"Error @ g_objEHS.Hide";c.objNextStep=null;if(c.objCurrentStep.EventControls[EVENTTYPE.TYPETEXT]!=void 0&&c.objCurrentStep.EventControls[EVENTTYPE.TYPETEXT].Rule==TYPETEXT_VALIDATION_RULE.NEXTACTION)c.objNextStep=c.ProcessTaskData.GetStepObject(a+
1);if(e==true){if(d(PLAYABLEOBJECTS,c.PlayableObjectsList_SV_CurStep,c.objCurrentStep)==false)throw"Error @ CreatePlayableObjects_ForHint";if(b(c.PlayableObjectsList_SV_CurStep,c.objSVPOM_CurStep)==false)throw"Error @ FinalizeHintPOM";}if(c.objCurrentStep.Type!=STEPTYPE.WINDOWACTIVATE&&g_objEHS.Load(c.objCurrentStep,c.objNextStep)==false)throw"Error @ g_objEHS.Load";if(c.objNextStep!=null){if(c.CreatePlayableObjects(c.PlayableObjectsList_NextStep,PLAYABLEOBJECTS2,c.objNextStep)==false)throw"Error @ CreatePlayableObjects for NextStep";
a=true;try{var k=FlyWeight.GetObject(PLAYABLEOBJECTS.TYPETEXT_ANIM);if(k==null)throw"Error @ FlyWeight.GetObject(PLAYABLEOBJECTS.TYPETEXT_ANIM)";var o=FlyWeight.GetObject(PLAYABLEOBJECTS2.TYPETEXT_ANIM);if(o==null)throw"Error @ FlyWeight.GetObject(PLAYABLEOBJECTS2.TYPETEXT_ANIM)";o.IsPassword=k.IsPassword;o.Left=k.Left;o.Top=k.Top;o.Width=k.Width;o.Height=k.Height;o.FontName=k.FontName;o.FontSize=k.FontSize;o.FontBold=k.FontBold;o.FontItalic=k.FontItalic;o.ForeColor=k.ForeColor;o.BgColor=k.BgColor;
o.Text=k.Text;o.Animation=false;if(o.Load()==false)throw"Error @ Typetext2.Load";c.PlayableObjectsList_NextStep.TYPETEXT_ANIM=o}catch(v){a=false,c.Log2("clsGTModeBase","CreateTypetextPlayerFromObjStep",LOG.EXCEPTION,"",v)}if(a==false)throw"Error @ CreateTypetextPlayerFromObjStep";k=false;if(c.PlayableObjectsList_NextStep.STEP_AUDIO!=null)if(g_objGS.General.ActiveMode==MODETYPE.TEST)switch(uid_json.settings.mode_test.audioplayoption){case TESTMODEAUDIOOPTION.AFTER:k=true}else k=true;c.PlayableObjectsList_NextStep.CONSIDER_AUDIO_IN_POM=
false;if(c.FinalizeLoadPOM(c.PlayableObjectsList_NextStep,c.objLoadPOM_NextStep,c.objNextStep)==false)throw"Error @ FinalizeLoadPOM";c.PlayableObjectsList_NextStep.CONSIDER_AUDIO_IN_POM=k;if(c.FinalizeDIFMPOM(c.PlayableObjectsList_NextStep,c.objDIFMPOM_NextStep,c.objNextStep)==false)throw"Error @ FinalizeDIFMPOM";if(e==true){if(d(PLAYABLEOBJECTS2,c.PlayableObjectsList_SV_NextStep,c.objNextStep)==false)throw"Error @ CreatePlayableObjects_ForHint 2nd step";if(b(c.PlayableObjectsList_SV_NextStep,c.objSVPOM_NextStep)==
false)throw"Error @ FinalizeHintPOM";}}}catch(p){f=false,c.Log2("clsGTModeBase","LoadCommonGT",LOG.EXCEPTION,"",p)}return f};this.Play=function(){var a=true;try{if(c.onPlayComplete==null)throw"onPlayComplete not binded";if(c.PlayMode==PLAYMODE.AUTOPLAY){if(g_objEHS.Hide()==false)throw"Error @ g_objEHS.Hide";c.objPOMPlayer.Reset();c.objPOMPlayer.onPlayComplete=c.objPOMPlayer_onPlayComplete_FORDIFM;c.objPOMPlayer.Add(c.objDIFMPOM_CurStep);if(c.objPOMPlayer.Play()==false)throw"Error @ ME.objPOMPlayer.Play";
}else if(c.objCurrentStep.Type!=STEPTYPE.WINDOWACTIVATE&&g_objEHS.Show()==false)throw"Error @ g_objEHS.Show";}catch(b){a=false,c.Log2("clsGTModeBase","Play",LOG.EXCEPTION,"",b)}return a};this.Pause=function(){var a=true;try{if(c.PauseCommon()==false)throw"Error @ PauseCommon";if(c.objDIFMPOM_NextStep.Pause()==false)throw"Error @ objDIFMPOM_NextStep.Pause";}catch(b){a=false,c.Log2("clsGTModeBase","Pause",LOG.EXCEPTION,"",b)}return a};this.StopCommonGT=function(){var a=true;try{if(c.StopCommon()==false)throw"Error @ StopCommon";
if(c.objLoadPOM_NextStep.Stop()==false)throw"Error @ objLoadPOM_NextStep.Stop";if(c.objDIFMPOM_NextStep.Stop()==false)throw"Error @ objDIFMPOM_NextStep.Stop";if(c.objSVPOM_CurStep.Stop()==false)throw"Error @ objDIFMPOM_NextStep.Stop";if(c.objSVPOM_NextStep.Stop()==false)throw"Error @ objDIFMPOM_NextStep.Stop";if(g_objEHS!=null&&g_objEHS.Stop()==false)throw"Error @ g_objEHS.Stop";if(g_objTR.HideResultIcon()==false)throw"Error @ g_objTR.HideResultIcon";}catch(b){a=false,c.Log2("clsGTModeBase","StopCommonGT",
LOG.EXCEPTION,"",b)}return a};this.RemoveCallout=function(){var a=true;try{if(c.RemoveCalloutCommon()==false)throw"RemoveCalloutCommon";if(c.RemoveCalloutFromHint!=void 0&&c.RemoveCalloutFromHint()==false)throw"Error @ RemoveCalloutFromHint";if(c.objDIFMPOM_NextStep.Remove(PLAYABLEOBJECTTYPES.CALLOUTSTICKY)==false)throw"objDIFMPOM_CurStep.Remove 1";if(c.objLoadPOM_NextStep.Remove(PLAYABLEOBJECTTYPES.CALLOUTSTICKY)==false)throw"objDIFMPOM_CurStep.Remove 2";if(c.objDIFMPOM_NextStep.UpdateDelayDuration(c.GetStepDelay(c.objCurrentStep))==
false)throw"objDIFMPOM_CurStep.UpdateDelayDuration 1";if(c.objLoadPOM_NextStep.UpdateDelayDuration(c.GetStepDelay(c.objCurrentStep))==false)throw"objDIFMPOM_CurStep.UpdateDelayDuration 2";}catch(b){a=false,c.Log2("clsGTModeBase","RemoveCallout",LOG.EXCEPTION,"",b)}return a};this.DisplayResultIconOnCanvas=function(a,b,e){var d=true;try{var k=false;c.ResultType==RESULTTYPE.CORRECT&&(k=true);a-=g_objTR.ResultIconWidth/2;b-=g_objTR.ResultIconHeight/2;var o=20,v=20;a+32>parseInt(g_objTR.CanvasDIV.style.left)+
parseInt(g_objTR.CanvasDIV.style.width)&&(o=0);b+32>parseInt(g_objTR.CanvasDIV.style.top)+parseInt(g_objTR.CanvasDIV.style.height)&&(v=0);if(e==EVENTTYPE.CLICK||e==EVENTTYPE.DOUBLECLICK||e==EVENTTYPE.EQCLICK||e==EVENTTYPE.EQDOUBLECLICK)a+=o,b+=v;g_objTR.ShowResultIcon(a,b,k)}catch(p){d=false,c.Log2("clsGTModeBase","DisplayResultIconOnCanvas",LOG.EXCEPTION,"",p)}return d};this.TaskAfterLoadCompleted=function(a){var b=true;try{c.onLoadComplete(a)}catch(e){b=false,c.Log2("clsGTModeBase","ME.TaskAfterLoadCompleted",
LOG.EXCEPTION,"",e)}if(b==false)c.onLoadComplete(false)};this.PlayDifmPOMs=function(){var a=true;try{c.objPOMPlayer.Reset();c.objPOMPlayer.onPlayComplete=c.objPOMPlayer_onPlayComplete_FORDIFM;if(c.ResultType==RESULTTYPE.WRONG)c.objPOMPlayer.Add(c.objDIFMPOM_CurStep),c.PlayableObjectsList_SV_CurStep.SCREEN_VIDEO!=null&&c.objPOMPlayer.Add(c.objSVPOM_CurStep),c.objNextStep!=null&&(c.objPOMPlayer.Add(c.objDIFMPOM_NextStep),c.PlayableObjectsList_SV_NextStep.SCREEN_VIDEO!=null&&c.objPOMPlayer.Add(c.objSVPOM_NextStep));
else if(c.ResultType==RESULTTYPE.WRONGSECONDHALF)c.objPOMPlayer.Add(c.objDIFMPOM_NextStep),c.PlayableObjectsList_SV_NextStep.SCREEN_VIDEO!=null&&c.objPOMPlayer.Add(c.objSVPOM_NextStep);else if(c.ResultType==RESULTTYPE.WRONGFIRSTHALF)c.objPOMPlayer.Add(c.objDIFMPOM_CurStep),c.PlayableObjectsList_SV_CurStep.SCREEN_VIDEO!=null&&c.objPOMPlayer.Add(c.objSVPOM_CurStep);else throw"ME.ResultType is wrong";if(c.objPOMPlayer.Play()==false)throw"Error @ ME.objPOMPlayer.Play";}catch(b){a=false,c.Log2("clsGTModeBase",
"PlayDifmPOMs",LOG.EXCEPTION,"",b)}return a};this.PlaySVPOM=function(){var a=true;try{if(c.objPOMPlayer.Reset(),c.objPOMPlayer.onPlayComplete=c.objPOMPlayer_onPlayComplete_FORSV,c.PlayableObjectsList_SV_CurStep.SCREEN_VIDEO!=null&&c.objPOMPlayer.Add(c.objSVPOM_CurStep),c.objNextStep!=null&&c.PlayableObjectsList_SV_NextStep.SCREEN_VIDEO!=null&&c.objPOMPlayer.Add(c.objSVPOM_NextStep),c.objPOMPlayer.Count>0){if(c.objPOMPlayer.Play()==false)throw"Error @ ME.objPOMPlayer.Play";}else c.onPlayComplete(true)}catch(b){a=
false,c.Log2("clsGTModeBase","PlaySVPOM",LOG.EXCEPTION,"",b)}return a};this.objPOMPlayer_onPlayComplete_FORSV=function(a){try{c.onPlayComplete(a)}catch(b){c.Log2("clsGTModeBase","objPOMPlayer_onPlayComplete_FORSV",LOG.EXCEPTION,"",b)}}}
function clsSMHandler(){clsModeBase.call(this,"clsSMHandler");var d=this;this.Name="clsSMHandler";this.Initialize=function(b){var c=true;try{if(d.InitializeCommon(b)==false)throw"Error @ ME.InitializeCommon";}catch(e){c=false,d.Log2("clsSMHandler","Initialize",LOG.EXCEPTION,"",e)}return c};this.Load=function(b){var c=true;try{if(d.LoadCommon(b)==false)throw"Error @ ME.LoadCommon";d.objPOMLoader.Reset();d.objPOMLoader.onLoadComplete=d.objPOMPlayer_onLoadComplete_FORLOAD;d.objPOMLoader.Add(d.objLoadPOM_CurStep);
d.objPOMLoader.Add(d.objDIFMPOM_CurStep);if(d.objPOMLoader.Load()==false)throw"Error @ ME.objPOMLoader.Load";}catch(e){c=false,d.Log2("clsSMHandler","Load",LOG.EXCEPTION,"",e)}return c};this.Play=function(){var b=true;try{if(d.onPlayComplete==null)throw"onPlayComplete not binded";if(d.objLoadPOM_CurStep.PlayState==PLAYSTATE.READY){if(d.objPOMPlayer.Reset(),d.objPOMPlayer.onPlayComplete=d.objPOMPlayer_onPlayComplete_FORLOAD,d.objPOMPlayer.Add(d.objLoadPOM_CurStep),d.objPOMPlayer.Play()==false)throw"Error @ ME.objPOMPlayer.Play";
}else if(d.objLoadPOM_CurStep.PlayState!=PLAYSTATE.PLAYENDED){if(d.objPOMPlayer.Play()==false)throw"Error @ ME.objPOMPlayer.Play";}else if(d.objDIFMPOM_CurStep.PlayState==PLAYSTATE.READY){if(d.objPOMPlayer.Reset(),d.objPOMPlayer.onPlayComplete=d.objPOMPlayer_onPlayComplete_FORDIFM,d.objPOMPlayer.Add(d.objDIFMPOM_CurStep),d.objPOMPlayer.Play()==false)throw"Error @ ME.objPOMPlayer.Play";}else if(d.objDIFMPOM_CurStep.PlayState!=PLAYSTATE.PLAYENDED&&d.objPOMPlayer.Play()==false)throw"Error @ ME.objPOMPlayer.Play";
}catch(c){b=false,d.Log2("clsSMHandler","Play",LOG.EXCEPTION,"",c)}return b};this.Pause=function(){var b=true;try{if(d.PauseCommon()==false)throw"Error @ PauseCommon";}catch(c){b=false,d.Log2("clsSMHandler","Pause",LOG.EXCEPTION,"",c)}return b};this.Stop=function(){var b=true;try{if(d.StopCommon()==false)throw"Error @ StopCommon";}catch(c){b=false,d.Log2("clsSMHandler","Stop",LOG.EXCEPTION,"",c)}return b};this.RemoveCallout=function(){var b=true;try{if(d.RemoveCalloutCommon()==false)throw"RemoveCalloutCommon";
}catch(c){b=false,d.Log2("clsSMHandler","RemoveCallout",LOG.EXCEPTION,"",c)}return b};this.RemoveAudio=function(){var b=true;try{if(d.RemoveAudioCommon()==false)throw"RemoveCalloutCommon";}catch(c){b=false,d.Log2("clsSMHandler","RemoveAudio",LOG.EXCEPTION,"",c)}return b};this.objPOMPlayer_onPlayComplete_FORLOAD=function(b){try{if(b==true&&(d.objPOMPlayer.Reset(),d.objPOMPlayer.onPlayComplete=d.objPOMPlayer_onPlayComplete_FORDIFM,d.objPOMPlayer.Add(d.objDIFMPOM_CurStep),d.objPOMPlayer.Play()==false))throw"Error @ ME.objPOMPlayer.Play";
}catch(c){d.Log2("clsSMHandler","ME.objPOMLoader_onLoadComplete",LOG.EXCEPTION,"",c)}}}
clsGMHandler=function(){function d(a,c,e,d){var f=true;try{c.OCR_Blink=null;c.ICR_Blink=null;c.DR_Blink=null;c.CALLOUT_STICKY=null;c.DELAY=null;var g=1,k=true,n;for(n in e.EventControls)if(n.toUpperCase()==EVENTTYPE.KEYPRESS){k=false;break}for(var p in e.AnnotationControls)switch(e.AnnotationControls[p].Type.toUpperCase()){case ANNOTATION.OUTERREGION:var u;if(u=k==true){n=c;var q=e.AnnotationControls[p],E=true;try{n.OCR_Blink=FlyWeight.GetObject(a.OCR_BLINK_HINT);n.OCR_Blink.HideOnPlayComplete=true;
n.OCR_Blink.EnableBlink=true;n.OCR_Blink.Rewind=true;n.OCR_Blink.CaptionText="";if(n.DR_Blink!=null)n.OCR_Blink.CaptionText=g_objGS.GetDragFromText();if(o.LoadControlRegion(n.OCR_Blink,q,ANNOTATION.OUTERREGION)==false)throw"Error @ LoadControlRegion";}catch(v){E=false,o.Log2("clsGMHandler","CreateOuterControlRegionObject_Hint",LOG.EXCEPTION,"",v)}u=E==false}if(u)throw"Error @ CreateOuterControlRegionObject_Hint";break;case ANNOTATION.INNERREGION:var F;if(F=k==true){n=c;var T=e.AnnotationControls[p],
E=true;try{if(n.ICR_Blink=FlyWeight.GetObject(a.ICR_BLINK_HINT),n.ICR_Blink.HideOnPlayComplete=true,n.ICR_Blink.EnableBlink=true,n.ICR_Blink.Rewind=true,n.ICR_Blink.CaptionText="",o.LoadControlRegion(n.ICR_Blink,T,ANNOTATION.INNERREGION)==false)throw"Error @ LoadControlRegion";}catch(S){E=false,o.Log2("clsGMHandler","CreateInnerControlRegionObject_Hint",LOG.EXCEPTION,"",S)}F=E==false}if(F)throw"Error @ CreateInnerControlRegionObject_Hint";break;case ANNOTATION.DROPREGION:var O;if(O=k==true){n=c;var P=
e.AnnotationControls[p],E=true;try{n.DR_Blink=FlyWeight.GetObject(a.DR_BLINK_HINT);n.DR_Blink.HideOnPlayComplete=true;n.DR_Blink.EnableBlink=true;n.DR_Blink.Rewind=true;n.DR_Blink.CaptionText=g_objGS.GetDragToText();if(o.LoadControlRegion(n.DR_Blink,P,ANNOTATION.DROPREGION)!=true)throw"Error @ LoadControlRegion ";if(n.OCR_Blink!=null)n.OCR_Blink.CaptionText=g_objGS.GetDragFromText()}catch(z){E=false,o.Log2("clsGMHandler","CreateDragRelatedObjects_Hint",LOG.EXCEPTION,"",z)}O=E==false}if(O)throw"Error @ CreateDragRelatedObjects_Hint";
break;case ANNOTATION.CALLOUT:if(b(a,c,e.AnnotationControls[p],g)==false)throw"Error @ CreateCalloutStickyObjects";g++;break;case ANNOTATION.STICKYNOTE:if(b(a,c,e.AnnotationControls[p],g)==false)throw"Error @ CreateCalloutStickyObjects";g++}if(c.CALLOUT_STICKY!=null){var X=Number(d.DELAY.Duration),Z=FlyWeight.GetObject(a.DELAY_HINT);if(Z==null)throw"Error @ FlyWeight.GetObject(POTytpes.DELAY_HINT)";Z.Duration=X;Z.Rewind=true;if(Z.Load()==false)throw"Error @ Delay.Load";c.DELAY=Z}}catch(Y){f=false,
o.Log2("clsGMHandler","CreatePlayableObjects_ForHint",LOG.EXCEPTION,"",Y)}return f}function b(a,b,c,e){var d=true;try{if(g_objGS.General.CalloutButtonEnabled==true&&uid_json.settings.mode_guide.displaycalloutatload==false){var f=o.GetCalloutStickyObject(c,a.CALLOUTSTICKYNOTE_HINT,e);if(f==null)throw"objPO_CS = null";f.Rewind=true;if(b.CALLOUT_STICKY==null)b.CALLOUT_STICKY=[];b.CALLOUT_STICKY.push(f)}}catch(g){d=false,o.Log2("clsGMHandler","CreateCalloutStickyObjects_Hint",LOG.EXCEPTION,"",g)}return d}
function c(a,b){var c=true;try{if(a.OCR_Blink!=null&&b.Add(a.OCR_Blink)==false)throw"Error @ objPOM.Add";if(a.ICR_Blink!=null&&b.Add(a.ICR_Blink)==false)throw"Error @ objPOM.Add";if(a.DR_Blink!=null&&b.Add(a.DR_Blink)==false)throw"Error @ objPOM.Add";if(a.CALLOUT_STICKY!=null){if(b.AddObjects(a.CALLOUT_STICKY)==false)throw"Error @ objPOM.Add CALLOUT_STICKY";if(b.Add(a.DELAY)==false)throw"Error @ objPOM.Add DELAY";}}catch(e){c=false,o.Log2("clsGMHandler","FinalizeHintPOM",LOG.EXCEPTION,"",e)}return c}
function e(){try{if(o.Result=true,o.PlaySVPOM()==false)throw"Error @ ME.PlaySVPOM";}catch(a){o.Log2("clsGMHandler","g_objTR_onResultIconDisplayed",LOG.EXCEPTION,"",a),o.onPlayComplete(false)}}function a(){try{if(g_objTR.SetAudioAnimation(false)==false)throw"Error @ g_objTR.SetAudioAnimation";if(q.Stop()==false)throw"Error @ m_objFeedbackPOM.Stop";if(g_objTR.HideFeedback()==false)throw"Error @ g_objTR.HideFeedback";if(g_objTracker.Engine.AddFeedback(FEEDBACKTYPE.TRY)==false)throw"Error @ g_objTracker.AddFeedback";
if(g_objEHS.Show()==false)throw"Error @ g_objEHS.Show";}catch(a){o.Log2("clsGMHandler","g_objTR_onTryRequested",LOG.EXCEPTION,"",a)}}function f(){try{if(g_objTR.SetAudioAnimation(false)==false)throw"Error @ g_objTR.SetAudioAnimation";if(q.Stop()==false)throw"Error @ m_objFeedbackPOM.Stop";if(g_objTR.HideFeedback()==false)throw"Error @ g_objTR.HideFeedback";if(g_objTracker.Engine.AddFeedback(FEEDBACKTYPE.HINT)==false)throw"Error @ g_objTracker.AddFeedback";if(uid_json.settings.stepimage.imageresizeoption===
IMAGERESIZE.FULLIMAGE&&g_objTR.ScrollCanvasToOriginalPosition()==false)throw"Error @ g_objTR.ScrollCanvasToOriginalPosition";o.objPOMPlayer.Reset();o.objPOMPlayer.onPlayComplete=o.objPOMPlayer_onPlayComplete_FORHINT;if(o.ResultType==RESULTTYPE.WRONG||o.ResultType==RESULTTYPE.WRONGFIRSTHALF)o.objPOMPlayer.Add(v);else if(o.ResultType==RESULTTYPE.WRONGSECONDHALF)o.objPOMPlayer.Add(p);else throw"ME.ResultType is wrong";if(o.objPOMPlayer.Play()==false)throw"Error @ ME.objPOMPlayer.Play";}catch(a){o.Log2("clsGMHandler",
"g_objTR_onHintRequested",LOG.EXCEPTION,"",a)}}function n(){try{if(o.objDIFMPOM_NextStep!=null&&o.ResultType!=RESULTTYPE.WRONGSECONDHALF&&o.objDIFMPOM_NextStep.Remove(PLAYABLEOBJECTTYPES.TYPETEXT)==false)throw"Error @ ME.objDIFMPOM_NextStep.Remove";if(g_objTR.SetAudioAnimation(false)==false)throw"Error @ g_objTR.SetAudioAnimation";if(q.Stop()==false)throw"Error @ m_objFeedbackPOM.Stop";if(g_objTR.HideFeedback()==false)throw"Error @ g_objTR.HideFeedback";if(g_objTracker.Engine.AddFeedback(FEEDBACKTYPE.DIFM)==
false)throw"Error @ g_objTracker.AddFeedback";if(uid_json.settings.stepimage.imageresizeoption===IMAGERESIZE.FULLIMAGE&&g_objTR.ScrollCanvasToOriginalPosition()==false)throw"Error @ g_objTR.ScrollCanvasToOriginalPosition";if(o.PlayDifmPOMs()==false)throw"Error @ ME.PlayDifmPOMs";}catch(a){o.Log2("clsGMHandler","g_objTR_onDifmRequested",LOG.EXCEPTION,"",a)}}function g(a){try{if(a==false)throw"Error @ m_objLoadFdbkPOM_onLoadComplete";if(q.Play()==false)throw"Error @ m_objFeedbackPOM.Play";}catch(b){o.Log2("clsGMHandler",
"m_objLoadFdbkPOM_onLoadComplete",LOG.EXCEPTION,"",b)}}function k(a){try{if(a==false)throw"Error @ m_objLoadFdbkPOM_onPlayComplete";}catch(b){o.Log2("clsGMHandler","m_objLoadFdbkPOM_onPlayComplete",LOG.EXCEPTION,"",b)}}clsGTModeBase.call(this,"clsGMHandler");var o=this,v=new clsPlayableObjectManager("HintPOM_CurStep"),p=new clsPlayableObjectManager("HintPOM_NextStep"),q=new clsPlayableObjectManager("FeedbackPOM"),E={OCR_Blink:null,ICR_Blink:null,DR_Blink:null,CALLOUT_STICKY:null,SCREEN_VIDEO:null,
DELAY:null},u={OCR_Blink:null,ICR_Blink:null,DR_Blink:null,CALLOUT_STICKY:null,SCREEN_VIDEO:null,DELAY:null};this.Name="clsGMHandler";this.Initialize=function(){var b=true;try{if(o.InitializeCommon()==false)throw"Error @ ME.InitializeCommon";g_objTR.onTryRequested=a;g_objTR.onHintRequested=f;g_objTR.onDifmRequested=n;if(g_objTR.BindFeedbackEvents()==false)throw"Error @ g_objTR.BindFeedbackEvents";q.onLoadComplete=g;q.onPlayComplete=k;v.Rewind=true;p.Rewind=true}catch(c){b=false,o.Log2("clsGMHandler",
"Initialize",LOG.EXCEPTION,"",c)}return b};this.Load=function(a){var b=true;try{if(g_objEHS==null){if(g_objEHS=new clsEventHandlingSystem,g_objEHS.onEventPerformed=o.objEHS_onEventPerformed,g_objEHS.onError=o.objEHS_onError,g_objEHS.Initialize()==false)throw"Error @ ME.objEHS.Initialize";}else g_objEHS.onEventPerformed=o.objEHS_onEventPerformed,g_objEHS.onError=o.objEHS_onError;if(v.Stop()==false)throw"Error @ m_objHintPOM_CurStep.Stop";if(p.Stop()==false)throw"Error @ m_objHintPOM_NextStep.Stop";
if(o.LoadCommonGT(a)==false)throw"Error @ ME>LoadCommonGT";if(d(PLAYABLEOBJECTS,E,o.objCurrentStep,o.PlayableObjectsList_CurStep)==false)throw"Error @ CreatePlayableObjects_ForHint";if(c(E,v)==false)throw"Error @ FinalizeHintPOM";if(o.objNextStep!=null){if(d(PLAYABLEOBJECTS2,u,o.objNextStep,o.PlayableObjectsList_NextStep)==false)throw"Error @ CreatePlayableObjects_ForHint 2nd step";if(c(u,p)==false)throw"Error @ FinalizeHintPOM";}o.objPOMLoader.Reset();o.objPOMLoader.onLoadComplete=o.objPOMLoader_onLoadComplete;
o.objPOMLoader.Add(o.objLoadPOM_CurStep);o.objPOMLoader.Add(o.objDIFMPOM_CurStep);o.objPOMLoader.Add(v);o.PlayableObjectsList_SV_CurStep!=null&&o.objPOMLoader.Add(o.objSVPOM_CurStep);o.objNextStep!=null&&(o.objPOMLoader.Add(o.objLoadPOM_NextStep),o.objPOMLoader.Add(o.objDIFMPOM_NextStep),o.objPOMLoader.Add(p),o.PlayableObjectsList_SV_NextStep!=null&&o.objPOMLoader.Add(o.objSVPOM_NextStep));if(o.objPOMLoader.Load()==false)throw"Error @ ME.objPOMLoader.Load";}catch(e){b=false,o.Log2("clsGMHandler",
"Load",LOG.EXCEPTION,"",e)}return b};this.RemoveAudio=function(){var a=true;try{if(o.RemoveAudioCommon()==false)throw"RemoveCalloutCommon";if(o.objDIFMPOM_NextStep.Remove(PLAYABLEOBJECTTYPES.AUDIO)==false)throw"objDIFMPOM_CurStep.Remove";if(q.Remove(PLAYABLEOBJECTTYPES.AUDIO)==false)throw"objDIFMPOM_CurStep.Remove";}catch(b){a=false,o.Log2("clsGMHandler","RemoveAudio",LOG.EXCEPTION,"",b)}return a};this.RemoveCalloutFromHint=function(){try{if(v.Remove(PLAYABLEOBJECTTYPES.CALLOUTSTICKY)==false)throw"m_objHintPOM_CurStep.Remove 1";
if(p.Remove(PLAYABLEOBJECTTYPES.CALLOUTSTICKY)==false)throw"m_objHintPOM_NextStep.Remove 2";}catch(a){o.Log2("clsGMHandler","RemoveCalloutFromHint",LOG.EXCEPTION,"",a)}};this.objEHS_onEventPerformed=function(a){try{var b=g_objEHS.X,c=g_objEHS.Y;o.ResultType=a;g_objTR.onResultIconDisplayed=o.ResultType!=RESULTTYPE.CORRECT?null:e;if(g_objTR.BindResultEvents()==false)throw"Error @ g_objTR.BindResultEvents";if(a==RESULTTYPE.CORRECT){if(o.DisplayResultIconOnCanvas(b,c,g_objEHS.PerformedEventType)==false)throw"Error @ DisplayResultIconOnCanvas";
}else{b=null;switch(a){case RESULTTYPE.WRONG:b=o.objCurrentStep;break;case RESULTTYPE.WRONGFIRSTHALF:b=o.objCurrentStep;break;case RESULTTYPE.WRONGSECONDHALF:b=o.objNextStep}a="";a=messages_json.psim.feedback!=void 0?messages_json.psim.feedback.body.text:messages_json.psim.canvas.feedback.body.text;if(g_objEHS.ConfusionText!="")a=g_objEHS.ConfusionText;if(g_objGS.General.AudioButtonEnabled==true){var d=g_GetSuitableMediaForCurrentBrowser(MEDIATYPE.FEEDBACKAUDIO,b);if(d!=null){var f=FlyWeight.GetObject(PLAYABLEOBJECTS.FEEDBACKAUDIO);
if(f==null)throw"Error @ FlyWeight.GetObject(PLAYABLEOBJECTS.FEEDBACKAUDIO)";if(f.Load(d.Src)==false)throw"Error @ Feedback Audio.Load";}if(f!=null&&q.Add(f,null)==false)throw"Error @ m_objHomePOM.Add";}g_objTR.ShowFeedback(d,a);if(q.Load()==false)throw"Error @ m_objFeedbackPOM.Load";}}catch(g){o.Log2("clsGMHandler","objEHS_onEventPerformed",LOG.EXCEPTION,"",g),o.onPlayComplete(false)}};this.objEHS_onError=function(){try{o.onPlayComplete(false)}catch(a){o.Log2("clsGMHandler","g_objEHS_onError",LOG.EXCEPTION,
"",a)}};this.objPOMPlayer_onPlayComplete_FORHINT=function(){try{if(o.ResultType==RESULTTYPE.WRONG||o.ResultType==RESULTTYPE.WRONGFIRSTHALF){if(v.Hide()==false)throw"Error @ m_objHintPOM_CurStep.Hide";}else if(o.ResultType==RESULTTYPE.WRONGSECONDHALF){if(p.Hide()==false)throw"Error @ m_objHintPOM_NextStep.Hide";}else throw"ME.ResultType is wrong";if(g_objEHS.Show()==false)throw"Error @ g_objEHS.Show";}catch(a){o.Log2("clsGMHandler","objPOMPlayer_onPlayComplete_FORHINT",LOG.EXCEPTION,"",a)}};this.Stop=
function(){var a=true;try{if(o.StopCommonGT()==false)throw"Error @ ME.StopCommonGT";if(v.Stop()==false)throw"Error @ m_objHintPOM_CurStep.Stop";if(p.Stop()==false)throw"Error @ m_objHintPOM_NextStep.Stop";if(q.Stop()==false)throw"Error @ m_objFeedbackPOM.Stop";}catch(b){a=false,o.Log2("clsGMHandler","Stop",LOG.EXCEPTION,"",b)}return a};this.objPOMLoader_onLoadComplete=function(a){var b=true;try{if(o.objPOMLoader.onLoadComplete=null,a==true&&(o.objPOMPlayer.Reset(),o.objPOMPlayer.onPlayComplete=o.objPOMPlayer_onPlayComplete_FORLOAD,
o.objPOMPlayer.Add(o.objLoadPOM_CurStep),o.objNextStep!=null&&o.objPOMPlayer.Add(o.objLoadPOM_NextStep),o.objPOMPlayer.Play()==false))throw"Error @ ME.objPOMPlayer.Play";}catch(c){b=false,o.Log2("clsGMHandler","ME.objPOMLoader_onLoadComplete",LOG.EXCEPTION,"",c)}try{if(b==false)o.onLoadComplete(false)}catch(e){o.Log2("clsGMHandler","ME.objPOMLoader_onLoadComplete",LOG.EXCEPTION,"2",e)}}};
function clsTMHandler(){function d(){try{if(b()==false)throw"Error @ FinalTask";}catch(a){c.Log2("clsTMHandler","g_objTR_onResultIconDisplayed",LOG.EXCEPTION,"",a),c.onPlayComplete(false)}}function b(){var a=true;try{if(c.ResultType==RESULTTYPE.CORRECT){if(c.Result=true,c.PlaySVPOM()==false)throw"Error @ ME.PlaySVPOM";}else{if(uid_json.settings.stepimage.imageresizeoption==IMAGERESIZE.FULLIMAGE&&g_objTR.ScrollCanvasToOriginalPosition()==false)throw"Error @ g_objTR.ScrollCanvasToOriginalPosition";
if(c.PlayDifmPOMs()==false)throw"Error @ ME.PlayDifmPOMs";}}catch(b){a=false,c.Log2("clsTMHandler","FinalTask",LOG.EXCEPTION,"",b)}return a}clsGTModeBase.call(this,"clsTMHandler");var c=this;this.Name="clsTMHandler";var e=0,a=0;this.Initialize=function(){var a=true;try{if(c.InitializeCommon()==false)throw"Error @ ME.InitializeCommon";}catch(b){a=false,c.Log2("clsTMHandler","Initialize",LOG.EXCEPTION,"",b)}return a};this.Load=function(b){var d=true;try{if(g_objEHS==null){if(g_objEHS=new clsEventHandlingSystem,
g_objEHS.onEventPerformed=c.objEHS_onEventPerformed,g_objEHS.onError=c.objEHS_onError,g_objEHS.Initialize()==false)throw"Error @ ME.objEHS.Initialize";}else g_objEHS.onEventPerformed=c.objEHS_onEventPerformed,g_objEHS.onError=c.objEHS_onError;if(c.LoadCommonGT(b)==false)throw"Error @ ME>LoadCommonGT";c.objPOMLoader.Reset();c.objPOMLoader.onLoadComplete=c.objPOMLoader_onLoadComplete;c.objPOMLoader.Add(c.objLoadPOM_CurStep);c.objPOMLoader.Add(c.objDIFMPOM_CurStep);c.PlayableObjectsList_SV_CurStep!=
null&&c.objPOMLoader.Add(c.objSVPOM_CurStep);c.objNextStep!=null&&(c.objPOMLoader.Add(c.objLoadPOM_NextStep),c.objPOMLoader.Add(c.objDIFMPOM_NextStep),c.PlayableObjectsList_SV_NextStep!=null&&c.objPOMLoader.Add(c.objSVPOM_NextStep));if(c.objPOMLoader.Load()==false)throw"Error @ ME.objPOMLoader.Load";a=0;e=1;g_objGS.General.ActiveMode==MODETYPE.TEST&&uid_json.settings.mode_test.acceptwrongeventcount!=void 0&&(e=Number(uid_json.settings.mode_test.acceptwrongeventcount))}catch(g){d=false,c.Log2("clsTMHandler",
"Load",LOG.EXCEPTION,"",g)}return d};this.Stop=function(){var a=true;try{if(c.StopCommonGT()==false)throw"Error @ ME.StopCommonGT";}catch(b){a=false,c.Log2("clsTMHandler","Stop",LOG.EXCEPTION,"",b)}return a};this.objEHS_onEventPerformed=function(f){try{if(a++,f!=RESULTTYPE.CORRECT&&a<e){var n=g_objEHS.GetText();if(g_objEHS.Load(c.objCurrentStep,c.objNextStep)==false)throw"Error @ g_objEHS.Load";g_objEHS.SetText(n);if(g_objEHS.Show()==false)throw"Error @ g_objEHS.Show";}else{if(c.objLoadPOM_CurStep.Remove(PLAYABLEOBJECTTYPES.AUDIO)==
false)throw"objLoadPOM_CurStep.Remove";var g=g_objEHS.X,k=g_objEHS.Y;c.ResultType=f;switch(c.ResultType){case RESULTTYPE.WRONG:c.objActiveDIFMPOM=c.objDIFMPOM_CurStep;break;case RESULTTYPE.WRONGFIRSTHALF:c.objActiveDIFMPOM=c.objDIFMPOM_CurStep;break;case RESULTTYPE.WRONGSECONDHALF:c.objActiveDIFMPOM=c.objDIFMPOM_NextStep}if(c.objDIFMPOM_NextStep!=null&&c.ResultType!=RESULTTYPE.WRONGSECONDHALF&&c.objDIFMPOM_NextStep.Remove(PLAYABLEOBJECTTYPES.TYPETEXT)==false)throw"Error @ ME.objDIFMPOM_NextStep.Remove";
g_objTR.onResultIconDisplayed=c.ResultType!=RESULTTYPE.CORRECT?null:d;if(g_objTR.BindResultEvents()==false)throw"Error @ g_objTR.BindResultEvents";if(c.DisplayResultIconOnCanvas(g,k,g_objEHS.PerformedEventType)==false)throw"Error @ DisplayResultIconOnCanvas";if(c.ResultType!=RESULTTYPE.CORRECT&&b()==false)throw"Error @ FinalTask";}}catch(o){c.Log2("clsTMHandler","objEHS_onEventPerformed",LOG.EXCEPTION,"",o),c.onPlayComplete(false)}};this.objEHS_onError=function(){try{c.onPlayComplete(false)}catch(a){c.Log2("clsTMHandler",
"g_objEHS_onError",LOG.EXCEPTION,"",a)}};this.objPOMLoader_onLoadComplete=function(a){var b=true;try{if(c.objPOMLoader.onLoadComplete=null,a==true&&(c.objPOMPlayer.Reset(),c.objPOMPlayer.onPlayComplete=c.objPOMPlayer_onPlayComplete_FORLOAD,c.objPOMPlayer.Add(c.objLoadPOM_CurStep),c.objNextStep==null&&c.objPOMPlayer.Add(c.objLoadPOM_NextStep),c.objPOMPlayer.Play()==false))throw"Error @ ME.objPOMPlayer.Play";}catch(e){b=false,c.Log2("clsTMHandler","ME.objPOMLoader_onLoadComplete",LOG.EXCEPTION,"",e)}try{b==
false&&TaskAfterLoadCompleted(false)}catch(d){c.Log2("clsTMHandler","ME.objPOMLoader_onLoadComplete",LOG.EXCEPTION,"2",d)}};this.RemoveAudio=function(){var a=true;try{if(c.RemoveAudioCommon()==false)throw"RemoveCalloutCommon";if(c.objDIFMPOM_NextStep.Remove(PLAYABLEOBJECTTYPES.AUDIO)==false)throw"objDIFMPOM_CurStep.Remove";}catch(b){a=false,c.Log2("clsTMHandler","RemoveAudio",LOG.EXCEPTION,"",b)}return a}}
function clsMIQMBase(){clsPlayerBase.call(this,"clsMIQMBase");var d=this;this.objDIFMPOM=new clsPlayableObjectManager("DifmPOM");this.Initialize=function(){var b=true;try{if(d.Initialized!=PLAYSTATE.INITIALIZED)this.objDIFMPOM.onLoadComplete=d.DIFMPOM_onLoadComplete,this.objDIFMPOM.onPlayComplete=d.DIFMPOM_onPlayComplete}catch(c){b=false,d.Log("Initialize",LOG.EXCEPTION,"",c)}return b};this.LoadStatusBarObject=function(b,c){var e=true;try{var a=FlyWeight.GetObject(PLAYABLEOBJECTS.CONTINUELAYER);if(a==
null)throw"objContinuePlayer= null, not in FlyWeight ?";if(FlyWeight.LoadContinueLayer(a,b,c)==false)throw"Error @ FlyWeight.LoadContinueLayer";}catch(f){e=false,d.Log("LoadStatusBarObject",LOG.EXCEPTION,"",f)}return e};this.DIFMPOM_onLoadComplete=function(b){try{d.onLoadComplete(b)}catch(c){d.Log("DIFMPOM_onLoadComplete",LOG.EXCEPTION,"",c)}};this.DIFMPOM_onPlayComplete=function(b){try{d.onPlayComplete(b)}catch(c){d.Log("DIFMPOM_onPlayComplete",LOG.EXCEPTION,"",c)}};this.Play=function(){var b=true;
try{if(d.onPlayComplete==null)throw"onPlayComplete is not binded";if(g_objTR.StatusBar.SetMessage("")==false)throw"Error @ g_objTR.StatusBar.SetMessage";if(d.objDIFMPOM.POCount>0&&d.objDIFMPOM.Play()==false)throw"Error @ objDIFMPOM.Play";}catch(c){b=false,d.Log("Play",LOG.EXCEPTION,"",c)}return b};this.Pause=function(){var b=true;try{if(d.objDIFMPOM.Pause()==false)throw"Error @ objDIFMPOM.Pause";}catch(c){b=false,d.Log("Pause",LOG.EXCEPTION,"",c)}return b};this.Stop=function(){var b=true;try{if(d.objDIFMPOM.Stop()==
false)throw"Error @ objDIFMPOM.Stop";if(g_objTR.ClearMIQContent()==false)throw"Error @ g_objTR.ClearMIQContent";}catch(c){b=false,d.Log("Stop",LOG.EXCEPTION,"",c)}return b}}
clsInfoStepPlayer=function(){function d(){var b=true;try{f=messages_json.psim.statustext!=void 0?messages_json.psim.statustext:messages_json.psim.canvas.statustext;g_objGS.General.Busy=true;g_objTR.SetBusyFlag(true);if(e.objDIFMPOM.Stop()==false)throw"Error @ objDIFMPOM.Stop";a=m_objStep.InfoStepThemeID;var c=false,d="",n;for(n in m_objStep.MediaFiles){var E=m_objStep.MediaFiles[n];if(E.MediaType==MEDIATYPE.EXTNVIDEO){c=true;d=E.Src;break}}if(c==true){var u=g_GetSuitableMediaForCurrentBrowser(MEDIATYPE.EXTNVIDEO,
m_objStep);if(u!=null)d=u.Src;var c="",B=parseInt(g_objTR.MIQ.FWInfo.ContentBody.style.width)-70+"px",A=parseInt(g_objTR.MIQ.FWInfo.ContentBody.style.height)-70+"px";BROWSER.LEGACY==true?(n=[],n.push("<br/><div style='text-align:center'><br></br>"),n.push("<OBJECT id='wmp7player' width='"+B+"' height='"+A+"' style='display:inline'"),n.push("classid='clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6'>"),n.push("<PARAM NAME='URL' VALUE='"+d+"'>"),n.push("<PARAM NAME='rate' VALUE='1'>"),n.push("<PARAM NAME='balance' VALUE='1'>"),
n.push("<PARAM NAME='currentPosition' VALUE='0'>"),n.push("<PARAM NAME='AutoRewind' VALUE='false'>"),n.push("<PARAM NAME='defaultFrame' VALUE='1'>"),n.push("<PARAM NAME='playCount' VALUE='1'>"),n.push("<PARAM NAME='autoStart' VALUE='-1'>"),n.push("<PARAM NAME='currentMarker' VALUE='1'>"),n.push("<PARAM NAME='invokeURLs' VALUE='-1'>"),n.push("<PARAM NAME='baseURL' VALUE=''>"),n.push("<PARAM NAME='mute' VALUE='0'>"),n.push("<PARAM NAME='uiMode' VALUE='full'>"),n.push("<PARAM NAME='stretchToFit' VALUE='-1'>"),
n.push("<PARAM NAME='windowlessVideo' VALUE='0'>"),n.push("<PARAM NAME='enabled' VALUE='-1'>"),n.push("<PARAM NAME='enableContextMenu' VALUE='-1'>"),n.push("<PARAM NAME='fullScreen' VALUE='0'>"),n.push("<PARAM NAME='SAMIStyle' VALUE=''>"),n.push("<PARAM NAME='SAMILang' VALUE=''>"),n.push("<PARAM NAME='SAMIFilename' VALUE=''>"),n.push("<PARAM NAME='captioningID' VALUE=''>"),n.push("<PARAM NAME='enableErrorDialogs' VALUE='0'>"),n.push("<PARAM NAME='_cx' VALUE='12065'>"),n.push("<PARAM NAME='_cy' VALUE='11007'>"),
n.push("</OBJECT>"),n.push("</div>"),c=n.join("")):(c="<br/><div style='text-align:center'><br><video style='width:"+B+";height:"+A+";' autoplay controls='controls' >",c+="<source src='"+d+"' ></source>",c+=f.not_supported_video.text,c+="</video></div>");if(g_objTR.ManageMIQ(MIQTYPE.INFOSTEP,m_objStep.InfoStepDescription.HTMLDecode()+c,m_objStep.InfoStepCaptionText.HTMLDecode(),m_objStep.InfoStepThemeID,m_objStep.InfoStepContinue,m_objStep.InfoAsm)==false)throw"Error @ g_objTR.ManageMIQ";}else if(m_objStep.InfoAsm==
true){if(g_objTR.ManageMIQ(MIQTYPE.ASSESSMENT,m_objStep.InfoStepDescription.HTMLDecode()+"#"+CMDVALUES.ASSESSMESNT,m_objStep.InfoStepCaptionText.HTMLDecode(),m_objStep.InfoStepThemeID,m_objStep.InfoStepContinue,m_objStep.InfoAsm)==false)throw"Error @ g_objTR.ManageMIQ";}else if(m_objStep.InfoWorkFlowShapes.length>0){if(g_objTR.ManageMIQ(MIQTYPE.WORKFLOW,g,m_objStep.InfoStepCaptionText.HTMLDecode(),m_objStep.InfoStepThemeID,m_objStep.InfoStepContinue,m_objStep.InfoWorkFlow)==false)throw"Error @ g_objTR.ManageMIQ";
}else if(m_objStep.Type==STEPTYPE.VARIATION){d="Variation-Step";if(messages_json.psim.commonmsg.variation_title!=void 0)d=messages_json.psim.commonmsg.variation_title.text;if(g_objTR.ManageMIQ(MIQTYPE.VARIATION,k,d,m_objStep.InfoStepThemeID,m_objStep.InfoStepContinue,m_objStep.InfoAsm)==false)throw"Error @ g_objTR.ManageMIQ";}else if(g_objTR.ManageMIQ(MIQTYPE.INFOSTEP,m_objStep.InfoStepDescription.HTMLDecode(),m_objStep.InfoStepCaptionText.HTMLDecode(),m_objStep.InfoStepThemeID,m_objStep.InfoStepContinue,
m_objStep.InfoAsm)==false)throw"Error @ g_objTR.ManageMIQ";d=false;m_objStep.VariationOptions.length>0&&uid_json.settings.general.mvariationsonfooter=="1"&&(d=true);if(d==false){B=false;if(m_objStep.VariationOptions.length>0)m_objStep.StatusBarData=new clsStatusBarData,m_objStep.StatusBarData.Duration=0,m_objStep.StatusBarData.MoveOnTimer=false,g_objGS.General.ActiveMode==MODETYPE.SHOW&&g_objGS.General.VPathSetForSM==1?B=true:g_objGS.General.ActiveMode==MODETYPE.GUIDE&&g_objGS.General.VPathSetForGM==
1?B=true:g_objGS.General.ActiveMode==MODETYPE.TEST&&g_objGS.General.VPathSetForTM==1&&(B=true),m_objStep.StatusBarData.ShowContinueButton=B;if(m_objStep.StatusBarData!=null&&e.LoadStatusBarObject(m_objStep.StatusBarData,MIQTYPE.INFOSTEP)==false)throw"Error @ LoadStatusBarObject";var G=FlyWeight.GetObject(PLAYABLEOBJECTS.CONTINUELAYER);m_objStep.InfoAsm==true?G.Holder=g_objTR.MIQ.FWAssessment:m_objStep.InfoWorkFlowShapes.length>0?G.Holder=g_objTR.MIQ.FWWorkflow:m_objStep.VariationOptions.length>0?
(G.StatusBarMessage="",G.Holder=g_objTR.MIQ.FWVariation,g_objTR.MIQ.FWVariation.ContinueButton.style.display=B==false?"none":"inline"):G.Holder=m_objStep.InfoStepThemeID==""?g_objTR.MIQ.FWInfo:g_objTR.MIQ.ThemedInfo.DialogPage["ist_"+m_objStep.InfoStepThemeID];if(G.Holder.SetFooterMessage("")==false)throw"Error @ objContinuePlayer.Holder.SetFooterMessage";}B=null;A=false;switch(g_objGS.General.ActiveMode){case MODETYPE.SHOW:A=true;break;case MODETYPE.GUIDE:uid_json.settings.mode_guide.enableaudio==
true&&(A=true);break;case MODETYPE.TEST:uid_json.settings.mode_test.enableaudio==true&&(A=true)}if(A==true&&(E=g_GetSuitableMediaForCurrentBrowser(MEDIATYPE.STEPAUDIO,m_objStep),E!=null&&g_objGS.General.AudioButtonEnabled==true)){B=FlyWeight.GetObject(PLAYABLEOBJECTS.STEPAUDIO);if(B==null)throw"Error @ FlyWeight.GetObject(PLAYABLEOBJECTS.STEPAUDIO)";if(B.Load(E.Src)==false)throw"Error @ FlyWeight.LoadAudioControl";}if(B==null){if(d==false&&e.objDIFMPOM.Add(G,null)==false)throw"Error @ objDIFMPOM.Add";
}else if(d==false){if(e.objDIFMPOM.Add(B,Array(G))==false)throw"Error @ objDIFMPOM.Add";if(e.objDIFMPOM.Add(G,null)==false)throw"Error @ objDIFMPOM.Add";}else if(e.objDIFMPOM.Add(B,null)==false)throw"Error @ objDIFMPOM.Add";if(e.objDIFMPOM.Load()==false)throw"Error @ objDIFMPOM.Load";}catch(D){b=false,e.Log2("clsInfoStepPlayer","Load_Continues",LOG.EXCEPTION,"",D)}return b}function b(){try{if(d()==false)throw"Error @ Load_Continues";}catch(a){e.Log2("clsInfoStepPlayer","WorkflowImageOnLoadComplete",
LOG.EXCEPTION,"",a)}}function c(){try{if(n[g.ImageSrc]==null){var a=e.CreateHTMLElement("IMG");document.body.appendChild(a);n[g.ImageSrc]=document.getElementById(a.id);a.onload=function(){var a=$(this).width(),c=$(this).height();g.Dimension=a+"|"+c;g.ImageSrc=this.src;if(b()==false)throw"Error @ WorkflowImageOnLoadComplete";};a.src=g.ImageSrc}else if(g.Dimension=n[g.ImageSrc].width+"|"+n[g.ImageSrc].height,g.ImageSrc=n[g.ImageSrc].src,b()==false)throw"Error @ WorkflowImageOnLoadComplete";}catch(c){e.Log2("clsInfoStepPlayer",
"LoadWorkFlowImage",LOG.EXCEPTION,"",c)}}clsMIQMBase.call(this);var e=this;e.ClassName="clsInfoStepPlayer";var a="",f=null,n={},g,k;this.Load=function(a,b){var f=true;try{if(m_objStep=b,b.InfoWorkFlowShapes.length>0){if(g={ImageSrc:("data"+g_URLPathSeperator+a+g_URLPathSeperator+b.InfoStepDescription.HTMLDecode()).replace("\\","/"),Shapes:b.InfoWorkFlowShapes},c()==false)throw"Error @ LoadWorkFlowImage";}else if(b.Type==STEPTYPE.VARIATION&&(k={TPSID:m_objStep.TPSID,Description:m_objStep.InfoStepDescription.HTMLDecode(),
Options:b.VariationOptions}),d()==false)throw"Error @ Load_Continues";}catch(n){f=false,e.Log2("clsInfoStepPlayer","Load",LOG.EXCEPTION,"",n)}return f};this.RemoveAudio=function(){var a=true;try{if(e.objDIFMPOM.Remove(PLAYABLEOBJECTTYPES.AUDIO)==false)throw"Error @ objDIFMPOM.Remove";}catch(b){a=false,e.Log2("clsInfoStepPlayer","RemoveAudio",LOG.EXCEPTION,"",b)}return a};this.ObjDelay_onPlayStateChange=function(b){try{e.PlayState=b.PlayState;var c="";if(b.Timeleft>0){if(b.Timeleft%1E3==0&&(c=f.infostep_timer.text.replace(/%1/g,
b.Timeleft/1E3),g_objTR.SetMIQDelayMessage(MIQTYPE.INFOSTEP,a,c)==false))throw"Error @ g_objTR.SetMIQDelayMessage";}else if(g_objTR.SetMIQDelayMessage(MIQTYPE.INFOSTEP,a,c)==false)throw"Error @ g_objTR.SetMIQDelayMessage";e.objDIFMPOM.CurObject_onPlayStateChange(b)}catch(d){e.Log2("clsInfoStepPlayer","ObjDelay_onPlayStateChange",LOG.EXCEPTION,"",d),e.PlayState=PLAYSTATE.ERROR}}};
clsManualPlayer=function(){clsMIQMBase.call(this);var d=this;d.ClassName="clsManualPlayer";this.Load=function(b){var c=true;try{if(d.objDIFMPOM.Stop()==false)throw"Error @ objDIFMPOM.Stop";if(g_objTR.ManageMIQ(MIQTYPE.MANUAL,b.ContentData.HTMLDecode(),b.CaptionText,sThemeID="",b.ShowContinueButton,bIframe=false)==false)throw"Error @ g_objTR.ManageMIQ";if(g_objTR.SetNotesMessage(b.Caption)==false)throw"Error @ g_objTR.SetNotesMessage";if(d.LoadStatusBarObject(b,MIQTYPE.MANUAL)==false)throw"Error @ ME.LoadStatusBarObject";
var e=FlyWeight.GetObject(PLAYABLEOBJECTS.CONTINUELAYER);e.Holder=g_objTR.MIQ.FWManual;if(e.Holder.SetFooterMessage("")==false)throw"Error @ objContinuePlayer.Holder.SetFooterMessage";if(d.objDIFMPOM.Add(e,null)==false)throw"Error @ objDIFMPOM.Add";if(d.objDIFMPOM.Load()==false)throw"Error @ objDIFMPOM.Load";}catch(a){c=false,d.Log2("clsManualPlayer","Load",LOG.EXCEPTION,"",a)}return c};this.RemoveAudio=function(){return true}};
clsQuestionPlayer=function(){function d(){try{if(b.objDIFMPOM.Stop()==false)throw"Error @ ME.objDIFMPOM.Stop";b.onChoiceClick(this.ResLoc)}catch(c){b.Log2("clsQuestionPlayer","LoadTaskOnChoiceClick",LOG.EXCEPTION,"",c)}return false}clsMIQMBase.call(this);var b=this,c="";b.Name="clsQuestionPlayer";this.onChoiceClick=null;this.Load=function(e){var a=true;try{if(b.objDIFMPOM.Stop()==false)throw"Error @ objDIFMPOM.Stop";var f=true;try{var n=document.createElement("DIV");n.id="QnCaption";n.style.paddingLeft=
"10px";n.innerHTML=e.DescriptionText.HTMLDecode();var g=document.createElement("DIV");g.id="QnChoice";g.style.padding="100px";n.appendChild(g);var k=document.createElement("ul");g.appendChild(k);var o,v,p,q;for(q in e.QuestionInfo)v=document.createElement("li"),p=document.createElement("a"),v.id=b.GetUniqueID(),p.id=b.GetUniqueID(),o=e.QuestionInfo[q].ID,p.ResLoc=o,p.onclick=d,p.href="#",p.innerHTML=e.QuestionInfo[q].Text.HTMLDecode()+"<br/><br/>",k.appendChild(v),v.appendChild(p);c=n}catch(E){f=
false,b.Log2("clsQuestionPlayer","ConstructQuestion",LOG.EXCEPTION,"",E)}if(f==false)throw"Error @ ConstructQuestion";if(g_objTR.ManageMIQ(MIQTYPE.QUESTION,c,e.CaptionText,sThemeID="",e.ShowContinueButton,bIframe=false)==false)throw"Error @ g_objTR.ManageMIQ";if(g_objTR.SetNotesMessage(e.Caption)==false)throw"Error @ g_objTR.SetNotesMessage";if(b.LoadStatusBarObject(e,MIQTYPE.QUESTION)==false)throw"Error @ LoadStatusBarObject";var u=FlyWeight.GetObject(PLAYABLEOBJECTS.CONTINUELAYER);u.Holder=g_objTR.MIQ.FWQuestion;
if(u.Holder.SetFooterMessage("")==false)throw"Error @ objContinuePlayer.Holder.SetFooterMessage";if(b.objDIFMPOM.Add(u,null)==false)throw"Error @ objDIFMPOM.Add";if(b.objDIFMPOM.Load()==false)throw"Error @ objDIFMPOM.Load";}catch(B){a=false,b.Log2("clsQuestionPlayer","Load",LOG.EXCEPTION,"",B)}return a};this.RemoveAudio=function(){return true}};
function clsQSDPlayer(d){function b(){var a=true;try{var b=g.CreateHTMLElement("div");b.style.left="0px";b.style.top="0px";b.style.width=g.ParentWidth+"px";b.style.height=g.ParentHeight+"px";b.style.visibility="visible";b.style.display=g_inline;if(BROWSER.LEGACY==true&&g.AlphaBackgroundColor.indexOf("rgba")!=-1){var d=g.AlphaBackgroundColor.split(","),f=parseFloat(d.pop())*100;b.style.filter="alpha(opacity="+f+")";g.AlphaBackgroundColor=d.join().replace(/rgba/i,"rgb")+")"}b.style.backgroundColor=
g.AlphaBackgroundColor;b.style.zIndex=ZINDEX.FEEDBAKDIALOG;k.appendChild(b);v=document.getElementById(b.id);v.onmousedown=e;v.ondowndown=e;b=g.CreateHTMLElement("div");b.style.width=g.ParentWidth+"px";b.style.height=g.ParentHeight+"px";b.style.visibility="visible";b.style.display=g_inline;b.style.zIndex=ZINDEX.FEEDBAKDIALOG;k.appendChild(b);o=document.getElementById(b.id);p.FWData=E[q.qsd.fw.h5d];if(q.qsd.spec.header!=void 0)p.HeaderCSS=q.qsd.spec.header.css;if(q.qsd.spec.body!=void 0)p.BodyCSS=q.qsd.spec.body.css;
if(q.qsd.spec.footer!=void 0)p.FooterCSS=q.qsd.spec.footer.css;if(p.Create(o)==false)throw"Error @ m_objFWWindow.Create";g.ContentBody=p.ContentBody;if(c(p.ContentBody)==false)throw"Error @ DisableSelection";p.onHide=function(){g_Completed=true;g_HideAndClose()};p.ContentBody.innerHTML="";p.ContentBody2.innerHTML="";p.ContinueButton.style.visibility="hidden";p.ContinueButton.style.display="none"}catch(n){a=false,g.Log("Construct",LOG.EXCEPTION,"",n)}return a}function c(a){var b=true;try{typeof a.onselectstart!=
"undefined"?a.onselectstart=function(){return false}:typeof a.style.MozUserSelect!="undefined"?a.style.MozUserSelect="none":a.onmousedown=function(){return false},a.style.cursor="default"}catch(c){b=false,g.Log("DisableSelection",LOG.EXCEPTION,"",c)}return b}function e(a){try{a=a==void 0?event:a,a.stopPropagation?(a.preventDefault(),a.stopPropagation()):(a.cancelBubble=true,a.returnValue=false,a.keyCode=0)}catch(b){g.Log("Ignore_Event",LOG.EXCEPTION,"",b)}}function a(){var a=true;try{if(uid_json.settings.general.asmshowfeedback==
"1"){p.ContinueButton.innerText=g.ContinueText;if(f()==false)throw"Error @ ValidateAnswer";try{A==true?(m_CorrectDiv.style.visibility="visible",m_CorrectDiv.style.display="inline",m_WrongDiv.style.visibility="hidden",m_WrongDiv.style.display="none"):(m_WrongDiv.style.visibility="visible",m_WrongDiv.style.display="inline",m_CorrectDiv.style.visibility="hidden",m_CorrectDiv.style.display="none"),p.ContentBody2.style.display=g_inline,p.ContentBody.style.display="none",p.ContinueButton.focus()}catch(b){g.Log("ShowAnswer",
LOG.EXCEPTION,"",b)}p.onContinueClick=r}else{if(f()==false)throw"Error @ ValidateAnswer";r()}}catch(c){a=false,g.Log("m_ButtonSubmit_OnClick",LOG.EXCEPTION,"",c)}return a}function f(){try{A=false;if(u.Type==QUESTIONTYPE.SINGLE)A=document.getElementById(D.TPSID+"_"+u.CorrectAnswer).checked==true;else if(u.Type==QUESTIONTYPE.MULTIPLE){var a=u.CorrectAnswer.split("|"),b;for(b in a)a[b]=D.TPSID+"_"+a[b];var c=a.join("|"),a="";for(b in u.Choices)document.getElementById(u.Choices[b].ID).checked==true&&
(a=a==""?u.Choices[b].ID:a+"|"+u.Choices[b].ID);A=a==c?true:false}else B!=null&&(A=B.id==D.TPSID+"_"+u.CorrectAnswer?true:false);g.Result=A;if(g_objTracker.Engine.SetUserAnswer(G,A==true?1:0)==false)throw"g_objTracker.Step_Ended ";}catch(e){g.Log("ValidateAnswer",LOG.EXCEPTION,"",e)}}function n(){try{g.PlayState=PLAYSTATE.PLAYENDED,g.onPlayStateChange(g)}catch(a){bRet=false,g.Log("PlayCompleted",LOG.EXCEPTION,"",a)}}clsPlayerBase.call(this,"clsQSDPlayer",d);var g=this;this.PlayState=PLAYSTATE.NONE;
this.FWData=null;this.AlphaBackgroundColor=new String("");this.ParentWidth=this.ParentHeight=0;this.FWBaseImage=null;this.ContinueText=this.SubmitText="";this.JumpTo=null;this.Result=false;var k,o,v,p,q=uid_json.psim.layout.h5dobjects,E=uid_json.resources.h5dialogs,u=null,B=null,A=false,G="",D=null;this.Initialize=function(a){var b=true;try{g.SubmitText=messages_json.general.qsd.btn_submit.text;g.ContinueText=messages_json.general.qsd.btn_continue.text;if(a==null||a==void 0)throw"holderDiv is not supplied";
k=a;this.ID=g.GetUniqueID();g.Initialized=PLAYSTATE.INITIALIZED}catch(c){b=false,g.Log("Initialize",LOG.EXCEPTION,"",c)}return b};this.Load=function(a){var c=true;try{g.Result=false;D=a;B=null;var e=a.Question,a="",a=e.Cord!=""&&e.Cord!=void 0?e.Cord:String(q.submitform.spec.cord),d=true;try{p=new clsFloatingWindow("qsd");p.DoNotUseAnimatedContinue=true;new Number(uid_json.psim.layout.specs.general.canvasbuffer);var f=true;try{if(a!=""&&a!=void 0)var n=a.split("|"),k=Number(n[0]),o=Number(n[1]),u=
Number(n[2]),r=Number(n[3]);var A=Number(E[q.qsd.fw.h5d].border);n[3].indexOf("%")!=-1&&(hp=Number(n[3].replace("%","")),r=Math.ceil(g.ParentHeight*(hp/100)),r-=cBuffer*2+A*2);n[2].indexOf("%")!=-1&&(wp=Number(n[2].replace("%","")),u=Math.ceil(g.ParentWidth*(wp/100)),u-=cBuffer*2+A*2);p.Left=Number(k)*g_objGS.General.ResizeFactor;p.Top=Number(o)*g_objGS.General.ResizeFactor;p.Width=Number(u);p.Height=Number(r)}catch(v){f=false,g.Log("SetCordsToFloatingWindow",LOG.EXCEPTION,"",v)}if(f==false)throw"Error @ SetCordsToFloatingWindow(Cords)";
g.AlphaBackgroundColor=q.qsd.spec.alpha_background_color;var G=uid_json.psim.layout.h5dobjects.qsd.fw.h5d;g.FWBaseImage=g_objRIL.ImageList.h5d_qsd||g_objRIL.ImageList[G];p.BaseImage=g.FWBaseImage;p.ParentWidth=g.ParentWidth;p.ParentHeight=g.ParentHeight;p.ZIndex=ZINDEX.FEEDBAKDIALOG;p.IsResizable=q.qsd.fw.resizable=="0"?false:true;p.IsFloating=q.qsd.fw.floating=="0"?false:true;p.FooterRequired=q.qsd.fw.footer=="1"?true:false;p.ContentBody2Required=true;p.StepDetailsRequired=false;p.ContinueText=g.SubmitText;
p.ContinueRequired=true}catch(z){d=false,g.Log("CollectRequiredData",LOG.EXCEPTION,"",z)}if(d==false)throw"Error @ CollectRequiredData";if(b()==false)throw"Error @ Construct";if(g.CreateQuestionUI(e)==false)throw"Error @ME.CreateQuestionUI";g.PlayState=PLAYSTATE.READY}catch(X){c=false,g.Log("Load",LOG.EXCEPTION,"",X)}return c};this.Play=function(){var a=true;try{if(g.onPlayStateChange==null)throw"onPlayStateChange event not binded";g.Show()}catch(b){a=false,g.Log("Play",LOG.EXCEPTION,"",b)}return a};
this.Pause=function(){var a=true;try{g.PlayState=PLAYSTATE.PAUSED,g.onPlayStateChange(g)}catch(b){a=false,g.Log("Pause",LOG.EXCEPTION,"",b)}return a};this.Stop=function(){var a=true;try{g.Hide()}catch(b){a=false,g.Log("Stop",LOG.EXCEPTION,"",b)}return a};this.SetCaption=function(a){var b=true;try{p.SetCaption(a)}catch(c){b=false,g.Log("Caption",LOG.EXCEPTION,"",c)}return b};this.Hide=function(){try{o.style.display="none",v.style.display="none",g.Visible=false,k.style.display="none"}catch(a){bRet=
false,g.Log("Hide",LOG.EXCEPTION,"",a)}};this.Show=function(){var a=true;try{m_bEnterKeyPressed=false,o.style.display=g_inline,v.style.display=g_inline,p.Show(),g.Visible=true}catch(b){a=false,g.Log("Show",LOG.EXCEPTION,"",b)}return a};this.SetData=function(a){try{p.ContentBody.innerHTML=a}catch(b){}return true};this.GetBoundingRect=function(){var a=null;try{a=p.GetBoundingRect()}catch(b){g.Log("GetBoundingRect",LOG.EXCEPTION,"",b)}return a};this.CreateQuestionUI=function(b){var c=true;try{A=false;
G="";p.ContentBody.innerHTML="";var e=g.CreateHTMLElement("TABLE");e.style.visibility="visible";e.style.display="inline";e.style.position="relative";e.width="100%";e.cellPadding="0";e.cellSpacing="1";e.border="0";p.ContentBody.appendChild(e);var d=e.insertRow(e.rows.length),f=d.insertCell(d.cells.length);f.style.paddingLeft="10px";u=b;var n=g.CreateHTMLElement("div");n.style.cssText=g_GetCSSForTD(q.qsd.spec.question.css);n.style.visibility="visible";n.style.display=g_inline;n.innerHTML=u.Text.htxt_data+
"<br/><br/>";f.appendChild(n);var b="",k;for(k in u.Choices){d=e.insertRow(e.rows.length);f=d.insertCell(d.cells.length);f.style.paddingLeft="10px";if(u.Type!=QUESTIONTYPE.BUTTON){p.ContinueButton.style.visibility="visible";p.ContinueButton.style.display="inline";p.ContinueButton.disabled=true;var o=null;document.getElementById(u.Choices[k].ID)!=void 0?(o=document.getElementById(u.Choices[k].ID),o.checked=false):o=g.CreateHTMLElement("INPUT");var r=g.CreateHTMLElement("LABEL"),E=g.CreateHTMLElement("span");
E.style.cssText="";o.style.cssText="";r.style.cssText="";if(u.Type==QUESTIONTYPE.MULTIPLE)E.setAttribute("class","Checkmark_Checkbox"),o.type="checkbox";else if(u.Type==QUESTIONTYPE.SINGLE)E.setAttribute("class","Checkmark_Radio"),o.type="radio";o.name=D.TPSID;o.id=u.Choices[k].ID;BROWSER.LEGACY==false?(r.innerHTML+=u.Choices[k].Text.htxt_data+"",r.setAttribute("class","Choice_Container"),r.appendChild(o)):(r.style.cssText=g_GetCSSForTD(q.qsd.spec.choice_container.css),r.htmlFor=o.id,r.appendChild(o),
r.innerHTML+=u.Choices[k].Text.htxt_data+"");BROWSER.LEGACY==false&&r.appendChild(E);f.appendChild(r);o.onchange=function(){try{var a=false;if(this.type.toUpperCase()=="RADIO"){if(this.checked==true)a=true,G=this.id}else{G="";for(var b in u.Choices)u.Choices[b].Control.checked==true&&(a=true,G=G==""?u.Choices[b].ID:G+"|"+u.Choices[b].ID)}p.ContinueButton.disabled=!a;p.ContinueButton.focus()}catch(c){g.Log("EnableSubmitBtn",LOG.EXCEPTION,"",c)}};u.Choices[k].Control=document.getElementById(o.id)}else{f.style.paddingBottom=
"5px";var v=g.CreateHTMLElement("div");v.style.visibility="visible";v.style.display="table-cell";v.style.position="relative";v.id=u.Choices[k].ID;v.innerHTML=u.Choices[k].Text.htxt_data;BROWSER.LEGACY==false?v.setAttribute("class","q_button_normal"):(uid_json.psim.layout.h5dobjects.qsd.spec.button_normal.css.fc="#00f",v.style.cssText=g_GetCSSForTD(uid_json.psim.layout.h5dobjects.qsd.spec.button_normal.css));v.onclick=function(){try{B=this;G=B.id;if(a()==false)throw"Error @ m_ButtonSubmit_OnClick()";
p.ContinueButton.style.visibility="visible";p.ContinueButton.style.display="inline";p.ContinueButton.focus()}catch(b){g.Log("m_ButtonCH_Clicked",LOG.EXCEPTION,"",b)}};f.appendChild(v);u.Choices[k].Control=document.getElementById(v.id)}var O=u.CorrectAnswer.split("|"),P;for(P in O)if(u.Choices[k].ID==O[P])b==""?b=u.Choices[k].Text.htxt_data:b+=","+u.Choices[k].Text.htxt_data}p.onContinueClick=a;p.ContinueButton.style.left=Number(u.Cord.split("|")[2])/2-parseInt(p.ContinueButton.style.width)/2+"px";
p.ContentBody2.innerHTML="";var z=Math.ceil(Number(p.ContentBody2.style.width.replace("px",""))*0.95),X=Math.ceil(Number(p.ContentBody2.style.height.replace("px",""))*0.8),Z="<span style='"+g_GetCSSForTD(q.qsd.spec.correct_ans_prefix.css)+"'>"+q.qsd.spec.correct_ans_prefix.code.txt+"</span>",n=g.CreateHTMLElement("div");n.style.cssText=g_GetCSSForTD(q.qsd.spec.correct_ans.css);n.innerHTML="<table border=0 width="+z+" height="+X+" cellpadding=0 cellspacing=0><tr><td align='center' style='padding:5px;'>"+
Z+u.TextCorrect.htxt_data+"</td></tr></table>";p.ContentBody2.appendChild(n);m_CorrectDiv=document.getElementById(n.id);Z="<span style='"+g_GetCSSForTD(q.qsd.spec.wrong_ans_prefix.css)+"'>"+q.qsd.spec.wrong_ans_prefix.code.txt+"</span>";n=g.CreateHTMLElement("div");n.style.cssText=g_GetCSSForTD(q.qsd.spec.wrong_ans.css);n.innerHTML="<table border=0 width="+z+" height="+X+" cellpadding=0 cellspacing=0><tr><td align='center' style='padding:5px;'>"+Z+u.TextWrong.htxt_data+"</td></tr></table>";p.ContentBody2.appendChild(n);
m_WrongDiv=document.getElementById(n.id);p.ContentBody2.style.display="none";p.ContentBody.style.display="inline";p.ContentBody2.style.overflow="hidden"}catch(Y){c=false,g.Log("CreateQuestionUI",LOG.EXCEPTION,"",Y)}return c};var r=function(){var a=true;try{if(g.JumpTo==null)throw"Error @ ME.JumpTo";A==true?u.JumpCorrect!=null&&u.JumpCorrect!=""?g.JumpTo("",u.JumpCorrect):n():u.JumpWrong!=null&&u.JumpWrong!=""?g.JumpTo("",u.JumpWrong):n()}catch(b){a=false,g.Log("JumpToStepBasedOnAnswer",LOG.EXCEPTION,
"",b)}return a}}
function clsTutorImagePlayer(d){clsPlayerBase.call(this,"clsTutorImagePlayer",d);var b=this,c;this.POType=PLAYABLEOBJECTTYPES.TUTORIMAGE;this.Left=new Number(0);this.Top=new Number(0);this.Width=new Number(0);this.Height=new Number(0);this.Buffer=0;this.Duration=new Number(0);this.DurationOrg=new Number(0);this.PlayState=PLAYSTATE.NONE;this.Rewind=false;this.onLoadComplete=null;this.ImgSrc="";this.Seq=0;this.ID="";var e=null;this.Initialize=function(a){var e=true;try{if(b.Initialized==PLAYSTATE.INITIALIZED)throw"Already Initizlized";
if(a==null)throw"holderDiv not supplied";b.ID=b.GetUniqueID();var d=b.CreateHTMLElement("img");d.style.display=g_inline;a.appendChild(d);c=document.getElementById(d.id);b.Initialized=PLAYSTATE.INITIALIZED}catch(g){e=false,b.Log("Initialize",LOG.EXCEPTION,"",g)}return e};this.Load=function(){var a=true;try{if(b.Initialized==PLAYSTATE.NOTINITIALIZED)throw"Object not initialized";b.Left*=g_objGS.General.ResizeFactor;b.Top*=g_objGS.General.ResizeFactor;b.Width*=g_objGS.General.ResizeFactor;b.Height*=
g_objGS.General.ResizeFactor;b.Left-=b.Buffer;b.Top-=b.Buffer;b.Width+=b.Buffer*2;b.Height+=b.Buffer*2;c.src=b.ImgSrc;c.style.left=b.Left+"px";c.style.top=b.Top+"px";c.style.width=b.Width+"px";c.style.height=b.Height+"px";if(b.Duration>0){e=new clsDelayPlayer;e.onPlayStateChange=b.m_ObjDelay_onPlayStateChange;if(e.Initialize()==false)throw"Error @ objDelay.Initialize";e.Duration=b.Duration;b.Log("Load",LOG.TRACE,"Delay @ CSN = "+b.ObjectName,e.Duration);if(e.Load()==false)throw"Error @ m_ObjDelay.Load";
}b.PlayState=PLAYSTATE.READY;if(b.onLoadComplete!=null)b.onLoadComplete()}catch(d){a=false,b.Log("Load",LOG.EXCEPTION,"",d)}return a};this.Hide=function(){var a=true;try{if(e!=null&&e.Stop()==false)throw"Error @ m_ObjDelay.Stop";c.style.visibility="hidden"}catch(d){a=false,b.Log("Hide",LOG.EXCEPTION,"",d)}return a};this.Play=function(){var a=true;try{if(b.onPlayStateChange==null)throw"onPlayStateChange event not binded";if(b.PlayState==PLAYSTATE.READY||b.PlayState==PLAYSTATE.PAUSED||b.PlayState==
PLAYSTATE.STOPPED){c.style.visibility="visible";if(b.Rewind==true)b.PlayState=PLAYSTATE.READY;if(e!=null){if(e.Play()==false)throw"Error @ m_ObjDelay.Stop";}else b.PlayState=PLAYSTATE.PLAYENDED,b.onPlayStateChange(b)}}catch(d){a=false,b.Log("Play",LOG.EXCEPTION,"",d)}return a};this.Pause=function(){var a=true;try{if(b.PlayState==PLAYSTATE.PLAYING){if(e!=null&&e.Pause()==false)throw"Error @ m_ObjDelay.Pause";b.PlayState=PLAYSTATE.PAUSED;b.onPlayStateChange(b)}}catch(c){a=false,b.Log("Pause",LOG.EXCEPTION,
"",c)}return a};this.Stop=function(){var a=true;try{if(e!=null&&e.Stop()==false)throw"Error @ m_ObjDelay.Stop";b.PlayState=PLAYSTATE.STOPPED;b.Hide()}catch(c){a=false,b.Log("Stop",LOG.EXCEPTION,"",c)}return a};this.m_ObjDelay_onPlayStateChange=function(){try{if(e.PlayState==PLAYSTATE.PLAYENDED&&(b.PlayState=PLAYSTATE.PLAYENDED,b.onPlayStateChange(b),b.Rewind==true))b.PlayState=PLAYSTATE.READY}catch(a){b.Log("m_ObjDelay_onPlayStateChange",LOG.EXCEPTION,"",a),b.PlayState=PLAYSTATE.ERROR}}}
function clsCalloutTextboxPlayer(d){clsPlayerBase.call(this,"clsCalloutTextboxPlayer",d);var b=this,c;this.POType=PLAYABLEOBJECTTYPES.CALLOUTTEXTBOX;this.Left=new Number(0);this.Top=new Number(0);this.Width=new Number(0);this.Height=new Number(0);this.Buffer=0;this.Duration=new Number(0);this.DurationOrg=new Number(0);this.PlayState=PLAYSTATE.NONE;this.Rewind=false;this.onLoadComplete=null;this.Seq=0;this.ID="";this.Thickness=0;this.BGColor=this.Color="";this.Transparent=0;var e=null;this.Initialize=
function(a){var e=true;try{if(b.Initialized==PLAYSTATE.INITIALIZED)throw"Already Initizlized";if(a==null)throw"holderDiv not supplied";b.ID=b.GetUniqueID();var d=b.CreateTextHolder(uid_json.settings.callout.callouttextbox);d.style.visibility="hidden";d.style.overflow="none";d.style.overflowX="hidden";d.style.overflowY="hidden";a.appendChild(d);c=document.getElementById(d.id);b.Initialized=PLAYSTATE.INITIALIZED}catch(g){e=false,b.Log("Initialize",LOG.EXCEPTION,"",g)}return e};this.Load=function(){var a=
true;try{if(b.Initialized==PLAYSTATE.NOTINITIALIZED)throw"Object not initialized";b.Left*=g_objGS.General.ResizeFactor;b.Top*=g_objGS.General.ResizeFactor;b.Width*=g_objGS.General.ResizeFactor;b.Height*=g_objGS.General.ResizeFactor;b.Left-=b.Buffer;b.Top-=b.Buffer;b.Width+=b.Buffer*2;b.Height+=b.Buffer*2;c.style.left=b.Left+"px";c.style.top=b.Top+"px";c.style.width=b.Width+"px";c.style.height=b.Height+"px";c.style.position="absolute";c.innerHTML=b.Text;if(uid_json.settings.callout.overridetextboxcss==
"0")c.style.borderColor=b.Color,c.style.borderWidth=b.Thickness+"px",c.style.backgroundColor=b.BGColor,c.style.borderStyle="solid";if(b.Duration>0){e=new clsDelayPlayer;e.onPlayStateChange=b.m_ObjDelay_onPlayStateChange;if(e.Initialize()==false)throw"Error @ objDelay.Initialize";e.Duration=b.Duration;b.Log("Load",LOG.TRACE,"Delay @ CSN = "+b.ObjectName,e.Duration);if(e.Load()==false)throw"Error @ m_ObjDelay.Load";}b.PlayState=PLAYSTATE.READY;if(b.onLoadComplete!=null)b.onLoadComplete()}catch(d){a=
false,b.Log("Load",LOG.EXCEPTION,"",d)}return a};this.Hide=function(){var a=true;try{if(e!=null&&e.Stop()==false)throw"Error @ m_ObjDelay.Stop";c.style.visibility="hidden"}catch(d){a=false,b.Log("Hide",LOG.EXCEPTION,"",d)}return a};this.Play=function(){var a=true;try{if(b.onPlayStateChange==null)throw"onPlayStateChange event not binded";if(b.PlayState==PLAYSTATE.READY||b.PlayState==PLAYSTATE.PAUSED||b.PlayState==PLAYSTATE.STOPPED){c.style.visibility="visible";c.style.display=g_inline;if(b.Rewind==
true)b.PlayState=PLAYSTATE.READY;if(e!=null){if(e.Play()==false)throw"Error @ m_ObjDelay.Stop";}else b.PlayState=PLAYSTATE.PLAYENDED,b.onPlayStateChange(b)}}catch(d){a=false,b.Log("Play",LOG.EXCEPTION,"",d)}return a};this.Pause=function(){var a=true;try{if(b.PlayState==PLAYSTATE.PLAYING){if(e!=null&&e.Pause()==false)throw"Error @ m_ObjDelay.Pause";b.PlayState=PLAYSTATE.PAUSED;b.onPlayStateChange(b)}}catch(c){a=false,b.Log("Pause",LOG.EXCEPTION,"",c)}return a};this.Stop=function(){var a=true;try{if(e!=
null&&e.Stop()==false)throw"Error @ m_ObjDelay.Stop";b.PlayState=PLAYSTATE.STOPPED;b.Hide()}catch(c){a=false,b.Log("Stop",LOG.EXCEPTION,"",c)}return a};this.m_ObjDelay_onPlayStateChange=function(){try{if(e.PlayState==PLAYSTATE.PLAYENDED&&(b.PlayState=PLAYSTATE.PLAYENDED,b.onPlayStateChange(b),b.Rewind==true))b.PlayState=PLAYSTATE.READY}catch(a){b.Log("m_ObjDelay_onPlayStateChange",LOG.EXCEPTION,"",a),b.PlayState=PLAYSTATE.ERROR}}}
function clsAudioPlayer(d){function b(){try{if(e.PlayState=a.PlayState,e.CurrentTime=a.CurrentTime,f=false,e.PlayAsync==true){if(e.onPlayStateChange2!=null)e.onPlayStateChange2(e)}else if(e.onPlayStateChange!=null)e.onPlayStateChange(e)}catch(b){e.Log("m_audio_onPlayStateChange",LOG.EXCEPTION,"",b)}}function c(b){try{e.PlayState=a.PlayState;f=false;if(b==false)f=true,e.PlayState=PLAYSTATE.PLAYENDED;if(e.onLoadComplete!=null)e.onLoadComplete(b)}catch(c){e.Log("m_audio_onLoadComplete",LOG.EXCEPTION,
"",c)}}clsPlayerBase.call(this,"clsAudioPlayer",d);var e=this,a=null;this.POType=PLAYABLEOBJECTTYPES.AUDIO;this.PlayState=PLAYSTATE.NONE;this.CurrentTime=0;this.onPlayStateChange2=this.onPlayStateChange=null;var f=this.PlayAsync=false;this.Initialize=function(){var d=true;try{a=BROWSER.LEGACY==true?new clsAudioOcxMP7:new clsAudioPlayerH5;a.POType=e.POType;a.PlayState=e.PlayState;if(a.Initialize()==false)throw"m_audio not initialized";a.onPlayStateChange=b;a.onLoadComplete=c;e.ID=e.GetUniqueID();e.Initialized=
PLAYSTATE.INITIALIZED;d=true}catch(f){d=false,e.Log("Initialize",LOG.EXCEPTION,"",f)}return d};this.Load=function(b){e.Log("Load",LOG.ENTRY,"sAudioSrc",b);var c=true;try{if(b=="")throw"sAudioSrc is empty";e.PlayAsync=false;a.Load(b);e.PlayState=a.PlayState;c=true}catch(d){c=false,e.Log("Load",LOG.EXCEPTION,"",d)}return c};this.Play=function(){var b=true;try{if(f==false)a.Play(),e.PlayState=a.PlayState,e.PlayAsync==true&&setTimeout(e.RaisePlayStateEndEvent,10);else if(e.PlayState=PLAYSTATE.PLAYENDED,
e.onPlayStateChange!=null)e.onPlayStateChange(e)}catch(c){b=false,e.Log("Play",LOG.EXCEPTION,"",c)}return b};this.Pause=function(){var b=true;try{a.Pause(),e.PlayState=a.PlayState}catch(c){b=false,e.Log("Pause",LOG.EXCEPTION,"",c)}return b};this.Stop=function(){var b=true;try{if(a!=null)a.Stop(),e.PlayState=a.PlayState}catch(c){b=false,e.Log("Stop",LOG.EXCEPTION,"",c)}return b};this.Mute=function(b){try{a.Mute(b)}catch(c){}return true};this.SetCurrentTime=function(b){try{a.SetCurrentTime(b)}catch(c){}return true};
this.RaisePlayStateEndEvent=function(){var a=true;try{if(e.PlayState=PLAYSTATE.PLAYENDED,e.onPlayStateChange!=null)e.onPlayStateChange(e)}catch(b){a=false,e.Log("RaisePlayStateEndEvent",LOG.EXCEPTION,"",b)}return a}}
clsAudioOcxMP6=function(){function d(){if(e.PlayState==g){window.clearTimeout(a);a=0;c.Log("m_audio_onEnded",LOG.ENTRY);try{if(c.onPlayStateChange!=null)c.PlayState=PLAYSTATE.PLAYENDED,c.onPlayStateChange(c)}catch(b){c.Log("m_audio_onEnded",LOG.EXCEPTION,"",b)}return true}}function b(){if(e.OpenState==n){window.clearTimeout(f);f=0;c.Log("m_audio_OpenComplete",LOG.ENTRY);try{c.PlayState==PLAYSTATE.PLAYING&&c.Stop();if(c.PlayState==PLAYSTATE.NONE)c.PlayState=PLAYSTATE.READY;if(c.onLoadComplete!=null)c.onLoadComplete(true)}catch(a){c.Log("m_audio_OpenComplete",
LOG.EXCEPTION,"",a)}}}clsPlayerBase.call(this,"clsAudioOcxMP6");var c=this,e,a=null,f=null;this.onPlayStateChange=null;var n=6,g=0;this.Initialize=function(){var a=true;try{if(c.Initialized==PLAYSTATE.INITIALIZED)return true;var b=c.CreateHTMLElement("div");document.body.appendChild(b);this.ID=this.GetUniqueID();m_audiodiv=document.getElementById(b.id);var d='<object id="'+c.ID+'" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="0" height="0">';d+='<param name="uiMode" value="none">';d+=
'<param name="autoStart" value="false">';d+="</object>";m_audiodiv.innerHTML=d;e=document.getElementById(c.ID);c.Initialized=PLAYSTATE.INITIALIZED}catch(f){a=false,c.Log("Initialize",LOG.EXCEPTION,"",f)}return a};this.Load=function(a){c.Log("Load",LOG.ENTRY,"sAudioSrc",a);var d=true;try{if(c.Initialized==PLAYSTATE.NOTINITIALIZED)throw"Object not initialized";c.PlayState=PLAYSTATE.NONE;if(a==void 0)throw"No Audio File ?";e.open(a);d=true;c.PlayState=PLAYSTATE.READY;f=setInterval(b,100)}catch(g){d=
false,c.Log("Load",LOG.EXCEPTION,"",g)}return d};this.Play=function(){var b=true;try{if(c.onPlayStateChange==null)throw"onPlayStateChange event not binded";if(c.PlayState==PLAYSTATE.ERROR)c.PlayState=PLAYSTATE.PLAYENDED,c.onPlayStateChange(c);else if(c.PlayState==PLAYSTATE.READY||c.PlayState==PLAYSTATE.PAUSED||c.PlayState==PLAYSTATE.STOPPED||c.PlayState==PLAYSTATE.PLAYENDED)e.Play(),c.PlayState=PLAYSTATE.PLAYING,c.onPlayStateChange(c),a=window.setInterval(d,1)}catch(f){b=false,c.Log("Play",LOG.EXCEPTION,
"",f)}return b};this.Pause=function(){var a=true;try{if(c.PlayState==PLAYSTATE.PLAYING)e.Pause(),c.PlayState=PLAYSTATE.PAUSED,c.onPlayStateChange(c)}catch(b){a=false,c.Log("Pause",LOG.EXCEPTION,"",b)}return a};this.Stop=function(){var b=true;try{try{e.Stop(),window.clearInterval(f),f=0,window.clearInterval(a),a=0}catch(d){}c.PlayState=PLAYSTATE.STOPPED}catch(g){b=false,c.Log("Stop",LOG.EXCEPTION,"",g)}return b}};
function clsAudioOcxMP7(){function d(){e.Log("m_audio_onopenstatechange",LOG.ENTRY,"m_audio.openState",a.openState);var b=true;try{if(a.openState==f){e.Log("m_audio_onCanPlayThrough",LOG.ENTRY,"",a.url);try{if(e.PlayState==PLAYSTATE.NONE)e.PlayState=PLAYSTATE.READY;if(e.onLoadComplete!=null)e.onLoadComplete(true)}catch(c){e.Log("m_audio_onCanPlayThrough",LOG.EXCEPTION,"",c)}}}catch(d){b=false,e.Log("m_audio_onopenstatechange",LOG.EXCEPTION,"",d)}return b}function b(){e.Log("m_audio_onplaystatechange",
LOG.ENTRY,"m_audio.playState",a.playState);var b=true;try{if(a.playState==n){e.Log("m_audio_onEnded",LOG.ENTRY);try{if(e.onPlayStateChange!=null)e.PlayState=PLAYSTATE.PLAYENDED,e.onPlayStateChange(e)}catch(c){e.Log("m_audio_onEnded",LOG.EXCEPTION,"",c)}}}catch(d){b=false,e.Log("m_audio_onplaystatechange",LOG.EXCEPTION,"",d)}return b}function c(){try{if(e.Log("m_audio_onError",LOG.ERROR,"not loaded ?",a.url),e.PlayState=PLAYSTATE.ERROR,e.onPlayStateChange!=null)e.onPlayStateChange(false)}catch(b){e.Log("m_audio_onError",
LOG.EXCEPTION,"",b)}}clsPlayerBase.call(this,"clsAudioOcxMP7");var e=this,a,f=6,n=8;this.POType=PLAYABLEOBJECTTYPES.AUDIO;this.PlayState=PLAYSTATE.NONE;this.onPlayStateChange=null;this.Initialize=function(){var f=true;try{if(e.Initialized==PLAYSTATE.INITIALIZED)return true;var n=e.CreateHTMLElement("div");document.body.appendChild(n);this.ID=this.GetUniqueID();m_audiodiv=document.getElementById(n.id);var o='<object id="'+e.ID+'" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="0" height="0">';
o+='<param name="uiMode" value="none">';o+='<param name="autoStart" value="false">';o+="</object>";m_audiodiv.innerHTML=o;a=document.getElementById(e.ID);window.attachEvent!=void 0&&BROWSER.LEGACY==true&&(a.attachEvent("openstatechange",d),a.attachEvent("playstatechange",b),a.attachEvent("error",c));this.ID=this.GetUniqueID();e.Initialized=PLAYSTATE.INITIALIZED}catch(v){f=false,e.Log("Initialize",LOG.EXCEPTION,"",v)}return f};this.Load=function(b){e.Log("Load",LOG.ENTRY,"sAudioSrc",b);var c=true;
try{if(e.Initialized==PLAYSTATE.NOTINITIALIZED)throw"Object not initialized";e.PlayState=PLAYSTATE.NONE;if(b==void 0)throw"No Audio File ?";a.URL=b;c=true;e.PlayState=PLAYSTATE.READY}catch(d){c=false,e.Log("Load",LOG.EXCEPTION,"",d)}return c};this.Play=function(){var b=true;try{if(e.onPlayStateChange==null)throw"onPlayStateChange event not binded";if(e.PlayState==PLAYSTATE.ERROR)e.PlayState=PLAYSTATE.PLAYENDED,e.onPlayStateChange(e);else if(e.PlayState==PLAYSTATE.READY||e.PlayState==PLAYSTATE.PLAYENDED||
e.PlayState==PLAYSTATE.PAUSED||e.PlayState==PLAYSTATE.STOPPED)a.controls.play(),e.PlayState=PLAYSTATE.PLAYING,e.onPlayStateChange(e)}catch(c){b=false,e.Log("Play",LOG.EXCEPTION,"",c)}return b};this.Pause=function(){var b=true;try{if(e.PlayState==PLAYSTATE.PLAYING)a.controls.pause(),e.PlayState=PLAYSTATE.PAUSED,e.onPlayStateChange(e)}catch(c){b=false,e.Log("Pause",LOG.EXCEPTION,"",c)}return b};this.Stop=function(){var b=true;try{try{a.controls.stop()}catch(c){}e.PlayState=PLAYSTATE.STOPPED}catch(d){b=
false,e.Log("Stop",LOG.EXCEPTION,"",d)}return b}}
function clsAudioPlayerH5(){function d(){f.Log("m_audio_onEnded",LOG.ENTRY);try{if(f.onPlayStateChange!=null)f.PlayState=PLAYSTATE.PLAYENDED,f.onPlayStateChange(f)}catch(a){f.Log("m_audio_onEnded",LOG.EXCEPTION,"",a)}}function b(){f.Log("m_audio_onTimeUpdate",LOG.ENTRY);try{f.CurrentTime=n.currentTime;if(f.CurrentTime>0)f.onPlayStateChange(f);if(BROWSER.SAFARI==true&&n.duration<=n.currentTime&&f.onPlayStateChange!=null)f.PlayState=PLAYSTATE.PLAYENDED,f.onPlayStateChange(f)}catch(a){f.Log("m_audio_onTimeUpdate",
LOG.EXCEPTION,"",a)}}function c(){f.Log("m_audio_onCanPlayThrough",LOG.ENTRY,"",n.src);try{if(f.PlayState==PLAYSTATE.NONE&&(f.PlayState=PLAYSTATE.READY,f.onLoadComplete!=null))f.onLoadComplete(true)}catch(a){f.Log("m_audio_onCanPlayThrough",LOG.EXCEPTION,"",a)}}function e(){f.Log("m_audio_onLoadStart",LOG.ENTRY);try{if(f.PlayState==PLAYSTATE.NONE&&(f.PlayState=PLAYSTATE.READY,f.onLoadComplete!=null))f.onLoadComplete(true)}catch(a){f.Log("m_audio_onLoadStart",LOG.EXCEPTION,"",a)}}function a(){try{if(f.Log("m_audio_onError",
LOG.ERROR,"not loaded ?",f.src),f.PlayState==PLAYSTATE.NONE&&(f.PlayState=PLAYSTATE.ERROR,f.onLoadComplete!=null))f.onLoadComplete(true)}catch(a){f.Log("m_audio_onError",LOG.EXCEPTION,"",a)}}clsPlayerBase.call(this,"clsAudioPlayerH5");var f=this,n;this.POType=PLAYABLEOBJECTTYPES.AUDIO;this.PlayState=PLAYSTATE.NONE;this.CurrentTime=0;this.src="";this.onPlayStateChange=null;this.Initialize=function(){var g=true;try{if(f.Initialized==PLAYSTATE.INITIALIZED)return true;var k=f.CreateHTMLElement("audio");
document.body.appendChild(k);n=document.getElementById(k.id);n.addEventListener("timeupdate",b,true);BROWSER.SAFARI!=true&&n.addEventListener("ended",d,true);n.addEventListener("error",a,true);BROWSER.OPERA==true?n.addEventListener("loadstart",e,false):n.addEventListener("canplaythrough",c,false);f.ID=f.GetUniqueID();f.Initialized=PLAYSTATE.INITIALIZED}catch(o){g=false,f.Log("Initialize",LOG.EXCEPTION,"",o)}return g};this.Load=function(a){f.Log("Load",LOG.SPECIAL,"sAudioSrc",a);var b=true;try{if(f.Initialized==
PLAYSTATE.NOTINITIALIZED)throw"Object not initialized";f.PlayState=PLAYSTATE.NONE;if(a==void 0)throw"No Audio File ?";n.src=a;n.load()}catch(c){b=false,f.Log("Load",LOG.EXCEPTION,"",c)}return b};this.Play=function(){var a=true;try{if(f.onPlayStateChange==null)throw"onPlayStateChange event not binded";if(f.PlayState==PLAYSTATE.ERROR)f.PlayState=PLAYSTATE.PLAYENDED,f.onPlayStateChange(f);else if(f.PlayState==PLAYSTATE.READY||f.PlayState==PLAYSTATE.PLAYENDED||f.PlayState==PLAYSTATE.PAUSED||f.PlayState==
PLAYSTATE.STOPPED)n.play(),f.PlayState=PLAYSTATE.PLAYING,f.onPlayStateChange(f)}catch(b){a=false,f.Log("Play",LOG.EXCEPTION,"",b)}return a};this.Pause=function(){var a=true;try{if(f.PlayState==PLAYSTATE.PLAYING)n.pause(),f.PlayState=PLAYSTATE.PAUSED,f.onPlayStateChange(f)}catch(b){a=false,f.Log("Pause",LOG.EXCEPTION,"",b)}return a};this.Stop=function(){var a=true;try{try{n.pause(),n.currentTime=0,f.CurrentTime=0}catch(b){}f.PlayState=PLAYSTATE.STOPPED}catch(c){a=false,f.Log("Stop",LOG.EXCEPTION,"",
c)}return a};this.Mute=function(a){var b=true;try{n.muted=a}catch(c){b=false,f.Log("Mute",LOG.EXCEPTION,"",c)}return b};this.SetCurrentTime=function(a){var b=true;try{n.currentTime=a,f.CurrentTime=a}catch(c){b=false,f.Log("SetCurrentTime",LOG.EXCEPTION,"",c)}return b}}
function clsCursorAudioPlayer(d){function b(){B.PlayState==PLAYSTATE.PLAYENDED&&n()}function c(){G=true;p.PlayState=PLAYSTATE.READY}function e(){A.PlayState==PLAYSTATE.PLAYENDED&&n()}function a(){D=true;p.PlayState=PLAYSTATE.READY}function f(){var a=true;try{window.clearInterval(q),window.clearTimeout(E),window.clearTimeout(u),window.clearTimeout(r),window.clearTimeout(H),H=r=u=E=q=0,B!=null&&B.Stop(),A!=null&&A.Stop()}catch(b){a=false,p.Log("ClearMetaData",LOG.EXCEPTION,"",b)}return a}function n(){var a=
true;try{if(f(),p.onPlayStateChange!=null)p.PlayState=PLAYSTATE.PLAYENDED,p.onPlayStateChange(p)}catch(b){a=false,p.Log("PlayEnded",LOG.EXCEPTION,"",b)}return a}function g(){var a=true;try{if(p.CursorMovePlayer.ShiftCursorPosition(-3,-3)==false)throw"Error @ CursorMovePlayer.ShiftCursorPosition";}catch(b){a=false,p.Log("ShiftCursorDown",LOG.EXCEPTION,"",b)}return a}function k(){var a=true;try{var b=true;try{if(p.CursorMovePlayer.ShiftCursorPosition(3,3)==false)throw"Error @ CursorMovePlayer.ShiftCursorPosition";
}catch(c){b=false,p.Log("ShiftCursorUp",LOG.EXCEPTION,"",c)}if(b==false)throw"Error @ ShiftCursorUp";q=setTimeout(g,100)}catch(e){a=false,p.Log("ShiftCursor",LOG.EXCEPTION,"",e)}return a}function o(){var a=true;try{if(p.CursorMovePlayer.LoadMouseButton(true)==false)throw"Error @ SetMouseButtonNone";}catch(b){a=false,p.Log("SetMouseButtonNone",LOG.EXCEPTION,"",b)}return a}function v(){var a=true;try{if(p.CursorMovePlayer.LoadMouseButton(false)==false)throw"Error @ SetMouseButtonNone";}catch(b){a=false,
p.Log("SetMouseButtonNormal",LOG.EXCEPTION,"",b)}return a}clsPlayerBase.call(this,"clsCursorAudioPlayer",d);var p=this,q=0,E=0,u=0,B,A,G=false,D=false;this.POType=PLAYABLEOBJECTTYPES.CURSORAUDIO;this.PlayState=PLAYSTATE.NONE;this.DblClickAudioFile=this.ClickAudioFile="";this.CursorMovePlayer=null;var r=0,H=0;this.Initialize=function(d){var f=true;try{if(p.Initialized==PLAYSTATE.INITIALIZED)throw"Already initialized";if(d==null)throw"holderDiv not supplied";if(g_objGS.General.IsIPadBrowser==false){if(uid_json.settings.media.consider_clickaudio===
true){B=new clsAudioPlayer;if(B.Initialize()==false)throw"Error @ m_objAudio.Initialize";B.onLoadComplete=c;B.onPlayStateChange=b}else B=null;if(uid_json.settings.media.consider_dblclickaudio===true){A=new clsAudioPlayer;if(A.Initialize()==false)throw"Error @ m_objAudio.Initialize";A.onLoadComplete=a;A.onPlayStateChange=e}else A=null}else A=B=null;this.ID=this.GetUniqueID();p.Initialized=PLAYSTATE.INITIALIZED}catch(g){f=false,p.Log("Initialize",LOG.EXCEPTION,"",g)}return f};this.Load=function(){var a=
true;try{if(p.Initialized==PLAYSTATE.NOTINITIALIZED)throw"Object not initialized";if(this.CursorMovePlayer==null)throw"CursorMovePlayer is null";p.PlayState=PLAYSTATE.READY;if(p.CursorMovePlayer.MouseEventData.Type==EVENTTYPE.DOUBLECLICK){if(A!=null&&D==false)p.Log("Load",LOG.SPECIAL,"g_DblClickAudioFile",g_DblClickAudioFile),p.PlayState=PLAYSTATE.NONE,A.Load(g_DblClickAudioFile)}else if(B!=null&&G==false)p.Log("Load",LOG.SPECIAL,"g_ClickAudioFile",g_ClickAudioFile),p.PlayState=PLAYSTATE.NONE,B.Load(g_ClickAudioFile)}catch(b){a=
false,p.Log("Load",LOG.EXCEPTION,"",b)}return a};this.Play=function(){var a=true;try{if(p.onPlayStateChange==null)throw"onPlayStateChange event not binded";if(p.PlayState==PLAYSTATE.READY||p.PlayState==PLAYSTATE.PAUSED||p.PlayState==PLAYSTATE.STOPPED){if(p.CursorMovePlayer.SetCursors(CURSORBUTTON.DOWN)==false)throw"Error @ CursorMovePlayer.SetCursors";uid_json.settings.mousebutton.consider==true&&p.CursorMovePlayer.ShowMouseButton();if(p.CursorMovePlayer.MouseEventData.Type==EVENTTYPE.DOUBLECLICK)try{f();
if(k()==false)throw"ShiftCursor";r=setTimeout(o,100);H=setTimeout(v,200);u=setTimeout(k,200);A!=null&&g_objGS.General.AudioButtonEnabled==true?A.Play():E=setTimeout(n,210)}catch(b){p.Log("PlayDoubleClickEvent",LOG.EXCEPTION,"",b)}else try{f();if(k()==false)throw"Error @ ShiftCursor";B!=null&&g_objGS.General.AudioButtonEnabled==true?B.Play():E=setTimeout(n,110)}catch(c){p.Log("PlayClickEvent",LOG.EXCEPTION,"",c)}}}catch(e){a=false,p.Log("Play",LOG.EXCEPTION,"",e)}return a};this.Pause=function(){var a=
true;try{if(p.PlayState==PLAYSTATE.PLAYING)p.PlayState=PLAYSTATE.PAUSED,p.onPlayStateChange(p)}catch(b){a=false,p.Log("Pause",LOG.EXCEPTION,"",b)}return a};this.Stop=function(){var a=true;try{if(f()==false)throw"Error @ ClearMetaData";p.PlayState=PLAYSTATE.STOPPED}catch(b){a=false,p.Log("Stop",LOG.EXCEPTION,"",b)}return a}}
function clsVideoPlayer(d){function b(){try{if(e.PlayState=a.PlayState,e.onPlayStateChange!=null)e.onPlayStateChange(e)}catch(b){e.Log("m_video_onPlayStateChange",LOG.EXCEPTION,"",b)}}function c(b){try{if(e.PlayState=a.PlayState,e.onLoadComplete!=null)e.onLoadComplete(b)}catch(c){e.Log("m_video_onLoadComplete",LOG.EXCEPTION,"",c)}}clsPlayerBase.call(this,"clsVideoPlayer",d);var e=this,a;this.POType=PLAYABLEOBJECTTYPES.VIDEO;this.PlayState=PLAYSTATE.NONE;this.onPlayStateChange=null;this.controls=false;
this.Initialize=function(d){var n=true;try{if(e.Initialized==PLAYSTATE.INITIALIZED)return true;if(d==null)throw"holderDiv not supplied";a=BROWSER.LEGACY==true?new clsVideoOcxMP7:new clsVideoPlayerH5;a.controls=e.controls;a.POType=e.POType;a.PlayState=e.PlayState;a.Initialize(d);a.onPlayStateChange=b;a.onLoadComplete=c;e.ID=e.GetUniqueID();e.Initialized=PLAYSTATE.INITIALIZED;n=true}catch(g){e.Log("Initialize",LOG.EXCEPTION,"",g)}return n};this.Load=function(b){var c=new Boolean(false);try{a.Load(b),
e.PlayState=a.PlayState,c=true}catch(d){e.Log("Load",LOG.EXCEPTION,"",d)}return c};this.Play=function(){var b=new Boolean(false);try{a.Play(),e.PlayState=a.PlayState,b=true}catch(c){e.Log("Play",LOG.EXCEPTION,"",c)}return b};this.Pause=function(){var b=new Boolean(false);try{a.Pause(),e.PlayState=a.PlayState,b=true}catch(c){e.Log("Pause",LOG.EXCEPTION,"",c)}return b};this.Stop=function(){var b=new Boolean(false);try{try{a.Stop(),e.PlayState=a.PlayState}catch(c){}e.PlayState=PLAYSTATE.STOPPED;b=true}catch(d){e.Log("Stop",
LOG.EXCEPTION,"",d)}return b};this.Hide=function(){var b=true;try{a.Hide()}catch(c){b=false,e.Log("Hide",LOG.EXCEPTION,"",c)}return b}}
clsVideoOcxMP7=function(){function d(){if(c.PlayState==f||c.PlayState==a&&b.PlayState==PLAYSTATE.PLAYING){window.clearTimeout(e);e=0;b.Log("m_Video_onEnded",LOG.ENTRY);try{if(b.onPlayStateChange!=null)b.PlayState=PLAYSTATE.PLAYENDED,b.onPlayStateChange(b)}catch(d){b.Log("m_Video_onEnded",LOG.EXCEPTION,"",d)}}else if(c.PlayState==a){window.clearTimeout(e);e=0;b.Log("m_Video_OpenComplete",LOG.ENTRY);try{b.PlayState==PLAYSTATE.PLAYING&&b.Stop();if(b.PlayState==PLAYSTATE.NONE)b.PlayState=PLAYSTATE.READY;
if(b.onLoadComplete!=null)b.onLoadComplete(true);c.style.display=g_inline;m_Videodiv.style.display=g_inline}catch(g){b.Log("m_Video_OpenComplete",LOG.EXCEPTION,"",g)}}}clsPlayerBase.call(this,"clsVideoOcxMP7");var b=this,c,e=null;this.onLoadComplete=this.onPlayStateChange=null;var a=10,f=1;this.controls=false;this.Initialize=function(a){var e=true;try{if(b.Initialized==PLAYSTATE.INITIALIZED)return true;var d=b.CreateHTMLElement("div");a.appendChild(d);this.ID=this.GetUniqueID();m_Videodiv=document.getElementById(d.id);
m_Videodiv.style.visibility="visible";m_Videodiv.style.display=g_inline;m_Videodiv.style.left="0px";m_Videodiv.style.top="0px";a="none";b.controls==true&&(a="mini");var f='<object id="'+b.ID+'" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">';f+='<param name="uiMode" value="'+a+'">';f+='<param name="autoStart" value="false">';f+='<param name="autorewind" value="-1">';f+='<param name="controls" value="true">';f+='<param name="playcount" value="1">';f+="</object>";m_Videodiv.innerHTML=f;c=document.getElementById(b.ID);
b.Initialized=PLAYSTATE.INITIALIZED}catch(v){e=false,b.Log("Initialize",LOG.EXCEPTION,"",v)}return e};this.Load=function(a){var f=true;try{if(b.Initialized==PLAYSTATE.NOTINITIALIZED)throw"Object not initialized";b.PlayState=PLAYSTATE.NONE;if(a==void 0)throw"No Video File ?";c.URL=a.Src;a.bApplyResizeFactor==true?(m_Videodiv.style.width=c.style.width=a.Width*g_objGS.General.ResizeFactor+"px",m_Videodiv.style.height=c.style.height=a.Height*g_objGS.General.ResizeFactor+"px"):(m_Videodiv.style.width=
c.style.width=a.Width+"px",m_Videodiv.style.height=c.style.height=a.Height+"px");f=true;e=setInterval(d,10)}catch(k){f=false,b.Log("Load",LOG.EXCEPTION,"",k)}return f};this.Play=function(){var a=true;try{if(b.onPlayStateChange==null)throw"onPlayStateChange event not binded";if(b.PlayState==PLAYSTATE.ERROR)b.PlayState=PLAYSTATE.PLAYENDED,b.onPlayStateChange(b);else if(b.PlayState==PLAYSTATE.READY||b.PlayState==PLAYSTATE.PAUSED||b.PlayState==PLAYSTATE.STOPPED||b.PlayState==PLAYSTATE.PLAYENDED)c.controls.play(),
b.Log("Play",LOG.TRACE,c.URL,"playing"),b.PlayState=PLAYSTATE.PLAYING,b.onPlayStateChange(b),e=window.setInterval(d,1E3)}catch(f){a=false,b.Log("Play",LOG.EXCEPTION,"",f)}return a};this.Pause=function(){var a=true;try{if(b.PlayState==PLAYSTATE.PLAYING)c.controls.pause(),b.PlayState=PLAYSTATE.PAUSED,b.onPlayStateChange(b)}catch(e){a=false,b.Log("Pause",LOG.EXCEPTION,"",e)}return a};this.Stop=function(){var a=true;try{try{c.controls.stop(),window.clearInterval(e),e=0}catch(d){}b.PlayState=PLAYSTATE.STOPPED}catch(f){a=
false,b.Log("Stop",LOG.EXCEPTION,"",f)}return a};this.Hide=function(){var a=true;try{if(b.Initialized==PLAYSTATE.INITIALIZED)c.style.display="none",m_Videodiv.style.display="none"}catch(e){a=false,b.Log("Hide",LOG.EXCEPTION,"",e)}return a}};
clsVideoPlayerH5=function(){function d(){n.Log("m_video_onEnded",LOG.ENTRY);try{if(g_objGS.General.IsIPadBrowser==true)g.style.visibility="hidden",g.style.display="none";n.PlayState=PLAYSTATE.PLAYENDED;n.onPlayStateChange(n)}catch(a){n.Log("m_video_onEnded",LOG.EXCEPTION,"",a)}}function b(){n.Log("m_video_onTimeUpdate",LOG.ENTRY);try{if(n.Log("m_video_onTimeUpdate",LOG.SPECIAL,"duration # currentTime",g.duration+" # "+g.currentTime),g.duration<=g.currentTime){if(g_objGS.General.IsIPadBrowser==true)g.style.visibility=
"hidden",g.style.display="none";n.PlayState=PLAYSTATE.PLAYENDED;n.onPlayStateChange(n)}}catch(a){n.Log("m_video_onTimeUpdate",LOG.EXCEPTION,"",a)}}function c(){n.Log("m_video_onCanPlayThrough",LOG.ENTRY,"",g.src);try{if(g_objGS.General.IsIPadBrowser==true)g.style.visibility="visible",g.style.display=g_inline;if(n.PlayState==PLAYSTATE.NONE)n.PlayState=PLAYSTATE.READY;if(n.onLoadComplete!=null)n.onLoadComplete(true)}catch(a){n.Log("m_video_onCanPlayThrough",LOG.EXCEPTION,"",a)}}function e(){n.Log("m_video_onloadstart",
LOG.ENTRY,"",g.src);try{if(g_objGS.General.IsIPadBrowser==true)g.style.visibility="visible",g.style.display=g_inline;if(n.PlayState==PLAYSTATE.NONE)n.PlayState=PLAYSTATE.READY;if(n.onLoadComplete!=null)n.onLoadComplete(true)}catch(a){n.Log("m_video_onloadstart",LOG.EXCEPTION,"",a)}}function a(){n.Log("m_video_onError",LOG.ENTRY,"Video not loaded",g.src);try{if(g_objGS.General.IsIPadBrowser==true){if(g.style.visibility="hidden",g.style.display="none",n.Log("m_video_onError",LOG.ENTRY,"ME.PlayState",
n.PlayState),n.PlayState==PLAYSTATE.READY)n.PlayState=PLAYSTATE.PLAYENDED,n.onPlayStateChange(n)}else n.PlayState=PLAYSTATE.ERROR;if(n.onLoadComplete!=null)n.onLoadComplete(false)}catch(a){n.Log("m_video_onError",LOG.EXCEPTION,"",a)}}function f(){n.Log("video_onPlaying",LOG.ENTRY);try{n.PlayState=PLAYSTATE.PLAYING,n.onPlayStateChange(n)}catch(a){n.Log("video_onPlaying",LOG.EXCEPTION,"",a)}}clsPlayerBase.call(this,"clsVideoPlayerH5");var n=this,g;this.POType=PLAYABLEOBJECTTYPES.VIDEO;this.PlayState=
PLAYSTATE.NONE;this.controls=false;this.Initialize=function(k){var o=new Boolean(false);try{if(n.Initialized==PLAYSTATE.INITIALIZED)return true;if(k==null)throw"holderDiv not supplied";var v=n.CreateHTMLElement("video");v.style.left="0px";v.style.top="0px";v.style.zIndex=ZINDEX.SCREENVIDEO;n.controls==true&&v.setAttribute("controls","controls");k.appendChild(v);g=document.getElementById(v.id);g.style.visibility="visible";g.style.display=g_inline;if(g_objGS.General.IsIPadBrowser==true)g.controls=true;
OS.MAC==true&&g_objGS.General.IsIPadBrowser==false?g.addEventListener("timeupdate",b,true):BROWSER.SAFARI==true?g.addEventListener("timeupdate",b,true):g.addEventListener("ended",d,true);g.addEventListener("error",a,true);g.addEventListener("playing",f,true);BROWSER.OPERA==true||BROWSER.SAFARI==true?g.addEventListener("loadstart",e,true):g.addEventListener("canplaythrough",c,true);n.ID=n.GetUniqueID();n.Initialized=PLAYSTATE.INITIALIZED;o=true}catch(p){n.Log("Initialize",LOG.EXCEPTION,"",p)}return o};
this.Load=function(a){var b=new Boolean(false);try{if(n.Initialized==PLAYSTATE.NOTINITIALIZED)throw"Object not initialized";n.Log("Load",LOG.SPECIAL,"objMediaData.Src",a.Src);n.PlayState=PLAYSTATE.NONE;a.bApplyResizeFactor==true?(g.width=a.Width*g_objGS.General.ResizeFactor,g.height=a.Height*g_objGS.General.ResizeFactor):(g.width=a.Width,g.height=a.Height);g.src=a.Src;g.load();g_objGS.General.IsIPadBrowser==true?(n.PlayState=PLAYSTATE.READY,g.style.visibility="visible",g.style.display=g_inline):(g.style.display=
"none",g.style.visibility="hidden");b=true}catch(c){n.Log("Load",LOG.EXCEPTION,"",c)}return b};this.Play=function(){var a=new Boolean(false);try{if(n.onPlayStateChange==null)throw"onPlayStateChange event not binded";if(n.PlayState==PLAYSTATE.ERROR)n.PlayState=PLAYSTATE.PLAYENDED,n.onPlayStateChange(n);else if(g_objGS.General.IsIPadBrowser==true&&n.PlayState==PLAYSTATE.READY)n.Log("Play",LOG.SPECIAL,"do nothing","Waiting user to click play on Video");else if(n.PlayState==PLAYSTATE.READY||n.PlayState==
PLAYSTATE.PAUSED||n.PlayState==PLAYSTATE.STOPPED)g.style.display=g_inline,g.style.visibility="visible",g.play(),n.PlayState=PLAYSTATE.PLAYING,n.onPlayStateChange(n);a=true}catch(b){n.Log("Play",LOG.EXCEPTION,"",b)}return a};this.Pause=function(){var a=new Boolean(false);try{if(n.PlayState==PLAYSTATE.PLAYING)g.pause(),n.PlayState=PLAYSTATE.PAUSED,n.onPlayStateChange(n);a=true}catch(b){n.Log("Pause",LOG.EXCEPTION,"",b)}return a};this.Stop=function(){var a=new Boolean(false);try{try{g.pause(),g.style.display=
"none"}catch(b){}n.PlayState=PLAYSTATE.STOPPED;a=true}catch(c){n.Log("Stop",LOG.EXCEPTION,"",c)}return a};this.Hide=function(){var a=true;try{if(n.Initialized==PLAYSTATE.INITIALIZED)g.style.display="none"}catch(b){a=false,n.Log("Hide",LOG.EXCEPTION,"",b)}return a}};
function clsControlRegionShapeVML(d){function b(a,b,d,f){try{g==null&&(g=c(CONTROLREGION.RECTANGLE)),g.style.width=d+"px",g.style.height=f+"px",g.style.left=a+"px",g.style.top=b+"px"}catch(n){e.Log("m_AssignRect",LOG.EXCEPTION,"",n)}return g}function c(b){var c=null;try{switch(b){case CONTROLREGION.RECTANGLE:c=e.CreateHTMLElement("v:rect");break;case CONTROLREGION.ROUNDRECTANGLE:c=e.CreateHTMLElement("v:roundrect");break;case CONTROLREGION.OVAL:c=e.CreateHTMLElement("v:oval");break;case CONTROLREGION.FREESHAPE:c=
e.CreateHTMLElement("v:shape")}c.style.display=g_inline;c.style.zIndex=ZINDEX.CONTROLREGION;a.appendChild(c);c.style.behavior="url(#default#VML)";c.strokecolor=f;c.strokeweight=n;c.fillcolor="none"}catch(d){e.Log("CreateVMLShape",LOG.EXCEPTION,"",d)}return c}clsPlayerBase.call(this,"clsControlRegionShapeVML");var e=this,a=d,f=new String(""),n=new Number(0),g=null,k=null,o=null,v=null,p=null;this.Visibility=false;this.Initialize=function(){var a=true;try{document.namespaces.add("v","urn:schemas-microsoft-com:vml"),
e.Initialized=PLAYSTATE.INITIALIZED}catch(b){a=false,e.Log("Initialize",LOG.EXCEPTION,"",b)}return a};this.Load=function(a,d,g,B,A,G,D,r,H,C){var J=true;try{if(e.Initialized==PLAYSTATE.NOTINITIALIZED)throw"Object not initialized";f=G;n=A;switch(D){case CONTROLREGION.RECTANGLE:p=b(a,d,g,B);if(p==null)throw"Error @ m_AssignRect";break;case CONTROLREGION.ROUNDRECTANGLE:try{o==null&&(o=c(CONTROLREGION.ROUNDRECTANGLE)),o.style.width=g+"px",o.style.height=B+"px",o.style.left=a+"px",o.style.top=d+"px"}catch(I){e.Log("m_AssignRoundedRect",
LOG.EXCEPTION,"",I)}p=o;if(p==null)throw"Error @ m_AssignRoundedRect";break;case CONTROLREGION.OVAL:try{k==null&&(k=c(CONTROLREGION.OVAL)),k.style.width=g+"px",k.style.height=B+"px",k.style.left=a+"px",k.style.top=d+"px"}catch(L){e.Log("m_AssignOval",LOG.EXCEPTION,"",L)}p=k;if(p==null)throw"Error @ m_AssignOval";break;case CONTROLREGION.FREESHAPE:for(var N=r.split("|"),M=new String(""),K=g_objGS.General.ResizeFactor,a=0;a<N.length;a+=2)M==""?M="m"+Math.round(N[a]*K)+","+Math.round(N[a+1]*K)+" l ":
M+=Math.round(N[a]*K)+","+Math.round(N[a+1]*K)+",";M=M.substr(0,M.lastIndexOf(","));M+="xe";N=M;try{v==null&&(v=c(CONTROLREGION.FREESHAPE)),v.style.width=g+"px",v.style.height=B+"px",v.coordsize=g+","+B,v.path=N}catch(F){e.Log("m_AssignFreeShape",LOG.EXCEPTION,"",F)}p=v;if(p==null)throw"Error @ m_AssignFreeShape";break;case CONTROLREGION.HIGHLIGHTER:if(p=b(a,d,g,B),p==null)throw"Error @ m_AssignRect";}p.fillcolor=H==""?"none":H;if(C!="")p.fill.opacity=C;p.strokecolor=f;p.strokeweight=n;e.PlayState=
PLAYSTATE.READY}catch(T){J=false,e.Log("Load",LOG.EXCEPTION,"",T)}return J};this.Show=function(){try{p.style.visibility="visible",e.Visibility=true}catch(a){}};this.Hide=function(){try{p.style.visibility="hidden",e.Visibility=false}catch(a){}};this.GetBoundingRect=function(){var a=null;try{a=p.getBoundingClientRect()}catch(b){e.Log("clsControlRegionShapeVML >> GetBoundingRect",LOG.EXCEPTION,"",b)}return a}}
function clsControlRegionShapeCanvas(d){function b(a,b,e,d,f){var p=true;try{a.strokeRect(b,e,d,f),a.save()}catch(q){p=false,c.Log("m_DrawRect",LOG.EXCEPTION,"",q)}return p}clsPlayerBase.call(this,"clsControlRegionShapeCanvas");var c=this,e,a=new Number(2),f=new Number(0);this.Visibility=false;this.Initialize=function(){var a=true;try{if(c.Initialized==PLAYSTATE.INITIALIZED)throw"Already Initizlized";var b=c.CreateHTMLElement("canvas");b.style.display=g_inline;if(uid_json.settings.controlregion.bgcolor!=
"")b.style.backgroundColor=uid_json.settings.controlregion.bgcolor;b.style.zIndex=ZINDEX.CONTROLREGION;d.appendChild(b);e=document.getElementById(b.id);c.Initialized=PLAYSTATE.INITIALIZED}catch(f){a=false,c.Log("Initialize",LOG.EXCEPTION,"",f)}return a};this.Load=function(d,g,k,o,v,p,q,E,u,B){var A=true;try{if(c.Initialized==PLAYSTATE.NOTINITIALIZED)throw"Object not initialized";f=v;e.width=k;e.height=o;e.style.left=d+"px";e.style.top=g+"px";u=u||"";if(u!="")try{var v="",G=parseInt(u.substr(1,2),
16),D=parseInt(u.substr(3,2),16),r=parseInt(u.substr(5,2),16);e.style.backgroundColor="rgba("+G+","+D+","+r+","+B+")"}catch(H){}var C=e.getContext("2d");C.lineWidth=f;C.strokeStyle=p;y=x=a;w=k-a*2;h=o-a*2;k=w>h?h/5:w/5;switch(q){case CONTROLREGION.RECTANGLE:if(b(C,x,y,w,h)==false)throw"Error @ m_DrawRect";break;case CONTROLREGION.ROUNDRECTANGLE:var d=x,g=y,J=w,I=h,L=true;try{C.beginPath(),C.moveTo(d+k,g),C.lineTo(d+J-k,g),C.quadraticCurveTo(d+J,g,d+J,g+k),C.lineTo(d+J,g+I-k),C.quadraticCurveTo(d+
J,g+I,d+J-k,g+I),C.lineTo(d+k,g+I),C.quadraticCurveTo(d,g+I,d,g+I-k),C.lineTo(d,g+k),C.quadraticCurveTo(d,g,d+k,g),C.stroke(),C.closePath(),C.save()}catch(N){L=false,c.Log("m_DrawRoundedRect",LOG.EXCEPTION,"",N)}if(L==false)throw"Error @ m_DrawRoundedRect";break;case CONTROLREGION.OVAL:d=x;g=y;J=w;I=h;L=true;try{ox=J/2*0.5522848,oy=I/2*0.5522848,xe=d+J,ye=g+I,xm=d+J/2,ym=g+I/2,C.beginPath(),C.moveTo(d,ym),C.bezierCurveTo(d,ym-oy,xm-ox,g,xm,g),C.bezierCurveTo(xm+ox,g,xe,ym-oy,xe,ym),C.bezierCurveTo(xe,
ym+oy,xm+ox,ye,xm,ye),C.bezierCurveTo(xm-ox,ye,d,ym+oy,d,ym),C.closePath(),C.stroke(),C.save()}catch(M){L=false,c.Log("m_DrawRect",LOG.EXCEPTION,"",M)}if(L==false)throw"Error @ m_DrawOval";break;case CONTROLREGION.FREESHAPE:q=[];L=E.split("|");for(E=0;E<L.length;E+=2)q[q.length]=new clsCord(L[E],L[E+1]);L=true;try{C.beginPath();J=q[0].x*g_objGS.General.ResizeFactor-(d+f);I=q[0].y*g_objGS.General.ResizeFactor-(g+f);J=J<0?a:J;I=I<0?a:I;C.moveTo(J,I);for(E=1;E<q.length;E++)J=q[E].x*g_objGS.General.ResizeFactor-
(d+f),I=q[E].y*g_objGS.General.ResizeFactor-(g+f),J=J<0?a:J,I=I<0?a:I,C.lineTo(J,I);C.closePath();C.stroke();C.save()}catch(K){L=false,c.Log("m_DrawFreeShape",LOG.EXCEPTION,"",K)}if(L==false)throw"Error @ m_DrawFreeShape";break;case CONTROLREGION.HIGHLIGHTER:if(b(C,x,y,w,h)==false)throw"Error @ m_DrawRect";}c.PlayState=PLAYSTATE.READY}catch(F){A=false,c.Log("Load",LOG.EXCEPTION,"",F)}return A};this.Show=function(){try{e.style.visibility="visible",c.Visibility=true}catch(a){}};this.Hide=function(){try{e.style.visibility=
"hidden",c.Visibility=false}catch(a){}};this.GetBoundingRect=function(){var a=null;try{a=e.getBoundingClientRect()}catch(b){c.Log("clsControlRegionShapeCanvas >> GetBoundingRect",LOG.EXCEPTION,"",b)}return a}}
function clsControlRegionPlayer(d){clsPlayerBase.call(this,"clsControlRegionPlayer",d);var b=this,c,e;this.POType=PLAYABLEOBJECTTYPES.CONTROLREGION;this.Type=CONTROLREGION.RECTANGLE;this.EnableBlink=true;this.Duration=new Number(0);this.Interval=new Number(0);this.Left=new Number(0);this.Top=new Number(0);this.Width=new Number(0);this.Height=new Number(0);this.Thickness=new Number(0);this.Color=new String("");this.BackgroundColor=new String("");this.Opacity=new String("");this.Timeleft=new Number(0);
this.PlayState=PLAYSTATE.NONE;this.HideOnPlayComplete=false;this.FreeShapeCords=new String("");this.CaptionText="";this.Rewind=false;this.Buffer=0;this.MinimumHeight=false;var a=this.onLoadComplete=null;this.Initialize=function(c){var d=true;try{if(b.Initialized==PLAYSTATE.INITIALIZED)throw"Already Initizlized";if(c==null)throw"holderDiv not supplied";a=BROWSER.LEGACY==true?new clsControlRegionShapeVML(c):new clsControlRegionShapeCanvas(c);if(a.Initialize()==false)throw"Failed to initialize control region shape";
var g=b.CreateHTMLElement("div");g.style.display=g_inline;c.appendChild(g);e=document.getElementById(g.id);e.dir=uid_json.settings.template.rtl;this.ID=this.GetUniqueID();b.Initialized=PLAYSTATE.INITIALIZED}catch(k){d=false,b.Log("Initialize",LOG.EXCEPTION,"",k)}return d};this.Load=function(){var c=true;try{if(b.Initialized==PLAYSTATE.NOTINITIALIZED)throw"Object not initialized";b.Left*=g_objGS.General.ResizeFactor;b.Top*=g_objGS.General.ResizeFactor;b.Width*=g_objGS.General.ResizeFactor;b.Height*=
g_objGS.General.ResizeFactor;b.Left-=b.Buffer;b.Top-=b.Buffer;b.Width+=b.Buffer*2;b.Height+=b.Buffer*2;if(b.MinimumHeight==true&&b.Height<20)b.Height=20;if(b.Left<0)b.Left=0;if(b.Top<0)b.Top=0;c=a.Load(b.Left,b.Top,b.Width,b.Height,b.Thickness,b.Color,b.Type,b.FreeShapeCords,b.BackgroundColor,b.Opacity);if(c==false)throw"Failed to load control region";b.Timeleft=b.Duration;e.innerHTML=b.CaptionText;e.style.left=b.Left+"px";e.style.top=b.Top-17+b.Thickness+"px";b.PlayState=PLAYSTATE.READY;if(b.onLoadComplete!=
null)b.onLoadComplete()}catch(d){c=false,b.Log("Load",LOG.EXCEPTION,"",d)}return c};this.Hide=function(){var c=true;try{if(b.Initialized==PLAYSTATE.INITIALIZED)a.Hide(),e.style.visibility="hidden"}catch(d){c=false,b.Log("Hide",LOG.EXCEPTION,"",d)}return c};this.Play=function(){var d=true;try{if(b.onPlayStateChange==null)throw"onPlayStateChange event not binded";e.innerHTML=this.CaptionText;if(b.EnableBlink==false){if(e.style.visibility="visible",a.Show(),b.PlayState=PLAYSTATE.PLAYENDED,b.onPlayStateChange(b),
b.Rewind==true)b.PlayState=PLAYSTATE.READY}else if(b.PlayState==PLAYSTATE.READY||b.PlayState==PLAYSTATE.PAUSED||b.PlayState==PLAYSTATE.STOPPED)b.m_ManageCRDisplay(),b.PlayState==PLAYSTATE.PLAYING&&(c=setInterval(b.m_ManageCRDisplay,b.Interval))}catch(n){d=false,b.Log("Play",LOG.EXCEPTION,"",n)}return d};this.Pause=function(){var a=true;try{if(b.PlayState==PLAYSTATE.PLAYING)window.clearTimeout(c),b.PlayState=PLAYSTATE.PAUSED,b.onPlayStateChange(b)}catch(e){a=false,b.Log("Pause",LOG.EXCEPTION,"",e)}return a};
this.Stop=function(){var c=true;try{if(b.m_ClearMetatData()==false)throw"Error @ m_ClearMetatData";b.PlayState=PLAYSTATE.STOPPED;a.Hide();e.style.visibility="hidden"}catch(d){c=false,b.Log("Stop",LOG.EXCEPTION,"",d)}return c};this.m_ClearMetatData=function(){var a=true;try{window.clearInterval(c),c=0,b.Timeleft=b.Duration}catch(e){a=false,b.Log("m_ClearMetatData",LOG.EXCEPTION,"",e)}return a};this.m_ManageCRDisplay=function(){try{if(b.Timeleft<0){if(e.style.visibility="visible",a.Show(),b.m_ClearMetatData(),
b.PlayState=PLAYSTATE.PLAYENDED,b.HideOnPlayComplete==true)e.style.visibility="hidden",a.Hide()}else a.Visibility==false?(e.style.visibility="visible",a.Show()):(e.style.visibility="hidden",a.Hide()),b.PlayState=PLAYSTATE.PLAYING,b.Timeleft-=b.Interval}catch(c){b.PlayState=PLAYSTATE.ERROR,b.Log("m_ManageCRDisplay",LOG.EXCEPTION,"",c)}try{if(b.PlayState==PLAYSTATE.ERROR&&b.m_ClearMetatData(),b.onPlayStateChange(b),b.PlayState==PLAYSTATE.PLAYENDED&&b.Rewind==true)b.PlayState=PLAYSTATE.READY}catch(d){b.Log("m_ManageCRDisplay",
LOG.EXCEPTION,"2nd",d)}};this.GetBoundingRect=function(){return a.GetBoundingRect()}}
function clsNavigationRegionPlayer(d){function b(){try{if(c.onNavigationRegionClicked==null)throw"Error @onNavigationRegionClicked";g_objGS.General.ActiveMode==MODETYPE.TEST&&g_objEpnPlayer.m_TMVisitedNavRegions.push(c.NavRegionId);c.onNavigationRegionClicked(c)}catch(a){c.Log("ME_NavRegionClicked",LOG.EXCEPTION,"2nd",a)}}clsPlayerBase.call(this,"clsNavigationRegionPlayer",d);var c=this,e;this.POType=PLAYABLEOBJECTTYPES.NAVIGATIONREGION;this.Type=CONTROLREGION.RECTANGLE;this.Left=new Number(0);this.Top=
new Number(0);this.Width=new Number(0);this.Height=new Number(0);this.Thickness=new Number(0);this.Color=new String("");this.BGColor=new String("");this.PlayState=PLAYSTATE.NONE;this.CaptionText="";this.Rewind=false;this.Buffer=0;this.MinimumHeight=false;this.BorderColor=new String("");this.GradiantColor=new String("");this.DisabledColor=new String("");this.onNavigationRegionClicked=null;this.Start=new String("");this.End=new String("");this.Jump=new String("");this.NavRegionId="";this.EndCompleted=
false;this.Initialize=function(a){var b=true;try{if(c.Initialized==PLAYSTATE.INITIALIZED)throw"Already Initizlized";if(a==null)throw"holderDiv not supplied";var d=c.CreateHTMLElement("DIV");d.style.display=g_inline;a.appendChild(d);e=document.getElementById(d.id);e.dir=uid_json.settings.template.rtl;e.style.textAlign="center";try{e.style.verticalAlign="center"}catch(g){}c.ID=c.GetUniqueID();c.Initialized=PLAYSTATE.INITIALIZED}catch(k){b=false,c.Log("Initialize",LOG.EXCEPTION,"",k)}return b};this.Load=
function(){var a=true;try{if(c.Initialized==PLAYSTATE.NOTINITIALIZED)throw"Object not initialized";c.Left*=g_objGS.General.ResizeFactor;c.Top*=g_objGS.General.ResizeFactor;c.Width*=g_objGS.General.ResizeFactor;c.Height*=g_objGS.General.ResizeFactor;c.Left-=c.Buffer;c.Top-=c.Buffer;c.Width+=c.Buffer*2;c.Height+=c.Buffer*2;if(c.MinimumHeight==true&&c.Height<20)c.Height=20;if(c.Left<0)c.Left=0;if(c.Top<0)c.Top=0;c.Timeleft=c.Duration;e.innerHTML=c.CaptionText;var d=false;if(g_objGS.General.ActiveMode==
MODETYPE.TEST)for(var n in g_objEpnPlayer.m_TMVisitedNavRegions)if(g_objEpnPlayer.m_TMVisitedNavRegions[n]==c.NavRegionId){d=true;break}d==false?(c.EndCompleted=false,e.onclick=b,e.style.cursor="pointer",uid_json.settings.general.transparentnr=="0"?uid_json.settings.general.overridenrcolor=="1"?BROWSER.LEGACY==false?e.setAttribute("class","button_active"):e.style.cssText=g_GetCSSForTD(uid_json.psim.layout.specs.variationoption_active.css):(e.style.cssText=g_GetCSSForTD(uid_json.psim.layout.specs.navigationregion.css),
e.style.borderColor=c.BorderColor,BROWSER.LEGACY==false?e.style.backgroundImage="linear-gradient(to bottom,"+c.BGColor+","+c.GradiantColor+")":e.style.backgroundColor=c.BGColor):e.style.cssText=g_GetCSSForTD(uid_json.psim.layout.specs.navigationregion.css)):(e.onclick=null,uid_json.settings.general.transparentnr=="0"?uid_json.settings.general.overridenrcolor!="1"?(e.style.cssText=g_GetCSSForTD(uid_json.psim.layout.specs.navigationregion.css),e.style.borderColor=c.BorderColor,BROWSER.LEGACY==false?
e.style.backgroundImage="linear-gradient(to bottom,"+c.DisabledColor+","+c.DisabledColor+")":e.style.backgroundColor=c.BGColor,e.style.cursor="default"):BROWSER.LEGACY==false?e.setAttribute("class","button_disabled"):(uid_json.psim.layout.specs.variationoption_disabled.css.fc="#000",e.style.cssText=g_GetCSSForTD(uid_json.psim.layout.specs.variationoption_disabled.css)):e.style.cssText=g_GetCSSForTD(uid_json.psim.layout.specs.navigationregion.css),e.style.cursor="default");e.style.padding="0px";e.style.left=
c.Left+"px";e.style.top=c.Top+"px";e.style.width=c.Width+"px";e.style.height=c.Height+"px";e.style.lineHeight=c.Height+"px";e.style.zIndex=ZINDEX.NAVREGION;e.style.visibility="hidden";e.style.position="absolute";c.PlayState=PLAYSTATE.READY}catch(g){a=false,c.Log("Load",LOG.EXCEPTION,"",g)}return a};this.Hide=function(){var a=true;try{if(c.Initialized==PLAYSTATE.INITIALIZED)e.style.visibility="hidden"}catch(b){a=false,c.Log("Hide",LOG.EXCEPTION,"",b)}return a};this.Play=function(){var a=true;try{if(c.onPlayStateChange==
null)throw"onPlayStateChange event not binded";e.innerHTML=this.CaptionText;e.style.visibility="visible";c.PlayState=PLAYSTATE.PLAYENDED;c.onPlayStateChange(c);if(c.Rewind==true)c.PlayState=PLAYSTATE.READY}catch(b){a=false,c.Log("Play",LOG.EXCEPTION,"",b)}return a};this.Pause=function(){var a=true;try{if(c.PlayState==PLAYSTATE.PLAYING)c.PlayState=PLAYSTATE.PAUSED,c.onPlayStateChange(c)}catch(b){a=false,c.Log("Pause",LOG.EXCEPTION,"",b)}return a};this.Stop=function(){var a=true;try{c.PlayState=PLAYSTATE.STOPPED,
e.style.visibility="hidden"}catch(b){a=false,c.Log("Stop",LOG.EXCEPTION,"",b)}return a}}
clsCssCSN=function(d){function b(a,b){try{try{a.style.left="",a.style.right="",a.style.top="",a.style.bottom=""}catch(c){throw f.Log("ResetStyles",LOG.EXCEPTION,"",c),"Error @ ResetStyles";}a.style.borderColor=(b?G:D)+" transparent";b?(h=N+L-1,t=-h-L,w=I+L-1,l=M):(h=N,t=-h,w=I,l=M+L-1);a.style.borderTopWidth=(A[0]=="N"?0:h)+"px";a.style.borderBottomWidth=(A[0]=="N"?h:0)+"px";a.style.borderRightWidth=w+"px";a.style.borderLeftWidth=w+"px";if(A[0]=="N")a.style.top=t+"px";if(A[0]=="S")a.style.bottom=
t+"px";if(A[1]=="W")a.style.left=l+"px";if(A[1]=="E")a.style.right=l+"px"}catch(e){throw f.Log("PositionArrow",LOG.EXCEPTION,"",e),"Error @ PositionArrow";}}function c(a){try{a.style.position="absolute",a.style.borderStyle="solid",a.style.display="block",a.style.width="0px",a.style.content="",a.style.visibility="visible",a.style.zIndex=ZINDEX.CALLOUT}catch(b){throw f.Log("SetArrowStyles",LOG.EXCEPTION,"",b),"Error @ SetArrowStyles";}}function e(){var a=true;try{if(f.UIDCSSSETTING==null)f.UIDCSSSETTING=
uid_json.settings.callout.csscsn;f.UIDCSS=f.QSD==true&&uid_json.settings.callout.csscsnqsd.enable=="1"?uid_json.settings.callout.csscsnqsd.css:uid_json.settings.callout.csscsn.css;if(f.UIDCSSSETTING.separatestickynotecss=="1"&&f.Type==ANNOTATION.STICKYNOTE&&f.QSD==false)f.UIDCSS=uid_json.settings.callout.csscsn.stickynotecss.css}catch(b){a=false,f.Log("ReadSettings",LOG.EXCEPTION,"",b)}return a}function a(){try{if(f.UIDCSS.bc!=void 0)G=f.UIDCSS.bc;if(f.UIDCSS.bgc!=void 0)D=f.UIDCSS.bgc;if(f.UIDCSS.gc!=
void 0)r=f.UIDCSS.gc;f.UIDCSS.bw!=void 0&&(L=Number(f.UIDCSS.bw.replace("px","")));f.UIDCSS.pd!=void 0&&(K=Number(f.UIDCSS.pd.replace("px","")));if(f.UIDCSS.br!=void 0)T=f.UIDCSS.br;if(f.UIDCSS.bs!=void 0)F=f.UIDCSS.bs;I=Number(f.UIDCSSSETTING.arrowbasewidth);N=Number(f.UIDCSSSETTING.arrowheight);M=Number(f.UIDCSSSETTING.arrowleft);f.UIDCSSSETTING.separatestickynotecss=="1"&&f.Type==ANNOTATION.STICKYNOTE&&f.QSD==false?(H=f.UIDCSSSETTING.stickynotecss.shadowcolor,C=f.UIDCSSSETTING.stickynotecss.shadowtop,
J=f.UIDCSSSETTING.stickynotecss.shadowbottom):(H=f.UIDCSSSETTING.shadowcolor,C=f.UIDCSSSETTING.shadowtop,J=f.UIDCSSSETTING.shadowbottom)}catch(a){throw f.Log("ReadTemplateProps",LOG.EXCEPTION,"",a),"Error @ HideArrows";}}clsPlayerBase.call(this,"clsCssCSN",d);var f=this,n=null,g,k,o,v,p,q,E,u,B,A,G="",D="",r="",H="",C="",J="",I,L,N,M,K,F,T;this.Type=ANNOTATION.NONE;this.Height=this.Width=this.Top=this.Left=0;this.Text="";this.Orientation=ORIENTATION.NONE;this.Shape=SHAPES.NONE;this.ImageKey="";this.EnableHeader=
this.AutoAnnotation=this.RolllOverNotes=false;this.UIDCSSSETTING=this.UIDCSS=null;this.QSD=false;this.onHide=null;this.Initialize=function(b){var d=true;try{if(n!=null)throw"Already Created";if(b==null)throw"holderDiv not supplied";f.holderDiv=b;e();a();try{n=f.CreateHTMLElement("div"),n.style.borderRadius=T,n.style.borderStyle=F,n.style.visibility="visible",n.style.zIndex=ZINDEX.CALLOUT,k=document.createElement("div"),o=document.createElement("div"),c(k),c(o),g=document.createElement("div"),g.style.position=
"absolute",g.style.visibility="visible",g.style.color=f.UIDCSS.fc,n.appendChild(k),n.appendChild(o),n.appendChild(g),f.holderDiv.appendChild(n)}catch(p){throw f.Log("CreateDIVs",LOG.EXCEPTION,"",p),"Error @ CreateDIVs";}}catch(u){d=false,f.Log("Initialize",LOG.EXCEPTION,"",u)}return d};this.Load=function(){var c=true;try{e();a();g.style.color=f.UIDCSS.fc;g.style.fontFamily=uid_json.settings.callout.defaultfontfamily;g.style.fontSize=uid_json.settings.callout.defaultfontsize;switch(f.Orientation){case ORIENTATION.NW:A=
"NW";break;case ORIENTATION.NE:A="NE";break;case ORIENTATION.SE:A="SE";break;case ORIENTATION.SW:A="SW"}try{f.Type==ANNOTATION.CALLOUT?(v=Math.round(0.9506*f.Width),p=Math.round(f.Height-(f.Height-f.Height*0.83))):(v=Math.round((f.RolllOverNotes?0.9:0.96)*f.Width),p=Math.round(0.83*f.Height)),q=v+2*K,E=p+2*K,f.Type==ANNOTATION.CALLOUT?(u=A[1]=="W"?f.Left-M-I-L-1:f.Left+M+I+L-1,B=A[0]=="N"?f.Top+N+L:f.Top+f.Height-E-N-L-L-1):(u=f.Left,B=f.Top)}catch(d){throw f.Log("CalculatePositions",LOG.EXCEPTION,
"",d),"Error @ CalculatePositions";}try{n.style.left=u+"px",n.style.top=B+"px",n.style.width=q+"px",n.style.height=E+"px",n.style.borderWidth=L+"px",n.style.borderColor=G,f.Type==ANNOTATION.STICKYNOTE?(n.style.boxShadow=H!=""?C+" "+J+" "+H:"",r!=""?n.style.backgroundImage="linear-gradient(to bottom, "+D+","+r+")":n.style.backgroundColor=D):(n.style.boxShadow="",r!=""?n.style.backgroundImage="linear-gradient("+(A[0]=="N"?"to bottom":"to top")+", "+D+","+r+")":n.style.backgroundColor=D)}catch(F){throw f.Log("PositionCalloutBase",
LOG.EXCEPTION,"",F),"Error @ PositionCalloutBase";}if(f.Type==ANNOTATION.CALLOUT)b(k,true),b(o,false);else try{k.style.borderLeftWidth=k.style.borderRightWidth="0px",o.style.borderLeftWidth=o.style.borderRightWidth="0px"}catch(z){throw f.Log("HideArrows",LOG.EXCEPTION,"",z),"Error @ HideArrows";}try{g.style.left=K+"px",g.style.top=K+"px",g.style.width=v+"px",g.style.height=p+"px"}catch(T){throw f.Log("PositionTextLayer",LOG.EXCEPTION,"",T),"Error @ PositionTextLayer";}if(f.UIDCSS.fc!=void 0)f.Text=
f.Text.replaceAll("color=#000000","");g.innerHTML=f.Text}catch(Z){c=false,f.Log("Load",LOG.EXCEPTION,"",Z)}return c};this.Show=function(){var a=true;try{n.style.display=""}catch(b){a=false,f.Log("Show",LOG.EXCEPTION,"",b)}return a};this.Hide=function(){var a=true;try{n.style.display="none"}catch(b){a=false,f.Log("Hide",LOG.EXCEPTION,"",b)}return a};this.HideOnClick=function(){var a=true;try{n.style.display="none"}catch(b){a=false,f.Log("HideOnClick",LOG.EXCEPTION,"",b)}return a}};
clsCssOvalCSN=function(d){function b(){if(a.UIDCSS.css.bc!=void 0)B=a.UIDCSS.css.bc;if(a.UIDCSS.css.bgc!=void 0)A=a.UIDCSS.css.bgc;if(a.UIDCSS.css.gc!=void 0)G=a.UIDCSS.css.gc;a.UIDCSS.css.bw!=void 0&&(D=Number(a.UIDCSS.css.bw.replace("px","")));a.UIDCSS.css.pd!=void 0&&a.UIDCSS.css.pd.replace("px","")}function c(b,c){try{try{b.style.left="",b.style.right="",b.style.top="",b.style.bottom=""}catch(e){throw a.Log("ResetStyles",LOG.EXCEPTION,"",e),"Error @ ResetStyles";}b.style.borderColor=(c?B:A)+" transparent";
var d=Math.round(Math.round(Math.sqrt(a.Width*a.Width+a.Height*a.Height)*0.14645)+(c?D*3:-D*(a.Width/a.Height))),f=Math.round(d*0.33);b.style.borderTopWidth=(u[0]=="N"?0:d)+"px";b.style.borderBottomWidth=(u[0]=="N"?d:0)+"px";b.style.borderRightWidth=f+"px";b.style.borderLeftWidth=f+"px";var g=Math.cos(r*Math.PI/180),k=Math.round(-((1-g)*d/2)+(c?0:D*3*g))+"px",n=Math.sin(r*Math.PI/180),p=Math.round(n*d/2-f+(c?0:D*3*n))+"px";switch(u){case "NW":b.style.transform="rotate("+-r+"deg)";b.style.top=k;b.style.left=
p;break;case "NE":b.style.transform="rotate("+r+"deg)";b.style.top=k;b.style.right=p;break;case "SW":b.style.transform="rotate("+r+"deg)";b.style.bottom=k;b.style.left=p;break;case "SE":b.style.transform="rotate("+-r+"deg)",b.style.bottom=k,b.style.right=p}}catch(o){throw a.Log("PositionArrow",LOG.EXCEPTION,"",o),"Error @ PositionArrow";}}function e(b,c){try{b.style.position="absolute",b.style.borderStyle="solid",b.style.display="block",b.style.width="0px",b.style.content="",b.style.visibility="visible",
b.style.zIndex=c?ZINDEX.CALLOUTARROW:ZINDEX.CALLOUT}catch(e){throw a.Log("SetArrowStyles",LOG.EXCEPTION,"",e),"Error @ SetArrowStyles";}}clsPlayerBase.call(this,"clsCssOvalCSN",d);var a=this,f=null,n,g,k,o,v,p,q,E,u,B="",A="",G="",D,r=42;this.Type=ANNOTATION.NONE;this.Height=this.Width=this.Top=this.Left=0;this.Text="";this.Orientation=ORIENTATION.NONE;this.Shape=SHAPES.NONE;this.ImageKey="";this.EnableHeader=this.AutoAnnotation=this.RolllOverNotes=false;this.UIDCSS=null;this.QSD=false;this.onHide=
null;this.Initialize=function(c){try{if(f!=null)throw"Already Created";if(c==null)throw"holderDiv not supplied";a.holderDiv=c;if(a.UIDCSS==null)a.UIDCSS=uid_json.settings.callout.csscsn;b();try{o=a.CreateHTMLElement("div"),o.style.visibility="visible",o.style.zIndex=ZINDEX.CALLOUTARROW,f=a.CreateHTMLElement("div"),f.style.borderStyle=a.UIDCSS.css.bs,f.style.visibility="visible",f.style.zIndex=ZINDEX.CALLOUT,f.style.borderRadius="50%",f.style.borderWidth=D+"px",f.style.borderColor=B,g=document.createElement("div"),
k=document.createElement("div"),e(g,true),e(k,false),n=document.createElement("div"),n.style.position="absolute",n.style.visibility="visible",n.style.zIndex=ZINDEX.CALLOUT+1,n.style.color=a.UIDCSS.css.fc,o.appendChild(f),o.appendChild(g),o.appendChild(k),o.appendChild(n),a.holderDiv.appendChild(o)}catch(d){throw a.Log("CreateDIVs",LOG.EXCEPTION,"",d),"Error @ CreateDIVs";}}catch(p){throw a.Log("Initialize",LOG.EXCEPTION,"",p),"Error @ Initialize";}return true};this.Load=function(){try{b();n.style.color=
a.UIDCSS.css.fc;n.style.fontFamily=uid_json.settings.callout.defaultfontfamily;n.style.fontSize=uid_json.settings.callout.defaultfontsize;switch(a.Orientation){case ORIENTATION.NW:u="NW";break;case ORIENTATION.NE:u="NE";break;case ORIENTATION.SE:u="SE";break;case ORIENTATION.SW:u="SW"}try{Math.round(a.Width*0.701),Math.round(a.Height*0.66),v=a.Width,p=a.Height,q=a.Left,E=a.Top}catch(e){throw a.Log("CalculatePositions",LOG.EXCEPTION,"",e),"Error @ CalculatePositions";}try{o.style.left=q-(u[1]=="W"?
0:+D*2)+"px",o.style.top=E-(u[0]=="N"?0:+D*2)+"px",o.style.width=v+D*2+"px",o.style.height=p+D*2+"px",f.style.width=v+"px",f.style.height=p+"px",G!=""?f.style.backgroundImage="linear-gradient("+(u[0]=="N"?"to bottom":"to top")+", "+A+","+G+")":f.style.backgroundColor=A}catch(d){throw a.Log("PositionCalloutBase",LOG.EXCEPTION,"",d),"Error @ PositionCalloutBase";}if(a.Type==ANNOTATION.CALLOUT)c(g,true),c(k,false);else try{g.style.borderLeftWidth=g.style.borderRightWidth="0px",k.style.borderLeftWidth=
k.style.borderRightWidth="0px"}catch(r){throw a.Log("HideArrows",LOG.EXCEPTION,"",r),"Error @ HideArrows";}try{n.style.left=D+Math.round(a.Width*0.15)+"px",n.style.top=D+Math.round(a.Height*0.17)+"px",n.style.width=Math.round(a.Width*0.701)+"px",n.style.height=Math.round(a.Height*0.66)+"px"}catch(B){throw a.Log("PositionTextLayer",LOG.EXCEPTION,"",B),"Error @ PositionTextLayer";}if(a.UIDCSS.css.fc!=void 0)a.Text=a.Text.replaceAll("color=#000000","");n.innerHTML=a.Text}catch(L){throw a.Log("Load",
LOG.EXCEPTION,"",L),"Error @ Load";}return true};this.Show=function(){try{o.style.display="",f.style.display=""}catch(b){throw a.Log("Show",LOG.EXCEPTION,"",b),"Error @ Show";}return true};this.Hide=function(){try{o.style.display="none",f.style.display="none"}catch(b){throw a.Log("Hide",LOG.EXCEPTION,"",b),"Error @ Hide";}return true};this.HideOnClick=function(){try{o.style.display="none",f.style.display="none"}catch(b){throw a.Log("HideOnClick",LOG.EXCEPTION,"",b),"Error @ HideOnClick";}return true}};
clsImageCSN=function(d){clsPlayerBase.call(this,"clsImageCSN",d);var b=this,c,e=null,a,f=null,n=3,g=0,k=0,o=0,v=0,p=25;new Number(2);this.Type=ANNOTATION.NONE;this.Height=this.Width=this.Top=this.Left=0;this.Text="";this.Orientation=ORIENTATION.NONE;this.Shape=SHAPES.NONE;this.ImageKey="";this.EnableHeader=this.AutoAnnotation=this.RolllOverNotes=false;this.onHide=null;this.Initialize=function(d){var E=true;try{if(e!=null)throw"Alrerady Created";if(d==null)throw"holderDiv not supplied";n=Number(uid_json.settings.callout.custom.border);
g=Number(uid_json.settings.callout.custom.pdl);k=Number(uid_json.settings.callout.custom.pdt);o=Number(uid_json.settings.callout.custom.pdr);v=Number(uid_json.settings.callout.custom.pdb);p=Number(uid_json.settings.callout.custom.headerheight);var u=b.CreateHTMLElement("div");u.style.backgroundColor="red";d.appendChild(u);e=document.getElementById(u.id);e.style.zIndex=ZINDEX.CALLOUT;var B=b.CreateHTMLElement("img");B.style.zIndex=ZINDEX.CALLOUT;B.style.visibility="visible";B.style.display=g_inline;
e.appendChild(B);c=document.getElementById(B.id);c.onmousedown=function(a){(g_objGS.General.ActiveMode==MODETYPE.GUIDE||g_objGS.General.ActiveMode==MODETYPE.TEST)&&g_objEHS.FireMouseDown(a)};c.onmouseup=function(a){(g_objGS.General.ActiveMode==MODETYPE.GUIDE||g_objGS.General.ActiveMode==MODETYPE.TEST)&&g_objEHS.FireMouseUp(a)};if(b.EnableHeader==true){var A=b.CreateHTMLElement("div");A.style.zIndex=ZINDEX.CALLOUT;A.style.visibility="visible";A.style.overflow="hidden";A.style.backgroundColor=uid_json.settings.callout.custom.bodycolor;
A.style.border="0px solid #00aa00";A.style.display=g_inline;e.appendChild(A);f=document.getElementById(A.id)}var G;G=uid_json.settings.callout.css!=void 0?b.CreateTextHolder(uid_json.settings.callout):b.CreateHTMLElement("div");G.style.zIndex=ZINDEX.CALLOUT;G.style.visibility="visible";G.style.overflow="hidden";G.style.border="0px solid #f00";G.style.display=g_inline;G.style.fontFamily=uid_json.settings.callout.defaultfontfamily;G.style.fontSize=uid_json.settings.callout.defaultfontsize;G.dir=uid_json.settings.template.rtl;
e.appendChild(G);a=document.getElementById(G.id);c.style.zIndex=ZINDEX.CALLOUT;a.style.zIndex=ZINDEX.CALLOUT;b.Initialized=PLAYSTATE.INITIALIZED}catch(D){E=false,b.Log("Initialize",LOG.EXCEPTION,"",D)}return E};this.Load=function(){var d=true;try{if(b.EnableHeader==false){if(f!=null)f.style.display="none"}else if(f!=null)f.style.display=g_inline;c.width=b.Width;c.height=b.Height;e.style.left=b.Left+"px";e.style.top=b.Top+"px";var E=g_objIPL.GetBasicImage(b.ImageKey);if(E==null)throw"Imageobject is null";
if(E.complete==false||E.src=="")throw"image not loaded for";c.src=E.ImagePath;if(b.EnableHeader==true){E=true;try{if(b.Type==ANNOTATION.STICKYNOTE){if(b.EnableHeader==true)f.style.display="none";a.style.left=b.Width-b.Width*0.98+"px";a.style.top=b.Height-b.Height*0.83+"px";a.style.width=b.RolllOverNotes==true?b.Width-2*(b.Width-b.Width*0.95)+"px":b.Width-2*(b.Width-b.Width*0.98)+"px";a.style.height=b.Height-(b.Height-b.Height*0.83)+"px"}else if(b.Shape==SHAPES.OVAL)a.style.left=b.Width*0.15+"px",
a.style.top=b.Height*0.2+"px",a.style.width=b.Width*0.701+"px",a.style.height=b.Height*0.66+"px";else{var u=0,B=0,u=b.Height*0.34,B=b.Height-u,A=b.Width-n*2-(g+o),B=B-(k+v)-n-2,G=b.Width-n*2,D=B-p;a.style.paddingLeft=g+"px";a.style.paddingRight=o+"px";a.style.paddingTop=k+"px";a.style.left=n+"px";a.style.width=A+"px";a.style.height=B+"px";f.style.width=G+"px";f.style.height=D+"px";f.style.left=a.style.left;if(b.Orientation==ORIENTATION.NE||b.Orientation==ORIENTATION.NW)a.style.top=u+"px",f.style.top=
u+p+"px";else if(b.Orientation==ORIENTATION.SE||b.Orientation==ORIENTATION.SW)a.style.top=n+"px",f.style.top=n+p+2+"px"}}catch(r){E=false,b.Log("SetTextBoxProperties",LOG.EXCEPTION,"",r)}if(E==false)throw"Error @ SetTextBoxPropertiesCustom";}else{A=true;try{if(b.Type==ANNOTATION.STICKYNOTE)a.style.left=b.Width-b.Width*0.98+"px",a.style.top=b.Height-b.Height*0.83+"px",a.style.width=b.RolllOverNotes==true?b.Width-2*(b.Width-b.Width*0.95)+"px":b.Width-2*(b.Width-b.Width*0.98)+"px",a.style.height=b.Height-
(b.Height-b.Height*0.83)+"px";else if(b.Shape==SHAPES.OVAL)a.style.left=b.Width*0.15+"px",a.style.top=b.Height*0.2+"px",a.style.width=b.Width*0.701+"px",a.style.height=b.Height*0.66+"px";else if(B=u=E=G=0,G=b.Width*0.01,E=b.Height*0.4,u=b.Width-2*G,u-=u*0.03,B=b.Height-(G+E),B-=B*0.11,b.Orientation==ORIENTATION.NE||b.Orientation==ORIENTATION.NW)a.style.left=G+3+"px",a.style.top=E+"px",a.style.width=u+"px",a.style.height=B+"px";else if(b.Orientation==ORIENTATION.SE||b.Orientation==ORIENTATION.SW)a.style.left=
G+3+"px",a.style.top=G+G*0.95+"px",a.style.width=u+"px",a.style.height=B+"px"}catch(H){A=false,b.Log("SetTextBoxProperties",LOG.EXCEPTION,"",H)}if(A==false)throw"Error @ SetTextBoxProperties";}if(uid_json.settings.callout.applystickynotemargin=="1"&&b.Type==ANNOTATION.STICKYNOTE)c.width=b.Width+Number(uid_json.settings.callout.stickynotemargin)*2,a.style.left=Number(uid_json.settings.callout.stickynotemargin)+"px",a.style.top=Number(uid_json.settings.callout.stickynotemargin)+"px";if(uid_json.settings.callout.css.fc!=
void 0&&uid_json.settings.callout.css.fc!="")b.Text=b.Text.replaceAll("color=#000000","");a.innerHTML=b.Text}catch(C){d=false,b.Log("Load",LOG.EXCEPTION,"",C)}return d};this.Show=function(){var a=true;try{e.style.display=g_inline,c.style.display=g_inline}catch(d){a=false,b.Log("Show",LOG.EXCEPTION,"",d)}return a};this.Hide=function(){var a=true;try{if(c.style.display="none",e.style.display="none",b.onHide!=null)b.onHide()}catch(d){a=false,b.Log("Hide",LOG.EXCEPTION,"",d)}return a};this.HideOnClick=
function(){var a=true;try{e.onclick=b.Hide}catch(c){a=false,b.Log("HideOnClick",LOG.EXCEPTION,"",c)}return a}};
clsCalloutStickynotePlayer=function(d){clsPlayerBase.call(this,"clsCalloutStickynotePlayer",d);var b=this,c=null,e=null,a=null;this.POType=PLAYABLEOBJECTTYPES.CALLOUTSTICKY;this.Type=ANNOTATION.NONE;this.Height=this.Width=this.Top=this.Left=0;this.Text="";this.Orientation=ORIENTATION.NONE;this.Shape=SHAPES.NONE;this.ImageKey="";this.Duration=new Number(0);this.DurationOrg=new Number(0);this.PlayState=PLAYSTATE.NONE;this.AutoAnnotation=this.RolllOverNotes=this.Rewind=false;this.Seq=0;this.ID="";this.QSD=
false;this.AudioSrc="";var f=this.onHide=this.objCRData=null,n=null,g=null,k=null,o=false,v=null;this.Initialize=function(a){var c=true;try{if(a==null)throw"holderDiv not supplied";v=a;b.ID=b.GetUniqueID();uid_json.settings.callout.custom!=void 0&&uid_json.settings.callout.custom.enable=="1"&&(o=true);b.Initialized=PLAYSTATE.INITIALIZED}catch(e){c=false,b.Log("Initialize",LOG.EXCEPTION,"",e)}return c};this.Load=function(){var d=true;try{if(b.Type!=ANNOTATION.CALLOUT&&b.Type!=ANNOTATION.STICKYNOTE)throw"Type (Callout/Sticky) not specified. The current Type is "+
b.Type;var q=false;uid_json.settings.callout.csscsn!=void 0&&BROWSER.LEGACY==false&&uid_json.settings.callout.csscsn.enable=="1"&&(q=true);q==false&&b.QSD==true&&uid_json.settings.callout.csscsnqsd!=void 0&&BROWSER.LEGACY==false&&uid_json.settings.callout.csscsnqsd.enable=="1"&&(q=true);if(q==true){if(b.Type==ANNOTATION.CALLOUT&&b.Shape==SHAPES.OVAL){if(g==null){g=new clsCssOvalCSN(b.ObjectName+"-CSSOval");g.EnableHeader=o;if(g.Initialize(v)==false)throw"Error @ m_objCssOvalCSN.Create";g.onHide=b.onHide}g.UIDCSS=
b.QSD==true?uid_json.settings.callout.csscsnqsd:uid_json.settings.callout.csscsn;k=g}else{if(n==null){n=new clsCssCSN(b.ObjectName+"-CSS");n.EnableHeader=o;n.Type=b.Type;n.QSD=b.QSD;if(n.Initialize(v)==false)throw"Error @ m_objCssCSN.Create";n.onHide=b.onHide}n.UIDCSS=b.QSD==true?uid_json.settings.callout.csscsnqsd:uid_json.settings.callout.csscsn;k=n}if(f!=null&&f.Hide()==false)throw"Error @ m_objImgCSN.Hide";}else{if(f==null){f=new clsImageCSN(b.ObjectName+"-CSS");f.EnableHeader=o;if(f.Initialize(v)==
false)throw"Error @ m_objImgCSN.Create";f.onHide=b.onHide}k=f;if(n!=null&&n.Hide()==false)throw"Error @ m_objCssCSN.Hide";}b.EnableHeader=false;if(uid_json.settings.callout.custom!=void 0&&uid_json.settings.callout.custom.enable=="1"&&(b.AutoAnnotation==false||uid_json.settings.callout.custom.skipauto=="0"))b.EnableHeader=true;iCLeft=new Number(0);iCTop=new Number(0);if(b.Type==ANNOTATION.STICKYNOTE)iCLeft=b.Left*g_objGS.General.ResizeFactor,iCTop=b.Top*g_objGS.General.ResizeFactor;else if(b.Type==
ANNOTATION.CALLOUT){var E=new Number(0),u=new Number(0);b.Orientation==ORIENTATION.SW?(iCLeft=Number(b.Left)*g_objGS.General.ResizeFactor,u=Number(b.Top)+Number(b.Height),u*=g_objGS.General.ResizeFactor,iCTop=u-Number(b.Height)):b.Orientation==ORIENTATION.SE?(E=Number(b.Left)+Number(b.Width),u=Number(b.Top)+Number(b.Height),E*=g_objGS.General.ResizeFactor,u*=g_objGS.General.ResizeFactor,iCLeft=E-Number(b.Width),iCTop=u-Number(b.Height)):b.Orientation==ORIENTATION.NE&&(iCTop=Number(b.Top)*g_objGS.General.ResizeFactor,
E=Number(b.Left)+Number(b.Width),E*=g_objGS.General.ResizeFactor,iCLeft=E-Number(b.Width));b.Orientation==ORIENTATION.NW&&(iCLeft=Number(b.Left)*g_objGS.General.ResizeFactor,iCTop=Number(b.Top)*g_objGS.General.ResizeFactor)}b.Left=iCLeft;b.Top=iCTop;if(uid_json.settings.callout.css.fc!=void 0)b.Text=b.Text.replaceAll("color=#000000","");b.Text.innerHTML=b.Text.HTMLDecode();k.Type=b.Type;k.Left=b.Left;k.Top=b.Top;k.Width=b.Width;k.Height=b.Height;k.Text=b.Text;k.Orientation=b.Orientation;k.Shape=b.Shape;
k.ImageKey=b.ImageKey;k.ZIndex=b.ZIndex;k.RolllOverNotes=b.RolllOverNotes;k.AutoAnnotation=b.AutoAnnotation;k.EnableHeader=b.EnableHeader;k.QSD=b.QSD;if(k.Load()==false)throw"Error @ m_objActive.Load";e=c=null;if(b.AudioSrc!=""){e=new clsAudioPlayer;if(e.Initialize()==false)throw"Erroro @ m_ObjAudio.Initialize";e.onPlayStateChange=b.m_ObjAudio_onPlayStateChange;e.onLoadComplete=b.m_ObjAudio_onLoadComplete;if(e.Load(b.AudioSrc)==false)throw"Error @ m_ObjAudio.Load";}else if(b.Duration>0){c=new clsDelayPlayer;
c.onPlayStateChange=b.m_ObjDelay_onPlayStateChange;if(c.Initialize()==false)throw"Error @ objDelay.Initialize";c.Duration=b.Duration;b.Log("Load",LOG.TRACE,"Delay @ CSN = "+b.ObjectName,c.Duration);if(c.Load()==false)throw"Error @ m_ObjDelay.Load";}if(b.objCRData!=null){a=new clsControlRegionPlayer;if(a.Initialize(v)==false)throw"Erroro @ m_ObjCRPlayer.Initialize";a.onPlayStateChange=b.m_objCRPlayer_onPlayStateChange;a.onLoadComplete=b.m_objCRPlayer_onLoadComplete;if(b.LoadControlRegion()==false)throw"Error @ LoadControlRegion";
if(b.AudioSrc==""&&a.Load()==false)throw"Error @ ControlRegion.Load";}if(b.AudioSrc==""&&b.objCRData==null)b.PlayState=PLAYSTATE.READY}catch(B){d=false,b.Log("Load",LOG.EXCEPTION,"",B)}return d};this.Play=function(){var d=true;try{if(b.onPlayStateChange==null)throw"onPlayStateChange event not binded";if(b.PlayState==PLAYSTATE.READY||b.PlayState==PLAYSTATE.PAUSED||b.PlayState==PLAYSTATE.STOPPED){if(k.Show()==false)throw"Error @ m_objActive.Show";b.objCRData!=null&&a.Play();b.PlayState=PLAYSTATE.PLAYING;
if(b.AudioSrc!=""&&g_objGS.General.AudioButtonEnabled==true){if(e.Play()==false)throw"Error @ m_ObjAudio.Play";if(g_objTR.SetAudioAnimation(true)==false)throw"Error @ g_objTR.SetAudioAnimation";}else if(c!=null){if(c.Play()==false)throw"Error @ m_ObjDelay.Stop";}else b.ManageCalloutDisplay()}}catch(f){d=false,b.Log("Play",LOG.EXCEPTION,"",f)}return d};this.Pause=function(){var d=true;try{if(b.PlayState==PLAYSTATE.PLAYING){if(b.AudioSrc!=""&&g_objGS.General.AudioButtonEnabled==true){if(e.Pause()==
false)throw"Error @ m_ObjAudio.Pause";if(g_objTR.SetAudioAnimation(false)==false)throw"Error @ g_objTR.SetAudioAnimation";}else if(c!=null&&c.Pause()==false)throw"Error @ m_ObjDelay.Pause";a!=null&&a.Pause();b.PlayState=PLAYSTATE.PAUSED;b.onPlayStateChange(b)}}catch(f){d=false,b.Log("Pause",LOG.EXCEPTION,"",f)}return d};this.Stop=function(){var d=true;try{if(k.Hide()==false)throw"Error @ m_objActive.Hide";if(b.AudioSrc!=""&&g_objGS.General.AudioButtonEnabled==true){if(e.Stop()==false)throw"Error @ m_ObjAudio.Stop";
if(g_objTR.SetAudioAnimation(false)==false)throw"Error @ g_objTR.SetAudioAnimation";}else if(c!=null&&c.Stop()==false)throw"Error @ m_ObjDelay.Stop";a!=null&&a.Stop();b.PlayState=PLAYSTATE.STOPPED}catch(f){d=false,b.Log("Stop",LOG.EXCEPTION,"",f)}return d};this.StopAudio=function(){var a=true;try{if(b.PlayState==PLAYSTATE.PLAYING&&b.AudioSrc!=""){if(e.Stop()==false)throw"Error @ m_ObjAudio.Stop";if(g_objTR.SetAudioAnimation(false)==false)throw"Error @ g_objTR.SetAudioAnimation";b.ManageCalloutDisplay()}}catch(c){a=
false,b.Log("StopAudio",LOG.EXCEPTION,"",c)}return a};this.ManageCalloutDisplay=function(){var a=true;try{if(b.PlayState=PLAYSTATE.PLAYENDED,b.onPlayStateChange(b),b.Rewind==true)b.PlayState=PLAYSTATE.READY}catch(c){a=false,b.Log("ManageCalloutDisplay",LOG.EXCEPTION,"",c)}return a};this.Hide=function(){var e=true;try{if(k.Hide()==false)throw"Error @ m_objActive.Hide";if(c!=null&&c.Stop()==false)throw"Error @ m_ObjDelay.Stop";a!=null&&a.Hide()}catch(d){e=false,b.Log("Hide",LOG.EXCEPTION,"",d)}return e};
this.HideOnClick=function(){var a=true;try{if(k.HideOnClick()==false)throw"Error @ m_objActive.HideOnClick";}catch(c){a=false,b.Log("HideOnClick",LOG.EXCEPTION,"",c)}return a};this.m_ObjDelay_onPlayStateChange=function(){try{c.PlayState==PLAYSTATE.PLAYENDED&&(a!=null?a.PlayState==PLAYSTATE.PLAYENDED&&b.ManageCalloutDisplay():b.ManageCalloutDisplay())}catch(e){b.Log("m_ObjDelay_onPlayStateChange",LOG.EXCEPTION,"",e),b.PlayState=PLAYSTATE.ERROR}};this.m_ObjAudio_onPlayStateChange=function(){try{if(e.PlayState==
PLAYSTATE.PLAYENDED){if(g_objTR.SetAudioAnimation(false)==false)throw"Error @ g_objTR.SetAudioAnimation";a!=null?a.PlayState==PLAYSTATE.PLAYENDED&&b.ManageCalloutDisplay():b.ManageCalloutDisplay()}}catch(c){b.Log("m_ObjAudio_onPlayStateChange",LOG.EXCEPTION,"",c)}};this.m_ObjAudio_onLoadComplete=function(c){try{if(b.objCRData==null)b.PlayState=PLAYSTATE.READY,b.onLoadComplete(c);else if(a.Load()==false)throw"Error @ ControlRegion.Load";}catch(e){b.Log("m_ObjAudio_onLoadComplete",LOG.EXCEPTION,"",
e)}};this.LoadControlRegion=function(){var c=true;try{var e=b.objCRData.Color;uid_json.settings.controlregion.overidecolor==true&&(e=uid_json.settings.controlregion.outerregioncolor);a.Type=b.objCRData.Shape;a.Left=b.objCRData.Left;a.Top=b.objCRData.Top;a.Width=b.objCRData.Width;a.Height=b.objCRData.Height;a.Thickness=b.objCRData.Thickness;a.Color=e;a.Duration=uid_json.settings.controlregion.blinkduration;a.Interval=uid_json.settings.controlregion.blinkinterval;a.FreeShapeCords=b.objCRData.Cords;
a.MinimumHeight=false;var d=Number(uid_json.settings.mode_show.outerregionbuffer);d==0&&(d=Number(b.objCRData.Thickness));a.Buffer=d;a.HideOnPlayComplete=false;a.EnableBlink=uid_json.settings.controlregion.blinkoption==BLINKMODE.NONE?false:true;a.CaptionText=""}catch(f){c=false,b.Log("LoadControlRegion","",f,LOG.EXCEPTION)}return c};this.m_objCRPlayer_onPlayStateChange=function(){try{a.PlayState==PLAYSTATE.PLAYENDED&&b.AudioSrc==""&&b.Duration<=0&&b.ManageCalloutDisplay()}catch(c){b.Log("m_ObjCRegion_onPlayStateChange",
LOG.EXCEPTION,"",c)}};this.m_objCRPlayer_onLoadComplete=function(a){try{if(b.PlayState=PLAYSTATE.READY,b.onLoadComplete!=void 0)b.onLoadComplete(a)}catch(c){b.Log("m_ObjCRegion_onLoadComplete",LOG.EXCEPTION,"",c)}}};
function clsCalloutStickynoteCollectionPlayer(d){clsPlayerBase.call(this,"clsCalloutStickynoteCollectionPlayer",d);var b=this;this.Objects=null;this.PlayState=PLAYSTATE.NONE;this.POType=PLAYABLEOBJECTTYPES.CALLOUTSTICKYCOLLECTION;this.onHide=null;this.CurIndex=0;this.Initialize=function(){var c=true;try{this.ID=this.GetUniqueID(),b.Initialized=PLAYSTATE.INITIALIZED}catch(e){c=false,b.Log("Initialize",LOG.EXCEPTION,"",e)}return c};this.Load=function(){var c=true;try{if(b.onLoadComplete!=null)b.onLoadComplete(bSuccess);
if(b.Objects==null)throw"ME.Objects=null";if(b.Objects.length==0)throw"ME.Objects.length";b.CurIndex=0;for(x in b.Objects)b.Objects[x].onPlayStateChange=b.CurObject_onPlayStateChange,b.Objects[x].onLoadComplete=b.CurObject_onLoadComplete,b.Log("Load",LOG.TRACE,b.Objects[x].ObjectName+" - Duration",b.Objects[x].Duration);b.IsObjectsReady()}catch(e){c=false,b.Log("Load",LOG.EXCEPTION,"",e)}return c};this.Play=function(){var c=true;try{if(b.onPlayStateChange==null)throw"onPlayStateChange event not binded";
if(b.PlayState==PLAYSTATE.READY||b.PlayState==PLAYSTATE.PAUSED||b.PlayState==PLAYSTATE.STOPPED)if(b.PlayState=PLAYSTATE.PLAYING,b.Objects[b.CurIndex].Play()==false)throw"Error @ CSnObject.Play() for "+b.Objects[b.CurIndex].ObjectName;}catch(e){c=false,b.Log("Play",LOG.EXCEPTION,"",e)}return c};this.Pause=function(){var c=true;try{if(b.PlayState==PLAYSTATE.PLAYING){if(b.Objects[b.CurIndex].Pause()==false)throw"Error @ CSnObject.Pause() for "+b.Objects[b.CurIndex].ObjectName;b.PlayState=PLAYSTATE.PAUSED;
b.onPlayStateChange(b)}}catch(e){c=false,b.Log("Pause",LOG.EXCEPTION,"",e)}return c};this.Stop=function(){var c=true;try{for(x in b.Objects)if(b.Objects[x].Stop()==false)throw"Error @ CSnObject.Stop() for "+b.Objects[x].ObjectName;b.PlayState=PLAYSTATE.STOPPED}catch(e){c=false,b.Log("Stop",LOG.EXCEPTION,"",e)}return c};this.StopAudio=function(){var c=true;try{for(x in b.Objects)if(b.Objects[x].StopAudio!=void 0&&b.Objects[x].StopAudio()==false)throw"Error @ CSnObject.StopAudio() for "+b.Objects[x].ObjectName;
}catch(e){c=false,b.Log("StopAudio",LOG.EXCEPTION,"",e)}return c};this.Hide=function(){var c=true;try{if(b.Objects[b.CurIndex].Hide()==false)throw"Error @ CSnObject.Stop() for "+b.Objects[b.CurIndex].ObjectName;}catch(e){c=false,b.Log("Hide",LOG.EXCEPTION,"",e)}return c};this.CurObject_onPlayStateChange=function(){var c=true;try{if(b.Objects[b.CurIndex].PlayState==PLAYSTATE.PLAYENDED){if(uid_json.settings.callout.hideinsequence=="1"&&b.CurIndex<b.Objects.length-1)if(b.Objects[b.CurIndex].POType!=
PLAYABLEOBJECTS.TUTORIMAGE){if(b.Objects[b.CurIndex].Hide()==false)throw"Error @ CSnObject.Hide() for "+b.Objects[b.CurIndex].ObjectName;}else if(uid_json.settings.callout.hidetutorimginsequence==void 0){if(b.Objects[b.CurIndex].Hide()==false)throw"Error @ CSnObject.Hide() for "+b.Objects[b.CurIndex].ObjectName;}else if(uid_json.settings.callout.hidetutorimginsequence=="1"&&b.Objects[b.CurIndex].Hide()==false)throw"Error @ CSnObject.Hide() for "+b.Objects[b.CurIndex].ObjectName;b.CurIndex++;if(b.CurIndex<
b.Objects.length){if(b.Objects[b.CurIndex].Play()==false)throw"Error @ CSnObject.Play() for "+b.Objects[b.CurIndex].ObjectName;}else b.PlayState=PLAYSTATE.PLAYENDED,b.onPlayStateChange(b)}}catch(e){c=false,b.Log("CurObject_onPlayStateChange",LOG.EXCEPTION,"",e)}return c};this.CurObject_onLoadComplete=function(){try{b.IsObjectsReady()}catch(c){b.Log("CurObject_onLoadComplete",LOG.EXCEPTION,"",c),b.onLoadComplete(false)}};this.IsObjectsReady=function(){try{var c=0;for(x in b.Objects)b.Objects[x].PlayState==
PLAYSTATE.READY&&c++;if(c==b.Objects.length)b.PlayState=PLAYSTATE.READY}catch(e){b.Log("IsObjectsReady",LOG.EXCEPTION,"",e)}}}
function clsContinuePlayer(d){function b(a){try{if(c.Holder!=null&&c.Holder.SetFooterMessage(a)==false)throw"Error @ objContinuePlayer.Holder.SetFooterMessage";if(g_objTR.StatusBar.SetMessage(a)==false)throw"Error @ g_objTR.StatusBar.SetMessage";}catch(b){c.Log("SetMessage",LOG.EXCEPTION,"",b)}}clsPlayerBase.call(this,"clsContinuePlayer",d);var c=this,e=new clsDelayPlayer;this.Duration=new Number(0);this.PlayState=PLAYSTATE.NONE;this.MoveOnTimer=this.ShowContinueButton=false;this.StatusBarMessage=
"";this.Holder=null;this.Visible=true;this.Initialize=function(){var a=true;try{this.Timeleft=this.Duration;e.onPlayStateChange=c.m_ObjDelay_onPlayStateChange;if(e.Initialize()==false)throw"Error @ objDelay.Initialize";this.ID=this.GetUniqueID();c.Initialized=PLAYSTATE.INITIALIZED}catch(b){a=false,c.Log("Initialize",LOG.EXCEPTION,"",b)}return a};this.Load=function(){var a=true;try{var d;d=messages_json.psim.statustext!=void 0?messages_json.psim.statustext:messages_json.psim.canvas.statustext;if(c.Duration==
0)c.Duration=500;e.Duration=c.Duration;if(e.Load()==false)throw"Error @ m_ObjDelay.Load";var n=d.usevcr.text;g_objGS.General.PlayState==PLAYSTATE.PLAYING?n="":g_objGS.General.PlayState==PLAYSTATE.NONE&&(g_objGS.General.HomeAvailable==true?n="":g_objGS.General.ModeIndicatorAvailableStart==true?n="":uid_json.settings.general.autoplay==true&&(n=""));if(b(n)==false)throw"Error @ SetMessage";this.PlayState=PLAYSTATE.READY}catch(g){a=false,c.Log("Load",LOG.EXCEPTION,"",g)}return a};this.Play=function(){var a=
true;try{if(c.onPlayStateChange==null)throw"onPlayStateChange event not binded";if(c.MoveOnTimer==true){if(c.Visible==true&&g_objTR.StatusBar.Show(c.ShowContinueButton)==false)throw"Error @ g_objTR.StatusBar.Show";c.ShowContinueButton==false&&g_objGS.General.ActiveMode==MODETYPE.SHOW&&g_objTR.SetFocus(VCRBUTTON.PLAY);var d=c.StatusBarMessage.replace(/%1/g,Math.ceil(e.Timeleft/1E3));if(b(d)==false)throw"Error @ SetMessage";if(e.Play()==false)throw"Error @ m_ObjDelay.Play";}else if(b(c.StatusBarMessage)==
false)throw"Error @ SetMessage";}catch(n){a=false,c.Log("Play",LOG.EXCEPTION,"",n)}return a};this.Pause=function(){var a=true;try{if(c.MoveOnTimer==true&&e.Pause()==false)throw"Error @ m_ObjDelay.Pause";}catch(b){a=false,c.Log("Pause",LOG.EXCEPTION,"",b)}return a};this.Stop=function(){var a=true;try{if(c.MoveOnTimer==true&&e.Stop()==false)throw"Error @ m_ObjDelay.Stop";}catch(b){a=false,c.Log("Stop",LOG.EXCEPTION,"",b)}return a};this.m_ObjDelay_onPlayStateChange=function(a){try{c.PlayState=a.PlayState;
var e="";if(a.Timeleft>0){if(a.Timeleft%1E3==0&&(e=c.StatusBarMessage.replace(/%1/g,a.Timeleft/1E3),b(e)==false))throw"Error @ SetMessage";}else if(b(e)==false)throw"Error @ SetMessage";}catch(d){c.Log("m_ObjDelay_onPlayStateChange",LOG.EXCEPTION,"",d),c.PlayState=PLAYSTATE.ERROR}c.onPlayStateChange(c)}}
function clsCursorMovePlayer(d){function b(a,b){var c=true;try{var e=b.getContext("2d");if(a==""||a==null||a==void 0)throw"cursor image is null ?";b.setDimensions(a.width,a.height);e.drawImage(a,0,0,a.width,a.height,0,0,a.width,a.height)}catch(d){c=false,f.Log("DrawCursorImage",LOG.EXCEPTION,"",d)}return c}function c(a,b){var c=true;try{A=a,G=b,H<a?(J=CURSORDIRECTION.RIGHT,D=a-H):(J=CURSORDIRECTION.LEFT,D=H-a),C<b?(I=CURSORDIRECTION.DOWN,r=b-C):(I=CURSORDIRECTION.UP,r=C-b),D>r?(u=E,q=D/E,B=q==0?0:
r/q):(B=E,q=r/E,u=q==0?0:D/q)}catch(e){c=false,f.Log("SetCursorMoveProperties",LOG.EXCEPTION,"",e)}return c}function e(){try{if(q-=1,q>=0){switch(J){case CURSORDIRECTION.RIGHT:H+=u;H>A&&(H=A);break;case CURSORDIRECTION.LEFT:H-=u,H<A&&(H=A)}switch(I){case CURSORDIRECTION.DOWN:C+=B;C>G&&(C=G);break;case CURSORDIRECTION.UP:C-=B,C<G&&(C=G)}v.style.left=H-g.width/2+"px";v.style.top=C-g.height/2+"px";if(H==A&&C==G)L=CURSORBUTTON.DOWN;if(f.SetCursors(L)==false)throw"Error @ SetCursors";f.PlayState=PLAYSTATE.PLAYING}else{if(a()==
false)throw"Error @ ClearMetatData";f.PlayState=PLAYSTATE.PLAYENDED}}catch(b){f.PlayState=PLAYSTATE.ERROR,f.Log("ManageMouseMove",LOG.EXCEPTION,"",b)}try{f.PlayState==PLAYSTATE.ERROR&&a(),f.onPlayStateChange(f),f.PlayState!=PLAYSTATE.ERROR&&f.PlayState!=PLAYSTATE.PLAYENDED&&(n=setTimeout(e,Number(uid_json.settings.speed.cursorspeedfactors[uid_json.settings.speed.level])))}catch(c){f.Log("ManageMouseMove",LOG.EXCEPTION,"2",c)}}function a(){try{window.clearInterval(n),n=0}catch(a){f.Log("ClearMetatData",
LOG.EXCEPTION,"",a)}}clsPlayerBase.call(this,"clsCursorMovePlayer",d);var f=this,n,g,k,o,v,p,q=0,E=5,u=0,B=0,A=0,G=0,D=0,r=0,H=0,C=0,J=CURSORDIRECTION.NONE,I=CURSORDIRECTION.NONE,L=CURSORBUTTON.NONE,N;this.POType=PLAYABLEOBJECTTYPES.CURSORMOVE;this.PlayState=PLAYSTATE.NONE;this.MouseDownY=this.MouseDownX=this.MouseUpY=this.MouseUpX=0;this.MouseEventData=null;var M=true;this.Initialize=function(a){var b=true;try{if(f.Initialized==PLAYSTATE.INITIALIZED)throw"Already initialized";if(a==null)throw"holderDiv not supplied";
var c=f.CreateHTMLElement("div");c.style.visibility="visible";c.style.zIndex=ZINDEX.CURSOR;a.appendChild(c);v=document.getElementById(c.id);var e=f.CreateHTMLElement("div");v.appendChild(e);e.style.visibility="visible";p=document.getElementById(e.id);p.dir=uid_json.settings.template.rtl;var d=new clsCanvas("clsCursorMovePlayer:up-canvas");d.style.display=g_inline;d.style.visibility="visible";v.appendChild(d.obj);g=d;var n=new clsCanvas("clsCursorMovePlayer:down-canvas");n.style.display=g_inline;n.style.visibility=
"visible";v.appendChild(n.obj);k=n;var u=new clsCanvas("clsCursorMovePlayer:hover-canvas");u.style.display=g_inline;u.style.visibility="visible";v.appendChild(u.obj);o=u;var r=new clsCanvas("clsCursorMovePlayer:mousebutton-canvas");r.style.visibility="visible";r.style.backgroundColor="red";r.setDimensions(16,16);v.appendChild(r.obj);N=r;var A=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;uid_json.settings.template.rtl=="rtl"&&(H=A-50);L=CURSORBUTTON.UP;f.ID=f.GetUniqueID();
uid_json.settings.general.cursormoveanimation=="0"&&(M=false);uid_json.settings.speed.cursorjumpvalue!=void 0&&(E=parseInt(uid_json.settings.speed.cursorjumpvalue),E<5&&(E=5));f.Initialized=PLAYSTATE.INITIALIZED}catch(B){b=false,f.Log("Initialize",LOG.EXCEPTION,"",B)}return b};this.Load=function(){var a=true;try{if(f.Initialized==PLAYSTATE.NOTINITIALIZED)throw"object not initialized";L=CURSORBUTTON.UP;p.innerHTML="";if(b(f.CursorNormal_Image,g)==false)throw"Error @ DrawCursorImage() for Cursor_Normal";
if(b(f.CursorDown_Image,k)==false)throw"Error @ DrawCursorImage() for Cursor Down";if(b(f.CursorHover_Image,o)==false)throw"Error @ DrawCursorImage() for Cursor Hover";if(uid_json.settings.stepimage.imageresizeoption==IMAGERESIZE.FULLIMAGE){var e=g_objTR.GetCanvasScrollCord();H+=e.l;C+=e.t}if(M==false)H=f.MouseDownX,C=f.MouseDownY;if(c(f.MouseDownX,f.MouseDownY)==false)throw"Error @ SetCursorMoveProperties";if(f.LoadMouseButton(false)==false)throw"Errro @ LoadMouseButton";N.style.left=g.width/2+"px";
N.style.top=g.height+"px";N.style.display="none";f.PlayState=PLAYSTATE.READY}catch(d){a=false,f.Log("Load",LOG.EXCEPTION,"",d)}return a};this.Play=function(){var a=true;try{if(f.onPlayStateChange==null)throw"onPlayStateChange event not binded";if(f.PlayState==PLAYSTATE.READY||f.PlayState==PLAYSTATE.PAUSED||f.PlayState==PLAYSTATE.STOPPED)if(v.style.display=g_inline,p.style.display=g_inline,e(),f.PlayState==PLAYSTATE.ERROR)throw"Error @ ManageMouseMove";}catch(b){a=false,f.Log("Play",LOG.EXCEPTION,
"",b)}return a};this.Pause=function(){try{if(f.PlayState==PLAYSTATE.PLAYING)window.clearTimeout(n),n=0,f.PlayState=PLAYSTATE.PAUSED,f.onPlayStateChange(f)}catch(a){f.Log("Pause",LOG.EXCEPTION,"",a)}};this.GetCursorCord=function(){var a={l:-1,t:-1,r:-1,b:-1,w:-1,h:-1};try{a.l=Number(v.style.left.replace("px","")),a.t=Number(v.style.top.replace("px","")),a.w=64,a.h=64,a.r=a.l+a.w,a.b=a.t+a.h}catch(b){f.Log("GetCursorCord",LOG.EXCEPTION,"",b)}return a};this.RepositionCursor=function(a,b){try{if(v.style.left=
a+"px",v.style.top=b+"px",H=a,C=b,c(f.MouseDownX,f.MouseDownY)==false)throw"Error @ SetCursorMoveProperties";}catch(e){f.Log("RepositionCursor",LOG.EXCEPTION,"",e)}return 0};this.Stop=function(b){try{if(a()==false)throw"Error @ ClearMetatData";f.PlayState=PLAYSTATE.STOPPED;v.style.display="none";b==true?(H=uid_json.settings.template.rtl=="ltr"?0:(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-50,C=0):f.ShiftCursorForScroll()}catch(c){f.Log("Stop",LOG.EXCEPTION,
"",c)}};this.LoadMouseButton=function(a){var b=true;try{if(uid_json.settings.mousebutton.consider==true){if(uid_json.settings.mousebutton.ignoreleft==true&&f.MouseEventData.MouseModifier==MOUSEBUTTON.NONE&&f.MouseEventData.MouseButton==MOUSEBUTTON.LEFT)return true;if(uid_json.settings.mousebutton.ignoreright==true&&f.MouseEventData.MouseModifier==MOUSEBUTTON.NONE&&f.MouseEventData.MouseButton==MOUSEBUTTON.RIGHT)return true;var c="",c=(f.MouseEventData.MouseButton+f.MouseEventData.MouseModifier).toLowerCase();
a&&(c="n");var e=g_objIPL.GetBasicImage(c);if(e==null)throw"Mouse Button image not available for > "+c;var d=g_objTR.MouseButtonWidth,g=g_objTR.MouseButtonHeight;if(d==0||g==0)d=e.naturalWidth,d==void 0&&(d=Number(e.width)),g=e.naturalHeight,g==void 0&&(g=Number(e.height));N.setDimensions(d,g);ctx=N.getContext("2d");ctx.drawImage(e,0,0,d,g,0,0,d,g)}}catch(k){b=false,f.Log("LoadMouseButton",LOG.EXCEPTION,"",k)}return b};this.SetCursors=function(a){var b=true;try{switch(a){case CURSORBUTTON.UP:g.style.visibility=
"visible";k.style.visibility="hidden";o.style.visibility="hidden";break;case CURSORBUTTON.DOWN:k.style.visibility="visible";g.style.visibility="hidden";o.style.visibility="hidden";break;case CURSORBUTTON.HOVER:o.style.visibility="visible",g.style.visibility="hidden",k.style.visibility="hidden"}L=a}catch(c){b=false,f.Log("SetCursors",LOG.EXCEPTION,"",c)}return b};this.ShiftCursorPosition=function(a,b){var c=true;try{H+=a,C+=b,v.style.left=H-g.width/2+"px",v.style.top=C-g.height/2+"px"}catch(e){c=false,
f.Log("ShiftCursorPosition",LOG.EXCEPTION,"",e)}return c};this.SetDragProperties=function(){var a=true;try{var b;b=messages_json.psim.commonmsg!=void 0?messages_json.psim.commonmsg:messages_json.psim.canvas.commonmsg;if(f.MouseEventData.Type==EVENTTYPE.DRAG){p.style.display=g_inline;p.innerHTML='<span style="'+b.drag_text.css+'">'+b.drag_text.text+"</span>";p.style.left="80px";p.style.top="10px";if(c(f.MouseUpX,f.MouseUpY)==false)throw"Error @ SetCursorMoveProperties";f.PlayState=PLAYSTATE.READY}else p.style.display=
"none"}catch(e){a=false,f.Log("SetDragProperties",LOG.EXCEPTION,"",e)}return a};this.ShowMouseButton=function(){var a=true;try{if(N.style.display=g_inline,f.MouseEventData.MouseModifier==MOUSEBUTTON.NONE){if(f.MouseEventData.MouseButton=="L"&&uid_json.settings.mousebutton.ignoreleft==true)return N.style.display="none",true;if(f.MouseEventData.MouseButton=="R"&&uid_json.settings.mousebutton.ignoreright==true)return N.style.display="none",true}}catch(b){a=false,f.Log("ShowMouseButton",LOG.EXCEPTION,
"",b)}return a};this.ShiftCursorForScroll=function(){var a=true;try{if(uid_json.settings.stepimage.imageresizeoption==IMAGERESIZE.FULLIMAGE){var b=g_objTR.GetCanvasScrollCord();H-=b.l;C-=b.t}}catch(c){a=false,f.Log("ShiftCursorForScroll",LOG.EXCEPTION,"",c)}return a}}
clsDelayPlayer=function(d){function b(){var b=true;try{window.clearInterval(e),e=0}catch(c){b=false,a.Log("ClearMetatData",LOG.EXCEPTION,"",c)}return b}function c(){try{if(a.Timeleft<0){if(b()==false)throw"ClearMetatData";a.PlayState=PLAYSTATE.PLAYENDED}else a.PlayState=PLAYSTATE.PLAYING,a.Timeleft-=f}catch(c){a.PlayState=PLAYSTATE.ERROR,bRet=false,a.Log("HandleDelay",LOG.EXCEPTION,"",c)}try{if(a.PlayState==PLAYSTATE.ERROR&&b(),a.onPlayStateChange(a),a.PlayState==PLAYSTATE.PLAYENDED&&a.Rewind==true)a.Timeleft=
a.Duration,a.PlayState=PLAYSTATE.READY}catch(e){a.Log("HandleDelay",LOG.EXCEPTION,"2nd",e)}}clsPlayerBase.call(this,"clsDelayPlayer",d);this.Timeleft=this.Duration=0;this.POType=PLAYABLEOBJECTTYPES.DELAY;this.PlayState=PLAYSTATE.READY;this.Rewind=false;var e,a=this,f=100;this.Initialize=function(){var b=true;try{a.PlayState=PLAYSTATE.INITIALIZED,a.ID=a.GetUniqueID(),clearInterval(e),a.Duration=0,a.Timeleft=0}catch(c){b=false,a.Log("Initialize",LOG.EXCEPTION,"",c)}return b};this.Load=function(){var b=
true;try{a.Timeleft=a.Duration,a.PlayState=PLAYSTATE.READY,clearInterval(e)}catch(c){b=false,a.Log("Load",LOG.EXCEPTION,"",c)}return b};this.Play=function(){var b=true;try{if(a.onPlayStateChange==null)throw"onPlayStateChange event not binded";if(a.PlayState==PLAYSTATE.READY||a.PlayState==PLAYSTATE.PAUSED||a.PlayState==PLAYSTATE.STOPPED)c(),a.PlayState==PLAYSTATE.PLAYING&&(e=setInterval(c,f))}catch(d){b=false,a.Log("Play",LOG.EXCEPTION,"",d)}return b};this.Pause=function(){var b=true;try{if(a.PlayState==
PLAYSTATE.PLAYING)clearTimeout(e),a.PlayState=PLAYSTATE.PAUSED,a.onPlayStateChange(a)}catch(c){b=false,a.Log("Pause",LOG.EXCEPTION,"",c)}return b};this.Stop=function(){var c=true;try{if(b()==false)throw"ClearMetatData";a.PlayState=PLAYSTATE.STOPPED}catch(e){c=false,a.Log("Stop",LOG.EXCEPTION,"",e)}return c};this.ChangeDuration=function(b){var c=true;try{if(b<a.Timeleft)a.Timeleft=b}catch(e){c=false,a.Log("ChangeDuration",LOG.EXCEPTION,"",e)}return c}};
function clsDragPlayer(d){function b(){try{c.PlayState=c.CursorMovePlayer.PlayState,c.onPlayStateChange(c)}catch(b){c.Log("CursorMovePlayer_onPlayStateChange",LOG.EXCEPTION,"",b)}}clsPlayerBase.call(this,"clsDragPlayer",d);var c=this;this.PlayState=PLAYSTATE.NONE;this.onPlayStateChange=this.CursorMovePlayer=null;this.Initialize=function(){var b=true;try{if(c.Initialized==PLAYSTATE.INITIALIZED)throw"Already initialized";this.ID=this.GetUniqueID();c.Initialized=PLAYSTATE.INITIALIZED}catch(a){b=false,
c.Log("Initialize",LOG.EXCEPTION,"",a)}return b};this.Load=function(){var b=true;try{if(c.Initialized==PLAYSTATE.NOTINITIALIZED)throw"ME.Initialized==PLAYSTATE.NOTINITIALIZED";if(this.CursorMovePlayer==null)throw"CursorMovePlayer is null";this.PlayState=PLAYSTATE.READY}catch(a){b=false,c.Log("Load",LOG.EXCEPTION,"",a)}return b};this.Play=function(){try{if(c.onPlayStateChange==null)throw"onPlayStateChange event not binded";if(c.PlayState==PLAYSTATE.READY&&(c.CursorMovePlayer.onPlayStateChange=b,c.CursorMovePlayer.SetDragProperties()==
false))throw"Error @ SetDragProperties";if(c.CursorMovePlayer.Play()==false)throw"Error @ CursorMovePlayer.Play";}catch(e){c.Log("Play",LOG.EXCEPTION,"",e)}};this.Pause=function(){try{if(c.CursorMovePlayer.Pause()==false)throw"Error @ CursorMovePlayer.Pause";}catch(b){c.Log("Pause",LOG.EXCEPTION,"",b)}};this.Stop=function(){try{if(c.CursorMovePlayer.Stop()==false)throw"CursorMovePlayer.Stop";}catch(b){c.Log("Stop",LOG.EXCEPTION,"",b)}}}
function clsTypeTextPlayer(d){function b(){try{if(u+=n.Text.charAt(E),o.innerHTML=u,p=o.getBoundingClientRect().right-o.getBoundingClientRect().left,E>=n.Text.length){if(e()==false)throw"Error @ ClearMetatData";n.PlayState=PLAYSTATE.PLAYENDED}else{n.PlayState=PLAYSTATE.PLAYING;if(G=="ltr"){if(p>=v)o.style.left=v-p-2+"px"}else if(p>=v)o.style.right=v-p-2+"px";A!=null&&g_objGS.General.AudioButtonEnabled==true?(n.m_bIsKeyIntervalTimeIsOver=false,D=setTimeout(c,Number(uid_json.settings.speed.typetextspeedfactors[uid_json.settings.speed.level])),
A.Play()):g=setTimeout(b,Number(uid_json.settings.speed.typetextspeedfactors[uid_json.settings.speed.level]));E++}}catch(a){n.PlayState=PLAYSTATE.ERROR,n.Log("DisplayText",LOG.EXCEPTION,"",a)}try{n.PlayState==PLAYSTATE.ERROR&&e(),n.onPlayStateChange(n)}catch(d){n.Log("DisplayText",LOG.EXCEPTION,"2nd",d)}}function c(){try{D=0,n.m_bIsKeyIntervalTimeIsOver=true}catch(a){n.Log("Set_KeyIntervalTimeIsOver_Flag",LOG.EXCEPTION,"",a)}}function e(){var a=true;try{window.clearTimeout(g),window.clearTimeout(D),
g=D=0}catch(b){a=false,n.Log("ClearMetatData",LOG.EXCEPTION,"",b)}return a}function a(){try{n.PlayState!=PLAYSTATE.PAUSED&&A.PlayState==PLAYSTATE.PLAYENDED&&(g=n.m_bIsKeyIntervalTimeIsOver==true?setTimeout(b,1):setTimeout(b,Number(uid_json.settings.speed.typetextspeedfactors[uid_json.settings.speed.level])))}catch(a){n.Log("m_audio_onEnded",LOG.EXCEPTION,"",a)}}function f(){n.Log("m_audioClick_onLoadComplete",LOG.ENTRY);try{B=true,n.PlayState=PLAYSTATE.READY}catch(a){n.Log("m_audioClick_onLoadComplete",
LOG.EXCEPTION,"",a)}}clsPlayerBase.call(this,"clsTypeTextPlayer",d);var n=this,g,k,o,v=new Number(0),p=new Number(0),q=new Number(1),E=0,u="",B=false,A,G=new String("ltr"),D;this.POType=PLAYABLEOBJECTTYPES.TYPETEXT;this.IsPassword=false;this.Height=this.Width=this.Top=this.Left=0;this.BgColor="#FFFFFF";this.Text="";this.FontName=this.FontSize=0;this.FontItalic=this.FontBold=false;this.ForeColor="#000000";this.PlayState=PLAYSTATE.NONE;this.Animation=true;this.Initialize=function(b){var c=true;try{if(n.Initialized==
PLAYSTATE.INITIALIZED)return true;if(b==null)throw"holderDiv not supplied";G=uid_json.settings.template.rtl;var e=n.CreateHTMLElement("div");e.style.display=g_inline;e.style.visibility="hidden";e.style.overflow="hidden";e.style.position="absolute";e.style.direction=G;e.style.zIndex=ZINDEX.CONTROLREGION;b.appendChild(e);k=document.getElementById(e.id);var d=n.CreateHTMLElement("div");d.style.display=g_inline;d.style.visibility="visible";d.style.position="absolute";d.style.direction=G;d.style.whiteSpace=
"nowrap";k.appendChild(d);o=document.getElementById(d.id);A=null;if(n.Animation==true&&g_objGS.General.IsIPadBrowser==false&&BROWSER.SAFARI==false&&OS.WINDOWS==true&&uid_json.settings.media.consider_typetextaudio===true){A=new clsAudioPlayer;if(A.Initialize()==false)throw"Error @ m_objAudio.Initialize";A.onLoadComplete=f;A.onPlayStateChange=a}n.ID=n.GetUniqueID();n.Initialized=PLAYSTATE.INITIALIZED}catch(g){c=false,n.Log("Initialize",LOG.EXCEPTION,"",g)}return c};this.Load=function(){var a=true;try{if(n.Initialized==
PLAYSTATE.NOTINITIALIZED)throw"Not Initialized";n.Width-=2*q;n.Height-=2*q;n.Left+=q;n.Top+=q;if(n.Height<14)n.Height=14;k.style.width=n.Width+"px";k.style.height=n.Height+"px";k.style.left=n.Left+"px";k.style.top=n.Top+"px";n.Width=Number(k.style.width.replace("px",""));n.Height=Number(k.style.height.replace("px",""));G=="ltr"?o.style.left="1px":o.style.right="1px";v=n.Width;var b=0,b=Math.round(Number(n.FontSize)*g_objGS.General.ResizeFactor);b<8&&(b=8);var c=n.FontBold?" bold ":"";c+=n.FontItalic?
" Italic ":"";c+=b+"pt "+n.FontName;o.style.font=c;o.style.color=n.ForeColor;k.style.backgroundColor=n.BgColor;o.innerHTML="";E=0;u="";if(n.IsPassword==true){b="";for(c=0;c<n.Text.length;c++)b+="*";n.Text=b}n.PlayState=PLAYSTATE.READY;if(A!=null&&B==false)n.Log("Load",LOG.SPECIAL,"g_TypetextAudioFile",g_TypetextAudioFile),n.PlayState=PLAYSTATE.NONE,A.Load(g_TypetextAudioFile)}catch(e){a=false,n.Log("Load",LOG.EXCEPTION,"",e)}return a};this.Play=function(){var a=true;try{if(n.onPlayStateChange==null)throw"onPlayStateChange event not binded";
if(n.Animation==false)k.style.visibility="visible",o.style.visibility="visible",o.innerHTML=n.Text,n.PlayState=PLAYSTATE.PLAYENDED,n.onPlayStateChange(n);else if(n.PlayState==PLAYSTATE.READY||n.PlayState==PLAYSTATE.PAUSED||n.PlayState==PLAYSTATE.STOPPED)k.style.visibility="visible",o.style.visibility="visible",b()}catch(c){a=false,n.Log("Play",LOG.EXCEPTION,"",c)}return a};this.Pause=function(){var a=true;try{if(n.PlayState==PLAYSTATE.PLAYING)window.clearTimeout(g),n.PlayState=PLAYSTATE.PAUSED,n.onPlayStateChange(n)}catch(b){a=
false,n.Log("Pause",LOG.EXCEPTION,"",b)}return a};this.Stop=function(){var a=true;try{if(e()==false)throw"Error @ ClearMetatData";n.PlayState=PLAYSTATE.STOPPED;k.style.visibility="hidden";o.style.visibility="hidden";try{A!=null&&A.Stop()}catch(b){}}catch(c){a=false,n.Log("Stop",LOG.EXCEPTION,"",c)}return a}}
function clsRolloverPlayer(d){function b(){var a=true;try{if(clearTimeout(g),g=0,f.StickyNote.Play()==false)throw"Error @ ME.StickyNote.Play";}catch(b){a=false,f.Log("m_OnMouseOver",LOG.EXCEPTION,"",b)}return a}function c(){var a=true;try{g=setTimeout(f.Hide,f.Duration)}catch(b){a=false,f.Log("m_OnMouseOut",LOG.EXCEPTION,"",b)}return a}function e(){try{clearTimeout(g),g=0}catch(a){f.Log("StickyNote_onHide",LOG.EXCEPTION,"",a)}}function a(){}clsPlayerBase.call(this,"clsRolloverPlayer",d);var f=this,
n,g=new Number(0);this.ImageKey="";this.PlayState=PLAYSTATE.NONE;this.POType=PLAYABLEOBJECTTYPES.ROLLOVERIMAGE;this.Duration=Number(0);this.StickyNote=null;this.Initialize=function(a){var e=new Boolean(true);try{if(f.Initialized==PLAYSTATE.INITIALIZED)return true;if(a==null)throw"holderDiv not supplied";var d=f.CreateHTMLElement("img");d.style.zIndex=ZINDEX.ROLLOVERIMAGE;d.style.position="absolute";d.style.visibility="visible";d.style.display=g_inline;a.appendChild(d);n=document.getElementById(d.id);
n.onmouseover=b;n.onmouseout=c;n.onclick=b;f.ID=f.GetUniqueID();f.Initialized=PLAYSTATE.INITIALIZED}catch(g){e=false,f.Log("Initialize",LOG.EXCEPTION,"",g)}return e};this.Load=function(){var b=true;try{if(f.Initialized==PLAYSTATE.NOTINITIALIZED)throw"Object Not Initialized";if(f.Type!=ANNOTATION.ROLLOVERIMAGE)throw"Type ROLLOVERIMAGE not specified. The current Type is "+f.Type;f.StickyNote.Rewind=true;if(g_objGS.General.IsIPadBrowser==true)f.StickyNote.onHide=e,f.StickyNote.HideOnClick();f.StickyNote.onPlayStateChange=
a;iCLeft=new Number(0);iCTop=new Number(0);iCLeft=f.Left*g_objGS.General.ResizeFactor;iCTop=f.Top*g_objGS.General.ResizeFactor;f.Left=iCLeft;f.Top=iCTop;n.style.left=f.Left+"px";n.style.top=f.Top+"px";var c=g_objIPL.GetBasicImage(f.ImageKey);if(c==null)throw"Imageobject is null";if(c.complete==false||c.src=="")throw"image not loaded for";n.src=c.src;f.PlayState=PLAYSTATE.READY}catch(d){b=false,f.Log("Load",LOG.EXCEPTION,"",d)}return b};this.Play=function(){var a=true;try{if(f.onPlayStateChange==null)throw"onPlayStateChange event not binded";
if(f.PlayState==PLAYSTATE.READY||f.PlayState==PLAYSTATE.PAUSED||f.PlayState==PLAYSTATE.STOPPED)n.style.display=g_inline,f.PlayState=PLAYSTATE.PLAYING,f.ManageRolloverDisplay()}catch(b){a=false,f.Log("Play",LOG.EXCEPTION,"",b)}return a};this.ManageRolloverDisplay=function(){var a=true;try{f.PlayState=PLAYSTATE.PLAYENDED,f.onPlayStateChange(f)}catch(b){a=false,f.Log("ManageRolloverDisplay",LOG.EXCEPTION,"",b)}return a};this.Pause=function(){try{if(f.StickyNote.Pause()==false)throw"Error @ ME.StickyNote.Pause";
f.PlayState=PLAYSTATE.PAUSED}catch(a){f.Log("Load",LOG.EXCEPTION,"",a)}return true};this.Stop=function(){var a=true;try{clearTimeout(g);g=0;if(f.StickyNote.Stop()==false)throw"Error @ ME.StickyNote.Stop";n.style.display="none";f.PlayState=PLAYSTATE.STOPPED}catch(b){a=false,f.Log("Stop",LOG.EXCEPTION,"",b)}return a};this.Hide=function(){try{clearTimeout(g),g=0,f.StickyNote.Hide()}catch(a){f.Log("Hide",LOG.EXCEPTION,"",a)}}}
function clsKeypressPlayer(d){function b(){try{e.PlayState=PLAYSTATE.PLAYENDED,e.onPlayStateChange(e)}catch(a){e.Log("m_audio_onPlayStateChange",LOG.EXCEPTION,"",a)}}function c(){e.Log("m_audioKeyPress_onLoadComplete",LOG.ENTRY);try{f=true,e.PlayState=PLAYSTATE.READY}catch(a){e.Log("m_audioKeyPress_onLoadComplete",LOG.EXCEPTION,"",a)}}clsPlayerBase.call(this,"clsKeypressPlayer",d);var e=this,a,f=false;this.POType=PLAYABLEOBJECTTYPES.KEYPRESS;this.PlayState=PLAYSTATE.NONE;this.onPlayStateChange=null;
this.Initialize=function(){var d=true;try{if(e.Initialized==PLAYSTATE.INITIALIZED)return true;if(g_objGS.General.IsIPadBrowser==false&&uid_json.settings.media.consider_keypressaudio==true){a=new clsAudioPlayer;if(a.Initialize()==false)throw"Error @ m_objAudio.Initialize";a.onLoadComplete=c;a.onPlayStateChange=b}else a=null;this.ID=this.GetUniqueID();e.Initialized=PLAYSTATE.INITIALIZED}catch(f){d=false,e.Log("Initialize",LOG.EXCEPTION,"",f)}return d};this.Load=function(){e.Log("Load",LOG.ENTRY);var b=
true;try{if(e.Initialized==PLAYSTATE.NOTINITIALIZED)throw"Object not initialized";e.PlayState=PLAYSTATE.READY;if(a!=null&&f==false)e.Log("Load",LOG.SPECIAL,"g_TypetextAudioFile",g_TypetextAudioFile),e.PlayState=PLAYSTATE.NONE,a.Load(g_TypetextAudioFile)}catch(c){b=false,e.Log("Load",LOG.EXCEPTION,"",c)}return b};this.Play=function(){var b=true;try{if(e.onPlayStateChange==null)throw"onPlayStateChange event not binded";if(e.PlayState==PLAYSTATE.ERROR)e.PlayState=PLAYSTATE.PLAYENDED;else if(e.PlayState==
PLAYSTATE.READY||e.PlayState==PLAYSTATE.PAUSED||e.PlayState==PLAYSTATE.STOPPED)if(e.PlayState=PLAYSTATE.PLAYENDED,a!=null&&g_objGS.General.AudioButtonEnabled==true)a.Play(),e.PlayState=PLAYSTATE.PLAYING;e.onPlayStateChange(e)}catch(c){b=false,e.Log("Play",LOG.EXCEPTION,"",c)}return b};this.Pause=function(){var b=true;try{if(e.PlayState==PLAYSTATE.PLAYING)a!=null&&a.Pause(),e.PlayState=PLAYSTATE.PAUSED,e.onPlayStateChange(e)}catch(c){b=false,e.Log("Pause",LOG.EXCEPTION,"",c)}return b};this.Stop=function(){var b=
true;try{try{a!=null&&a.Stop()}catch(c){}e.PlayState=PLAYSTATE.STOPPED}catch(d){b=false,e.Log("Stop",LOG.EXCEPTION,"",d)}return b}}
clsAjax=function(d){function b(){try{c()}catch(a){p.Log("m_objXHR_OnReadyStateChange",LOG.EXCEPTION,"for > "+p.Name,a)}}function c(){var a=true;try{if(o.readyState==READYSTATE.DONE)if(o.status==HTTPSTATUS.OK||o.status==HTTPSTATUS.CREATED){p.Log("VerifyAjaxCall",LOG.TRACKER,"ME.ReceivedData = ","<textarea rows=25 width=20>"+o.responseText+"</textarea>");var b=true;try{p.ReceivedData=window.JSON?JSON.parse(o.responseText):eval("["+o.responseText+"]")[0]}catch(c){p.Error=ECMSERRORS.FAULTY_RETURN_DATA,
b=false,p.Log("VerifyAjaxCall",LOG.EXCEPTION,"ERROR @ ECMS",""),p.Log("VerifyAjaxCall",LOG.ERROR,"Error While Converting JSON from ME.ReceivedData=",o.responseText)}v&&p.onLoadComplete!=null&&g(b)}else if(o.status==HTTPSTATUS.UNAUTHORIZED)try{if(p.Log("VerifyAjaxCall",LOG.TRACKER,"CrossDomainRequestURL",k),q==METHOD.POST)p.CrossDomainPost=true,b="top="+B+", left="+u+", width="+A+", height="+G,E=window.open("about:blank","",b),p.Log("VerifyAjaxCall",LOG.TRACKER,"CORS POST Window Parameters",b),setTimeout(e,
100);else if(f(n)==false)throw"error @ CreateJsnopObject";}catch(d){p.Log("VerifyAjaxCall",LOG.ERROR,"Cross origin request , m_objXHR.status = ",o.status)}else p.Error=ECMSERRORS.FAILED_TO_CONNECT,p.Log("VerifyAjaxCall",LOG.ERROR,"m_objXHR.status <> HTTPSTATUS.OK , m_objXHR.status = ",o.status),g(false)}catch(D){a=false,p.Log("VerifyAjaxCall",LOG.EXCEPTION,"for > "+p.Name,D)}return a}function e(){var b=true;try{if(E==void 0)setTimeout(e,100);else{var c=p.DataToSend.split("postData="),d="";d+="<html>";
d+="<head>";d+="<title>"+p.Msg_title+"</title>";d+="<script type='text/javascript'>";d+="\tsetTimeout(function()";d+="\t{";d+="\t\tfrmPostdata.submit()";d+="\t},500)";d+="<\/script>";d+="</head>";d+="<body>";d+="\t<form name='frmPostdata' action = '"+k+"' method='POST' style='width:100%;height:100%;margin:0px;'>";d+="\t\t<div style='display:none;'>";d+="\t\t\t<textarea name='postData'>"+c[1]+"</textarea>";d+="\t\t\t<textarea name='Msg_success'>"+p.Msg_success+"</textarea>";d+="\t\t\t<textarea name='Msg_failure'>"+
p.Msg_failure+"</textarea>";d+="\t\t\t<textarea name='Msg_retry'>"+p.Msg_retry+"</textarea>";d+="\t\t\t<textarea name='Msg_uploading'>"+p.Msg_uploading+"</textarea>";d+="\t\t\t<textarea name='Msg_title'>"+p.Msg_uploading+"</textarea>";d+="\t\t\t<textarea name='Msg_successcss'>"+p.Msg_successcss+"</textarea>";d+="\t\t\t<textarea name='Msg_failedcss'>"+p.Msg_failedcss+"</textarea>";d+="\t\t\t<textarea name='Msg_failedcss'>"+p.Msg_failedcss+"</textarea>";d+="\t\t\t<textarea name='Msg_buttoncss'>"+p.Msg_buttoncss+
"</textarea>";d+="\t\t</div>";d+="\t\t<table width='100%' height='100%'>";d+="\t\t\t<tr>";d+="\t\t\t\t<td align='center' valign='center' style='width:100%;height:100%'>";d+=p.Msg_uploading+"<br/><br/>";d+="\t\t\t\t\t<img src='"+p.Img_Loading+"'/>";d+="\t\t\t\t</td>";d+="\t\t\t</tr>";d+="\t\t</table>";d+="\t</form>";d+="</body>";d+="</html>";E.document.write(d);setTimeout(a,100)}}catch(f){b=false,p.Log("Error @ IsWindowReady >",LOG.EXCEPTION,"for > "+p.Name,f)}b==false&&g(false)}function a(){var b=
true;try{var c=false;if(E==void 0)c=true;else{var e=false;try{E.closed&&(c=true)}catch(d){e=true,p.Log("Error @ IsWindowClosed 1 >",LOG.ERROR,"for > "+p.Name,d)}if(e==true)try{E.document!=void 0&&(c=true)}catch(f){p.Log("Error @ IsWindowClosed 2 >",LOG.ERROR,"for > "+p.Name,f)}}c==false?setTimeout(a,100):g(true)}catch(k){b=false,p.Log("Error @ IsWindowClosed >",LOG.EXCEPTION,"for > "+p.Name,k)}b==false&&g(false)}function f(a){var b=true;try{window.CreateJsnopObject_callback=function(b){delete window.CreateJsnopObject_callback;
document.body.removeChild(D);a(b)},p.Log("CreateJsnopObject",LOG.TRACKER,"for > "+p.Name+" 401 JSONP URL ",k),D=document.createElement("script"),D.src=k+"&callback=CreateJsnopObject_callback",D.onerror=function(){},document.body.appendChild(D)}catch(c){b=false,p.Log("CreateJsnopObject",LOG.EXCEPTION,"for > "+p.Name,c)}return b}function n(a){try{p.Log("JsnopCallBack",LOG.TRACKER,"ME.ReceivedData = ","<textarea rows=25 width=20>"+a+"</textarea>");var b=true;try{p.ReceivedData=window.JSON?JSON.parse(a):
eval("["+a+"]")[0]}catch(c){p.Error=ECMSERRORS.FAULTY_RETURN_DATA,b=false,p.Log("JsnopCallBack",LOG.EXCEPTION,"ERROR @ ECMS",""),p.Log("JsnopCallBack",LOG.ERROR,"Error While Converting JSON from ME.ReceivedData=",a)}v&&p.onLoadComplete!=null&&g(b)}catch(e){p.Log("JsnopCallBack",LOG.EXCEPTION,"for > "+p.Name,e)}}function g(a){var b=true;try{if(p.onLoadComplete!=null)p.onLoadComplete(a),p.onLoadComplete=null}catch(c){b=false,p.Log("RaiseLoadComplete",LOG.EXCEPTION,"for > "+p.Name,c)}return b}clsPlayerBase.call(this,
"clsAjax");this.DataToSend=this.ReceivedData=this.URL=this.Name="";this.CrossDomainPost=false;var k=this.Img_Loading=this.Msg_buttoncss=this.Msg_failedcss=this.Msg_successcss=this.Msg_uploadingcss=this.Msg_title=this.Msg_uploading=this.Msg_retry=this.Msg_failure=this.Msg_success="",o=null,v=false,p=this,q,E,u=400,B=300,A=350,G=280;if(d!=void 0)p.Name=d;var D;this.Initialize=function(){var a=true;try{if(o=null,o=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),o==null)throw"m_objXHR=null , XMLHttpRequest Object not created";
}catch(b){a=false,p.Log("Initialize",LOG.EXCEPTION,"for > "+p.Name,b)}return a};this.Load=function(a,e,d,f,g,n){var E=true;try{p.CrossDomainPost=false;k=p.URL+"&CORS=1";d!=void 0&&(u=d);f!=void 0&&(B=f);g!=void 0&&(A=g);n!=void 0&&(G=n);q=e;p.Error=ECMSERRORS.NONE;v=a;p.ReceivedData="";if(p.URL=="")throw"ME.URL is empty";p.Log("Load",LOG.SPECIAL,"ME.URL = ",p.URL);var d=p,D=d.URL,K=new String("");try{var K=Math.floor(6*Math.random()),F=new String(""),T=new String(""),S=new Number(0),O=new Number(0),
P=new Number(0),z=new Date,X=z.getDate(),Z=z.getMonth(),Y=z.getFullYear(),U=z.getHours(),fa=z.getMinutes(),R=z.getSeconds(),F="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";sTitle="123456789";K=T="";for(S=0;S<6;S++)P=Math.floor(6*Math.random()),T+=F.substring(1,P);for(O=0;O<sTitle.length;O++)P=Math.ceil(5*Math.random()),K=sTitle.substring(1,P);K=X+Z+Y+"_"+U+fa+R+"_"+K+"_"+T}catch(la){K=Math.floor(6*Math.random()),p.Log("GetRandomCode",LOG.EXCEPTION,"for > "+p.Name,la)}d.URL=D+("&H5RndCode="+
K);o.open(e,p.URL,a);o.onreadystatechange=a==true?b:null;e==METHOD.POST?(o.setRequestHeader("Content-type","application/x-www-form-urlencoded"),o.send(p.DataToSend)):o.send(null);a==false&&(E=c())}catch(ha){E=false,p.Log("Load",LOG.EXCEPTION,"for > "+p.Name,ha)}return E}};clsCustomFormCSSText=function(){this.StarCSS=this.SurveyTitleCSS=this.SurveyHeaderCSS=this.RequiredFieldtext=this.NoteCSS=this.RequiredFieldCSS=this.InputBoxCSS=this.LabelCSS=""};
clsCustomField=function(){this.Note=this.Value=this.Name=this.Pass=this.Indexed=this.MaxCharacters=this.ID=""};clsTrackerGeneralPreference=function(){this.CUserSSO=this.CUserType="";this.AllowUsageIfAuthFails=false;this.RetryAttempts=this.DeleteStatus="";this.EnablePortal=this.EnableTracker=this.AuthBefore=false;this.FeedBackText=this.BookMark="";this.CustomFields=null};
clsTrackerEpnPreference=function(){this.PromptFeedBack=false;this.TMPassScore=this.FeedBackText="";this.TMBookmarkPromptMsg=this.TMBookmark=false;this.SMPref=new clsTrackerModePref;this.GMPref=new clsTrackerModePref;this.TMPref=new clsTrackerModePref;this.DMPref=new clsTrackerModePref;this.EfxId=this.Session="";this.BookMark={LastResloc:"",ModetypeID:"",SMOver:"",LastVisitedStep:"",GMOver:"",TMOver:"",LastTPSID:"",NoOfCorrectSteps:"",LastScore:"",DocOver:"",Weightage:0};this.LatestTMResult=false;
this.LatestTMPassScore=this.LatestTMScore=0;this.ExtLinks={Enable:false,Btn_1:"",Btn_2:"",Btn_3:""};this.IsSurveyExist=false;this.Survey=new clsSurvey;this.Title="";this.IsJobAid=false};clsTrackerModePref=function(){this.IncudeSteps=this.Include=false;this.CompletePref=this.AttemptPref=""};
clsTrackerDataEpiLearn=function(){this.TMResumed=this.ConsiderWeightage=false;this.SessionID=this.TMPassScore=this.ContentID="";this.TotalCountableStepCount=this.TimeTaken=0;this.PresentationSessionID=this.PresentationID="";this.Modes=[];this.Summary={Modes:[],Comment:"",CustomForm:null};this.FeedBackData="";this.ExcludedStepsForTM={}};clsMode=function(){this.ScormPassed=this.ScormCompleted=this.NotCompleted=this.TrackerCompleted=this.Attempts=0};
clsTrackerDataMode=function(){this.ModeType=MODETYPE.NONE;this.Tasks=[];this.Date_End=this.Date_Start=null;this.TrackerStatus=TRACKERMODESTATUS.NONE;this.ScormCompleted=this.TrackerCompleted=false;this.Score=-1;this.TimeTaken=0;this.Updated=false};clsTrackerDataTask=function(){this.TaskType="";this.Process=[];this.ResLoc=""};
clsTrackerDataProcess=function(){this.Index=0;this.Steps=[];this.ResLoc="";this.Date_End=this.Start_Time=null;this.Time_Taken=0;this.EFXData=null;this.CorrectStepCount=this.ScoredWeightage=this.Weightage=0};clsTrackerDataStep=function(){this.Feedbacks=[];this.Result=STEPSTATUS.NOTATTEMPTED;this.TPSID="";this.Type=false;this.GroupStepIndex=-1;this.SubStepCount=0;this.IsSubStep=false;this.Weightage=0;this.IsQuestionExist=false;this.QSDAnswer="";this.QSDStatus=0};
clsTrackerDataFeedback=function(){this.Type="";this.Count=0};clsSurvey=function(){this.Id="-1";this.Name="";this.Questions=[]};clsSurveyQuestion=function(){this.Id="-1";this.Text="";this.Type=-1;this.Mandatory=false;this.Seqno=0;this.Choices=[]};clsSurveyChoice=function(){this.Id="-1";this.Text="";this.Value=false;this.Input=null};
clsTrackerGenHandler=function(){function d(d){var g=true;try{e.Error=a.Error;var k="",o="",v="";switch(f){case CONTENTTYPE.EPILEARN:k=messages_json.general.tracker.failed_to_connect.text,o=messages_json.general.tracker.server_error_preference.text,v=messages_json.general.tracker.preference_read_failed.text}if(d==false){if(e.Error!=ECMSERRORS.NONE)if(e.Error==ECMSERRORS.FAILED_TO_CONNECT)e.ErrorMessage=k;else if(e.Error==ECMSERRORS.FAULTY_RETURN_DATA)e.ErrorMessage=o;throw"m_objAjax_onLoadComplete_GenPref bSuccess = false";
}var p=a.ReceivedData.epitracker.data;a.ReceivedData.epitracker.data[0]!=void 0&&(p=a.ReceivedData.epitracker.data[0]);if(c(p,"value","BOOLEAN")==false)throw e.Log("m_objAjax_onLoadComplete_GenPref",LOG.EXCEPTION,"ERROR @ ECMS","Result=0"),e.ErrorMessage=o,"Server Side Error @ m_objAjax_onLoadComplete_GenPref";d=true;try{var q=a.ReceivedData.epitracker.data[1].prfs;e.Preferences.BookMark=c(q,"bookmark","BOOLEAN");e.Preferences.CUserSSO=c(q,"cusersso");e.Preferences.CUserType=c(q,"cusertype");e.Preferences.DeleteStatus=
c(q,"del");e.Preferences.AllowUsageIfAuthFails=c(q,"allowusageifauthfails","BOOLEAN");e.Preferences.AuthBefore=c(q,"authbefore","BOOLEAN");e.Preferences.RetryAttempts=c(q,"retryattempts");e.Preferences.EnablePortal=c(q,"enableportal","BOOLEAN");e.Preferences.EnableTracker=c(q,"enabletracker","BOOLEAN");if(e.Preferences.CUserType==TRACKERUSERTYPE.CUSTOM&&String(g_objTracker.CUserID)==="0"){e.Preferences.CustomFields=[];var E=q.customform.fld;if(E.length!=void 0)for(var u in E){if(b(E[u])==false)throw"Error @ CreateCustomField";
}else if(b(E)==false)throw"Error @ CreateCustomField";}else if(Number(g_objTracker.CUserID)>0)e.Preferences.CUserType=TRACKERUSERTYPE.PORTAL}catch(B){d=false,e.Log("ReadGeneralPreferences",LOG.EXCEPTION,"",B)}if(d==false)throw e.Error=ECMSERRORS.FAILED_TO_PROCESS_RETURNED_DATA,e.ErrorMessage=v,"Error @ ReadGeneralPreferences";}catch(A){g=false,e.Log("m_objAjax_onLoadComplete_GenPref",LOG.EXCEPTION,"",A)}try{e.onInitComplete(g)}catch(G){e.Log("m_objAjax_onLoadComplete_GenPref",LOG.EXCEPTION,"2",G),
g_CriticalError()}}function b(a){var b=true;try{var d=new clsCustomField;d.ID=c(a,"id");d.Indexed=c(a,"indexed","BOOLEAN");d.Pass=c(a,"pass");d.MaxCharacters=c(a,"max");d.Name=g_HtmlEncode(a.name["#cdata-section"]);d.Note=g_HtmlEncode(a.note["#cdata-section"]);e.Preferences.CustomFields.push(d)}catch(f){b=false,e.Log("CreateCustomField",LOG.EXCEPTION,"",f)}return b}function c(a,b,c){var d=a["@"+b];try{if(b!=""&&a!=null)switch(c){case "NUMBER":d=Number(d);break;case "BOOLEAN":d=d=="0"?false:true}}catch(f){e.Log("GetValue",
LOG.EXCEPTION,"prfs["+b+"]",f)}return d}clsPlayerBase.call(this,"clsTrackerGenHandler");var e=this,a=null;this.Preferences=null;var f;this.Initialize=function(b){var c=true;try{if(e.onInitComplete==null)throw"ME.onInitComplete == null";e.Error=ECMSERRORS.NONE;e.ErrorMessage="";f=b;e.Preferences=new clsTrackerGeneralPreference;a=new clsAjax("clsTrackerGenHandler");if(a.Initialize()==false)throw"Error @ m_objAjax.Initialize";a.URL=tracker_json.TrackerURL+"pages/EpiTracker.aspx?protocol=ET-0&ResponseType=2";
a.onLoadComplete=d;if(a.Load(true,METHOD.GET)==false)throw"Error @ m_objAjax.Load ";}catch(k){c=false,e.Log("Initialize",LOG.EXCEPTION,"",k)}return c}};
clsCustomFormBuilder=function(){clsPlayerBase.call(this,"clsCustomFormBuilder");var d=this,b=[],c,e=null;this.TextDirection="left";var a=[],f=messages_json.general.submitform;this.SetFocus=function(){try{b.length>0?b[0].Input!=void 0&&b[0].Input.focus():e!=null&&e.focus()}catch(a){d.Log("SetFocus",LOG.EXCEPTION,"for > "+d.Name,a)}};this.GetFeedBackData=function(){var a="";try{if(e!=null)a=e.value}catch(b){}return a};this.Create=function(n,g,k,o){var v=true;try{c=d.CreateHTMLElement("FORM");c.style.visibility=
"visible";c.style.display=g_inline;c.style.position="relative";var p=d.CreateHTMLElement("TABLE");p.style.visibility="visible";p.style.display="";p.style.paddingLeft="5px";p.style.paddingTop="5px";p.style.position="relative";p.width="100%";c.appendChild(p);c.onsubmit=function(){return false};n.appendChild(c);n="";d.Log("Create",LOG.SPECIAL,"document.cookie = ",document.cookie);if(document.cookie!=""){n=g_ReadCookie("UserProfileFormData");try{n=window.JSON?JSON.parse(n):eval("["+n+"]")[0]}catch(q){d.Log("Create",
LOG.EXCEPTION,"Error While Converting JSON from CookieUserProfileFormData, Ignore",q)}}if(String(g_objTracker.CUserID)==="0"){var E="";for(fld in k.CustomFields)if(fld=k.CustomFields[fld],fld.ID!=void 0){var E=n===""||n===null||n===void 0?"":n[fld.Name],u=new clsUIControl;u.TextDirection=d.TextDirection;u.Required=fld.Pass;u.MaxCharacters=fld.MaxCharacters;u.Name=fld.Name;u.Note=fld.Note;u.Create(p,k,g,E);b.push(u)}}if(o.PromptFeedBack==true){var B=p.insertRow(p.rows.length),A=B.insertCell(B.cells.length);
A.width="40%";try{A.dir=d.TextDirection}catch(G){}var D=d.CreateHTMLElement("LABEL");D.innerHTML=o.FeedBackText+"<br/>";D.style.cssText=g.LabelCSS;D.style.display=g_inline;D.style.visibility="visible";D.style.position="relative";A.appendChild(D);A.colSpan=2;e=d.CreateHTMLElement("TEXTAREA");e.style.cssText=g.InputBoxCSS;e.style.display=g_inline;e.style.visibility="visible";e.style.width=o.IsSurveyExist!=true?"300px":"98%";e.style.height="80px";e.style.position="relative";e.style.margin="2px";A.appendChild(e)}if(o.IsSurveyExist==
true){B=p.insertRow(p.rows.length);A=B.insertCell(B.cells.length);A.width="100%";A.colSpan=2;try{A.dir=d.TextDirection}catch(r){}var H=d.CreateHTMLElement("TABLE");H.style.visibility="visible";H.style.display="";H.style.paddingLeft="5px";H.style.paddingTop="5px";H.style.position="relative";H.width="100%";A.appendChild(H);B=H.insertRow(H.rows.length);A=B.insertCell(B.cells.length);A.colSpan=2;try{A.dir=d.TextDirection}catch(C){}A.style.cssText=g.SurveyTitleCSS;A.innerHTML=o.Survey.Name;B=H.insertRow(H.rows.length);
B.style.cssText=g.SurveyHeaderCSS;A=B.insertCell(B.cells.length);A.width="20px";try{A.dir=d.TextDirection}catch(J){}A.innerHTML=f.seq_no.text;A=B.insertCell(B.cells.length);try{A.dir=d.TextDirection}catch(I){}A.innerHTML=f.question.text;for(fld in o.Survey.Questions){iTemp=fld;fld=o.Survey.Questions[fld];var L=new clsSurveyUIControl;L.TextDirection=d.TextDirection;L.Required=fld.Mandatory=="True"?true:false;L.Text=fld.Text;L.SerialNO=parseInt(iTemp)+1;L.Create(H,fld,g);a.push(L)}}}catch(N){v=false,
d.Log("Create",LOG.EXCEPTION,"",N)}return v};this.ValidateFields=function(a){try{for(var c in b)if(b[c].Label!=void 0){if(b[c].ValidateRequiredField()==false)return false;a[c].Value=b[c].GetValue()}}catch(e){d.Log("DisplayError",LOG.EXCEPTION,"for > "+d.Name,e)}return true};this.StoreCookie=function(){try{if(d.Log("DisplayError",LOG.SPECIAL,"navigator.cookieEnabled",navigator.cookieEnabled),navigator.cookieEnabled===true){var a="{",c;for(c in b)b[c].GetValue!=void 0&&(a+='"'+b[c].Name+'":',a+='"'+
b[c].GetValue()+'"',c<b.length-1&&(a+=","));a+="}";if(g_CreateCookie("UserProfileFormData",a,7)===false)throw"Error @ g_CreateCookie";}}catch(e){d.Log("StoreCookie",LOG.EXCEPTION,"for > "+d.Name,e)}};this.ToggleFeedBackTextBox=function(a){try{a==true?(c.style.display=g_inline,c.style.visibility="visible"):(c.style.display="none",c.style.visibility="hidden")}catch(b){d.Log("ToggleFeedBackTextBox",LOG.EXCEPTION,"for > "+d.Name,b)}};this.ValidateSurveyForm=function(b){try{for(var c in a)if(a[c].QLabel!=
void 0){if(a[c].ValidateRequiredField()==false)return false;b[c].Choices=a[c].GetChoices()}}catch(e){d.Log("ValidateSurveyForm",LOG.EXCEPTION,"for > "+d.Name,e)}return true}};
clsUIControl=function(){function d(){var c=true;try{var d="",d=b.Input.value;if(d.trim()==""){c=false;try{if(e!=null)e.style.cssText=a.RequiredFieldCSS,e.innerHTML=a.RequiredFieldtext,e.style.visibility="visible"}catch(g){b.Log("DisplayError",LOG.EXCEPTION,"for > "+b.Name,g)}b.Input.focus();setTimeout(function(){try{if(e!="")e.style.cssText=a.NoteCSS,e.innerHTML=b.Note,e.style.visibility="visible"}catch(c){b.Log("DisplayNote",LOG.EXCEPTION,"for > "+b.Name,c)}},1E3)}}catch(k){b.Log("m_ValidateRequiredField",
LOG.EXCEPTION,"for > "+b.Name,k)}return c}clsPlayerBase.call(this,"clsUIControl");var b=this;this.Input=this.Label=null;this.Name=this.MaxCharacters="";this.Note="&nbsp;";var c=null,e=null,a=null;this.Required=new Boolean(false);this.ValidateRequiredField=function(){return true};this.TextDirection="left";this.Create=function(f,n,g,k){try{b.Label=b.CreateHTMLElement("label");a=g;b.Label.style.cssText=g.LabelCSS;b.Label.style.visibility="visible";b.Label.style.display=g_inline;b.Label.innerHTML=g.LabelCSS;
b.Label.innerHTML=b.Name;b.Input=b.CreateHTMLElement("INPUT");b.Input.setAttribute("maxlength",b.MaxCharacters);b.Input.value=k;b.Input.style.cssText=g.InputBoxCSS;b.Input.style.visibility="visible";b.Input.style.display=g_inline;if(b.Required==true)c=b.CreateHTMLElement("span"),c.innerHTML="*",c.style.cssText=g.RequiredFieldCSS,c.style.visibility="visible",c.style.display=g_inline,b.ValidateRequiredField=d;e=b.CreateHTMLElement("span");e.innerHTML=b.Note;e.style.cssText=g.NoteCSS;e.style.visibility=
"visible";e.style.display=g_inline;var o=f.insertRow(f.rows.length),v=o.insertCell(o.cells.length);try{v.dir=b.TextDirection}catch(p){}v.appendChild(b.Label);v=o.insertCell(o.cells.length);try{v.dir=b.TextDirection}catch(q){}v.appendChild(b.Input);v.appendChild(c==null?document.createTextNode("\u00a0"):c);o=f.insertRow(f.rows.length);v=o.insertCell(o.cells.length);v.appendChild(document.createTextNode("\u00a0"));v=o.insertCell(o.cells.length);try{v.dir=b.TextDirection}catch(E){}v.colSpan="2";v.appendChild(e==
null?document.createTextNode("\u00a0"):e);b.Label=document.getElementById(b.Label.id);b.Input=document.getElementById(b.Input.id);e=e==null?null:document.getElementById(e.id);c=c==null?null:document.getElementById(c.id)}catch(u){b.Log("Create",LOG.EXCEPTION,"for > "+b.Name,u)}return true};this.GetValue=function(){var a="";try{try{a=b.Input.value.trim()}catch(c){}if(a=="")try{a=b.Input.innerText.trim()}catch(d){}return a.trim()}catch(e){a="",b.Log("GetValue",LOG.EXCEPTION,"for > "+b.Name,e)}return a}};
clsSurveyUIControl=function(){function d(){var a=false;try{if(b.Choices.length>0){for(var d in b.Choices)document.getElementById(b.Choices[d].Input.id).checked==true&&(a=true);a==false&&(document.getElementById(b.Choices[0].Input.id).focus(),setTimeout(function(){try{if(c!=null)document.getElementById(c.id).style.visibility="visible"}catch(a){b.Log("DisplayError",LOG.EXCEPTION,"for > "+b.Name,a)}},500))}}catch(e){b.Log("m_ValidateRequiredField",LOG.EXCEPTION,"for > "+b.Name,e)}return a}clsPlayerBase.call(this,
"clsSurveyUIControl");var b=this;this.QLabel=null;this.Text="";this.Required=new Boolean(false);this.ValidateRequiredField=function(){return true};this.TextDirection="left";this.Choices=[];var c=null;this.SerialNo="0";var e=null;this.Create=function(a,f,n){try{b.QLabel=b.CreateHTMLElement("label");b.QLabel.style.cssText=n.LabelCSS;b.QLabel.style.visibility="visible";b.QLabel.style.display=g_inline;b.QLabel.innerHTML="<br/>"+b.Text;if(b.Required==true)c=b.CreateHTMLElement("span"),c.innerHTML="*",
c.style.cssText=n.RequiredFieldCSS,c.style.visibility="hidden",c.style.display=g_inline,b.ValidateRequiredField=d,b.QLabel.appendChild(c);b.QLabel.innerHTML+="<br/>";var g=a.insertRow(a.rows.length),k=g.insertCell(g.cells.length);try{k.dir=b.TextDirection}catch(o){}k.innerText=b.SerialNO+".";k.width="20px";k=g.insertCell(g.cells.length);try{k.dir=b.TextDirection}catch(v){}k.appendChild(b.QLabel);for(var p in f.Choices)g=a=null,a=b.CreateHTMLElement("INPUT"),a.style.cssText=n.InputBoxCSS,a.name=f.Id,
a.type=f.Type==SURVEYQUESTIONTYPE.MULTIPLE?"checkbox":"radio",f.Type==SURVEYQUESTIONTYPE.SINGLE||f.Type==SURVEYQUESTIONTYPE.MULTIPLE?(a.style.visibility="visible",a.style.display=g_inline,g=b.CreateHTMLElement("label"),g.style.cssText=n.LabelCSS,g.style.visibility="visible",g.style.display=g_inline,g.style.position="relative",g.innerHTML=f.Choices[p].Text+".&nbsp&nbsp&nbsp",k.appendChild(a),g.htmlFor=a.id,k.appendChild(g)):(a.style.visibility="hidden",a.style.display="none",k.appendChild(a)),f.Choices[p].Input=
document.getElementById(a.id),b.Choices.push(f.Choices[p]);if(f.Type==SURVEYQUESTIONTYPE.RATE){if(e=new clsStarRating,e.Create(b.Choices,n),k.innerHTML+="<br/><hr/>",e.BindEvents()==false)throw"Error @ m_objStar.BindEvents()";}else k.innerHTML+="<br/><hr/>"}catch(q){b.Log("Create",LOG.EXCEPTION,"for > "+b.Text,q)}return true};this.GetChoices=function(){var a=[];try{if(b.Choices.length>0)return b.Choices}catch(c){a="",b.Log("GetChoices",LOG.EXCEPTION,"for > "+b.Name,c)}return a}};
clsStarRating=function(){function d(b){var d=true;try{var f=0;b!=void 0&&(f=b.split("_")[1]);if(e[parseInt(f)-1].Input!=void 0&&e[parseInt(f)-1].Input!=null)document.getElementById(e[parseInt(f)-1].Input.id).checked=true;for(b=1;b<=a.length;b++)b<=f?document.getElementById("img_"+b).src="ui/images/icons/star_s.png":document.getElementById("img_"+b).src="ui/images/icons/star_n.png"}catch(g){c.Log("Selected",LOG.EXCEPTION,"",g),d=false}return d}function b(a){var b=true;try{f=(a==void 0?event:a).srcElement.id,
d(f)}catch(e){c.Log("Star_MouseOut",LOG.EXCEPTION,"",e),b=false}return b}clsPlayerBase.call(this,"clsStarRating");var c=this,e=null,a=[],f=null;this.Create=function(b,d){try{e=b;for(var f in e){var g=null,n=c.CreateHTMLElement("img");n.style.visibility="visible";n.style.display=g_inline;n.style.position="relative";n.src="ui/images/icons/star_n.png";n.style.cssText=d.StarCSS;n.id="img_"+(parseInt(f)+1);g=document.getElementById(e[f].Input.id);g.parentElement.appendChild(n);a.push(n)}}catch(E){c.Log("Create",
LOG.EXCEPTION,"",E)}};this.BindEvents=function(){var d=true;try{for(var e in a)document.getElementById(a[e].id).onmousemove=n,document.getElementById(a[e].id).onmouseout=g,document.getElementById(a[e].id).onclick=b}catch(f){c.Log("BindEvents",LOG.EXCEPTION,"",f),d=false}return d};var n=function(b){try{var d=0;id!=void 0&&(d=(b==void 0?event:b).srcElement.id.split("_")[1]);for(b=1;b<=a.length;b++)b<=d?document.getElementById("img_"+b).src="ui/images/icons/star_h.png":document.getElementById("img_"+
b).src="ui/images/icons/star_n.png"}catch(e){c.Log("Star_MouseMove",LOG.EXCEPTION,"",e)}},g=function(b){try{var e=0;id!=void 0&&(e=(b==void 0?event:b).srcElement.id.split("_")[1]);for(b=1;b<=a.length;b++)if(b<=e)document.getElementById("img_"+b).src="ui/images/icons/star_n.png";d(f)}catch(g){c.Log("Star_MouseOut",LOG.EXCEPTION,"",g)}}};
clsTrackerEpnEngine=function(){function d(){var a=true;try{if(e.Enabled==false)return a;e.Log("Process_Ended",LOG.TRACKER,"",g.ResLoc);p=p||g;if(p.Date_End==null)p.Date_End=new Date,p.TimeTaken=Math.round((p.Date_End-p.Date_Start)/1E3);var b=0;if(g_objTrackerData.TMResumed===true)g_objTrackerData.TMResumed=false,b=g_objScorm.Enabled==true?g_objScorm.BookMark.Weightage:g_objTracker.BookMark.Weightage;b==-1&&(b=0);for(i in p.Steps)p.Steps[i].Result==STEPSTATUS.CORRECT&&(b+=p.Steps[i].Weightage,p.CorrectStepCount+=
1);g.Weightage>0?(p.ScoredWeightage=b,p.Score=Math.round(b/g.Weightage*100)):e.Log("Process_Ended",LOG.ERROR,"","Process.Weightage=0")}catch(c){a=false,e.Log("Process_Ended",LOG.EXCEPTION,"",c)}return a}function b(a,b){try{var c=g.EFXData.Steps;if(a===COMPLETEPREF.LASTSTEP)for(i in g.Steps){if(c[c.length-1].TPSID==g.Steps[i].TPSID)return true}else if(a==COMPLETEPREF.ANYSTEP){if(g.Steps.length>0)return true}else if(a==COMPLETEPREF.ALLSTEP){var d=0,f=0;for(i in c)if(c[i].InMode[b]!=false){f++;for(var k=
c[i].TPSID,n=0;n<g.Steps.length;n++)if(g.Steps[n].TPSID==k){d++;break}}if(f==d)return true}else if(a===COMPLETEPREF.LASTSCORESTEP){k=1;for(d=0;d<c.length;d++)if(c[d].Weightage>0)k=c[d].StepIndex;for(i in g.Steps)if(k<=g.Steps[i].Index)return true}}catch(p){g_ErrorFlag=true,e.Log("GetModeCompleteStatus",LOG.EXCEPTION,"",p)}return false}function c(a,b){var c=true;try{f.TrackerStatus=a,a==TRACKERMODESTATUS.COMPLETED&&(g_objTrackerData.Summary.Modes[b].TrackerCompleted+=1)}catch(d){c=false,e.Log("SetStatus",
LOG.EXCEPTION,"",d)}return c}clsPlayerBase.call(this,"clsTrackerEpnEngine");var e=this,a=null,f,n,g,k,o,v,p,q;this.Enabled=false;this.CurResloc="";this.Initialize=function(b){var c=true;try{a=b}catch(d){c=false,e.Log("Initialize",LOG.EXCEPTION,"",d)}return c};this.EpiLearn_Started=function(){var a=true;try{if(e.Enabled==false||g_objTrackerData!=null)return a;e.Log("EpiLearn_Started",LOG.TRACKER,"","");g_objTrackerData=new clsTrackerDataEpiLearn;g_objTrackerData.SessionID=e.GetUniqueID();g_objTrackerData.Date_Start=
new Date;g_objTrackerData.Summary.Modes[MODETYPE.SHOW]=new clsMode;g_objTrackerData.Summary.Modes[MODETYPE.GUIDE]=new clsMode;g_objTrackerData.Summary.Modes[MODETYPE.TEST]=new clsMode;g_objTrackerData.Summary.Modes[MODETYPE.DOC]=new clsMode}catch(b){a=false,e.Log("EpiLearn_Started",LOG.EXCEPTION,"",b)}return a};this.Mode_Started=function(a){var b=true;try{if(e.Enabled==false)return b;e.Log("Mode_Started",LOG.TRACKER,"",a);e.CurResloc="";v!=null&&(p!=null&&(d(),p=null),v.Date_End==null&&e.Mode_Ended(TRACKERMODESTATUS.NOTCOMPLETED));
var c=null,c=new clsTrackerDataMode;g_objTrackerData.Modes[g_objTrackerData.Modes.length]=c;switch(a){case MODETYPE.SHOW:c.ModeType=MODETYPE.SHOW;break;case MODETYPE.GUIDE:c.ModeType=MODETYPE.GUIDE;break;case MODETYPE.TEST:c.ModeType=MODETYPE.TEST}c.Date_Start=new Date;c.TrackerStatus=TRACKERMODESTATUS.NOTCOMPLETED;f=c;v=g_objTrackerData.Modes[g_objTrackerData.Modes.length-1]}catch(g){b=false,e.Log("Mode_Started",LOG.EXCEPTION,"",g)}return b};this.Task_Started=function(a){var b=true;try{if(e.Enabled==
false)return b;e.Log("Task_Started",LOG.TRACKER,"",a.ResLoc);var c=null,c=new clsTrackerDataTask;f.Tasks[f.Tasks.length]=c;c.TaskType=a.Type;c.ResLoc=a.ResLoc;n=c}catch(d){b=false,e.Log("Task_Started",LOG.EXCEPTION,"",d)}return b};this.Process_Started=function(a){var b=true;try{if(e.Enabled==false)return b;p!=null&&d();e.Log("Process_Started",LOG.TRACKER,"",n.ResLoc);var c=null,c=new clsTrackerDataProcess;n.Process[n.Process.length]=c;c.Weightage=a.Weightage;c.Date_Start=new Date;c.ResLoc=n.ResLoc;
e.CurResloc=n.ResLoc;c.StepCount={IncludingSubStep:a.TotalCountableStepCount,ExcludingSubStep:a.TotalDisplayableSteps};g=c;g.EFXData=a;p=n.Process[n.Process.length-1]}catch(f){b=false,e.Log("Process_Started",LOG.EXCEPTION,"",f)}return b};this.Step_Started=function(a,b){var c=true;try{if(e.Enabled==false)return c;e.Log("Step_Started",LOG.TRACKER,"",a.TPSID);q!=null&&q.Date_End==null&&e.Step_Ended(-1,b);var d=null,d=new clsTrackerDataStep;g.Steps[g.Steps.length]=d;d.Weightage=a.Weightage;d.Date_Start=
new Date;if(a.Question!=null&&a.Type==STEPTYPE.WINDOWACTIVATE)d.IsQuestionExist=true;k=d;k.Index=a.StepIndex;k.TPSID=a.TPSID;k.Type=a.Type;k.IsSubStep=a.IsSubStep;k.SubStepCount=a.SubStepCount;k.GroupStepIndex=a.GroupStepIndex;q=g.Steps[g.Steps.length-1]}catch(f){c=false,e.Log("Step_Started",LOG.EXCEPTION,"",f)}return c};this.AddFeedback=function(a){var b=true;try{if(e.Enabled==false)return b;if(k.Feedbacks.length>0)for(var c in k.Feedbacks)if(k.Feedbacks[c].Type==a)return o.Count+=1,b;try{c=null,
c=new clsTrackerDataFeedback,o=k.Feedbacks[k.Feedbacks.length]=c,o.Type=a,o.Count=1}catch(d){e.Log("CreateFeedBackObject",LOG.EXCEPTION,"",d)}}catch(f){b=false,e.Log("AddFeedback",LOG.EXCEPTION,"",f)}return b};this.Step_Ended=function(a,b){var c=true,d;try{if(e.Enabled==false)return c;e.Log("Step_Ended",LOG.TRACKER,"",b);q.Date_End=new Date;q.TimeTaken=Math.round((q.Date_End-q.Date_Start)/1E3);d=k.Type==STEPTYPE.WINDOWACTIVATE&&k.IsQuestionExist==false||k.Type==STEPTYPE.INFOSTEP||k.Type==STEPTYPE.VARIATION?
STEPSTATUS.CORRECT:k.Type==STEPTYPE.WINDOWACTIVATE&&k.IsQuestionExist==true&&f.ModeType==MODETYPE.TEST?b==true?STEPSTATUS.CORRECT:STEPSTATUS.INCORRECT:f.ModeType==MODETYPE.SHOW&&b==void 0?STEPSTATUS.CORRECT:b==true?STEPSTATUS.CORRECT:STEPSTATUS.INCORRECT;k.Result=d}catch(g){c=false,e.Log("Step_Ended",LOG.EXCEPTION,"",g)}return c};this.Mode_Ended=function(k){var n=true;try{if(e.Enabled==false)return n;if(f.Updated==true)return true;if(g!=null)d(),f.Score=g.Score;if(k!=void 0)f.TrackerStatus=k;var p;
a:{var o=f.ModeType,k=true;try{if(g==null){p=k;break a}var q=g.EFXData.Steps,v=null,r;if(r=g_objScorm.Enabled==true){var H=true;try{var C;switch(o){case MODETYPE.SHOW:C=Number(uid_json.settings.mode_show.modecompleteoption);break;case MODETYPE.GUIDE:C=Number(uid_json.settings.mode_guide.modecompleteoption);break;case MODETYPE.TEST:C=Number(uid_json.settings.mode_test.modecompleteoption),Number(f.Score)>=Number(g_objScorm.TMPassScore)&&(g_objTrackerData.Summary.Modes[o].ScormPassed+=1)}var J=g_ErrorFlag=
false,J=b(C,o);if(g_ErrorFlag==true)throw"Error @ GetModeCompleteStatus";if(J==true)try{f.ScormCompleted=true,g_objTrackerData.Summary.Modes[o].ScormCompleted+=1}catch(I){e.Log("SetScormStatus",LOG.EXCEPTION,"",I)}}catch(L){H=false,e.Log("UpdateModeOverStatus",LOG.EXCEPTION,"",L)}r=H==false}if(r)throw"error @ UpdateModeOverStatus";try{if(a==null)a=g_objTracker.ContentPreferences;switch(o){case MODETYPE.SHOW:v=a.SMPref;break;case MODETYPE.GUIDE:v=a.GMPref;break;case MODETYPE.TEST:v=a.TMPref}if(o==
MODETYPE.TEST){Number(f.Score)>=Number(g_objTracker.ContentPreferences.TMPassScore)&&c(TRACKERMODESTATUS.COMPLETED,o);q=g_ErrorFlag=false;q=b(Number(uid_json.settings.mode_test.modecompleteoption),o);if(g_ErrorFlag==true)throw"Error @ GetModeCompleteStatus";if(q==true)f.TrackerCompleted=true}else{v.CompletePref==COMPLETEPREF.ANYSTEP&&g.Steps.length>0&&c(TRACKERMODESTATUS.COMPLETED,o);if(v.CompletePref==COMPLETEPREF.LASTSTEP){r="";C=0;for(C=q.length-1;C>=0;C--)if(q[C].InMode[o]==true){r=q[C].TPSID;
break}for(i in g.Steps)if(r==g.Steps[i].TPSID){c(TRACKERMODESTATUS.COMPLETED,o);break}}if(v.CompletePref==COMPLETEPREF.ALLSTEP){r=v=0;for(i in q)if(q[i].InMode[o]!=false){r++;var N=q[i].TPSID;for(C=0;C<g.Steps.length;C++)if(g.Steps[C].TPSID==N){v++;break}}r==v&&c(TRACKERMODESTATUS.COMPLETED,o)}}}catch(M){}}catch(K){k=false,e.Log("ModeCompletedPref",LOG.EXCEPTION,"",K)}p=k}if(p==false)throw"Error @ ModeCompletedPref";g_objTrackerData.Summary.Modes[f.ModeType].Attempts+=1;f.Date_End=new Date;f.TimeTaken=
Math.round((f.Date_End-f.Date_Start)/1E3);f.Updated=true}catch(F){n=false,e.Log("Mode_Ended",LOG.EXCEPTION,"",F)}return n};this.FinalizeTrackerData=function(){var a=true;try{g_objTrackerData.Date_End=new Date,f!=null&&f.Date_End==null&&e.Mode_Ended(TRACKERMODESTATUS.NOTCOMPLETED),g!=null&&g.Date_End==null&&d()}catch(b){a=false,e.Log("FinalizeTrackerData",LOG.EXCEPTION,"",b)}return a};this.SetUserAnswer=function(a,b){var c=true;try{var d=a.split("|"),f="",g;for(g in d)f+=f==""?d[g].split("_")[1]:"|"+
d[g].split("_")[1];k.QSDAnswer=f;k.QSDStatus=b}catch(n){c=false,e.Log("SetUserAnswer",LOG.EXCEPTION,"",n)}return c}};
clsTrackerEpnHandler=function(){function d(c){var d=true;try{e.Error=a.Error;if(c==false){if(e.Error!=ECMSERRORS.NONE)e.ErrorMessage=e.Error==ECMSERRORS.FAILED_TO_CONNECT?messages_json.general.tracker.failed_to_connect.text:e.Error==ECMSERRORS.FAULTY_RETURN_DATA?messages_json.general.tracker.server_error_preference.text:messages_json.general.tracker.preference_read_failed.text;throw"m_objAjax_onLoadComplete_EpnPref bSuccess = false";}var f=a.ReceivedData.epitracker.data;a.ReceivedData.epitracker.data[0]!=
void 0&&(f=a.ReceivedData.epitracker.data[0]);if(b(f,"value","BOOLEAN")==false)throw e.Log("m_objAjax_onLoadComplete_GenPref",LOG.EXCEPTION,"ERROR @ ECMS","Result=0"),e.ErrorMessage=messages_json.general.tracker.server_error_preference.text,"Server Side Error @ m_objAjax_onLoadComplete_GenPref";f=null;for(i in a.ReceivedData.epitracker.data)if(a.ReceivedData.epitracker.data[i]["@name"]=="ET-0"){f=a.ReceivedData.epitracker.data[i].prfs;break}if(f==null)throw e.Error=ECMSERRORS.FAULTY_RETURN_DATA,e.Log("m_objAjax_onLoadComplete_GenPref",
LOG.EXCEPTION,"ERROR @ ECMS","Data Node for ET-0 is not available"),e.ErrorMessage=messages_json.general.tracker.server_error_preference.text,"Server Side Error @ Data Node for ET-0 is not available";var o=b(f,"del","NUMBER");if(o==CONTENTDELETIONSTATUS.CONTENT_DELETED)throw e.Error=ECMSERRORS.CONTENT_DELETD,e.Log("m_objAjax_onLoadComplete_GenPref",LOG.EXCEPTION,"ERROR @ ECMS","Del=1"),e.ErrorMessage=messages_json.general.tracker.content_deleted.text,"Content Deleted @ Server";if(o==CONTENTDELETIONSTATUS.CONTENT_NOT_AVAILABLE)throw e.Error=
ECMSERRORS.CONTENT_NOT_AVAILABLE,e.Log("m_objAjax_onLoadComplete_GenPref",LOG.EXCEPTION,"ERROR @ ECMS","Del=2"),e.ErrorMessage=messages_json.general.tracker.content_not_available.text,"Content Detailed not available @ Server";c=true;try{e.Preferences=new clsTrackerEpnPreference;var v=a.ReceivedData.epitracker.data[1].prfs;e.Preferences.Session=b(v,"session");v=a.ReceivedData.epitracker.data[2].prfs;if(v["@jobaid"]!=void 0)e.Preferences.IsJobAid=b(v,"jobaid","BOOLEAN");e.Preferences.EfxId=b(v,"efxid");
e.Preferences.PromptFeedBack=b(v,"ucepn","BOOLEAN");e.Preferences.TMPassScore=b(v,"tmpassperc");e.Preferences.TMBookmark=b(v,"bookmarktm","BOOLEAN");e.Preferences.TMBookmarkPromptMsg=b(v,"bookmarktmpromptmsg","BOOLEAN");f={SM:"SM",GM:"GM",TM:"TM"};for(q in f)e.Preferences[q+"Pref"].AttemptPref=b(v[f[q].toLowerCase()],"attemptprf"),e.Preferences[q+"Pref"].IncudeSteps=b(v[f[q].toLowerCase()],"includesteps","BOOLEAN"),e.Preferences[q+"Pref"].Include=b(v[f[q].toLowerCase()],"include","BOOLEAN"),e.Preferences[q+
"Pref"].CompletePref=b(v[f[q].toLowerCase()],"completeprf");e.Preferences.FeedBackText=g_HtmlEncode(v.epnuclabel["#cdata-section"]);var p=a.ReceivedData.epitracker.bookmark||{};if(p.epilearn!=void 0&&e.GPreferences.BookMark==true)p=p.epilearn,e.Preferences.BookMark.LastResloc=b(p,"lastresloc"),e.Preferences.BookMark.ModetypeID=b(p,"modetypeid"),e.Preferences.BookMark.SMOver=b(p,"smover","BOOLEAN"),e.Preferences.BookMark.GMOver=b(p,"gmover","BOOLEAN"),e.Preferences.BookMark.TMOver=b(p,"tmover","BOOLEAN"),
e.Preferences.BookMark.DocOver=b(p,"dmover","BOOLEAN"),e.Preferences.BookMark.LastVisitedStep=b(p,"lastvisitedstep"),e.Preferences.BookMark.LastTPSID=b(p,"lasttpsid"),e.Preferences.BookMark.NoOfCorrectSteps=b(p,"noofcorrectsteps"),e.Preferences.BookMark.LastScore=b(p,"lastscore"),e.Preferences.BookMark.Weightage=b(p,"lastweightage","NUMBER");if(v.extlinks!=void 0)e.Preferences.ExtLinks.Btn_1=b(v.extlinks,"btn_1","STRING"),e.Preferences.ExtLinks.Btn_2=b(v.extlinks,"btn_2","STRING"),e.Preferences.ExtLinks.Btn_3=
b(v.extlinks,"btn_3","STRING");if(e.Preferences.ExtLinks.Btn_1!=""||e.Preferences.ExtLinks.Btn_2!=""||e.Preferences.ExtLinks.Btn_3!="")e.Preferences.ExtLinks.Enable=true;if(v.survey!=void 0){e.Preferences.IsSurveyExist=true;e.Preferences.Survey=new clsSurvey;e.Preferences.Survey.Id=b(v.survey,"id","STRING");e.Preferences.Survey.Name=b(v.survey,"name","STRING");e.Preferences.Survey.Questions=[];if(!Array.isArray(v.survey.question))p=[],p.push(v.survey.question),v.survey.question=p;for(var q in v.survey.question){var E=
new clsSurveyQuestion;E.Id=b(v.survey.question[q],"id","STRING");E.Text=b(v.survey.question[q],"text","STRING");E.Type=b(v.survey.question[q],"type","NUMBER");E.Mandatory=v.survey.question[q]["@mandatory"];E.Seqno=b(v.survey.question[q],"seqno","NUMBER");E.Choices=[];for(var u in v.survey.question[q].choice){var B=new clsSurveyChoice;B.Id=b(v.survey.question[q].choice[u],"id","STRING");B.Text=b(v.survey.question[q].choice[u],"text","STRING");E.Choices.push(B)}e.Preferences.Survey.Questions.push(E)}}if(v.title!=
void 0)e.Preferences.Title=v.title}catch(A){c=false,e.Log("ReadEpilearnPreferences",LOG.EXCEPTION,"",A)}if(c==false)throw e.Error=ECMSERRORS.FAILED_TO_PROCESS_RETURNED_DATA,e.ErrorMessage=messages_json.general.tracker.preference_read_failed.text,"Error @ ReadEpilearnPreferences";e.onInitComplete(true)}catch(G){d=false,e.Log("m_objAjax_onLoadComplete_EpnPref",LOG.EXCEPTION,"",G)}try{if(d==false)e.onInitComplete(false)}catch(D){e.Log("m_objAjax_onLoadComplete_EpnPref",LOG.EXCEPTION,"2",D),g_CriticalError()}}
function b(a,b,c){var d=a["@"+b];try{if(b!=""&&a!=null)switch(c){case "NUMBER":d=Number(d);break;case "BOOLEAN":d=d=="0"?false:true}}catch(f){e.Log("GetValue",LOG.EXCEPTION,"prfs["+b+"]",f)}return d}function c(c){var d=true;try{e.Error=a.Error;if(c==false){if(e.Error!=ECMSERRORS.NONE)if(e.Error==ECMSERRORS.FAILED_TO_CONNECT)e.ErrorMessage=messages_json.general.tracker.failed_to_connect_result.text;else if(e.Error==ECMSERRORS.FAULTY_RETURN_DATA)e.ErrorMessage=messages_json.general.tracker.server_error_result.text;
throw"m_objAjax_onLoadComplete_EpnPref bSuccess = false";}e.CrossDomainPost=a.CrossDomainPost;if(a.CrossDomainPost===false){var f=a.ReceivedData.epitracker.data;a.ReceivedData.epitracker.data[0]!=void 0&&(f=a.ReceivedData.epitracker.data[0]);if(b(f,"value","BOOLEAN")==false)throw e.Log("m_objAjax_onLoadComplete_GenPref",LOG.EXCEPTION,"ERROR @ ECMS","Result=0"),e.ErrorMessage=messages_json.general.tracker.server_error_result.text,"Server Side Error @ m_objAjax_onLoadComplete_GenPref";}e.onSendComplete(c)}catch(o){d=
false,e.Log("m_objAjax_onLoadComplete_EpnResult",LOG.EXCEPTION,"",o)}try{if(d==false)e.onSendComplete(false)}catch(v){e.Log("m_objAjax_onLoadComplete_EpnResult",LOG.EXCEPTION,"2",v),g_CriticalError()}}clsPlayerBase.call(this,"clsTrackerEpnHandler");var e=this,a=null,f="pages/EpiTracker.aspx?protocol=ET-0|ET-3~PRE-1$#CONTSPEC#$&ResponseType=2&ContentClientId="+tracker_json.ContentID;this.onSendComplete=null;this.CrossDomainPost=false;this.GPreferences=this.Preferences=null;this.Initialize=function(b,
c){var k=true;try{if(e.onInitComplete==null)throw"ME.onInitComplete == null";if(b==void 0)throw"ContentID = undifined";e.Error=ECMSERRORS.NONE;e.ErrorMessage="";a=new clsAjax("clsTrackerEpnHandler");if(a.Initialize()==false)throw"Error @ m_objAjax.Initialize";var o="",o=g_CommandArgs.COURSEID!=void 0?tracker_json.TrackerURL+f+"&CourseID="+g_CommandArgs.COURSEID:tracker_json.TrackerURL+f,v=e.GetUniqueID(),o=o.replace("$#CONTSPEC#$","|ET-9~"+b+"&"+v+"&CUserID="+c);a.onLoadComplete=d;a.URL=o;if(a.Load(true,
METHOD.GET)==false)throw"Error @ m_objAjax.GetGenPreferencesFromServer() ";}catch(p){k=false,e.Log("Initialize",LOG.EXCEPTION,"",p)}return k};this.SendResults=function(){var b=true;try{if(e.onSendComplete==null)throw"ME.onSendComplete == null";var d=new clsTrackerEpnResults(e.Preferences,e.GPreferences),f=d.GenerateXML();if(f=="")throw"sData is '' ";if(d.Error==true)throw"objRH.Error ";f="postData="+f;a.URL=tracker_json.TrackerURL+"pages/EpiTrackerPostResults.aspx?ResponseType=2";a.onLoadComplete=
c;a.DataToSend=f;var o,v,p,q,E=g_objTR.TrackerForm.GetBoundingRect();E!=null&&(o=Math.ceil(E.left),v=Math.ceil(E.top),p=Math.ceil(E.right-E.left),q=Math.ceil(E.bottom-E.top));var u=messages_json.general.submitform;a.Msg_success=u.msg_success.text;a.Msg_failure=u.msg_failed.text;a.Msg_retry=u.button_retry.text;a.Msg_uploading=u.msg_sending.text;a.Msg_title=u.caption.text;var B=uid_json.psim.layout.h5dobjects;a.Msg_uploadingcss=g_GetCSSForTD(B.submitform.spec.uploadingmsg.css);a.Msg_successcss=g_GetCSSForTD(B.submitform.spec.successmsg.css);
a.Msg_failedcss=g_GetCSSForTD(B.submitform.spec.failuremsg.css);a.Msg_buttoncss=u.button_retry.css;a.Img_Loading=g_objRIL.ImageList.loadingbig.src;if(a.Load(true,METHOD.POST,o,v,p,q)==false)throw"Error @ m_objAjax.Load";}catch(A){b=false,e.Log("SendResults",LOG.EXCEPTION,"",A)}return b}};
clsTrackerEpnResults=function(d,b){clsPlayerBase.call(this,"clsTrackerEpnResults");var c=this;this.Error=false;this.GenerateXML=function(){var e="";try{c.Error=false;var a,f,n,g,k="",o="",v="",p="",q="",E=0,u=-1;e+='<epitracker version="'+g_Version+'">';e+="<contents>";e+='<content contenttypeid="1" contentid="'+g_objTracker.ContentID+'" sessionid="'+g_objTrackerData.SessionID+'" presentationsessionid="'+g_objTrackerData.PresentationSessionID+'" presentationid="'+g_objTrackerData.PresentationID+'">';
var B=g_objTrackerData.Modes;if(B.length>0&&(a=B[B.length-1],p=a.ModeType,q=a.Score,a.Tasks.length>0&&(f=a.Tasks[a.Tasks.length-1],n=f.Process[f.Process.length-1],E=n.CorrectStepCount,g=n.Steps[n.Steps.length-1],k=g.TPSID,o=g.Index,v=n.ResLoc,a.ModeType==MODETYPE.TEST&&g_objTrackerData.ConsiderWeightage==true)))u=n.ScoredWeightage;e+="<mds>";for(var A in B){a=e;var G;a:{var D=B[A];f="";try{n=g=true;var r=MODECONSIDERATTEMPTPREF.AllATTEMPTS;switch(D.ModeType){case MODETYPE.SHOW:g=d.SMPref.Include;
n=d.SMPref.IncudeSteps;r=d.SMPref.AttemptPref;break;case MODETYPE.GUIDE:g=d.GMPref.Include;n=d.GMPref.IncudeSteps;r=d.GMPref.AttemptPref;break;case MODETYPE.TEST:g=d.TMPref.Include;n=d.TMPref.IncudeSteps;r=d.TMPref.AttemptPref;break;case MODETYPE.DOC:g=d.DMPref.Include}if(g==false||r==MODECONSIDERATTEMPTPREF.COMPLETEDATTEMPTS&&D.TrackerStatus!=TRACKERMODESTATUS.COMPLETED){G="";break a}f='<md type="'+D.ModeType+'" stime="'+D.Date_Start.toHHMMSS()+'" etime="'+D.Date_End.toHHMMSS()+'" score="'+D.Score+
'" status="'+D.TrackerStatus+'" timetaken="'+D.TimeTaken+'">';var H=D.Tasks;g=void 0;for(g in H){var C=H[g].Process;if(C.length>0){f+="<prss>";for(var J in C){f+='<prs index="'+C[J].Index+'" stime="'+C[J].Date_Start.toHHMMSS()+'" resloc="'+C[J].ResLoc+'" etime="'+C[J].Date_End.toHHMMSS()+'" timetaken="'+C[J].TimeTaken+'">';if(n==true){var I=f,L="";try{var N=C[J].Steps,M=1;if(N.length>0){var L="<ss>",K=void 0;for(K in N){var F=N[K];L+='<s s1="'+F.TPSID+'" s2="'+F.Result+'" ';if(F.Feedbacks.length>
0){L+=">";for(var T in F.Feedbacks)L+='<f f2="'+M++ +'" f1="'+F.Feedbacks[T].Type+'" />';F.IsQuestionExist==true&&(L+='<asm id="'+F.QSDAnswer+'" status="'+F.QSDStatus+'" />');L+="</s>"}else F.IsQuestionExist==true?(L+=">",L+='<asm id="'+F.QSDAnswer+'" status="'+F.QSDStatus+'" />',L+="</s>"):L+="/>"}L+="</ss>"}}catch(S){c.Error=true,L="",c.Log("CreateStepNode",LOG.EXCEPTION,"",S)}f=I+L}f+="</prs>"}f+="</prss>"}}f+="</md>"}catch(O){c.Error=true,f="",c.Log("CreateModeNode",LOG.EXCEPTION,"",O)}G=f}e=
a+G}e+="</mds>";e+="</content></contents>";B=e;A="";try{A+="<summary>";var P=g_objTrackerData.Summary.Modes[MODETYPE.SHOW];A+='<sm attempts="'+P.Attempts+'" cmp="'+P.TrackerCompleted+'" nocmp="'+(P.Attempts-P.TrackerCompleted)+'" />';var z=g_objTrackerData.Summary.Modes[MODETYPE.GUIDE];A+='<gm attempts="'+z.Attempts+'" cmp="'+z.TrackerCompleted+'" nocmp="'+(z.Attempts-z.TrackerCompleted)+'" />';var X=g_objTrackerData.Summary.Modes[MODETYPE.TEST];A+='<tm attempts="'+X.Attempts+'" cmp="'+X.TrackerCompleted+
'" nocmp="'+(X.Attempts-X.TrackerCompleted)+'" />';var Z=g_objTrackerData.Summary.Modes[MODETYPE.DOC];A+='<dm attempts="'+Z.Attempts+'" cmp="'+Z.TrackerCompleted+'" nocmp="'+(Z.Attempts-Z.TrackerCompleted)+'" />';A+="<comment><![CDATA["+g_objTrackerData.FeedBackData+"]]\></comment>";if(g_CommandArgs[CMDARGS.PORTALUSERID]!=void 0)A+="<userid><![CDATA["+g_CommandArgs[CMDARGS.PORTALUSERID]+"]]\></userid>",A+="<sectionid><![CDATA["+g_CommandArgs[CMDARGS.SECTIONID]+"]]\></sectionid>";else if(g_objScorm.Enabled==
true)A+="<sco><![CDATA["+g_objScorm.Handler.LearnerID+"|"+g_objScorm.Handler.LearnerName+"]]\></sco>";else if(b.CUserType==TRACKERUSERTYPE.CUSTOM){A+="<customform>";for(var Y in b.CustomFields)A+='<fld id="'+b.CustomFields[Y].ID+'" max="'+b.CustomFields[Y].MaxCharacters+'" pass="'+b.CustomFields[Y].Pass+'" indexed="'+(b.CustomFields[Y].Indexed==true?1:0)+'"> <name><![CDATA['+b.CustomFields[Y].Name+"]]\></name><value><![CDATA["+b.CustomFields[Y].Value+"]]\></value> <note><![CDATA["+b.CustomFields[Y].Note+
"]]\></note> </fld>";A+="</customform>"}A+="</summary>"}catch(U){c.Error=true,A="",c.Log("CreateSummary",LOG.EXCEPTION,"",U)}var e=B+A,fa=g_objTrackerData.Summary.Modes[MODETYPE.SHOW].TrackerCompleted>0?1:0,R=g_objTrackerData.Summary.Modes[MODETYPE.GUIDE].TrackerCompleted>0?1:0,la=g_objTrackerData.Summary.Modes[MODETYPE.TEST].TrackerCompleted>0?1:0,ha=g_objTrackerData.Summary.Modes[MODETYPE.DOC].TrackerCompleted>0?1:0;g_objTracker.BookMark.LastResloc!=""&&(g_objTracker.BookMark.SMOver==true&&(fa=
1),g_objTracker.BookMark.GMOver==true&&(R=1),g_objTracker.BookMark.TMOver==true&&(la=1));e+='<bookmark modetypeid="'+p+'" lastresloc="'+v+'" lasttpsid="'+k+'" lastscore="'+q+'" lastvisitedstep="'+o+'" noofcorrectsteps="'+E+'" smover="'+fa+'" gmover="'+R+'" tmover="'+la+'" dmover="'+ha+'" lastweightage="'+u+'" />';if(d.IsSurveyExist==true){k=e;o="";try{o+='<survey id="'+d.Survey.Id+'">';o+="<questions>";for(var ja in d.Survey.Questions){o+='<question id="'+d.Survey.Questions[ja].Id+'">';o+="<choices>";
for(var ia in d.Survey.Questions[ja].Choices)document.getElementById(d.Survey.Questions[ja].Choices[ia].Input.id).checked==true&&(o+='<choice id="'+d.Survey.Questions[ja].Choices[ia].Id+'" value = "true" />');o+="</choices>";o+="</question>"}o+="</questions>";o+="</survey>"}catch(ba){c.Error=true,o="",c.Log("CreateSurvey",LOG.EXCEPTION,"",ba)}e=k+o}e+="</epitracker>";c.Log("Posted",LOG.TRACKER,"","<textarea>"+e+"</textarea>")}catch(ca){c.Error=true,c.Log("GenerateXML",LOG.EXCEPTION,"",ca)}return e}};
clsTracker=function(){function d(a){var c=true,d=false;try{g_objScriptLoader.onLoadComplete=null;if(a==false)d=true,k.Log("TrkJsFile_Loaded",LOG.TRACE,"bSuccess==false","trk.js is not loaded, may be empty ?");else if(window.tracker_json==void 0)d=true,k.Log("TrkJsFile_Loaded",LOG.ERROR,"Tracker Engine is not enabled since tracker_json is undefined","");else if(tracker_json.TrackerURL=="")d=true,k.Log("TrkJsFile_Loaded",LOG.TRACE,"","Tracker Engine is not enabled since tracker_json.TrackerURL is empty");
else if(tracker_json.ContentID=="")throw k.Log("TrkJsFile_Loaded",LOG.TRACE,"","Tracker Engine is not enabled since tracker_json.ContentID is empty"),"tracker_json.ContentID == empty ";else{k.ContentID=tracker_json.ContentID;k.URL=tracker_json.TrackerURL;if(g_CommandArgs[CMDARGS.PORTALUSERID]!=void 0){var e=g_CommandArgs[CMDARGS.APPLICATION];if(e!="")tracker_json.TrackerURL=e,k.URL=tracker_json.TrackerURL,k.Log("TrkJsFile_Loaded",LOG.SPECIAL,"sNewECMSURL",e)}f=new clsTrackerGenHandler;f.onInitComplete=
b;if(f.Initialize(g)==false)throw"Error @ m_objTrkGenHandler.Initialize() ";}if(d==true)k.onInitComplete(true)}catch(n){c=false,k.Log("TrkJsFile_Loaded",LOG.EXCEPTION,"",n)}try{if(c==false)k.onInitComplete(false)}catch(u){k.Log("TrkJsFile_Loaded",LOG.EXCEPTION,"2",u),g_CriticalError()}}function b(a){var b=true;try{k.Error=f.Error;k.ErrorMessage=f.ErrorMessage;if(a==false)throw"m_objTrkGenHandler_onInitComplete bSuccess == false ";switch(g){case CONTENTTYPE.EPILEARN:n=new clsTrackerEpnHandler}if(n==
null)throw"m_objTrkContentHandler not created. may be ContentType is wrong";k.GenPreferences=f.Preferences;n.onInitComplete=c;n.GPreferences=f.Preferences;if(n.Initialize(k.ContentID,k.CUserID)==false)throw"Error @ m_objTrkContentHandler.Initialize() ";}catch(d){b=false,k.Log("m_objTrkGenHandler_onInitComplete",LOG.EXCEPTION,"",d)}try{if(b==false)k.onInitComplete(false)}catch(e){k.Log("m_objTrkGenHandler_onInitComplete",LOG.EXCEPTION,"2",e),g_CriticalError()}}function c(a){var b=true;try{k.Error=
n.Error;k.ErrorMessage=n.ErrorMessage;if(a==false)throw"m_objTrkContentHandler_onInitComplete bSuccess == false ";k.Enabled=true;k.Engine.Enabled=true;k.ContentPreferences=n.Preferences;k.BookMark=n.Preferences.BookMark;if(f.Preferences.CUserType==TRACKERUSERTYPE.CUSTOM||n.Preferences.PromptFeedBack==true||n.Preferences.IsSurveyExist==true)k.CustomFormAvailable=true;if(n.Preferences.IsJobAid==true)k.Enabled=false;if(k.Engine.Initialize(n.Preferences)==false)throw"Error @ ME.Engine.Initialize() ";
}catch(c){b=false,k.Log("m_objTrkContentHandler_onInitComplete",LOG.EXCEPTION,"",c)}k.onInitComplete(b)}function e(a){try{if(k.CrossDomainPost=n.CrossDomainPost,a==false)throw"m_objTrkContentHandler_onInitComplete bSuccess == false ";}catch(b){k.Log("m_objTrkContentHandler_onInitComplete",LOG.EXCEPTION,"",b)}k.onSendComplete(a)}clsPlayerBase.call(this,"clsTracker");this.Enabled=false;this.Engine=null;this.CustomFormAvailable=false;this.ContentID="";this.CUserID="0";this.BookMark=null;this.ShowSubmitForm=
true;this.SurveyFormValidated=this.CustomFieldsValidated=false;this.GenPreferences=this.ContentPreferences=null;this.CrossDomainPost=false;this.URL="";this.TextDirection="left";var a=null,f=null,n=null,g=CONTENTTYPE.NONE,k=this;this.Initialize=function(a){var b=true;try{if(k.onInitComplete==null)throw"ME.onInitComplete == null";k.Error=ECMSERRORS.NONE;k.ErrorMessage="";g=a;switch(g){case CONTENTTYPE.EPILEARN:k.Engine=new clsTrackerEpnEngine}if(k.Engine==null)throw"ME.Engine not created. may be ContentType is wrong";
g_objScriptLoader.onLoadComplete=d;switch(g){case CONTENTTYPE.EPILEARN:g_objScriptLoader.Load("init/trk.js");break;case CONTENTTYPE.ASSESSMENT:g_objScriptLoader.Load("_files/scripts/trk.js")}}catch(c){b=false,k.Log("Initialize",LOG.EXCEPTION,"",c)}return b};this.SendResults=function(){var b=true;try{if(k.onSendComplete==null)throw"ME.onInitComplete == null";n.onSendComplete=e;g_objTrackerData.FeedBackData=a.GetFeedBackData();if(n.SendResults()==false)throw"Error @ m_objTrkContentHandler.Initialize() ";
}catch(c){b=false,k.Log("SendResults",LOG.EXCEPTION,"",c)}return b};this.CreateCustomForm=function(b,c){var d=true;try{if(a=new clsCustomFormBuilder,a.TextDirection=k.TextDirection,a.Create(b,c,f.Preferences,n.Preferences)==false)throw"Error @ objCustomFormBuilder.Create()";}catch(e){d=false,k.Log("CreateCustomForm",LOG.EXCEPTION,"",e)}return d};this.SetFocus=function(){var b=true;try{a.SetFocus()}catch(c){b=false,k.Log("SetFocus",LOG.EXCEPTION,"",c)}return b};this.ValidateCustomForm=function(){var b=
true;try{if(a!=null&&(k.CustomFieldsValidated=a.ValidateFields(f.Preferences.CustomFields),k.CustomFieldsValidated===true&&a.StoreCookie(f.Preferences.CustomFields)===false))throw"Error @ m_objCustomFormBuilder.StoreCookie";}catch(c){b=false,k.Log("ValidateCustomForm",LOG.EXCEPTION,"",c)}return b};this.ToggleFeedBackTextBox=function(b){var c=true;try{a.ToggleFeedBackTextBox(b)}catch(d){c=false,k.Log("ToggleFeedBackTextBox",LOG.EXCEPTION,"",d)}return c};this.ValidateSurveyForm=function(){var b=true;
try{if(a!=null)k.SurveyFormValidated=a.ValidateSurveyForm(n.Preferences.Survey.Questions)}catch(c){b=false,k.Log("ValidateSurveyForm",LOG.EXCEPTION,"",c)}return b}};
clsScorm=function(){function d(c){var d=true;try{if(c==false)throw this.onload=null,b.Log("ScoJsFile_Loaded",LOG.ERROR,"","Sco.js file NOT loaded into HEAD","Scorm Engine is not enabled"),"sco.js loading failed";if(window.sco_json!=void 0){b.Log("ScoJsFile_Loaded",LOG.TRACE,"Scorm Enabled","");switch(m_eContentType){case CONTENTTYPE.EPILEARN:switch(sco_json.version){case "1_2":b.Handler=new clsScoEpnHandler_1_2;break;case "2_4k3":b.Handler=new clsScoEpnHandler_2004_3}}if(b.Handler.Initialize()==false)throw"Error @ ME.Handler.Initialize() ";
b.Status=b.Handler.Status;b.Enabled=true;b.BookMark=b.Handler.BookMark;b.TMPassScore=b.Handler.MasteryScore;b.PromptTMBookmark=b.Handler.PromptTMBookmark}else b.Log("ScoJsFile_Loaded",LOG.ERROR,"Scorm Engine is not enabled since sco_json is undefined ","")}catch(a){d=false,b.Log("ScoJsFile_Loaded",LOG.EXCEPTION,"",a)}b.onInitComplete(d)}clsPlayerBase.call(this,"clsScorm");var b=this;this.Enabled=false;this.Handler=null;this.BookMark={};this.TMPassScore=0;this.Status=SCORMSTATUS.CANCELLED;this.Initialize=
function(c){var e=true;try{if(b.onInitComplete==null)throw"ME.onInitComplete == null";m_eContentType=c;g_objScriptLoader.onLoadComplete=d;switch(m_eContentType){case CONTENTTYPE.EPILEARN:g_objScriptLoader.Load("init/sco.js");break;case CONTENTTYPE.ASSESSMENT:g_objScriptLoader.Load("_files/scripts/sco.js")}}catch(a){e=false,b.Log("Initialize",LOG.EXCEPTION,"",a)}return e};this.SendResults=function(){var c=true;try{if(b.Handler.Finalize()==false)throw"Error @ Finalize()";b.Status=b.Handler.Status}catch(d){c=
false,b.Log("SendResults",LOG.EXCEPTION,"",d)}return c}};
clsScoAPIBase=function(){function d(b,a){for(;b[a]==null&&b.parent!=null&&b.parent!=b;){c++;if(c>7)return alert("Error finding API -- too deeply nested."),null;b=b.parent}return b[a]}clsPlayerBase.call(this,"clsScoAPIBase");var b=this,c=0;this.ErrorCode=0;this.GetScormAPI=function(){var c=null;try{b.ErrorCode=0;var a="";switch(sco_json.version){case "1_2":a="API";break;case "2_4k3":a="API_1484_11"}var f=d(window.dialogArguments||window,a);f==null&&window.opener!=null&&typeof window.opener!="undefined"&&
(f=d(window.opener,a));f==null&&window.opener.opener!=null&&typeof window.opener.opener!="undefined"&&(f=d(window.opener.opener,a));f==null&&b.Log("getAPI",LOG.EXCEPTION,"","Unable to find an API adapter");c=f}catch(n){b.ErrorCode=n.number,b.Log("GetScormAPI",LOG.EXCEPTION,"",n)}return c}};
clsScoEpnHandlerBase=function(){clsPlayerBase.call(this,"clsScoEpnHandlerBase");var d=this;this.ElapsedMilliSec=this.ElapsedSec=this.ElapsedMin=this.ElapsedHour=0;this.ScormData={LastModeAttempted:"",LastResloc:"",LastStepIndex:"",LastStepTPSID:"",LastTMScore:"0",SMCompletionCount:"",GMCompletionCount:"",TMCompletionCount:"",TMPassCount:""};this.Status=SCORMSTATUS.CANCELLED;this.CreateBookMarkJson=function(){var b="";try{var c=true;try{var e=g_objTrackerData.Date_Start.getTime(),a=(g_objTrackerData.Date_End.getTime()-
e)/1E3,e=true;try{var f=a%60;a-=f;var n=a%3600;a-=n;var f=Math.round(f*100)/100,g=new String(f),k=g,f="";g.indexOf(".")!=-1&&(k=g.substring(0,g.indexOf(".")),f=g.substring(g.indexOf(".")+1,g.length));k.length<2&&(k="0"+k);g=k;a=a%3600!=0?0:a/3600;n=n%60!=0?0:n/60;(new String(a)).length<2&&(a="0"+a);(new String(n)).length<2&&(n="0"+n);d.ElapsedHour=a;d.ElapsedMin=n;d.ElapsedSec=g;d.ElapsedMilliSec=f}catch(o){e=false,d.Log("FormatElapsedTime",LOG.EXCEPTION,"",o)}if(e==false)throw"error @ FormatElapsedTime";
}catch(v){c=false,d.Log("ComputeElapsedTime",LOG.EXCEPTION,"",v)}if(c==false)throw"error @ ComputeElapsedTime";n=a=e=g=null;c=-1;try{g=g_objTrackerData.Modes[g_objTrackerData.Modes.length-1],e=g.Tasks[g.Tasks.length-1],a=e.Process[e.Process.length-1],n=a.Steps[a.Steps.length-1]}catch(p){}if(g!=null){if(d.ScormData.LastModeAttempted=g.ModeType,e!=null&&(d.ScormData.LastResloc=a.ResLoc,d.ScormData.LastStepIndex=n.Index,d.ScormData.LastStepTPSID=n.TPSID,g.ModeType==MODETYPE.TEST&&g_objTrackerData.ConsiderWeightage==
true))c=a.ScoredWeightage}else d.ScormData.LastModeAttempted=d.BookMark.Mode,d.ScormData.LastResloc=d.BookMark.ResLoc,d.ScormData.LastStepIndex=d.BookMark.StepID;d.ScormData.LastTMScore=d.BookMark.Score;for(g=0;g<g_objTrackerData.Modes.length;g++){var q;if(g_objTrackerData.Modes[g].ModeType===MODETYPE.TEST)q=g_objTrackerData.Modes[g],d.ScormData.LastTMScore=d.ScormData.LastTMScore>q.Score?d.ScormData.LastTMScore:q.Score}var E=Number(g_objTrackerData.Summary.Modes[MODETYPE.SHOW].ScormCompleted)||0,
u=Number(g_objTrackerData.Summary.Modes[MODETYPE.GUIDE].ScormCompleted)||0,B=Number(g_objTrackerData.Summary.Modes[MODETYPE.TEST].ScormCompleted)||0,A=Number(g_objTrackerData.Summary.Modes[MODETYPE.TEST].ScormPassed)||0;d.ScormData!=null&&(E+=Number(d.ScormData.SMCompletionCount)||0,u+=Number(d.ScormData.GMCompletionCount)||0,A+=Number(d.ScormData.TMPassCount)||0);d.ScormData.SMCompletionCount=E;d.ScormData.GMCompletionCount=u;d.ScormData.TMCompletionCount=B;d.ScormData.TMPassCount=A;b='{"lastmode":"'+
d.ScormData.LastModeAttempted+'","score":"'+d.ScormData.LastTMScore+'","lastresloc":"'+d.ScormData.LastResloc+'","laststepid":"'+d.ScormData.LastStepIndex+'","smcompleted":"'+E+'","gmcompleted":"'+u+'","lastweightage":"'+c+'","tmpassed":"'+A+'"}';b=encodeURIComponent(b)}catch(G){b="",d.Log("CreateBookMarkJson",LOG.EXCEPTION,"",G)}return b};this.ProcessBookMarkData=function(b,c){var e=true;try{if(b.Data.LessonStatus==c.FAILED||b.Data.LessonStatus==c.INCOMPLETE||b.Data.CompletionStatus==c.INCOMPLETE||
b.Data.SuccessStatus==c.FAILED||b.Data.LessonStatus==c.BROWSED)try{if(b.Data.Location!=""&&b.Data.Location!=null&&(b.Data.Location=window.JSON?JSON.parse(b.Data.Location):eval("["+b.Data.Location+"]")[0],b.Data.Location!=null))d.BookMark.Mode=b.Data.Location.lastmode,d.BookMark.Weightage=parseFloat(b.Data.Location.lastweightage),d.BookMark.Score=parseFloat(b.Data.Location.score),d.BookMark.ResLoc=b.Data.Location.lastresloc,d.BookMark.StepID=b.Data.Location.laststepid,d.BookMark.SMCompleted=b.Data.Location.smcompleted,
d.BookMark.GMCompleted=b.Data.Location.gmcompleted,d.BookMark.TMPassed=b.Data.Location.tmpassed,d.ScormData.SMCompletionCount=Number(b.Data.Location.smcompleted),d.ScormData.GMCompletionCount=Number(b.Data.Location.gmcompleted),d.ScormData.TMPassCount=Number(b.Data.Location.tmpassed)}catch(a){d.Log("Parsing Bookmark Failed",LOG.EXCEPTION,"",a)}else b.Data.Location=null}catch(f){e=false,d.Log("ProcessBookMarkData",LOG.EXCEPTION,"",f)}return e};this.GetSMGMCompletionStatus=function(){var b=true;try{uid_json.settings.mode_show.available===
true&&Number(d.ScormData.SMCompletionCount)<1&&(b=false),uid_json.settings.mode_guide.available===true&&Number(d.ScormData.GMCompletionCount)<1&&(b=false)}catch(c){b=g_ErrorFlag=false,d.Log("GetCompletionStatus",LOG.EXCEPTION,"",c)}return b};this.GetSMorGMCompletionStatus=function(){var b=false;try{if(uid_json.settings.mode_show.available===true&&Number(d.ScormData.SMCompletionCount)>0)return true;if(uid_json.settings.mode_guide.available===true&&Number(d.ScormData.GMCompletionCount)>0)return true}catch(c){b=
g_ErrorFlag=false,d.Log("GetCompletionStatus",LOG.EXCEPTION,"",c)}return b};this.IsContentPassed=function(){var b=false;try{uid_json.settings.mode_test.available===true&&Number(d.ScormData.TMPassCount)>0&&(b=true)}catch(c){b=g_ErrorFlag=false,d.Log("IsContentPassed",LOG.EXCEPTION,"",c)}return b}};
clsScoAPI_1_2=function(){function d(){var b=true;try{if(b=m_API.LMSFinish(""),b==false)throw"Finish failed";}catch(c){b=false,a.Log2("clsScoAPI_1_2","Finish",LOG.EXCEPTION,"",c),a.LogAPIError()}return b}function b(b){var c="";try{c=m_API.LMSGetValue(b),a.Log2("clsScoAPI_1_2","m_GetValue",LOG.SCORM,b,decodeURIComponent(c))}catch(d){a.Log2("clsScoAPI_1_2","m_GetValue",LOG.EXCEPTION,"",d),a.LogAPIError()}return c}function c(b,c){var d="";try{d=m_API.LMSSetValue(b,c),a.Log2("clsScoAPI_1_2","m_SetValue",
LOG.SCORM,b,decodeURIComponent(c))}catch(e){a.Log2("clsScoAPI_1_2","SetValue",LOG.EXCEPTION,"name:"+b+"<br/>value:"+c,e),a.LogAPIError()}return d}function e(){var b=true;try{if(b=m_API.LMSCommit(""),b==false)throw"Commit failed";}catch(c){b=false,a.Log2("clsScoAPI_1_2","Commit",LOG.EXCEPTION,"",c),a.LogAPIError()}return b}clsScoAPIBase.call(this,"clsScoAPI_1_2");var a=this;this.SetScore=false;this.Data={LearnerName:"",LearnerID:"",Location:"",MasteryScore:"",Credit:"",ScoreRaw:"",Mode:"",SuccessStatus:"",
LessonStatus:"",ExitStatus:"",SessionTime:""};this.SCORMVAR={LEARNERNAME:"cmi.core.student_name",LEARNERID:"cmi.core.student_id",LESSON_STAT:"cmi.core.lesson_status",LOCATION:"cmi.core.lesson_location",MASTERY_SCORE:"cmi.student_data.mastery_score",MODE:"cmi.core.lesson_mode",CREDIT:"cmi.core.credit",SCORE_RAW:"cmi.core.score.raw",CHILDREN:"cmi.core._children",EXIT:"cmi.core.exit",SESSIONTIME:"cmi.core.session_time"};this.SCORMVALUE={COMPLETED:"completed",INCOMPLETE:"incomplete",PASSED:"passed",FAILED:"failed",
CREDIT:"credit",NOCREDIT:"no-credit",BROWSE:"browse",BROWSED:"browsed",SUSPEND:"suspend",REVIEW:"review",NORMAL:"normal",LOGOUT:"logout"};this.LogAPIError=function(){var b="",c="";try{if(m_API!=null){a:{var d=0;try{if(m_API==void 0){b=0;break a}d=m_API.LMSGetLastError()}catch(e){a.Log2("clsScoAPI_1_2","LastError",LOG.EXCEPTION,"",e)}b=d}a:{var d=b,o="";try{if(m_API==void 0){c="";break a}o=m_API.LMSGetDiagnostic(d)}catch(v){o="",a.Log2("clsScoAPI_1_2","LastErrorString",LOG.EXCEPTION,"",v)}c=o}a.Log2("clsScoAPI_2004_3",
"Initialize",LOG.EXCEPTION,"m_LastError",b);a.Log2("clsScoAPI_2004_3","Initialize",LOG.EXCEPTION,"m_LastErrorString",c)}}catch(p){}};this.Initialize=function(){var b=true;try{m_API=a.GetScormAPI();if(m_API==null)throw a.ErrorCode=SCORMERRORCODES.APINULL,"m_API = null";if(m_API.LMSInitialize("")==false)throw"Initialization failed";}catch(c){b=false,a.Log2("clsScoAPI_1_2","Initialize",LOG.EXCEPTION,"",c),a.LogAPIError()}return b};this.Read=function(){var c=true;try{a.Data.LearnerName=b(a.SCORMVAR.LEARNERNAME),
a.Data.LearnerID=b(a.SCORMVAR.LEARNERID),a.Data.LessonStatus=b(a.SCORMVAR.LESSON_STAT),a.Data.Mode=b(a.SCORMVAR.MODE),a.Data.Credit=b(a.SCORMVAR.CREDIT),a.Data.Location=decodeURIComponent(b(a.SCORMVAR.LOCATION)),a.Data.MasteryScore=sco_json.masteryscore}catch(d){c=false,a.Log2("clsScoAPI_1_2","Read",LOG.EXCEPTION,"",d)}return c};this.Write=function(){var b=true;try{if(a.Data.Mode==a.SCORMVALUE.NORMAL)c(a.SCORMVAR.LESSON_STAT,a.Data.LessonStatus),a.SetScore==true&&c(a.SCORMVAR.SCORE_RAW,a.Data.ScoreRaw),
c(a.SCORMVAR.EXIT,a.Data.ExitStatus),c(a.SCORMVAR.LOCATION,a.Data.Location),c(a.SCORMVAR.SESSIONTIME,a.Data.SessionTime),a.Log2("clsScoAPI_1_2","Write",LOG.SCORM,"LESSON_STATUS",a.Data.LessonStatus),a.Log2("clsScoAPI_1_2","Write",LOG.SCORM,"SCORE_RAW",a.Data.ScoreRaw),a.Log2("clsScoAPI_1_2","Write",LOG.SCORM,"EXIT",a.Data.ExitStatus),a.Log2("clsScoAPI_1_2","Write",LOG.SCORM,"LOCATION",decodeURIComponent(a.Data.Location)),a.Log2("clsScoAPI_1_2","Write",LOG.SCORM,"SESSIONTIME",a.Data.SessionTime),e(""),
d("");else if(a.Data.Mode==a.SCORMVALUE.BROWSE||a.Data.Mode==a.SCORMVALUE.REVIEW||a.Data.Credit==a.SCORMVALUE.NOCREDIT)e(""),d("")}catch(n){b=false,a.Log2("clsScoAPI_1_2","Write",LOG.EXCEPTION,"",n)}return b};this.PreWrite=function(){var b=true;try{a.Log2("clsScoAPI_1_2","PreWrite",LOG.SCORM,"ME.SCORMVAR.LESSON_STAT",a.SCORMVALUE.INCOMPLETE),c(a.SCORMVAR.LESSON_STAT,a.SCORMVALUE.INCOMPLETE)}catch(d){b=false,a.Log2("clsScoAPI_1_2","PreWrite",LOG.EXCEPTION,"",d)}return b}};
clsScoEpnHandler_1_2=function(){function d(a,d){var g=true;try{c.Data.LessonStatus=b.MasteryScoreOrg==-1?d==true?e.COMPLETED:e.INCOMPLETE:a===true?e.PASSED:uid_json.settings.general.lessonstatusoption=="1"?d===true?e.FAILED:e.INCOMPLETE:e.INCOMPLETE}catch(k){g=false,b.Log2("clsScoEpnHandler_1_2","UpdateStatusForTMOnlyPref",LOG.EXCEPTION,"",k)}return g}clsScoEpnHandlerBase.call(this,"clsScoEpnHandler_1_2");var b=this,c=null,e=null,a=false;this.BookMark={Mode:"",StepID:"1",ResLoc:"",SMCompleted:"",
GMCompleted:"",TM:"",Score:0,Weightage:0,TMPassed:""};this.LearnerID=this.MasteryScoreOrg=this.MasteryScore=0;this.LearnerName="";this.ErrorCode=0;this.Initialize=function(){var d=true;try{b.ErrorCode=0;a=sco_json.tmonly=="1"?uid_json.settings.mode_test.available:false;c=new clsScoAPI_1_2;if(c.Initialize()==false)throw b.ErrorCode=c.ErrorCode,"Error @ ME.Handler.Initialize() ";e=c.SCORMVALUE;if(c.Read()==false)throw"Error @ m_ScoAPI.Read()";if(uid_json.settings.general.alwayscredit=="1")c.Data.Credit=
e.CREDIT,b.Log2("clsScoEpnHandler_1_2","Initialize",LOG.SCORM,"m_ScoAPI.Data.Credit changed to credit",c.Data.Credit);if(uid_json.settings.general.previewnormal=="1"&&c.Data.Mode==e.BROWSE)c.Data.Mode=e.NORMAL,b.Log2("clsScoEpnHandler_1_2","Initialize",LOG.SCORM,"m_ScoAPI.Data.Mode changed BROWSE to NORMAL",c.Data.Mode);if(uid_json.settings.general.reviewnormal=="1"&&c.Data.Mode==e.REVIEW)c.Data.Mode=e.NORMAL,b.Log2("clsScoEpnHandler_1_2","Initialize",LOG.SCORM,"m_ScoAPI.Data.Mode changed REVIEW to NORMAL",
c.Data.Mode);if(c.Data.Mode==e.REVIEW||c.Data.Mode==e.BROWSE||c.Data.Credit==e.NOCREDIT)b.Status=c.Data.Mode==e.REVIEW?SCORMSTATUS.REVIEWED:SCORMSTATUS.BROWSED,b.PromptTMBookmark=false;if(b.ProcessBookMarkData(c,e)==false)throw"Error @ ME.ProcessBookMarkData()";b.MasteryScore=Math.round(parseFloat(c.Data.MasteryScore));b.LearnerID=c.Data.LearnerID;b.LearnerName=c.Data.LearnerName;b.MasteryScoreOrg=b.MasteryScore;if(b.MasteryScore==-1)b.MasteryScore=uid_json.settings.mode_test.passscore;b.MasteryScore==
0&&(a=true)}catch(n){d=false,b.Log2("clsScoEpnHandler_1_2","Initialize",LOG.EXCEPTION,"",n)}return d};this.Finalize=function(){var f=true;try{if(c.Data.Mode!=e.REVIEW&&c.Data.Mode!=e.BROWSE&&c.Data.Credit!=e.NOCREDIT){c.Data.Location=b.CreateBookMarkJson(a);if(c.Data.Location=="")throw"Error @ ME.CreateBookMarkJson";g_ErrorFlag=true;var n=b.IsContentPassed();if(g_ErrorFlag==false)throw"Error @ ME.IsContentPassed";var g=b.GetSMGMCompletionStatus();if(g_ErrorFlag==false)throw"Error @ ME.GetSMGMCompletionStatus";
var k=b.GetSMorGMCompletionStatus();if(g_ErrorFlag==false)throw"Error @ ME.GetSMorGMCompletionStatus";var o;o=Number(b.ScormData.TMCompletionCount)>0?true:false;if(a===true)if(b.MasteryScoreOrg==0)c.Data.LessonStatus=o==true||k==true?e.COMPLETED:e.INCOMPLETE;else{if(d(n,o)===false)throw"Error @ UpdateStatusForTMOnlyPref";}else if(g===false)c.Data.LessonStatus=e.INCOMPLETE;else if(uid_json.settings.mode_test.available===false)c.Data.LessonStatus=e.COMPLETED;else if(d(n,o)===false)throw"Error @ UpdateStatusForTMOnlyPref";
c.Data.ExitStatus=c.Data.LessonStatus===e.INCOMPLETE?e.SUSPEND:"";if(uid_json.settings.general.incompleteblankdata=="1"&&c.Data.ExitStatus==e.SUSPEND)c.Data.ExitStatus="";if(b.MasteryScoreOrg>0&&(c.Data.ScoreRaw=b.ScormData.LastTMScore,Number(c.Data.ScoreRaw)>0||o==true))c.SetScore=true;b.Status=c.Data.LessonStatus===e.PASSED||c.Data.LessonStatus===e.COMPLETED||c.Data.LessonStatus===e.FAILED?SCORMSTATUS.COMPLETED:SCORMSTATUS.INCOMPLETE;if(g_objTrackerData.Modes.length==0)b.Status=SCORMSTATUS.CANCELLED;
c.Data.SessionTime=b.ElapsedHour+":"+b.ElapsedMin+":"+b.ElapsedSec+"."+b.ElapsedMilliSec}if(c.Write()==false)throw"Error @ m_ScoAPI.Write";}catch(v){f=false,b.Log2("clsScoEpnHandler_1_2","Finalize",LOG.EXCEPTION,"",v)}return f};this.PreFinalize=function(){var a=true;try{if(c.Data.Mode!=e.REVIEW&&c.Data.Mode!=e.BROWSE&&c.Data.Credit!=e.NOCREDIT&&c.PreWrite()==false)throw"Error @ m_ScoAPI.PreWrite";}catch(d){a=false,b.Log2("clsScoEpnHandler_1_2","PreFinalize",LOG.EXCEPTION,"",d)}return a}};
clsScoAPI_2004_3=function(){function d(){var b=true;try{if(b=m_API.Terminate(""),b==false)throw"Finish failed";}catch(c){b=false,a.Log2("clsScoAPI_2004_3","Finish",LOG.EXCEPTION,"",c),a.LogAPIError()}return b}function b(b){var c="";try{c=m_API.GetValue(b),a.Log2("clsScoAPI_2004_3","m_GetValue",LOG.SCORM,b,decodeURIComponent(c))}catch(d){a.Log2("clsScoAPI_2004_3","m_GetValue",LOG.EXCEPTION,"",d),a.LogAPIError()}return c}function c(b,c){var d="";try{d=m_API.SetValue(b,c),a.Log2("clsScoAPI_2004_3","m_SetValue",
LOG.SCORM,b,decodeURIComponent(c))}catch(e){a.Log2("clsScoAPI_2004_3","SetValue",LOG.EXCEPTION,"name:"+b+"<br/>value:"+c,e),a.LogAPIError()}return d}function e(){var b=true;try{if(b=m_API.Commit(""),b==false)throw"Commit failed";}catch(c){b=false,a.Log2("clsScoAPI_2004_3","Commit",LOG.EXCEPTION,"",c),a.LogAPIError()}return b}clsScoAPIBase.call(this,"clsScoAPI_2004_3");var a=this;this.Data={LearnerName:"",LearnerID:"",Location:"",MasteryScore:"",Credit:"",ScoreRaw:"",ScoreScaled:"",Mode:"",SuccessStatus:"",
CompletionStatus:"",ExitStatus:"",SessionTime:""};this.SCORMVAR={LEARNERNAME:"cmi.learner_name",LEARNERID:"cmi.learner_id",SUCCESS_STAT:"cmi.success_status",COMPLETION_STAT:"cmi.completion_status",LOCATION:"cmi.location",MASTERY_SCORE:"cmi.scaled_passing_score",MODE:"cmi.mode",CREDIT:"cmi.credit",SCORE_RAW:"cmi.score.raw",SCORE_SCALED:"cmi.score.scaled",EXIT:"cmi.exit",SESSIONTIME:"cmi.session_time"};this.SCORMVALUE={COMPLETED:"completed",INCOMPLETE:"incomplete",PASSED:"passed",FAILED:"failed",UNKNOWN:"unknown",
CREDIT:"credit",NOCREDIT:"no-credit",BROWSE:"browse",SUSPEND:"suspend",NOTATTEMPTED:"not attempted",DONOTSET:"DONOTSET",REVIEW:"review",NORMAL:"normal"};this.LogAPIError=function(){var b="",c="";try{if(m_API!=null){a:{var d=0;try{if(m_API==void 0){b=0;break a}d=m_API.GetLastError()}catch(e){a.Log2("clsScoAPI_2004_3","LastError",LOG.EXCEPTION,"",e)}b=d}a:{var d=b,o="";try{if(m_API==void 0){c="";break a}o=m_API.GetDiagnostic(d)}catch(v){o="",a.Log2("clsScoAPI_2004_3","LastErrorString",LOG.EXCEPTION,
"",v)}c=o}a.Log2("clsScoAPI_2004_3","Initialize",LOG.EXCEPTION,"m_LastError",b);a.Log2("clsScoAPI_2004_3","Initialize",LOG.EXCEPTION,"m_LastErrorString",c)}}catch(p){}};this.Initialize=function(){var b=true;try{m_API=a.GetScormAPI();if(m_API==null)throw a.ErrorCode=SCORMERRORCODES.APINULL,"m_API = null";if(m_API.Initialize("")==false)throw"Initialization failed";}catch(c){b=false,a.Log2("clsScoAPI_2004_3","Initialize",LOG.EXCEPTION,"",c),a.LogAPIError()}return b};this.Read=function(){var c=true;try{a.Data.LearnerName=
b(a.SCORMVAR.LEARNERNAME),a.Data.LearnerID=b(a.SCORMVAR.LEARNERID),a.Data.CompletionStatus=b(a.SCORMVAR.COMPLETION_STAT),a.Data.SuccessStatus=b(a.SCORMVAR.SUCCESS_STAT),a.Data.Mode=b(a.SCORMVAR.MODE),a.Data.Credit=b(a.SCORMVAR.CREDIT),a.Data.Location=decodeURIComponent(b(a.SCORMVAR.LOCATION)),a.Data.MasteryScore=sco_json.masteryscore}catch(d){c=false,a.Log2("clsScoAPI_2004_3","Read",LOG.EXCEPTION,"",d)}return c};this.Write=function(){var b=true;try{if(a.Data.Mode==a.SCORMVALUE.NORMAL)a.Data.SuccessStatus!=
a.SCORMVALUE.UNKNOWN&&(c(a.SCORMVAR.SUCCESS_STAT,a.Data.SuccessStatus),a.Log2("clsScoAPI_2004_3","Write",LOG.SCORM,"SUCCESS_STAT",a.Data.SuccessStatus)),c(a.SCORMVAR.COMPLETION_STAT,a.Data.CompletionStatus),c(a.SCORMVAR.LOCATION,a.Data.Location),c(a.SCORMVAR.EXIT,a.Data.ExitStatus),c(a.SCORMVAR.SCORE_RAW,a.Data.ScoreRaw),c(a.SCORMVAR.SCORE_SCALED,a.Data.ScoreScaled),c(a.SCORMVAR.SESSIONTIME,a.Data.SessionTime),a.Log2("clsScoAPI_2004_3","Write",LOG.SCORM,"COMPLETION_STAT",a.Data.CompletionStatus),
a.Log2("clsScoAPI_2004_3","Write",LOG.SCORM,"LOCATION",decodeURIComponent(a.Data.Location)),a.Log2("clsScoAPI_2004_3","Write",LOG.SCORM,"EXIT",a.Data.ExitStatus),a.Log2("clsScoAPI_2004_3","Write",LOG.SCORM,"SCORE_RAW",a.Data.ScoreRaw),a.Log2("clsScoAPI_2004_3","Write",LOG.SCORM,"SCORE_SCALED",a.Data.ScoreScaled),a.Log2("clsScoAPI_2004_3","Write",LOG.SCORM,"SESSIONTIME",a.Data.SessionTime),e(""),d("");else if(a.Data.Mode==a.SCORMVALUE.BROWSE||a.Data.Mode==a.SCORMVALUE.REVIEW||a.Data.Credit==a.SCORMVALUE.NOCREDIT)e(""),
d("")}catch(n){b=false,a.Log2("clsScoAPI_2004_3","Write",LOG.EXCEPTION,"",n)}return b};this.PreWrite=function(){var b=true;try{a.Log2("clsScoAPI_2004_3","PreWrite",LOG.SCORM,"ME.SCORMVAR.COMPLETION_STAT",a.SCORMVALUE.INCOMPLETE),c(a.SCORMVAR.COMPLETION_STAT,a.SCORMVALUE.INCOMPLETE)}catch(d){b=false,a.Log2("clsScoAPI_2004_3","PreWrite",LOG.EXCEPTION,"",d)}return b}};
clsScoEpnHandler_2004_3=function(){function d(a,d){var g=true;try{b.MasteryScoreOrg==-1?(c.Data.SuccessStatus=e.UNKNOWN,c.Data.CompletionStatus=d==true?e.COMPLETED:e.INCOMPLETE):a===true?(c.Data.SuccessStatus=e.PASSED,c.Data.CompletionStatus=e.COMPLETED):uid_json.settings.general.lessonstatusoption=="1"?(c.Data.SuccessStatus=d===true?e.FAILED:e.UNKNOWN,c.Data.CompletionStatus=d===true?e.COMPLETED:e.INCOMPLETE):(c.Data.SuccessStatus=e.UNKNOWN,c.Data.CompletionStatus=e.INCOMPLETE)}catch(k){g=false,
b.Log2("clsScoEpnHandler_2004_3","UpdateStatusForTMOnlyPref",LOG.EXCEPTION,"",k)}return g}clsScoEpnHandlerBase.call(this,"clsScoEpnHandler_2004_3");var b=this,c=null,e=null,a=false;this.BookMark={Mode:"",StepID:"1",ResLoc:"",SMCompleted:"",GMCompleted:"",TM:"",Score:0,Weightage:0,TMPassed:""};this.LearnerID=this.MasteryScoreOrg=this.MasteryScore=0;this.LearnerName="";this.ErrorCode=0;this.Initialize=function(){var d=true;try{b.ErrorCode=0;a=sco_json.tmonly=="1"?uid_json.settings.mode_test.available:
false;c=new clsScoAPI_2004_3;if(c.Initialize()==false)throw b.ErrorCode=c.ErrorCode,"Error @ ME.Handler.Initialize() ";e=c.SCORMVALUE;if(c.Read()==false)throw"Error @ m_ScoAPI.Read()";if(uid_json.settings.general.alwayscredit=="1")c.Data.Credit=e.CREDIT,b.Log2("clsScoEpnHandler_2004_3","Initialize",LOG.SCORM,"m_ScoAPI.Data.Credit changed to credit",c.Data.Credit);if(uid_json.settings.general.previewnormal=="1"&&c.Data.Mode==e.BROWSE)c.Data.Mode=e.NORMAL,b.Log2("clsScoEpnHandler_2004_3","Initialize",
LOG.SCORM,"m_ScoAPI.Data.Mode changed BROWSE to NORMAL",c.Data.Mode);if(uid_json.settings.general.reviewnormal=="1"&&c.Data.Mode==e.REVIEW)c.Data.Mode=e.NORMAL,b.Log2("clsScoEpnHandler_2004_3","Initialize",LOG.SCORM,"m_ScoAPI.Data.Mode changed REVIEW to NORMAL",c.Data.Mode);if(c.Data.Mode==e.REVIEW||c.Data.Mode==e.BROWSE||c.Data.Credit==e.NOCREDIT)b.Status=c.Data.Mode==e.REVIEW?SCORMSTATUS.REVIEWED:SCORMSTATUS.BROWSED,b.PromptTMBookmark=false;if(b.ProcessBookMarkData(c,e)==false)throw"Error @ ME.ProcessBookMarkData()";
b.MasteryScore=Math.round(parseFloat(c.Data.MasteryScore));b.LearnerID=c.Data.LearnerID;b.LearnerName=c.Data.LearnerName;b.MasteryScoreOrg=b.MasteryScore;if(b.MasteryScore==-1)b.MasteryScore=uid_json.settings.mode_test.passscore;b.MasteryScore==0&&(a=true)}catch(n){d=false,b.Log2("clsScoEpnHandler_2004_3","Initialize",LOG.EXCEPTION,"",n)}return d};this.Finalize=function(){var f=true;try{if(c.Data.Mode!=e.REVIEW&&c.Data.Mode!=e.BROWSE&&c.Data.Credit!=e.NOCREDIT){c.Data.Location=b.CreateBookMarkJson(a);
if(c.Data.Location=="")throw"Error @ ME.CreateBookMarkJson";g_ErrorFlag=true;var n=b.IsContentPassed();if(g_ErrorFlag==false)throw"Error @ ME.IsContentPassed";var g=b.GetSMGMCompletionStatus();if(g_ErrorFlag==false)throw"Error @ ME.GetSMGMCompletionStatus";var k=b.GetSMorGMCompletionStatus();if(g_ErrorFlag==false)throw"Error @ ME.GetSMorGMCompletionStatus";var o;o=Number(b.ScormData.TMCompletionCount)>0?true:false;if(a===true)if(b.MasteryScoreOrg==0)c.Data.SuccessStatus=e.UNKNOWN,c.Data.CompletionStatus=
o==true||k==true?e.COMPLETED:e.INCOMPLETE;else{if(d(n,o)===false)throw"Error @ UpdateStatusForTMOnlyPref";}else if(g===false){g=true;try{c.Data.SuccessStatus=n===true?e.PASSED:uid_json.settings.general.lessonstatusoption=="1"?o===true?e.FAILED:e.UNKNOWN:e.UNKNOWN}catch(v){g=false,b.Log2("clsScoEpnHandler_2004_3","UpdateSuccessStatusForAllModePref",LOG.EXCEPTION,"",v)}if(g===false)throw"Error @ UpdateSuccessStatusForAllModePref";c.Data.CompletionStatus=e.INCOMPLETE}else if(uid_json.settings.mode_test.available===
false)c.Data.SuccessStatus=e.UNKNOWN,c.Data.CompletionStatus=e.COMPLETED;else if(d(n,o)===false)throw"Error @ UpdateStatusForTMOnlyPref";c.Data.ExitStatus=c.Data.CompletionStatus===e.INCOMPLETE?e.SUSPEND:"";if(uid_json.settings.general.incompleteblankdata=="1"&&c.Data.ExitStatus==e.SUSPEND)c.Data.ExitStatus="";if(b.MasteryScoreOrg>0)c.Data.ScoreRaw=b.ScormData.LastTMScore,c.Data.ScoreScaled=b.ScormData.LastTMScore/100;b.Status=c.Data.CompletionStatus===e.COMPLETED?SCORMSTATUS.COMPLETED:SCORMSTATUS.INCOMPLETE;
if(g_objTrackerData.Modes.length==0)b.Status=SCORMSTATUS.CANCELLED;c.Data.SessionTime="PT"+b.ElapsedHour+"H"+b.ElapsedMin+"M"+b.ElapsedSec+"S"}if(c.Write()==false)throw"Error @ m_ScoAPI.Write";}catch(p){f=false,b.Log2("clsScoEpnHandler_2004_3","Finalize",LOG.EXCEPTION,"",p)}return f};this.PreFinalize=function(){var a=true;try{if(c.Data.Mode!=e.REVIEW&&c.Data.Mode!=e.BROWSE&&c.Data.Credit!=e.NOCREDIT&&c.PreWrite()==false)throw"Error @ m_ScoAPI.PreWrite";}catch(d){a=false,b.Log2("clsScoEpnHandler_2004_3",
"PreFinalize",LOG.EXCEPTION,"",d)}return a}};
function clsTemplateRenderer(){function d(){var a=true;try{R.scrollLeft=Q;R.scrollTop=W;z.CanvasScrollLeft=Q;z.CanvasScrollTop=W;if(uid_json.settings.stepimage.imageresizeoption==IMAGERESIZE.FULLIMAGE){var b=FlyWeight.GetObject(PLAYABLEOBJECTS.CURSORMOVE_ANIM);if(b!=null){var c=b.GetCursorCord(),d=c.l,e=c.t;c.l<z.CanvasScrollLeft?d=z.CanvasScrollLeft:c.l>z.CanvasScrollLeft+z.CanvasWidth&&(d=z.CanvasScrollLeft+z.CanvasWidth);c.t<z.CanvasScrollTop?e=z.CanvasScrollTop:c.t>z.CanvasScrollTop+z.CanvasHeight&&
(e=z.CanvasScrollTop+z.CanvasHeight);b.RepositionCursor(d,e)}}if(z.onCanvasScrollOver!=null)z.onCanvasScrollOver(true)}catch(f){a=false,z.Log("TaskAfterScrollOver",LOG.EXCEPTION,"",f)}return a}function b(){var a=true;try{if(X<1){var b=c();X=b.Width;Z=b.Height}var d=z.CreateHTMLElement("div");d.style.width=X+"px";d.style.height=Z+"px";d.style.left="0px";d.style.top="0px";d.style.visibility="hidden";d.style.display=g_inline;d.style.overflow="hidden";d.style.zIndex=ZINDEX.TEMPLATE;if(BROWSER.LEGACY==
false)d.style.position="relative",d.style.margin="0 auto";window.document.body.appendChild(d);Y=document.getElementById(d.id)}catch(e){a=false,z.Log("CreateStage",LOG.EXCEPTION,"",e)}return a}function c(){var a={};try{var b=0,c=0;if(typeof window.innerWidth=="number")b=window.innerWidth,c=window.innerHeight;else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight))b=document.documentElement.clientWidth,c=document.documentElement.clientHeight;else if(document.body&&
(document.body.clientWidth||document.body.clientHeight))b=document.body.clientWidth,c=document.body.clientHeight;a.Width=Number(b);a.Height=Number(c)}catch(d){z.Log("GetStageWidthAndHeight",LOG.EXCEPTION,"",d)}return a}function e(){var a=true;try{if(ia!=null&&ia.Visible==true){if(ia.Hide()==false)throw"Error @ m_popSpeed.Hide";z.UIPSIM.Controls.Speed.SetState(BUTTONSTATE.NORMAL)}clearTimeout(V);V=0}catch(b){a=false,z.Log("HideMouseSpeedPopup",LOG.EXCEPTION,"",b)}return a}function a(){var a=true;try{if(ca!=
null&&ca.Visible==true){if(ca.Hide()==false)throw"Error @ m_popZoom.Hide";z.UIPSIM.Controls.Zoom.SetState(BUTTONSTATE.NORMAL)}clearTimeout(ka);ka=0}catch(b){a=false,z.Log("HideZoomPopup",LOG.EXCEPTION,"",b)}return a}function f(){var a=true;try{if(ba!=null&&ba.Visible==true){if(ba.Hide()==false)throw"Error @ m_popMode.Hide";z.UIPSIM.Controls.Mode.SetState(BUTTONSTATE.NORMAL)}clearTimeout(ga);ga=0}catch(b){a=false,z.Log("HideModePopup",LOG.EXCEPTION,"",b)}return a}function n(a){var b=true;try{if(a==
false)throw"g_objRIL_onInitComplete bSuccess = false";a=true;try{var d;if(d=g_objGS.General.HomeAvailable==true){var e=true;try{var f=c();X=f.Width;Z=f.Height;var n=z.CreateHTMLElement("div");n.style.width=X+"px";n.style.height=Z+"px";n.style.left="0px";n.style.top="0px";n.style.visibility="hidden";n.style.display="none";n.style.overflow="auto";n.style.zIndex=ZINDEX.TEMPLATE;n.style.backgroundColor=uid_json.phome.layout.specs.general.stagebgcolor;document.body.style.backgroundColor=uid_json.phome.layout.specs.general.stagebgcolor;
if(BROWSER.LEGACY==false)n.style.position="relative",n.style.margin="0 auto";window.document.body.appendChild(n);U=document.getElementById(n.id)}catch(o){e=false,z.Log("CreateStageDivHome",LOG.EXCEPTION,"",o)}d=e==false}if(d)throw"Error @ CreateStage";Y.style.backgroundColor=uid_json.psim.layout.specs.general.stagebgcolor;var r;a:{d=true;try{if(uid_json.psim.layout.specs.tooltip==void 0){r=true;break a}var A=uid_json.psim.layout.specs.tooltip;oa=new clsTooltip;if(oa.Initialize(Y,A)==false)throw"Error @ m_objTooltip.Initialize";
oa.Duration=new Number(A.duration);z.Tooltip=oa}catch(q){oa=null,d=false,z.Log("CreateTooltip",LOG.EXCEPTION,"2",q)}r=d}if(r==false)throw"Error @ CreateTooltip";if(g_objGS.General.HomeAvailable==true){if(z.Home.Create(U,g_objRIL.ImageList)==false)throw"Failed to Create Process Home Stage";z.Home.onModeChangeRequested=z.onModeChangeRequestedFromHome;if(z.Home.BindControls()==false)throw"Error @ BindControls";}z.UIPSIM=new clsUIP;z.UIPSIM.StageWidth=X;z.UIPSIM.StageHeight=Z;pa=uid_json.psim.layout.h5dobjects;
if(z.UIPSIM.Initialize(Y,g_objRIL.ImageList)==false)throw"Failed to Create UI Presenter";z.MIRenderer=z.UIPSIM.MIR;if(g_objTracker.Enabled==true){r=true;try{var B=z.CreateHTMLElement("div");B.style.width=X+"px";B.style.height=Z+"px";B.style.left="0px";B.style.top="0px";B.style.visibility="hidden";B.style.display="none";B.style.overflow="hidden";B.style.zIndex=ZINDEX.TEMPLATE;window.document.body.appendChild(B);fa=document.getElementById(B.id)}catch(E){r=false,z.Log("CreateStageDivTracker",LOG.EXCEPTION,
"",E)}if(r==false)throw"Error at CreateStageDivTracker";z.TrackerForm=new clsSubmitForm;z.TrackerForm.ParentWidth=X;z.TrackerForm.ParentHeight=Z;z.TrackerForm.onSendRequested=z.onSendRequested;z.TrackerForm.onSendComplete=z.onSendComplete;z.TrackerForm.onCloseRequested=z.onCloseRequested;if(z.TrackerForm.Create(fa,g_objTracker.ContentPreferences.IsSurveyExist)==false)throw"Failed @ ME.TrackerForm.Create";z.TrackerFormHolder=z.TrackerForm.ContentBody}B=true;try{r="hidden";var C=uid_json.psim.layout.specs.general;
if(Number(C.canvasscroll)==1)r="auto",z.CanvasScrollWidth=20;var v=new Number(C.canvasbuffer);z.CanvasWidth=z.UIPSIM.Width-v*2;z.CanvasHeight=z.UIPSIM.Height-v*2;C=null;C=uid_json.psim.layout.specs.canvas.css!=void 0?z.CreateTextHolder(uid_json.psim.layout.specs.canvas):z.CreateHTMLElement("div");C.dir="";C.style.left=v+"px";C.style.top=v+"px";C.style.width=z.CanvasWidth+"px";C.style.height=z.CanvasHeight+"px";C.style.visibility="visible";C.style.display=g_inline;C.style.overflow=r;z.UIPSIM.Holders.PlayerDiv.appendChild(C);
R=document.getElementById(C.id);var D=z.CreateHTMLElement("div");D.style.left="0px";D.style.top="0px";D.style.visibility="visible";D.style.display=g_inline;D.style.zIndex=ZINDEX.CANVAS;R.appendChild(D);z.CanvasDIV=document.getElementById(D.id);var H=z.UIPSIM.Holders.PlayerDiv.getBoundingClientRect();z.CanvasAbsoluteLeft=H.left;z.CanvasAbsoluteTop=H.top}catch(F){B=false,z.Log("CreateCanvas",LOG.EXCEPTION,"",F)}if(B==false)throw"Error @ CreateCanvas";v=true;try{z.MIQ=new clsMIQ;z.MIQ.ParentWidth=z.UIPSIM.Width;
z.MIQ.ParentHeight=z.UIPSIM.Height;var G=pa.manual.fw.h5d;z.MIQ.FWImageForM=g_objRIL.ImageList.h5d_manual||g_objRIL.ImageList[G];z.MIQ.IconImageForM=g_objRIL.ImageList.manual;G=pa.info.fw.h5d;z.MIQ.FWImageForI=g_objRIL.ImageList.h5d_info||g_objRIL.ImageList[G];z.MIQ.IconImageForI=g_objRIL.ImageList.info;for(var I in uid_json.infosteps){var L=uid_json.infosteps[I].images;for(i in L)z.MIQ.InfoStepThemeImages[I+"_"+i]=g_objRIL.ImageList[I+"_"+i]}G=pa.question.fw.h5d;z.MIQ.FWImageForQ=g_objRIL.ImageList.h5d_question||
g_objRIL.ImageList[G];z.MIQ.IconImageForQ=g_objRIL.ImageList.question;G=pa.assessment.fw.h5d;z.MIQ.FWImageForA=g_objRIL.ImageList.h5d_assessment||g_objRIL.ImageList[G];z.MIQ.IconImageForA=g_objRIL.ImageList.assessment;G=pa.workflow.fw.h5d;z.MIQ.FWImageForW=g_objRIL.ImageList.h5d_workflow||g_objRIL.ImageList[G];z.MIQ.IconImageForW=g_objRIL.ImageList.workflow;if(uid_json.psim.layout.h5dobjects.variation!=null)G=pa.variation.fw.h5d,z.MIQ.FWImageForV=g_objRIL.ImageList.h5d_variation||g_objRIL.ImageList[G],
z.MIQ.IconImageForV=g_objRIL.ImageList.variation;if(z.BindMIQEvents()==false)throw"Error @ BindMIQEvents";if(z.MIQ.Create(z.UIPSIM.Holders.PlayerDiv)==false)throw"Error @ ME.MIQ.Create";if(z.MIQ.BindControls()==false)throw"Error @ ME.MIQ.BindControls";z.MIQDIV=z.MIQ.MIQMainDiv}catch(J){v=false,z.Log("CreateMIQ",LOG.EXCEPTION,"",J)}if(v==false)throw"Error @ CreateMIQ";z.StatusBar=new clsStatusBar;if(z.StatusBar.Create(z.UIPSIM.Holders.PlayerDiv)==false)throw"Error @ ME.StatusBar.Create";z.StatusBar.onContinueClick=
z.onContinueClick;if(g()==false)throw"Error @ CreateSpeedPopup";if(k()==false)throw"Error @ CreateZoomPopup";if(z.UIPSIM.Controls.Mode!=null&&p()==false)throw"Error @ CreateModePopup";var Q;if(Q=uid_json.feedback!=void 0){G=true;try{ja=new clsFeedbackDialog;ja.ParentHeight=z.UIPSIM.Height;ja.ParentWidth=z.UIPSIM.Width;if(ja.Create(z.UIPSIM.Holders.PlayerDiv)==false)throw"Error @ m_fbFeedback.Create";if(z.HideFeedback()==false)throw"Error @ HideFeedback";}catch(W){G=false,z.Log("CreateFeedbackDialog",
LOG.EXCEPTION,"",W)}Q=G==false}if(Q)throw"Error @ CreateFeedbackDialog";Q=true;try{z.Validate=new clsValidateButton;z.Validate.ParentHeight=z.UIPSIM.Height;z.Validate.ParentWidth=z.UIPSIM.Width;if(z.Validate.Create(z.UIPSIM.Holders.PlayerDiv,messages_json.psim.validate!=void 0?messages_json.psim.validate:messages_json.psim.canvas.validate)==false)throw"Error @ ME.Validate.Create";z.ValidateDivWidth=parseInt(z.Validate.ValidateDivWidth);z.ValidateDivHeight=parseInt(z.Validate.ValidateDivHeight)}catch(N){Q=
false,z.Log("CreateValidateButton",LOG.EXCEPTION,"",N)}if(Q==false)throw"Error @ CreateValidateButton";Q=true;try{var K;K=messages_json.psim.tsproceed!=void 0?messages_json.psim.tsproceed:messages_json.psim.canvas.tsproceed;ha=new clsValidateButton;ha.ParentHeight=z.UIPSIM.Height;ha.ParentWidth=z.UIPSIM.Width;if(ha.Create(z.UIPSIM.Holders.PlayerDiv,K)==false)throw"Error @ m_btnTSProceed.Create";z.TSProceedDivWidth=parseInt(ha.TSProceedDivWidth);z.TSProceedDivHeight=parseInt(ha.TSProceedDivHeight)}catch(M){Q=
false,z.Log("CreateTSProceedButton",LOG.EXCEPTION,"",M)}if(Q==false)throw"Error @ CreateTSProceedButton";K=true;try{var O=Number(X-400)/2,P=Number(Z-100)/2,da=z.CreateHTMLElement("div");da.style.left=O+"px";da.style.top=P+"px";da.style.width="400px";da.style.height="100px";da.style.visibility="visible";da.style.display="none";da.style.backgroundColor="#ffffff";da.style.borderStyle="solid";da.style.borderWidth="2px";da.style.borderColor="navy";da.style.fontSize="12px";da.style.zIndex=1E3;da.style.border=
"1px solid #207ce5";da.style.borderRadius="5px";document.body.appendChild(da);ma=document.getElementById(da.id)}catch(S){K=false,z.Log("CreateAudioEnableWindow",LOG.EXCEPTION,"",S)}if(K==false)throw"Error @ CreateAudioEnableWindow";var T;a:{O=true;try{if(uid_json.psim.layout.specs.general.resultanimationduration==void 0){T=true;break a}aa=new clsResultIconDisplayer;aa.Duration=Number(uid_json.psim.layout.specs.general.resultanimationduration);aa.CorrectImage=g_objRIL.ImageList.res_icon_correct;aa.WrongImage=
g_objRIL.ImageList.res_icon_wrong;if(aa.Create(z.UIPSIM.Holders.PlayerDiv)==false)throw"Error @ m_ridResult.Create";}catch(V){O=false,z.Log("CreateResultAnimationHolder",LOG.EXCEPTION,"",V)}T=O}if(T==false)throw"Error @ CreateResultAnimationHolder";if(u()==false)throw"Error @ BindUIPControls";if(uid_json.settings.template.fixedcuecard!==void 0)z.IsFixedCC=uid_json.settings.template.fixedcuecard==="1"?true:false}catch(qa){a=false,z.Log("BuildTemplate",LOG.EXCEPTION,"2",qa)}if(a==false)throw"Error @ BuildTemplate";
Y.style.display="none";if(z.MIQ.Hide()==false)throw"Error @ ME.MIQ.Hide()";}catch(ba){b=false,z.Log("g_objRIL_onInitComplete",LOG.EXCEPTION,"",ba)}z.onInitComplete(b)}function g(){var a=true;try{if(pa.speed!=void 0){ia=new clsSpeedPopUp;var b=pa.speed.fw.h5d,c=z.UIPSIM.GetObjectCord("speed");ia.Left=c.Left;ia.Top=c.Top;ia.Width=c.Width;ia.Height=c.Height;ia.FWBaseImage=g_objRIL.ImageList.h5d_speed||g_objRIL.ImageList[b];ia.Create(z.UIPSIM.StageDiv);ia.onSlideEnded=v;ia.onHide=function(){z.UIPSIM.Controls.Speed!=
null&&z.UIPSIM.Controls.Speed.SetState(BUTTONSTATE.NORMAL);clearTimeout(V);V=0}}}catch(d){a=false,z.Log("CreateSpeedPopup",LOG.EXCEPTION,"",d)}return a}function k(){var a=true;try{if(pa.zoom!=void 0){ca=new clsZoomPopUp;var b=pa.zoom.fw.h5d,c=z.UIPSIM.GetObjectCord("zoom");ca.Left=c.Left;ca.Top=c.Top;ca.Width=c.Width;ca.Height=c.Height;ca.FWBaseImage=g_objRIL.ImageList.h5d_zoom||g_objRIL.ImageList[b];ca.Create(z.UIPSIM.StageDiv);ca.onStepReloadRequested=z.onStepReloadRequested;ca.onSlideEnded=o;ca.onHide=
function(){z.UIPSIM.Controls.Zoom!=null&&z.UIPSIM.Controls.Zoom.SetState(BUTTONSTATE.NORMAL);clearTimeout(ka);ka=0}}}catch(d){a=false,z.Log("CreateZoomPopup",LOG.EXCEPTION,"",d)}return a}function o(){try{clearTimeout(ka),ka=0,ka=setTimeout(a,na)}catch(b){z.Log("ResetPopZoomTimer",LOG.EXCEPTION,"",b)}}function v(){try{if(clearTimeout(V),V=0,V=setTimeout(e,ea),z.FocusEventReceiverDiv()==false)throw"Error @ ME.FocusEventReceiverDiv";}catch(a){z.Log("ResetPopSpeedTimer",LOG.EXCEPTION,"",a)}}function p(){var a=
true;try{if(pa.mode!=void 0){var b=z.UIPSIM.GetObjectCord("mode");ba=new clsModePopUp;var c=pa.mode.fw.h5d;ba.Left=b.Left;ba.Top=b.Top;ba.Width=b.Width;ba.Height=b.Height;ba.FWBaseImage=g_objRIL.ImageList.h5d_mode||g_objRIL.ImageList[c];if(ba.Create(z.UIPSIM.StageDiv,g_objRIL.ImageList)==false)throw"Error @ m_popMode.Create";if(q(ba.ContentBody)==false)throw"Error @ DisableSelection";ba.onModeChangeRequested=z.onModeChangeRequested;ba.onHide=function(){z.UIPSIM.Controls.Mode!=null&&z.UIPSIM.Controls.Mode.SetState(BUTTONSTATE.NORMAL);
clearTimeout(ga);ga=0}}}catch(d){a=false,z.Log("CreateModePopup",LOG.EXCEPTION,"",d)}return a}function q(a){var b=true;try{typeof a.onselectstart!="undefined"?a.onselectstart=function(){return false}:typeof a.style.MozUserSelect!="undefined"?a.style.MozUserSelect="none":a.onmousedown=function(){return false},a.style.cursor="default"}catch(c){b=false,z.Log("DisableSelection",LOG.EXCEPTION,"",c)}return b}function E(){try{if(la.disabled="disabled",z.onEnableAudioClick!=null)z.onEnableAudioClick()}catch(a){z.Log("RaiseAudioEnableEvent",
LOG.EXCEPTION,"",a)}}function u(){var a=true;try{z.Cuecard=z.UIPSIM.Controls.Cuecard;if(z.UIPSIM.Controls.Play!=null)z.UIPSIM.Controls.Play.onClick=J;if(z.UIPSIM.Controls.Stop!=null)z.UIPSIM.Controls.Stop.onClick=N;if(z.UIPSIM.Controls.Prev!=null)z.UIPSIM.Controls.Prev.onClick=L;if(z.UIPSIM.Controls.Next!=null)z.UIPSIM.Controls.Next.onClick=I;if(z.UIPSIM.Controls.Help!=null)z.UIPSIM.Controls.Help.onClick=H;if(z.UIPSIM.Controls.Zoom!=null)z.UIPSIM.Controls.Zoom.onClick=C;if(z.UIPSIM.Controls.FCC!=
null)z.UIPSIM.Controls.FCC.onClick=G;if(z.UIPSIM.Controls.Speed!=null)z.UIPSIM.Controls.Speed.onClick=D;if(z.UIPSIM.Controls.Audio!=null)z.UIPSIM.Controls.Audio.onClick=M;if(z.UIPSIM.Controls.Callout!=null)z.UIPSIM.Controls.Callout.onClick=K;if(z.UIPSIM.Controls.WFHome!==null)z.UIPSIM.Controls.WFHome.onClick=F;if(z.Cuecard!=null)z.Cuecard.onHide=T,z.Cuecard.onBusy=S;if(z.UIPSIM.Controls.Close!=null)z.UIPSIM.Controls.Close.onClick=function(){z.onCloseRequested()};if(z.UIPSIM.Controls.Home!=null)z.UIPSIM.Controls.Home.onClick=
z.onHomeClicked;if(z.UIPSIM.Controls.Mode!=null)z.UIPSIM.Controls.Mode.onClick=r;if(z.UIPSIM.Controls.ShowMode!=null)z.UIPSIM.Controls.ShowMode.onClick=function(){return z.onModeChangeRequested(MODETYPE.SHOW)};if(z.UIPSIM.Controls.GuideMode!=null)z.UIPSIM.Controls.GuideMode.onClick=function(){return z.onModeChangeRequested(MODETYPE.GUIDE)};if(z.UIPSIM.Controls.TestMode!=null)z.UIPSIM.Controls.TestMode.onClick=function(){return z.onModeChangeRequested(MODETYPE.TEST)};if(z.UIPSIM.Controls.DocMode!=
null)z.UIPSIM.Controls.DocMode.onClick=function(){return z.onModeChangeRequested(MODETYPE.DOC)};z.UIPSIM.onMIModeClicked=P;z.UIPSIM.onMIContinueClicked=B;z.UIPSIM.onMIReportClicked=A;z.UIPSIM.onMIReviewClicked=z.ShowFCConReview;z.UIPSIM.onMIHomeClicked=z.onHomeClicked;z.UIPSIM.onMICloseClicked=z.onCloseRequested}catch(b){a=false,z.Log("BindUIPControls",LOG.EXCEPTION,"",b)}return a}function B(){try{R.style.display=g_inline;if(z.MIRenderer.Hide()==false)throw"Error @ ME.MIRenderer.Hide()";z.onMIContinueClicked()}catch(a){z.Log("ME.UIPSIM_MIR_onMIContinueClicked",
LOG.EXCEPTION,"",a)}}function A(){try{g_objTracker.Enabled?window.open(g_objTracker.URL+"/UIPages/Reports/ReportMain.aspx?ReportType=81&TemplateType=1&CUserID="+g_objTracker.CUserID+"&ContentID="+g_CommandArgs[CMDARGS.CONTENTID]):messages_json.modeindicator.tm_end.reportnotavailable!=void 0&&alert(messages_json.modeindicator.tm_end.reportnotavailable.text)}catch(a){z.Log("ME.UIPSIM_MIR_onMIReportClicked",LOG.EXCEPTION,"",a)}}function G(){try{if(z.Cuecard!=null)if(z.Cuecard.Visible==true)z.Cuecard.Hide();
else{if(z.HideAllPopUps()==false)throw"Error @ HideAllPopUps";z.Cuecard.Show()}if(z.FocusEventReceiverDiv()==false)throw"Error @ ME.FocusEventReceiverDiv";}catch(a){z.Log("m_btnFCC_onClick",LOG.EXCEPTION,"",a)}}function D(){try{if(f()==false)throw"Error @ HideModePopup";if(a()==false)throw"Error @ HideModePopup";ia.Visible==true?(clearTimeout(V),V=0,ia.Hide()):(ia.Show(),V=setTimeout(e,ea));if(z.FocusEventReceiverDiv()==false)throw"Error @ ME.FocusEventReceiverDiv";}catch(b){z.Log("m_btnSpeed_onClick",
LOG.EXCEPTION,"",b)}}function r(){try{if(e()==false)throw"Error @ HideMouseSpeedPopup";if(a()==false)throw"Error @ HideModePopup";if(ba!=null)ba.Visible==true?(clearTimeout(ga),ga=0,ba.Hide()):(ba.Show(),ga=setTimeout(f,ra));else z.onModeChangeRequested(g_objGS.General.ActiveMode)}catch(b){z.Log("m_btnMode_onClick",LOG.EXCEPTION,"",b)}}function H(){try{var a=Number(uid_json.settings.help.width),b=Number(uid_json.settings.help.height),c=(screen.width-a)/2,d=(screen.height-b)/2,e=uid_json.settings.help.url;
e==""&&(e=g_StaticURL+"ui\\help\\index.htm");window.open(e,"","left="+c+"px , top="+d+"px , width="+a+"px , height="+b+"px , scrollbars=1");if(z.FocusEventReceiverDiv()==false)throw"Error @ ME.FocusEventReceiverDiv";}catch(f){z.Log("m_btnMode_onClick",LOG.EXCEPTION,"",f)}}function C(){try{if(e()==false)throw"Error @ HideMouseSpeedPopup";if(f()==false)throw"Error @ HideModePopup";ca.Visible==true?(clearTimeout(ka),ka=0,ca.Hide()):(ca.Show(),ka=setTimeout(a,na));if(z.FocusEventReceiverDiv()==false)throw"Error @ ME.FocusEventReceiverDiv";
}catch(b){z.Log("m_btnZoom_onClick",LOG.EXCEPTION,"",b)}}function J(a){try{if(g_objGS.General.Busy==false)if(a.State==BUTTONSTATE.NORMAL)z.onVCRPlayClick();else z.onVCRPauseClick();else m_btnVCRPlay.Cancel=true}catch(b){z.Log("m_btnVCRPlay_onClick",LOG.EXCEPTION,"",b)}}function I(){try{va==false?(va=true,z.onVCRNextClick(),va=false):z.Log("m_btnVCRNext_onClick",LOG.EXCEPTION,"m_bVCRNextClicked",va)}catch(a){z.Log("m_btnVCRNext_onClick",LOG.EXCEPTION,"",a)}}function L(){try{z.onVCRPrevClick()}catch(a){z.Log("m_btnVCRPrev_onClick",
LOG.EXCEPTION,"",a)}}function N(){try{z.onVCRStopClick()}catch(a){z.Log("m_btnVCRStop_onClick",LOG.EXCEPTION,"",a)}}function M(a){try{z.onAudioButtonClick(a.State==BUTTONSTATE.CLICKED?true:false)}catch(b){z.Log("m_btnAudio_onClick",LOG.EXCEPTION,"",b)}}function K(a){try{if(z.onCalloutButtonClick(a.State==BUTTONSTATE.CLICKED?true:false),z.FocusEventReceiverDiv()==false)throw"Error @ ME.FocusEventReceiverDiv";}catch(b){z.Log("m_btnCallout_onClick",LOG.EXCEPTION,"",b)}}function F(){try{z.onWorkFlowHomeClicked()}catch(a){z.Log("m_btnWFHome_onClick",
LOG.EXCEPTION,"",a)}}function T(){try{if(z.FocusEventReceiverDiv()==false)throw"Error @ ME.FocusEventReceiverDiv";z.UIPSIM.Controls.FCC!=null&&z.UIPSIM.Controls.FCC.State==BUTTONSTATE.CLICKED&&z.UIPSIM.Controls.FCC.SetState(BUTTONSTATE.NORMAL)}catch(a){z.Log("m_fwCuecard_onHide",LOG.EXCEPTION,"Ignore",a)}}function S(a){try{z.CCBusy=a}catch(b){z.Log("m_fwCuecard_onBusy",LOG.EXCEPTION,"Ignore",b)}}function O(a,b){try{if(z.onStepLoadRequested==null)throw"onStepLoadRequested is null";z.onStepLoadRequested(a,
b)}catch(c){bRet=false,z.Log("Cuecard_onStepLoadRequested",LOG.EXCEPTION,"",c)}}function P(a){var b=true;try{if(z.Cuecard.ChangeParent(z.UIPSIM.Holders.PlayerDiv)==false)throw"Error @ ME.Cuecard.ChangeParent";if(z.onModeChangeRequested(a)==false)throw"Error @ ModeChangeRequested";}catch(c){b=false,z.Log("ModeChangeRequestFromMI",LOG.EXCEPTION,"",c)}return b}clsPlayerBase.call(this,"clsTemplateRenderer");var z=this,X=0,Z=0,Y,U,fa,R,la=null,ha=null,ja=null,ia=null,ba=null,ca=null,aa=null,V,ea=1E4,ga,
ra=1E4,ka,na=1E4,ma=null,oa=null,Q=0,W=0,da=0,sa=0,qa,va=false,Aa=false,pa=null;this.Validate=this.Cuecard=this.TrackerForm=null;this.CanvasScrollTop=this.CanvasScrollLeft=0;this.TrackerFormHolder=null;this.CanvasScrollBarWidthHeight=this.CanvasHeight=this.CanvasWidth=this.CanvasAbsoluteTop=this.CanvasAbsoluteLeft=0;this.MIQDIV=this.StatusBar=this.MIQ=this.UIPSIM=this.CanvasDIV=this.Tooltip=null;this.MouseButtonHeight=this.MouseButtonWidth=0;this.ValidatePos=VALIDATEPOSITION.RIGHT;this.ValidateDivHeight=
this.ValidateDivWidth=0;this.ResultIconHeight=this.ResultIconWidth=24;this.IsFixedCC=this.CCBusy=false;this.onWorkFlowHomeClicked=this.onVCRNextClick=this.onVCRPrevClick=this.onVCRLastClick=this.onVCRFirstClick=this.onVCRStopClick=this.onVCRPauseClick=this.onVCRPlayClick=this.EventReceiverTextBox=this.EventReceiverDiv=null;this.Home=new clsUIPHome;this.onMIHomeClicked=this.onMIReviewClicked=this.onMIModeClicked=this.onMIContinueClicked=this.onSendRequested=this.onSendComplete=this.onCloseRequested=
this.onModeChangeRequestedFromHome=this.onHomeClicked=this.onCanvasScrollOver=this.onModeChangeRequested=this.onResultIconDisplayed=this.onDifmRequested=this.onHintRequested=this.onTryRequested=this.onTSProceedButtonClick=this.onValidateButtonClick=this.onEnableAudioClick=this.onStepReloadRequested=this.onStepLoadRequested=this.onVariationOptionClicked=this.onWFShapeClicked=this.onContinueClick=this.onCalloutButtonClick=this.onAudioButtonClick=this.MIRenderer=null;this.Initialize=function(){var a=
true;try{document.onselectstart=function(){return false};if(z.onInitComplete==null)throw"onInitComplete not binded";if(b()==false)throw"Error @ CreateStage";g_objRIL=new clsTemplateRIL;g_objRIL.onInitComplete=n;g_objRIL.Initialize(Y)}catch(c){a=false,z.Log("Initialize",LOG.EXCEPTION,"",c)}return a};this.Stop=function(){var a=true;try{if(z.SetAudioAnimation(false)==false)throw"Error @ ME.SetAudioAnimation";oa.Hide();clearTimeout(qa);qa=0;z.StatusBar!=null&&z.StatusBar.Stop()}catch(b){a=false,z.Log("Stop",
LOG.EXCEPTION,"",b)}return a};this.BindFeedbackEvents=function(){var a=true;try{ja!=null?(ja.OnEscapePressed=z.onTryRequested,ja.Controls.Close.onClick=z.onTryRequested,ja.Controls.Try.onClick=function(){ja.DetachEvents();z.onTryRequested()},ja.Controls.Hint.onClick=function(){ja.DetachEvents();z.onHintRequested()},ja.Controls.Difm.onClick=function(){ja.DetachEvents();z.onDifmRequested()}):z.Log("BindFeedbackEvents",LOG.ERROR,"Feedback dialog not created?? missing in UID ??","")}catch(b){a=false,
z.Log("BindFeedbackEvents",LOG.EXCEPTION,"",b)}return a};this.BindResultEvents=function(){var a=true;try{aa!=null?aa.onHide=z.onResultIconDisplayed:z.Log("BindResultEvents",LOG.ERROR,"Feedback dialog not created?? missing in UID ??","")}catch(b){a=false,z.Log("BindResultEvents",LOG.EXCEPTION,"",b)}return a};this.ShowFeedback=function(a,b){var c=true;try{ja.Show(b)}catch(d){c=false,z.Log("ShowFeedback",LOG.EXCEPTION,"",d)}return c};this.HideFeedback=function(){var a=true;try{ja!=null&&ja.Hide()}catch(b){a=
false,z.Log("HideFeedback",LOG.EXCEPTION,"",b)}return a};this.MoveValidateButton=function(a,b){var c=true;try{if(z.Validate.MoveTo(a,b)==false)throw"Error @ ME.Validate.MoveTo";}catch(d){c=false,z.Log("MoveValidateButton",LOG.EXCEPTION,"",d)}return c};this.MoveTSProceedButton=function(a,b){var c=true;try{if(ha.MoveTo(a,b)==false)throw"Error @ m_btnTSProceed.MoveTo";}catch(d){c=false,z.Log("MoveTSProceedButton",LOG.EXCEPTION,"",d)}return c};this.ChangeMessageForTSProceedDiv=function(a){var b=true;
try{if(ha.ChangeMessage(a)==false)throw"Error @ m_btnTSProceed.ChangeMessage(msg)";}catch(c){b=false,z.Log("MoveTSProceedButton",LOG.EXCEPTION,"",c)}return b};this.ShowValidateButton=function(a){var b=true;try{if(z.Validate.Show(a)==false)throw"Error @ ME.Validate.Show";z.Validate.onClick=z.onValidateButtonClick}catch(c){b=false,z.Log("ShowValidateButton",LOG.EXCEPTION,"",c)}return b};this.ShowTSProceedButton=function(a){var b=true;try{if(ha.Show(a,true)==false)throw"Error @ ME.Validate.Show";ha.onClick=
z.onTSProceedButtonClick}catch(c){b=false,z.Log("ShowTSProceedButton",LOG.EXCEPTION,"",c)}return b};this.HideValidateButton=function(){var a=true;try{if(z.Validate.Hide()==false)throw"Error @ ME.Validate.Hide";}catch(b){a=false,z.Log("HideValidateButton",LOG.EXCEPTION,"",b)}return a};this.HideTSProceedButton=function(){var a=true;try{if(ha.Hide()==false)throw"Error @ m_btnTSProceed.Hide";}catch(b){a=false,z.Log("HideTSProceedButton",LOG.EXCEPTION,"",b)}return a};this.GetCanvasScrollCord=function(){var a=
{l:0,t:0,w:0,h:0};try{a.l=R.scrollLeft,a.t=R.scrollTop,a.w=R.scrollWidth,a.h=R.scrollHeight}catch(b){z.Log("GetCanvasScrollCord",LOG.EXCEPTION,"",b)}return a};this.AdjustCanvas=function(a,b){var c=true;try{var d=Math.round((z.CanvasWidth-a)/2),e=Math.round((z.CanvasHeight-b)/2);z.CanvasDIV.style.left=d+"px";z.CanvasDIV.style.top=e+"px";z.CanvasDIV.style.width=a+"px";z.CanvasDIV.style.height=b+"px";R.scrollLeft=0;W=Q=R.scrollTop=0}catch(f){c=false,z.Log("AdjustCanvas",LOG.EXCEPTION,"",f)}return c};
this.ScrollCanvasTo=function(a,b,c,d){var e=true;try{var f=0,g=0;c<g_objTR.CanvasWidth&&(g=Math.round((z.CanvasWidth-c)/2));d<g_objTR.CanvasHeight&&(f=Math.round((z.CanvasHeight-d)/2));z.CanvasDIV.style.left=g+"px";z.CanvasDIV.style.top=f+"px";z.CanvasDIV.style.width=c+"px";z.CanvasDIV.style.height=d+"px";R.scrollLeft=Math.abs(a);R.scrollTop=Math.abs(b);z.CanvasScrollLeft=a;z.CanvasScrollTop=b}catch(k){e=false,z.Log("ScrollCanvasTo",LOG.EXCEPTION,"",k)}return e};this.SetScrollCanvasValues=function(a,
b,c,d,e){var f=true;try{var g=0,k=0;c<g_objTR.CanvasWidth&&(k=Math.round((z.CanvasWidth-c)/2));d<g_objTR.CanvasHeight&&(g=Math.round((z.CanvasHeight-d)/2));z.CanvasDIV.style.left=k+"px";z.CanvasDIV.style.top=g+"px";z.CanvasDIV.style.width=c+"px";z.CanvasDIV.style.height=d+"px";e&&(a>c-z.CanvasWidth&&(a=c-z.CanvasWidth,a<0&&(a=0)),b>d-z.CanvasHeight&&(b=d-z.CanvasHeight,b<0&&(b=0)),Q=a,W=b,da=a==0&&R.scrollLeft==0?0:R.scrollLeft<a?20:-20,sa=b==0&&R.scrollTop==0?0:R.scrollTop<b?20:-20)}catch(n){f=false,
z.Log("SetScrollCanvasValues",LOG.EXCEPTION,"",n)}return f};this.StartCanvasScroll=function(){var a=true;try{Aa==false&&(Aa=true),qa=setTimeout(z.ScrollCanvas,20)}catch(b){a=false,z.Log("StartCanvasScroll",LOG.EXCEPTION,"",b)}return a};this.ScrollCanvas=function(){var a=true;try{var b=false,c=false;da>0?R.scrollLeft+da>=Q&&(b=true):da<0?R.scrollLeft+da<=Q&&(b=true):b=true;sa>0?R.scrollTop+sa>=W&&(c=true):sa<0?R.scrollTop+sa<=W&&(c=true):c=true;if(b==true&&c==true){if(d()==false)throw"Error @ TaskAfterScrollOver";
}else{if(b==false){var e=R.scrollLeft;R.scrollLeft+=da;e==R.scrollLeft&&(b=true)}if(c==false){var f=R.scrollTop;R.scrollTop+=sa;f==R.scrollTop&&(c=true)}if(b==true&&c==true){if(d()==false)throw"Error @ TaskAfterScrollOver";}else qa=setTimeout(z.ScrollCanvas,20)}}catch(g){a=false,z.Log("ScrollCanvas",LOG.EXCEPTION,"",g)}try{if(a==false&&z.onCanvasScrollOver!=null)z.onCanvasScrollOver(false)}catch(k){z.Log("ScrollCanvas 2",LOG.EXCEPTION,"",k)}};this.ScrollCanvasToOriginalPosition=function(){var a=true;
try{R.scrollLeft=z.CanvasScrollLeft,R.scrollTop=z.CanvasScrollTop}catch(b){a=false,z.Log("ScrollCanvasToOriginalPosition",LOG.EXCEPTION,"",b)}return a};this.GetCanvasScrollLeft=function(){var a=0;try{a=R.scrollLeft}catch(b){z.Log("GetCanvasScrollLeft",LOG.EXCEPTION,"",b)}return a};this.GetCanvasScrollTop=function(){var a=0;try{a=R.scrollTop}catch(b){z.Log("GetCanvasScrollTop",LOG.EXCEPTION,"",b)}return a};this.GetCanvasLeft=function(){var a=0;try{a=Number(z.CanvasDIV.style.left.replace("px",""))}catch(b){z.Log("GetCanvasLeft",
LOG.EXCEPTION,"",b)}return a};this.GetCanvasTop=function(){var a=0;try{a=Number(z.CanvasDIV.style.top.replace("px",""))}catch(b){z.Log("GetCanvasTop",LOG.EXCEPTION,"",b)}return a};this.ManageButtonEnableState=function(a,b){try{var c=null;switch(a){case VCRBUTTON.AUDIO:c=z.UIPSIM.Controls.Audio;break;case VCRBUTTON.CALLOUT:c=z.UIPSIM.Controls.Callout;break;case VCRBUTTON.STOP:c=z.UIPSIM.Controls.Stop;break;case VCRBUTTON.PREVIOUS:c=z.UIPSIM.Controls.Prev;break;case VCRBUTTON.NEXT:c=z.UIPSIM.Controls.Next}if(c==
null)return true;b==true?c.Enable():c.Disable()}catch(d){z.Log("ManageButtonEnableState",LOG.EXCEPTION,"",d)}};this.SetMIQDelayMessage=function(a,b,c){var d=true;try{z.MIQ.SetFooterMessage(a,b,c)}catch(e){d=false,z.Log("SetMIQDelayMessage",LOG.EXCEPTION,"",e)}return d};this.ToggleCanvasAndMIQ=function(a){var b=true;try{if(a==true){z.CanvasDIV.style.display=g_inline;if(z.MIQ.Hide()==false)throw"Error @ ME.MIQ.Hide()";if(uid_json.settings.stepimage.imageresizeoption==IMAGERESIZE.FULLIMAGE&&z.ScrollCanvasToOriginalPosition()==
false)throw"Error @ ME.ScrollCanvasToOriginalPosition";}else z.CanvasDIV.style.display="none"}catch(c){b=false,z.Log("ToggleCanvasAndMIQ",LOG.EXCEPTION,"",c)}return b};this.SetStepCountMessage=function(a){var b=true;try{if(z.UIPSIM.Holders.StepCountHolderDiv!=null)z.UIPSIM.Holders.StepCountHolderDiv.innerHTML="<table border=0 width=100% height=100% cellpadding=0 cellspacing=0><tr><td>"+a+"</td></tr></table>"}catch(c){b=false,z.Log("SetStepCountMessage",LOG.EXCEPTION,"",c)}return b};this.SetStepProgressValue=
function(a){var b=true;try{z.UIPSIM.StepProgressBar!=null&&(z.UIPSIM.StepProgressBar.Show(),z.UIPSIM.StepProgressBar.SetMessage(Math.round(a)+"%"),z.UIPSIM.StepProgressBar.SetValue(a))}catch(c){b=false,z.Log("SetStepCountMessage",LOG.EXCEPTION,"",c)}return b};this.HideProgressBar=function(){var a=true;try{z.UIPSIM.StepProgressBar!=null&&z.UIPSIM.StepProgressBar.Hide()}catch(b){a=false,z.Log("SetStepCountMessage",LOG.EXCEPTION,"",b)}return a};this.SetNotesMessage=function(a){var b=true;try{if(z.UIPSIM.Controls.Notes==
null)return;if(z.UIPSIM.Controls.Notes.Show()==false)throw"Error @ m_Notes.Show";if(z.UIPSIM.Controls.Notes.SetMessage(a)==false)throw"Error @ m_Notes.SetMessage";}catch(c){b=false,z.Log("SetNotesMessage",LOG.EXCEPTION,"",c)}return b};this.ManageSimViewForModeChange=function(){var a=true;try{var b=messages_json.psim.footer;if(z.HideAllPopUps()==false)throw"Error @ HideAllPopUps";var c="";if(z.Cuecard.Hide()==false)throw"Error @ ME.Cuecard.Hide";z.MIQ.Reset();if(z.Cuecard.ChangeParent(z.UIPSIM.Holders.PlayerDiv)==
false)throw"Error @ ME.Cuecard.ChangeParent";if(g_objGS.General.ModeChanged==true)g_objGS.General.CalloutButtonEnabled=true,z.UIPSIM.Controls.Callout!=null&&z.UIPSIM.Controls.Callout.SetState(BUTTONSTATE.NORMAL);var d=false,e=false;switch(g_objGS.General.ActiveMode){case MODETYPE.SHOW:c=b.mode_show.text;d=uid_json.settings.mode_show.launchcuecard;e=!uid_json.settings.mode_show.stepselectable;break;case MODETYPE.GUIDE:c=b.mode_guide.text;d=uid_json.settings.mode_guide.launchcuecard;e=!uid_json.settings.mode_guide.stepselectable;
break;case MODETYPE.TEST:c=b.mode_test.text,d=uid_json.settings.mode_test.launchcuecard,e=!uid_json.settings.mode_test.stepselectable}z.Cuecard.Freeze(e);if(d==true){if(z.Cuecard.Show()==false)throw"Error @ ME.Cuecard.Show";z.UIPSIM.Controls.FCC!=null&&z.UIPSIM.Controls.FCC.SetState(BUTTONSTATE.CLICKED)}else z.UIPSIM.Controls.FCC!=null&&z.UIPSIM.Controls.FCC.SetState(BUTTONSTATE.NORMAL);try{z.UIPSIM.Holders.ModeTextTD.innerHTML=c}catch(f){}if(z.Cuecard.SetTitle(g_objGS.General.ActiveMode)==false)throw"Error @ ME.Cuecard.SetTitle";
if(z.Cuecard.ManageView(g_objGS.General.ActiveMode)==false)throw"Error @ ME.Cuecard.ManageView";try{var g=BUTTONSTATE.NORMAL;z.UIPSIM.Controls.ShowMode!=void 0&&z.UIPSIM.Controls.ShowMode.SetState(g);z.UIPSIM.Controls.GuideMode!=void 0&&z.UIPSIM.Controls.GuideMode.SetState(g);z.UIPSIM.Controls.TestMode!=void 0&&z.UIPSIM.Controls.TestMode.SetState(g);z.UIPSIM.Controls.DocMode!=void 0&&z.UIPSIM.Controls.DocMode.SetState(g);g=BUTTONSTATE.HIDDEN;uid_json.settings.mode_show.available==false&&z.UIPSIM.Controls.ShowMode!=
void 0&&z.UIPSIM.Controls.ShowMode.SetState(g);uid_json.settings.mode_guide.available==false&&z.UIPSIM.Controls.GuideMode!=void 0&&z.UIPSIM.Controls.GuideMode.SetState(g);uid_json.settings.mode_test.available==false&&z.UIPSIM.Controls.TestMode!=void 0&&z.UIPSIM.Controls.TestMode.SetState(g);uid_json.settings.mode_doc.available==false&&z.UIPSIM.Controls.DocMode!=void 0&&z.UIPSIM.Controls.DocMode.SetState(g);g=BUTTONSTATE.SELECTED;switch(g_objGS.General.ActiveMode){case MODETYPE.SHOW:z.UIPSIM.Controls.ShowMode!=
void 0&&z.UIPSIM.Controls.ShowMode.SetState(g);break;case MODETYPE.GUIDE:z.UIPSIM.Controls.GuideMode!=void 0&&z.UIPSIM.Controls.GuideMode.SetState(g);break;case MODETYPE.TEST:z.UIPSIM.Controls.TestMode!=void 0&&z.UIPSIM.Controls.TestMode.SetState(g);break;case MODETYPE.DOC:z.UIPSIM.Controls.DocMode!=void 0&&z.UIPSIM.Controls.DocMode.SetState(g)}}catch(k){z.Log("SetSelectedStateForModeButtons",LOG.EXCEPTION,"",k)}b=true;try{if(z.UIPSIM.Controls.Stop!=null&&z.UIPSIM.Controls.Stop.Disable()==false)throw"Error @ Stop.Disable";
if(z.UIPSIM.Controls.Prev!=null&&z.UIPSIM.Controls.Prev.Disable()==false)throw"Error @ Prev.Enable";if(g_objGS.General.ActiveMode==MODETYPE.GUIDE||g_objGS.General.ActiveMode==MODETYPE.TEST||g_objGS.General.ActiveMode==MODETYPE.DOC){if(z.UIPSIM.Controls.Play!=null&&z.UIPSIM.Controls.Play.Disable()==false)throw"Error @ Play.Disable";if(z.UIPSIM.Controls.Prev!=null&&z.UIPSIM.Controls.Prev.Disable()==false)throw"Error @ Prev.Disable";if(z.UIPSIM.Controls.Next!=null&&z.UIPSIM.Controls.Next.Disable()==
false)throw"Error @ Next.Disable";}else{if(z.UIPSIM.Controls.Play!=null&&z.UIPSIM.Controls.Play.Enable()==false)throw"Error @ Play.Enable";if(z.UIPSIM.Controls.Next!=null&&g_objGS.General.SingleStep==false&&z.UIPSIM.Controls.Next.Enable()==false)throw"Error @ Next.Enable";}if(z.UIPSIM.Controls.Audio!=null){c=false;switch(g_objGS.General.ActiveMode){case MODETYPE.SHOW:c=true;break;case MODETYPE.GUIDE:uid_json.settings.mode_guide.enableaudio==true&&(c=true);break;case MODETYPE.TEST:uid_json.settings.mode_test.enableaudio==
true&&(c=true)}if(c==true){if(g_objGS.General.ModeChanged==true){if(z.UIPSIM.Controls.Audio.Enable()==false)throw"Error @ Audio.Enable";if(z.UIPSIM.Controls.Audio.SetState(BUTTONSTATE.NORMAL)==false)throw"Error @ Audio.Enable";g_objGS.General.AudioButtonEnabled=true}}else if(z.UIPSIM.Controls.Audio.Disable()==false)throw"Error @ Audio.Disable";}}catch(n){b=false,z.Log("SetVCRButtonsStateForMode",LOG.EXCEPTION,"",n)}if(b==false)throw"Error @ SetVCRButtonsStateForMode";if(z.ManageWorkFlowHomeButtonState(g_objGS.General.WorkflowArray===
null?BUTTONSTATE.HIDDEN:BUTTONSTATE.DISABLED)==false)throw"Error @ ManageWorkFlowHomeButtonState";}catch(p){a=false,z.Log("ManageSimViewForModeChange",LOG.EXCEPTION,"",p)}return a};this.ManageWorkFlowHomeButtonState=function(a){var b=true;try{if(z.UIPSIM.Controls.WFHome!=void 0&&(z.UIPSIM.Controls.WFHome.SetState(a),a==BUTTONSTATE.HIDDEN&&z.UIPSIM.Holders.workflow!=void 0))z.UIPSIM.Holders.workflow.style.display="none",z.UIPSIM.Holders.workflow.style.visibility="hidden"}catch(c){b=false,z.Log("ManageWorkFlowHomeButtonState",
LOG.EXCEPTION,"",c)}return b};this.SetVCRPlayButtonIcon=function(){var a=true;try{if(z.UIPSIM.Controls.Play!=null){var b=BUTTONSTATE.NORMAL;if(g_objGS.General.PlayState==PLAYSTATE.PLAYING)b=BUTTONSTATE.CLICKED;if(z.UIPSIM.Controls.Play.SetState(b)==false)throw"Error @ ME.UIPSIM.Controls.Play.SetState";}}catch(c){a=false,z.Log("SetVCRPlayButtonIcon",LOG.EXCEPTION,"",c)}return a};this.SetBusyFlag=function(){var a=true;try{z.UIPSIM.Controls.Play!=null&&z.UIPSIM.Controls.Play.SetBusyFlag(g_objGS.General.Busy),
z.SetLoadAnimation()}catch(b){a=false,z.Log("SetBusyFlag",LOG.EXCEPTION,"",b)}return a};this.SetAudioAnimation=function(a){var b=true;try{z.UIPSIM.SetAudioAnimation(a)}catch(c){b=false,z.Log("SetAudioAnimation",LOG.EXCEPTION,"",c)}return b};this.SetLoadAnimation=function(){var a=true;try{z.UIPSIM.SetLoadAnimation()}catch(b){a=false,z.Log("SetLoadAnimation",LOG.EXCEPTION,"",b)}return a};this.ShowResultIcon=function(a,b,c){var d=true;try{if(aa.Show(a,b,c)==false)throw"Error @ m_ridResult.Show";}catch(e){d=
false,z.Log("ShowResultIcon",LOG.EXCEPTION,"",e)}return d};this.HideResultIcon=function(){var a=true;try{if(aa.Hide()==false)throw"Error @ m_ridResult.Hide";}catch(b){a=false,z.Log("HideResultIcon",LOG.EXCEPTION,"",b)}return a};this.ShowAudioEnableWindow=function(){var a=true;try{var b;b=messages_json.psim.commonmsg!=void 0?messages_json.psim.commonmsg:messages_json.psim.canvas.commonmsg;var c='<span style="'+b.enable_audiocontrols.css+'">'+b.enable_audiocontrols.text+"</span>",d='<span style="'+
b.button_audioenable.css+'">'+b.button_audioenable.text+"</span>",e=z.GetUniqueID();b="";b+="<table border='0' cellspacing='0' cellpadding='0' width='100%' style='padding:5px;'>";b+="<tr>";b+="<td valign='middle' align='center' >"+c+"<br/><br/>"+("<button id='"+e+"' style='width:80px'>"+d+"</button>")+"</td>";b+="</tr>";ma.innerHTML=b;la=document.getElementById(e);la.onclick=E;ma.style.display=g_inline;setTimeout(function(){la.focus()},100)}catch(f){a=false,z.Log("ShowAudioEnableWindow",LOG.EXCEPTION,
"",f)}return a};this.HideAudioEnableWindow=function(){var a=true;try{ma.style.display="none"}catch(b){a=false,z.Log("HideAudioEnableWindow",LOG.EXCEPTION,"",b)}return a};this.ManageModeIndicator=function(a,b,c,d){var e=true;try{var f="";if(typeof a==="string")f=document.createElement("div"),f.innerHTML=a;R.style.display="none";if(z.MIQ.Hide()==false)throw"Error @ ME.MIQ.Hide()";if(z.MIRenderer.SetContentBody(f,c)==false)throw"Error @ ME.MIRenderer.SetContentBody";if(z.MIRenderer.SetContentTitle(b,
c)==false)throw"Error @ ME.MIRenderer.SetContentTitle";if(z.MIRenderer.Hide()==false)throw"Error @ ME.MIRenderer.Hide";if(z.MIRenderer.Show(c,d)==false)throw"Error @ ME.MIRenderer.Show";if(z.StatusBar.Hide()==false)throw"Error @ ME.StatusBar.Hide()";}catch(g){e=false,z.Log("ManageModeIndicator",LOG.EXCEPTION,"",g)}return e};this.ClearMIQContent=function(){var a=true;try{if(z.MIQ.SetContentBody("","","")==false)throw"Error @ ME.MIQ.SetContentBody";}catch(b){a=false,z.Log("ClearMIQContent",LOG.EXCEPTION,
b)}return a};this.ManageMIQ=function(a,b,c,d,e,f){var g=true;try{var k=b;if(typeof b=="string")f==true?(k=document.createElement("iframe"),k.id=z.GetUniqueID(),k.src=b):(k=document.createElement("div"),k.innerHTML=b);if(b.Description!=void 0&&b.Options!=void 0)f==true?(k=document.createElement("iframe"),k.id=z.GetUniqueID(),k.src=b.Description):(k=document.createElement("div"),k.innerHTML=b.Description);if(z.MIQ.SetContentBody(a,k,d,b)==false)throw"Error @ ME.MIQ.SetContentBody";if(z.MIQ.SetCaption(a,
c,d)==false)throw"Error @ ME.MIQ.SetCaption";if(z.MIQ.Show(a,d,e)==false)throw"Error @ ME.MIQ.Show";}catch(n){g=false,z.Log("ManageMIQ",LOG.EXCEPTION,"",n)}return g};this.BuildCuecard=function(a){var b=true;try{z.Cuecard=z.UIPSIM.Controls.Cuecard;z.Cuecard.AudioIcon=g_objRIL.ImageList.cuecard_audio;z.Cuecard.CorrectIcon=g_objRIL.ImageList.cuecard_correct;z.Cuecard.WrongIcon=g_objRIL.ImageList.cuecard_wrong;if(z.Cuecard.Build(a)==false)throw"Error @ Cuecard.Build";z.Cuecard.onStepLoadRequested=O}catch(c){b=
false,z.Log("BuildCuecard",LOG.EXCEPTION,"",c)}return b};this.HideAllPopUps=function(){var b=true;try{if(e()==false)throw"Error @ HideMouseSpeedPopup";if(f()==false)throw"Error @ HideModePopup";if(a()==false)throw"Error @ HideModePopup";}catch(c){b=false,z.Log("HideAllPopUps",LOG.EXCEPTION,"",c)}return b};this.BindMIQEvents=function(){var a=true;try{z.MIQ.onContinueClick=z.onContinueClick,z.MIQ.onWFShapeClicked=z.onWFShapeClicked,z.MIQ.onVariationOptionClicked=z.onVariationOptionClicked}catch(b){a=
false,z.Log("BindMIQEvents",LOG.EXCEPTION,"",b)}return a};this.SetPopZoomValue=function(){var a=true;try{if(ca!=void 0&&ca.SetValue(g_objGS.General.ResizeFactor*100)===false)throw"Error @ m_popZoom.SetValue";}catch(b){a=false,z.Log("SetPopZoomValue",LOG.EXCEPTION,"",b)}return a};this.ShowFCConReview=function(){try{if(z.Cuecard.ChangeParent(z.UIPSIM.Holders.PlayerDiv.parentNode)===false)throw"Error @ ME.MIRenderer.Hide()";if(z.Cuecard.ShowCueCard()===false)throw"Error @ ME.Cuecard.ShowCueCard";if(z.Cuecard.Show(ZINDEX.MODEINDICATOR+
1)===false)throw"Error @ ME.Cuecard.Show";}catch(a){z.Log("ShowFCConReview",LOG.EXCEPTION,"",a)}};this.ToggleTrackerPage=function(a){var b=true;try{if(g_objTracker.Enabled==true&&g_objTracker.ShowSubmitForm===true){if(fa.style.display=="none"){if(z.TrackerForm.Show()==false)throw"Error @ ME.TrackerForm.Show";fa.style.display=g_inline}else fa.style.display="none";if(g_objTracker.CustomFormAvailable==false){if(z.TrackerForm.ShowLoadingImage(true)==false)throw"Error @ ME.TrackerForm.ShowLoadingImage";
}else if(a===true){if(g_objTracker.ToggleFeedBackTextBox(false)==false)throw"Error @ g_objTracker.ToggleFeedBackTextBox(false)";if(z.TrackerForm.ShowLoadingImage(true)==false)throw"Error @ ME.TrackerForm.ShowLoadingImage";}else{if(g_objTracker.ToggleFeedBackTextBox(true)==false)throw"Error @ g_objTracker.ToggleFeedBackTextBox(true)";if(z.TrackerForm.ShowLoadingImage(false)==false)throw"Error @ ME.TrackerForm.ShowLoadingImage";}}}catch(c){b=false,z.Log("ToggleTrackerPage",LOG.EXCEPTION,"",c)}return b};
this.Show=function(){var a=true;try{if(g_objGS.General.ActiveView==EPILEANVIEW.HOME){if(Y.style.visibility="hidden",Y.style.display="none",U!=null)U.style.visibility="visible",U.style.display=g_inline}else{if(U!=null)U.style.visibility="hidden",U.style.display="none";Y.style.visibility="visible";Y.style.display=g_inline}}catch(b){a=false,z.Log("Show",LOG.EXCEPTION,"",b)}return a};this.Hide=function(){var a=true;try{if(Y!=null)Y.style.visibility="hidden",Y.style.display="none";if(U!=null)U.style.visibility=
"hidden",U.style.display="none"}catch(b){a=false,z.Log("Hide",LOG.EXCEPTION,"",b)}return a};this.MoveCuecard=function(a,b){var c=true;try{if(z.Cuecard.MoveTo(a,b)==false)throw"Error @ MoveCuecard.MoveTo";}catch(d){c=false,z.Log("MoveCuecard",LOG.EXCEPTION,"",d)}return c};this.SubmitFormCancelled=function(){z.TrackerForm.Cancel=true};this.SetVCRButtonEnableState=function(){var a=true;try{if(g_objGS.General.ActiveMode==MODETYPE.SHOW){if(g_objGS.General.SingleStep==true)z.ManageButtonEnableState(VCRBUTTON.PREVIOUS,
false),z.ManageButtonEnableState(VCRBUTTON.NEXT,false);else switch(g_objGS.General.TrackLocation){case TRACKLOCATION.START:z.ManageButtonEnableState(VCRBUTTON.PREVIOUS,false);z.ManageButtonEnableState(VCRBUTTON.NEXT,true);break;case TRACKLOCATION.BETWEEN:z.ManageButtonEnableState(VCRBUTTON.PREVIOUS,true);z.ManageButtonEnableState(VCRBUTTON.NEXT,true);break;case TRACKLOCATION.END:z.ManageButtonEnableState(VCRBUTTON.PREVIOUS,true),z.ManageButtonEnableState(VCRBUTTON.NEXT,false)}g_objGS.General.PlayState==
PLAYSTATE.PLAYING?z.ManageButtonEnableState(VCRBUTTON.STOP,bEnable=true):z.ManageButtonEnableState(VCRBUTTON.STOP,bEnable=false)}}catch(b){a=false,z.Log("SetVCRButtonEnableState",LOG.EXCEPTION,"",b)}return a};this.ShowCanvas=function(){try{R.style.display=g_inline}catch(a){z.Log("ShowCanvas",LOG.EXCEPTION,"",a)}};this.FocusEventReceiverDiv=function(){var a=true;try{if(g_objGS.General.ActiveMode==MODETYPE.SHOW)return true;if(z.EventReceiverDiv!=null){z.EventReceiverDiv.tabIndex=1;try{if(z.EventReceiverTextBox==
null){var b=Number(z.CanvasScrollLeft),c=Number(z.CanvasScrollTop);BROWSER.IE==false?z.EventReceiverDiv.focus():b==0&&c==0?z.EventReceiverDiv.focus():g_CurrentStepType==STEPTYPE.KEYEVENT&&(z.EventReceiverDiv.focus(),z.StartCanvasScroll())}else z.EventReceiverTextBox.focus()}catch(d){}}}catch(e){a=false,z.Log("FocusEventReceiverDiv",LOG.EXCEPTION,"",e)}return a};this.SetFocus=function(a){try{var b=null;switch(a){case VCRBUTTON.PLAY:b=z.UIPSIM.Controls.Play;break;case VCRBUTTON.AUDIO:b=z.UIPSIM.Controls.Audio;
break;case VCRBUTTON.CALLOUT:b=z.UIPSIM.Controls.Callout;break;case VCRBUTTON.STOP:b=z.UIPSIM.Controls.Stop;break;case VCRBUTTON.PREVIOUS:b=z.UIPSIM.Controls.Prev;break;case VCRBUTTON.NEXT:b=z.UIPSIM.Controls.Next}b!=null&&b.SetFocus()}catch(c){z.Log("SetFocus",LOG.EXCEPTION,"",c)}};this.SetCalloutState=function(a){try{z.UIPSIM.Controls.Callout!=null&&z.UIPSIM.Controls.Callout.SetState(a)}catch(b){z.Log("SetCalloutState",LOG.EXCEPTION,"",b)}};this.ResetTestModeButton=function(){try{z.UIPSIM.Controls.TestMode.SetState(BUTTONSTATE.NORMAL)}catch(a){z.Log("ResetTestModeButton",
LOG.EXCEPTION,"",a)}};this.ToggleSubmitButton=function(a){var b=true;try{if(z.TrackerForm.ToggleSubmitButton(a)==false)throw"error @ ToggleSubmitButton(bVal)";}catch(c){b=false,z.Log("ToggleSubmitButton",LOG.EXCEPTION,"",c)}return b};this.ToggleCloseButton=function(a){var b=true;try{if(z.TrackerForm.ToggleCloseButton(a)==false)throw"error @ ToggleCloseButton(bVal)";}catch(c){b=false,z.Log("ToggleCloseButton",LOG.EXCEPTION,"",c)}return b}}
clsTemplateRIL=function(){function d(a){var d=null;try{var f=e.CreateHTMLElement("img");o.appendChild(f);d=document.getElementById(f.id);d.onload=b;d.onerror=c;d.path=a}catch(g){e.Log("CreateImage",LOG.EXCEPTION,"",g)}return d}function b(){e.Log("TR_images_loaded",LOG.TRACE,e.Initialized+" > "+n+" > "+k,this.src);this.onload=null;var b=true;try{if(n++,n==k)e.ImageList=a,e.Initialized=PLAYSTATE.INITIALIZED}catch(c){b=false,e.Log("TR_images_loaded",LOG.EXCEPTION,"",c)}try{if(g_objFL!=null&&g_objFL.ResourceLoaded(true,
this.attributes.src.value),e.Initialized==PLAYSTATE.INITIALIZED)e.onInitComplete(true);else if(b==false)e.onInitComplete(false)}catch(d){e.Log("TR_images_loaded",LOG.EXCEPTION,"2",d)}}function c(){try{e.Log("TR_images_load_error",LOG.ERROR,"",this.src),g==false&&(g=true,e.onInitComplete(false))}catch(a){e.Log("TR_images_load_error",LOG.EXCEPTION,"",a)}}clsPlayerBase.call(this,"clsTemplateRIL");var e=this,a={},f="",n=0,g=false,k=0;this.ImageList={};var o=null;this.onInitComplete=null;this.Initialize=
function(b){var c=true;try{if(e.onInitComplete==null)throw"ME.onInitComplete = null";o=b;f=g_StaticURL!=""?g_StaticURL+"ui":g_StaticImageURL!=""?g_StaticImageURL+"ui":"ui";b=true;try{var g=true;try{var n=new Number(0);if(uid_json.settings.mode_doc.available==true)g_objGS.General.ActiveMode=MODETYPE.DOC,n+=1;if(uid_json.settings.mode_test.available==true)g_objGS.General.ActiveMode=MODETYPE.TEST,n+=1;if(uid_json.settings.mode_guide.available==true)g_objGS.General.ActiveMode=MODETYPE.GUIDE,n+=1;if(uid_json.settings.mode_show.available==
true)g_objGS.General.ActiveMode=MODETYPE.SHOW,n+=1;g_objGS.General.TotalNoModes=n}catch(u){g=false,e.Log("ReadModeDetails",LOG.EXCEPTION,"",u)}if(g==false)throw"Error @ ReadModeDetails";var n=false,B,A,G,D=uid_json.resources.audiofiles;for(G in D)B=G,A="ui"+g_URLPathSeperator+D[G],A=A.replace("\\","/"),g_objGS.BasicAudioFiles[B]=A,n=true;if(n==true&&(g_objGS.General.BasicAudioAvailable=true,g_SetBasicPlaybackAudio()==false))throw"Error @ g_SetBasicPlaybackAudio";if(g_objGS.General.IsIPadBrowser==
true)g_objGS.General.BasicAudioAvailable=false;D=uid_json.resources.cursors;for(G in D)B=G,A=f+g_URLPathSeperator+"images"+g_URLPathSeperator+D[G],A=A.replace("\\","/"),g_objGS.CursorFiles[B]=A;D=uid_json.resources.mousebuttons;for(G in D)B=G,A=f+g_URLPathSeperator+"images"+g_URLPathSeperator+D[G],A=A.replace("\\","/"),g_objGS.MouseButtonFiles[B]=A;var D=uid_json.psim.images,r;for(r in D)D[r].src!=""&&(sValue=f+g_URLPathSeperator+"images"+g_URLPathSeperator+D[r].src,sValue=sValue.replace("\\","/"),
a[r]=d(sValue),k++);if(g_objGS.General.HomeAvailable==true)for(r in D=uid_json.phome.images,D)D[r].src!=""&&(sValue=f+g_URLPathSeperator+"images"+g_URLPathSeperator+D[r].src,sValue=sValue.replace("\\","/"),a["home_"+r]=d(sValue),k++);B={};for(var H in uid_json.psim.layout.h5dobjects)B[uid_json.psim.layout.h5dobjects[H].fw.h5d]=0;D=uid_json.resources.h5dialogs;for(H in D)B[H]!=void 0&&(sValue=f+g_URLPathSeperator+"images"+g_URLPathSeperator+D[H].src,sValue=sValue.replace("\\","/"),a[H]=d(sValue),k++);
D=uid_json.psim.layout.h5dobjects;for(H in D)sValue=f+g_URLPathSeperator+"images"+g_URLPathSeperator+D[H].fw.src,sValue=sValue.replace("\\","/"),D[H].fw.src!=""&&D[H].fw.src!=void 0&&(a["h5d_"+H]=d(sValue),k++);D=uid_json.resources.icons;for(H in D)B=true,D[H].req!=void 0&&D[H].req=="0"&&(B=false),B==true&&(sValue=f+g_URLPathSeperator+"images"+g_URLPathSeperator+D[H].src,sValue=sValue.replace("\\","/"),a[H]=d(sValue),k++);uid_json.settings.template.themedinfo=uid_json.settings.template.themedinfo.replace(/0\||0/gi,
"");var C=uid_json.settings.template.themedinfo.split("|"),J;for(J in uid_json.infosteps){D=uid_json.infosteps[J].images;G=0;for(r=C.length;G<r;G++)if(C[G]!="0"&&C[G]==J.replace("ist_",""))for(H in D)sValue=f+g_URLPathSeperator+"images"+g_URLPathSeperator+D[H].src,sValue=sValue.replace("\\","/"),a[J+"_"+H]=d(sValue),k++}if(g_objGS.General.ModeIndicatorAvailable==true)for(var I in uid_json.modeindicators)for(H in D=uid_json.modeindicators[I].images,D)sValue=f+g_URLPathSeperator+"images"+g_URLPathSeperator+
D[H].src,sValue=sValue.replace("\\","/"),a[I+"_"+H]=d(sValue),k++;if(uid_json.feedback!=void 0)for(r in D=uid_json.feedback.images,D)sValue=f+g_URLPathSeperator+"images"+g_URLPathSeperator+D[r].src,sValue=sValue.replace("\\","/"),a["fdbk_"+r]=d(sValue),k++}catch(L){b=false,e.Log("ReadResources",LOG.EXCEPTION,"",L)}if(b==false)throw"Error @ ReadResources";if(k>0){G=null;try{for(i in a)if(a[i]!=null)G=a[i],G.src=a[i].path}catch(N){e.Log("LoadTemplateImages",LOG.EXCEPTION,"",N)}if(G==false)throw"Error @ LoadTemplateImages";
}else e.onInitComplete(c)}catch(M){c=false,e.Log("Initialize",LOG.EXCEPTION,"",M)}return c}};
clsButton=function(d,b,c,e,a,f,n){function g(){try{if(B!=null&&typeof B!="string"){if(p.State==BUTTONSTATE.NORMAL){var a=r.getContext("2d");a.drawImage(B,b,c,p.Width,p.Height,0,0,p.Width,p.Height)}p.State==BUTTONSTATE.CLICKED&&(a=r.getContext("2d"),a.drawImage(A,b,c,p.Width,p.Height,0,0,p.Width,p.Height));p.State!=BUTTONSTATE.HIDDEN&&DEVICE.TOUCH==false&&p.TooltipText!=""&&p.TooltipText!=void 0&&p.Tooltip!=null&&p.Tooltip.Show(p,p.TooltipText)}}catch(d){p.Log("onMouseOver",LOG.EXCEPTION,"for > "+
q,d)}}function k(){try{if(E!=null&&B!=null){if(p.State==BUTTONSTATE.NORMAL){var a=r.getContext("2d");a.drawImage(E,b,c,p.Width,p.Height,0,0,p.Width,p.Height)}p.State==BUTTONSTATE.CLICKED&&(a=r.getContext("2d"),a.drawImage(G,b,c,p.Width,p.Height,0,0,p.Width,p.Height))}p.TooltipText!=""&&p.Tooltip!=null&&p.Tooltip.Hide()}catch(d){p.Log("onMouseOut",LOG.EXCEPTION,"for > "+q,d)}}function o(a){var b=true;try{if(a=a==void 0?event:a,a.keyCode==13||a.keyCode==32)setTimeout(v,100);else if(p.onKeyDown!=null)p.onKeyDown(a)}catch(c){b=
false,p.Log("onKeyDown",LOG.EXCEPTION,"for > "+q,c)}return b}function v(a){try{if(p.Tooltip!=null&&p.Tooltip.Hide(),p.State!=BUTTONSTATE.DISABLED&&p.State!=BUTTONSTATE.HIDDEN&&(p.Cancel=false,p.onClick!=null)){p.onClick(p);if(p.Cancel==false&&G!=null)if(p.State==BUTTONSTATE.NORMAL){var d=r.getContext("2d");d.drawImage(G,b,c,p.Width,p.Height,0,0,p.Width,p.Height);p.State=BUTTONSTATE.CLICKED}else if(p.State==BUTTONSTATE.CLICKED)d=r.getContext("2d"),d.drawImage(E,b,c,p.Width,p.Height,0,0,p.Width,p.Height),
p.State=BUTTONSTATE.NORMAL;if(a!=void 0)a.stopPropagation();else if(event!=void 0)event.cancelBubble=true}}catch(e){p.Log("onMouseClick",LOG.EXCEPTION,"for > "+q,e)}}clsPlayerBase.call(this,"clsButton");var p=this,q="";d!=void 0&&(q=d);var E=null,u=null,B=null,A=null,G=null,D=null,r,H=null,C="",J="";this.DefaultToggle=new Boolean(false);this.State=BUTTONSTATE.NORMAL;this.Cancel=false;this.Left=this.Left==void 0?Number(f==void 0?b:f):this.Left;this.Top=this.Top==void 0?Number(n==void 0?c:n):this.Top;
this.Width=Number(e);this.Height=Number(a);this.Locked=false;this.onKeyDown=this.onClick=this.Tooltip=null;this.Initialize=function(a,d,e,f,n,F,T,S,O,P,z){var X=true;try{if(a==null||a==void 0)throw"holderDiv not supplied";S!=void 0&&(C=S);z!=void 0&&(J=z);E=d;u=f;B=e;G=n;A=F;D=T;tmpID=p.GetUniqueID();var Z=new clsCanvas(q);Z.id=tmpID;Z.style.position="absolute";Z.style.visibility="visible";Z.style.display=g_inline;Z.style.left=p.Left+"px";Z.style.top=p.Top+"px";Z.setDimensions(p.Width,p.Height);if(g_EnableBorderInTemplate)Z.style.borderStyle=
"solid",Z.style.borderWidth="1px",Z.style.borderColor="red";a.appendChild(Z.obj);this.Id=Z.obj.id;r=Z;var Y=Z.getContext("2d");p.DefaultToggle==true&&E!=void 0?(Y.drawImage(G,b,c,p.Width,p.Height,0,0,p.Width,p.Height),p.State=BUTTONSTATE.CLICKED):Y.drawImage(E,b,c,p.Width,p.Height,0,0,p.Width,p.Height);var U=p.CreateTextHolder(P);U.style.left=p.Left+"px";U.style.top=p.Top+"px";U.style.width=p.Width+"px";U.style.height=p.Height+"px";U.dir=uid_json.settings.template.rtl;a.appendChild(U);H=document.getElementById(U.id);
a="";P!==void 0&&P.css!==void 0&&(P.css.ta!=void 0&&(a+=";text-align: "+P.css.ta),P.css.va!=void 0&&(a+=";vertical-align: "+P.css.va));H.tabIndex=0;if(S!=void 0&&S!="")H.innerHTML="<table border=0 width=100% height=100%><tr><td  style='"+a+"'><span style='"+z+"'>"+S+"</span></td></tr></table>";p.Locked=O;if(O!=true){if(H!=null)H.onmouseover=g,H.onmouseout=k,H.onclick=v,H.onkeydown=o,H.style.cursor="pointer",H.style.outline="0px dashed #fff";r.onmouseover=g;r.onmouseout=k;r.onclick=v;r.onkeydown=o;
r.style.cursor="pointer"}r.style.outline="0px dashed #fff"}catch(fa){X=false,p.Log("Initialize",LOG.EXCEPTION,"for > "+q,fa)}return X};this.Move=function(a,b){try{r.style.left=a+"px",r.style.top=b+"px"}catch(c){p.Log("Move",LOG.EXCEPTION,"for > "+q,c)}};this.Disable=function(){try{if(u!=null)r.getContext("2d").drawImage(u,b,c,p.Width,p.Height,0,0,p.Width,p.Height),p.State=BUTTONSTATE.DISABLED,r.style.cursor="default"}catch(a){p.Log("Disable",LOG.EXCEPTION,"for > "+q,a)}};this.Hide=function(){try{if(D!=
null&&(r.getContext("2d").drawImage(D,b,c,p.Width,p.Height,0,0,p.Width,p.Height),p.State=BUTTONSTATE.HIDDEN,r.style.cursor="default",H!=null))H.innerHTML="",H.style.cursor="default"}catch(a){bRet=false,p.Log("Hide",LOG.EXCEPTION,"for > "+q,a)}};this.Enable=function(){try{if(E!=null&&p.State==BUTTONSTATE.DISABLED&&(r.getContext("2d").drawImage(E,b,c,p.Width,p.Height,0,0,p.Width,p.Height),p.State=BUTTONSTATE.NORMAL,r.style.cursor="pointer",H!=null))H.innerHTML="<table border=0 width=100% height=100%><tr><td  style='"+
J+"'>"+C+"</td></tr></table>",H.style.cursor="pointer"}catch(a){bRet=false,p.Log("Enable",LOG.EXCEPTION,"for > "+q,a)}};this.Show=function(){try{if(E!=null&&(r.getContext("2d").drawImage(E,b,c,p.Width,p.Height,0,0,p.Width,p.Height),p.State=BUTTONSTATE.NORMAL,r.style.cursor="pointer",H!=null))H.innerHTML="<table border=0 width=100% height=100%><tr><td  style='"+J+"'>"+C+"</td></tr></table>",H.style.cursor="pointer"}catch(a){bRet=false,p.Log("Enable",LOG.EXCEPTION,"for > "+q,a)}};this.SetState=function(a){try{p.State=
a;var d=r.getContext("2d");switch(a){case BUTTONSTATE.CLICKED:d.drawImage(G,b,c,p.Width,p.Height,0,0,p.Width,p.Height);case BUTTONSTATE.SELECTED:d.drawImage(G,b,c,p.Width,p.Height,0,0,p.Width,p.Height);break;case BUTTONSTATE.NORMAL:if(p.Locked!=true)r.style.cursor="pointer";d.drawImage(E,b,c,p.Width,p.Height,0,0,p.Width,p.Height);break;case BUTTONSTATE.DISABLED:p.Disable();break;case BUTTONSTATE.HIDDEN:p.Hide()}}catch(e){bRet=false,p.Log("SetState",LOG.EXCEPTION,"for > "+q,e)}};this.SetBusyFlag=function(a){try{if(p.State!=
BUTTONSTATE.DISABLED&&p.State!=BUTTONSTATE.HIDDEN)r.style.cursor=a==true?"wait":"pointer"}catch(b){bRet=false,p.Log("Toggle",LOG.EXCEPTION,"for > "+q,b)}};this.SetFocus=function(){try{r.focus(),H!=null&&H.focus()}catch(a){bRet=false,p.Log("Toggle",LOG.EXCEPTION,"for > "+q,a)}};this.GetBoundingRect=function(){var a=null;try{a=r.getBoundingClientRect()}catch(b){a=null,p.Log("GetBoundingRect",LOG.EXCEPTION,"for > "+q,b)}return a};this.FindPos=function(){var a=0,b=0;try{var c=r;if(c.offsetParent){do a+=
c.offsetLeft,b+=c.offsetTop;while(c=c.offsetParent)}}catch(d){rect=null,p.Log("FindPos",LOG.EXCEPTION,"for > "+q,d)}return[a,b]}};
clsButtonAnimated=function(d){function b(b){var d=true;try{b=b==void 0?event:b,(b.keyCode==13||b.keyCode==32)&&setTimeout(c,100)}catch(g){d=false,e.Log("onKeyDown",LOG.EXCEPTION,"for > "+a,g)}return d}function c(){try{if(e.onClick!=null)e.onClick(e)}catch(b){e.Log("onMouseClick",LOG.EXCEPTION,"for > "+a,b)}}clsPlayerBase.call(this,"clsButtonAnimated");var e=this,a="";d!=void 0&&(a=d);this.onKeyDown=this.onClick=this.Button=this.Tooltip=null;this.Initialize=function(c,d,g,k){var o=true;try{if(c==null||
c==void 0)throw"holderDiv not supplied";if(d==null)throw"m_ImageIcon=null";var v=e.CreateHTMLElement("div");v.style.display=g_inline;v.style.visibility="visible";v.style.width=c.style.width;v.style.height=c.style.height;v.style.cursor="pointer";c.appendChild(v);var p=document.getElementById(v.id),q=e.CreateHTMLElement("img");q.style.left="0px";q.style.top="0px";q.style.cursor="pointer";q.style.display=g_inline;q.style.visibility="visible";q.src=d.src;p.appendChild(q);var E=e.CreateTextHolder(k);E.style.left=
"0px";E.style.top="0px";E.style.width=c.style.width;E.style.height=c.style.height;E.style.cursor="pointer";E.style.display=g_inline;E.style.visibility="visible";E.dir=uid_json.settings.template.rtl;c="";k!==void 0&&k.css!==void 0&&(k.css.ta!=void 0&&(c+=";text-align: "+k.css.ta),k.css.va!=void 0&&(c+=";vertical-align: "+k.css.va));E.innerHTML="<table border=0 width=100% height=100%><tr><td  style='"+c+"'>"+g+"</td></tr></table>";p.appendChild(E);e.Button=p;e.Button.tabIndex=1;e.Button.onclick=e.onClick;
e.Button.onkeydown=b}catch(u){o=false,e.Log("Initialize",LOG.EXCEPTION,"for > "+a,u)}return o};this.SetFocus=function(){try{e.Button.focus()}catch(b){bRet=false,e.Log("Toggle",LOG.EXCEPTION,"for > "+a,b)}}};
function clsTooltip(){function d(a){var d=true;try{if(e!=null&&e!=void 0){var a=e.ClassName=="clsButton"?e.GetBoundingRect():e.getBoundingClientRect(),o=c.getBoundingClientRect();if(a!=null){var v=a.left+10,p=a.top-(o.bottom-o.top+5);a.bottom+(o.bottom-o.top)+20>f||(p=a.top+(a.bottom-a.top)+10);v+o.width>n&&(v=n-o.width-10);c.style.left=v+"px";c.style.top=p+"px";c.style.visibility="visible"}}}catch(q){d=false,b.Log("Display",LOG.EXCEPTION,"Ignore",q)}return d}clsPlayerBase.call(this,"clsTooltip");
var b=this,c,e,a,f=0,n=0;this.Duration=new Number(0);this.BodyColor="#ff00ff";this.BorderColor="#ff0000";this.BorderStyle="solid";this.BorderWidth="1";this.BorderRadius="5";this.Initialize=function(a,d){var e=true;try{if(b.Initialized==PLAYSTATE.INITIALIZED)throw"Already Initizlized";if(a==null)throw"holderDiv not supplied";var v,p;try{var q=0,E=0;if(typeof window.innerWidth=="number")q=window.innerWidth,E=window.innerHeight;else if(document.documentElement&&(document.documentElement.clientWidth||
document.documentElement.clientHeight))q=document.documentElement.clientWidth,E=document.documentElement.clientHeight;else if(document.body&&(document.body.clientWidth||document.body.clientHeight))q=document.body.clientWidth,E=document.body.clientHeight;v=Number(q);p=Number(E)}catch(u){b.Log("GetStageWidthAndHeight",LOG.EXCEPTION,"",u)}n=v;f=p;var B=b.CreateTextHolder(d);B.style.zIndex=ZINDEX.TOOLTIP;B.style.padding="5px";B.style.visibility="hidden";B.dir=uid_json.settings.template.rtl;document.body.appendChild(B);
c=document.getElementById(B.id);b.PlayState=PLAYSTATE.READY}catch(A){e=false,b.Log("Initialize",LOG.EXCEPTION,"",A)}return e};this.Show=function(f,k){var n=true;try{if(c.style.visibility=="hidden")c.innerHTML="<span>"+k+"</span>",f!=null&&f!=void 0&&(e=f,setTimeout(d,1),a=setTimeout(b.Hide,b.Duration))}catch(v){n=false,b.Log("Show",LOG.EXCEPTION,"",v)}return n};this.Hide=function(){var d=true;try{c.style.visibility="hidden",clearTimeout(a),a=0}catch(e){d=false,b.Log("Hide",LOG.EXCEPTION,"",e)}return d}}
clsUIPBase=function(){function d(a){var b=null,c="";try{for(c in k.divColl){var d=k.divColl[c].Cord;if(a.Left>=d.Left&&a.Left<=d.Left+d.Width&&a.Top>=d.Top&&a.Top<=d.Top+d.Height){if(c=="Right"||c=="Left"){a.Left=c=="Left"?a.Left:a.Left-d.Left;a.Top>k.divColl[c].Split?(a.Top-=k.divColl[c].Split,b=k.divColl[c].Bottom.Obj):a.Top+a.Height<k.divColl[c].Split&&a.Top+a.Height>d.Top?(a.Top-=d.Top,b=k.divColl[c].Top.Obj):(a.Height+=k.divColl[c].Middle.Cord.Height,a.Top-=d.Top,b=k.divColl[c].Obj);break}if(c==
"Top"||c=="Bottom"){a.Top=c=="Top"?a.Top:a.Top-d.Top;a.Left>k.divColl[c].Split?(a.Left-=k.divColl[c].Split,b=k.divColl[c].Right.Obj):a.Left+a.Width<k.divColl[c].Split&&a.Left+a.Width>d.Left?(a.Left-=d.Left,b=k.divColl[c].Left.Obj):(a.Width+=k.divColl[c].Center.Cord.Width,a.Left-=d.Left,b=k.divColl[c].Obj);break}}}}catch(e){b=null}if(b==null)b=k.divColl[c].Obj;return b}function b(){var a=true;try{if(uid_json.psim.images.logo){var b=k.ImageList.logo;if(b==void 0)return true;var c=uid_json.psim.images.logo.imagedim.split("|");
if(uid_json.psim.layout.holders.logo.cord=="")return true;var e=new clsRect(uid_json.psim.layout.holders.logo.cord),f=new clsCanvas("clsUIPBase:CreateLogo"),g=d(e);uid_json.psim.layout.holders.logo.position=="1"&&(e.Left=parseInt(g.style.width)-e.Width);g.appendChild(f.obj);f.style.position="absolute";f.style.left=e.Left+"px";f.style.top=e.Top+"px";f.style.visibility="visible";f.style.zIndex=ZINDEX.TEMPLATE+1;f.style.display=g_inline;f.setDimensions(e.Width,e.Height);document.getElementById(f.id);
ctx=f.getContext("2d");ctx.drawImage(b,0,0,c[0],c[1],0,0,e.Width,e.Height)}}catch(n){a=false,k.Log("CreateLogo",LOG.EXCEPTION,"",n)}return a}function c(){var a=true;try{if(uid_json.resources.icons.audio_playing==void 0)return true;var b=k.ImageList.audio_playing;if(b==void 0)return true;if(uid_json.psim.layout.holders.audio_playing==void 0)return true;var c=new clsRect(uid_json.psim.layout.holders.audio_playing.cord),e=k.CreateHTMLElement("img");e.src=b.src;var f=d(c);e.style.left=c.Left+"px";e.style.top=
c.Top+"px";e.style.width=c.Width+"px";e.style.height=c.Height+"px";e.style.visibility="hidden";e.style.display=g_inline;e.style.zIndex=ZINDEX.TEMPLATE;f.appendChild(e);o=document.getElementById(e.id)}catch(g){a=false,k.Log("CreateAudioAnimationHolder",LOG.EXCEPTION,"",g)}return a}function e(){var a=true;try{if(uid_json.resources.icons.loading==void 0)return true;var b=k.ImageList.loading;if(b==void 0)return true;if(uid_json.psim.layout.holders.loading==void 0)return true;var c=new clsRect(uid_json.psim.layout.holders.loading.cord),
e=k.CreateHTMLElement("img");d(c).appendChild(e);e.style.left=c.Left+"px";e.style.top=c.Top+"px";e.style.width=c.Width+"px";e.style.height=c.Height+"px";e.style.display=g_inline;e.style.zIndex=ZINDEX.TEMPLATE;e.src=b.src;v=document.getElementById(e.id)}catch(f){a=false,k.Log("CreateLoadAnimationHolder",LOG.EXCEPTION,"",f)}return a}function a(a,b,c,e,f,g,n,p,o){var C=null;try{if(b==""||b==void 0||b.cord=="")return C;var v=b.cord;k.Log("CreateButton",LOG.TRACE,"Cord",v);for(var I=new clsRect(v),b=new clsRect(v),
v=1;v<arguments.length;v++)arguments[v]=arguments[v]==""?null:k.ImageList[arguments[v]]!=void 0?k.ImageList[arguments[v]]:arguments[v];var L=d(b),C=new clsButton(a,I.Left,I.Top,I.Width,I.Height,b.Left,b.Top);C.Tooltip=g_objTR.Tooltip;if(C.Initialize(L,c,e,f,g,n,p,o)==false)throw"Error @ btnTemp.Initialize";}catch(N){C=null,k.Log("CreateButton",LOG.EXCEPTION,N)}return C}function f(a,b){var c=true;try{var e=messages_json.psim.footer,f=uid_json.psim.layout.holders;if(f[a]==void 0)return true;if(f[a].cord==
void 0)return true;var g=String(f[a].cord);if(g=="")return true;var n=new clsRect(g),p=d(n),o=k.CreateTextHolder(f[a]);o.style.left=n.Left+"px";o.style.top=n.Top+"px";o.style.width=n.Width+"px";o.style.height=n.Height+"px";o.style.zIndex=ZINDEX.TEMPLATE;o.dir=uid_json.settings.template.rtl;p.appendChild(o);k.Holders[a]=o;if(e[b]!=void 0){var C=document.getElementById(o.id),v=k.GetUniqueID();C.innerHTML="<table border=0 width=100% height=100% cellpadding=0 cellspacing=0><tr><td id='"+v+"' ></td></tr></table>";
var I=document.getElementById(v);I.innerHTML=e[b].text;I.style.cssText=e[b].css}}catch(L){c=false,k.Log("CreateModeTextDiv",LOG.EXCEPTION,a,L)}return c}function n(){var a=true;try{var b=uid_json.psim.layout.holders.mode_common,c=messages_json.psim.footer;if(b==void 0)return true;var e=String(b.cord);if(e=="")return true;var f=new clsRect(e),g=d(f),n=k.CreateTextHolder(b);n.style.left=f.Left+"px";n.style.top=f.Top+"px";n.style.width=f.Width+"px";n.style.height=f.Height+"px";n.style.zIndex=ZINDEX.TEMPLATE;
if(g_EnableBorderInTemplate)n.style.borderStyle="solid",n.style.borderWidth="1px",n.style.borderColor="red";n.dir=uid_json.settings.template.rtl;g.appendChild(n);var p=document.getElementById(n.id),o=k.GetUniqueID();p.innerHTML="<table border=0 width=100% height=100% cellpadding=0 cellspacing=0><tr><td id='"+o+"'></td></tr></table>";k.Holders.ModeTextTD=document.getElementById(o);e=b="";switch(g_objGS.General.ActiveMode){case MODETYPE.SHOW:b=c.mode_show.text;e="mode_show";break;case MODETYPE.GUIDE:b=
c.mode_guide.text;e="mode_guide";break;case MODETYPE.TEST:b=c.mode_test.text;e="mode_test";break;case MODETYPE.DOC:b=c.mode_doc.text,e="mode_doc"}k.Holders.ModeTextTD.innerHTML=b;k.Holders.ModeTextTD.style.cssText=c[e].css}catch(C){a=false,k.Log("CreateCommonModeTextHolder",LOG.EXCEPTION,"",C)}return a}function g(){var a=true;try{var b=uid_json.psim.layout.specs.notes;if(b==void 0)return true;m_Notes=new clsNotes(b);if(uid_json.settings.template.notes==false)return m_Notes.Available=false,a;var c=
new clsRect(String(b.cord)),e=d(c),b=0;if(g_enabledualmonitor==true)b=screen.availWidth;m_Notes.Width=c.Width-b;m_Notes.Top=c.Top;m_Notes.Left=c.Left;m_Notes.Height=c.Height;if(m_Notes.Create(e)==false)throw"Error @ m_Notes.Create";k.Controls.Notes=m_Notes}catch(f){a=false,k.Log("CreateNotes",LOG.EXCEPTION,"",f)}return a}clsPlayerBase.call(this,"clsUIPBase");var k=this,o=null,v=null;this.StageHeight=this.StageWidth=0;this.StageDiv=null;this.divColl={};var p=uid_json.psim.layout.h5dobjects;this.onStepLoadRequested=
null;this.ImageList={};this.onMICloseClicked=this.onMIHomeClicked=this.onMIReportClicked=this.onMIReviewClicked=this.onMIContinueClicked=this.onMIModeClicked=null;this.Height=this.Width=0;this.StepProgressBar=null;this.Holders={PlayerOuterDiv:null,PlayerDiv:null,StepCountHolderDiv:null,ProgressBarHolderDiv:null,ProgressBarValueHolderDiv:null,ModeTextTD:null,CueCard:{Footer:null,Title:null}};this.Controls={Mode:null,ShowMode:null,GuideMode:null,TestMode:null,DocMode:null,Speed:null,Cuecard:null,Stop:null,
Prev:null,Play:null,Next:null,Callout:null,Audio:null,FCC:null,Zoom:null,Help:null,Close:null,Home:null,WFHome:null};this.SetAudioAnimation=function(a){var b=true;try{if(o!=null)o.style.visibility=a==true?"visible":"hidden"}catch(c){b=false,k.Log("SetAudioAnimation",LOG.EXCEPTION,"",c)}return b};this.SetLoadAnimation=function(){var a=true;try{var b=g_objGS.General.Busy==true?"visible":"hidden";if(v!=null)v.style.visibility=b}catch(c){a=false,k.Log("SetLoadAnimation",LOG.EXCEPTION,"",c)}return a};
this.CreateObjects=function(){var p=true;try{var o=true;try{if(b()==false)throw"Failed @ CreateLogo";if(c()==false)throw"Failed @ CreateAudioAnimationHolder";if(e()==false)throw"Failed @ CreateLoadAnimationHolder";var u=true;try{var B=messages_json.psim.tooltips,A=uid_json.psim.layout.controls;k.Controls.Play=a("VCR:Play",A.vcr_playpause,"normal","normal_hover","disable","toggle","toggle_hover","hide");if(k.Controls.Play!=null)k.Controls.Play.TooltipText=B.playpause.text;k.Controls.Prev=a("VCR:Prev",
A.vcr_prev,"normal","normal_hover","disable","","","hide");if(k.Controls.Prev!=null)k.Controls.Prev.TooltipText=B.previous.text;k.Controls.Next=a("VCR:Next",A.vcr_next,"normal","normal_hover","disable","","","hide");if(k.Controls.Next!=null)k.Controls.Next.TooltipText=B.next.text;k.Controls.Stop=a("VCR:Stop",A.vcr_stop,"normal","normal_hover","disable","","","hide");if(k.Controls.Stop!=null)k.Controls.Stop.TooltipText=B.stop.text;k.Controls.Audio=a("Footer:Audio",A.audio_onoff,"normal","normal_hover",
"disable","toggle","toggle_hover","hide");if(k.Controls.Audio!=null)k.Controls.Audio.TooltipText=B.audio.text;k.Controls.Callout=a("Footer:Callout",A.callout_onoff,"normal","normal_hover","disable","toggle","toggle_hover","hide");if(k.Controls.Callout!=null)k.Controls.Callout.TooltipText=B.callout.text;k.Controls.Speed=a("Footer:Speed",A.speed_launcher,"normal","normal_hover","","toggle","toggle_hover","hide");if(k.Controls.Speed!=null)k.Controls.Speed.TooltipText=B.cursorspeed.text;k.Controls.FCC=
a("Footer:Cuecard",A.cuecard_launcher,"normal","normal_hover","","toggle","toggle_hover","hide");if(k.Controls.FCC!=null)k.Controls.FCC.TooltipText=B.cuecard.text;k.Controls.Mode=a("Footer:CommonMode",A.mode_launcher,"normal","normal_hover","","toggle","toggle_hover","hide");if(k.Controls.Mode!=null)k.Controls.Mode.TooltipText=B.mode.text;k.Controls.Zoom=a("Footer:Zoom",A.zoom_launcher,"normal","normal_hover","","toggle","toggle_hover","hide");if(k.Controls.Zoom!=null)k.Controls.Zoom.TooltipText=
B.zoom.text;k.Controls.ShowMode=a("Footer:Show",A.mode_show,"normal","normal_hover","disable","toggle","toggle_hover","hide");if(k.Controls.ShowMode!=null)k.Controls.ShowMode.TooltipText=B.showmode.text;k.Controls.GuideMode=a("Footer:Guide",A.mode_guide,"normal","normal_hover","disable","toggle","toggle_hover","hide");if(k.Controls.GuideMode!=null)k.Controls.GuideMode.TooltipText=B.guidemode.text;k.Controls.TestMode=a("Footer:Test",A.mode_test,"normal","normal_hover","disable","toggle","toggle_hover",
"hide");if(k.Controls.TestMode!=null)k.Controls.TestMode.TooltipText=B.testmode.text;k.Controls.DocMode=a("Footer:Doc",A.mode_doc,"normal","normal_hover","disable","toggle","toggle_hover","hide");if(k.Controls.DocMode!=null)k.Controls.DocMode.TooltipText=B.docmode.text;var v=true;g_CommandArgs[CMDARGS.LAUNCHSOURCE]==LAUNCHSOURCETYPE.PRESENTATIONEDITOR?v=false:g_CommandArgs[CMDARGS.LAUNCHSOURCE]==LAUNCHSOURCETYPE.PRESENTATIONOUTPUT&&g_objTracker.Enabled==false&&(v=false);if(v==true&&(k.Controls.Close=
a("Footer:Close",A.close,"toggle","toggle_hover","disable","","","hide"),k.Controls.Close!=null))k.Controls.Close.TooltipText=g_CommandArgs[CMDARGS.LAUNCHSOURCE]==LAUNCHSOURCETYPE.PRESENTATIONOUTPUT?B.submit.text:B.close.text;if(g_objGS.General.HomeAvailable==true&&(k.Controls.Home=a("Footer:Home",A.home,"normal","normal_hover","disable","","","hide"),k.Controls.Home!=null))k.Controls.Home.TooltipText=B.home.text;k.Controls.Help=a("Footer:Help",A.help,"normal","normal_hover","disable","toggle","toggle_hover",
"hide");if(k.Controls.Help!=null)k.Controls.Help.TooltipText=B.help.text;k.Controls.WFHome=a("Footer:WorkflowHome",A.workflowhome,"normal","normal_hover","disable","toggle","toggle_hover","hide");if(k.Controls.WFHome!=null)k.Controls.WFHome.TooltipText=B.workflowhome.text}catch(D){u=false,k.Log("CreateButtons",LOG.EXCEPTION,"",D)}if(u==false)throw"Error @ CreateButtons";var r;a:{u=true;try{var H=uid_json.psim.layout.holders.step_progress;if(H==void 0){r=true;break a}var C=String(H.cord);k.Log("CreateStepCountHolder",
LOG.TRACE,"Cord",C);var J=new clsRect(C),I=d(J),L=k.CreateTextHolder(H);L.style.left=J.Left+"px";L.style.top=J.Top+"px";L.style.width=J.Width+"px";L.style.height=J.Height+"px";L.style.zIndex=ZINDEX.TEMPLATE;if(g_EnableBorderInTemplate)L.style.borderStyle="solid",L.style.borderWidth="1px",L.style.borderColor="red";L.dir=uid_json.settings.template.rtl;I.appendChild(L);k.Holders.StepCountHolderDiv=document.getElementById(L.id)}catch(N){u=false,k.Log("CreateStepCountHolder",LOG.EXCEPTION,"",N)}r=u}if(r==
false)throw"Failed @ CreateStepCountHolder";var M;if(M=uid_json.settings.general.uistepprogressbar!=void 0&&uid_json.settings.general.uistepprogressbar=="1"){r=true;try{var K;a:{H=true;try{var F=uid_json.psim.layout.holders.step_progressbar_value_holder;if(F==void 0){K=true;break a}var T=String(F.cord);k.Log("CreateStepProgressbarValueHolder",LOG.TRACE,"Cord",T);var S=new clsRect(T),O=d(S),P=k.CreateTextHolder(F);P.style.left=S.Left+"px";P.style.top=S.Top+"px";P.style.width=S.Width+"px";P.style.height=
S.Height+"px";P.style.zIndex=ZINDEX.TEMPLATE;if(g_EnableBorderInTemplate)P.style.borderStyle="solid",P.style.borderWidth="1px",P.style.borderColor="red";P.dir=uid_json.settings.template.rtl;O.appendChild(P);k.Holders.ProgressBarValueHolderDiv=document.getElementById(P.id)}catch(z){H=false,k.Log("CreateStepProgressbarValueHolder",LOG.EXCEPTION,"",z)}K=H}if(K==false)throw"Failed @ CreateStepProgressbarValueHolder";var X;a:{K=true;try{var Z=uid_json.psim.layout.holders.step_progressbarholder;if(Z==void 0){X=
true;break a}var Y=String(Z.cord);k.Log("CreateStepProgressbarHolder",LOG.TRACE,"Cord",Y);var U=new clsRect(Y),fa=d(U),R=k.CreateTextHolder(Z);R.style.left=U.Left+"px";R.style.top=U.Top+"px";R.style.width=U.Width+"px";R.style.height=U.Height+"px";R.style.zIndex=ZINDEX.TEMPLATE;if(g_EnableBorderInTemplate)R.style.borderStyle="solid",R.style.borderWidth="1px",R.style.borderColor="red";R.dir=uid_json.settings.template.rtl;fa.appendChild(R);k.Holders.ProgressBarHolderDiv=document.getElementById(R.id)}catch(la){K=
false,k.Log("CreateStepProgressbarHolder",LOG.EXCEPTION,"",la)}X=K}if(X==false)throw"Failed @ CreateStepProgressbarHolder";var ha=new clsProgressBar;ha.Left="0px";ha.Top="0px";ha.Width=k.Holders.ProgressBarHolderDiv.style.width;ha.Height=k.Holders.ProgressBarHolderDiv.style.height;if(ha.Create(k.Holders.ProgressBarHolderDiv,k.Holders.ProgressBarValueHolderDiv,uid_json.psim.layout.holders.step_progressbar,"left")==false)throw"Error @ this.StepProgressBar.Create";k.StepProgressBar=ha}catch(ja){r=false,
k.Log("CreateStepProgressBar",LOG.EXCEPTION,"",ja)}M=r==false}if(M)throw"Failed @ CreateStepProgressBar";if(n()==false)throw"Failed @ CreateCommonModeTextHolder";M=true;try{if(k.Controls.ShowMode!=null&&uid_json.settings.mode_show.available==true&&f("mode_show","mode_show")==false)throw"error @ CreateModeTextDiv";if(k.Controls.GuideMode!=null&&uid_json.settings.mode_guide.available==true&&f("mode_guide","mode_guide")==false)throw"error @ CreateModeTextDiv";if(k.Controls.TestMode!=null&&uid_json.settings.mode_test.available==
true&&f("mode_test","mode_test")==false)throw"error @ CreateModeTextDiv";if(k.Controls.DocMode!=null&&uid_json.settings.mode_doc.available==true&&f("mode_doc","mode_doc")==false)throw"error @ CreateModeTextDiv";}catch(ia){M=false,k.Log("CreateModeTextDivs",LOG.EXCEPTION,"",ia)}if(M==false)throw"Failed @ CreateModeTextDivs";M=true;try{if(f("help","help")==false)throw"error @ CreateModeTextDiv";if(f("close","close")==false)throw"error @ CreateModeTextDiv";if(g_objGS.General.HomeAvailable==true&&f("home",
"home")==false)throw"error @ CreateModeTextDiv";if(f("zoom","zoom")==false)throw"error @ CreateModeTextDiv";if(f("speed","speed")==false)throw"error @ CreateModeTextDiv";if(f("cuecard","cuecard")==false)throw"error @ CreateModeTextDiv";if(f("stop","stop")==false)throw"error @ CreateModeTextDiv";if(f("prev","prev")==false)throw"error @ CreateModeTextDiv";if(f("play","play")==false)throw"error @ CreateModeTextDiv";if(f("next","next")==false)throw"error @ CreateModeTextDiv";if(f("audio","audio")==false)throw"error @ CreateModeTextDiv";
if(f("callout","callout")==false)throw"error @ CreateModeTextDiv";if(f("workflow","workflow")==false)throw"error @ CreateModeTextDiv";}catch(ba){M=false,k.Log("CreateRemainingFooterDivs",LOG.EXCEPTION,"",ba)}if(M==false)throw"Failed @ CreateRemainingFooterDivs";if(g()==false)throw"Failed @ CreateNotes";}catch(ca){o=false,k.Log("CreateControls",LOG.EXCEPTION,"",ca)}if(o==false)throw"Error @ CreateControls";}catch(aa){p=false,k.Log("Create",LOG.EXCEPTION,"",aa)}return p};this.Hide=function(){var a=
true;try{k.Holders.PlayerOuterDiv.style.display="none",k.Holders.PlayerDiv.style.display="none"}catch(b){a=false,k.Log("Hide",LOG.EXCEPTION,"",b)}return a};this.Show=function(){var a=true;try{if(k.Holders.StepCountHolderDiv!=null)k.Holders.StepCountHolderDiv.style.display=g_inline;k.Controls.Cuecard!=null&&setTimeout(k.Controls.Cuecard.Show,10)}catch(b){a=false,k.Log("Show",LOG.EXCEPTION,"",b)}return a};this.CreateCueCard=function(){var a=true;try{var b=null,c=null,e=null,f;f=messages_json.psim.cuecard!=
void 0?messages_json.psim.cuecard:messages_json.psim.canvas.cuecard.common;k.Controls.Cuecard=new clsCuecard;if(uid_json.settings.template.cuecard==false)return k.Controls.Cuecard.Available=false,a;if(uid_json.settings.template.fixedcuecard=="1")c=uid_json.psim.layout.holders.cuecard_body!=void 0?new clsRect(uid_json.psim.layout.holders.cuecard_body.cord):new clsRect(uid_json.psim.layout.specs.cuecard.fixedcord),b=d(c);else if(p.cuecard!=void 0)var g=p.cuecard.fw.h5d,b=k.Holders.PlayerDiv;else return k.Controls.Cuecard.Available=
false,true;k.Controls.Cuecard.FWBaseImage=k.ImageList.h5d_cuecard||k.ImageList[g];g=false;uid_json.settings.template.fixedcuecard=="1"&&(g=true);if(g==true){var n=uid_json.psim.layout.holders.cuecard_title;sCord=n.cord;var o=new clsRect(sCord),v=d(o),C=k.CreateTextHolder(n);v.appendChild(C);C.style.width=o.Width+"px";C.style.height=o.Height+"px";C.style.left=o.Left+"px";C.style.top=o.Top+"px";k.Holders.CueCard.Title=document.getElementById(C.id);var J=uid_json.psim.layout.holders.cuecard_footer;sCord=
J.cord;o=new clsRect(sCord);C=k.CreateTextHolder(J);if(uid_json.psim.layout.specs.cuecard!=void 0){v=d(o);C.style.width=o.Width+"px";C.style.height=o.Height+"px";C.style.left=o.Left+"px";C.style.top=o.Top+"px";C.dir=uid_json.settings.template.rtl;var I=k.GetUniqueID();C.innerHTML="<table border=0 width=100% height=100%><tr><td id='"+I+"' valign=middle align=center> </td></tr></table>";var L=k.CreateHTMLElement("span");L.style.cssText=g_GetCSSForTD(uid_json.psim.layout.holders.cc_show_details.css);
L.innerHTML=f.show_details.text;e=L;setTimeout(function(){document.getElementById(I).appendChild(L)},100);v.appendChild(C);k.Holders.CueCard.Footer=document.getElementById(C.id)}}k.Controls.Cuecard.Create(b,c,k.Holders.CueCard.Title,k.Holders.CueCard.Footer,e);if(k.DisableSelection(k.Controls.Cuecard.ContentBody)==false)throw"Error @ DisableSelection";}catch(N){a=false,k.Log("CreateCueCard",LOG.EXCEPTION,"",N)}return a};this.DisableSelection=function(a){var b=true;try{typeof a.onselectstart!="undefined"?
a.onselectstart=function(){return false}:typeof a.style.MozUserSelect!="undefined"?a.style.MozUserSelect="none":a.onmousedown=function(){return false},a.style.cursor="default"}catch(c){b=false,k.Log("DisableSelection",LOG.EXCEPTION,"",c)}return b}};
clsUIP=function(){function d(){var a=true,b={};try{if(g_objGS.General.ModeIndicatorAvailable==true){for(var c in uid_json.modeindicators){var d=uid_json.modeindicators[c].images;for(i in d)b[c+"_"+i]=o.ImageList[c+"_"+i]}o.MIR=new clsModeIndicator;o.MIR.ImageList=b;o.MIR.ZIndex=ZINDEX.TEMPLATE;if(o.MIR.Create(o.StageDiv)==false)throw"error @  ME.MIR.Create()";for(var e in o.MIR.DialogPage){var f=o.MIR.DialogPage[e];if(f.Controls.Show!=null)f.Controls.Show.onClick=function(){return o.onMIModeClicked(MODETYPE.SHOW)};
if(f.Controls.Guide!=null)f.Controls.Guide.onClick=function(){return o.onMIModeClicked(MODETYPE.GUIDE)};if(f.Controls.Test!=null)f.Controls.Test.onClick=function(){return o.onMIModeClicked(MODETYPE.TEST)};if(f.Controls.Home!=null)f.Controls.Home.onClick=function(){return o.onMIHomeClicked()};if(f.Controls.Continue!=null)f.Controls.Continue.onClick=function(){return o.onMIContinueClicked()};if(f.Controls.Review!=null)f.Controls.Review.onClick=function(){return o.onMIReviewClicked()};if(f.Controls.Report!=
null)f.Controls.Report.onClick=function(){return o.onMIReportClicked()};if(f.Controls.Close!=null)f.Controls.Close.onClick=function(){return o.onMICloseClicked()}}}}catch(g){a=false,o.Log2("clsUIP","CreateModeIndicators",LOG.EXCEPTION,"",g)}return a}function b(a){var b;try{u[a].Cord=new clsRect;if(E[a]<E.Left){if(u[a].Cord.Left=0,u[a].Cord.Width=o.StageWidth,E[a]>E.Right)u[a].Cord.Width=o.StageWidth-o.BaseImgWidth+(q.Left+q.Width)}else E[a]<E.Right?(u[a].Cord.Left=q.Left,u[a].Cord.Width=o.StageWidth-
q.Left):(u[a].Cord.Left=q.Left,u[a].Cord.Width=o.StageWidth-o.BaseImgWidth+q.Width);a=="Top"?(u[a].Cord.Height=q.Top,u[a].Cord.Top=0):(u[a].Cord.Height=o.BaseImgHeight-q.Top-q.Height,u[a].Cord.Top=o.StageHeight-u[a].Cord.Height)}catch(c){b=false,o.Log2("clsUIP","SetcordsTopBottomDivs",LOG.EXCEPTION,"",c)}return b}function c(a){var b=true;try{u[a].Cord=new clsRect;if(E[a]<E.Top){if(u[a].Cord.Top=0,u[a].Cord.Height=o.StageHeight,E[a]>E.Bottom)u[a].Cord.Height=o.StageHeight-o.BaseImgHeight+(q.Top+q.Height)}else E[a]<
E.Bottom?(u[a].Cord.Top=q.Top,u[a].Cord.Height=o.StageHeight-q.Top):(u[a].Cord.Top=q.Top,u[a].Cord.Height=o.StageHeight-o.BaseImgHeight+q.Height);a=="Left"?(u[a].Cord.Width=q.Left,u[a].Cord.Left=0):(u[a].Cord.Width=o.BaseImgWidth-(q.Left+q.Width),u[a].Cord.Left=o.StageWidth-u[a].Cord.Width)}catch(c){b=false,o.Log2("clsUIP","SetcordsLeftRightdivs",LOG.EXCEPTION,"",c)}return b}function e(b,c){var d={};try{var e=o.CreateHTMLElement("DIV");e.style.width="50px";e.style.height="50px";e.style.zIndex=ZINDEX.TEMPLATE;
e.style.display=g_inline;e.style.visibility="visible";e.style.background='url("'+c+'")';b.appendChild(e);d.Obj=document.getElementById(e.id);d.Obj.onclick=a;d.Cord=new clsRect}catch(f){d=null,o.Log2("clsUIP","CreateDiv",LOG.EXCEPTION,"",f)}return d}function a(){try{if(g_objGS.General.ActiveMode==MODETYPE.GUIDE||g_objGS.General.ActiveMode==MODETYPE.TEST){if(g_objTR.HideAllPopUps()===false)throw"Error @ g_objTR.HideAllPopUps()";if(g_objTR.FocusEventReceiverDiv()==false)throw"Error @ ME.FocusEventReceiverDiv";
}}catch(a){o.Log2("clsUIP","HideAllPopUps",LOG.EXCEPTION,"",a)}}function f(a,b){try{var c=b=="Top"?a.Cord.Top:o.BaseImgHeight-a.Cord.Height;if(a.Left!=null)g(a.Left,"left",a.Center==null&&a.Right==null?(a.Cord.Width-a.Split)/2:0),g(a.Left,"top",0),g(a.Left,"height",a.Cord.Height),g(a.Left,"width",a.Split),a.Left.Obj.style.backgroundPosition="-"+a.Cord.Left+"px -"+c+"px";if(a.Center!=null)g(a.Center,"left",a.Split),g(a.Center,"top",0),g(a.Center,"height",a.Cord.Height),g(a.Center,"width",a.Cord.Width-
o.BaseImgWidth),a.Center.Obj.style.backgroundPosition="-0px -0px";if(a.Right!=null)g(a.Right,"left",a.Split+a.Cord.Width-o.BaseImgWidth),g(a.Right,"top",0),g(a.Right,"height",a.Cord.Height),g(a.Right,"width",o.BaseImgWidth-a.Split),a.Right.Obj.style.backgroundPosition="-"+a.Split+"px -"+c+"px"}catch(d){o.Log2("clsUIP","SetLeftCenterRightDivs",LOG.EXCEPTION,"",d)}}function n(a,b){var c=true;try{var d=b=="Left"?a.Cord.Left:o.BaseImgWidth-a.Cord.Width;if(a.Top!=null)g(a.Top,"left",0),g(a.Top,"top",0),
g(a.Top,"height",a.Split-a.Cord.Top),g(a.Top,"width",a.Cord.Width),a.Top.Obj.style.backgroundPosition="-"+d+"px -"+a.Cord.Top+"px";if(a.Middle!=null)g(a.Middle,"left",0),g(a.Middle,"top",a.Split-a.Cord.Top),g(a.Middle,"height",a.Cord.Height+a.Cord.Top-q.Height-q.Top),g(a.Middle,"width",a.Cord.Width),a.Middle.Obj.style.backgroundPosition="-0px -0px";if(a.Bottom!=null)g(a.Bottom,"left",0),g(a.Bottom,"top",a.Split+a.Cord.Height-q.Height-q.Top),g(a.Bottom,"height",q.Height-a.Split+q.Top),g(a.Bottom,"width",
a.Cord.Width),a.Bottom.Obj.style.backgroundPosition="-"+d+"px -"+a.Split+"px"}catch(e){c=false,o.Log2("clsUIP","setCords",LOG.EXCEPTION,"",e)}return c}function g(a,b,c){var d=true;try{a.Obj.style[b]=c+"px",a.Cord[b.toTitleCase()]=c}catch(e){d=false,o.Log2("clsUIP","setCords",LOG.EXCEPTION,"",e)}return d}function k(){var a=true;try{for(var b=[{key:"L",val:Number(uid_json.psim.layout.specs.general.leftdivtop)},{key:"R",val:Number(uid_json.psim.layout.specs.general.rightdivtop)},{key:"T",val:Number(uid_json.psim.layout.specs.general.topdivleft)},
{key:"B",val:Number(uid_json.psim.layout.specs.general.bottomdivleft)}],c=b.slice(0).sort(function(a,b){return a.val-b.val}),b=c,b=[],d=0,e=c.length;d<e;++d)b[d]=c[d].key;B=b.join("")}catch(f){a=false,o.Log2("clsUIP","CreateDominanceList",LOG.EXCEPTION,"",f)}return a}clsUIPBase.call(this,"clsUIP");var o=this;this.StageWidth=1202;this.BaseImgWidth=this.StageHeight=600;this.BaseImgHeight=335;var v=uid_json.psim.layout.h5dobjects,p=this.MIR=null,q=new clsRect,E={},u={Left:{Cord:null,Obj:null,Top:null,
Middle:null,Bottom:null,Split:null},Right:{Cord:null,Obj:null,Top:null,Middle:null,Bottom:null,Split:null},Top:{Cord:null,Obj:null,Left:null,Center:null,Right:null,Split:null},Bottom:{Cord:null,Obj:null,Left:null,Center:null,Right:null,Split:null}},B;this.Initialize=function(g,v){var D=true;try{if(g==null)throw"holderDiv not supplied";p=g;o.StageDiv=p;o.ImageList=v;var r=uid_json.psim.layout.specs.canvas.cord.split("|");q.Left=Number(r[0]);q.Top=Number(r[1]);q.Width=Number(r[2]);q.Height=Number(r[3]);
if(uid_json.psim.images==void 0){var H=true;try{var C=o.CreateHTMLElement("DIV");C.style.left=p.style.left;C.style.top=p.style.top;C.style.width=p.style.width;C.style.height=p.style.height;C.style.zIndex=ZINDEX.TEMPLATE;C.style.backgroundColor=uid_json.psim.layout.specs.general.stagebgcolor;C.style.display=g_inline;C.style.visibility="visible";p.appendChild(C);o.Holders.PlayerDiv=document.getElementById(C.id);o.Holders.PlayerDiv.onclick=a;o.DisableSelection(o.Holders.PlayerDiv);o.Width=parseInt(o.Holders.PlayerDiv.style.width);
o.Height=parseInt(o.Holders.PlayerDiv.style.height)}catch(J){H=false,o.Log2("clsUIP","CreatePlayerDivOnly",LOG.EXCEPTION,"",J)}if(H==false)throw"Error @ CreatePlayerDiv";}else{C=true;try{if(k()==false)throw"Error @ CreateDominanceList";var I=uid_json.psim.images.normal.imagedim.split("|");o.BaseImgWidth=Number(I[0]);o.BaseImgHeight=Number(I[1]);E={Left:B.indexOf("L"),Right:B.indexOf("R"),Top:B.indexOf("T"),Bottom:B.indexOf("B")};m_availTWidth=o.StageWidth;m_availLHeight=o.StageHeight;m_availBWidth=
o.StageWidth;m_availRHeight=o.StageHeight;c("Left");u.Left.Split=Number(uid_json.psim.layout.specs.general.split_left);c("Right");u.Right.Split=Number(uid_json.psim.layout.specs.general.split_right);b("Top");u.Top.Split=Number(uid_json.psim.layout.specs.general.split_top)||o.BaseImgWidth;b("Bottom");u.Bottom.Split=Number(uid_json.psim.layout.specs.general.split_bottom)||o.BaseImgWidth}catch(L){C=false,o.Log2("clsUIP","CollectDivCoords",LOG.EXCEPTION,"",L)}if(C==false)throw"Error @ CollectDivCoords";
C=true;try{I=true;try{for(var N in u){var M;a:{var r=N,K=true;try{if(u[r].Cord.Width<=0||u[r].Cord.Height<=0){M=true;break a}var F=o.CreateHTMLElement("DIV");F.style.left=u[r].Cord.Left+"px";F.style.top=u[r].Cord.Top+"px";F.style.width=u[r].Cord.Width+"px";F.style.height=u[r].Cord.Height+"px";F.style.zIndex=ZINDEX.TEMPLATE;F.style.display=g_inline;F.style.visibility="visible";F.style.backgroundColor=uid_json.psim.layout.specs.general.templatefootercolor||"";p.appendChild(F);u[r].Obj=document.getElementById(F.id);
o.Log2("clsUIP","CreateMainDivs",LOG.SPECIAL,"Main Div Created","MainDiv_"+r)}catch(T){K=false,o.Log2("clsUIP","CreateMainDivs",LOG.EXCEPTION,"",T)}M=K}if(M==false)throw"Error @ CreateMainDivs for "+N+" ";var S;if(S=u[N].Obj!=null){r=N;K=true;try{var O=uid_json.psim.layout.specs,P=u[r].Obj;if(O.general["split_"+r.toLowerCase()]!=""&&O.general["split_"+r.toLowerCase()]!=void 0)switch(r){case "Left":u.Left.Top=e(P,o.ImageList.hide.src);u.Left.Middle=e(P,o.ImageList.bgl.src);u.Left.Bottom=e(P,o.ImageList.hide.src);
break;case "Right":u.Right.Top=e(P,o.ImageList.hide.src);u.Right.Middle=e(P,o.ImageList.bgr.src);u.Right.Bottom=e(P,o.ImageList.hide.src);break;case "Top":u.Top.Left=e(P,o.ImageList.hide.src);u.Top.Center=e(P,o.ImageList.bgt.src);u.Top.Right=e(P,o.ImageList.hide.src);break;case "Bottom":u.Bottom.Left=e(P,o.ImageList.hide.src),u.Bottom.Center=e(P,o.ImageList.bgb.src),u.Bottom.Right=e(P,o.ImageList.hide.src)}else u[r].Left=e(P,o.ImageList.hide.src)}catch(z){K=false,o.Log2("clsUIP","CreateInternalDivs",
LOG.EXCEPTION,"",z)}S=K==false}if(S)throw"Error @ CreateInternalDivs for "+N+" ";}N=true;try{if(u.Left.Obj!=null&&n(u.Left,"Left")==false)throw"Error @ SetTopMiddleBottomDivs";if(u.Right.Obj!=null&&n(u.Right,"Right")==false)throw"Error @ SetTopMiddleBottomDivs";if(u.Top.Obj!=null&&f(u.Top,"Top")==false)throw"Error @ SetLeftCenterRightDivs";if(u.Bottom.Obj!=null&&f(u.Bottom,"Bottom")==false)throw"Error @ SetLeftCenterRightDivs";}catch(X){N=false,o.Log2("clsUIP","ArrangeInternalDivs",LOG.EXCEPTION,
"",X)}if(N==false)throw"Error @ ArrangeInternalDivs";N=true;try{H=o.CreateHTMLElement("DIV"),H.style.left=u.Left.Cord.Width+"px",H.style.top=u.Top.Cord.Height+"px",H.style.width=o.StageWidth-u.Left.Cord.Width-u.Right.Cord.Width+"px",H.style.height=o.StageHeight-u.Top.Cord.Height-u.Bottom.Cord.Height+"px",H.style.zIndex=ZINDEX.TEMPLATE,H.style.backgroundColor=uid_json.psim.layout.specs.general.stagebgcolor,H.style.display=g_inline,H.style.visibility="visible",p.appendChild(H),o.Holders.PlayerDiv=document.getElementById(H.id),
o.Holders.PlayerDiv.onclick=a,o.DisableSelection(o.Holders.PlayerDiv),o.Width=parseInt(o.Holders.PlayerDiv.style.width),o.Height=parseInt(o.Holders.PlayerDiv.style.height)}catch(Z){N=false,o.Log2("clsUIP","CreatePlayerDiv",LOG.EXCEPTION,"",Z)}if(N==false)throw"Error @ CreatePlayerDiv";}catch(Y){I=false,o.Log2("clsUIP","CreateLayout",LOG.EXCEPTION,"",Y)}if(I==false)throw"Error @ CreateLayout";o.divColl=u;for(var U in u){if(U=="Left")g_AdjX=o.divColl[U].Cord.Width,o.divColl[U].Cord.Height-=o.divColl[U].Middle==
void 0?0:o.divColl[U].Middle.Cord.Height;if(U=="Top")g_AdjY=o.divColl[U].Cord.Height,o.divColl[U].Cord.Width-=o.divColl[U].Center==void 0?0:o.divColl[U].Center.Cord.Width;if(U=="Right")o.divColl[U].Cord.Left=q.Left+q.Width,o.divColl[U].Cord.Height-=o.divColl[U].Middle==void 0?0:o.divColl[U].Middle.Cord.Height;if(U=="Bottom")o.divColl[U].Cord.Top=q.Top+q.Height,o.divColl[U].Cord.Width-=o.divColl[U].Center==void 0?0:o.divColl[U].Center.Cord.Width}if(o.CreateObjects()==false)throw"Error @ CreateObjects";
}catch(fa){C=false,o.Log2("clsUIP","Create",LOG.EXCEPTION,"",fa)}if(C==false)throw"Error @ DesignLayout";}if(o.CreateCueCard()==false)throw"Error @ CreateCueCard";if(d()==false)throw"CreateModeIndicators";}catch(R){D=false,o.Log2("clsUIP","Initialize",LOG.EXCEPTION,"",R)}return D};this.GetObjectCord=function(a){var b=new clsRect;try{var c=v[a].spec.cord.split("|");b.Width=Number(c[2]);b.Height=Number(c[3]);if(c[3].indexOf("%")!=-1){var d=Number(c[3].replace("%",""));b.Height=Math.ceil(o.Height*(d/
100))}if(c[2].indexOf("%")!=-1){var e=Number(c[2].replace("%",""));b.Width=Math.ceil(o.Width*(e/100))}switch(a){case "speed":var f=o.Controls.Speed.GetBoundingRect();break;case "zoom":f=o.Controls.Zoom.GetBoundingRect();break;case "mode":b.Height=30+Math.round(42*g_objGS.General.TotalNoModes),g_objGS.General.TotalNoModes==1&&(b.Height+=40),f=o.Controls.Mode.GetBoundingRect()}b.Left=f.left-(b.Width/2-o.Controls[a.toTitleCase()].Width/2);b.Top=f.top-b.Height;if(b.Top<0)b.Top=f.bottom+50;BROWSER.LEGACY===
false&&(b.Top-=18,b.Left-=3)}catch(g){b=[0,0,0,0]}return b}};
clsUIPHome=function(){function d(){var a=true;try{if(uid_json.settings.template.pidialog==void 0)return true;if(uid_json.settings.template.pidialog.dialog==void 0)return true;if(uid_json.settings.template.enablepidialog!=void 0&&uid_json.settings.template.enablepidialog=="0")return true;var c=u.CreateTextHolder(uid_json.settings.template.pidialog.dialog);c.style.width=u.StageDiv.style.width;c.style.height=u.StageDiv.style.height;c.style.display="none";c.style.visibility="visible";c.style.left=u.StageDiv.style.left;
c.style.top=u.StageDiv.style.top;c.style.zIndex=ZINDEX.PIDIALOG;c.style.overflowX="hidden";c.style.overflowY="hidden";c.tabIndex=1;u.StageDiv.appendChild(c);u.PIDialog=document.getElementById(c.id);u.PIDialog.onkeydown=b;u.PIDialog.onclick=function(){this.style.display="none"};var d=uid_json.phome.layout.controls.btn_minimize.cord.split("|");il=Number(d[0]);it=Number(d[1]);iw=Number(d[2]);ih=Number(d[3]);var e=new clsButton("PIDialog_Minimize",il,it,iw,ih);e.Tooltip=g_objTR.Tooltip;e.Initialize(u.PIDialog,
u.ImageList.home_normal,u.ImageList.home_normal_hover,u.ImageList.home_toggle);e.TooltipText=messages_json.phome.tooltips.phomeminimize.text;var f=Number(u.PIDialog.style.width.replace("px","")),g=Number(u.PIDialog.style.height.replace("px","")),c=0,k=Number(uid_json.settings.template.pidialog.minimize.top),c=uid_json.settings.template.rtl=="ltr"?f-iw-Number(uid_json.settings.template.pidialog.minimize.horizontalbuffer):Number(uid_json.settings.template.pidialog.minimize.horizontalbuffer);e.Move(c,
k);e.onClick=function(){u.PIDialog.style.display="none"};var n=u.CreateTextHolder(uid_json.settings.template.pidialog.body),o=Number(n.style.paddingLeft.replace("px","")),p=Number(n.style.paddingTop.replace("px","")),q=Number(n.style.paddingRight.replace("px","")),v=Number(n.style.paddingBottom.replace("px","")),E=Number(n.style.left.replace("px","")),F=Number(n.style.top.replace("px",""));n.style.width=f-(E*2+(o+q))+"px";n.style.height=g-(F*2+(p+v))+"px";n.style.display=g_inline;n.style.visibility=
"visible";n.style.overflowX="hidden";n.style.overflowY="hidden";n.style.zIndex=ZINDEX.PIDIALOG;n.tabIndex=1;u.PIDialog.appendChild(n);u.PIDialogBody=document.getElementById(n.id);var T=u.CreateTextHolder(uid_json.settings.template.pidialog.header),S=Number(T.style.width.replace("px","")),O=Number(T.style.height.replace("px","")),P=Number(u.PIDialogBody.style.width.replace("px","")),z=Number(u.PIDialogBody.style.top.replace("px","")),e=(P-S)/2,O=z-O/2;T.style.display=g_inline;T.style.visibility="visible";
T.style.left=e+"px";T.style.top=O+"px";T.style.overflowX="hidden";T.style.overflowY="hidden";T.style.zIndex=ZINDEX.PIDIALOG;T.tabIndex=1;u.PIDialog.appendChild(T);u.PIDialogHeader=document.getElementById(T.id)}catch(X){a=false,u.Log("CreatePIDialog",LOG.EXCEPTION,"",X)}return a}function b(a){var b=true;try{if((a==void 0?event:a).keyCode==27)u.PIDialog.style.display="none"}catch(c){b=false,u.Log("onKeyDown",LOG.EXCEPTION,"",c)}return b}function c(){var a=true;try{var b=0,c=0,d=u.ImageList.home_logo;
if(d==void 0)return true;arrWH=uid_json.phome.images.logo.imagedim.split("|");var b=arrWH[0],c=arrWH[1],e=uid_json.phome.layout.controls.logo.cord;if(e=="")return true;var f=e.split("|");l=Number(f[0]);t=Number(f[1]);w=Number(f[2]);h=Number(f[3]);var g=new clsCanvas("clsUIPHome:CreateLogo");g.style.position="absolute";g.style.left=l+"px";g.style.top=t+"px";g.style.visibility="visible";g.style.display=g_inline;if(g_EnableBorderInTemplate)g.style.borderStyle="solid",g.style.borderWidth="1px",g.style.borderColor=
"red";g.setDimensions(w,h);E.appendChild(g.obj);document.getElementById(g.id);ctx=g.getContext("2d");if(ctx.drawImage(d,0,0,b,c,0,0,w,h)==false)throw"Error @ CreateLogo";}catch(n){a=false,u.Log("CreateLogo",LOG.EXCEPTION,"",n)}return a}function e(a,b,c,d,e,f,g,n,k,o,p){var q=null;try{var v=k,F=o,T=p,S=b;if(b=="")return null;var O="";if(b.cord=="")return null;O=typeof b=="string"?b:String(b.cord);u.Log("CreateButton",LOG.TRACE,"Cord",O);var P=O.split("|");l=Number(P[0]);t=Number(P[1]);w=Number(P[2]);
h=Number(P[3]);q=new clsButton(a,l,t,w,h);q.Tooltip=g_objTR.Tooltip;for(O=1;O<arguments.length;O++)arguments[O]=arguments[O]==""?null:u.ImageList["home_"+arguments[O]];q.Initialize(E,c,d,e,f,g,n,v,T,S,F)}catch(z){q=null,u.Log("CreateButton",LOG.EXCEPTION,z)}return q}function a(a,b){var c=null;try{var d=uid_json.phome.layout.holders,e=messages_json.phome.pibuttons;if(d[a]==void 0)return u.Log("CreateDiv",LOG.TRACE,"Component missing >"+a,"Ignored"),null;var f=String(d[a].cord);if(f=="")return u.Log("CreateDiv",
LOG.TRACE,"Cord empty for >"+a,"Ignored"),null;var g=f.split("|");l=Number(g[0]);t=Number(g[1]);w=Number(g[2]);h=Number(g[3]);c=u.CreateTextHolder(d[a]);c.style.left=l+"px";c.style.top=t+"px";c.style.width=w+"px";c.style.height=h+"px";if(g_EnableBorderInTemplate)c.style.borderStyle="solid",c.style.borderWidth="1px",c.style.borderColor="red";c.dir=uid_json.settings.template.rtl;E.appendChild(c);var n=document.getElementById(c.id),k=u.GetUniqueID(),o="<table border=0 width=100% height=100% cellpadding=0 cellspacing=0><tr><td style='"+
g_GetCSSForTD(d[a].css)+"'><span id='"+k+"' style='"+e[b.toLowerCase()].css+"' ></span></td></tr></table>";n.innerHTML=o;document.getElementById(k).innerHTML=e[b.toLowerCase()].text}catch(p){u.Log("CreateDiv",LOG.EXCEPTION,"",p),c=null}return c}function f(a){try{var b=uid_json.phome.layout.holders;if(b[a]==void 0)throw"ComponentName is missing > "+a;if(b[a].cord=="")return null;var c=String(b[a].cord).split("|");l=Number(c[0]);t=Number(c[1]);w=Number(c[2]);h=Number(c[3]);var d=u.CreateTextHolder(b[a]);
d.style.left=l+"px";d.style.top=t+"px";d.style.width=w+"px";d.style.height=h+"px";if(g_EnableBorderInTemplate)d.style.borderStyle="solid",d.style.borderWidth="1px",d.style.borderColor="red";d.dir=uid_json.settings.template.rtl;E.appendChild(d);var e=document.getElementById(d.id),f=u.GetUniqueID(),g="<table border=0 width=100% height=100% cellpadding=0 cellspacing=0><tr><td style='"+g_GetCSSForTD(b[a].css)+"'><span id='"+f+"' ></span></td></tr></table>";e.innerHTML=g;document.getElementById(f);u.CSS[a.toTitleCase()]=
g_GetCSSForTD(b[a].css)}catch(n){e=null,u.Log("CreatePIDataHolder",LOG.EXCEPTION,"",n)}return e}function n(a){var b=true;try{for(var c=new Number(1);c>0;){if(u.Buttons["btn_"+c]!=void 0||u.Buttons.Labels["btn_"+c]!=void 0){if(u.Buttons["btn_"+c]==a||u.Buttons.Labels["btn_"+c]==a)u.onPIButtonClick(c)}else break;c++}}catch(d){b=false,u.Log("objPIButton_Click",LOG.EXCEPTION,"",d)}return b}clsPlayerBase.call(this,"clsUIPHome");var g=null,k=null,o=null,v=null,p=null,q=null,E=null;this.PIDialogHeader=this.PIDialogBody=
this.PIDialog=null;var u=this;this.Controls={ShowIcon:null,GuideIcon:null,TestIcon:null,DocIcon:null,Prev:null,Next:null,Audio:null,Close:null,Logo:null,Maximize:null};this.Buttons={};this.Controls.Labels={Show:null,Guide:null,Test:null};this.Buttons.Labels={};this.CSS={};this.onMaximizeButtonClick=this.onPIDialogButtonClick=this.onResumeClick=this.onPIButtonClick=this.onCloseRequested=this.onPrevButtonClick=this.onNextButtonClick=this.onAudioButtonClick=this.onModeChangeRequested=null;this.Create=
function(b,n){var G=true;try{u.StageDiv=b;u.ImageList=n;var D=true;try{if(d()==false)throw"Error @ CreatePIDialog";var r=uid_json.phome.images.hide.imagedim.split("|"),H=Number(r[0]),C=Number(r[1]),J=u.CreateHTMLElement("DIV"),r=1;g_enabledualmonitor==true&&(r=2);var I=(parseInt(u.StageDiv.style.width)/r-H)/2,L=(parseInt(u.StageDiv.style.height)-C)/2;I<0&&(I=0);L<0&&(L=0);J.style.width=H+"px";J.style.height=C+"px";J.style.backgroundImage='url("'+u.ImageList.home_hide.src+'")';J.style.display=g_inline;
J.style.visibility="visible";J.style.left=I+"px";J.style.top=L+"px";u.StageDiv.appendChild(J);E=document.getElementById(J.id)}catch(N){D=false,u.Log("CreatePlayerOuterDiv",LOG.EXCEPTION,"",N)}if(D==false)throw"Error @ CreatePlayerOuterDiv";D=true;try{var H=true,M=messages_json.phome.tooltips;try{var K=messages_json.phome.pibuttons,F=uid_json.phome.layout.controls;if(uid_json.settings.mode_show.available==true&&(u.Controls.ShowIcon=e("Home:Show",F.mode_show,"normal","normal_hover","disable","","",
"hide"),u.Controls.ShowIcon!=null))u.Controls.ShowIcon.TooltipText=M.phomeshow.text;if(uid_json.settings.mode_guide.available==true&&(u.Controls.GuideIcon=e("Home:Guide",F.mode_guide,"normal","normal_hover","disable","","","hide"),u.Controls.GuideIcon!=null))u.Controls.GuideIcon.TooltipText=M.phomeguide.text;if(uid_json.settings.mode_test.available==true&&(u.Controls.TestIcon=e("Home:Test",F.mode_test,"normal","normal_hover","disable","","","hide"),u.Controls.TestIcon!=null))u.Controls.TestIcon.TooltipText=
M.phometest.text;if(uid_json.settings.mode_doc.available==true&&(u.Controls.DocIcon=e("Home:Doc",F.mode_doc,"normal","normal_hover","disable","","","hide"),u.Controls.DocIcon!=null))u.Controls.DocIcon.TooltipText=M.phomedoc.text;var T=BUTTONSTATE.HIDDEN;u.Controls.Prev=e("Home:Prev",F.btn_prev,"normal","normal","toggle","","","hide");if(u.Controls.Prev!=null)u.Controls.Prev.TooltipText=M.phomeprev.text,u.Controls.Prev.SetState(T);u.Controls.Next=e("Home:Next",F.btn_next,"normal","normal","toggle",
"","","hide");if(u.Controls.Next!=null)u.Controls.Next.TooltipText=M.phomenext.text,u.Controls.Next.SetState(T);u.Controls.Audio=e("Home:Audio",F.btn_audio,"normal","normal_hover","","toggle","toggle_hover","hide");if(u.Controls.Audio!=null)u.Controls.Audio.TooltipText=M.phomeaudio.text,u.Controls.Audio.SetState(T);u.Controls.Maximize=e("Home:Maximize",F.btn_maximize,"normal","normal_hover","toggle","","","hide");if(u.Controls.Maximize!=null)u.Controls.Maximize.TooltipText=M.phomemaximize.text;T=
true;g_CommandArgs[CMDARGS.LAUNCHSOURCE]==LAUNCHSOURCETYPE.PRESENTATIONEDITOR?T=false:g_CommandArgs[CMDARGS.LAUNCHSOURCE]==LAUNCHSOURCETYPE.PRESENTATIONOUTPUT&&g_objTracker.Enabled==false&&(T=false);if(T==true){var S=K.phclose.text,O=K.phclose.css;if(g_CommandArgs[CMDARGS.LAUNCHSOURCE]==LAUNCHSOURCETYPE.PRESENTATIONOUTPUT)S=K.phsubmit.text,O=K.phsubmit.css;else if(g_objTracker.Enabled==true||g_objScorm.Enabled==true)S=K.phsaveclose.text,O=K.phsaveclose.css;u.Controls.Close=e("Home:Close",F.btn_close,
"normal","normal_hover","disable","toggle","toggle_hover","hide",S,O);if(u.Controls.Close!=null)u.Controls.Close.TooltipText=M.phomeclose.text}M=true;try{for(var P=messages_json.phome.tooltips,z=uid_json.phome.layout.controls,X=new Number(1);X>0;){if(z["btn_"+X]!=void 0){if(u.Buttons["btn_"+X]=e("Home:Btn_"+X,z["btn_"+X],"normal","normal_hover","disable","toggle","toggle_hover","hide"),u.Buttons["btn_"+X]!=null)u.Buttons["btn_"+X].TooltipText=P["phomebtn"+X].text}else break;X++}z.btn_pidialog!=void 0&&
(u.Buttons.btn_pidialog=e("Home:btn_pidialog",z.btn_pidialog,"normal","normal_hover","disable","toggle","toggle_hover","hide"))}catch(Z){M=false,u.Log("CreatePIButtons",LOG.EXCEPTION,Z)}if(M==false)throw"Error @ CreatePIButtons";}catch(Y){H=false,u.Log("CreateButtons",LOG.EXCEPTION,"",Y)}if(H==false)throw"Error @ CreateButtons";if(c()==false)throw"Failed @ CreateLogo";P=true;try{if(uid_json.settings.mode_show.available==true)u.Controls.Labels.Show=a("modetext_show","phmode_show"),u.Controls.Labels.Show.style.cursor=
"pointer",a("mode_show","phmodedesc_show");if(uid_json.settings.mode_guide.available==true)u.Controls.Labels.Guide=a("modetext_guide","phmode_guide"),u.Controls.Labels.Guide.style.cursor="pointer",a("mode_guide","phmodedesc_guide");if(uid_json.settings.mode_test.available==true)u.Controls.Labels.Test=a("modetext_test","phmode_test"),u.Controls.Labels.Test.style.cursor="pointer",a("mode_test","phmodedesc_test");for(var U=new Number(1);U>0;){if(u.Buttons["btn_"+U]!=void 0)u.Buttons.Labels["btn_"+U]=
a("btntext_"+U,"PHBtn_"+U),u.Buttons.Labels["btn_"+U].style.cursor="pointer";else break;U++}uid_json.settings.template.pidialog!=void 0?uid_json.settings.template.pidialog.enable=="1"&&uid_json.phome.layout.holders.pidialog!=void 0&&a("pidialog","pidlauncher"):u.Log("CreateTextHolderDivs",LOG.EXCEPTION,"uid_json.settings.template.pidialog is undefined","");g=f("pititle","PITitle");o=f("pidata","PIData");v=f("pivideo");k=f("epntitle","EpnTitle");uid_json.phome.layout.holders.version!=void 0&&uid_json.phome.layout.holders.version.cord!=
""&&(p=f("version"));uid_json.phome.layout.holders.efxid!=void 0&&uid_json.phome.layout.holders.efxid.cord!=""&&(q=f("efxid"))}catch(fa){P=false,u.Log("CreateTextHolderDivs",LOG.EXCEPTION,"",fa)}if(P==false)throw"Failed @ CreateTextHolderDivs";}catch(R){D=false,u.Log("CreateControlsAndTextHolders",LOG.EXCEPTION,"",R)}if(D==false)throw"Error @ CreateControlsAndTextHolders";var la=uid_json.phome.layout.specs.summary,ha;for(ha in la)u.CSS[ha.toTitleCase()]=g_GetCSSForTD(la[ha].css)}catch(ja){G=false,
u.Log("Create",LOG.EXCEPTION,"",ja)}return G};this.DisplayEpilearnTitle=function(a){try{if(k!=null)k.innerHTML="<table border=0 width=100% height=100% cellpadding=0 cellspacing=0><tr><td style='"+u.CSS.Epntitle+"'>"+a+"</td></tr></table>"}catch(b){u.Log("DisplayEpilearnTitle",LOG.EXCEPTION,"",b)}};this.DisplayEpilearnVersion=function(a,b){try{if(p!=null)p.innerHTML="<table border=0 width=100% height=100% cellpadding=0 cellspacing=0><tr><td style='"+u.CSS.Version+"'>"+a+"</td></tr></table>";if(q!=
null)q.innerHTML="<table border=0 width=100% height=100% cellpadding=0 cellspacing=0><tr><td style='"+u.CSS.Efxid+"'>"+b+"</td></tr></table>"}catch(c){u.Log("DisplayEpilearnVersion",LOG.EXCEPTION,"",c)}};this.DisplayPITitle=function(a){try{if(g!=null)g.innerHTML="<table border=0 width=100% height=100% cellpadding=0 cellspacing=0><tr><td style='"+u.CSS.Pititle+"'>"+a+"</td></tr></table>"}catch(b){u.Log("DisplayPITitle",LOG.EXCEPTION,"",b)}};this.DisplayPIData=function(a){try{if(o!=null){var b="",b=
"<table border=0 width=100% height=100% cellpadding=0 cellspacing=0><tr><td style='"+u.CSS.Pidata+"'>"+a+"</td></tr></table>";o.innerHTML=b;if(document.getElementById("EpnResume")!=void 0)document.getElementById("EpnResume").onclick=u.onResumeClick}}catch(c){u.Log("DisplayPIData",LOG.EXCEPTION,"",c)}};this.BindControls=function(){var a=true;try{if(u.Controls.ShowIcon!=null)u.Controls.ShowIcon.onClick=function(){return u.onModeChangeRequested(MODETYPE.SHOW)},u.Controls.Labels.Show.onclick=function(){return u.onModeChangeRequested(MODETYPE.SHOW)};
if(u.Controls.GuideIcon!=null)u.Controls.GuideIcon.onClick=function(){return u.onModeChangeRequested(MODETYPE.GUIDE)},u.Controls.Labels.Guide.onclick=function(){return u.onModeChangeRequested(MODETYPE.GUIDE)};if(u.Controls.TestIcon!=null)u.Controls.TestIcon.onClick=function(){return u.onModeChangeRequested(MODETYPE.TEST)},u.Controls.Labels.Test.onclick=function(){return u.onModeChangeRequested(MODETYPE.TEST)};if(u.Controls.DocIcon!=null)u.Controls.DocIcon.onClick=function(){return u.onModeChangeRequested(MODETYPE.DOC)};
if(u.Controls.Audio!=null)u.Controls.Audio.onClick=function(){return u.onAudioButtonClick()};if(u.Controls.Next!=null)u.Controls.Next.onClick=function(){return u.onNextButtonClick()};if(u.Controls.Prev!=null)u.Controls.Prev.onClick=function(){return u.onPrevButtonClick()};if(u.Controls.Close!=null)u.Controls.Close.onClick=function(){u.onCloseRequested()};for(var b=new Number(1);b>0;){if(u.Buttons["btn_"+b]!=void 0){if(u.Buttons["btn_"+b].onClick=function(){return n(this)},u.Buttons.Labels["btn_"+
b]!=void 0)u.Buttons.Labels["btn_"+b].onclick=function(){return n(this)}}else break;b++}if(u.Buttons.btn_pidialog!=void 0)u.Buttons.btn_pidialog.onClick=function(){u.onPIDialogButtonClick()};if(u.Controls.Maximize!=null)u.Controls.Maximize.onClick=function(){u.onMaximizeButtonClick()}}catch(c){a=false,u.Log("BindControls",LOG.EXCEPTION,"",c)}return a};this.EnablePrevNextHomeButtons=function(a,b){try{var c,d;c=a==true?BUTTONSTATE.NORMAL:BUTTONSTATE.DISABLED;d=b==true?BUTTONSTATE.NORMAL:BUTTONSTATE.DISABLED;
u.Controls.Prev.SetState(c);u.Controls.Next.SetState(d)}catch(e){u.Log("EnablePrevNextHomeButtons",LOG.EXCEPTION,"",e)}};this.HidePrevNextHomeButtons=function(){try{var a=BUTTONSTATE.HIDDEN;u.Controls.Prev!=null&&u.Controls.Prev.SetState(a);u.Controls.Next!=null&&u.Controls.Next.SetState(a)}catch(b){u.Log("HidePrevNextHomeButtons",LOG.EXCEPTION,"",b)}};this.SetSelectedStateForPIButton=function(a){try{for(var b=BUTTONSTATE.NORMAL,c=new Number(1);c>0;){if(u.Buttons["btn_"+c]!=void 0)u.Buttons["btn_"+
c].SetState(b);else break;c++}if(a>0)b=BUTTONSTATE.SELECTED,u.Buttons["btn_"+a].SetState(b)}catch(d){u.Log("SetSelectedStateForPIButton",LOG.EXCEPTION,"",d)}};this.GetVideoHolder=function(){var a=null;try{a=v}catch(b){a=null,u.Log("GetVideoHolder",LOG.EXCEPTION,"",b)}return a};this.ClearPIData=function(){var a=true;try{o.innerHTML=""}catch(b){a=false,u.Log("ClearPIData",LOG.EXCEPTION,"",b)}return a};this.ShowVideoHolder=function(){var a=true;try{if(v!=null)v.style.visible="visible",v.style.display=
g_inline}catch(b){a=false,u.Log("ShowVideoHolder",LOG.EXCEPTION,"",b)}return a};this.HideVideoHolder=function(){var a=true;try{v.style.visibility="hidden",v.style.display="none"}catch(b){a=false,u.Log("HideVideoHolder",LOG.EXCEPTION,"",b)}return a};this.ShowHideAudioButton=function(a){try{var b=BUTTONSTATE.NORMAL;if(g_objGS.General.HomeAudioEnabled==false)b=BUTTONSTATE.CLICKED;if(a==false)b=BUTTONSTATE.HIDDEN;u.Controls.Audio!=null&&u.Controls.Audio.SetState(b)}catch(c){u.Log("ShowHideAudioButton",
LOG.EXCEPTION,"",c)}}};
clsStatusBar=function(){function d(a){var c=true;try{typeof a.onselectstart!="undefined"?a.onselectstart=function(){return false}:typeof a.style.MozUserSelect!="undefined"?a.style.MozUserSelect="none":a.onmousedown=function(){return false},a.style.cursor="default"}catch(d){c=false,b.Log("DisableSelection",LOG.EXCEPTION,"",d)}return c}clsPlayerBase.call(this,"clsStatusBar");var b=this,c=null,e=null,a=null,f=null,n=tooltipdata=uid_json.psim.layout.specs.statusbar,g=true,k="",o="",v="",p=1,q=0;this.onContinueClick=
null;this.ContinueDiv_OnClick=function(){try{if(b.onContinueClick==null)throw"onContinueClick = null";b.onContinueClick()}catch(a){b.Log("ContinueDiv_OnClick",LOG.EXCEPTION,"",a)}};this.Create=function(p){var u=true;try{if(n.required=="0")return true;if(p==null)throw"holderDiv not supplied";f=p;p=true;try{var q;q=messages_json.psim.commonmsg!=void 0?messages_json.psim.commonmsg:messages_json.psim.canvas.commonmsg;var A=0,G=1;g_enabledualmonitor==true&&(G=2);var D=parseInt(f.style.width)/G,r=Number(n.height),
H=Number(n.overlap_buffer),C=Number(n.border_thickness);if(n.width.indexOf("%")!=-1)var J=Number(n.width.split("%")[0]),A=new Number(Math.ceil(D*(J/100)))-C*2;else A=Number(n.width);var I=Number((D-(A+C*2))/2),L=Math.round(parseFloat(f.style.height)-r-2);L+=H;var N=b.CreateTextHolder(n);N.style.left=I+"px";N.style.top=L+"px";N.style.width=A+"px";N.style.height=r+"px";N.style.zIndex=ZINDEX.TEMPLATE;try{k=parseInt(n.css.bc.substr(1,2),16),o=parseInt(n.css.bc.substr(3,2),16),v=parseInt(n.css.bc.substr(5,
2),16)}catch(M){g=false}f.appendChild(N);c=document.getElementById(N.id);var K=n.topline_cord.split("|"),F=new Number(K[0]),T=new Number(K[1]),S=new Number(K[3]),O=b.CreateHTMLElement("div");O.style.position="absolute";O.style.left=F+"px";O.style.top=T+"px";O.style.width=A-F*2+"px";O.style.height=S+"px";O.style.visibility="visible";O.style.display=g_inline;try{O.style.backgroundColor=n.topline_color}catch(P){}c.appendChild(O);var K=n.continue_cord.split("|"),z=new Number(K[2]),X=new Number(K[3]),
Z=new Number(K[1]);if(uid_json.psim.layout.specs.cont.animcontinue=="0"){var Y=b.CreateHTMLElement("button");Y.style.type="text";Y.style.position="absolute";Y.style.top=Z+"px";Y.style.left=uid_json.settings.template.rtl=="ltr"?A-(z+5)+"px":"5px";Y.style.width=z+"px";Y.style.height=X+"px";Y.style.cursor="pointer";Y.style.visibility="visible";Y.style.display=g_inline;Y.style.textAlign="center";Y.dir=uid_json.settings.template.rtl;c.appendChild(Y);a=document.getElementById(Y.id);Y.onclick=b.ContinueDiv_OnClick;
a.innerHTML='<span style="'+q.status_continue.css+'">'+q.status_continue.text+"</span>"}else{var U=b.CreateHTMLElement("div");c.appendChild(U);var fa=document.getElementById(U.id),R=uid_json.resources.icons.continue_anim.imagedim.split("|");fa.style.width=R[0]+"px";fa.style.height=R[1]+"px";fa.style.position="absolute";fa.style.top=Z+"px";fa.style.left=uid_json.settings.template.rtl=="ltr"?A-(z+5)+"px":"5px";fa.style.visibility="visible";fa.style.display=g_inline;var la=new clsButtonAnimated("StatusBar");
la.onClick=b.ContinueDiv_OnClick;if(la.Initialize(fa,g_objRIL.ImageList.continue_anim,q.status_continue.text,uid_json.psim.layout.specs.cont)==false)throw"Error @ ME.ContinueButton.Initialize";a=la.Button}var K=n.msg_cord.split("|"),ha=new Number(K[3]),ja=new Number(K[1]),ia=new Number(K[0]),ba=b.CreateHTMLElement("div");ba.style.position="absolute";ba.style.top=ja+"px";ba.style.left=uid_json.settings.template.rtl=="ltr"?ia+"px":z+5+ia+"px";ba.style.width=A-(z+15)+"px";ba.style.height=ha+"px";ba.style.visibility=
"visible";ba.style.display=g_inline;ba.style.overflowX="hidden";ba.style.overflowY="hidden";ba.dir=uid_json.settings.template.rtl;c.appendChild(ba);e=document.getElementById(ba.id);if(d(c)==false)throw"Error @ DisableSelection";}catch(ca){p=false,b.Log("CreateStatus",LOG.EXCEPTION,"",ca)}if(p==false)throw"Error @ CreateStatus";b.Hide()}catch(aa){u=false,b.Log("Create",LOG.EXCEPTION,"",aa)}return u};this.Stop=function(){var a=true;try{if(b.ResetAlpha()==false)throw"Error @ ME.ResetAlpha";if(b.Hide()==
false)throw"Error @ ME.Hide";}catch(c){a=false,b.Log("Stop",LOG.EXCEPTION,"",c)}return a};this.Show=function(d){var e=true;try{if(c==null)return true;c.style.display=g_inline;var f=null;a!=null&&(f=a);if(f!=null)f.style.display=d==true?g_inline:"none";if(f!=null&&g_objCCMover!=null&&d==true){try{g_ContinueButton=f,f.focus()}catch(n){}var k=f.getBoundingClientRect();if(g_objCCMover.MoveForRegion(k)==false)throw"Error @ g_objCCMover.MoveForRegion";}g==true&&(b.ResetAlpha(),q=setTimeout(b.ReduceAlpha,
8E3))}catch(p){e=false,b.Log("Show",LOG.EXCEPTION,"",p)}return e};this.Hide=function(){var a=true;try{if(c==null)return true;c.style.display="none"}catch(d){a=false,b.Log("Hide",LOG.EXCEPTION,"",d)}return a};this.SetBusy=function(a){var d=true;try{if(c==null)return true;c.style.cursor=a;e.style.cursor=a}catch(f){d=false,b.Log("SetBusy",LOG.EXCEPTION,"",f)}return d};this.SetMessage=function(a){var c=true;try{if(e==null)return true;if(a=="")e.innerHTML="";else{var d="";n.css!=void 0&&(n.css.ta!=void 0&&
(d+=";text-align: "+n.css.ta),n.css.va!=void 0&&(d+=";vertical-align: "+n.css.va));e.innerHTML="<table width='100%'  height='100%' border='0'><tr><td width='100%' style='"+d+"'>"+a+"</td></tr></table>"}}catch(f){c=false,b.Log("SetMessage",LOG.EXCEPTION,"",f)}return c};this.ReduceAlpha=function(){try{if(p>0.3){p-=0.03;var a="rgba("+k+","+o+","+v+","+p+")";try{c.style.backgroundColor=a}catch(d){}q=setTimeout(b.ReduceAlpha,50)}else b.IncreaseAlpha()}catch(e){b.Log("ReduceAlpha",LOG.EXCEPTION,"",e),b.ResetAlpha()}};
this.IncreaseAlpha=function(){try{if(p<1){p+=0.03;var a="rgba("+k+","+o+","+v+","+p+")";try{c.style.backgroundColor=a}catch(d){}q=setTimeout(b.IncreaseAlpha,50)}else b.ResetAlpha()}catch(e){b.Log("IncreaseAlpha",LOG.EXCEPTION,"",e),b.ResetAlpha()}};this.ResetAlpha=function(){var a=true;try{clearTimeout(q);q=0;p=1;try{c.style.backgroundColor=n.css.bgc}catch(d){}}catch(e){a=false,b.Log("ResetAlpha",LOG.EXCEPTION,"",e)}return a}};
function clsNotes(d){clsPlayerBase.call(this,"clsNotes");var b=this,c;this.BackColor=this.BorderWidth=this.BorderStyle=this.BorderColor="";this.Height=this.Width=this.Left=0;this.Top=8;this.Available=true;this.Create=function(e){var a=true;try{if(b.Available===false)return a;if(e==null)throw"holderDiv not supplied";var f=b.CreateTextHolder(d);f.style.position="absolute";f.style.left=b.Left+"px";f.style.height=b.Height+"px";f.style.width=b.Width+"px";f.style.top=b.Top+"px";f.style.overflowY="auto";
f.style.zIndex=ZINDEX.TEMPLATE;f.style.display=g_inline;f.style.visibility="visible";f.dir=uid_json.settings.template.rtl;e.appendChild(f);c=document.getElementById(f.id);c.onclick=function(){if(g_objTR.FocusEventReceiverDiv()==false)throw"Error @ g_objTR.FocusEventReceiverDiv";};c.onscroll=function(){if(g_objTR.FocusEventReceiverDiv()==false)throw"Error @ g_objTR.FocusEventReceiverDiv";};b.Initialized=PLAYSTATE.INITIALIZED}catch(n){a=false,b.Log("Create",LOG.EXCEPTION,"",n)}return a};this.SetMessage=
function(d){var a=true;try{if(b.Available===false)return a;c.innerHTML="<table border=0 width=100% height=100%><tr><td valign=middle>"+d+"</td></tr></table>"}catch(f){a=false,b.Log("SetMessage",LOG.EXCEPTION,"",f)}return a};this.Show=function(){var d=true;try{if(b.Available===false)return d;c.style.display=g_inline}catch(a){d=false,b.Log("Show",LOG.EXCEPTION,"",a)}return d};this.Hide=function(){var d=true;try{if(b.Available===false)return d;c.style.display="none"}catch(a){d=false,b.Log("Hide",LOG.EXCEPTION,
"",a)}return d}}
clsResultIconDisplayer=function(){function d(){try{if(b.Hide(),b.onHide!=null)b.onHide()}catch(a){bRet=false,b.Log("AutoHide",LOG.EXCEPTION,"",a)}}clsPlayerBase.call(this,"clsResultIconDisplayer");var b=this,c=null,e;this.Duration=1E3;this.onHide=this.WrongImage=this.CorrectImage=null;this.Create=function(a){var d=true;try{if(a==null||a==void 0)throw"holderDiv is not supplied";if(b.CorrectImage==void 0)throw"ME.CorrectImage is not supplied";if(b.WrongImage==void 0)throw"ME.WrongImage is not supplied";var e=
b.CreateHTMLElement("img");e.style.left="0px";e.style.top="0px";e.style.visibility="visible";e.style.display=g_inline;e.style.zIndex=ZINDEX.RESULTICON;a.appendChild(e);c=document.getElementById(e.id);c.src=b.CorrectImage.src;b.Hide()}catch(g){d=false,b.Log("Create",LOG.EXCEPTION,"",g)}return d};this.Hide=function(){try{clearTimeout(e),e=0,c.style.display="none"}catch(a){bRet=false,b.Log("Hide",LOG.EXCEPTION,"",a)}};this.Show=function(a,f,n){try{clearTimeout(e);e=0;var g="",g=n==true?b.CorrectImage.src:
b.WrongImage.src;if(c!=null)c.src=g,c.style.left=a+"px",c.style.top=f+"px",c.style.display=g_inline;e=setTimeout(d,b.Duration)}catch(k){bRet=false,b.Log("Show",LOG.EXCEPTION,"",k)}}};
clsSlider=function(){function d(d){var p=true;try{var q=Number(f.length)-1,E=b.CreateHTMLElement("DIV");E.style.width=e+"px";E.style.height=a+"px";E.style.left=Math.round(parseInt(c.style.width)/2-e/2)+"px";E.style.top=b.Top+"px";E.style.visibility="visible";E.style.display=g_inline;c.appendChild(E);o=E.id;$("#"+o).slider({orientation:"vertical",range:"min",min:k,max:g,value:n,step:1,create:function(){if(d==false)return true;var a=g-k;for(i=0;i<=q;i++){var c=(f[q-i]-k)*100/a+"%",e=b.CreateHTMLElement("SPAN");
e.style.cssText=g_GetCSSForTD(uid_json.psim.layout.specs.slider_rulertext.css);e.style.bottom=c;e.style.cursor="pointer";e.style.margin="-.6em";e.style.position="absolute";e.style.left="1.6em";e.style.display=g_inline;e.style.visibility="visible";e.dir=uid_json.settings.template.rtl;e.innerHTML=f[q-i]+"%";e.onclick=function(){var a=parseInt(this.innerHTML);b.onSlideStop(a);return false};$(this).append(e)}},slide:function(a,c){var d=Math.ceil(c.value);b.onSlide(d)},stop:function(a,c){if(b.onSlideStop!=
null){var d=Math.ceil(c.value);b.onSlideStop(d);return false}}})}catch(u){p=false,b.Log("CreateSlider",LOG.EXCEPTION,"",u)}return p}clsPlayerBase.call(this,"clsSlider");var b=this,c=null,e=0,a=0,f="",n=0,g=100,k=0;this.Top=8;this.onSlide=null;var o="";this.SetValue=function(a){var c=true;try{$("#"+o).slider("value",a)}catch(d){c=false,b.Log("SetValue",LOG.EXCEPTION,"",d)}return c};this.Create=function(o,p,q,E,u,B,A,G,D){var r=true;try{if(c=o,e=p,a=q,f=E,n=u,A!=void 0&&(g=A),B!=void 0&&(k=B),d(G,D)===
false)throw"Error @ CreateSlider";}catch(H){r=false,b.Log("Create",LOG.EXCEPTION,"",H)}return r}};
clsCanvas=function(d){function b(){try{if(g.onmouseover!=null)g.onmouseover()}catch(a){g.Log("m_CanvasOnMouseOver",LOG.EXCEPTION,"for > "+f,a)}}function c(){try{if(g.onkeydown!=null)g.onkeydown()}catch(a){g.Log("m_CanvasOnKeyDown",LOG.EXCEPTION,"for > "+f,a)}}function e(a){try{if(g.onclick!=null)g.onclick(a)}catch(b){g.Log("m_CanvasOnClick",LOG.EXCEPTION,"for > "+f,b)}}function a(){try{if(g.onmouseout!=null)g.onmouseout()}catch(a){g.Log("m_CanvasOnMouseOut",LOG.EXCEPTION,"for > "+f,a)}}clsPlayerBase.call(this,
"clsCanvas");var f="";d!=void 0&&(f=d);var n=null,g=this,k=null;this.obj=null;this.height=this.width=0;this.id="tempID";this.onkeydown=this.onclick=this.onmouseout=this.onmouseover=this.style=null;this.clearRect=function(){try{if(BROWSER.LEGACY==true)try{n.style.display="none",n.style.visibility="hidden"}catch(a){g.Log("hide",LOG.EXCEPTION,"for > "+f,a)}n.clearRect()}catch(b){g.Log("clearRect",LOG.EXCEPTION,"for > "+f,b)}};this.getBoundingClientRect=function(){var a=null;try{a=n.getBoundingClientRect()}catch(b){g.Log("getBoundingClientRect",
LOG.EXCEPTION,"for > "+f,b)}return a};this.focus=function(){try{n.focus()}catch(a){g.Log("focus",LOG.EXCEPTION,"for > "+f,a)}};this.getContext=function(a){try{return BROWSER.LEGACY==false&&(k=n.getContext(a)),g}catch(b){g.Log("getContext",LOG.EXCEPTION,"for > "+f,b)}};this.setDimensions=function(a,b){try{BROWSER.LEGACY==true?(n.style.width=a+"px",n.style.height=b+"px"):(n.width=a,n.height=b),g.width=a,g.height=b}catch(c){g.Log("setDimensions",LOG.EXCEPTION,"for > "+f,c)}};this.drawImage=function(a,
b,c,d,e,o,A,G,D){var r=true;try{if(BROWSER.LEGACY==false)return typeof a!="string"&&a!=null&&k.drawImage(a,b,c,d,e,o,A,G,D),true;n.style.background='url("'+a.src+'") -'+b+"px -"+c+"px";if(G!=void 0&&D!=void 0&&(d!=G||e!=D))n.style.backgroundSize=G+"px "+D+"px",n.style.filter="progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand')",n.filters.item(0).M11*=1,n.filters.item(0).M12*=1,n.filters.item(0).M21*=1,n.filters.item(0).M22*=1,d!=G&&(n.filters.item(0).M11*=G/d),e!=D&&(n.filters.item(0).M22*=
D/e);if(o!=void 0&&o!=0)n.style.left=o+"px",n.style.top=A+"px";try{n.style.display=g_inline,n.style.visibility="visible"}catch(H){g.Log("show",LOG.EXCEPTION,"for > "+f,H)}}catch(C){r=false,g.Log("drawImage",LOG.EXCEPTION,"for > "+f,C)}return r};try{n=BROWSER.LEGACY==true?g.CreateHTMLElement("div"):g.CreateHTMLElement("canvas"),g.obj=n,g.id=n.id,g.style=n.style,n.onmouseover=b,n.onmouseout=a,n.onclick=e,n.onkeydown=c}catch(o){g.Log("Create",LOG.EXCEPTION,"for > "+f,o)}};
function clsWorkflowRenderer(){function d(){try{if(e.onWFShapeClicked!=void 0)e.onWFShapeClicked(n[this.id])}catch(a){e.Log("ShapeOnClick",LOG.EXCEPTION,"",a)}}function b(){g_objTR.Tooltip.Show(this,this.TooltipText)}function c(){g_objTR.Tooltip.Hide()}clsPlayerBase.call(this,"clsWorkflowRenderer");var e=this,a=null,f=null,n={};this.onWFShapeClicked=null;this.Height=this.Width=300;this.Initialize=function(a){f=a};this.Create=function(g){var k=true;try{var o=e.CreateHTMLElement("DIV");f.appendChild(o);
o.style.display=g_inline;o.style.visibility="visible";a=document.getElementById(o.id);a.style.background='url("'+g.ImageSrc+'")';var v=g.Dimension.split("|");e.Width=Number(v[0]);e.Height=Number(v[1]);a.style.width=e.Width+"px";a.style.height=e.Height+"px";for(v=0;v<g.Shapes.length;v++){var p=new clsRect(g.Shapes[v].cord),o=e.CreateHTMLElement("DIV");o.style.display=g_inline;o.style.visibility="visible";o.style.left=p.Left+"px";o.style.top=p.Top+"px";o.style.width=p.Width+"px";o.style.height=p.Height+
"px";g.Shapes[v].aty!=ATTACHMENTTYPE.NONE&&g_objGS.General.ActiveMode!=MODETYPE.TEST?(o.style.zIndex=ZINDEX.INTWORKFLOW,o.style.cursor="pointer"):o.style.zIndex=ZINDEX.NINTWORKFLOW;if(g.Shapes[v].nt!="")o.TooltipText=g.Shapes[v].nt,o.onmouseover=b,o.onmouseout=c;n[o.id]={AttachmentType:g.Shapes[v].aty,Attachment:g.Shapes[v].atc};if(g_objGS.General.ActiveMode!=MODETYPE.TEST)o.onclick=d;a.appendChild(o)}}catch(q){k=false,e.Log("Create",LOG.EXCEPTION,"",q)}return k};this.AdjustData=function(){var b=
true;try{var c=(parseFloat(f.style.width.replace("px",""))-e.Width)/2;c<0&&(c=0);a.style.left=c+"px"}catch(d){b=false,e.Log("AdjustData",LOG.EXCEPTION,"",d)}return b}}
function clsVariationRenderer(){clsPlayerBase.call(this,"clsVariationRenderer");var d=this,b=null,c=null;this.Options={};this.TMOptionsVisited={};this.onVariationOptionClicked=null;this.Initialize=function(d,a){b=d;c=a};this.Reset=function(){d.TMOptionsVisited={}};this.Create=function(e,a){var f=true;try{var n=d.CreateHTMLElement("div");n.style.display=g_inline;n.style.visibility="visible";n.style.padding="30px";n.style.position="relative";var g=true;g_objGS.General.ActiveMode==MODETYPE.SHOW&&g_objGS.General.VPathSetForSM==
1?g=false:g_objGS.General.ActiveMode==MODETYPE.GUIDE&&g_objGS.General.VPathSetForGM==1?g=false:g_objGS.General.ActiveMode==MODETYPE.TEST&&g_objGS.General.VPathSetForTM==1&&(g=false);var k=0;uid_json.settings.general.lastoptioncolorchange!=void 0&&(k=Number(uid_json.settings.general.lastoptioncolorchange));for(var o=false,v=0;v<a.Options.length;v++){o=false;v>=a.Options.length-k&&(o=true);var p,q=a.Options[v],E=g,u=o,B=null;try{B=d.CreateHTMLElement("a");B.style.display=g_inline;B.style.visibility=
"visible";B.style.position="relative";B.innerHTML=q.PlainCaption;d.Options[B.id]=q;var A=true;if(g_objGS.General.ActiveMode==MODETYPE.TEST)for(x in A=false,d.TMOptionsVisited){if(d.TMOptionsVisited[x].TPSID==q.TPSID&&d.TMOptionsVisited[x].Value==q.Value){A=true;break}}else if(q.Default=="1"||E==true)A=false;A==false?(BROWSER.LEGACY==false?u?B.setAttribute("class","button_last"):B.setAttribute("class","button_active"):(uid_json.psim.layout.specs.variationoption_active.css.fc="#00f",B.style.cssText=
g_GetCSSForTD(uid_json.psim.layout.specs.variationoption_active.css)),B.onclick=d.onOptionOnClick):BROWSER.LEGACY==false?B.setAttribute("class","button_disabled"):(uid_json.psim.layout.specs.variationoption_disabled.css.fc="#000",B.style.cssText=g_GetCSSForTD(uid_json.psim.layout.specs.variationoption_disabled.css))}catch(G){B=null,d.Log("CreateOptionButton",LOG.EXCEPTION,"",G)}p=B;n.appendChild(p)}b.innerHTML="";p=d.CreateHTMLElement("span");p.style.display=g_inline;p.style.visibility="visible";
p.style.position="relative";p.innerHTML=e;b.appendChild(p);uid_json.settings.general.mvariationsonfooter=="1"?(c.innerHTML="",c.style.textAlign="center",c.appendChild(n)):b.appendChild(n)}catch(D){f=false,d.Log("Create",LOG.EXCEPTION,"",D)}return f};this.onOptionOnClick=function(){try{if(d.onVariationOptionClicked!=void 0)g_objGS.General.ActiveMode==MODETYPE.TEST&&uid_json.settings.general.mvariationsonfooter=="1"&&(d.TMOptionsVisited[this.id]=d.Options[this.id]),d.Options[this.id].EndCompleted=false,
d.onVariationOptionClicked(d.Options[this.id])}catch(b){d.Log("onOptionOnClick",LOG.EXCEPTION,"",b)}}}
clsCuecard=function(){function d(a){try{if(g.onBusy!=null)g.onBusy(a)}catch(b){}}function b(a){var b=true;try{var c=Number(String(a.style.width).replace("px","")),e=Math.round(parseInt(a.style.height)),o=n[f.cuecard.fw.h5d],p=0,r=0,q=0,v=0,J=String(f.cuecard.spec.cord);if(J!=""&&J!=void 0)var I=J.split("|"),p=Number(I[0]),r=Number(I[1]),q=Number(I[2]),v=Number(I[3]);m_CuePosition=f.cuecard.spec.position;I[3].indexOf("%")!=-1&&(hp=Number(I[3].replace("%","")),v=Math.ceil(e*(hp/100)));I[2].indexOf("%")!=
-1&&(wp=Number(I[2].replace("%","")),q=Math.ceil(c*(wp/100)));switch(m_CuePosition){case FWPOSITION.MIDDLECENTER:p=Math.ceil((c-q)/2);r=Math.ceil((e-v)/2);break;case FWPOSITION.TOPCENTER:p=Math.ceil((c-q)/2);r=0;break;case FWPOSITION.TOPRIGHT:p=Math.ceil(c-q);r=0;break;case FWPOSITION.MIDDLERIGHT:p=Math.ceil(c-q);r=Math.ceil((e-v)/2);break;case FWPOSITION.BOTTOMRIGHT:p=Math.ceil(c-q);r=Math.ceil(e-v);break;case FWPOSITION.BOTTOMCENTER:p=Math.ceil((c-q)/2);r=Math.ceil(e-v);break;case FWPOSITION.BOTTOMLEFT:p=
0;r=Math.ceil(e-v);break;case FWPOSITION.MIDDLELEFT:p=0;r=Math.ceil((e-v)/2);break;case FWPOSITION.TOPLEFT:r=p=0}var L=n[f.cuecard.fw.h5d].imagedim;if(L!=void 0)L.split("|");else throw"cuecard_image_dimension not defined";k=new clsFloatingWindow("cuecard");k.Left=Number(p);k.Top=Number(r);k.Width=Number(q);k.Height=Number(v);k.BaseImage=g.FWBaseImage;k.ParentWidth=c;k.ParentHeight=e;k.IsFloating=f.cuecard.fw.floating=="0"?false:true;k.ContentHeaderRequired=uid_json.settings.cuecard.clusterselectioncombobox!=
void 0&&uid_json.settings.cuecard.clusterselectioncombobox=="1"?true:false;k.FooterRequired=f.cuecard.fw.footer=="0"?false:true;if(k.FooterRequired)k.ContentBody2Required=true;k.EnableEsc=false;k.FWData=o;k.CloseRequired=f.cuecard.fw.close=="0"?false:true;k.ZIndex=ZINDEX.CUECARD;k.IsResizable=f.cuecard.fw.resizable=="0"?false:true;if(k.Create(a)==false)throw"Error @ m_fwCuecard.Create";k.ContentBody.style.fontFamily=uid_json.settings.general.defaultfontfamilyefx;k.ContentBody.style.fontSize=uid_json.settings.general.defaultfontsizeefx;
k.onHide=function(){g.Visible=false;g_objTR.UIPSIM.Controls.FCC.SetState(BUTTONSTATE.NORMAL)};k.onShow=function(){g.Visible=true};k.onBusy=d;k.Hide();g.ContentBody=k.ContentBody;g.ContentBody2=k.ContentBody2;g.StepDetails=k.StepDetails;if(f.cuecard.spec.header!=void 0)k.HeaderCSS=f.cuecard.spec.header.css;if(f.cuecard.spec.body!=void 0)k.BodyCSS=f.cuecard.spec.body.css;if(f.cuecard.spec.footer!=void 0)k.FooterCSS=f.cuecard.spec.footer.css}catch(N){b=false,g.Log("MakeFloating",LOG.EXCEPTION,"",N)}return b}
function c(a){var b=true;try{q=g.GetUniqueID();var c="<table border='0' cellspacing='0' cellpadding='0' width='100%'>";c+="<tr>";c+="<td valign='top' style=\""+g_GetCSSForTD(uid_json.psim.layout.specs.cuecard.contentheader.labelstyle.css)+'" >'+messages_json.psim.cuecard.jump_to.text+"</td>";c+="<td valign='top' style=\""+g_GetCSSForTD(uid_json.psim.layout.specs.cuecard.contentheader.groupcomboboxstyle.css)+'" >';c+="<select id='"+q+"' onchange=\"LoadStep(this.options[this.selectedIndex].getAttribute('resloc'),this.value)\" style='width:98%;outline:0px solid lightgray;border:1px solid lightgray;' onclick='StopClickOfCombobox(event)' >";
for(var d in a.Tasks)if(a.Tasks[d].TaskType==TASKTYPE.PROCESS){var e=a.Tasks[d];for(iStep in e.Steps){var f=e.Steps[iStep];if(f.FrameType==FRAMETYPE.CLUSTER&&f.Visible!=false&&f.Steps.length>0)for(i in f.Steps)if(f.Steps[i].Visible==true){c+="<option resloc='"+e.ResLoc+"' value='"+f.Steps[i].StepIndex+"'>"+f.Caption+"</option>";break}}}c+="</select></td></tr>";c+="</table>";g.ContentHeader.innerHTML=c}catch(n){b=false,g.Log("RenderGroupStepCombobox",LOG.EXCEPTION,"",n)}return b}function e(a){var b=
true;try{var c;c=messages_json.psim.cuecard!=void 0?messages_json.psim.cuecard:messages_json.psim.canvas.cuecard.common;var d="<div id='dvTestResultAtTM' width='99%' style='display:none'>Result</div>";d+="<table  id='"+v+"'  width=100%>";var e="";d+="<tr><td style='"+g_GetCSSForTD(uid_json.psim.layout.holders.cc_tm_commondescription.css)+"' >"+c.cc_tm_commondescription.text+"</td></tr>";d+="<tr><td style='"+g_GetCSSForTD(uid_json.psim.layout.holders.cc_tm_commondescription.css)+"'>"+a.TMDescription+
"</td></tr>";for(var f in a.Tasks)a.Tasks[f].TaskType==TASKTYPE.PROCESS&&a.Tasks[f].ProcessTestData!=""&&(d+="<tr style='display:none' id='tr_testdata_"+a.Tasks[f].ResLoc+"'><td>"+a.Tasks[f].ProcessTestData.HTMLDecode()+"</td></tr>"),a.Tasks[f].TMDescription!=""&&(d+="<tr style='display:"+e+"'  id='tr_"+a.Tasks[f].ResLoc+"'><td>"+a.Tasks[f].TMDescription+"</td></tr>",e="none");d+="</table>";m_sTMDesc=d}catch(n){b=false,m_sTMDesc="",g.Log("RenderTMDesc",LOG.EXCEPTION,"",n)}return b}function a(a,b){try{if(g.onStepLoadRequested==
null)throw"onStepLoadRequested is null";g.onStepLoadRequested(a,b)}catch(c){bRet=false,g.Log("m_objCuecardRenderer_onStepLoadRequested",LOG.EXCEPTION,"",c)}}clsPlayerBase.call(this,"clsCuecard");var f=uid_json.psim.layout.h5dobjects,n=uid_json.resources.h5dialogs,g=this,k=null,o=null,v=g.GetUniqueID(),p=null,q="";this.StepDetails=this.ContentHeader=this.ContentBody2=this.ContentBody=null;this.FWBaseImage={};this.WrongIcon=this.CorrectIcon=this.AudioIcon=null;this.Visible=true;this.onBusy=this.onStepLoadRequested=
this.StepDetailsSpan=null;this.Available=true;this.Create=function(a,c,d,e,n){var o=true;try{if(g.Available===false)return o;if(uid_json.settings.template.fixedcuecard=="1")k=new clsCuecardFixed,k.Create(a,c,d,e,n);else if(f.cuecard!=void 0&&b(a)==false)throw"Error @ MakeFloating";g.StepDetailsSpan=n!=null?n:k.StepDetailsSpan;g.StepDetailsSpan.onclick=function(){try{var a;a=messages_json.psim.cuecard!=void 0?messages_json.psim.cuecard:messages_json.psim.canvas.cuecard.common;if(g.ContentBody.style.display==
"none"){g.StepDetailsSpan.innerHTML=a.hide_details.text;g.StepDetailsSpan.style.cssText=g_GetCSSForTD(uid_json.psim.layout.holders.cc_hide_details.css);g.ContentBody.style.display=g_inline;g.ContentBody2.style.display="none";var b;switch(g_objGS.General.ActiveMode){case MODETYPE.SHOW:b="title_sm";break;case MODETYPE.GUIDE:b="title_gm";break;case MODETYPE.TEST:b="title_tm2"}if(a[b]!=void 0)g.Title=a[b].text}else g.StepDetailsSpan.innerHTML=a.show_details.text,g.StepDetailsSpan.style.cssText=g_GetCSSForTD(uid_json.psim.layout.holders.cc_show_details.css),
g.ContentBody.style.display="none",g.ContentBody2.style.display=g_inline,g.Title='<span style="'+a.title_tm.css+'">'+a.title_tm.text+"</span>";if(g.SetCaption(g.Title)==false)throw"Error @ m_fwCuecard.SetCaption";}catch(c){g.Log("m_StepDetails_onClick",LOG.EXCEPTION,"",c),g_CriticalError()}};g.ContentBody=k.ContentBody;g.ContentBody2=k.ContentBody2;g.StepDetails=k.StepDetails;g.ContentHeader=k.ContentHeader;g.ContentBody.onscroll=function(){if(g_objTR.FocusEventReceiverDiv()==false)throw"Error @ ME.FocusEventReceiverDiv";
};g.ContentBody2.onscroll=function(){if(g_objTR.FocusEventReceiverDiv()==false)throw"Error @ ME.FocusEventReceiverDiv";}}catch(p){o=false,g.Log("Create",LOG.EXCEPTION,"",p)}return o};this.Show=function(a){try{if(g.Available===false)return true;k.Show(a,false);if(o.AutoScrollCuecardToViewPlayingStep()==false)throw"Error @ m_objCuecardRenderer.AutoScrollCuecardToViewPlayingStep";g.Visible=true}catch(b){bRet=false,g.Log("Show",LOG.EXCEPTION,"",b)}};this.Hide=function(){try{if(g.Available===false)return true;
k.Hide!=void 0&&k.Hide();g.Visible=false}catch(a){bRet=false,g.Log("Hide",LOG.EXCEPTION,"",a)}};this.SetCaption=function(a){var b=true;try{if(g.Available===false)return b;k.SetCaption(a)}catch(c){b=false,g.Log("SetCaption",LOG.EXCEPTION,"",c)}return b};this.ChangeParent=function(a){var b=true;try{if(g.Available===false)return b;if(k.ChangeParent!==void 0&&k.ChangeParent(a)==false)throw"error @ m_fwCuecard.ChangeParent(newParent) ";}catch(c){b=false,g.Log("ChangeParent",LOG.EXCEPTION,"",c)}return b};
this.HighlightStep=function(a,b,c){var d=true;try{if(g.Available===false)return d;o!=null&&(d=o.HighlightStep(a,b,c))}catch(e){d=false,g.Log("HighlightStep",LOG.EXCEPTION,"",e)}return d};this.ShowTMDescForProcess=function(a){var b=true;try{if(g.Available===false)return b;var c=document.getElementById(v).childNodes[0].childNodes,d;for(d in c)if(!(c[d].id==void 0||c[d].id==""))c[d].style.display=c[d].id=="tr_"+a?g_inline:"none",c[d].style.display=c[d].id=="tr_testdata_"+a?g_inline:"none"}catch(e){b=
false,g.Log("ShowTMDescForProcess",LOG.EXCEPTION,a,e)}return b};this.DisplayResultIcon=function(a,b,c){var d=true;try{if(g.Available===false)return d;o!=null&&(d=o.DisplayResultIcon(a,b,c))}catch(e){d=false,g.Log("DisplayResultIcon",LOG.EXCEPTION,"",e)}return d};this.Reset=function(){var a=true;try{if(g.Available===false)return a;if(p!=null)p.style.display="none";o!=null&&(a=o.Reset());if(document.getElementById(q)!=void 0)document.getElementById(q).selectedIndex=0}catch(b){a=false,g.Log("ResetResultIcon",
LOG.EXCEPTION,"",b)}return a};this.Freeze=function(a){var b=true;try{if(g.Available===false)return b;o!=null&&(b=o.Freeze(a))}catch(c){g.Log("Freeze",LOG.EXCEPTION,"",c)}return b};this.SetTitle=function(a){var b=true;try{if(g.Available===false)return b;var c;c=messages_json.psim.cuecard!=void 0?messages_json.psim.cuecard:messages_json.psim.canvas.cuecard.common;switch(a){case MODETYPE.SHOW:g.Title=c.title_sm.text;break;case MODETYPE.GUIDE:g.Title=c.title_gm.text;break;case MODETYPE.TEST:g.Title=c.title_tm.text}uid_json.settings.template.fixedcuecard==
"1"&&uid_json.psim.layout.specs.cuecard.fixedepntitle!=void 0&&uid_json.psim.layout.specs.cuecard.fixedepntitle.css!=void 0&&(g.Title+="<br/><span style='"+g_GetCSSForTD(uid_json.psim.layout.specs.cuecard.fixedepntitle.css)+"'>"+efx_json.title+"</span>");if(g.SetCaption(g.Title)==false)throw"Error @ m_fwCuecard.SetCaption";if(uid_json.settings.mode_test.cuecardbehavior==CCBEHAVIOURTM.SHOWALWAYS)g.StepDetailsSpan.innerHTML=c.show_details.text}catch(d){b=false,g.Log("SetTitle",LOG.EXCEPTION,"",d)}return b};
this.ManageView=function(a){try{if(g.Available===false)return true;switch(a){case MODETYPE.SHOW:g.HideStepDetails();g.ShowCueCard();k.ShowHideContentHeader(true);break;case MODETYPE.GUIDE:g.HideStepDetails();g.ShowCueCard();k.ShowHideContentHeader(true);break;case MODETYPE.TEST:switch(Number(uid_json.settings.mode_test.cuecardbehavior)){case CCBEHAVIOURTM.SHOWALWAYS:g.ShowStepDetails();a=false;uid_json.settings.mode_test.displaycuecardbydefault!=void 0&&uid_json.settings.mode_test.displaycuecardbydefault==
"1"&&(a=true);a?g.ShowCueCard():g.ShowTestDescription();break;case CCBEHAVIOURTM.SHOWNEVER:g.HideStepDetails();g.ShowTestDescription();break;case CCBEHAVIOURTM.SHOWONCOMPLETE:g.HideStepDetails();g.ShowTestDescription();break;case CCBEHAVIOURTM.SHOWCCONLY:g.HideStepDetails(),g.ShowCueCard()}k.ShowHideContentHeader(false)}}catch(b){g.Log("ManageView",LOG.EXCEPTION,"",b)}};this.ShowCueCard=function(){var a=true;try{if(g.Available===false)return a;g.ContentBody2.style.display="none";g.ContentBody.style.display=
g_inline;var b;b=messages_json.psim.cuecard!=void 0?messages_json.psim.cuecard:messages_json.psim.canvas.cuecard.common;g.StepDetailsSpan.innerHTML=b.hide_details.text;var c;switch(g_objGS.General.ActiveMode){case MODETYPE.SHOW:c="title_sm";break;case MODETYPE.GUIDE:c="title_gm";break;case MODETYPE.TEST:c="title_tm2"}g.Title=b[c].text;uid_json.settings.template.fixedcuecard=="1"&&uid_json.psim.layout.specs.cuecard.fixedepntitle!=void 0&&uid_json.psim.layout.specs.cuecard.fixedepntitle.css!=void 0&&
(g.Title+="<br/><span style='"+g_GetCSSForTD(uid_json.psim.layout.specs.cuecard.fixedepntitle.css)+"'>"+efx_json.title+"</span>");if(g.SetCaption(g.Title)==false)throw"Error @ m_fwCuecard.SetCaption";}catch(d){a=false,g.Log("ShowCueCard",LOG.EXCEPTION,"",d)}return a};this.ShowTestDescription=function(){var a=true;try{if(g.Available===false)return a;g.ContentBody2.style.display=g_inline;g.ContentBody.style.display="none";var b;b=messages_json.psim.cuecard!=void 0?messages_json.psim.cuecard:messages_json.psim.canvas.cuecard.common;
g.StepDetailsSpan.innerHTML=b.show_details.text;g.Title='<span style="'+b.title_tm.css+'">'+b.title_tm.text+"</span>";uid_json.settings.template.fixedcuecard=="1"&&uid_json.psim.layout.specs.cuecard.fixedepntitle!=void 0&&uid_json.psim.layout.specs.cuecard.fixedepntitle.css!=void 0&&(g.Title+="<br/><span style='"+g_GetCSSForTD(uid_json.psim.layout.specs.cuecard.fixedepntitle.css)+"'>"+efx_json.title+"</span>");if(g.SetCaption(g.Title)==false)throw"Error @ m_fwCuecard.SetCaption";}catch(c){a=false,
g.Log("ShowTestDescription",LOG.EXCEPTION,"",c)}return a};this.ShowStepDetails=function(){var a=true;try{if(g.Available===false)return a;g.StepDetails.style.display=g_inline}catch(b){a=false,g.Log("ShowStepDetails",LOG.EXCEPTION,"",b)}return a};this.HideStepDetails=function(){var a=true;try{if(g.Available===false)return a;g.StepDetails.style.display="none"}catch(b){a=false,g.Log("HideStepDetails",LOG.EXCEPTION,"",b)}return a};this.Build=function(b){var d=true;try{if(g.Available===false)return d;g.ContentBody.style.fontFamily=
uid_json.settings.general.defaultfontfamilyefx;g.ContentBody.style.fontSize=uid_json.settings.general.defaultfontsizeefx;var n=g.AudioIcon,k=g.CorrectIcon,q=g.WrongIcon,v=uid_json.resources.icons,r=16,H;if(v.cuecard_audio!=void 0&&(H=v.cuecard_audio.imagedim,H!=void 0))var C=H.split("|"),r=Number(C[0]);H=v.cuecard_correct.imagedim;var J=16;H!=void 0&&(C=H.split("|"),J=Number(C[0]));H=v.cuecard_wrong.imagedim;v=16;H!=void 0&&(C=H.split("|"),v=Number(C[0]));o=uid_json.settings.cuecard.treeview===true?
new clsTreeCuecardRenderer:new clsFlatCuecardRenderer;o.BodyColor=f.cuecard.spec.body.css.bgc;o.onStepLoadRequested=a;if(o.Render(b,g.ContentBody,g.ContentBody2,n,r,k,J,q,v)==false)throw"Error @ m_objCuecardRenderer.Render";if(e(b)==false)throw"Error @ RenderTMDesc";if(uid_json.settings.cuecard.clusterselectioncombobox!=void 0&&uid_json.settings.cuecard.clusterselectioncombobox=="1"&&c(b)==false)throw"Error @ RenderGroupStepCombobox";g.ContentBody2.innerHTML=m_sTMDesc;setTimeout(function(){p=document.getElementById("dvTestResultAtTM")},
1E3)}catch(I){d=false,g.Log("Build",LOG.EXCEPTION,"",I)}return d};StopClickOfCombobox=function(a){a.stopPropagation()};this.MoveTo=function(a,b){try{if(g.Available===false)return bRet;k.MoveTo(a,b)}catch(c){bRet=false,g.Log("MoveTo",LOG.EXCEPTION,"",c)}};this.GetBoundingRect=function(){try{return k.GetBoundingRect()}catch(a){g.Log("GetBoundingRect",LOG.EXCEPTION,"",a)}};this.SetResultText=function(a){var b=true;try{if(g.Available===false)return b;p!=null?(p.style.display=g_inline,p.innerHTML="<table border=0 width=100% height=30><tr><td  style='"+
g_GetCSSForTD(uid_json.psim.layout.specs.cuecard.styles_flat.result_text.css)+"'>"+a+"</td></tr></table>"):g.Log("SetResultText",LOG.ERROR,"m_ResultDiv","null")}catch(c){b=false,g.Log("SetResultText",LOG.EXCEPTION,"",c)}return b}};
clsCuecardFixed=function(){var d=this,b=this.StepDetails=this.ContentBody2=this.ContentBody=null,c=null;clsPlayerBase.call(this,"clsCuecardFixed");this.Hide=function(){try{b.parentNode.style.zIndex=ZINDEX.TEMPLATE}catch(c){d.Log("Hide",LOG.EXCEPTION," ",c)}};this.Show=function(c){var a=false;try{if(c!=void 0)b.parentNode.style.zIndex=c}catch(f){a=false,d.Log("Show",LOG.EXCEPTION,"",f)}return a};this.Create=function(e,a,f,n){var g=false;try{var k=d.CreateHTMLElement("DIV");k.style.width=a.Width+"px";
k.style.height=a.Height+"px";k.style.zIndex=ZINDEX.CUECARD;k.style.display=g_inline;k.style.visibility="visible";k.style.left=a.Left+"px";k.style.top=a.Top+"px";e.appendChild(k);b=document.getElementById(k.id);c=f;d.StepDetails=n;k=d.CreateHTMLElement("DIV");k.style.width=a.Width+"px";k.style.height=a.Height-0-0+"px";k.style.display=g_inline;k.style.visibility="visible";k.style.left="0px";k.style.top="0px";k.style.overflowY="auto";b.appendChild(k);d.ContentBody2=document.getElementById(k.id);k=d.CreateHTMLElement("DIV");
k.style.width=a.Width+"px";k.style.height=a.Height-0-0+"px";k.style.display=g_inline;k.style.visibility="visible";k.style.left="0px";k.style.top="0px";k.style.overflowY="auto";b.appendChild(k);d.ContentBody=document.getElementById(k.id);d.ContentBody.onscroll=function(){if(g_objTR.FocusEventReceiverDiv()==false)throw"Error @ ME.FocusEventReceiverDiv";};d.ContentBody2.onscroll=function(){if(g_objTR.FocusEventReceiverDiv()==false)throw"Error @ ME.FocusEventReceiverDiv";}}catch(o){g=false,d.Log("Create",
LOG.EXCEPTION,"",o)}return g};this.SetCaption=function(b){var a=true;try{c.innerHTML=b}catch(f){a=false,d.Log("SetCaption",LOG.EXCEPTION,"",f)}return a};this.GetBoundingRect=function(){var c=null;try{var a=b.parentNode.style.display;b.parentNode.style.display=g_inline;c=b.parentNode.getBoundingClientRect();b.parentNode.style.display=a}catch(f){d.Log("GetBoundingRect",LOG.EXCEPTION,"for > "+m_Name,f)}return c}};
clsTreeCuecardRenderer=function(){function d(a,b,c){var d=true;try{if(a==null||b==1)B.scrollTop=0;else{var e=B.getBoundingClientRect(),f=a.getBoundingClientRect();if(c==void 0||c=="")if(b==1)B.scrollTop=0;else if(f.bottom>e.bottom)B.scrollTop+=f.bottom-e.bottom+20;else{if(f.top<e.top)B.scrollTop=f.bottom-f.top}else if(f.bottom>e.bottom)B.scrollTop+=f.bottom-e.bottom+20;else if(f.top<e.top)B.scrollTop=f.bottom-f.top}}catch(g){d=false,n.Log("ScrollToView",LOG.EXCEPTION,"",g)}return d}function b(){var a=
true;try{for(i in u){var b=document.getElementById(u[i]);if(b!=null)b.style.visibility="hidden"}for(iTsk in g.Tasks)if(g.Tasks[iTsk].Steps!=void 0)for(iStep in g.Tasks[iTsk].Steps)if(c(g.Tasks[iTsk].ResLoc,g.Tasks[iTsk].Steps[iStep])==false)throw"Error @ ResetStep";}catch(d){a=false,n.Log("ResetAllSteps",LOG.EXCEPTION,"",d)}return a}function c(a,b){try{if(b.Visible==false)return true;if(b.FrameType==FRAMETYPE.CLUSTER)for(iStep in b.Steps){if(c(a,b.Steps[iStep])==false)throw"Error @ ResetStep";}else if(objStep=
document.getElementById("str_"+a+"_"+b.StepIndex),objStep!=null){objStep.style.display=b.InMode[g_objGS.General.ActiveMode]==true?g_inline:"none";var d=document.getElementById("sl_"+a+"_"+b.StepIndex),e=document.getElementById("LinkStep_"+a+"_"+b.StepIndex);document.getElementById(a+"_"+b.StepIndex).style.cssText="";switch(g_objGS.General.ActiveMode){case MODETYPE.SHOW:d.innerHTML=b.SlNoSM;e.style.cursor="pointer";break;case MODETYPE.GUIDE:d.innerHTML=b.SlNoGM;e.style.cursor="pointer";break;case MODETYPE.TEST:d.innerHTML=
b.SlNoTM,e.style.cursor="default"}}else G=true}catch(f){n.Log("ResetStep",LOG.EXCEPTION,"",f)}return true}function e(b,c){var d=true;try{var k=null;for(iProc in g.Tasks)if(g.Tasks[iProc].ResLoc==b){k=g.Tasks[iProc];break}if(k.Rendered==true)return true;if(k!=null&&k.TaskType!=TASKTYPE.END){var o,p=k.ResLoc,q="LinkTask_"+p,u="";switch(k.TaskType){case TASKTYPE.PROCESS:u='<span style="'+g_GetCSSForTD(D.task_process_caption.css)+'">'+f(k.Caption)+"</span>";break;case TASKTYPE.QUESTION:u='<a id="'+q+
'" style="'+g_GetCSSForTD(D.task_question_caption.css)+'" onclick="return LoadStep(\''+p+"','1' )\">"+f(k.Caption)+"</a>";break;case TASKTYPE.MANUAL:u='<a id="'+q+'" style="'+g_GetCSSForTD(D.task_manual_caption.css)+'" onclick="return LoadStep(\''+p+"','1' )\">"+f(k.Caption)+"</a>"}g_objLoger.Enable==true&&(u+="&nbsp;&nbsp;&nbsp;"+k.ResLoc);o=v.addItem(u,c);for(iStep in k.Steps)if(a(p,k.Steps[iStep],o)==false)throw"Error @ RenderStep 1 for TPSID="+k.Steps[iStep].TPSID;k.Rendered=true;if(k.NextResLocs!=
null)for(iNrl in k.NextResLocs)if(k.TaskType==TASKTYPE.PROCESS){if(e(k.NextResLocs[iNrl],c)==false)throw"Error @ RenderTask for Resloc="+Tasks[iProc].ResLoc;}else if(k.TaskType==TASKTYPE.QUESTION){var u="<span>"+f(k.Choices[iNrl])+"</span>",B=v.addItem(u,o);if(e(k.NextResLocs[iNrl],B)==false)throw"Error @ RenderTask for Resloc="+Tasks[iProc].ResLoc;}else if(e(k.NextResLocs[iNrl],c)==false)throw"Error @ RenderTask for Resloc="+Tasks[iProc].ResLoc;}}catch(A){d=false,n.Log("RenderTask",LOG.EXCEPTION,
"",A)}return d}function a(b,c,d){var e=true;try{if(c.Visible==false)return true;var g=f(c.Caption);c.StepType==STEPTYPE.INFOSTEP&&(g="<span style='color:"+uid_json.psim.layout.specs.cuecard.info.css.fc+"'>"+g+"</span>");if(c.FrameType==FRAMETYPE.CLUSTER){var k=v.addItem(g,d);for(iStep in c.Steps)if(a(b,c.Steps[iStep],k)==false)throw"Error @ RenderStep 2 for TPSID="+c.Steps[iStep].TPSID;}else{var o=b+"_"+c.StepIndex,k=[],q="imgResult_"+b+"_"+c.StepIndex,B="<img id='"+q+"' border='0' src='"+E+"' style='visibility:hidden' />",
A="LinkStep_"+b+"_"+c.StepIndex,G="sl_"+b+"_"+c.StepIndex,S="str_"+b+"_"+c.StepIndex,O="cursor:default;display:";O+=c.InMode[g_objGS.General.ActiveMode]==true?g_inline+";":"none;";var P="pointer",z="";switch(g_objGS.General.ActiveMode){case MODETYPE.SHOW:z=c.SlNoSM;break;case MODETYPE.GUIDE:z=c.SlNoGM;break;case MODETYPE.TEST:z=c.SlNoTM,P="default"}k.push('<table id="'+S+"\" border='0' cellpadding='0' cellspacing='0' width='100%' style='"+O+"' onclick='return false;' ><tr>");k.push("<td valign='top' width='"+
p+"' onclick='return false' >");k.push(B);k.push("</td>");k.push("<td valign='top'  onclick='return false'>");c.StepType!=STEPTYPE.VARIATION?k.push("<table border='0' cellpadding='0' cellspacing='0' width='100%' id='"+o+"' steptype='"+c.StepType+"' style='"+g_GetCSSForTD(D.steprow.step_normal.css)+"'><tr>"):k.push("<table border='0' cellpadding='0' cellspacing='0' width='100%' id='"+o+"' steptype='"+c.StepType+"' style='"+g_GetCSSForTD(D.steprow.step_variation.css)+"'><tr>");k.push("<td valign='top' style='padding-left:2px;padding-right:10px;color:black;'  onclick='return false' >");
c.StepType!=STEPTYPE.VARIATION?k.push('<span id="'+G+'"  style="'+g_GetCSSForTD(D.steprow.slno_normal.css)+"\" steptype='"+c.StepType+"'>"+z+"</span>"):k.push('<span id="'+G+'"  style="'+g_GetCSSForTD(D.steprow.slno_variation.css)+"\" steptype='"+c.StepType+"'>"+z+"</span>");k.push("</td>");k.push("<td valign='top' style='padding-bottom:10px;color:black;' onclick='return false'>");k.push('<span id="'+A+'" style="color:black;cursor:'+P+';padding-top:0" onclick="return LoadStep(\''+b+"','"+c.StepIndex+
"' )\">");k.push(g);k.push("</span>");k.push("</td>");k.push("</tr></table>");k.push("</td>");k.push("</tr></table>");u.push(q);g_objLoger.Enable==true&&k.push("&nbsp;&nbsp;"+c.TPSID);v.addItem(k.join(""),d,"")}}catch(X){e=false,n.Log("RenderStep",LOG.EXCEPTION,"",X)}return e}function f(a){try{a!=void 0?(a=a.replace(/&lt;/g,"<"),a=a.replace(/&gt;/g,">"),a=a.replace(/&amp;/g,"&")):a=""}catch(b){n.Log("GetHTML",LOG.EXCEPTION,"",b)}return a}clsPlayerBase.call(this,"clsTreeCuecardRenderer");var n=this,
g,k=null,o=null,v,p=16,q=null,E=null,u=null,B=null,A=false,G=false,D=uid_json.psim.layout.specs.cuecard.styles_tree;this.Render=function(a,b,c,d,f,k,o,A){c=true;try{B=b;u=[];g=a;d!=void 0&&f==void 0&&(p=Number(f));if(k!=void 0)q=k.src;if(A!=void 0)E=A.src;v=new jktreeview(b.id);var G='<span style="'+g_GetCSSForTD(D.root_node.css)+'">'+efx_json.title+"</span>",F=v.addItem(G,""),T;for(iProc in a.Tasks)if(a.Tasks[iProc].TaskType==TASKTYPE.START){T=a.Tasks[iProc].NextResLocs[0];break}if(e(T,F)==false)throw"Error @ RenderTask for Resloc="+
Tasks[iProc].ResLoc;v.treetop.draw()}catch(S){c=false,n.Log("Render",LOG.EXCEPTION,"",S)}return c};this.HighlightStep=function(a,b,c){var e=true;try{var f=document.getElementById("sl_"+a+"_"+b),g=document.getElementById(a+"_"+b);g==null&&(v.treetop.expandAll(),g=document.getElementById(a+"_"+b),f=document.getElementById("sl_"+a+"_"+b));if(b!=""&&(g==null||g==void 0))if(c==void 0&&(c=0),c>0)for(c=b;c>0;)if(c-=1,g=document.getElementById(a+"_"+c),f=document.getElementById("sl_"+a+"_"+c),g!=null&&g!=
void 0)break;if(g!=null&&g!=void 0){if(f!=null&&f!=void 0)f.style.cssText=g_GetCSSForTD(D.steprow.slno_highlight.css);g.style.cssText=g_GetCSSForTD(D.steprow.step_highlight.css);if(d(g,b,a)==false)throw"Error @ AutoScrollCuecardToViewCurStep";if(k!=null&&k!=void 0&&g.id!=k.id){if(o!=null&&o!=void 0)o.style.cssText=o.attributes.steptype.value!=STEPTYPE.VARIATION?g_GetCSSForTD(D.steprow.slno_normal.css):g_GetCSSForTD(D.steprow.slno_variation.css);k.style.cssText=k.attributes.steptype.value!=STEPTYPE.VARIATION?
g_GetCSSForTD(D.steprow.step_normal.css):g_GetCSSForTD(D.steprow.step_variation.css)}k=g;o=f}else if(b==1&&a=="")B.scrollTop=0}catch(p){BROWSER.OPERA==false&&(e=false),n.Log("HighlightStep",LOG.EXCEPTION,"",p)}return e};this.AutoScrollCuecardToViewPlayingStep=function(){var a=true;try{if(d(k)==false)throw"Error @ AutoScrollCuecardToViewCurStep";}catch(b){a=false,n.Log("AutoScrollCuecardToViewPlayingStep",LOG.EXCEPTION,"",b)}return a};this.DisplayResultIcon=function(a,b,c){var d=true;try{var e=document.getElementById("imgResult_"+
a+"_"+b);if(e!=null)e.src=c==true?q:E,e.style.visibility="visible"}catch(f){BROWSER.OPERA==false&&(d=false),n.Log("DisplayResultIcon",LOG.EXCEPTION,"",f)}return d};this.Reset=function(){var a=true;try{if(k!=null&&k!=void 0)k.style.cssText=k.attributes.steptype.value!=STEPTYPE.VARIATION?g_GetCSSForTD(D.steprow.step_normal.css):g_GetCSSForTD(D.steprow.step_variation.css);if(o!=null&&o!=void 0)o.style.cssText=o.attributes.steptype.value!=STEPTYPE.VARIATION?g_GetCSSForTD(D.steprow.slno_normal.css):g_GetCSSForTD(D.steprow.slno_variation.css);
k=null;G=false;if(b()==false)throw"Error @ ResetAllSteps";G==true&&(n.Log("Reset",LOG.EXCEPTION,"For some strange reason, the cuecard elements are not accessible, try 2 time","adhoc method, Ignore this error."),b())}catch(c){a=false,n.Log("Reset",LOG.EXCEPTION,"",c)}return a};this.Freeze=function(a){try{A=a}catch(b){n.Log("Freeze",LOG.EXCEPTION,"",b)}return true};LoadStep=function(a,b){try{if(A==false){if(n.onStepLoadRequested==null)throw"onStepLoadRequested not binded";n.onStepLoadRequested(a,b)}}catch(c){n.Log("LoadStep",
LOG.EXCEPTION,"",c)}return false}};
clsFlatCuecardRenderer=function(){function d(a,b,c){var d=true;try{if(a==null||b==1)B.scrollTop=0;else{var e=B.getBoundingClientRect(),g=a.getBoundingClientRect();if(c==void 0||c=="")if(b==1||b==void 0)B.scrollTop=0;else{if(BROWSER.IE==true)if(g.bottom>e.bottom)B.scrollTop+=g.bottom-e.bottom+20;else if(g.top<e.top)B.scrollTop=g.bottom-g.top}else if(g.bottom>e.bottom)B.scrollTop+=g.bottom-e.bottom+20;else if(g.top<e.top)B.scrollTop=g.bottom-g.top}}catch(k){d=false,f.Log("ScrollToView",LOG.EXCEPTION,
"",k)}return d}function b(a,c,d){try{if(c.Visible==false)return true;if(c.FrameType==FRAMETYPE.CLUSTER)for(iStep in c.Steps){if(b(a,c.Steps[iStep],d)==false)throw"Error @ ResetStep";}else{objStep=document.getElementById("str_"+a+"_"+c.StepIndex);if(objStep!=null)objStep.style.display=c.InMode[g_objGS.General.ActiveMode]==true?g_inline:"none";var e=document.getElementById("sl_"+a+"_"+c.StepIndex);switch(g_objGS.General.ActiveMode){case MODETYPE.SHOW:e.innerHTML=c.SlNoSM;break;case MODETYPE.GUIDE:e.innerHTML=
c.SlNoGM;break;case MODETYPE.TEST:e.innerHTML=c.SlNoTM}var g=document.getElementById("ri_"+a+"_"+c.StepIndex),e=document.getElementById("sl_"+a+"_"+c.StepIndex),k=document.getElementById("ss_"+a+"_"+c.StepIndex);if(k!=null&&k!=void 0)k.attributes.steptype.value!=STEPTYPE.VARIATION?(g.style.cssText=g_GetCSSForTD(D.steprow.result_normal.css),e.style.cssText=g_GetCSSForTD(D.steprow.slno_normal.css),k.style.cssText=g_GetCSSForTD(D.steprow.step_normal.css)):(g.style.cssText=g_GetCSSForTD(D.steprow.result_variation.css),
e.style.cssText=g_GetCSSForTD(D.steprow.slno_variation.css),k.style.cssText=g_GetCSSForTD(D.steprow.step_variation.css))}}catch(n){f.Log("ResetStep",LOG.EXCEPTION,"",n)}return true}function c(b){var d=true;try{var g=null;for(iProc in n.Tasks)if(n.Tasks[iProc].ResLoc==b){g=n.Tasks[iProc];break}if(g!=null){if(g.Rendered==true)return true;if(g.TaskType!=TASKTYPE.END){var k=g.ResLoc,o=b="",p="",q="";switch(g.TaskType){case TASKTYPE.PROCESS:G==false&&(o="",b=a(g.Caption),g_objLoger.Enable==true&&(b+="&nbsp;&nbsp;&nbsp;"+
g.ResLoc),p+="<div width='100%'>",p+="<table border='0' cellspacing='0' cellpadding='0' width='100%'>",p+="<tr>",p+="<td valign='top' style=\""+g_GetCSSForTD(D.process.icon.css)+'" >'+o+"</td>",p+="<td valign='top' style=\""+g_GetCSSForTD(D.process.desc.css)+'" >'+b+"</td>",p+="</tr>",p+="</table>");break;case TASKTYPE.QUESTION:o="<img src='"+g_objRIL.ImageList.question.src+"' />";q="LinkTask_"+k;b='<a id="'+q+'" onclick="return LoadStep(\''+k+"','1' )\">"+a(g.Caption)+"</a>";g_objLoger.Enable==true&&
(b+="&nbsp;&nbsp;&nbsp;"+g.ResLoc);p+="<div width='100%'>";p+="<table border='0' cellspacing='0' cellpadding='0' width='100%'>";p+="<tr>";p+="<td valign='top' style=\""+g_GetCSSForTD(D.question.icon.css)+'" >'+o+"</td>";p+="<td valign='top' style=\""+g_GetCSSForTD(D.question.desc.css)+'" >'+b+"</td>";p+="</tr>";p+="</table>";u.push(q);break;case TASKTYPE.MANUAL:o="<img src='"+g_objRIL.ImageList.manual.src+"' />",q="LinkTask_"+k,b='<a id="'+q+'"  onclick="return LoadStep(\''+k+"','1' )\">"+a(g.Caption)+
"</a>",g_objLoger.Enable==true&&(b+="&nbsp;&nbsp;&nbsp;"+g.ResLoc),p+="<div width='100%'>",p+="<table border='0' cellspacing='0' cellpadding='0' width='100%'>",p+="<tr>",p+="<td valign='top' style=\""+g_GetCSSForTD(D.manual.icon.css)+'" >'+o+"</td>",p+="<td valign='top' style=\""+g_GetCSSForTD(D.manual.desc.css)+'" >'+b+"</td>",p+="</tr>",p+="</table>",u.push(q)}v.push(p);if(g.Steps.length!=0){v.push("<table style='width:100%;' border='0' cellpadding='0' cellspacing='0' >");for(iStep in g.Steps)if(e(k,
g.Steps[iStep],n)==false)throw"Error @ RenderStep 1 for TPSID="+g.Steps[iStep].TPSID;v.push("</table>")}v.push("</div><br/>");g.Rendered=true;if(g.NextResLocs!=null)for(iNrl in g.NextResLocs)if(c(g.NextResLocs[iNrl])==false)throw"Error @ RenderTask for Resloc="+Tasks[iProc].ResLoc;}}}catch(B){d=false,f.Log("RenderTask",LOG.EXCEPTION,"",B)}return d}function e(b,c,d){var g=true;try{var k=a(c.Caption);c.StepType==STEPTYPE.INFOSTEP&&c.Visible!=false&&(k="<span style='color:"+uid_json.psim.layout.specs.cuecard.info.css.fc+
"'>"+k+"</span>");if(c.FrameType==FRAMETYPE.CLUSTER&&c.Visible!=false)for(iStep in uid_json.settings.cuecard.clusteratflatcuecard==true&&(v.push('<tr><td style="'+g_GetCSSForTD(D.cluster.css)+"\" colspan='3'>"),v.push(k),v.push("</td></tr>")),c.Steps){if(e(b,c.Steps[iStep],d)==false)throw"Error @ RenderStep 2 for TPSID="+c.Steps[iStep].TPSID;}else if(c.Visible!=false){var n="str_"+b+"_"+c.StepIndex,p="ri_"+b+"_"+c.StepIndex,o="sl_"+b+"_"+c.StepIndex,B="ss_"+b+"_"+c.StepIndex,A="imgResult_"+b+"_"+
c.StepIndex,d="<img id='"+A+"' border='0' src='"+q+"' style='visibility:hidden' />",G="LinkStep_"+b+"_"+c.StepIndex,S='<a  id="'+G+'"  style="cursor:pointer;" onclick="return LoadStep(\''+b+"','"+c.StepIndex+"' )\">"+k+"</a>";g_objLoger.Enable==true&&(S+="&nbsp;&nbsp;"+c.TPSID);b="";switch(g_objGS.General.ActiveMode){case MODETYPE.SHOW:b=c.SlNoSM;break;case MODETYPE.GUIDE:b=c.SlNoGM;break;case MODETYPE.TEST:b=c.SlNoTM}v.push('<tr id="'+n+'">');c.StepType!=STEPTYPE.VARIATION?(v.push('<td id="'+p+'" style="'+
g_GetCSSForTD(D.steprow.result_normal.css)+'" steptype="'+c.StepType+'">'+d+"</td>"),v.push('<td id="'+o+'" style="'+g_GetCSSForTD(D.steprow.slno_normal.css)+'" steptype="'+c.StepType+'">'+b+"</td>"),v.push('<td id="'+B+'" style="'+g_GetCSSForTD(D.steprow.step_normal.css)+'" steptype="'+c.StepType+'">'+S+"</td>")):(v.push('<td id="'+p+'" style="'+g_GetCSSForTD(D.steprow.result_variation.css)+'" steptype="'+c.StepType+'" >'+d+"</td>"),v.push('<td id="'+o+'" style="'+g_GetCSSForTD(D.steprow.slno_variation.css)+
'" steptype="'+c.StepType+'">'+b+"</td>"),v.push('<td id="'+B+'" style="'+g_GetCSSForTD(D.steprow.step_variation.css)+'" steptype="'+c.StepType+'">'+S+"</td>"));v.push("</tr>");E.push(A);u.push(G)}}catch(O){g=false,f.Log("RenderStep",LOG.EXCEPTION,"",O)}return g}function a(a){try{a!=void 0?(a=a.replace(/&lt;/g,"<"),a=a.replace(/&gt;/g,">"),a=a.replace(/&amp;/g,"&")):a=""}catch(b){f.Log("GetHTML",LOG.EXCEPTION,"",b)}return a}clsPlayerBase.call(this,"clsFlatCuecardRenderer");var f=this,n,g=null,k=null,
o=null,v=null,p=null,q=null,E=null,u=null,B=null,A=false,G=true,D=uid_json.psim.layout.specs.cuecard.styles_flat;this.Render=function(a,b,d,e,g,k,o,A){d=true;try{B=b;E=[];u=[];v=[];n=a;if(k!=void 0)p=k.src;if(A!=void 0)q=A.src;G=true;for(iProc in a.Tasks)if(a.Tasks[iProc].TaskType==TASKTYPE.QUESTION||a.Tasks[iProc].TaskType==TASKTYPE.MANUAL){G=false;break}v.push("<div width='99%'>");var D;for(iProc in a.Tasks)if(a.Tasks[iProc].TaskType==TASKTYPE.START){D=a.Tasks[iProc].NextResLocs[0];break}if(c(D)==
false)throw"Error @ RenderTask for Resloc="+Tasks[iProc].ResLoc;v.push("</div>");b.innerHTML=v.join("");setTimeout(function(){m_ResultDiv=document.getElementById("dvTestResultAtFlat")},1E3)}catch(F){d=false,f.Log("Render",LOG.EXCEPTION,"",F)}return d};this.HighlightStep=function(a,b,c){var e=true;try{var n=document.getElementById("ri_"+a+"_"+b),p=document.getElementById("sl_"+a+"_"+b),q=document.getElementById("ss_"+a+"_"+b);if(b!=""&&(q==null||q==void 0))if(c==void 0&&(c=0),c>0)for(c=b;c>0;)if(c-=
1,q=document.getElementById("ss_"+a+"_"+c),n=document.getElementById("ri_"+a+"_"+c),p=document.getElementById("sl_"+a+"_"+c),q!=null&&q!=void 0)break;if(q!=null&&q!=void 0){if(n!=null&&n!=void 0)n.style.cssText=g_GetCSSForTD(D.steprow.result_highlight.css);if(p!=null&&p!=void 0)p.style.cssText=g_GetCSSForTD(D.steprow.slno_highlight.css);q.style.cssText=g_GetCSSForTD(D.steprow.step_highlight.css);if(d(q,b,a)==false)throw"Error @ AutoScrollCuecardToViewCurStep";if(o!=null&&o!=void 0&&q.id!=o.id)if(g!=
null&&g!=void 0&&g.attributes.steptype.value!=STEPTYPE.VARIATION){g.style.cssText=g_GetCSSForTD(D.steprow.result_normal.css);if(k!=null&&k!=void 0)k.style.cssText=g_GetCSSForTD(D.steprow.slno_normal.css);if(o!=null&&o!=void 0)o.style.cssText=g_GetCSSForTD(D.steprow.step_normal.css)}else{if(g!=null&&g!=void 0)g.style.cssText=g_GetCSSForTD(D.steprow.result_variation.css);if(k!=null&&k!=void 0)k.style.cssText=g_GetCSSForTD(D.steprow.slno_variation.css);if(o!=null&&o!=void 0)o.style.cssText=g_GetCSSForTD(D.steprow.step_variation.css)}g=
n;k=p;o=q}else if(b==1&&a=="")B.scrollTop=0}catch(u){e=false,f.Log("HighlightStep",LOG.EXCEPTION,"",u)}return e};this.AutoScrollCuecardToViewPlayingStep=function(){var a=true;try{if(d(o)==false)throw"Error @ AutoScrollCuecardToViewCurStep";}catch(b){a=false,f.Log("AutoScrollCuecardToViewPlayingStep",LOG.EXCEPTION,"",b)}return a};this.DisplayResultIcon=function(a,b,c){var d=true;try{var e=document.getElementById("imgResult_"+a+"_"+b);if(e!=null)e.src=c==true?p:q,e.style.visibility="visible"}catch(g){BROWSER.OPERA==
false&&(d=false),f.Log("DisplayResultIcon",LOG.EXCEPTION,"",g)}return d};this.Reset=function(){try{if(o!=null&&o!=void 0)o.style.cssText=g_GetCSSForTD(D.steprow.step_normal.css);if(g!=null&&g!=void 0)g.style.cssText=g_GetCSSForTD(D.steprow.result_normal.css);if(k!=null&&k!=void 0)k.style.cssText=g_GetCSSForTD(D.steprow.slno_normal.css);o=null;for(i in E){var a=document.getElementById(E[i]);if(a!=null)a.style.visibility="hidden"}for(iTsk in n.Tasks)if(n.Tasks[iTsk].Steps!=void 0)for(iStep in n.Tasks[iTsk].Steps)if(b(n.Tasks[iTsk].ResLoc,
n.Tasks[iTsk].Steps[iStep],n)==false)throw"Error @ ResetStep";}catch(c){f.Log("ResetResultIcon",LOG.EXCEPTION,"",c)}return true};this.Freeze=function(a){try{A=a}catch(b){f.Log("Freeze",LOG.EXCEPTION,"",b)}return true};LoadStep=function(a,b){try{if(A==false){if(f.onStepLoadRequested==null)throw"onStepLoadRequested not binded";f.onStepLoadRequested(a,b)}}catch(c){f.Log("LoadStep",LOG.EXCEPTION,"",c)}}};
clsCuecardMover=function(){function d(){var a=true;try{k=null;var b=g_objTR.Cuecard.GetBoundingRect();if(b==null)throw"m_CuecardRect is null";k=new clsRect;k.Left=Math.ceil(b.left);k.Top=Math.ceil(b.top);k.Width=Math.ceil(b.width||Math.abs(b.right-b.left));k.Height=Math.ceil(b.height||Math.abs(b.bottom-b.top))}catch(c){a=false,f.Log("GetCuecardRect",LOG.EXCEPTION,"",c)}return a}function b(a,b){var c=null;try{var d=null;for(index in a.AnnotationControls){switch(a.AnnotationControls[index].Type.toUpperCase()){case ANNOTATION.OUTERREGION:d=
FlyWeight.GetObject(b.OCR_BLINK)}if(d!=null){var c=null,e=d.GetBoundingRect();if(e==null)throw"Error @  GetBoundingRect";c=new clsRect;c.Top=Math.ceil(e.top);c.Left=Math.ceil(e.left);c.Width=Math.ceil(e.width||Math.abs(e.right-e.left));c.Height=Math.ceil(e.height||Math.abs(e.bottom-e.top));break}}}catch(g){f.Log("GetControlRegion",LOG.EXCEPTION,"",g)}return c}function c(a){var b=true;try{var c=g.Width-k.Width,d=g.Height-k.Height,e=g.Width-k.Width,n=g.Height-k.Height,A=g.Left,G=g.Top,D=g.Left+g.Width,
r=g.Top+g.Height,H=new clsRect,C=new clsRect;if(a!=null)if(a.Type==STEPTYPE.MOUSE&&a.EventControls.DG!=null){o[0].Left<o[1].Left?(H=o[0],C=o[1]):(H=o[1],C=o[0]);var J=C.Left,I=C.Top,L=C.Left+C.Width,N=C.Top+C.Height}else H=o[0];else H=o[0];var M=H.Left,K=H.Left+H.Width,F=H.Top+H.Height;a!=null?a.Type==STEPTYPE.MOUSE&&a.EventControls.DG!=null?D-L>k.Width?g_objTR.MoveCuecard(c,0):D-K>k.Width&&I-G>k.Height?g_objTR.MoveCuecard(c,0):r-F>k.Height?g_objTR.MoveCuecard(0,d):D-K>k.Width&&r-N>k.Height?g_objTR.MoveCuecard(e,
n):M-A>k.Width?g_objTR.MoveCuecard(0,0):J-K>k.Width&&g_objTR.MoveCuecard(K+10,0):D-K>k.Width?g_objTR.MoveCuecard(c,0):r-F>k.Height?g_objTR.MoveCuecard(0,d):M-A>k.Width&&g_objTR.MoveCuecard(0,0):D-K>k.Width?g_objTR.MoveCuecard(c,0):r-F>k.Height?g_objTR.MoveCuecard(0,d):M-A>k.Width&&g_objTR.MoveCuecard(c,0)}catch(T){b=false,f.Log("MoveCueCard",LOG.EXCEPTION,"",T)}return b}function e(){var a=false;try{for(index in o){var b=o[index],c=b.Top,d=b.Left+b.Width,e=b.Top+b.Height,f=k.Left,g=k.Top,n=k.Top+k.Height;
b.Left>k.Left+k.Width||d<f||c>n||e<g||(a=true)}}catch(D){g_ErrorFlag=true}return a}function a(a){var b;try{for(;;){b=f.ProcessTaskData.GetStepObject(a);if(b==null)break;if(b.InMode[g_objGS.General.ActiveMode]==true)break;a++}}catch(c){b=null,f.Log("GetStepObject",LOG.EXCEPTION,"",c)}return b}clsPlayerBase.call(this,"clsCuecardMover");var f=this,n=false,g=this.ProcessTaskData=null,k=null,o=null;this.Initialize=function(){var a;try{if(n=uid_json.settings.template.rtl=="rtl"?true:false,g=new clsRect("0|0|"+
g_objTR.UIPSIM.Width+"|"+g_objTR.UIPSIM.Height),g==null)throw"m_PlayerDivRect is null";}catch(b){a=false,f.Log("Initialize",LOG.EXCEPTION,"",b)}return a};this.Move=function(g){var k=true;try{var q=a(g);if(q==null)throw"Error @GetStepObject";if(d()==false)throw"Error @ GetCuecardRect";o={};var E=b(q,PLAYABLEOBJECTS);if(E==null)throw"objMainRect is null";var u;if(u=q.Type==STEPTYPE.TYPETEXT){var B=true;try{var A=parseInt(uid_json.settings.cuecard.cc_crmaxheight),G=parseInt(uid_json.settings.cuecard.cc_crmaxwidth),
D=parseInt(uid_json.settings.cuecard.cc_lablemaxheight),r=parseInt(uid_json.settings.cuecard.cc_lablemaxwidth);if(E.Width>G)E.Width=G;if(E.Height>A)E.Height=A;E.Top-=D;E.Height+=D;n==false&&(E.Left-=r);E.Width+=r}catch(H){B=false,f.Log("AlterRectForTypetext",LOG.EXCEPTION,"",H)}u=B==false}if(u)throw"Error @  AlterRectForTypetext";o[0]=E;var C;if(C=g_objGS.General.ActiveMode==MODETYPE.GUIDE||g_objGS.General.ActiveMode==MODETYPE.TEST){E=true;try{var J;if(q.Type==STEPTYPE.TYPETEXT)if(q.EventControls.TT.Rule==
TYPETEXT_VALIDATION_RULE.BUTTON){var I=g_objTR.Validate.GetBoundingRect();J=new clsRect;J.Top=Math.ceil(I.top);J.Left=Math.ceil(I.left);J.Width=Math.ceil(I.width||Math.abs(I.right-I.left));J.Height=Math.ceil(I.height||Math.abs(I.bottom-I.top));J!=null&&(o[1]=J)}else if(q.EventControls.TT.Rule==TYPETEXT_VALIDATION_RULE.NEXTACTION){var L=a(g+1);if(L==null)throw"ObjNextStep is null";J=b(L,PLAYABLEOBJECTS2);J!=null&&(o[1]=J)}}catch(N){E=false,f.Log("CollectRectForTypeText",LOG.EXCEPTION,"",N)}C=E==false}if(C)throw"Error @ CollectRectForTypeText";
g_ErrorFlag=false;var M=e();if(g_ErrorFlag==true)throw"Error @ IsCuecardOverlapping";if(M==true&&c(q)==false)throw"Error @  MoveCueCard";}catch(K){k=false,f.Log("Move",LOG.EXCEPTION,"",K)}return k};this.MoveForRegion=function(a){var b=true;try{if(d()==false)throw"Error @ GetCuecardRect";if(k.Width>0&&k.Height>0){var g=new clsRect;g.Left=Math.ceil(a.left);g.Top=Math.ceil(a.top);g.Width=Math.ceil(a.width||Math.abs(a.right-a.left));g.Height=Math.ceil(a.height||Math.abs(a.bottom-a.top));if(g.Width>0&&
g.Height>0&&(o={},o[0]=g,e()===true&&c()==false))throw"Error @  MoveCueCard";}}catch(n){b=false,f.Log("MoveForRegion",LOG.EXCEPTION,"",n)}return b}};
clsFeedbackDialog=function(){function d(){try{e.Controls.Try.SetFocus()}catch(a){bRet=false,e.Log("FocusDefaultButton",LOG.EXCEPTION,"",a)}}function b(a,b,c,d,f,g,u,B,A,G){var D=null;try{var r=A,H=G;if(b=="")return D;var C="",J="";typeof b=="string"?J=b:(J=String(b.cord),C=b);e.Log("CreateButton",LOG.TRACE,"Cord",J);var I=J.split("|");l=Number(I[0]);t=Number(I[1]);w=Number(I[2]);h=Number(I[3]);D=new clsButton(a,l,t,w,h);D.Tooltip=g_objTR.Tooltip;for(J=1;J<arguments.length;J++)arguments[J]=arguments[J]==
""?null:g_objRIL.ImageList["fdbk_"+arguments[J]];D.Initialize(n,c,d,f,g,u,B,r,"",C,H)}catch(L){D=null,e.Log("CreateButton",LOG.EXCEPTION,L)}return D}function c(a){try{a=a==void 0?event:a;if(a.keyCode==27){try{a=a==void 0?event:a,a.stopPropagation?(a.preventDefault(),a.stopPropagation()):(a.cancelBubble=true,a.returnValue=false,a.keyCode=0)}catch(b){e.Log("Ignore_Event",LOG.EXCEPTION,"",b)}e.OnEscapePressed!=null&&setTimeout(e.OnEscapePressed,200);return false}a.keyCode==13&&(m_bEnterKeyPressed=true)}catch(c){e.Log("m_Button_OnKeyDown",
LOG.EXCEPTION,"",c)}}clsPlayerBase.call(this,"clsFeedbackDialog");var e=this;this.Holders={Title:null,Body:null};this.Controls={Close:null,Try:null,Difm:null,Hint:null};this.ParentWidth=this.ParentHeight=0;this.AlphaBackgroundColor=new String("");var a,f,n,g=null;this.OnEscapePressed=null;this.Create=function(c){try{if(c==null||c==void 0)throw"holderDiv is not supplied";var d=true;try{a=c;var v=e.CreateHTMLElement("div");v.style.left="0px";v.style.top="0px";v.style.width=e.ParentWidth+"px";v.style.height=
e.ParentHeight+"px";v.style.visibility="visible";v.style.display=g_inline;e.AlphaBackgroundColor=uid_json.feedback.layout.specs.general.alpha_background_color;if(BROWSER.LEGACY==true&&e.AlphaBackgroundColor.indexOf("rgba")!=-1){var p=e.AlphaBackgroundColor.split(","),q=parseFloat(p.pop())*100;v.style.filter="alpha(opacity="+q+")";e.AlphaBackgroundColor=p.join().replace(/rgba/i,"rgb")+")"}v.style.backgroundColor=e.AlphaBackgroundColor;v.style.zIndex=ZINDEX.FEEDBAKDIALOG;a.appendChild(v);f=document.getElementById(v.id);
var E=e.CreateHTMLElement("DIV");arrWH=uid_json.feedback.images.normal.imagedim.split("|");E.style.width=arrWH[0]+"px";E.style.height=arrWH[1]+"px";E.style.backgroundImage='url("'+g_objRIL.ImageList.fdbk_normal.src+'")';E.style.display=g_inline;E.style.visibility="visible";E.style.position="absolute";v=1;g_enabledualmonitor==true&&(v=2);E.style.left=(parseInt(c.style.width)/v-parseInt(E.style.width))/2+"px";E.style.top=(parseInt(c.style.height)-parseInt(E.style.height))/2+"px";E.style.zIndex=ZINDEX.FEEDBAKDIALOG;
a.appendChild(E);n=document.getElementById(E.id);try{var u;u=messages_json.psim.feedback!=void 0?messages_json.psim.feedback:messages_json.psim.canvas.feedback;for(var B in uid_json.feedback.layout.holders){var A=uid_json.feedback.layout.holders[B],G=new clsRect(String(A.cord)),D=e.CreateTextHolder(A);D.dir=uid_json.settings.template.rtl;D.style.left=G.Left+"px";D.style.top=G.Top+"px";D.style.width=G.Width+"px";D.style.height=G.Height+"px";D.style.zIndex=ZINDEX.TEMPLATE;D.style.overflowX="auto";D.style.overflowY=
"auto";n.appendChild(D);g=document.getElementById(D.id);var r=e.GetUniqueID(),H=u[B].text;H==void 0&&(H="");g.innerHTML="<table width='100%' height='100%'><tr><td id='"+r+"' style='"+u[B].css+"'> "+H+"</td></tr></table>";if(g_EnableBorderInTemplate)D.style.borderStyle="solid",D.style.borderWidth="1px",D.style.borderColor="red";e.Holders[B.toTitleCase()]=document.getElementById(D.id)}}catch(C){throw"error @ CreateHolders";}var c=true,J;J=messages_json.psim.feedback!=void 0?messages_json.psim.feedback:
messages_json.psim.canvas.feedback;try{var I=uid_json.feedback.layout.controls;e.Controls.Close=b("Feedback:Close",I.close,"normal","normal_hover","","","","");e.Controls.Try=b("Feedback:Try",I.tryagain,"normal","normal_hover","","","","",J.button_try.text,J.button_try.css);document.getElementById(e.Controls.Try.Id).tabIndex=0;e.Controls.Difm=b("Feedback:DIFM",I.difm,"normal","normal_hover","","","","",J.button_difm.text,J.button_difm.css);document.getElementById(e.Controls.Difm.Id).tabIndex=1;e.Controls.Hint=
b("Feedback:Hint",I.hint,"normal","normal_hover","","","","",J.button_hint.text,J.button_hint.css);document.getElementById(e.Controls.Hint.Id).tabIndex=2}catch(L){c=false,e.Log("CreateControls",LOG.EXCEPTION,"",L)}if(c==false)throw"Error @ CreateControls";}catch(N){d=false,e.Log("Construct",LOG.EXCEPTION,"",N)}if(d==false)throw"Error @ Construct";}catch(M){e.Log("Create",LOG.EXCEPTION,"",M)}};this.Hide=function(){try{n.style.display="none",f.style.display="none"}catch(a){bRet=false,e.Log("Hide",LOG.EXCEPTION,
"",a)}};this.Show=function(a){try{try{e.Controls.Try.onKeyDown=c,e.Controls.Hint.onKeyDown=c,e.Controls.Difm.onKeyDown=c}catch(b){e.Log("AttachEvents",LOG.EXCEPTION,"",b)}n.style.display=g_inline;g.innerHTML=a;f.style.display=g_inline;setTimeout(d,100)}catch(v){bRet=false,e.Log("Show",LOG.EXCEPTION,"",v)}};this.DetachEvents=function(){try{e.Controls.Try.onkeydown=null,e.Controls.Difm.onkeydown=null,e.Controls.Hint.onkeydown=null}catch(a){e.Log("DetachEvents",LOG.EXCEPTION,"",a)}}};
clsFWComponent=function(){this.Height=this.Width=this.Top=this.Left=0;this.Obj=null};
clsFloatingWindow=function(d){function b(){try{F.Root.Obj.focus()}catch(a){r.Log("SetFocus",LOG.EXCEPTION,"for > "+D,a)}}function c(a,b,c,d,e){var f;try{var g=null,k=null;ka=ra=0;na=F[a].Width;ma=F[a].Height;k=new clsCanvas("clsFloatingWindow:GenCreateCanvas:"+a);k.style.position="absolute";k.style.left=F[a].Left+"px";k.style.top=F[a].Top+"px";k.style.width=F[a].Width+"px";k.style.height=F[a].Height+"px";k.style.visibility="visible";k.style.display=g_inline;k.setDimensions(na,ma);F.Root.Obj.appendChild(k.obj);
f=document.getElementById(k.id);g=k.getContext("2d");g.drawImage(r.BaseImage,b,c,d,e,ra,ka,na,ma)}catch(n){bRet=false,r.Log("GenCreateCanvas",LOG.EXCEPTION,a,n)}return f}function e(){var a=true;try{if(Z<=0)return true;var b=100,d=25;try{var e=uid_json.psim.layout.specs.cont.cord.split("|"),b=Number(e[2]),d=Number(e[3])}catch(f){}r.ContinueRequired==false&&(b=0);aa=Number(Math.ceil(ba/2));V=Number(ca-X-Z);ea=Number(5);ga=Number(Z);F.DescriptionBar.Obj=c("DescriptionBar",aa,V,ea,ga);K=r.CreateHTMLElement("DIV");
if(uid_json.settings.template.rtl=="rtl")K.dir=uid_json.settings.template.rtl;K.style.width=r.Width-2*X+"px";K.style.height=F.DescriptionBar.Height+"px";K.style.left=F.DescriptionBar.Left+"px";K.style.top=F.DescriptionBar.Top+"px";K.style.bottom=0;K.style.display=g_inline;K.style.visibility="visible";F.Root.Obj.appendChild(K);if(g_EnableBorderInTemplate)K.style.borderStyle="solid",K.style.borderWidth="1px",K.style.borderColor="red";var g=r.CreateTextHolder(r.FWData.footer),k=Number(K.style.width.replace("px",
""))-b;g.style.display=g_inline;g.style.visibility="visible";g.style.width=k+"px";g.style.height=F.DescriptionBar.Height+"px";document.getElementById(K.id).appendChild(g);r.FooterMsgDiv=document.getElementById(g.id);if(r.ContinueRequired==false)return a;if(r.DoNotUseAnimatedContinue==true||uid_json.psim.layout.specs.cont.animcontinue=="0"){var n=r.CreateHTMLElement("BUTTON");n.innerHTML=r.ContinueText;n.style.display=g_inline;n.style.visibility="visible";n.style.height=d+"px";n.style.width=b+"px";
n.style.top=(parseInt(K.style.height)-parseInt(n.style.height))/2+"px";uid_json.settings.template.rtl=="ltr"?n.style.right=X+3+"px":n.style.left=X+3+"px";n.onclick=function(){setTimeout(function(){r.onContinueClick(true)},100)};K.appendChild(n);r.ContinueButton=document.getElementById(n.id)}else{var o=r.CreateHTMLElement("div");o.style.visibility="visible";o.style.display=g_inline;K.appendChild(o);var p=document.getElementById(o.id),q=uid_json.resources.icons.continue_anim.imagedim.split("|");p.style.width=
q[0]+"px";p.style.height=q[1]+"px";uid_json.settings.template.rtl=="ltr"?p.style.right="0px":p.style.left="0px";p.style.top=(F.DescriptionBar.Height-d)/2+"px";var u=new clsButtonAnimated(D);u.onClick=r.onContinueClick;if(u.Initialize(p,g_objRIL.ImageList.continue_anim,r.ContinueText,uid_json.psim.layout.specs.cont)==false)throw"Error @ ME.ContinueButton.Initialize";r.ContinueButton=u.Button}}catch(v){a=false,r.Log("CreateDescriptionBar",LOG.EXCEPTION,"for > "+D,v)}return a}function a(){var a=true;
try{var b;b=messages_json.psim.cuecard!=void 0?messages_json.psim.cuecard:messages_json.psim.canvas.cuecard.common;var c=r.CreateHTMLElement("DIV");c.style.visibility="visible";c.style.display=g_inline;c.style.width="100%";c.style.height=F.DescriptionBar.Height+"px";c.style.left="0px";c.style.top=F.DescriptionBar.Obj.style.top;c.style.textAlign="center";c.style.overflow="hidden";c.dir=uid_json.settings.template.rtl;var d=r.GetUniqueID();c.innerHTML="<table border=0 width=100% height=100%><tr><td id='"+
d+"' valign=middle align=center> </td></tr></table>";var e=r.CreateHTMLElement("span");e.style.cssText=g_GetCSSForTD(uid_json.psim.layout.holders.cc_show_details.css);e.innerHTML=b.show_details.text;r.StepDetailsSpan=e;setTimeout(function(){document.getElementById(d).appendChild(e)},100);F.Root.Obj.appendChild(c);r.StepDetails=document.getElementById(c.id)}catch(f){a=false,r.Log("CreateStepDetailsDiv",LOG.EXCEPTION,"for > "+D,f)}return a}function f(){var a=true;try{T.Obj=r.CreateHTMLElement("DIV");
T.Obj.style.visibility="visible";T.Obj.style.display=g_inline;T.Obj.style.width="3px";T.Obj.style.height=F.Root.Obj.style.height;T.Obj.style.left=0;T.Obj.style.top=0;T.Obj.style.cursor="w-resize";if(BROWSER.LEGACY==false)T.Obj.style.backgroundColor="rgba(255, 255, 0, 0)";F.Root.Obj.appendChild(T.Obj);S.Obj=r.CreateHTMLElement("DIV");S.Obj.style.visibility="visible";S.Obj.style.display=g_inline;S.Obj.style.width="3px";S.Obj.style.height=F.Root.Obj.style.height;S.Obj.style.left=r.Width-3+"px";S.Obj.style.top=
0;S.Obj.style.cursor="e-resize";if(BROWSER.LEGACY==false)S.Obj.style.backgroundColor="rgba(255, 255, 0, 0)";F.Root.Obj.appendChild(S.Obj);O.Obj=r.CreateHTMLElement("DIV");O.Obj.style.visibility="visible";O.Obj.style.display=g_inline;O.Obj.style.width=r.Width+"px";O.Obj.style.height="3px";O.Obj.style.left=0;O.Obj.style.top=0;O.Obj.style.cursor="n-resize";if(BROWSER.LEGACY==false)O.Obj.style.backgroundColor="rgba(255, 255, 0, 0)";F.Root.Obj.appendChild(O.Obj);P.Obj=r.CreateHTMLElement("DIV");P.Obj.style.visibility=
"visible";P.Obj.style.display=g_inline;P.Obj.style.width=r.Width+"px";P.Obj.style.height="3px";P.Obj.style.left=0;P.Obj.style.top=r.Height-3+"px";P.Obj.style.cursor="s-resize";if(BROWSER.LEGACY==false)P.Obj.style.backgroundColor="rgba(255, 255, 0, 0)";F.Root.Obj.appendChild(P.Obj);T.Obj.onmousedown=function(a){n(a==void 0?event:a,"L")};S.Obj.onmousedown=function(a){n(a==void 0?event:a,"R")};O.Obj.onmousedown=function(a){g(a==void 0?event:a,"T")};P.Obj.onmousedown=function(a){g(a==void 0?event:a,"B")}}catch(b){a=
false,r.Log("AddResizeDivs",LOG.EXCEPTION,"for > "+D,b)}return a}function n(a,b){try{J=a.clientX;I=a.clientY;F.Root.Left=parseInt(F.Root.Obj.style.left);F.Root.Width=parseInt(F.Root.Obj.style.width);F.N.Width=parseInt(F.N.Obj.style.width);F.NE.Left=parseInt(F.NE.Obj.style.left);F.NW.Left=parseInt(F.W.Obj.style.left);F.S.Width=parseInt(F.S.Obj.style.width);F.SE.Left=parseInt(F.SE.Obj.style.left);F.SW.Left=parseInt(F.SW.Obj.style.left);F.E.Left=parseInt(F.E.Obj.style.left);if(F.CloseButton.Obj!=null)F.CloseButton.Left=
parseInt(F.CloseButton.Obj.style.left);if(F.ContentBody.Obj!=null)F.ContentBody.Width=parseInt(F.ContentBody.Obj.style.width);if(F.ContentBody2.Obj!=null)F.ContentBody2.Width=parseInt(F.ContentBody2.Obj.style.width);if(F.DescriptionBar.Obj!=null)F.DescriptionBar.Width=parseInt(F.DescriptionBar.Obj.style.width);if(F.ContentHeader.Obj!=null)F.ContentHeader.Width=parseInt(F.ContentHeader.Obj.style.width);S.Left=parseInt(S.Obj.style.left);O.Width=parseInt(O.Obj.style.width);P.Width=parseInt(P.Obj.style.width);
M=true;m_Border=b;H.onmousemove=E;F.Root.Obj.onmousemove=E;F.Root.Obj.onmouseup=B;window.onmouseup=B}catch(c){r.Log("SetWidthResizeHandlers",LOG.EXCEPTION,"for > "+D,c)}}function g(a,b){try{J=a.clientX;I=a.clientY;F.Root.Top=parseInt(F.Root.Obj.style.top);F.Root.Height=parseInt(F.Root.Obj.style.height);F.E.Height=parseInt(F.E.Obj.style.height);F.W.Height=parseInt(F.W.Obj.style.height);if(F.ContentBody.Obj!=null)F.ContentBody.Height=parseInt(F.ContentBody.Obj.style.height);if(F.ContentBody2.Obj!=null)F.ContentBody2.Height=
parseInt(F.ContentBody2.Obj.style.height);if(F.DescriptionBar.Obj!=null)F.DescriptionBar.Top=parseInt(F.DescriptionBar.Obj.style.top);F.S.Top=parseInt(F.S.Obj.style.top);F.SE.Top=parseInt(F.SE.Obj.style.top);F.SW.Top=parseInt(F.SW.Obj.style.top);S.Height=parseInt(S.Obj.style.height);T.Height=parseInt(T.Obj.style.height);P.Top=parseInt(P.Obj.style.top);if(r.StepDetails!=null)r.StepDetails.Top=parseInt(r.StepDetails.style.top);M=true;m_Border=b;H.onmousemove=u;F.Root.Obj.onmousemove=u;F.Root.Obj.onmouseup=
B;window.onmouseup=B}catch(c){r.Log("SetHeightResizeHandlers",LOG.EXCEPTION,"for > "+D,c)}}function k(a){var b=true;try{typeof a.onselectstart!="undefined"?a.onselectstart=function(){return false}:typeof a.style.MozUserSelect!="undefined"?a.style.MozUserSelect="none":a.onmousedown=function(){return false},a.style.cursor="default"}catch(c){b=false,r.Log("DisableSelection",LOG.EXCEPTION,"for > "+D,c)}return b}function o(a){try{if(a=a==void 0?event:a,a.keyCode==27){r.Hide();try{a=a==void 0?event:a,a.stopPropagation?
(a.preventDefault(),a.stopPropagation()):(a.cancelBubble=true,a.returnValue=false,a.keyCode=0)}catch(b){r.Log("Ignore_Event",LOG.EXCEPTION,"for > "+D,b)}}}catch(c){r.Log("m_Popup_OnKeyDown",LOG.EXCEPTION,"for > "+D,c)}}function v(){}function p(a){a=a==void 0?event:a;try{if(M==true){r.Left+(a.clientX-J)>0&&r.Left+r.Width+(a.clientX-J)<r.ParentWidth&&(r.Left+=a.clientX-J);r.Top+(a.clientY-I)>0&&r.Top+r.Height+a.clientY-I<r.ParentHeight&&(r.Top+=a.clientY-I);if(r.Top+r.Height>r.ParentHeight)r.Top=r.ParentHeight-
r.Height;if(r.Left+r.Width>r.ParentWidth)r.Left=r.ParentWidth-r.Width;F.Root.Obj.style.left=r.Left+"px";F.Root.Obj.style.top=r.Top+"px";if(M==true)J=a.clientX,I=a.clientY}}catch(b){r.Log("m_HolderDIV_onMouseMove",LOG.EXCEPTION,"for > "+D,b)}}function q(a){a=a==void 0?event:a;try{if(r.onBusy!=null)r.onBusy(false);M=false;F.Root.Obj.style.opacity="1";F.Root.Obj.onmousemove=null;F.Root.Obj.onmouseup=null;J=a.clientX;I=a.clientY}catch(b){r.Log("m_HolderDIV_onMouseUp",LOG.EXCEPTION,"for > "+D,b)}}function E(a){a=
a==void 0?event:a;try{if(M==true&&!(Math.abs(a.clientX-J)<5)){var b=m_Border=="L"?a.clientX-J:J-a.clientX,c=Number(F.Root.Width-b);if(!(c<ja&&b>0||c>r.ParentWidth/2&&b<0)){r.Width=c;F.Root.Obj.style.left=F.Root.Left+(m_Border=="L"?b:0)+"px";F.Root.Obj.style.width=c+"px";if(F.ContentBody.Obj!=null)F.ContentBody.Obj.style.width=F.ContentBody.Width-b+"px";if(F.ContentBody2.Obj!=null)F.ContentBody2.Obj.style.width=F.ContentBody2.Width-b+"px";if(F.ContentHeader.Obj!=null)F.ContentHeader.Obj.style.width=
F.ContentHeader.Width-b+"px";if(uid_json.settings.template.rtl!="rtl"&&F.CloseButton.Obj!=null)F.CloseButton.Obj.style.left=F.CloseButton.Left-b+"px";if(F.DescriptionBar.Obj!=null)F.DescriptionBar.Obj.style.width=F.DescriptionBar.Width-b+"px";if(K!=null)K.style.width=F.DescriptionBar.Width-b+"px";F.N.Obj.style.width=F.N.Width-b+"px";F.NE.Obj.style.left=F.NE.Left-b+"px";F.SE.Obj.style.left=F.SE.Left-b+"px";F.E.Obj.style.left=F.E.Left-b+"px";F.S.Obj.style.width=F.S.Width-b+"px";S.Obj.style.left=S.Left-
b+"px";O.Obj.style.width=O.Width-b+"px";P.Obj.style.width=P.Width-b+"px"}}}catch(d){r.Log("WidthResizeDiv_onMouseMove",LOG.EXCEPTION,"for > "+D,d)}}function u(a){a=a==void 0?event:a;try{if(M==true&&!(Math.abs(a.clientY-I)<5)){var b=m_Border=="T"?a.clientY-I:I-a.clientY,c=Number(F.Root.Height-b);if(!(c<ha&&b>0||c>r.ParentHeight-10&&b<0)){r.Height=F.Root.Height-b;F.Root.Obj.style.top=F.Root.Top+(m_Border=="T"?b:0)+"px";F.Root.Obj.style.height=r.Height+"px";if(F.ContentBody.Obj!=null)F.ContentBody.Obj.style.height=
F.ContentBody.Height-b+"px";if(F.ContentBody2.Obj!=null)F.ContentBody2.Obj.style.height=F.ContentBody2.Height-b+"px";if(F.DescriptionBar.Obj!=null)F.DescriptionBar.Obj.style.top=F.DescriptionBar.Top-b+"px";if(K!=null)K.style.top=F.DescriptionBar.Top-b+"px";if(r.StepDetails!=null)r.StepDetails.style.top=r.StepDetails.Top-b+"px";F.E.Obj.style.height=F.E.Height-b+"px";F.W.Obj.style.height=F.W.Height-b+"px";F.S.Obj.style.top=F.S.Top-b+"px";F.SW.Obj.style.top=F.SW.Top-b+"px";F.SE.Obj.style.top=F.SE.Top-
b+"px";S.Obj.style.height=S.Height-b+"px";T.Obj.style.height=T.Height-b+"px";P.Obj.style.top=P.Top-b+"px"}}}catch(d){r.Log("HeightResizeDiv_onMouseMove",LOG.EXCEPTION,"for > "+D,d)}}function B(a){a=a==void 0?event:a;try{M=false,F.Root.Obj.onmousemove=null,F.Root.Obj.onmouseup=null,H.onmousemove=null,window.onmouseup=null,J=a.clientX,I=a.clientY}catch(b){r.Log("LeftResizeDiv_onMouseUp",LOG.EXCEPTION,"for > "+D,b)}}function A(){try{r.onHide!=null&&setTimeout(r.onHide,1),r.Hide()}catch(a){r.Log("CloseButton_Clicked",
LOG.EXCEPTION,"for > "+D,a)}}function G(a,b){var c=true;try{if(a.pd!=void 0)b.style.padding=a.pd;if(a.pdr!=void 0)b.style.paddingRight=a.pdr;if(a.pdl!=void 0)b.style.paddingLeft=a.pdl;if(a.pdb!=void 0)b.style.paddingBottom=a.pdb;if(a.pdt!=void 0)b.style.paddingTop=a.pdt;if(a.ff!=void 0)b.style.fontFamily=a.ff;if(a.fs!=void 0)b.style.fontSize=a.fs;if(a.fw!=void 0)b.style.fontWeight=a.fw;if(a.fc!=void 0)b.style.color=a.fc;if(a.ta!=void 0)b.style.textAlign=a.ta;if(a.va!=void 0)b.style.verticalAlign=
a.va;if(a.bgc!=void 0)b.style.backgroundColor=a.bgc;if(a.bw!=void 0)b.style.borderWidth=a.bw;if(a.bbs!=void 0)b.style.borderBottomStyle=a.bbs;if(a.bc!=void 0)b.style.borderColor=a.bc;if(a.wb!=void 0)b.style.wordBreak=a.wb;if(a.cr!=void 0)b.style.cursor=a.cr;if(a.bs!=void 0)b.style.borderStyle=a.bs;if(a.tdc!=void 0)b.style.textDecoration=a.tdc;if(a.mr!=void 0)b.style.margin=a.mr}catch(d){c=false,r.Log("AddExtraCSS",LOG.EXCEPTION,"for > "+D,d)}return c}clsPlayerBase.call(this,"clsFloatingWindow");var D=
"";d!=void 0&&(D=d);var r=this,H,C,J=0,I=0,L=0,N=0,M=false,K=null,F={Root:new clsFWComponent,ContentBody:new clsFWComponent,ContentBody2:new clsFWComponent,DescriptionBar:new clsFWComponent,CloseButton:new clsFWComponent,N:new clsFWComponent,NE:new clsFWComponent,NW:new clsFWComponent,SW:new clsFWComponent,SE:new clsFWComponent,S:new clsFWComponent,E:new clsFWComponent,W:new clsFWComponent,ContentHeader:new clsFWComponent},T=new clsFWComponent,S=new clsFWComponent,O=new clsFWComponent,P=new clsFWComponent,
z=0,X=0,Z=0,Y=0,U=0,fa=0,R=0,la="default",ha=225,ja=150,ia=0,ba=0,ca=0,aa=0,V=0,ea=0,ga=0,ra=0,ka=0,na=0,ma=0;this.ContentBody2=this.ContentBody=this.Title=null;this.Visible=true;this.ContentHeader=this.FWData=null;this.ContentHeaderRequired=false;var oa=0;this.StepDetails=this.IconImage=this.BaseImage=null;this.ContentBody2Required=false;this.StepDetailsRequired=true;this.FooterRequired=false;this.MaxHeight=this.MaxWidth=this.Height=this.Width=this.Top=this.Left=0;this.IsFloating=false;this.ParentHeight=
this.ParentWidth=0;this.EnableEsc=false;this.ZIndex=0;this.IsResizable=this.DoNotUseAnimatedContinue=this.ContinueRequired=this.CloseRequired=this.IconRequired=false;this.ContinueText="";this.CloseButton=this.ContinueButton=this.FooterMsgDiv=this.onBusy=this.onContinueClick=this.onShow=this.onHide=this.FooterCSS=this.BodyCSS=this.HeaderCSS=null;this.Create=function(b){var d=true;try{if(b==null||b==void 0)throw"holderDiv is not supplied";if(r.FWData==null)throw"Floating Window Data object is null";
H=b;r.ParentHeight=parseInt(H.style.height);r.ParentWidth=parseInt(H.style.width);var g=r.FWData.imagedim.split("|");ba=Number(g[0]);ca=Number(g[1]);X=Number(r.FWData.border);fa=Number(r.FWData.bottom_corner_width);R=Number(r.FWData.bottom_corner_height);Y=Number(r.FWData.top_corner_width);U=Number(r.FWData.top_corner_height);ia=Number(r.FWData.titlebar_height);r.FooterRequired&&(Z=Number(r.FWData.descriptionbar_height));r.ContentHeaderRequired&&(oa=Number(r.FWData.content_header_height));b=true;
try{F.N.Left=Y,F.N.Top=0,F.N.Width=Number(2*r.Width-Y*2),F.N.Height=Number(U),F.S.Left=X,F.S.Top=r.Height-X,F.S.Width=Number(2*r.Width-2*fa),F.S.Height=Number(X),F.W.Width=Number(X),F.W.Height=Number(2*r.Height-U-X),F.W.Left=0,F.W.Top=U,F.E.Left=r.Width-X,F.E.Top=U,F.E.Width=Number(X),F.E.Height=Number(2*r.Height-U-X),F.SW.Left=0,F.SW.Top=r.Height-R,F.SW.Width=Number(fa),F.SW.Height=Number(R),F.SE.Left=r.Width-fa,F.SE.Top=r.Height-R,F.SE.Width=Number(fa),F.SE.Height=Number(R),F.NE.Left=r.Width-Y,
F.NE.Top=0,F.NE.Width=Number(Y),F.NE.Height=Number(U),F.NW.Left=0,F.NW.Top=0,F.NW.Width=Number(Y),F.NW.Height=Number(U),F.ContentBody.Left=X,F.ContentBody.Top=U+oa,F.ContentBody.Width=r.Width-X*2,F.ContentBody.Height=r.Height-(U+X+Z+oa),F.DescriptionBar.Left=X,F.DescriptionBar.Top=r.Height-Z-X,F.DescriptionBar.Width=Number(2*r.Width-2*fa),F.DescriptionBar.Height=Number(Z),F.ContentHeader.Left=X,F.ContentHeader.Top=U,F.ContentHeader.Width=r.Width-X*2,F.ContentHeader.Height=Number(oa)}catch(n){b=false,
r.Log("CollectCordsForFW",LOG.EXCEPTION,"for > "+D,n)}if(b==false)throw"Error @ CollectCordsForFW";b=true;try{r.IsResizable==true&&(la=r.IsResizable?"move":"default");var p=r.CreateHTMLElement("DIV");p.style.top=r.Top+"px";p.style.width=r.Width+"px";p.style.left=r.Left+"px";p.style.height=r.Height+"px";p.style.visibility="visible";p.style.display=g_inline;p.style.zIndex=r.ZIndex;p.style.overflow="hidden";if(r.EnableEsc==true)p.onkeydown=o;H.appendChild(p);F.Root.Obj=document.getElementById(p.id);
if(BROWSER.LEGACY==true&&H.style.filter!="")F.Root.Obj.style.filter="alpha(opacity=100)";if(k(F.Root.Obj)==false)throw"Error @ DisableSelection";if(e()==false)throw"Error @ CreateDescriptionBar";p=true;try{aa=Number(ba-Y),V=0,ea=Number(Y),ga=Number(U),F.NE.Obj=c("NE",aa,V,ea,ga),F.NE.Obj.style.zIndex=ZINDEX.TEMPLATE}catch(q){p=false,r.Log("CreateNECorner",LOG.EXCEPTION,"for > "+D,q)}if(p==false)throw"Error @ CreateNECorner";p=true;try{if(V=aa=0,ea=Number(Y),ga=Number(U),F.NW.Obj=c("NW",aa,V,ea,ga),
r.IsFloating==true)F.NW.Obj.style.cursor=la,F.NW.Obj.onmousedown=r.Title_onMouseDown}catch(u){p=false,r.Log("CreateNWCorner",LOG.EXCEPTION,"for > "+D,u)}if(p==false)throw"Error @ CreateNWCorner";p=true;try{if(aa=ba/2,V=0,ea=Number(Y),ga=Number(U),F.N.Obj=c("N",aa,V,ea,ga),r.IsFloating==true)F.N.Obj.style.cursor=la,F.N.Obj.onmousedown=r.Title_onMouseDown}catch(v){p=false,r.Log("CreateNPortion",LOG.EXCEPTION,"for > "+D,v)}if(p==false)throw"Error @ CreateNPortion";p=true;try{aa=ba/2,V=Number(ca-X),ea=
Number(5),ga=Number(X),F.S.Obj=c("S",aa,V,ea,ga)}catch(B){p=false,r.Log("CreateSPortion",LOG.EXCEPTION,"for > "+D,B)}if(p==false)throw"Error @ CreateSPortion";p=true;try{aa=Number(ba-X),V=Number(ca/2),ea=Number(X),ga=Number(5),F.E.Obj=c("E",aa,V,ea,ga)}catch(E){p=false,r.Log("CreateEPortion",LOG.EXCEPTION,"for > "+D,E)}if(p==false)throw"Error @ CreateEPortion";p=true;try{aa=0,V=Number(ca/2),ea=Number(X),ga=Number(5),F.W.Obj=c("W",aa,V,ea,ga)}catch(I){p=false,r.Log("CreateWPortion",LOG.EXCEPTION,"for > "+
D,I)}if(p==false)throw"Error @ CreateWPortion";p=true;try{aa=0,V=Number(ca-R),ea=Number(fa),ga=Number(R),F.SW.Obj=c("SW",aa,V,ea,ga)}catch(J){p=false,r.Log("CreateSWCorner",LOG.EXCEPTION,"for > "+D,J)}if(p==false)throw"Error @ CreateSWCorner";p=true;try{aa=Number(ba-fa),V=Number(ca-R),ea=Number(fa),ga=Number(R),F.SE.Obj=c("SE",aa,V,ea,ga)}catch(L){p=false,r.Log("CreateSECorner",LOG.EXCEPTION,"for > "+D,L)}if(p==false)throw"Error @ CreateSECorner";p=true;try{if(r.FWData.close!=void 0&&r.FWData.close!=
""&&r.CloseRequired){var K=r.FWData.close.split("|");aa=Number(K[0]);V=Number(K[1]);ea=Number(K[2]);ga=Number(K[3]);ka=ra=0;na=ea;ma=ga;elmTempCanvas=new clsCanvas("clsFloatingWindow:CreateClosebutton");elmTempCanvas.style.position="absolute";elmTempCanvas.style.top=Math.ceil((ia-ga)/2)+"px";elmTempCanvas.style.left=uid_json.settings.template.rtl=="ltr"?r.Width-(ea+Y)+"px":Y+"px";elmTempCanvas.style.visibility="visible";elmTempCanvas.style.display=g_inline;elmTempCanvas.style.cursor="pointer";elmTempCanvas.setDimensions(na,
ma);F.Root.Obj.appendChild(elmTempCanvas.obj);F.CloseButton.Obj=document.getElementById(elmTempCanvas.id);ctx=elmTempCanvas.getContext("2d");ctx.drawImage(r.BaseImage,aa,V,ea,ga,ra,ka,na,ma);F.CloseButton.Obj.onclick=A;r.CloseButton=elmTempCanvas}}catch(N){p=false,r.Log("CreateClosebutton",LOG.EXCEPTION,"for > "+D,N)}if(p==false)throw"Error @ CreateClosebutton";K=true;try{if(r.IconImage!=null&&r.IconRequired){var M=r.IconImage;M.style.position="absolute";M.style.top="3px";uid_json.settings.template.rtl==
"ltr"?M.style.left=Y+"px":M.style.right=Y+"px";M.style.visibility="visible";M.style.display=g_inline;M.style.paddingLeft="1px";M.style.paddingTop="5px";M.style.cursor="default";F.Root.Obj.appendChild(M);z=parseInt(ia)}}catch(O){K=false,r.Log("CreateIcon",LOG.EXCEPTION,"for > "+D,O)}if(K==false)throw"Error @ CreateIcon";M=true;try{var P=r.CreateTextHolder(r.FWData.header),K=z+3+Y+"px";P.style.position="absolute";P.style.top="0px";uid_json.settings.template.rtl==="ltr"?P.style.left=K:P.style.right=
K;P.style.width="75%";P.style.height=ia-8+"px";P.style.visibility="visible";P.style.display=g_inline;P.style.overflow="hidden";P.dir=uid_json.settings.template.rtl;if(r.IsFloating==true)P.style.cursor=la,P.onmousedown=r.Title_onMouseDown;F.Root.Obj.appendChild(P);C=document.getElementById(P.id)}catch(S){M=false,r.Log("CreateHeadingCaptionDiv",LOG.EXCEPTION,"for > "+D,S)}if(M==false)throw"Error @ CreateHeadingCaptionDiv";P=true;try{var T=r.CreateTextHolder(r.FWData.body);T.style.left=F.ContentBody.Left+
"px";T.style.top=F.ContentBody.Top+"px";T.style.width=F.ContentBody.Width+"px";T.style.height=F.ContentBody.Height+"px";T.style.visibility="visible";T.style.display=g_inline;T.style.overflow="auto";if(r.BodyCSS!=null&&G(r.BodyCSS,T)==false)throw"Error @ AddExtraCSS";T.dir=uid_json.settings.template.rtl;T.unselectable=true;F.Root.Obj.appendChild(T);r.ContentBody=document.getElementById(T.id);F.ContentBody.Obj=r.ContentBody}catch(ha){P=false,r.Log("CreateContentBodyDiv",LOG.EXCEPTION,"for > "+D,ha)}if(P==
false)throw"Error @ CreateContentBodyDiv";var ja;if(ja=r.ContentHeaderRequired){T=true;try{var ya=r.CreateTextHolder(r.FWData.contentheader);ya.style.left=F.ContentHeader.Left+"px";ya.style.top=F.ContentHeader.Top+"px";ya.style.width=F.ContentHeader.Width+"px";ya.style.height=F.ContentHeader.Height+"px";ya.style.visibility="visible";ya.style.display=g_inline;ya.style.overflow="auto";ya.dir=uid_json.settings.template.rtl;ya.unselectable=true;F.Root.Obj.appendChild(ya);r.ContentHeader=document.getElementById(ya.id);
F.ContentHeader.Obj=r.ContentHeader}catch(Ua){T=false,r.Log("CreateContentHeader",LOG.EXCEPTION,"for > "+D,Ua)}ja=T==false}if(ja)throw"Error @ CreateContentHeader";if(r.ContentBody2Required==true){ja=true;try{var ua=r.CreateTextHolder(r.FWData.body);ua.style.left=F.ContentBody.Left+"px";ua.style.top=F.ContentBody.Top+"px";ua.style.width=F.ContentBody.Width+"px";ua.style.height=F.ContentBody.Height+"px";ua.style.visibility="visible";ua.style.display="none";ua.style.overflow="auto";if(r.BodyCSS!=null&&
G(r.BodyCSS,ua)==false)throw"Error @ AddExtraCSS";ua.dir=uid_json.settings.template.rtl;ua.unselectable=true;F.Root.Obj.appendChild(ua);r.ContentBody2=document.getElementById(ua.id);F.ContentBody2.Obj=r.ContentBody2}catch(La){ja=false,r.Log("CreateContentBody2Div",LOG.EXCEPTION,"for > "+D,La)}if(ja==false)throw"Error @ CreateContentBody2Div";if(r.StepDetailsRequired==true&&a()==false)throw"Error @ CreateStepDetailsDiv";}if(r.IsResizable==true&&f()==false)throw"Error @ AddResizeDivs";}catch(Pa){b=
false,r.Log("ConstructFloatingWindow",LOG.EXCEPTION,"for > "+D,Pa)}if(b==false)throw"Error @ ConstructFloatingWindow";r.Hide()}catch(Qa){d=false,r.Log("Create",LOG.EXCEPTION,"for > "+D,Qa)}return d};this.ShowHideContentHeader=function(a){try{if(r.ContentHeaderRequired&&(a?(r.ContentHeader.style.display=g_inline,oa=Number(r.FWData.content_header_height)):(r.ContentHeader.style.display="none",oa=0),F.ContentBody.Top=U+oa,F.ContentBody.Height=r.Height-(U+X+Z+oa),F.ContentBody.Obj.style.top=F.ContentBody.Top+
"px",F.ContentBody.Obj.style.height=F.ContentBody.Height+"px",F.ContentBody2!=void 0))F.ContentBody2.Top=U+oa,F.ContentBody2.Height=r.Height-(U+X+Z+oa),F.ContentBody2.Obj.style.top=F.ContentBody2.Top+"px",F.ContentBody2.Obj.style.height=F.ContentBody2.Height+"px"}catch(b){r.Log("HideContentHeader",LOG.EXCEPTION,"",b)}};this.SetFooterMessage=function(a){var b=true;try{if(r.FooterMsgDiv==null)return true;if(a=="")r.FooterMsgDiv.innerHTML="";else{r.FooterCSS!=void 0&&r.FooterCSS!=null&&(a="<span style='"+
g_GetCSSForTD(r.FooterCSS)+"'>"+a+"</span>");var c="";r.FWData.footer.css!=void 0&&(r.FWData.footer.css.ta!=void 0&&(c+=";text-align: "+r.FWData.footer.css.ta),r.FWData.footer.css.va!=void 0&&(c+=";vertical-align: "+r.FWData.footer.css.va));r.FooterMsgDiv.innerHTML="<table width='100%' height='100%' border='0' cellspacing='0' cellpadding='0'><tr><td style='"+c+"'>"+a+"</td></tr></table>"}}catch(d){b=false,r.Log("SetFooterMessage",LOG.EXCEPTION,"for > "+D,d)}return b};this.SetCaption=function(a){var b=
true;try{r.HeaderCSS!=void 0&&r.HeaderCSS!=null&&(a="<span style='"+g_GetCSSForTD(r.HeaderCSS)+"'>"+a+"</span>"),C.innerHTML="<table border=0 width='100%' height='100%''cellpadding=0 cellspacing=0><tr><td valign=middle >"+a+"</td></tr></table>"}catch(c){b=false,r.Log("SetCaption",LOG.EXCEPTION,"for > "+D,c)}return b};this.Hide=function(){try{F.Root.Obj.style.display="none",r.Visible=false}catch(a){r.Log("Hide",LOG.EXCEPTION,"for > "+D,a)}};this.ChangeParent=function(a){var b=true;try{if(H.id===a.id)return b;
H=a;r.ParentHeight=parseInt(a.style.height);r.ParentWidth=parseInt(a.style.width);a.appendChild(F.Root.Obj)}catch(c){b=false,r.Log("SetCaption",LOG.EXCEPTION,"",c)}return b};this.Show=function(a,c){try{r.onShow!=null&&setTimeout(r.onShow,1);if(a!=void 0)F.Root.Obj.style.zIndex=a;F.Root.Obj.style.display=g_inline;if(r.ContinueButton!=null&&(r.ContinueButton.style.display="none",c!=false)){r.ContinueButton.style.display=g_inline;try{r.ContinueButton.focus()}catch(d){}g_ContinueButton=r.ContinueButton}if(r.ContinueButton!=
null&&g_objCCMover!=null&&c==true){var e=r.ContinueButton.getBoundingClientRect();if(g_objCCMover.MoveForRegion(e)==false)throw"Error @ g_objCCMover.MoveForRegion";}r.EnableEsc==true&&setTimeout(b,10);r.Visible=true}catch(f){r.Log("Show",LOG.EXCEPTION,"for > "+D,f)}};this.Title_onMouseDown=function(a){a=a==void 0?event:a;try{if(r.onBusy!=null)r.onBusy(true);J=a.clientX;I=a.clientY;F.Root.Obj.style.opacity="0.5";M=true;H.onmousemove=p;F.Root.Obj.onmouseup=q;window.onmouseup=q;H.onmouseout=v}catch(b){r.Log("Title_onMouseDown",
LOG.EXCEPTION,"for > "+D,b)}};this.MoveTo=function(a,b){try{r.Left=a,r.Top=b,F.Root.Obj.style.left=a+"px",F.Root.Obj.style.top=b+"px"}catch(c){r.Log("MoveTo",LOG.EXCEPTION,"for > "+D,c)}};this.BringFreezeEffect=function(){};this.Resize=function(a,b){var c=true;try{if(L!=a){L=a;a+=F.E.Width*2+20;if(a>r.MaxWidth)a=r.MaxWidth;var d=parseFloat(F.Root.Obj.style.width)-a;r.Width=parseFloat(F.Root.Obj.style.width)-d;F.E.Obj.style.left=parseFloat(F.E.Obj.style.left)-d+"px";F.NE.Obj.style.left=parseFloat(F.NE.Obj.style.left)-
d+"px";F.SE.Obj.style.left=parseFloat(F.SE.Obj.style.left)-d+"px";F.Root.Obj.style.width=r.Width+"px";F.ContentBody.Obj.style.width=parseFloat(F.ContentBody.Obj.style.width)-d+"px";if(F.CloseButton.Obj!=null)F.CloseButton.Obj.style.left=F.CloseButton.Left-d+"px";if(F.ContentBody2.Obj!=null)F.ContentBody2.Obj.style.width=parseFloat(F.ContentBody2.Obj.style.width)-d+"px";if(K!=null)K.style.width=parseFloat(K.style.width)-d+"px",r.FooterMsgDiv.style.width=parseFloat(r.FooterMsgDiv.style.width)-d+"px";
if(r.IsResizible===true)S.Obj.style.left=parseFloat(S.Obj.style.left)-d+"px";d=1;g_enabledualmonitor==true&&(d=2);F.Root.Obj.style.left=(r.ParentWidth/d-r.Width)/2+"px"}if(N!=b){N=b;b+=F.DescriptionBar.Height+F.N.Height+F.S.Height+20;if(b>r.MaxHeight)b=r.MaxHeight;var e=parseFloat(F.Root.Obj.style.height)-b;r.Height=parseFloat(F.Root.Obj.style.height)-e;if(r.StepDetails!=null)r.StepDetails.style.top=r.StepDetails.Top-e+"px";F.SW.Obj.style.top=parseFloat(F.SW.Obj.style.top)-e+"px";F.S.Obj.style.top=
parseFloat(F.S.Obj.style.top)-e+"px";F.SE.Obj.style.top=parseFloat(F.SE.Obj.style.top)-e+"px";F.DescriptionBar.Obj.style.top=parseFloat(F.DescriptionBar.Obj.style.top)-e+"px";if(K!=null)K.style.top=parseFloat(K.style.top)-e+"px";F.Root.Obj.style.height=r.Height+"px";F.ContentBody.Obj.style.height=parseFloat(F.ContentBody.Obj.style.height)-e+"px";if(F.ContentBody2.Obj!=null)F.ContentBody2.Obj.style.height=parseFloat(F.ContentBody2.Obj.style.height)-e+"px";if(r.IsResizible===true)P.Obj.style.top=parseFloat(P.Obj.style.top)-
e+"px";F.Root.Obj.style.top=(r.ParentHeight-r.Height)/2+"px"}}catch(f){c=false,r.Log("Resize",LOG.EXCEPTION,"for > "+D,f)}return c};this.GetBoundingRect=function(){var a=null;try{var b=F.Root.Obj.style.visibility;F.Root.Obj.style.visibility="visible";a=F.Root.Obj.getBoundingClientRect();F.Root.Obj.style.visibility=b}catch(c){r.Log("GetBoundingRect",LOG.EXCEPTION,"for > "+D,c)}return a}};
clsBorderLessWindow=function(){function d(a){var c=true;try{typeof a.onselectstart!="undefined"?a.onselectstart=function(){return false}:typeof a.style.MozUserSelect!="undefined"?a.style.MozUserSelect="none":a.onmousedown=function(){return false},a.style.cursor="default"}catch(d){c=false,b.Log("DisableSelection",LOG.EXCEPTION,"",d)}return c}clsPlayerBase.call(this,"clsBorderLessWindow");var b=this,c,e={Root:new clsFWComponent,ContentBody:new clsFWComponent};this.ContentBody=null;this.Visible=true;
this.Left=new Number(0);this.Top=new Number(0);this.Width=new Number(0);this.Height=new Number(0);this.ZIndex=0;this.onShow=this.onHide=null;this.Create=function(a){var f=true;try{if(a==null||a==void 0)throw"holderDiv is not supplied";c=a;a=true;try{e.ContentBody.Left=0,e.ContentBody.Top=0,e.ContentBody.Width=b.Width,e.ContentBody.Height=b.Height}catch(n){a=false,b.Log("CreateContentBodyDiv",LOG.EXCEPTION,"",n)}if(a==false)throw"Error @ CollectCordsForBLW";a=true;try{var g=b.CreateHTMLElement("div");
g.style.top=b.Top+"px";g.style.width=b.Width+"px";g.style.left=b.Left+"px";g.style.height=b.Height+"px";g.style.visibility="visible";g.style.display=g_inline;g.style.zIndex=b.ZIndex;g.style.border="1px";g.style.overflow="hidden";c.appendChild(g);e.Root.Obj=document.getElementById(g.id);if(BROWSER.LEGACY==true&&c.style.filter!="")e.Root.Obj.style.filter="alpha(opacity=100)";if(d(e.Root.Obj)==false)throw"Error @ DisableSelection";g=true;try{var k=b.CreateHTMLElement("DIV");k.style.position="absolute";
k.style.left=e.ContentBody.Left+"px";k.style.top=e.ContentBody.Top+"px";k.style.padding="0px";k.style.width=e.ContentBody.Width+"px";k.style.height=e.ContentBody.Height+"px";k.style.visibility="visible";k.style.display=g_inline;k.style.overflow="auto";k.dir=uid_json.settings.template.rtl;k.unselectable=true;e.Root.Obj.appendChild(k);b.ContentBody=document.getElementById(k.id);e.ContentBody.Obj=b.ContentBody}catch(o){g=false,b.Log("CreateContentBodyDiv",LOG.EXCEPTION,"",o)}if(g==false)throw"Error @ CreateContentBodyDiv";
}catch(v){a=false,b.Log("ConstructBorderLessWindow",LOG.EXCEPTION,"",v)}if(a==false)throw"Error @ ConstructBorderLessWindow";}catch(p){f=false,b.Log("Create",LOG.EXCEPTION,"",p)}return f};this.SetFooterMessage=function(){};this.SetCaption=function(){return true};this.Hide=function(){try{b.onHide!=null&&setTimeout(b.onHide,1),e.Root.Obj.style.display="none",b.Visible=false}catch(a){b.Log("Hide",LOG.EXCEPTION,"",a)}};this.Show=function(){try{b.onShow!=null&&setTimeout(b.onShow,1),e.Root.Obj.style.display=
g_inline,b.Visible=true}catch(a){b.Log("Show",LOG.EXCEPTION,"",a)}};this.MoveTo=function(a,c){try{b.Left=a,b.Top=c,e.Root.Obj.style.left=a+"px",e.Root.Obj.style.top=c+"px"}catch(d){b.Log("MoveTo",LOG.EXCEPTION,"",d)}};this.GetBoundingRect=function(){var a=null;try{a=e.Root.Obj.getBoundingClientRect()}catch(c){b.Log("GetBoundingRect",LOG.EXCEPTION,"",c)}return a}};
clsMIQ=function(){function d(){var b=true;try{if(a.FWManual.ContentBody!=null)a.FWManual.ContentBody.innerHTML="";if(a.FWInfo.ContentBody!=null)a.FWInfo.ContentBody.innerHTML="";a.ThemedInfo!=null&&a.ThemedInfo.ClearBody();a.FWInfo.SetFooterMessage("");if(a.FWQuestion.ContentBody!=null)a.FWQuestion.ContentBody.innerHTML="";if(a.FWAssessment.ContentBody!=null)a.FWAssessment.ContentBody.innerHTML="";if(a.FWWorkflow.ContentBody!=null)a.FWWorkflow.ContentBody.innerHTML="";if(a.FWVariation!=null&&a.FWVariation.ContentBody!=
null)a.FWVariation.ContentBody.innerHTML=""}catch(c){b=false,a.Log("ClearInnerHTML",LOG.EXCEPTION,"",c)}return b}function b(b){var c=true;try{var d="",d=String(o[b].spec.cord),e=new Number(uid_json.psim.layout.specs.general.canvasbuffer),b=1;g_enabledualmonitor==true&&(b=2);if(d!=""&&d!=void 0){var f=d.split("|");BorderWidth=4;h=Number(f[3]);f[3].indexOf("%")!=-1&&(hp=Number(f[3].replace("%","")),h=Math.ceil(a.ParentHeight*(hp/100)),h-=e*2+BorderWidth*2);w=Number(f[2]);f[2].indexOf("%")!=-1&&(wp=
Number(f[2].replace("%","")),w=Math.ceil(a.ParentWidth/b*(wp/100)),w-=e*2+BorderWidth*2)}var g=a.ParentWidth/b-w;g-=BorderWidth*2;g/=2;var k=a.ParentHeight-h;k-=BorderWidth;k/=2;a.Left=g;a.Top=k;a.Width=w;a.Height=h}catch(n){c=false,a.Log("CollectRequiredData",LOG.EXCEPTION,"",n)}return c}function c(){var c=true;try{Messages=messages_json.psim.commonmsg!=void 0?messages_json.psim.commonmsg:messages_json.psim.canvas.commonmsg;var d=a.CreateHTMLElement("div");d.style.left=a.Left+"px";d.style.top=a.Top+
"px";d.style.width=a.ParentWidth+"px";d.style.height=a.ParentHeight+"px";d.style.visibility="visible";d.style.fontFamily=uid_json.settings.general.defaultfontfamilyefx;d.style.fontSize=uid_json.settings.general.defaultfontsizeefx;d.style.zIndex=ZINDEX.TEMPLATE;d.style.display=g_inline;f.appendChild(d);n=document.getElementById(d.id);a.MIQMainDiv=n;a.FWManual=new clsFloatingWindow("manual");b("manual");a.FWManual.Left=Number(a.Left);a.FWManual.Top=Number(a.Top);a.FWManual.Width=Number(a.Width);a.FWManual.Height=
Number(a.Height);a.FWManual.BaseImage=a.FWImageForM;a.FWManual.IconImage=a.IconImageForM;a.FWManual.IconRequired=true;a.FWManual.ZIndex=ZINDEX.TEMPLATE;a.FWManual.FWData=v[o.manual.fw.h5d];a.FWManual.FooterRequired=true;a.FWManual.onContinueClick=a.onContinueClick;a.FWManual.ContinueText=Messages.status_continue.text;a.FWManual.ContinueRequired=true;e("manual",a.FWManual);if(a.FWManual.Create(n)==false)throw"error @  ME.FWManual.Create()";if(uid_json.settings.template.themedinfo!=void 0&&uid_json.settings.template.themedinfo!=
"")if(uid_json.infosteps!=void 0){var d="",g=uid_json.settings.template.themedinfo.split("|");for(i in g)eval("uid_json.infosteps.ist_"+g[i])!=void 0?d+=d==""?g[i]:"|"+g[i]:a.Log("Construct",LOG.ERROR,"Infostep Theme ID Missing in uid.etpx ",g[i]);if(d!=""&&(a.ThemedInfo=new clsThemedInfoStep(d),a.ThemedInfo.ImageList=a.InfoStepThemeImages,a.ThemedInfo.ZIndex=ZINDEX.TEMPLATE,a.ThemedInfo.Create(n)==false))throw"Error ME.ThemedInfo.Create";}else a.Log("Construct",LOG.ERROR,"Infostep Theme ID are not mentioned in uid.etpx ",
"");a.FWInfo=new clsFloatingWindow("info");b("info");a.FWInfo.Left=Number(a.Left);a.FWInfo.Top=Number(a.Top);a.FWInfo.Width=Number(a.Width);a.FWInfo.Height=Number(a.Height);a.FWInfo.BaseImage=a.FWImageForI;a.FWInfo.ZIndex=ZINDEX.TEMPLATE;a.FWInfo.IconImage=a.IconImageForI;a.FWInfo.IconRequired=true;a.FWInfo.FWData=v[o.info.fw.h5d];a.FWInfo.onContinueClick=a.onContinueClick;a.FWInfo.FooterRequired=true;a.FWInfo.ContinueText=Messages.status_continue.text;a.FWInfo.ContinueRequired=true;e("info",a.FWInfo);
if(a.FWInfo.Create(n)==false)throw"error @  ME.FWInfo.Create()";a.FWQuestion=new clsFloatingWindow("question");b("question");a.FWQuestion.Left=Number(a.Left);a.FWQuestion.Top=Number(a.Top);a.FWQuestion.Width=Number(a.Width);a.FWQuestion.Height=Number(a.Height);a.FWQuestion.BaseImage=a.FWImageForQ;a.FWQuestion.IconImage=a.IconImageForQ;a.FWQuestion.ZIndex=ZINDEX.TEMPLATE;a.FWQuestion.IconRequired=true;a.FWQuestion.onContinueClick=a.onContinueClick;a.FWQuestion.FooterRequired=true;a.FWQuestion.ContinueText=
Messages.status_continue.text;a.FWQuestion.ContinueRequired=true;a.FWQuestion.FWData=v[o.question.fw.h5d];e("question",a.FWQuestion);if(a.FWQuestion.Create(n)==false)throw"error @  ME.FWQuestion.Create()";String(o.assessment.spec.windowless)==="0"?(a.FWAssessment=new clsFloatingWindow("assessment"),b("assessment"),a.FWAssessment.Left=Number(a.Left),a.FWAssessment.Top=Number(a.Top),a.FWAssessment.Width=Number(a.Width),a.FWAssessment.Height=Number(a.Height),a.FWAssessment.BaseImage=a.FWImageForA,a.FWAssessment.ZIndex=
ZINDEX.TEMPLATE,a.FWAssessment.FWData=v[o.assessment.fw.h5d],a.FWAssessment.onContinueClick=a.onContinueClick,a.FWAssessment.FooterRequired=true,a.FWAssessment.ContinueText=Messages.status_continue.text,a.FWAssessment.ContinueRequired=true,e("assessment",a.FWAssessment)):(a.FWAssessment=new clsBorderLessWindow,b("assessment"),a.FWAssessment.Left=Number(a.Left),a.FWAssessment.Top=Number(a.Top),a.FWAssessment.Width=Number(a.Width),a.FWAssessment.Height=Number(a.Height),a.FWAssessment.ZIndex=ZINDEX.TEMPLATE);
if(a.FWAssessment.Create(n)==false)throw"error @  ME.FWAssessment.Create()";String(o.workflow.spec.windowless)=="0"?(a.FWWorkflow=new clsFloatingWindow("workflow"),b("workflow"),a.FWWorkflow.Left=Number(a.Left),a.FWWorkflow.Top=Number(a.Top),a.FWWorkflow.Width=Number(a.Width),a.FWWorkflow.MaxWidth=Number(a.Width),a.FWWorkflow.Height=Number(a.Height),a.FWWorkflow.MaxHeight=Number(a.Height),a.FWWorkflow.BaseImage=a.FWImageForW,a.FWWorkflow.ZIndex=ZINDEX.TEMPLATE,a.FWWorkflow.IconImage=a.IconImageForW,
a.FWWorkflow.IconRequired=true,a.FWWorkflow.FWData=v[o.workflow.fw.h5d],a.FWWorkflow.onContinueClick=a.onContinueClick,a.FWWorkflow.FooterRequired=true,a.FWWorkflow.ContinueText=Messages.status_continue.text,a.FWWorkflow.ContinueRequired=true,e("workflow",a.FWWorkflow)):(a.FWWorkflow=new clsBorderLessWindow,b("workflow"),a.FWWorkflow.Left=Number(a.Left),a.FWWorkflow.Top=Number(a.Top),a.FWWorkflow.Width=Number(a.Width),a.FWWorkflow.Height=Number(a.Height),a.FWWorkflow.ZIndex=ZINDEX.TEMPLATE);if(a.FWWorkflow.Create(n)==
false)throw"error @  ME.FWWorkflow.Create()";a.FWWorkflow.ContentBody.style.textAlign="center";if(uid_json.psim.layout.h5dobjects.variation!=null&&(a.FWVariation=new clsFloatingWindow("variation"),b("variation"),a.FWVariation.Left=Number(a.Left),a.FWVariation.Top=Number(a.Top),a.FWVariation.Width=Number(a.Width),a.FWVariation.Height=Number(a.Height),a.FWVariation.BaseImage=a.FWImageForV,a.FWVariation.IconImage=a.IconImageForV,a.FWVariation.ZIndex=ZINDEX.TEMPLATE,a.FWVariation.IconRequired=uid_json.settings.general.mvariationsonfooter==
"1"?false:true,a.FWVariation.onContinueClick=a.onContinueClick,a.FWVariation.FooterRequired=true,a.FWVariation.ContinueText=Messages.status_continue.text,a.FWVariation.ContinueRequired=uid_json.settings.general.mvariationsonfooter=="1"?false:true,a.FWVariation.FWData=v[o.variation.fw.h5d],e("variation",a.FWVariation),a.FWVariation.Create(n)==false))throw"error @  ME.FWVariation.Create()";}catch(k){c=false,a.Log("Construct",LOG.EXCEPTION,"",k)}return c}function e(b,c){var d=true;try{if(o[b].spec.header!=
void 0)c.HeaderCSS=o[b].spec.header.css;if(o[b].spec.body!=void 0)c.BodyCSS=o[b].spec.body.css;if(o[b].spec.footer!=void 0)c.FooterCSS=o[b].spec.footer.css}catch(e){d=false,a.Log("SetCustomCSS",LOG.EXCEPTION,"",e)}return d}clsPlayerBase.call(this);var a=this;a.ClassName="clsMIQ";var f=null,n=null;this.FWVariation=this.FWWorkflow=this.FWAssessment=this.FWQuestion=this.ThemedInfo=this.FWInfo=this.FWManual=null;var g=new clsWorkflowRenderer,k=new clsVariationRenderer,o=uid_json.psim.layout.h5dobjects,
v=uid_json.resources.h5dialogs;this.ParentHeight=this.ParentWidth=this.Left=this.Top=this.Height=this.Width=0;this.FWImageForM={};this.FWImageForI={};this.FWImageForQ={};this.FWImageForA={};this.FWImageForW={};this.FWImageForV={};this.InfoStepThemeImages={};this.onVariationOptionClicked=this.onWFShapeClicked=this.onContinueClick=this.MIQMainDiv=this.IconImageForV=this.IconImageForW=this.IconImageForA=this.IconImageForQ=this.IconImageForI=this.IconImageForM=null;this.Create=function(b){var d=true;
try{if(b==void 0)throw"error @ Initailze holderDiv Not supplied";f=b;if(c()==false)throw"error @ clsMIQ Construct";}catch(e){d=false,a.Log("Create",LOG.EXCEPTION,"",e)}return d};this.Reset=function(){k.Reset()};this.BindControls=function(){var b=true;try{if(a.ThemedInfo!=null)a.ThemedInfo.onContinueClick=a.onContinueClick;if(g!=null)g.onWFShapeClicked=a.onWFShapeClicked;if(k!=null)k.onVariationOptionClicked=a.onVariationOptionClicked}catch(c){b=false,a.Log("BindControls",LOG.EXCEPTION,"",c)}return b};
this.Show=function(b,c,d){var e=true;try{switch(a.FWManual.Hide(),a.ThemedInfo!=null&&a.ThemedInfo.Hide(),a.FWInfo.Hide(),a.FWQuestion.Hide(),a.FWAssessment.Hide(),a.FWWorkflow.Hide(),a.FWVariation!=null&&a.FWVariation.Hide(),n.style.display=g_inline,b){case MIQTYPE.MANUAL:a.FWManual.Show(null,d);break;case MIQTYPE.INFOSTEP:c!=""?a.ThemedInfo.Show(c,d):a.FWInfo.Show(null,d);break;case MIQTYPE.QUESTION:a.FWQuestion.Show(null,d);break;case MIQTYPE.ASSESSMENT:a.FWAssessment.Show(null,d);break;case MIQTYPE.WORKFLOW:a.FWWorkflow.Show(null,
d);break;case MIQTYPE.VARIATION:a.FWVariation.Show(null,d)}}catch(f){e=false,a.Log("Show",LOG.EXCEPTION,"",f)}return e};this.Hide=function(){var b=true;try{d(),n.style.display="none"}catch(c){b=false,a.Log("Hide",LOG.EXCEPTION,"",c)}return b};this.SetCaption=function(b,c,d){var e=true;try{switch(b){case MIQTYPE.MANUAL:a.FWManual.SetCaption(c);break;case MIQTYPE.INFOSTEP:d!=""?a.ThemedInfo.SetCaption(c,d):a.FWInfo.SetCaption(c);break;case MIQTYPE.QUESTION:a.FWQuestion.SetCaption(c);break;case MIQTYPE.ASSESSMENT:a.FWAssessment!=
null&&a.FWAssessment.SetCaption(c);break;case MIQTYPE.WORKFLOW:a.FWWorkflow!=null&&a.FWWorkflow.SetCaption(c);break;case MIQTYPE.VARIATION:a.FWVariation.SetCaption(c)}}catch(f){e=false,a.Log("SetCaption",LOG.EXCEPTION,"",f)}return e};this.SetFooterMessage=function(b,c,d){var e=true;try{switch(b){case MIQTYPE.INFOSTEP:c!=""?a.ThemedInfo.SetFooterMessage(c,d):a.FWInfo.SetFooterMessage(d);break;case MIQTYPE.QUESTION:a.FWQuestion.SetFooterMessage(d);break;case MIQTYPE.MANUAL:a.FWManual.SetFooterMessage(d);
break;case MIQTYPE.VARIATION:a.FWVariation.SetFooterMessage(d)}}catch(f){e=false,a.Log("SetFooterMessage",LOG.EXCEPTION,"",f)}return e};this.SetContentBody=function(b,c,e,f){var n=true;try{if(d()==false)throw"Error @ ClearInnerHTML";switch(b){case MIQTYPE.MANUAL:a.FWManual.ContentBody.appendChild(c);break;case MIQTYPE.INFOSTEP:e!=""?a.ThemedInfo.SetContentBody(c,e):(c.style.padding="10px",c.style.width=parseInt(a.FWInfo.ContentBody.style.width)-20+"px",c.style.height=parseInt(a.FWInfo.ContentBody.style.height)-
20+"px",a.FWInfo.ContentBody!=null&&a.FWInfo.ContentBody.appendChild(c));break;case MIQTYPE.QUESTION:a.FWQuestion.ContentBody.appendChild(c);break;case MIQTYPE.ASSESSMENT:c.style.border="0px";c.style.width=parseInt(a.FWAssessment.ContentBody.style.width)+"px";c.style.height=parseInt(a.FWAssessment.ContentBody.style.height)-4+"px";a.FWAssessment.ContentBody.appendChild(c);break;case MIQTYPE.WORKFLOW:g.Initialize(a.FWWorkflow.ContentBody);if(g.Create(c)==false)throw"Error @ m_objWFRenderer.Create";
b=50;uid_json.settings.general.minimumworkflowresizeratio!=void 0&&(b=Number(uid_json.settings.general.minimumworkflowresizeratio));b<0&&(b=50);b/=100;e=c=0;f=1;g_enabledualmonitor==true&&(f=2);c=Math.floor(g_objTR.CanvasWidth/f*b)+20;e=Math.floor(g_objTR.CanvasHeight*b)+20;c<g.Width&&(c=g.Width+20);e<g.Height&&(e=g.Height+20);if(a.FWWorkflow.Resize(c,e)==false)throw"Error @ ME.FWWorkflow.Resize";if(g.AdjustData()==false)throw"Error @ m_objWFRenderer.AdjustData";break;case MIQTYPE.VARIATION:if(c.style.padding=
"10px",c.style.width=parseInt(a.FWVariation.ContentBody.style.width)-20+"px",c.style.height=parseInt(a.FWVariation.ContentBody.style.height)-20+"px",k.Initialize(a.FWVariation.ContentBody,a.FWVariation.FooterMsgDiv),k.Create(c.innerHTML,f)==false)throw"Error @ m_objWFRenderer.Create";}}catch(o){n=false,a.Log("SetContentBody",LOG.EXCEPTION,"",o)}return n}};
function clsModeIndicator(){function d(a,c,d){var e=true;try{var k=b.DialogPage[d].UIDData.layout.controls,o=b.DialogPage[d].Controls;o[a]!=null&&(k[c].selected=="1"?o[a].SetState(BUTTONSTATE.CLICKED):o[a].SetState(BUTTONSTATE.NORMAL))}catch(v){e=false,b.Log("SetNormalClicked ->"+a,LOG.EXCEPTION,v)}return e}clsPlayerBase.call(this,"clsModeIndicator");var b=this,c=null;this.Height=this.Width=this.Top=this.Left=this.ZIndex=0;this.ImageList={};this.IconImage=null;var e=messages_json.modeindicator;this.DialogPage=
{sm_start:new clsThemeRenderer(MITYPE.SMSTART,e),sm_end:new clsThemeRenderer(MITYPE.SMEND,e),gm_start:new clsThemeRenderer(MITYPE.GMSTART,e),gm_end:new clsThemeRenderer(MITYPE.GMEND,e),tm_start:new clsThemeRenderer(MITYPE.TMSTART,e),tm_end:new clsThemeRenderer(MITYPE.TMEND,e)};this.Show=function(a){var f=true;try{var n=true;try{switch(a){case MITYPE.SMEND:d("Show","mode_show",a);d("Guide","mode_guide",a);g_objGS.General.HomeAvailable==true&&d("Home","home",a);break;case MITYPE.GMEND:d("Guide","mode_guide",
a);d("Test","mode_test",a);g_objGS.General.HomeAvailable==true&&d("Home","home",a);break;case MITYPE.TMEND:d("Review","review",a),d("Test","mode_test",a),g_objGS.General.HomeAvailable==true&&d("Home","home",a)}}catch(g){n=false,b.Log("ResetIcons > "+a,LOG.EXCEPTION,g)}if(n==false)throw"Error @ ResetIcons";c.style.display=g_inline;if(b.DialogPage[a].Show()==false)throw"Error @ ME.DialogPage[eMIType].Show() for > "+a;if(a==MITYPE.TMEND){if(g_objTracker.ContentPreferences.LatestTMResult==false){b.DialogPage[a].Controls.Pass!=
null&&b.DialogPage[a].Controls.Pass.SetState(BUTTONSTATE.HIDDEN);if(b.DialogPage[a].Controls.Fail!=null)b.DialogPage[a].Controls.Fail.Locked=true,b.DialogPage[a].Controls.Fail.SetState(BUTTONSTATE.NORMAL);var k=messages_json.modeindicator.tm_end.body_fail.text,k=k.replace("%1",g_objTracker.ContentPreferences.LatestTMPassScore),k=k.replace("%2",g_objTracker.ContentPreferences.LatestTMScore);b.DialogPage[a].SetContentBody(k);k="<table width='100%' height='100%' ><tr><td style='"+e[a].fail.css+"' >"+
e[a].fail.text+"</td></tr></table>"}else{b.DialogPage[a].Controls.Fail!=null&&b.DialogPage[a].Controls.Fail.SetState(BUTTONSTATE.HIDDEN);if(b.DialogPage[a].Controls.Pass!=null)b.DialogPage[a].Controls.Pass.Locked=true,b.DialogPage[a].Controls.Pass.SetState(BUTTONSTATE.NORMAL,true);k=messages_json.modeindicator.tm_end.body_pass.text;k=k.replace("%1",g_objTracker.ContentPreferences.LatestTMPassScore);k=k.replace("%2",g_objTracker.ContentPreferences.LatestTMScore);b.DialogPage[a].SetContentBody(k);k=
"<table width='100%' height='100%' ><tr><td style='"+e[a].pass.css+"' >"+e[a].pass.text+"</td></tr></table>"}b.DialogPage[a].SetResult(k);if(uid_json.settings.mode_test.cuecardbehavior==CCBEHAVIOURTM.SHOWNEVER&&(b.DialogPage[a].Controls.Review!=null&&b.DialogPage[a].Controls.Review.Hide(),b.DialogPage[a].Holders.Review!=null))b.DialogPage[a].Holders.Review.style.display="none"}}catch(o){f=false,b.Log("Show",LOG.EXCEPTION,o)}return f};this.Hide=function(){for(var a in b.DialogPage)b.DialogPage[a].Hide();
c.style.display="none"};this.SetContentBody=function(a,c){b.DialogPage[c].SetContentBody(a)};this.SetContentTitle=function(a,c){b.DialogPage[c].SetCaption(a)};this.SetFooterMessage=function(a,c){b.DialogPage[a].SetFooterMessage(c)};this.SetFocus=function(a){b.DialogPage[a].SetFocus(a)};this.Create=function(a){var d=true;try{var e=b.CreateHTMLElement("DIV");e.align="center";var g="";e.style.display="none";e.style.visibility="visible";e.style.position="absolute";e.style.left=a.style.left;e.style.top=
a.style.top;e.style.width=a.style.width;e.style.height=a.style.height;e.style.zIndex=ZINDEX.MODEINDICATOR;g=uid_json.modeindicators.alpha_background_color;if(BROWSER.LEGACY==true&&g.indexOf("rgba")!=-1){var k=g.split(","),o=parseFloat(k.pop())*100;e.style.filter="alpha(opacity="+o+")";g=k.join().replace(/rgba/i,"rgb")+")"}e.style.backgroundColor=g;a.appendChild(e);c=document.getElementById(e.id);for(var v in b.DialogPage){var p=b.DialogPage[v];p.Left=b.Left;p.Top=b.Top;p.UIDData=uid_json.modeindicators[v];
if(p.UIDData!=void 0){p.ImageList=b.ImageList;if(p.Initialize(c)==false)throw"Error @ objPage.Initialize for "+v;switch(v){case "sm_start":p.DefaultControl=p.Controls.Continue;break;case "sm_end":p.DefaultControl=uid_json.settings.mode_guide.available==true?p.Controls.Guide:g_objGS.General.HomeAvailable==true?p.Controls.Home:p.Controls.Show;break;case "gm_start":p.DefaultControl=p.Controls.Continue;break;case "gm_end":p.DefaultControl=uid_json.settings.mode_test.available==true?p.Controls.Test:g_objGS.General.HomeAvailable==
true?p.Controls.Home:p.Controls.Guide;break;case "tm_start":p.DefaultControl=p.Controls.Continue;break;case "tm_end":p.DefaultControl=g_CommandArgs[CMDARGS.LAUNCHSOURCE]!=LAUNCHSOURCETYPE.PRESENTATIONEDITOR&&g_CommandArgs[CMDARGS.LAUNCHSOURCE]!=LAUNCHSOURCETYPE.PRESENTATIONOUTPUT?p.Controls.Close:p.Controls.Home}}}}catch(q){d=false,b.Log("Create",LOG.EXCEPTION,q)}return d}}
clsZoomPopUp=function(){function d(a,c,d){var e=true;try{var o=g_objGS.General.ResizeFactor;f=new clsSlider;f.Top=parseInt(k.height)+10;f.Create(a,c,d,uid_json.settings.general.zoomfactors,o,uid_json.settings.general.zoomfactors[0],uid_json.settings.general.zoomfactors[uid_json.settings.general.zoomfactors.length-1],true,false);f.onSlide=function(a){g=a;k.innerHTML="<span> "+g+" % </span>"};f.onSlideStop=function(a){b.onSlideEnded();g_objGS.General.ResizeFactor=a/100;k.innerHTML="<span> "+g+" % </span>";
uid_json.settings.stepimage.imageresizeoption=IMAGERESIZE.FULLIMAGE;b.onStepReloadRequested();clearTimeout(n);n=0;return false}}catch(B){e=false,b.Log("CreateZoomSlider",LOG.EXCEPTION,"",B)}return e}clsPlayerBase.call(this,"clsZoomPopUp");var b=this,c=uid_json.psim.layout.h5dobjects,e=uid_json.resources.h5dialogs,a=null,f=null,n,g=0;this.ContentBody=this.FWData=null;this.Visible=false;this.FWBaseImage=null;this.Width=this.Height=this.Top=this.Left=0;var k=null;this.onHide=this.onSlideEnded=this.onStepReloadRequested=
null;var o=messages_json.psim.footer;this.Create=function(f){a=new clsFloatingWindow("zoompopup");a.Left=b.Left;a.Top=b.Top;a.Width=b.Width;a.Height=b.Height;a.ZIndex=ZINDEX.POPUP;a.BaseImage=b.FWBaseImage;a.CloseRequired=c.zoom.fw.close=="1"?true:false;a.IsFloating=c.speed.fw.floating=="1"?true:false;a.FWData=e[c.zoom.fw.h5d];if(c.zoom.spec.header!=void 0)a.HeaderCSS=c.zoom.spec.header.css;if(c.zoom.spec.body!=void 0)a.BodyCSS=c.zoom.spec.body.css;if(c.zoom.spec.footer!=void 0)a.FooterCSS=c.zoom.spec.footer.css;
a.onHide=function(){b.Visible=false;if(b.onHide!=null)b.onHide()};if(a.Create(f)==false)throw"Error @ m_fwCuecard.Create";a.ContentBody.style.overFlowX="hidden";a.ContentBody.style.overflowY="hidden";var g=b.GetUniqueID(),n=b.GetUniqueID(),f=b.GetUniqueID(),E=parseInt(a.ContentBody.style.height),u=parseInt(a.ContentBody.style.width),E="<table style='text-align:center;' cellpadding=0 cellspacing=0 width=100% height=100%><tr><td height='"+E*15/100+"px' id='"+f+"' style='"+g_GetCSSForTD(uid_json.psim.layout.h5dobjects.zoom.spec.value.css)+
"'></td></tr><tr><td valign='middle' align='center' height='"+E*60/100+"px' style='border-top:1px solid #c3c3c3'><table border=0 cellpadding=0 cellspacing=0 width=100% height=100%><tr><td valign='middle' align='center'><span style='width:"+u+"px;height:"+(E-20)*60/100+"px' id="+g+" ></span></td></tr></table></td></tr><tr><td valign='middle' style='padding:5px;border-top:1px solid #c3c3c3;' ><button  id="+n+" style='"+o.zoompopup_button.css+"' >"+o.zoompopup_button.text+"</button></td><tr></table>";
a.ContentBody.innerHTML=E;g=document.getElementById(g);n=document.getElementById(n);k=document.getElementById(f);f=parseFloat(g.style.height)-10;n.onclick=function(){uid_json.settings.stepimage.imageresizeoption=IMAGERESIZE.FITTOCANVAS;b.onStepReloadRequested()};if(d(g,8,f)==false)throw"Error @ CreateZoomSlider";if(a.SetCaption('<span style="'+o.zoompopup_title.css+'">'+o.zoompopup_title.text+"</span>")==false)throw"Error @ m_fwZoom.SetCaption";a.Hide()};this.SetValue=function(a){var c=true;try{if(k.innerHTML=
"<span> "+Math.round(a)+"%</span>",f.SetValue(a)===false)throw"Error @ m_objZoomslider.SetValue";}catch(d){c=false,b.Log("SetValue",LOG.EXCEPTION,"",d)}return c};this.Show=function(){var c=true;try{a.Show(),b.Visible=true}catch(d){c=false,b.Log("Show",LOG.EXCEPTION,"",d)}return c};this.Hide=function(){var c=true;try{a.Hide(),b.Visible=false}catch(d){c=false,b.Log("Hide",LOG.EXCEPTION,"",d)}return c}};
clsSpeedPopUp=function(){function d(a,c,d){var e=true;try{var o=uid_json.settings.speed.cursorspeedfactors,v=uid_json.settings.speed.level,p=new clsSlider;p.Create(a,c,d,o,v,0,o.length-1,false,true);p.onSlide=function(a){b.onSlideEnded();uid_json.settings.speed.level=a}}catch(q){e=false,b.Log("CreateSpeedSlider",LOG.EXCEPTION,"",q)}return e}clsPlayerBase.call(this,"clsModePopUp");var b=this,c=uid_json.psim.layout.h5dobjects,e=uid_json.resources.h5dialogs,a=null;this.ContentBody=null;this.Visible=
false;this.FWBaseImage={};this.Width=this.Height=this.Top=this.Left=0;this.onHide=this.onSlideEnded=null;this.Create=function(f){a=new clsFloatingWindow("speedpopup");var n=messages_json.psim.footer;a.Left=b.Left;a.Top=b.Top;a.Width=b.Width;a.Height=b.Height;a.ZIndex=ZINDEX.POPUP;a.BaseImage=b.FWBaseImage;a.CloseRequired=c.speed.fw.close=="1"?true:false;a.IsFloating=c.speed.fw.floating=="1"?true:false;a.FWData=e[c.speed.fw.h5d];if(c.speed.spec.header!=void 0)a.HeaderCSS=c.speed.spec.header.css;if(c.speed.spec.body!=
void 0)a.BodyCSS=c.speed.spec.body.css;if(c.speed.spec.footer!=void 0)a.FooterCSS=c.speed.spec.footer.css;a.onHide=function(){b.Visible=false;if(b.onHide!=null)b.onHide()};if(a.Create(f)==false)throw"Error @ m_fwCuecard.Create";f=parseFloat(a.ContentBody.style.height)*80/100;a.ContentBody.style.overflowX="hidden";a.ContentBody.style.overflowY="hidden";a.ContentBody.style.width=parseInt(a.ContentBody.style.width)+"px";a.ContentBody.style.padding="0px";a.ContentBody.style.top=parseInt(a.FWData.top_corner_height)+
"px";if(d(a.ContentBody,8,f)==false)throw"Error @ CreateSpeedSlider";if(a.SetCaption('<span style="'+n.speedpopup_title.css+'">'+n.speedpopup_title.text+"</span>")==false)throw"Error @ m_fwSpeed.SetCaption";a.Hide()};this.Show=function(){var c=true;try{a.Show(),b.Visible=true}catch(d){c=false,b.Log("Show",LOG.EXCEPTION,"",d)}return c};this.Hide=function(){var c=true;try{a.Hide(),b.Visible=false}catch(d){c=false,b.Log("Hide",LOG.EXCEPTION,"",d)}return c}};
clsModePopUp=function(){function d(a){var c=true;try{a.style.overflow="hidden";var d=b.GetUniqueID(),o=b.GetUniqueID(),v=b.GetUniqueID();b.GetUniqueID();var p,q=messages_json.psim.footer,E="";E+="<table width='100%' height='100%' cellpadding=0 cellspacing=0 border=0 >";uid_json.settings.mode_test.available==true&&(E+="<tr>",E+="<td style='"+g_GetCSSForTD(e.mode.spec.icon.css)+"'> <img src='"+f.mode_test.src+"'/> </td>",E+="<td style='"+g_GetCSSForTD(e.mode.spec.tdtext.css)+"' width='100%'><span id='"+
v+"' style=\""+g_GetCSSForTD(e.mode.spec.spntext.css)+'">'+q.popup_mode_test.text+"</span></td>",E+="</tr>");uid_json.settings.mode_guide.available==true&&(E+="<tr>",E+="<td style='"+g_GetCSSForTD(e.mode.spec.icon.css)+"'> <img src='"+f.mode_guide.src+"'/> </td>",E+="<td style='"+g_GetCSSForTD(e.mode.spec.tdtext.css)+"' width='100%'><span id='"+o+"' style=\""+g_GetCSSForTD(e.mode.spec.spntext.css)+'">'+q.popup_mode_guide.text+"</span></td>",E+="</tr>");uid_json.settings.mode_show.available==true&&
(E+="<tr>",E+="<td style='"+g_GetCSSForTD(e.mode.spec.icon.css)+"'> <img src='"+f.mode_show.src+"'/> </td>",E+="<td style='"+g_GetCSSForTD(e.mode.spec.tdtext.css)+"' width='100%'><span id='"+d+"' style=\""+g_GetCSSForTD(e.mode.spec.spntext.css)+'">'+q.popup_mode_show.text+"</span></td>",E+="</tr>");E+="</table>";a.innerHTML=E;if(uid_json.settings.mode_show.available==true)p=document.getElementById(d),p.onclick=function(){return b.onModeChangeRequested(MODETYPE.SHOW)};if(uid_json.settings.mode_guide.available==
true)p=document.getElementById(o),p.onclick=function(){return b.onModeChangeRequested(MODETYPE.GUIDE)};if(uid_json.settings.mode_test.available==true)p=document.getElementById(v),p.onclick=function(){return b.onModeChangeRequested(MODETYPE.TEST)}}catch(u){c=false,b.Log("CreateModeUI",LOG.EXCEPTION,"",u)}return c}clsPlayerBase.call(this,"clsModePopUp");var b=this,c=null,e=uid_json.psim.layout.h5dobjects,a=uid_json.resources.h5dialogs,f=null;this.ContentBody=this.FWData=null;this.Visible=false;this.FWBaseImage=
null;this.Width=this.Height=this.Top=this.Left=0;this.onModeChangeRequested=this.onHide=null;this.Create=function(n,g){var k=true;try{var o;o=messages_json.psim.commonmsg!=void 0?messages_json.psim.commonmsg:messages_json.psim.canvas.commonmsg;f=g;c=new clsFloatingWindow("modepopup");c.Left=b.Left;c.Top=b.Top;c.Width=b.Width;c.Height=b.Height;c.ZIndex=ZINDEX.POPUP;c.BaseImage=b.FWBaseImage;c.FWData=a[e.mode.fw.h5d];c.CloseRequired=e.mode.fw.close=="1"?true:false;c.IsFloating=e.mode.fw.floating=="1"?
true:false;if(e.mode.spec.header!=void 0)c.HeaderCSS=e.mode.spec.header.css;if(e.mode.spec.body!=void 0)c.BodyCSS=e.mode.spec.body.css;if(e.mode.spec.footer!=void 0)c.FooterCSS=e.mode.spec.footer.css;c.onHide=function(){b.Visible=false;if(b.onHide!=null)b.onHide()};if(c.Create(n)==false)throw"Error @ m_fwMode.Create";if(d(c.ContentBody)==false)throw"Error @ CreateModeUI";if(c.SetCaption('<span style="'+o.modepopup_title.css+'">'+o.modepopup_title.text+"</span>")==false)throw"Error @ m_fwMode.SetCaption";
b.ContentBody=c.ContentBody;c.Hide()}catch(v){k=false,b.Log("Create",LOG.EXCEPTION,"",v)}return k};this.Show=function(){var a=true;try{c.Show(),b.Visible=true}catch(d){a=false,b.Log("Show",LOG.EXCEPTION,"",d)}return a};this.Hide=function(){var a=true;try{c.Hide(),b.Visible=false}catch(d){a=false,b.Log("Hide",LOG.EXCEPTION,"",d)}return a}};
clsValidateButton=function(){function d(){try{if(b.onClick!=null)b.onClick();else throw"onClick event not binded";}catch(a){b.Log("m_ValidateBtn_OnClick",LOG.EXCEPTION,"",a)}}clsPlayerBase.call(this,"clsValidateButton");var b=this,c,e=null,a=null,f=null,n=null,g=null,k=null,o=null,v=null,p=null,q=null,E=null,u=null,B=null,A=uid_json.validate.layout.holders,G=null,D="",r=[],H=null,C,J;this.TSProceedDivHeight=this.TSProceedDivWidth=this.ValidateDivHeight=this.ValidateDivWidth=this.ParentWidth=this.ParentHeight=
0;this.onClick=this.onHide=null;this.Create=function(I,L){var N=true;try{if(I==null||I==void 0)throw"holderDiv is not supplied";c=I;e=L;var M=true;try{G=A.maindiv;D=String(G.cord);var K=b.CreateHTMLElement("DIV");r=[];if(D!=""&&D!=void 0)r=D.split("|"),K.style.left=r[0]+"px",K.style.top=r[1]+"px",K.style.width=r[2]+"px",K.style.height=r[3]+"px";K.style.position="absolute";K.style.visibility="hidden";K.style.display="none";K.style.zIndex=ZINDEX.VALIDATEBUTTON;c.appendChild(K);a=document.getElementById(K.id);
b.ValidateDivWidth=a.style.width;b.ValidateDivHeight=a.style.height;var F=document.createElement("table");F.id=b.GetUniqueID();F.width="100%";F.cellPadding="0";F.cellSpacing="0";F.style.cssText="height:100%;";a.appendChild(F);var T=document.getElementById(F.id),S=document.createElement("tr");S.id=b.GetUniqueID();T.appendChild(S);v=document.getElementById(S.id);var O=document.createElement("td");O.id=b.GetUniqueID();O.height="10%";O.colspan="2";O.style.verticalAlign="bottom";v.appendChild(O);q=document.getElementById(O.id);
K=null;try{var P=b.CreateTextHolder(A.arrow_up);P.id=b.GetUniqueID();P.style.position="relative";P.style.zIndex=ZINDEX.VALIDATEBUTTON;P.style.visibility="inherit";P.style.borderColor="transparent transparent "+A.content.css.bc;q.appendChild(P);K=document.getElementById(P.id)}catch(z){K=null}f=K;if(f==null)throw"Error @ DesignArrowDiv Up";S=document.createElement("tr");S.id=b.GetUniqueID();T.appendChild(S);var X=document.getElementById(S.id),Z=document.createElement("td");Z.id=b.GetUniqueID();Z.height=
"80%";Z.width="10%";Z.style.width="10%";Z.style.paddingTop=Number(b.ValidateDivHeight.replace("px",""))/2+"px";Z.style.verticalAlign="top";X.appendChild(Z);u=document.getElementById(Z.id);P=null;try{var Y=document.createElement("div");Y.id=b.GetUniqueID();Y.style.position="absolute";Y.style.visibility="visible";Y.dir=uid_json.settings.template.rtl;Y.style.fontFamily=messages_json.general.common.uifont.text;Y.style.borderColor="transparent "+A.content.css.bc+" transparent transparent";Y.style.borderStyle=
"dashed solid dashed dashed";Y.style.borderWidth="9px 9px 9px 0px";Y.style.position="relative";Y.style.zIndex=ZINDEX.VALIDATEBUTTON;Y.style.visibility="inherit";u.appendChild(Y);P=document.getElementById(Y.id)}catch(U){P=null}g=P;if(g==null)throw"Error @ DesignArrowDiv Left";O=document.createElement("td");O.id=b.GetUniqueID();O.height="80%";X.appendChild(O);B=document.getElementById(O.id);G=A.content;var fa=b.CreateTextHolder(G);fa.id=b.GetUniqueID();fa.style.position="relative";fa.style.zIndex=ZINDEX.VALIDATEBUTTON;
fa.style.visibility="inherit";B.appendChild(fa);k=document.getElementById(fa.id);S=document.createElement("tr");S.id=b.GetUniqueID();T.appendChild(S);p=document.getElementById(S.id);O=document.createElement("td");O.id=b.GetUniqueID();O.height="10%";O.colspan="2";p.appendChild(O);E=document.getElementById(O.id);T=null;try{var R=b.CreateTextHolder(A.arrow_down);R.id=b.GetUniqueID();R.style.position="relative";R.style.zIndex=ZINDEX.VALIDATEBUTTON;R.style.visibility="inherit";R.style.borderColor=A.content.css.bc+
" transparent transparent transparent";E.appendChild(R);T=document.getElementById(R.id)}catch(la){T=null}n=T;if(n==null)throw"Error @ DesignArrowDiv Down";R=true;try{var ha=document.createElement("table");ha.id=b.GetUniqueID();ha.cellpadding="0";ha.cellspacing="0";ha.style.cssText="height:100%;width:100%;";k.appendChild(ha);var ja=document.getElementById(ha.id),ia=document.createElement("tr");ia.id=b.GetUniqueID();ja.appendChild(ia);var ba=document.getElementById(ia.id),ca=document.createElement("td");
ca.id=b.GetUniqueID();ca.height="60%";ca.style.cssText=g_GetCSSForTD(uid_json.validate.layout.holders.content.body.css);ba.appendChild(ca);H=document.getElementById(ca.id);H.innerHTML="<span style='"+e.body.css+"' >"+e.body.text+"</span>";ia=document.createElement("tr");ia.id=b.GetUniqueID();ja.appendChild(ia);ba=document.getElementById(ia.id);ca=document.createElement("td");ca.id=b.GetUniqueID();ca.style.cssText=g_GetCSSForTD(uid_json.validate.layout.holders.content.footer.css);ba.appendChild(ca);
o=document.getElementById(ca.id)}catch(aa){R=false,b.Log("CreateContentsTable",LOG.EXCEPTION,"",aa)}if(R==false)throw"Error @ CreateContentsTable";ha=true;try{var V=document.createElement("BUTTON");J=b.GetUniqueID();V.id=J;ja=100;ia=20;if(A.button!=void 0)var ea=A.button.cord.split("|"),ja=Number(ea[2]),ia=Number(ea[3]);V.style.width=ja+"px";V.style.height=ia+"px";V.style.zIndex=ZINDEX.VALIDATEBUTTON;o.appendChild(V);C=document.getElementById(V.id);C.innerHTML="<span style='"+e.btn.css+"'>"+e.btn.text+
"</span>";C.onclick=d}catch(ga){ha=false,b.Log("CreateValidateButton",LOG.EXCEPTION,"",ga)}if(ha==false)throw"Error @ CreateValidateButton";}catch(ra){M=false,b.Log("Construct",LOG.EXCEPTION,"",ra)}if(M==false)throw"Error @ Construct";}catch(ka){N=false,b.Log("Create",LOG.EXCEPTION,"",ka)}return N};this.Hide=function(){var c=true;try{a.style.display="none",a.style.visibility="hidden"}catch(d){c=false,b.Log("Hide",LOG.EXCEPTION,"",d)}return c};this.Show=function(c,e){var g=true;try{if(a.style.display=
g_inline,a.style.visibility="visible",c==VALIDATEPOSITION.BOTTOM?($("#"+v.id).show(),$("#"+p.id).hide(),$("#"+u.id).hide()):c==VALIDATEPOSITION.TOP?($("#"+v.id).hide(),$("#"+p.id).show(),$("#"+u.id).hide()):c==VALIDATEPOSITION.RIGHT&&($("#"+v.id).hide(),$("#"+p.id).hide(),$("#"+u.id).show()),e===true&&($("#"+f.id).hide(),$("#"+n.id).hide()),BROWSER.LEGACY==true)a.innerHTML=a.innerHTML,C=document.getElementById(J),C.onclick=d}catch(k){g=false,b.Log("Show",LOG.EXCEPTION,"",k)}return g};this.ChangeMessage=
function(a){var c=true;try{H.innerText=e.body.text.replace("%1",a)}catch(d){c=false,b.Log("MoveTo",LOG.EXCEPTION,"",d)}return c};this.MoveTo=function(c,d){var e=true;try{a.style.left=c+"px",a.style.top=d+"px"}catch(f){e=false,b.Log("MoveTo",LOG.EXCEPTION,"",f)}return e};this.GetBoundingRect=function(){var c=null;try{c=a.getBoundingClientRect()}catch(d){b.Log("GetBoundingRect",LOG.EXCEPTION,"",d)}return c}};
function clsThemedInfoStep(d){function b(){var b=true;try{if(d!="")for(var e=d.split("|"),g=0;g<e.length;g++)c.DialogPage["ist_"+e[g]]=new clsThemeRenderer("ist_"+e[g],a)}catch(k){b=false,c.Log("Initialize",LOG.EXCEPTION,"",k)}return b}clsPlayerBase.call(this,"clsThemedInfoStep");var c=this,e=null,a=messages_json.infostep;this.Height=this.Width=this.Top=this.Left=this.ZIndex=0;this.ImageList={};this.onContinueClick=null;this.DialogPage={};this.FooterMsgDiv=null;this.Show=function(a,b){var d=true;
try{e.style.visibility="visible";e.style.display=g_inline;c.FooterMsgDiv=c.DialogPage["ist_"+a].Holders.Footer;var k=c.DialogPage["ist_"+a].Controls.Continue;g_ContinueButton=k;if(b){if(c.DialogPage["ist_"+a].DefaultControl=k,k.Show()==false)throw"Error @ objContinue.Show";}else if(c.DialogPage["ist_"+a].DefaultControl=null,k.Hide()==false)throw"Error @ objContinue.Hide";c.DialogPage["ist_"+a].Show()}catch(o){d=false,c.Log("Show",LOG.EXCEPTION,"ist_"+a+"  is not created",o)}return d};this.ClearBody=
function(){var a=true;try{for(var b in c.DialogPage)c.DialogPage[b].ClearBody()}catch(d){a=false,c.Log("ClearBody",LOG.EXCEPTION,"",d)}return a};this.Hide=function(){var a=true;try{for(var b in c.DialogPage)c.DialogPage[b].Hide();e.style.visibility="hidden"}catch(d){a=false,c.Log("Hide",LOG.EXCEPTION,"",d)}return a};this.SetContentBody=function(a,b){var d=true;try{c.DialogPage["ist_"+b].SetContentBody(a)}catch(e){d=false,c.Log("SetContentBody",LOG.EXCEPTION,"ist_"+b+"  is not created",e)}return d};
this.SetCaption=function(a,b){var d=true;try{c.DialogPage["ist_"+b].SetCaption(a)}catch(e){d=false,c.Log("SetCaption",LOG.EXCEPTION,"ist_"+b+"  is not created",e)}return d};this.SetFooterMessage=function(a,b){var d=true;try{c.DialogPage["ist_"+a].SetFooterMessage(b)}catch(e){d=false,c.Log("SetFooterMessage",LOG.EXCEPTION,"ist_"+a+"  is not created",e)}return d};this.Create=function(a){var d=true;try{if(b()==false)throw"Initilization failed";var g=c.CreateHTMLElement("DIV");g.align="center";g.style.display=
"none";g.style.visibility="visible";g.style.position="absolute";g.style.left=a.style.left;g.style.top=a.style.top;g.style.width=a.style.width;g.style.height=a.style.height;a.appendChild(g);e=document.getElementById(g.id);for(var k in c.DialogPage){var o=c.DialogPage[k];o.Left=c.Left;o.Top=c.Top;o.UIDData=uid_json.infosteps[k];o.ImageList=c.ImageList;o.Initialize(e);o.Controls.Continue.onClick=function(){c.onContinueClick();return false}}}catch(v){d=false,c.Log("Create",LOG.EXCEPTION,"",v)}return d}}
function clsThemeRenderer(d,b){function c(b){var c="";try{var e=null,f=false;switch(String(d)){case "sm_start":f=true;break;case "sm_end":f=true;break;case "gm_start":f=true;break;case "gm_end":f=true;break;case "tm_start":f=true;break;case "tm_end":f=true}e=f==true?eval("messages_json.modeindicator."+d+"."+b):eval("messages_json.infostep."+d+"."+b);if(e!=null&&e.css!=void 0)c=e.css}catch(v){a.Log("GetCSSForData > "+d,LOG.EXCEPTION,v)}return c}function e(b,c,e,f,v,p,q,E,u,B){var A=null;try{var G=
"";if(c==void 0)return A;if(c.cord=="")return A;u==null?u="":(G=u.css,u=u.text);a.Log("CreateButton",LOG.TRACE,"Cord",c.cord);var D=c.cord.split("|");l=Number(D[0]);t=Number(D[1]);w=Number(D[2]);h=Number(D[3]);A=new clsButton(d+b,l,t,w,h);A.Tooltip=g_objTR.Tooltip;for(D=1;D<arguments.length;D++){var r=arguments[D],H=a.ImageList[d+"_"+r];arguments[D]=r==""?null:H!=void 0?H:r}if(c.selected=="1")A.DefaultToggle=true;if(A.Initialize(a.Maindiv,e,f,v,p,q,E,u,B,c,G)==false)throw"Error @ btnTemp.Initialize";
}catch(C){A=null,a.Log("CreateButton > "+d,LOG.EXCEPTION,C)}return A}clsPlayerBase.call(this,"clsThemeRenderer");var a=this;this.UIDData="";this.ImageList={};this.Holders={Title:null,Body:null,Repeat:null,Next:null,Review:null,Report:null,Home:null,Close:null,Footer:null,Result:null};this.CSS={Title:null,Body:null,Repeat:null,Next:null,Review:null,Report:null,Home:null,Footer:null,Result:null};var f;this.Controls={Show:null,Guide:null,Test:null,Continue:null,Review:null,Report:null,Home:null,Close:null,
Pass:null,Fail:null};this.Maindiv=this.DefaultControl=null;this.SetContentBody=function(b){var e=true;try{if(a.Holders.Body!=null){a.Holders.Body.style.overflowY="auto";a.Holders.Body.innerHTML="";a.GetUniqueID();sMsgToDisplay=b;if(b.innerHTML!=void 0)sMsgToDisplay=b.innerHTML;var f="<table width='100%' height='100%'><tr><td style='"+g_GetCSSForTD(a.CSS.Body)+"' > <span style='"+c("body")+"'> "+sMsgToDisplay+"</span> </td></tr></table>";a.Holders.Body.innerHTML=f}}catch(o){e=false,a.Log("SetContentBody > "+
d,LOG.EXCEPTION,o)}return e};this.SetCaption=function(b){var e=true;try{if(a.Holders.Title!=null){var f="<table width='100%' height='100%'><tr><td style='"+g_GetCSSForTD(a.CSS.Title)+"' > <span style='"+c("title")+"'> "+b+"</span> </td></tr></table>";a.Holders.Title.innerHTML=f}}catch(o){e=false,a.Log("SetCaption > "+d,LOG.EXCEPTION,o)}return e};this.SetResult=function(b){var c=true;try{if(a.Holders.Result!=null)a.Holders.Result.innerHTML=b}catch(e){c=false,a.Log("SetResult > "+d,LOG.EXCEPTION,e)}return c};
this.SetFooterMessage=function(b){var e=true;try{if(a.Holders.Footer!=null){var f="<table width='100%' height='100%'><tr><td style='"+g_GetCSSForTD(a.CSS.Footer)+"' > <span style='"+c("footer")+"'> "+b+"</span> </td></tr></table>";a.Holders.Footer.innerHTML=f}}catch(o){e=false,a.Log("SetFooterMessage > "+d,LOG.EXCEPTION,o)}return e};this.Initialize=function(c){var e=true;try{var k=a.UIDData.images.normal.imagedim.split("|"),o=a.CreateHTMLElement("DIV");o.align="center";o.style.backgroundImage='url("'+
(a.ImageList[d+"_hide"]||a.ImageList[d+"_normal"]).src+'")';o.style.display=g_inline;o.style.visibility="visible";o.style.position="absolute";o.style.width=k[0]+"px";o.style.height=k[1]+"px";k=1;g_enabledualmonitor==true&&(k=2);o.style.left=(parseInt(c.style.width)/k-parseInt(o.style.width))/2+"px";o.style.top=(parseInt(c.style.height)-parseInt(o.style.height))/2+"px";f=c;f.appendChild(o);a.Maindiv=document.getElementById(o.id);if(a.CreateButtons()==false)throw"Error @ ME.CreateButtons";c=true;try{for(var v in a.UIDData.layout.holders)if(a.UIDData.layout.holders[v].cord!=
""&&!(v=="close"&&(g_CommandArgs[CMDARGS.LAUNCHSOURCE]==LAUNCHSOURCETYPE.PRESENTATIONEDITOR||g_CommandArgs[CMDARGS.LAUNCHSOURCE]==LAUNCHSOURCETYPE.PRESENTATIONOUTPUT))&&!(v=="home"&&g_objGS.General.HomeAvailable==false)&&!(v=="mode_test"&&uid_json.settings.mode_test.available==false)&&!(v=="mode_guide"&&uid_json.settings.mode_guide.available==false)&&!(v=="mode_show"&&uid_json.settings.mode_show.available==false)){o=v;k=true;try{var p=a.UIDData.layout.holders[o],q=a.CreateTextHolder(p);q.dir=uid_json.settings.template.rtl;
var E=new clsRect(String(p.cord));q.style.left=E.Left+"px";q.style.top=E.Top+"px";q.style.width=E.Width+"px";q.style.height=E.Height+"px";q.style.zIndex=ZINDEX.TEMPLATE;a.Maindiv.appendChild(q);var u=document.getElementById(q.id);a.GetUniqueID();var B="";if(b[d][o]!=void 0)B=b[d][o].text;u.innerHTML=B;if(g_EnableBorderInTemplate)q.style.borderStyle="solid",q.style.borderWidth="1px",q.style.borderColor="red";a.Holders[o.toTitleCase()]=document.getElementById(q.id);a.CSS[o.toTitleCase()]=p.css}catch(A){k=
false,a.Log("CreateHolder > "+d,LOG.EXCEPTION,A)}if(k==false)throw"Error @ CreateHolder for holder="+v;}if(a.Holders.Close!=null&&(g_objTracker.Enabled==true||g_objScorm.Enabled==true))a.Holders.Close.innerHTML=b[d].saveclose.text}catch(G){c=false,a.Log("CreateHolders > "+d,LOG.EXCEPTION,G)}if(c==false)throw"Error @ ME.CreateHolders";}catch(D){e=false,a.Log("Initialize > "+d,LOG.EXCEPTION,D)}return e};this.CreateButtons=function(){var c=true;try{var f=b.tooltips,k=a.UIDData.layout.controls;if(k.mode_show!=
void 0&&uid_json.settings.mode_show.available==true&&(a.Controls.Show=e(":Show Mode",k.mode_show,"normal","normal_hover","","toggle","","hide"),a.Controls.Show!=null))a.Controls.Show.TooltipText=f.mirepeatshow.text;if(k.mode_guide!=void 0&&uid_json.settings.mode_guide.available==true&&(a.Controls.Guide=e(":Guide Mode",k.mode_guide,"normal","normal_hover","","toggle","","hide"),a.Controls.Guide!=null))a.Controls.Guide.TooltipText=d==MITYPE.SMEND?f.migotoguide.text:f.mirepeatguide.text;if(k.mode_test!=
void 0&&uid_json.settings.mode_test.available==true&&(a.Controls.Test=e(":Test Mode",k.mode_test,"normal","normal_hover","","toggle","","hide"),a.Controls.Test!=null))a.Controls.Test.TooltipText=d==MITYPE.GMEND?f.migototest.text:f.mirepeattest.text;if(g_objGS.General.HomeAvailable==true&&k.home!=void 0&&(a.Controls.Home=e(":Home",k.home,"normal","normal_hover","","toggle","","hide"),a.Controls.Home!=null))a.Controls.Home.TooltipText=f.mihome.text;if(g_CommandArgs[CMDARGS.LAUNCHSOURCE]!=LAUNCHSOURCETYPE.PRESENTATIONEDITOR&&
g_CommandArgs[CMDARGS.LAUNCHSOURCE]!=LAUNCHSOURCETYPE.PRESENTATIONOUTPUT&&k.close!=void 0&&(a.Controls.Close=e(":Close",k.close,"normal","normal_hover","","toggle","","hide"),a.Controls.Close!=null))a.Controls.Close.TooltipText=g_objTracker.Enabled==true||g_objScorm.Enabled==true?f.misaveclose.text:f.miclose.text;if(k.cont!=void 0&&(a.Controls.Continue=e(":Continue Mode",k.cont,"normal","normal_hover","","","","hide",b[d].cont),a.Controls.Continue!=null))a.Controls.Continue.TooltipText=f.cont.text;
if(k.review!=void 0&&(a.Controls.Review=e(":Review",k.review,"normal","normal_hover","","toggle","","hide"),a.Controls.Review!=null))a.Controls.Review.TooltipText=f.mireview.text;if(k.report!=void 0&&(a.Controls.Report=e(":Report",k.report,"normal","normal_hover","","toggle","","hide"),a.Controls.Report!=null))a.Controls.Report.TooltipText=f.mireport.text;if(k.pass!=void 0)a.Controls.Pass=e(":Pass",k.pass,"normal","","","","","toggle","",true);if(k.fail!=void 0)a.Controls.Fail=e(":Fail",k.fail,"toggle",
"","","","","normal","",true)}catch(o){c=false,a.Log("CreateButtons > "+d,LOG.EXCEPTION,o)}return c};this.ClearBody=function(){var b=true;try{a.Holders.Body.innerHTML=""}catch(c){b=false,a.Log("ClearBody",LOG.EXCEPTION,c)}return b};this.Hide=function(){var b=true;try{a.Maindiv.style.visibility="hidden",a.Maindiv.style.display="none"}catch(c){b=false,a.Log("Hide > "+d,LOG.EXCEPTION,c)}return b};this.SetFocus=function(){a.DefaultControl!=null&&a.DefaultControl.SetFocus()};this.Show=function(){var b=
true;try{a.Maindiv.style.visibility="visible";a.Maindiv.style.display=g_inline;if(a.Controls.Continue!=null&&g_objCCMover!=null){var c=a.Controls.Continue.GetBoundingRect();if(g_objCCMover.MoveForRegion(c)==false)throw"Error @ g_objCCMover.MoveForRegion";}a.DefaultControl!=null&&a.DefaultControl.SetFocus()}catch(e){b=false,a.Log("Hide > "+d,LOG.EXCEPTION,e)}return b}}
clsSubmitForm=function(){function d(){var d=true;try{var v=f.CreateHTMLElement("div");v.style.left="0px";v.style.top="0px";v.style.width=f.ParentWidth+"px";v.style.height=f.ParentHeight+"px";v.style.visibility="visible";v.style.display=g_inline;if(BROWSER.LEGACY==true&&f.AlphaBackgroundColor.indexOf("rgba")!=-1){var A=f.AlphaBackgroundColor.split(","),G=parseFloat(A.pop())*100;v.style.filter="alpha(opacity="+G+")";f.AlphaBackgroundColor=A.join().replace(/rgba/i,"rgb")+")"}v.style.backgroundColor=
f.AlphaBackgroundColor;v.style.zIndex=ZINDEX.FEEDBAKDIALOG;n.appendChild(v);k=document.getElementById(v.id);k.onmousedown=e;k.ondowndown=e;v=f.CreateHTMLElement("div");v.style.width=f.ParentWidth+"px";v.style.height=f.ParentHeight+"px";v.style.visibility="visible";v.style.display=g_inline;v.style.zIndex=ZINDEX.FEEDBAKDIALOG;n.appendChild(v);g=document.getElementById(v.id);o.FWData=q[p.submitform.fw.h5d];if(p.submitform.spec.header!=void 0)o.HeaderCSS=p.submitform.spec.header.css;if(p.submitform.spec.body!=
void 0)o.BodyCSS=p.submitform.spec.body.css;if(p.submitform.spec.footer!=void 0)o.FooterCSS=p.submitform.spec.footer.css;o.onContinueClick=c;if(o.Create(g)==false)throw"Error @ m_objFWWindow.Create";if(o.SetCaption('<span style="'+E.caption.css+'">'+E.caption.text+"</span>")==false)throw"Error @ m_fwCuecard.SetCaption";f.ContentBody=o.ContentBody;if(b(o.ContentBody)==false)throw"Error @ DisableSelection";o.onHide=function(){g_Completed=true;g_HideAndClose()};o.ContentBody.innerHTML="";o.ContentBody2.innerHTML=
a(f.SendingMsg)}catch(D){d=false,f.Log("Construct",LOG.EXCEPTION,"",D)}return d}function b(a){var b=true;try{typeof a.onselectstart!="undefined"?a.onselectstart=function(){return false}:typeof a.style.MozUserSelect!="undefined"?a.style.MozUserSelect="none":a.onmousedown=function(){return false},a.style.cursor="default"}catch(c){b=false,f.Log("DisableSelection",LOG.EXCEPTION,"",c)}return b}function c(){try{o.ContinueButton.disabled=true,f.Cancel=false,o.SetFooterMessage(""),f.onSendRequested(),f.Cancel==
false?f.ShowLoadingImage(true):(o.ContinueButton.disabled=false,f.Cancel=false,o.SetFooterMessage(f.RequiredMsg))}catch(a){f.Log("m_ButtonSubmit_OnClick",LOG.EXCEPTION,"",a)}}function e(a){try{a=a==void 0?event:a,a.stopPropagation?(a.preventDefault(),a.stopPropagation()):(a.cancelBubble=true,a.returnValue=false,a.keyCode=0)}catch(b){f.Log("Ignore_Event",LOG.EXCEPTION,"",b)}}function a(a){var b="";try{b="<table border=0 width='100%' height='100%'><tr><td align='center' valign='center' width='100%' height='100%'>"+
a+"</td></tr></table>"}catch(c){b=a,f.Log("WrapMessageInTable",LOG.EXCEPTION,"",c)}return b}clsPlayerBase.call(this,"clsSubmitForm");var f=this,n,g,k,o;this.ContentBody=this.Cancel=null;var v=false;new Boolean(false);var p=uid_json.psim.layout.h5dobjects,q=uid_json.resources.h5dialogs,E=messages_json.general.submitform;this.FWData=null;this.Visible=new Boolean(true);this.AlphaBackgroundColor=new String("");this.ParentWidth=this.ParentHeight=0;this.SendingMsg="";this.FWBaseImage=null;this.SubmitTextCSS=
{};this.RetryTextCSS={};this.FailedMsg=this.RequiredMsg=this.SuccessMsg="";this.onSendRequested=this.onSendComplete=this.onCloseRequested=null;this.Create=function(a,b){var c=true;try{if(a==null||a==void 0)throw"holderDiv is not supplied";f.SubmitTextCSS=messages_json.general.submitform.button_submit;f.RetryTextCSS=messages_json.general.submitform.button_retry;f.SendingMsg="<center><IMG SRC='"+g_objRIL.ImageList.loadingbig.src+"'/><br/><br/><span style='"+g_GetCSSForTD(p.submitform.spec.uploadingmsg.css)+
"'>"+messages_json.general.submitform.msg_sending.text+"</span><center>";f.FailureMsg="<center><span style='"+g_GetCSSForTD(p.submitform.spec.failuremsg.css)+"'>"+messages_json.general.submitform.msg_failed.text+"</span><center>";f.SuccessMsg="<center><span style='"+g_GetCSSForTD(p.submitform.spec.successmsg.css)+"'>"+messages_json.general.submitform.msg_success.text+"</span><center>";f.RequiredMsg="<center><span style='"+g_GetCSSForTD(p.submitform.spec.successmsg.css)+"'>"+messages_json.general.submitform.msg_success.text+
"</span><center>";v=b;n=a;var e=true;try{o=new clsFloatingWindow("submitform");o.DoNotUseAnimatedContinue=true;var g=new Number(uid_json.psim.layout.specs.general.canvasbuffer),k=String(p.submitform.spec.cord);if(k!=""&&k!=void 0)var E=k.split("|"),C=Number(0),J=Number(0),I=v!=true?Number(E[3]):500,L=v!=true?Number(E[2]):675;var N=Number(q[p.submitform.fw.h5d].border);E[3].indexOf("%")!=-1&&(hp=Number(E[3].replace("%","")),I=Math.ceil(f.ParentHeight*(hp/100)),I-=g*2+N*2);E[2].indexOf("%")!=-1&&(wp=
Number(E[2].replace("%","")),L=Math.ceil(f.ParentWidth*(wp/100)),L-=g*2+N*2);switch(p.submitform.spec.position){case FWPOSITION.MIDDLECENTER:g=1;g_enabledualmonitor==true&&(g=2);C=Math.ceil((f.ParentWidth/g-L)/2);J=Math.ceil((f.ParentHeight-I)/2);break;case FWPOSITION.TOPCENTER:C=Math.ceil((f.ParentWidth-L)/2);J=0;break;case FWPOSITION.TOPRIGHT:C=Math.ceil(f.ParentWidth-L);J=0;break;case FWPOSITION.MIDDLERIGHT:C=Math.ceil(f.ParentWidth-L);J=Math.ceil((f.ParentHeight-I)/2);break;case FWPOSITION.BOTTOMRIGHT:C=
Math.ceil(f.ParentWidth-L);J=Math.ceil(f.ParentHeight-I);break;case FWPOSITION.BOTTOMCENTER:C=Math.ceil((f.ParentWidth-L)/2);J=Math.ceil(f.ParentHeight-I);break;case FWPOSITION.BOTTOMLEFT:C=0;J=Math.ceil(f.ParentHeight-I);break;case FWPOSITION.MIDDLELEFT:C=0;J=Math.ceil((f.ParentHeight-I)/2);break;case FWPOSITION.TOPLEFT:J=C=0}f.AlphaBackgroundColor=p.submitform.spec.alpha_background_color;var M=uid_json.psim.layout.h5dobjects.submitform.fw.h5d;f.FWBaseImage=g_objRIL.ImageList.h5d_submitform||g_objRIL.ImageList[M];
o.Left=Number(C);o.Top=Number(J);o.Width=Number(L);o.Height=Number(I);o.BaseImage=f.FWBaseImage;o.ParentWidth=f.ParentWidth;o.ParentHeight=f.ParentHeight;o.ZIndex=ZINDEX.FEEDBAKDIALOG;o.IsResizable=p.submitform.fw.resizable=="0"?false:true;o.IsFloating=p.submitform.fw.floating=="0"?false:true;if(g_objTracker.CustomFormAvailable==true)o.CloseRequired=p.submitform.fw.close=="0"?false:true,o.ContinueRequired=true;o.FooterRequired=p.submitform.fw.footer=="1"?true:false;o.ContinueText=f.SubmitTextCSS.text;
o.ContentBody2Required=true;o.StepDetailsRequired=false}catch(K){e=false,f.Log("CollectRequiredData",LOG.EXCEPTION,"",K)}if(e==false)throw"Error @ CollectRequiredData";if(d()==false)throw"Error @ Construct";}catch(F){c=false,f.Log("Create",LOG.EXCEPTION,"",F)}return c};this.SetCaption=function(a){var b=true;try{o.SetCaption(a)}catch(c){b=false,f.Log("Caption",LOG.EXCEPTION,"",c)}return b};this.Hide=function(){try{g.style.display="none",k.style.display="none",f.Visible=false,n.style.display="none"}catch(a){bRet=
false,f.Log("Hide",LOG.EXCEPTION,"",a)}};this.Show=function(){var a=true;try{g.style.display=g_inline,k.style.display=g_inline,o.Show(),f.Visible=true}catch(b){a=false,f.Log("Show",LOG.EXCEPTION,"",b)}return a};this.SetData=function(a){try{o.ContentBody.innerHTML=a}catch(b){}return true};this.ShowLoadingImage=function(b){try{o.ContentBody2.innerHTML=a(f.SendingMsg),b==true?(o.ContentBody2.style.display=g_inline,o.ContentBody.style.display="none"):(o.ContentBody.style.display=g_inline,o.ContentBody2.style.display=
"none")}catch(c){f.Log("ShowLoadingImage",LOG.EXCEPTION,"",c)}return true};this.EnableRetry=function(){try{o.ContinueButton.disabled=false,o.ContinueButton.innerHTML=f.RetryTextCSS.text}catch(a){f.Log("EnableRetry",LOG.EXCEPTION,"",a)}return true};this.ShowStatus=function(b){try{if(b==true){if(g_objTracker.CustomFormAvailable==true)o.ContentBody2.innerHTML=a(f.SuccessMsg);o.SetFooterMessage("");setTimeout(function(){n.style.display="none"},1500)}else o.SetFooterMessage(f.FailureMsg),f.EnableRetry()}catch(c){f.Log("EnableRetry",
LOG.EXCEPTION,"",c)}return true};this.GetBoundingRect=function(){var a=null;try{a=o.GetBoundingRect()}catch(b){f.Log("GetBoundingRect",LOG.EXCEPTION,"",b)}return a};this.ToggleSubmitButton=function(a){var b=true;try{if(o.ContinueButton==null)return b;a?(o.ContinueButton.style.visibility="visible",o.ContinueButton.style.display=g_inline):(o.ContinueButton.style.visibility="hidden",o.ContinueButton.style.display="none")}catch(c){b=false,f.Log("ToggleSubmitButton",LOG.EXCEPTION,"",c)}return b};this.ToggleCloseButton=
function(a){var b=true;try{if(o.CloseButton==null)return b;a==true?(o.CloseButton.style.visibility="Visible",o.CloseButton.style.display=g_inline):(o.CloseButton.style.visibility="Hidden",o.CloseButton.style.display="none")}catch(c){b=false,f.Log("ToggleCloseButton",LOG.EXCEPTION,"",c)}return b}};
