try{var array=Array}catch(e){}try{var string=String}catch(e){}try{var object=Object}catch(e){}try{var date=Date}catch(e){}try{var regExp=RegExp}catch(e){}try{var math=Math}catch(e){}try{var option=Option}catch(e){}try{var activeXObject=ActiveXObject}catch(e){}try{var image=Image}catch(e){}try{var number=Number}catch(e){}var isIE=!!(window.attachEvent&&!window.opera);var U;var enumCounter=0;var vbCrLf="\r\n";var vbCr="\r";var vbLf="\n";var vbTab="\t";var vbSpacer="&nbsp";enumCounter=1;var ewmSIMPLE=enumCounter++;var ewmSCROLL=enumCounter++;var ewmSCROLLBOX=enumCounter++;var ewmSCROLLBOXEX=enumCounter++;enumCounter=0;var ecsNone=enumCounter++;var ecsCreating=enumCounter++;var ecsCreated=enumCounter++;var ecsLoading=enumCounter++;var ecsLoaded=enumCounter++;var ecsShowing=enumCounter++;var ecsShowed=enumCounter++;var ecsPainting=enumCounter++;var edLeft=1;var edTop=2;var edRight=4;var edBottom=8;var edAll=15;var erBefore=1;var erAfter=2;var erFirstChild=3;var erLastChild=4;var ecsFontName="fontName";var ecsFontSize="fontSize";var ecsFontWeight="fontWeight";var ecsOverFlow="overflow";var ecsTextAlign="textAlign";var ecsZOrder="zIndex";var ecsForeColor="color";var ecsTextDecoration="textDecoration";var ecsPadding="padding";var symError=function(){return true};var getUniqueID=(function(){var A=1;return function(){return A++}})();var _system_={};var randomize=function(A){_system_.rndSeed=A||new date().getTime();_system_.rndRange=math.pow(2,32)};randomize();var random=function(B){_system_.rndSeed=(_system_.rndSeed*1103515245+12345)%_system_.rndRange;var A=(_system_.rndSeed)/_system_.rndRange;if((!B)||(B<0)){B=1}return 1+(B*(A%1))|0};var addProperty=function(name,initial,onWrite,onRead){var intName="m"+name.charAt(0).toUpperCase()+name.substring(1);var thisIntName="this."+intName;if(onWrite==true){onWrite="this.setDirty()"}var funcStr="this.baseClass.prototype."+name+" = function(value) {\n";if(onWrite!==null){funcStr+="  if (value !== undefined) {\n";funcStr+="    this."+intName+" = value;\n";if(typeof onWrite==="string"){funcStr+="    "+onWrite+";\n"}funcStr+="  }\n"}funcStr+="  return "+thisIntName+" != undefined?"+thisIntName+": initial\n";funcStr+="}\n";eval(funcStr)};var addMethod=function(A,B){this.baseClass.prototype[A]=B};var addSet=function(A){_S.push(A)};var _S;var _C;var _P;var classCreate=function(A,B){_C=function(){};_P=_C.prototype;_S=[];if((B!=null)){classExtend(_P,B.prototype)}else{_P.property=addProperty;_P._set=addSet;_P.create=function(){};_P.handleEvent=function(){}}_P.className=A;_P.baseClass=_C};var classUpdate=function(){result=function(){this.create.apply(this,arguments)};classExtend(result.prototype,_P);_P=null;_C=null;_S=null;return result};var classExtend=function(A,B){for(var C in B){A[C]=B[C]}};var clone=function(C){var A;var D;var B=varType(C);if(B<=vtFunction){return C}if(B==vtArray){A=[]}else{A={}}for(D in C){if(varType(C[D])<=vtFunction){A[D]=C[D]}else{A[D]=clone(C[D])}}return A};var classBind=function(A,B){return function(){return B.apply(A,arguments)}};var toString=object.prototype.toString;var isString=function(A){return toString.call(A)=="[object String]"};var isNumber=function(A){return toString.call(A)=="[object Number]"};var isFunction=function(A){return typeof A==="function"};var isArray=function(A){return toString.call(A)=="[object Array]"};var isUndefined=function(A){return A===undefined};var vtNull=0;var vtString=1;var vtBoolean=2;var vtNumber=3;var vtDate=4;var vtRegExp=5;var vtFunction=6;var vtObject=7;var vtArray=8;var varType=function(A){if(A==null){return vtNull}switch(typeof (A)){case"string":return vtString;break;case"number":return vtNumber;break;case"boolean":return vtBoolean;break;case"function":return vtFunction;break;default:switch(A.constructor){case date:return vtDate;break;case array:return vtArray;break;case regExp:return vtRegExp;break;default:return vtObject;break}}};var varName=function(A){return _varNames_[varType(A)]};var setWakeup=function(B){var A=new date();A.setTime(A.getTime()+B);return A};var showError=function(D){var B="";var A=0;debug.out("Error: "+nameFromIni$(D.message,"\n"));var C=arguments.callee.caller;while(C&&(++A<5)){B=valueFromIni$(nameFromIni$(C.toString(),"(")," ");debug.out(B+"("+argumentsToString(C.arguments)+")");C=C.caller}};var argumentsToString=function(B){var C=0;var A=new array();for(C=0;C<=B.length-1;C++){debug.out(cStr(C)+" "+B[C]);A.push(B[C])}return A.join(", ")};classCreate("debug",null);debug=(function(){var A=(function(){var B;_P.create=function(){this.mTime=new date()};_P.timerStart=function(){this.mTime=new date()};_P.timerEnd=function(){return(this.mTime==0?-1:new date()-this.mTime)};_P.status=function(C){window.status=C};_P.print=function(C){};_P.object=function(E){var C="";var D;if(E==null){return"Null"}else{if(typeof (E)=="object"){for(D in E){if(typeof (E[D])=="function"){C=C+", "+D+"()"}else{C=C+", "+D+": "+E[D]}}if(C){return mid$(C,3)}}else{return E.toString()}}};_P.dump=function(C){debug.out(this.object(C))};_P.out=function(E){try{var C=(!this.debugWin||this.debugWin.closed)}catch(D){var C=true}if(C){this.debugWin=window.open("",null,"width=400,height=200,scrollbars=yes,resizable=yes,status=no,location=no,menubar=no,toolbar=no");if(!this.debugWin){return }this.timerStart()}var F=this.debugWin.document.createElement("div");F.appendChild(this.debugWin.document.createTextNode(E));this.debugWin.document.body.appendChild(F)};return classUpdate()})();return new A()})();var startArgument=function(C){if(!window._startArguments){window._startArguments={};var E=mid$(unescape(window.location.search),2);var D;var B=0;var A="";if(!isEmptyString(E)){D=split$(E,"&");for(_EC1 in D){A=D[_EC1];if(A!=""){window._startArguments[LCase$(nameFromIni$(A,"="))]=valueFromIni$(A,"=")}}}}return window._startArguments[LCase$(C)]};var IE=document.all?true:false;classCreate("browser",null);browser=(function(){var A=(function(){_P.windowMove=function(C,B){parent.window.moveTo(C,B)};_P.windowSize=function(C,B){parent.window.sizeTo(C,B)};_P.windowLeft=function(B){if(B!=undefined){}return parent.window.left};_P.windowTop=function(B){if(B!=undefined){}return parent.window.width};_P.windowWidth=function(B){if(B!=undefined){}return parent.window.height};_P.windowHeight=function(B){if(B!=undefined){}return parent.window.left};_P.screenWidth=function(){return self.screen.width};_P.screenHeight=function(){return self.screen.height};_P.pageLeft=function(){return window.screenLeft||0};_P.pageTop=function(){return window.screenTop||0};_P.pageWidth=function(){return self.innerWidth||document.body.clientWidth};_P.pageHeight=function(){return self.innerHeight||document.body.clientHeight};_P.screenCenterLeft=function(B){return(this.screenWidth()-B)/2};_P.screenCenterTop=function(B){return(this.screenHeight()-B)/2};return classUpdate()})();return new A()})();var showDebugLines=false;var efbIgnoreAll=0;var efbHighLight=1;var efbClick=2;var efbNormalAction=3;var efbDefault=3;var efbStateAction=7;var efbOptionAction=11;var efbFocusSpecial=19;var efbCaptureKeys=32;var efbOnChange=64;var efbResize=128;var efbMove=256;var efbDrag=512;var efbDrop=1024;var easNone=0;var easWidth=1;var easHeight=2;var easBoth=3;var _gloTimerID=0;var uiEvents={"mouseover":{name:"MouseEnter",behaviorType:efbHighLight},"mouseout":{name:"MouseLeave",behaviorType:efbHighLight},"mouseup":{name:"MouseUp",behaviorType:efbClick|efbDrag},"mousedown":{name:"MouseDown",behaviorType:efbClick|efbDrag},"contextmenu":{name:"RightClick",behaviorType:efbIgnoreAll},"mousemove":{name:"MouseMove",behaviorType:efbMove|efbDrag},"keypress":{name:"KeyPress",behaviorType:efbCaptureKeys},"keydown":{name:"KeyDown",behaviorType:efbCaptureKeys},"keyup":{name:"KeyUp",behaviorType:efbCaptureKeys},"focus":{name:"FocusGet",behaviorType:efbClick},"blur":{name:"FocusLost",behaviorType:efbClick},"reset":{name:"Reset",behaviorType:-1},"select":{name:"Select",behaviorType:efbClick},"change":{name:"Change",behaviorType:efbOnChange},"resize":{name:"Resize",behaviorType:efbResize},"DOMNodeRemoved":{name:"DOMNodeRemoved",behaviorType:-1}};var draggedControl=null;var draggedStartX=0;var draggedStartY=0;var focussedControl=null;var dropSpots={};var findDropSpot=function(C){var D;var E=C;var B=E.left()+math.round(E.width()/2);var A=E.top()+math.round(E.height()/2);E=null;for(_EC1 in dropSpots){D=dropSpots[_EC1];if(D.visible()&&D.enabled){if((B>=D.left())&&(B<=(D.left()+D.width()))&&(A>=D.top())&&(A<=(D.top()+D.height()))){return D}}}};var handleUiEvents=function(G){if(!G){G=window.event}var B;var D;var A=false;B=G.target||G.srcElement;if(backGround==null){return }if((!B)||(B==window)){B=backGround.mObject}var H=uiEvents[G.type];if(!H){return }var F={name:H.name,behaviorType:H.behaviorType,cancelBubble:true,element:B,mouseX:G.pageX||(G.clientX+document.body.scrollLeft),mouseY:G.pageY||(G.clientY+document.body.scrollTop),key:G.keyCode,ctrlKey:G.ctrlKey,altKey:G.altKey,shiftKey:G.shiftKey,button:G.which||G.button};while(D==null){if(B.self){D=B.self;break}B=B.parentNode;if(!B){return }}if((F.behaviorType&efbClick)==efbClick){F.button=G.which||G.button;if(F.button!=1){return }}if(draggedControl){D=draggedControl}else{while(D){if((D.visible())&&(D.enabled())){if(D.focusBehavior()&F.behaviorType){break}else{if(D.focusBehavior()&efbCaptureKeys){return }}}D=D.parent()}}if(D){var E=F;if(!draggedControl){switch(F.name){case"MouseDown":if(D.focusBehavior()&efbDrag){draggedStartX=F.mouseX;draggedStartY=F.mouseY;F.name="DragStart";draggedControl=D}break;case"MouseEnter":if(focussedControl){if(focussedControl.isDescendedFrom(D)){F.name=""}else{F.name="MouseLeave";focussedControl.handleUiEvent(F);F.name="MouseEnter"}}focussedControl=D;break;case"MouseLeave":focussedControl=null}}else{switch(F.name){case"MouseMove":draggedControl.move(cVal(draggedControl.mLeft)+E.mouseX-draggedStartX,cVal(draggedControl.mTop)+E.mouseY-draggedStartY);draggedStartX=E.mouseX;draggedStartY=E.mouseY;F.dragOver=findDropSpot(draggedControl);if(F.dragOver){var C={name:"DragOver",dragControl:draggedControl};F.dropRejected=F.dragOver.handleUiEvent(C)||false}F.name="Drag";break;case"MouseUp":F.dragOver=findDropSpot(draggedControl);if(F.dragOver){var C={name:"DragDrop",dragControl:draggedControl};F.dropRejected=F.dragOver.handleUiEvent(C)||false}draggedControl=null;F.name="DragEnd"}}E=null;if(F.name!=""){D.handleUiEvent(F)}}if(D){if(G.stopPropagation){G.stopPropagation()}if(G.cancelBubble){G.cancelBubble=true}if(G.preventDefault){G.preventDefault()}if(G.returnValue){G.returnValue=false}return false}};document.onmouseover=handleUiEvents;document.onmouseout=handleUiEvents;document.onmouseup=handleUiEvents;document.onmousedown=handleUiEvents;document.oncontextmenu=handleUiEvents;document.onkeyup=handleUiEvents;document.onchange=handleUiEvents;window.onresize=handleUiEvents;document.onmousemove=handleUiEvents;document.DOMNodeRemoved=handleUiEvents;classCreate("cControl",null);cControl=(function(){_P.property("name","",false);_P.property("groupIndex",0,false);_P.property("ID",0,false);_P.property("parent",null);_P.property("dragable",false);_P.property("left",0,"this.move(value)");_P.property("top",0,"this.move(undefined,value)");_P.property("width",0,"this.move(undefined,undefined,value)");_P.property("height",0,"this.move(undefined,undefined,undefined,value)");_P.property("dirty",false,true);_P.property("locked",false,true);_P.property("status",ecsCreating);_P.property("mouseFocus",false,true);_P.property("selected",false,true);_P.property("enabled",true,"if (this.mObject != null) { this.mObject.disabled = !value; this.setDirty() }");_P.property("opacity",100,"this.setOpacity(value)");_P.property("focusBehavior",efbIgnoreAll);_P.property("layoutPosition","absolute","if (this.mObject != null) { this.mObject.style.position = value; }");_P.property("mouseIcon","default","this.style('cursor', value)");_P.property("htmlTag","div");_P.property("tag","");_P.property("picture",null,true);_P.property("colorBack",null,true);_P.property("colorFore","#000000","if (this.mObject != null) { this.style('color', value)}");_P.property("autoSizing",easNone);_P.property("controls",null);_P.create=function(B,D,F,E,C,A,G){if(isEmptyString(B)){B=cControl.className}if(D!=null&&D.addControl(B,this)==false){return null}this.mFullName=B;if(inStr(B,"#")>0){this.mName=nameFromIni$(B,"#");this.mGroupIndex;this.mGroupIndex=parseInt(valueFromIni$(B,"#"))}else{this.mName=B;this.mGroupIndex=0}this.mVisible=(G==undefined?true:G);this.mID=getUniqueID();this.mParent=D;this.mLeft=F||0;this.mTop=E||0;this.mWidth=C||0;this.mHeight=A||0;this.mDirty=false;this.mLocked=false;this.mStatus=ecsCreating;this.mMouseFocus=false;this.mSelected=false;this.mFocusBehavior=efbIgnoreAll;this.controls=new object();this.raiseEvent("Load");this.mStatus=ecsCreated;if(this.mVisible==true){if((!this.mParent)||(this.mParent.mStatus==ecsShowed)){this.show()}}return this};_P.visible=function(A){if(A!=null){this.mVisible=A;if(this.mObject==null){if((A==true)&&(this.mParent!=null)&&(this.mParent.mObject!=null)){this.show()}}else{this.mObject.style.visibility=(A?"inherit":"hidden");this.paint(true)}}return this.mVisible};_P.fullName=function(){return this.mFullName};_P.createControl=function(B,H,F,E,C,A,G){var D=this.controls[B];if(D){D.visible(false);D.move(F,E,C,A);D.visible(G);return D}else{return new H(B,this,F,E,C,A,G)}};_P.setParent=function(B){this.destroy();if(B&&B.controls[this.mFullName]){return }var A=this.mParent;if(B){B.controls[this.mFullName]=this}if(A){delete A.controls[this.mFullName]}this.mParent=B;this.show();this.visible(true)};_P.isDescendedFrom=function(B){var A=this.parent();while(!!A){if(A==B){return true}A=A.parent()}return false};_P.addControl=function(A,B){if(this.controls[A]!=null){return false}this.controls[A]=B;return true};_P.absoluteLeft=function(){var B=this;var A=this.mLeft;while(B.mParent){B=B.mParent;A+=B.mLeft}return A};_P.absoluteTop=function(){var B=this;var A=0;while(B){A+=B.mTop;B=B.mParent}return A};_P.clientHeight=function(){return this.mObject.clientHeight};_P.clientWidth=function(){return this.mObject.clientWidth};_P.getMaxGroupIndex=function(C){var B="";var A=0;var E="";var D="";C=LCase$(C);for(B in this.controls){E=nameFromIni$(B,"#");D=cVal(valueFromIni$(B,"#"));if(C==LCase$(E)){if(D>A){A=D}}}return A};_P.handleUiEvent=function(G){var H=false;var B=false;var F=false;var A=G.name;switch(G.name){case"MouseEnter":if(this.mMouseFocus){return }H=true;this.mMouseFocus=true;break;case"MouseLeave":if(!this.mMouseFocus){return }H=true;this.mMouseFocus=false;break;case"MouseUp":H=true;if(this.mSelected){B=true}if(((this.mFocusBehavior&efbStateAction)!=efbStateAction)&&((this.mFocusBehavior&efbOptionAction)!=efbOptionAction)){this.mSelected=false}break;case"MouseDown":H=true;switch(this.mFocusBehavior){case efbClick:case efbDefault:case efbNormalAction:this.mSelected=true;break;case efbStateAction:this.mSelected=!this.mSelected;break;case efbOptionAction|efbStateAction:case efbOptionAction:var D=this.parent();var C=0;var E;if(D){for(C=0;C<=9999;C++){E=D.controls[this.mName+"#"+C];if(!E){if(C>0){break}}else{if(C!=this.groupIndex()){E.selected(false)}}}}if((this.mFocusBehavior&efbStateAction)==efbStateAction){this.mSelected=!this.mSelected}else{this.mSelected=true}}}if(H==true){this.dirty(true);this.raiseEvent(A,G);if(B==true){this.raiseEvent("Click")}if(this.mStatus==ecsShowed){this.raiseEvent("Paint")}}else{this.raiseEvent(A,G)}};_P.addListener=function(B){if(!B){return }var A=inArray(this.listeners,B);if(A==-1){if(!this.listeners){this.listeners=[]}this.listeners[UBound(this.listeners)+1]=B;if(!B.listening){B.listening=[]}B.listening[UBound(B.listening)+1]=this}};_P.removeListener=function(B){if(!B){return }var A=inArray(this.listeners,B);if(A>=0){this.listeners.splice(A,1);A=inArray(B.listening,this);if(A>=0){B.listening.splice(A,1)}}};_P.removeListeners=function(){var B;var A;for(_EC2 in this.listeners){B=this.listeners[_EC2];A=inArray(B.listening,this);if(A>=0){B.listening.splice(A,1)}}delete this.listeners};_P.raiseEvent=function(B,F,E,C){var D={};var A;if(isEmptyString(B)){return }if((F==null)){F={}}var D={name:B,target:E||null,sender:C||this,params:F,eventID:B};if(E){if(E!=this){D.eventID=this.mName+"_"+B}E.handleEvent(D);return }this.handleEvent(D);D.eventID=this.mName+"_"+B;if(this.mParent){D.target=this.mParent;if(D.target.handleEvent){D.target.handleEvent(D)}}if(this.listeners){for(_EC3 in this.listeners){D.target=this.listeners[_EC3];A=D.target.handleEvent(D)}}return A};_P.handleEvent=function(A){};_P.show=function(B){var A="";var G="";var E=false;if((B)&&(this.mVisible==false)){return }this.mStatus=ecsShowing;if(this.mObject==null){G=this.htmlTag();if(inStr(G,".")==0){this.mObject=document.createElement(G)}else{A=valueFromIni$(G,".");G=nameFromIni$(G,".");this.mObject=document.createElement(G);this.mObject.type=A}this.mObject.self=this;if(!(this.mStyles===undefined)){for(var F in this.mStyles){if(left$(F,1)=="-"){this.mObject[mid$(F,2)]=this.mStyles[F]}else{this.mObject.style[F]=this.mStyles[F]}}this.mStyles=undefined}if(this.mParent!=null){try{this.mParent.mObject.appendChild(this.mObject)}catch(D){this.mParent.mObject.body.appendChild(this.mObject)}}else{document.body.appendChild(this.mObject)}E=true}this.mObject.style.position=this.layoutPosition();this.mObject.style.backgroundRepeat="no-repeat";this.setOpacity(this.opacity());this.mObject.disabled=!this.enabled();this.mStatus=ecsShowed;this.move(this.mLeft,this.mTop,this.mWidth,this.mHeight,true);for(var C in this.controls){this.controls[C].show(true)}if(E){this.raiseEvent("Create");if((this.mFocusBehavior&efbDrag)){this.mouseIcon("move")}else{if((!this.mMouseIcon)&&(this.mFocusBehavior&efbClick)){this.mouseIcon("pointer")}}if((this.mFocusBehavior&efbDrop)){dropSpots[this.mID]=this}}this.visible(true);if(showDebugLines){this.setBorder(edAll,"#E8E8E8","solid",1)}this.raiseEvent("Show");this.paint(true);C=null};_P.hide=function(A){if(this.mStatus<=ecsLoaded){return 0}this.raiseEvent("Hide");if(!A){this.visible(false)}};_P.removeControl=function(B){var A=0;if(inStr(B,"*")>0){B=nameFromIni$(B,"*");A=len(B);for(_EC4 in this.controls){var D=this.controls[_EC4];if(left$(D.mName,A)==B){D.destroy(true)}}}else{var C=this.controls[B];if(C){C.destroy()}}};_P.destroy=function(B){if(focussedControl==this){focussedControl=null}if(this.mParent!=null){delete this.mParent.controls[this.mFullName]}if(this.mStatus<=ecsCreated){return 0}delete dropSpots[this.mID];this.clearTimers();this.raiseEvent("Hide");this.removeControl("*");this.raiseEvent("Unload");if(this.listening){var A;while(UBound(this.listening)>=0){this.listening[0].removeListener(this)}}this.removeListeners();this.controls=null;if(this.mParent!=null){this.mParent.mObject.removeChild(this.mObject)}else{document.body.removeChild(this.mObject)}this.mParent=null;this.mObject=null;this.mStatus=ecsCreated};_P.showed=function(){return(this.mStatus>=ecsShowed)};_P.paint=function(A){if(this.mStatus!=ecsShowed){return 0}if((this.mDirty==true)||(A==true)){this.mStatus=ecsPainting;this.raiseEvent("Paint");this.mDirty=false;this.mStatus=ecsShowed}};_P.size=function(B,A){this.move(U,U,B,A)};_P.move=function(F,E,D,A){var C=false;var G=false;var B=(this.mObject?this.mObject.style:null);if((F!=U)){this.mLeft=cVal(F);if(B){B.left=F;C=true}}if((E!=U)){this.mTop=cVal(E);if(B){B.top=E;C=true}}if((D!=U)){this.mWidth=cVal(D);if(B){B.width=D;G=true}}if((A!=U)){this.mHeight=cVal(A);if(B){B.height=A;G=true}}};_P.getRect=function(){return{left:this.left(),top:this.top(),width:this.width(),height:this.height()}};_P.setDirty=function(){this.mDirty=true;if(this.mStatus<ecsShowed){return 0}if(this.mLocked==true){return 0}this.paint()};_P.sequenceInit=function(B,D,A,C){this.sequences=this.sequences||{};this.sequences[B]={key:B,duration:D,startPos:[],endPos:[],controls:[],properties:[],easeIn:A,easeOut:C}};_P.sequenceLoad=function(D,F,A,C,B){if(C==B){return }var E=this.sequences[D];if((!!E)){E.startPos.push(C);E.endPos.push(B);E.controls.push(F);E.properties.push(A)}E=null};_P.sequenceStart=function(A){if(!!this.sequences[A]){var B=this.sequences[A];this._timerStart(B.key,true,1,B.startPos,B.endPos,B.duration,{controls:B.controls,properties:B.properties},B.easeIn,B.easeOut);B=null;delete this.sequences[A]}};_P.timerStart=function(B,A,C){this._timerStart(B,false,A,0,0,C)};_P.timerAnimate=function(D,C,B,F,G,A,E){this._timerStart(D,false,1,C,B,F,G,A,E)};_P._timerStart=function(K,A,D,I,C,F,E,G,J){var H;this.timerStop(K);var B={key:K,isSequence:A,callBack:this,startPos:I,endPos:C,duration:F,interval:D,elapsed:0,currentTick:0,params:E,currentPos:I,easeIn:G,easeOut:J,lastCall:false,startTime:new date().getTime(),timerID:setInterval(function(){B.elapsed=new date().getTime()-B.startTime;if((B.duration>0)){if((B.elapsed>=B.duration)){B.callBack.timerStop(B.key);B.lastCall=true;B.currentPos=B.endPos}else{B.currentTick=B.elapsed/B.duration;if(typeof (B.startPos)=="object"){var M=tween(0,1,B.currentTick,B.easeIn,B.easeOut);for(H in B.startPos){B.currentPos[H]=math.round((B.endPos[H]-B.startPos[H])*M)+B.startPos[H];if(A){var O=B.params.controls[H];var N=(B.callBack.controls[O]||B.callBack);if((!!N)){var L=B.params.properties[H];if(N[L]){N[L](B.currentPos[H])}}N=null}}}else{B.currentPos=tween(B.startPos,B.endPos,B.currentTick,B.easeIn,B.easeOut)}}}B.callBack.raiseEvent("Timer_"+K,B)},D)};if(!this.timers){this.timers={}}this.timers[K]=B.timerID};_P.timerStop=function(A){if(!this.timers){return }var B=this.timers[A];clearInterval(B);delete this.timers[B]};_P.clearTimers=function(){var A;for(_EC5 in this.timers){A=this.timers[_EC5];clearInterval(A)}delete this.timers};_P.drawColorBack=function(A){if(this.mStatus<ecsShowed){return 0}this.mObject.style.backgroundColor=A};_P.drawPicture=function(A){if(this.mStatus<ecsShowed){return 0}A=LCase$(replace$(A,"\\\\","/"));gImageLoader.load(this,A)};_P.setBackgroundPicture=function(C){var B=this.picture();var D="";var A="";if(B==""){return""}if(C&&!this.enabled()){D=this.mPictureDisabled;A="_D"}else{if(this.selected()){D=this.mPictureSelected;A="_P"}else{if(this.mouseFocus()){D=this.mPictureOver;A="_H"}}}if(!isEmptyString(D)){B=D}else{if(A!=""){B=pathGetPathAndFile(B)+A+"."+pathGetExtension(B)}}this.drawPicture(B)};_P.drawText=function(A){this.drawInnerHtml(replace$(A,"\n","<BR />"))};_P.drawInnerHtml=function(A){if(this.mAutoSizing&easWidth){this.width("")}if(this.mAutoSizing&easHeight){this.height("")}if(this.mStatus<ecsShowed){return 0}this.mObject.innerHTML=A;if(this.mAutoSizing&easWidth){this.width(this.mObject.clientWidth)}if(this.mAutoSizing&easHeight){this.height(this.mObject.clientHeight)}};_P.setOpacity=function(A){if(this.mStatus<ecsShowed){return 0}this.mObject.style.opacity=A/100;this.mObject.style.filter=(A==100?"":"alpha(opacity ="+A+")")};_P.setBorder=function(C,A,B,E){A=(isEmptyString(A)?"":A);B=(isEmptyString(B)?"solid":B);E=(isEmptyString(E)?"1":E)+"px";var D=A+" "+B+" "+E;if((C&edLeft)==edLeft){this.style("borderLeft",D)}if((C&edTop)==edTop){this.style("borderTop",D)}if((C&edRight)==edRight){this.style("borderRight",D)}if((C&edBottom)==edBottom){this.style("borderBottom",D)}};_P.style=function(A,B){if(this.mStatus<ecsLoaded){if(this.mStyles===undefined){this.mStyles=new array()}if(!(B===undefined)){this.mStyles[A]=B}return this.mStyles[A]}else{if(left$(A,1)=="-"){if(!(B===undefined)){this.mObject[mid$(A,2)]=B}return this.mObject[mid$(A,2)]}else{if(!(B===undefined)){this.mObject.style[A]=B}return this.mObject.style[A]}}};return classUpdate()})();classCreate("gImageLoader",null);gImageLoader=(function(){var A=(function(){_P.property("imageList",null);_P.property("images",null);_P.property("imageLoader",null);_P.property("loading",false);_P.create=function(){this.imageList=new array();this.images=new object();this.imageLoader=new image();this.imageLoader.onload=classBind(this,this.onload);this.imageLoader.onerror=classBind(this,this.onerror)};_P.load=function(B,C){C=trim$(C);if(C==""){B.mObject.style.backgroundImage=""}else{if(this.images[C]==true){B.mObject.style.backgroundImage="url("+C+")"}else{if(this.images[C]==null){this.imageList.push(C);this.images[C]={fileName:C,controls:[B]};this.loadNextImage()}else{this.images[C].controls.push(B)}}}};_P.loadNextImage=function(){if((!this.loading())&&(this.imageList.length>0)){this.loading(true);this.imageLoader.src=this.imageList[0]}};_P.onload=function(){this.handleOnLoad(false)};_P.onerror=function(){this.handleOnLoad(true)};_P.handleOnLoad=function(B){var D=null;var C=this.imageList.shift();this.loading(false);if(!isEmptyString(C)){if(!B){var E=this.images[C];for(_EC6 in E.controls){D=E.controls[_EC6];if(D&&D.mObject){D.mObject.style.backgroundImage="url("+this.imageLoader.src+")"}}E=null}this.images[C]=true}this.loadNextImage()};return classUpdate()})();return new A()})();var domEventAdd=function(B,A,C){if(B.addEventListener){if(leftLike$(A,"on")){A=mid$(A,3)}B.addEventListener(A,C,false)}else{if(B.attachEvent){if(!leftLike$(A,"on")){A="on"+A}B.attachEvent(A,C)}}};var domEventRemove=function(B,A,C){if(B.removeEventListener){if(leftLike$(A,"on")){A=mid$(A,3)}B.removeEventListener(A,C,false)}else{if(B.detachEvent){if(!leftLike$(A,"on")){A="on"+A}B.detachEvent(A,C)}}};classCreate("cList",null);cList=(function(){_P.property("caseSensitive",false);_P.create=function(A){this.mCurrentPos=0;this.caseSensitive(A);this.mKeys=new array(1);this.mKeys[0]="";this.mValues=new array(1)};_P.add=function(B,C){if(isEmptyString(B)){return 0}if(!this.mCaseSensitive){B=B.toLowerCase()}var A=this.find(B);if(A<=0){this.mCurrentPos=(-A);this.mKeys.splice(this.mCurrentPos,0,B);this.mValues.splice(this.mCurrentPos,0,C);this.mCurrentPos}else{this.mCurrentPos=A;this.mvalues[A]=C}return this.mCurrentPos};_P.count=function(){return this.mKeys.length-1};_P.keys=function(A){if(typeof A!=="number"){return null}if((A>0)&&(A<=this.mKeys.length)){return this.mKeys[A]}};_P.items=function(B){var A;A=(typeof B==="number"?cVal(B):this.find(B));if((A>0)&&(A<=this.mKeys.length)){return this.mValues[A]}};_P.find=function(B,D,C){var A=1;var F=this.mKeys.length-1;var E=0;var G=1;if(!this.mCaseSensitive){B=B.toLowerCase()}while(A<=F){G=math.floor(A+((F-A)/2));switch(compare$(B,this.mKeys[G],C)){case 0:E=G;if(!D){F=G-1}else{A=G+1}break;case -1:F=G-1;break;case 1:A=G+1;if(A>F){G=G+1}break}}return(E==0?-G:E)};_P.moveFirst=function(){this.mCurrentPos=0;return this.moveNext()};_P.moveNext=function(){if(this.mCurrentPos<this.mKeys.lenght-2){this.mCurrentPos+=1;return true}return false};_P.moveLast=function(){this.mCurrentPos=this.mKeys.length-1;if(this.mCurrentPos>0){return true}return false};_P.movePrev=function(){if(this.mCurrentPos>1){this.mCurrentPos-=1;return true}return false};_P.currentKey=function(){return this.mKeys[this.mCurrentPos]};_P.current=function(){return this.mValues[this.mCurrentPos]};_P.toString=function(){return this.mKeys.join("\n")};return classUpdate()})();classCreate("httpApi",null);httpApi=(function(){var A=(function(){_P.create=function(){};_P.newHttpRequest=function(){if(!this.mNewHttpRequest){if(window.activeXObject){this.mNewHttpRequest=function(){return new activeXObject("Microsoft.XMLHTTP")}}else{if(window.XMLHttpRequest){this.mNewHttpRequest=function(){return new XMLHttpRequest()}}}}return this.mNewHttpRequest()};_P.asyncLoadXmlDoc=function(C,D,E){C=replace$(C,"\\\\","/");var B=this.newHttpRequest();if(B!=null){if(D==null){B.open("GET",C,true);B.setRequestHeader("Content-Type","text/plain;charset=UTF-8")}else{B.open("POST",C,true);B.setRequestHeader("Content-Type","text/plain;charset=UTF-8")}B.onreadystatechange=function(){if(B.readyState!=4){return }E(httpApi.textToXmlDoc(replace$(B.responseText,"[\r\n]","")))};B.send(D)}};_P.loadXmlDoc=function(C,D){C=replace$(C,"\\\\","/");var B=this.newHttpRequest();if(B!=null){if(D==null){try{B.open("GET",C,false);B.setRequestHeader("Content-Type","text/plain;charset=UTF-8");B.send(null)}catch(E){}}else{try{B.open("POST",C,false,"a","b");B.setRequestHeader("Content-Type","text/plain;charset=UTF-8");B.send(D)}catch(E){try{B.open("POST",C,false);B.send(D)}catch(E){}}}return httpApi.textToXmlDoc(replace$(B.responseText,"[\r\n]",""))}};_P.textToXmlDoc=function(C){if(window.activeXObject){var B=new activeXObject("Microsoft.XMLDOM");B.async="false";B.loadXML(C)}else{var D=new DOMParser();var B=D.parseFromString(C,"text/xml")}return B};_P.createEmptyXmlDoc=function(C){if(isEmptyString(C)){return null}var B="<"+C+" />"};_P.send=function(B){if(isEmptyString(B)){B=""}httpApi.loadXmlDoc()};return classUpdate()})();return new A()})();var valueToXml=function(D){var A="";var C="";var F="";var B=0;if(D==null){return""}switch(typeof (D)){case"object":if(D instanceof date){return pad$(cStr(D.getFullYear()),"0",4)+pad$(cStr(D.getMonth()+1),"0",2)+pad$(cStr(D.getDate()),"0",2)+"T"+pad$(cStr(D.getHours()),"0",2)+pad$(cStr(D.getMinutes()),"0",2)+pad$(cStr(D.getMilliseconds()),"0",2)}else{try{return D.toString()}catch(E){}}break;case"fraction":return D.toString();break;case"number":return D.toString();break;case"boolean":return D.toString();break;case"string":for(B=0;B<=D.length-1;B++){A=D.charCodeAt(B);C="";switch(A){case 9:break;case 10:break;case 13:break;case 34:break;case 37:break;case 38:break;case 39:break;case 43:break;case 47:break;case 60:break;case 62:break;case 92:break;default:if(A<127){C=D.charAt(B)}}if(C==""){C="&#"+A+";"}F+=C}return F}};var xmlToValue=function(E,D){var F;D=LCase$(D);switch(D){case"boolean":return(LCase$(E)=="true"?true:false);break;case"number":return cVal(E);break;case"fraction":return E;break;case"date":var B=new date(0);F=nameFromIni$(E,"T");if(len(F)==8){B.setFullYear(cVal(mid$(F,1,4)),cVal(mid$(F,5,2))-1,cVal(mid$(F,7,2)))}F=valueFromIni$(E,"T");if(len(F)==6){B.setHours(cVal(mid$(F,1,2)),cVal(mid$(F,3,2)),cVal(mid$(F,5,2)))}return B;break;case"string":F=E;var A=0;var G=0;var C=0;do{A=inStr(F,"&#",A);G=inStr(F,";",A);if(A>0&&G>A){C=cVal(mid$(F,A+2,G-A-2));if(C>0&&C<127){F=mid$(F,1,A-1)+string.fromCharCode(C)+mid$(F,G+1)}}}while(A>0&&G>A);return F;break;default:return E}};classCreate("cHttpRequest",null);cHttpRequest=(function(){var A={};_P.create=function(){this.mCommands={}};_P.addCommand=function(C,B){this.mCommands[LCase$(C)]=B};_P.addParam=function(D,C,B){this.mCommands[LCase$(D)][C]=B};_P.toCommandString=function(){var H;var E;var G;var F="";var B=new array();var C="";var D=0;for(H in this.mCommands){F="";G=this.mCommands[H];for(E in G){F+=E+':"'+valueToXml(G[E])+'"'}C=H+(F==""?"":"="+F);B[D]=C;D++}return B.join("&")};_P.send=function(){var B=new dbNode(httpDebug+httpXmlRequestPage,this.toCommandString());if(B.xmlDoc==null){return null}else{return B}};return classUpdate()})();classCreate("dbNode",null);dbNode=(function(){_P.property("xmlDoc",null);_P.property("filters",{});_P.create=function(url,post){this.mEof=true;if(!isEmptyString(url)){this.xmlDoc=httpApi.loadXmlDoc(url,post);if(this.xmlDoc!=null){this.moveRoot()}}this.filters=null;this.checkFilters=null;return !this.mEof};_P.loadDoc=function(doc){this.mEof=true;this.xmlDoc=doc;if(this.xmlDoc!=null){this.moveRoot()}this.filters=null;return !this.mEof};_P.destroy=function(){};_P.eof=function(){return this.mEof||(this.xmlDoc==null)};_P.checkCurrentPos=function(){if(this.mEof==true){return false}if(this.xmlDoc==null){return false}return true};_P.fieldCount=function(){if(this.xmlDoc){return this.xmlDoc.attributes.length}else{return 0}};_P.getFieldName=function(index){if(this.xmlDoc){return this.xmlDoc.attributes[index-1].name}else{return""}};_P.get=function(fieldName){try{switch(typeof (fieldName)){case"string":return this.xmlDoc.getAttribute(fieldName.toLowerCase());break;case"number":return this.xmlDoc.attributes[fieldName-1].value}}catch(e){}};_P.set=function(fieldName,value){try{switch(typeof (fieldName)){case"string":this.xmlDoc.setAttribute(fieldName.toLowerCase(),value);break;case"number":this.xmlDoc.attributes[fieldName-1].value=value}}catch(e){}};_P.isNodeType=function(typeName){return this.xmlDoc&&(UCase$(typeName)==this.xmlDoc.tagName)};_P.nodeType=function(){return(this.xmlDoc?this.xmlDoc.tagName:"")};_P.clone=function(){var result=new dbNode();result.xmlDoc=this.xmlDoc;result.mEof=this.mEof;return result};_P.parent=function(){var result=this.clone();result.moveUp();return result};_P.child=function(index){var child=this.clone();child.moveDown(index);return child};_P.move=function(ID){this.moveRoot();return this.find("ID",ID,true)};_P.moveRoot=function(){if(!this.xmlDoc){return false}this.mEof=false;if(this.xmlDoc.ownerDocument){this.xmlDoc=this.xmlDoc.ownerDocument.documentElement}else{this.xmlDoc=this.xmlDoc.documentElement}return this.checkCurrentPos()};_P.moveFirst=function(){if(!this.xmlDoc){return false}this.mEof=false;if(this.xmlDoc.parentNode!=null){this.xmlDoc=this.xmlDoc.parentNode.firstChild}if(this.checkCurrentPos()){if(!this.checkFilters||this.checkFilters()){return true}return this.moveNext()}return false};_P.moveLast=function(){if(!this.xmlDoc){return false}this.mEof=false;if(this.xmlDoc.parentNode!=null){this.xmlDoc=this.xmlDoc.parentNode.lastChild}if(this.checkCurrentPos()){if(!this.checkFilters||this.checkFilters()){return true}return this.movePrev()}return false};_P.moveNext=function(){if(!this.xmlDoc){return false}while((!!this.xmlDoc.nextSibling)&&(this.xmlDoc.nextSibling.nodeType!=0)){this.xmlDoc=this.xmlDoc.nextSibling;if(!this.checkFilters||this.checkFilters()){this.mEof=false;return true}}this.mEof=true;return false};_P.movePrev=function(){if(!this.xmlDoc){return false}while((!!this.xmlDoc.previousSibling)&&(this.xmlDoc.previousSibling.nodeType!=0)){this.xmlDoc=this.xmlDoc.previousSibling;if(!this.checkFilters||this.checkFilters()){this.mEof=false;return true}}this.mEof=true;return false};_P.clearFilters=function(){this.filters=null;this.checkFilters=null};_P.setFilter=function(fieldName,value,operator){var filter="";var strFunction="";fieldName=LCase$(fieldName);if(!this.filters){this.filters={}}switch(LCase$(operator)){case"lt":case"<":operator=">=";break;case"le":case"<=":operator=">";break;case"gt":case">":operator="<=";break;case"ge":case">=":operator="<";break;default:operator="!="}this.filters[fieldName+operator]='if (this.get("'+fieldName+'")'+operator+'"'+cStr(value)+'") return false;';strFunction="this.checkFilters = function() {";for(_EC1 in this.filters){filter=this.filters[_EC1];strFunction+=filter}strFunction+="return true}";eval(strFunction)};_P.canGoPrev=function(){var result=false;var bookMark=this.xmlDoc;if(this.movePrev()){result=true;this.xmlDoc=bookMark}return result};_P.canGoNext=function(){var result=false;var bookMark=this.xmlDoc;if(this.moveNext()){result=true;this.xmlDoc=bookMark}return result};_P.moveUp=function(){if(!this.xmlDoc){return false}if((!this.xmlDoc.parentNode)||(this.xmlDoc.parentNode.nodeType>1)){this.mEof=true}else{this.mEof=false;this.xmlDoc=this.xmlDoc.parentNode}return this.checkCurrentPos()};_P.moveDown=function(jumpTo){if(!this.xmlDoc){return false}if(this.xmlDoc.firstChild==null){this.mEof=true}else{this.mEof=false;if(jumpTo===undefined){this.xmlDoc=this.xmlDoc.firstChild}else{if((typeof jumpTo==="number")&&(jumpTo>0)&&(jumpTo<this.xmlDoc.childNodes.length)){this.xmlDoc=this.xmlDoc.childNodes[jumpTo-1]}else{this.xmlDoc=this.xmlDoc.lastChild}}}return this.checkCurrentPos()};_P.childCount=function(){try{return this.xmlDoc.childNodes.length}catch(e){return 0}};_P.fieldCount=function(){try{return this.xmlDoc.attributes.length}catch(e){return 0}};_P.seqNext=function(quitAtID,skipChildren){skipChildren=cBool(skipChildren);quitAtID=cVal(quitAtID);if((cBool(skipChildren))||(!this.moveDown())){if((cVal(this.get("ID"))!=quitAtID)){if(!this.moveNext()){while(this.moveUp()){if((cVal(this.get("ID"))==quitAtID)){break}if(this.moveNext()){break}}if(this.eof()){return false}}}}return cVal(this.get("ID"))!=quitAtID};_P.seqPrev=function(quitAtID){quitAtID=cVal(quitAtID);if(this.movePrev()){while((this.moveDown(-1))&&(cVal(this.get("ID"))!=quitAtID)){}this.mEof=false}else{if(!this.moveUp()){return false}}return(cVal(this.get("ID"))!=quitAtID)};_P.find=function(fieldName,value,searchSubDirs){var search=(searchSubDirs?"..//*":"../*")+"[@"+LCase$(fieldName)+"='"+cStr(value)+"']";return this.XPath(search)};_P.findChild=function(fieldName,value,searchSubDirs){var search=(searchSubDirs?".//*":"./*")+"[@"+LCase$(fieldName)+"='"+cStr(value)+"']";return this.XPath(search)};_P.XPath=function(search){if(!this.xmlDoc){return false}var tmpXml=null;if(window.activeXObject){tmpXml=this.xmlDoc.selectSingleNode(search)}else{var xpe=new XPathEvaluator();var nsResolver=xpe.createNSResolver(this.xmlDoc.ownerDocument.documentElement);var results=xpe.evaluate(search,this.xmlDoc,nsResolver,XPathResult.FIRST_ORDERED_NODE_TYPE,null);tmpXml=results.singleNodeValue}if(tmpXml){this.xmlDoc=tmpXml;this.mEof=false}else{this.mEof=true}return !this.mEof};_P.debugDump=function(){var index;debug.out("================");debug.out(this.nodeType());debug.out("================");for(index=1;index<=this.fieldCount();index++){debug.out(this.getFieldName(index)+":"+this.get(index))}};return classUpdate()})();var getXmlNodeClone=function(D,B,C){if(!D){return null}var A=D.clone();if(A.moveRoot()){if((A.findChild("name",LCase$(B)))&&(A.moveDown())){if(C){return A}else{if(A.moveDown()){return A}}}}return null};var getXmlAction=function(C,B){if(!C){return null}var A=C.clone();if(A.moveRoot()){if((A.findChild("name",LCase$(B)))){return A}}return null};classCreate("oDragBox",cControl);var oDragBox=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Create":this.focusBehavior(efbDrag);break;case"DragStart":this.startX=this.left();this.startY=this.top();break;case"Drag":this.parent().move(this.parent().left()+this.left()-this.startX,this.parent().top()+this.top()-this.startY);this.move(this.startX,this.startY);break;case"DragStart":delete this.startX;delete this.startY;break;case"Show":this.opacity(0);this.drawColorBack("green")}};return classUpdate()})();classCreate("oDropBox",cControl);var oDropBox=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Show":break;case"Hide":break;case"Paint":this.drawColorBack("red")}};return classUpdate()})();classCreate("oLabel",cControl);var oLabel=(function(){_P.property("text","",true);_P.property("autoSize",false,"this.autoSizing((value?easHeight:easNone))");_P.handleEvent=function(A){switch(A.eventID){case"Load":this.style("overflow","hidden");this.text(this.name());break;case"Paint":this.drawText(this.text())}};_P.value=function(A){return this.text(A)};return classUpdate()})();classCreate("oLink",cControl);var oLink=(function(){_P.property("text","",true);_P.property("autoSize",false,"this.autoSizing((value?easWidth:easNone))");_P.handleEvent=function(A){switch(A.eventID){case"Load":this.style("overflow","hidden");this.focusBehavior(efbDefault);this.text(this.name());break;case"Paint":this.drawText(this.text());this.style(ecsTextDecoration,(this.mouseFocus()?"underline":"none"))}};return classUpdate()})();classCreate("oRect",cControl);var oRect=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Paint":this.drawColorBack(this.colorBack())}};return classUpdate()})();classCreate("oImage",cControl);var oImage=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":this.style(ecsOverFlow,"hidden");break;case"Paint":this.drawPicture(this.picture())}};_P.setBackgroundPosition=function(A,B){A=A||0;B=B||0;if(this.mObject){this.mObject.style.backgroundPosition="-"+A+"px -"+B+"px"}};return classUpdate()})();classCreate("oPicture",cControl);var oPicture=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":this.htmlTag("img");break;case"Paint":this.mObject.src=this.picture()}};return classUpdate()})();classCreate("oHtml",cControl);var oHtml=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":this.htmlTag("iframe");this.style("-frameBorder","0")}};_P.showPage=function(A){if(A==""){this.visible(false)}else{this.visible(true);if(this.mObject){this.mObject.src=A}}};return classUpdate()})();classCreate("oMemo",cControl);var oMemo=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":this.htmlTag("textarea");break;case"Show":this.focusBehavior(efbCaptureKeys)}};_P.value=function(A){if(A!=null){this.mObject.value=A}return this.mObject.value};return classUpdate()})();classCreate("oText",cControl);var oText=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":this.htmlTag("input");break;case"Show":this.focusBehavior(efbCaptureKeys|this.focusBehavior())}};_P.value=function(A){if(!this.mObject){return""}if(A!=null){this.mObject.value=A}return this.mObject.value};return classUpdate()})();classCreate("oTextMultiLine",cControl);var oTextMultiLine=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":this.htmlTag("textarea");break;case"Show":this.focusBehavior(efbCaptureKeys)}};_P.value=function(A){if(!this.mObject){return""}if(A!=null){this.mObject.value=A}return this.mObject.value};return classUpdate()})();classCreate("oPassword",cControl);var oPassword=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":this.htmlTag("input");this.style("-type","password");break;case"Show":this.focusBehavior(efbCaptureKeys)}};_P.value=function(A){if(!this.mObject){return""}if(A!=null){this.mObject.value=A}return this.mObject.value};return classUpdate()})();classCreate("oDate",cControl);var oDate=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":this.htmlTag("input");break;case"Show":this.focusBehavior(efbCaptureKeys|this.focusBehavior())}};_P.value=function(C){var A;var B;if(C!=undefined){if(isEmptyString(C)){this.mObject.value=""}else{A=cDate(C);this.mObject.value=A.getDate()+"-"+(A.getMonth()+1)+"-"+A.getFullYear()}}if((this.mObject)&&(this.mObject.value!="")){A=cDate(this.mObject.value);return valueToXml(A)}else{return""}};_P.isValid=function(){var B=split$(this.mObject.value,"-");var A=cDate(this.mObject.value);if(len(B[2])!=4){return false}if(A.getFullYear()!=cVal(B[2])){return false}if(A.getMonth()!=cVal(B[1])-1){return false}if(A.getDate()!=cVal(B[0])){return false}return true};return classUpdate()})();classCreate("oCheckBox",cControl);var oCheckBox=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":this.htmlTag("input.checkbox");break;case"Paint":}};_P.checked=function(A){if(!this.mObject){return false}if(A!=null){this.mObject.checked=(cBool(A)?true:false)}return this.mObject.checked};_P.value=function(A){if(!this.mObject){return false}if(A!=null){this.mObject.checked=(cBool(A)?true:false)}return this.mObject.checked};return classUpdate()})();classCreate("oComboBox",cControl);var oComboBox=(function(){_P.handleEvent=function(B){switch(B.eventID){case"Load":this.focusBehavior(efbOnChange);this.htmlTag("select");break;case"Create":if(this.tempMem!=null){for(var A in this.tempMem){this.addItem(A,this.tempMem[A])}delete this.tempMem;if(this.tempValue){this.value(this.tempValue);delete this.tempValue}}break;case"Show":this.mObject.onchange=handleUiEvents;break;case"Hide":this.mObject.onerror=null;break;case"Change":}};_P.clear=function(){var A=0;if(this.tempMem!=null){this.tempMem=null}if(this.mObject){var B=this.mObject;for(A=B.options.length-1;A>=0;A-=1){B.options[A]=null}B=null}};_P.addItem=function(B,C){if(this.status()<=ecsLoaded){if(this.tempMem==null){this.tempMem={}}this.tempMem[B]=C}else{var A=document.createElement("Option");A.text=B;A.value=C;this.mObject.options[this.itemCount()]=A}};_P.itemCount=function(){if(this.status()<=ecsLoaded){}else{return this.mObject.options.length}};_P.value=function(A){if(A!=null){if(this.mObject){this.mObject.value=A}else{this.tempValue=A}}return(this.mObject?this.mObject.value:this.tempValue)};return classUpdate()})();classCreate("oCheckedListBox",cControl);var oCheckedListBox=(function(){_P.property("currentTop",0);_P.handleEvent=function(B){switch(B.eventID){case"Load":this.style("overflow","auto");break;case"Create":var A;if(this.tempMem!=null){for(A in this.tempMem){this.addItem(A,this.tempMem[A].key,this.tempMem[A].checked)}delete this.tempMem}}};_P.clear=function(){if(this.tempMem!=null){this.tempMem=null}this.removeControl("*");this.currentTop(0)};_P.addItem=function(E,B,D){if(isEmptyString(E)){return }if(isEmptyString(B)){B=E}D=(D?true:false);if(this.status()<=ecsLoaded){if(this.tempMem==null){this.tempMem={}}this.tempMem[E]={key:B,checked:D}}else{var A=this.currentTop();var C=this.createControl("Option_"+B,oCheckBox,2,A,16,17);if(C==null){return }C.selected(D);C.tag(B);var F=this.createControl("Caption_"+B,oLabel,20,A,this.width()-40,17);F.text(E);F=null;A+=18;this.currentTop(A)}};_P.setChecked=function(B){var A;for(_EC1 in this.controls){A=this.controls[_EC1];if(LCase$(A.className)=="option"){A.checked(false)}}};_P.value=function(E){var B;var D;var C;var A=new array();if(!isEmptyString(E)){this.setChecked(false);B=split$(E,"|");for(_EC2 in B){D=B[_EC2];C=this.controls["Option_"+D];if(C!=null){C.checked(true)}}this.mObject.value=E}for(_EC3 in this.controls){C=this.controls[_EC3];if(LCase$(C.className)=="ocheckbox"){if(C.checked()){A.push(C.tag())}}}return A.join("|")};return classUpdate()})();classCreate("oButton",cControl);var oButton=(function(){_P.property("pictureDisabled","");_P.property("pictureSelected","");_P.handleEvent=function(A){switch(A.eventID){case"Load":this.focusBehavior(efbNormalAction);case"Paint":this.setBackgroundPicture(true)}};return classUpdate()})();classCreate("oTextButton",cControl);var oTextButton=(function(){_P.property("pictureDisabled","");_P.property("pictureSelected","");_P.property("text","",true);_P.handleEvent=function(A){switch(A.eventID){case"Load":this.focusBehavior(efbNormalAction);var B=this.createControl("Caption",oLabel,0,(this.height()-16)/2,this.width(),20);B.style(ecsTextAlign,"center");B=null;case"Paint":this.setBackgroundPicture(true);this.controls["Caption"].text(this.text())}};return classUpdate()})();classCreate("oFlash",cControl);var oFlash=(function(){_P.property("fileName","","this.reDraw()");_P.property("initialized",false);_P.property("flashObject",null);_P.handleEvent=function(A){switch(A.eventID){case"Load":this.htmlTag("div");this.flashobject=null;break;case"FlashLoad":break;case"Show":this.reDraw();break;case"Hide":case"Destroy":this.destroyInner()}};_P.reDraw=function(){this.destroyInner();if(this.mStatus<ecsShowed){return }if(isEmptyString(this.fileName())){return }tmpFlash=this;var G=getUniqueID();var F={"id":[G,8],"name":[G,2],"type":["application/x-shockwave-flash",3],"width":["100%",3],"height":["100%",3],"allowScriptAccess":["always",6],"movie":[this.fileName(),4],"src":[this.fileName(),2],"quality":["high",6],"bgcolor":["#ffffff",6],"wmode":["transparent",6],"scale":["noScale",6]};var C="";var A="";var D=0;var H="";var I="";var J="embed";var B=2;var E=0;if(inStr(navigator.userAgent,"MSIE")>0){var J="object";var B=9;var E=4}C="<"+J;for(I in F){H=F[I][0];D=F[I][1];if((D&B)){C+=" "+I+"='"+H+"'"}else{if((D&E)){A+="<param name='"+I+"' value='"+H+"' />"}}}C+=">"+A+"</"+J+">";this.drawInnerHtml(C);this.flashObject=this.mObject.firstChild};_P.destroyInner=function(){this.drawInnerHtml("");this.flashObject=null;tmpFlash=null};return classUpdate()})();classCreate("oMedia",cControl);var oMedia=(function(){_P.property("fileName","");_P.handleEvent=function(A){switch(A.eventID){case"Load":var B=this.createControl("Image",oImage,0,0,this.width(),this.height());B.visible(false);B=null;break;case"Show":this.removeControl("Flash");this.controls["Image"].visible(false);if(this.fileName()!=""){switch(LCase$(pathGetExtension(this.fileName()))){case"png":case"gif":case"jpg":var B=this.controls["Image"];B.picture(this.fileName());B.visible(true);B=null;break;case"swf":var B=this.createControl("Flash",oFlash,0,0,this.width(),this.height(),false);B.fileName(this.fileName());B.show();B=null;this.play(true);break}}break;case"Hide":this.play(false);this.removeControl("Flash");break}};_P.play=function(A){};return classUpdate()})();classCreate("oUpload",cControl);var oUpload=(function(){_P.property("uploading",false);_P.handleEvent=function(B){switch(B.eventID){case"Load":break;case"Show":var A="";A+="<form id='file_upload_form' method='post' enctype='multipart/form-data' action="+httpDebug+"'upload.intern'>";A+="<input Name='file' ID='file' Size='27' Type='file' /><br />";A+="<input type='submit' name='action' value='Upload' /><br />";A+="<iframe id='upload_target' name='upload_target' src='' style='visibility:hidden;width:10;height:10;border:0px solid #000;'></iframe>";A+="</form>";this.drawInnerHtml(A);document.getElementById("file_upload_form").childNodes[2].style.visibility="hidden";document.getElementById("file_upload_form").onsubmit=classBind(this,this.submit);document.getElementById("file").onchange=classBind(this,this.fileFound);domEventAdd(document.getElementById("upload_target"),"onload",classBind(this,this.uploadComplete));break;case"Hide":}};_P.fileFound=function(){document.getElementById("upload_target").style.visibility="visible";this.uploading(true);document.getElementById("file_upload_form").target="upload_target";document.getElementById("file_upload_form").childNodes[0].style.visibility="hidden";document.getElementById("file_upload_form").submit()};_P.uploadPath=function(A){if(A&&(this.mUploadPath!=A)){this.mUploadPath=A;document.getElementById("file_upload_form").setAttribute("action",httpDebug+"upload.intern?path="+A)}return this.mUploadPath};_P.submit=function(){this.uploading(true);document.getElementById("file_upload_form").childNodes[2].style.visibility="hidden";document.getElementById("file_upload_form").target="upload_target";document.getElementById("file_upload_form").submit()};_P.uploadComplete=function(){if(this.uploading()){var A=document.getElementById("file_upload_form");A.childNodes[0].value="";A=null;this.raiseEvent("Complete");document.getElementById("file_upload_form").childNodes[0].style.visibility="visible";document.getElementById("upload_target").style.visibility="hidden";this.uploading(false)}};return classUpdate()})();var tween=function(C,B,D,A,E){if(A||E){if(!A){D=(1-E(1-D))}else{if(!E){D=A(D)}else{if(D<0.5){D=(A(D*2))/2}else{D=0.5+((1-E((1-D)*2))/2)}}}}if((C==0)&&(B==1)){return D}else{return math.round((B-C)*D)+C}};classCreate("libEasing",null);libEasing=(function(){var A=(function(){_P.easeQuad=function(B){return B*B};_P.easeCubic=function(B){return B*B*B};_P.easeQuart=function(B){return B*B*B*B};_P.easeQuint=function(B){return B*B*B*B*B};_P.easeSine=function(B){return 1-math.cos(B*(math.PI/2))};_P.easeExpo=function(B){return(B==0)?0:math.pow(2,10*(B-1))};_P.easeCirc=function(B){return -(math.sqrt(1-B*B)-1)};_P.easeElastic=function(B){if(B==0){return 0}if(B==1){return 1}var D=0.3;var C=0.075;return -(math.pow(2,10*(B-=1))*math.sin((B-C)*(2*math.PI)/D))};_P.easeBack=function(B){S=1.70158;return B*B*((S+1)*B-S)};_P.easeBounce=function(B){B=1-B;if(B<(1/2.75)){return 1-(7.5625*B*B)}else{if(B<(2/2.75)){return 1-(7.5625*(B-=(1.5/2.75))*B+0.75)}else{if(B<(2.5/2.75)){return 1-(7.5625*(B-=(2.25/2.75))*B+0.9375)}else{return 1-(7.5625*(B-=(2.625/2.75))*B+0.984375)}}}};return classUpdate()})();return new A()})();var styleTextHeaderOpen="<H3>";var styleTextHeaderClose="</H3>";var randomizeArray=function(B,F,E){var C;var A;var D;if(!(F>=0)){F=0}if(!(E<=UBound(B))){E=UBound(B)}for(C=F;C<=E;C++){A=F-1+random(E-F+1);D=B[A];B[A]=B[C];B[C]=D}};var higherOrEqual=function(B,A){return((cVal(A)>0)&&(cVal(B)>=cVal(A)))};var inArray=function(B,D,A){var C;if(A&&!isString(D)){A=false}for(C=0;C<=UBound(B);C++){if(B[C]==D){return C}else{if(A&&LCase$(B[C])==LCase$(D)){return C}}}return -1};var UBound=function(A){if(A&&(A.constructor==array)){return A.length-1}else{return -1}};var cVal=function(A){return number(A)||0};var cStr=function(A){if(A==null){return""}else{return string(A)}};var cBool=function(A){if(typeof (A)=="string"){if(LCase$(A)=="true"){A=1}else{A=cVal(A)}}return !!A};var len=function(A){return cStr(A).length};var isEmptyString=function(A){return(cStr(A).length==0)};var trim$=function(A){return cStr(A).replace(new regExp("^\\s+|\\s+$","g"),"")};var LTrim$=function(A){return cStr(A).replace(new regExp("^\\s*"),"")};var RTrim$=function(A){return cStr(A).replace(new regExp("\\s*$"),"")};var left$=function(A,B){return((B<=0)||(A==null)?"":A.substring(0,B))};var right$=function(B,C){if(C<=0){return""}var A=B.length-C;if(A>0){return B.substring(A)}return B};var mid$=function(B,C,A){if(isEmptyString(B)){return""}if(C>0){if(!A){return B.substring(C-1)}if(A>0){return B.substring(C-1,C+A-1)}}return""};var leftLike$=function(B,A){return LCase$(A)==left$(LCase$(B),len(A))};var asc=function(A){return A.charCodeAt(0)};var LCase$=function(A){return cStr(A).toLowerCase()};var UCase$=function(A){return cStr(A).toUpperCase()};var stringOptionalAdd=function(D,B,C){var A=cStr(D);if(A!=""){return B+D+C}else{return A}};var compare$=function(B,A,C){if(C==true){A=left$(A,len(B))}return(B>A?1:(B<A?-1:0))};var replace$=function(D,C,B,E){if(typeof (D)!="string"){return D}if(typeof (C)=="object"){var A="";for(A in C){D=D.replace(new regExp(A,"g"),C[A])}return D}else{if(E==true){return D.replace(C,B)}else{return D.replace(new regExp(C,"g"),B)}}};var split$=function(B,A){if(isEmptyString(B)){return new array()}else{return B.split(A)}};var splitTrim$=function(B,A){B=trim$(B);if(isEmptyString(B)){return new array()}else{return B.split(new regExp("\\s*"+A+"\\s*"))}};var join$=function(B,A){try{if(B.length>0){return B.join(A)}}catch(C){}return""};var nameFromIni$=function(A,B){if(isEmptyString(A)){return""}B=B||"=";var C=A.indexOf(B);return trim$((C>=0?A.substring(0,C):A))};var valueFromIni$=function(A,B){if(isEmptyString(A)){return""}B=B||"=";var C=A.indexOf(B);return(C>0?trim$(A.substring(C+B.length)):"")};var inStr=function(B,A,C){if(!B){return 0}return B.indexOf(A,C-1)+1};var inStrRev=function(B,A,C){if(!B){return 0}if(!C){return B.lastIndexOf(A)+1}else{return B.lastIndexOf(A,C-1)+1}};var string$=function(A,B){return new array(A+1).join(B)};var pad$=function(D,C,B,A){var E=len(D);if(E>=B){return D}else{if(A){return D+string$(B-E,C)}else{return string$(B-E,C)+D}}};var pathToUrl=function(A){return LCase$(replace$(trim$(A),"\\\\","/"))};var pathGetFile=function(A){var C=inStrRev(A,"/")+1;var B=inStrRev(A,".");if((B==0)||(B<=C)){return mid$(A,C)}else{return mid$(A,C,B-C)}};var pathGetExtension=function(A){var B=inStrRev(A,".");if(B==0){return""}else{return mid$(A,B+1)}};var pathGetPath=function(A){var B=inStrRev(A,"/");if(B>0){return left$(A,B)}else{return""}};var pathGetPathAndFile=function(A){var B=inStrRev(A,".");if((B==0)){return A}else{return mid$(A,1,B-1)}};var pathGetFileAndExtension=function(A){var B=inStrRev(A,"/")+1;return mid$(A,B)};var pathMakePath=function(C,A,B){C=C||"";A=A||"";B=B||"";return C+(right$(C,1)=="/"?"":"/")+A+(inStr(A,".")>0?"":"."+B)};var pathIsImage=function(A){switch(LCase$(pathGetExtension(A))){case"jpg":case"gif":case"png":case"bmp":return true}return false};var urlEncode=function(A){return encodeURIComponent(A)};var escape$=function(A){return replace$(A,{"&":"&amp;","<":"&lt;",">":"&gt;","'":"&apos;","\\":"&quot;"})};var unescape$=function(A){return replace$(A,{"&lt;":"<","&gt;":">","&apos;":"'","&quot;":"\\","&amp;":"&"})};var isNumeric=function(B){switch(toString.call(B)){case"[object Number]":return true;break;case"[object String]":var A="0123456789.";if(isEmptyString(B)){return false}for(i=0;i<=B.length-1;i++){if(A.indexOf(B.charAt(i))==-1){return false}}return true}return false};var isEmail=function(A){var C=new regExp("\\w+([-+.’]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*");var B=C.exec(A);return(B!=null&&A==B[0])};var isUrl=function(A){var C=new regExp("http(s)?://([\\w-]+\\.)+[\\w-]+(/[\\w-\\+ ./?%:&=#\\[\\]]*)?");var B=C.exec(A);return(B!=null)&&(A==B[0])};var decToHex=function(A){return A.toString(16)};var hexToDec=function(A){return parseInt(A,16)};var stripHtml=function(A){if(isEmptyString(A)){return""}return A.replace(/<\S[^>]*>/g,"")};classCreate("stringBuilder",null);stringBuilder=(function(){_P.addString=function(A){if(!this.arr){this.arr=new array()}this.arr.push(A)};_P.joinStr=function(){if(UBound(this.arr)>0){var A=new array();A[0]=this.arr.join("");this.arr=A}};_P.len=function(){if(UBound(this.arr)<0){return 0}this.joinStr();return this.arr[0].length};_P.toString=function(){if(UBound(this.arr)<0){return""}this.joinStr();return this.arr[0]};return classUpdate()})();var hex2=function(B){var A="0123456789ABCDEF";return A.charAt((B>>4)&15)+A.charAt(B&15)};var RGB=function(C,B,A){return"#"+hex2(C)+hex2(B)+hex2(A)};var getRGB=function(A){if(UBound(A)==2){return{red:A[0],green:A[1],blue:A[2]}}else{if(typeof (A)=="string"){A=parseInt(A.substr(1),16)}if(typeof (A)=="number"){return{red:(A&16711680)>>16,green:(A&65280)>>8,blue:A&255}}}return{red:0,green:0,blue:0}};var cDate=function(A){if(isEmptyString(A)){return new date()}else{switch(len(A)){case 15:return xmlToValue(A,"date");break;default:if(inStr(A,"-")>0){var B=split$(A,"-");if(len(B[2])==4){A=B[2]+"/"+B[1]+"/"+B[0]}else{A=replace$(A,"-","/")}}return new date(A)}}};var formatDate=function(B,A){return A.replace(/(yyyy|:mm|mm|dd|d|hh|h|nn|ss)/gi,function(C){switch(C.toLowerCase()){case"yyyy":return B.getUTCFullYear();case"mm":return pad$(B.getUTCMonth()+1,"0",2);case"dd":return pad$(B.getUTCDate(),"0",2);case"d":return B.getUTCDate();case"hh":return pad$(B.getUTCHours(),"0",2);case"h":return B.getHours();case":mm":return":"+pad$(B.getUTCMinutes(),"0",2);case"nn":return pad$(B.getUTCMinutes(),"0",2);case"ss":return pad$(B.getUTCSeconds(),"0",2)}})};enumCounter=0;var ebbctNone=enumCounter++;var ebbctBold=enumCounter++;var ebbctItalic=enumCounter++;var ebbctStrikeThrough=enumCounter++;var ebbctUnderline=enumCounter++;var ebbctQuote=enumCounter++;var ebbctCode=enumCounter++;var ebbctStrong=enumCounter++;var ebbctEm=enumCounter++;var ebbctColor=enumCounter++;var BBCodeTags=split$(",B,I,S,U,BLOCKQUOTE,PRE,STRONG,EM,SPAN",",");var nestedCount=function(B,C){var A=0;for(A=2;A<=len(B);A++){if(mid$(B,A,1)!=C){break}}return A-1};var markupToHtml=function(J,D){var N=new array;var L=0;var H=0;var A=0;var K=0;var I="";var B=false;var E=0;var M="";var C=new array();var G=0;var F=new array();if(isEmptyString(J)){return""}J=replace$(J,vbCr,"");J=replace$(J,"&#13;","");J=replace$(J,"&#10;",vbLf);J=replace$(J,vbLf+vbLf+vbLf,vbLf+vbLf+BMarkupClearFloat());N=split$(J,vbLf);for(L=0;L<=UBound(N);L++){M=RTrim$(N[L]);I=left$(M,1);switch(I){case"-":E=nestedCount(M,I);M="<LI>"+markupToHtml(mid$(M,E+1),true)+"</LI>";if(E<H){M=string$(H-E,"</UL>")+M;H=E}else{if(E>H){M=string$(E-H,"<UL>")+M;H=E}}break;case"|":M=replace$(M,"|!","<TH>",true);C=split$(M,"|");for(G=0;G<=UBound(C);G++){C[G]=markupToHtml(C[G],true)}M=join$(C,"<TD>");if(B){M="<TR>"+M+"</TR>"}else{M="<TABLE><TR>"+M+"</TR>";B=true}break;default:if(!F[ebbctCode]){switch(I){case"!":E=nestedCount(M,"!");M="<H"+E+">"+mid$(M,E+1)+"</H"+E+">";addBreak=true;break;case"#":M=BMarkupImage(mid$(M,2))+"<br />";break;case"@":M=BMarkupLink(mid$(M,2),true)+"<br />";break;default:M=BFindBBCodes(M,F,L==UBound(N))}if(H>0){M=string$(H,"</UL>")+M;H=0}if(B){M="</TABLE>"+M;B=false}}}N[L]=M}L=UBound(N);if(H>0){N[L]=N[L]+string$(H,"</UL>")}if(B){N[L]=N[L]+"</TABLE>"}if(D){return join$(N,"")}else{return join$(N,vbLf)}};var BMarkupClearFloat=function(){return"<DIV style='clear:both'></DIV>"};var findSpecialMarkup=function(F,D,A){var E=0;var C=0;var B=0;while(true){E=inStr(F,D);C=inStrRev(F,D);B=inStr(F,"http:");if(B+5==E){break}if(C<=E){break}if(mid$(F,E+len(D),1)==left$(D,1)){break}if(mid$(F,C-1,1)==right$(D,1)){break}F=left$(F,E-1)+"<"+A+">"+mid$(F,E+2,C-E-2)+"</"+A+">"+mid$(F,C+2)}return F};var BFindBBCodes=function(K,L,N){var H=0;var B=0;var O=0;var D=0;var P=0;var M="";var G=0;var C="";var E="";var F=false;var J="";var I=!N;var A=0;K=findSpecialMarkup(K,"**","STRONG");K=findSpecialMarkup(K,"//","EM");K=findSpecialMarkup(K,"__","U");B=1;A=len(K);while(true){B=inStr(K,"[",B);if(B==0){break}O=inStr(K,"]",B+1);if(O==0){break}M=mid$(K,B+1,O-B-1);D=inStr(M,"=");P=inStr(M," ");if((D==0)||((P<D)&&(P>0))){D=P}if(D>0){E=left$(M,D-1)}else{E=M}if(left$(E,1)=="/"){E=mid$(E,2);F=true}else{F=false}G=ebbctNone;C="";switch(LCase$(E)){case"b":G=ebbctBold;break;case"br":J="<BR />";G=0;break;case"s":G=ebbctStrikeThrough;break;case"i":G=ebbctItalic;break;case"u":G=ebbctUnderline;break;case"quote":G=ebbctQuote;break;case"code":G=ebbctCode;break;case"img":J=BMarkupImage(mid$(M,6));break;case"url":J=BMarkupLink(mid$(M,6),true);break;case"color":G=ebbctColor;C="Style = 'color:"+mid$(M,7)+"'";break;default:switch(left$(E,1)){case"#":J=BMarkupImage(mid$(M,2));break;case"@":J=BMarkupLink(mid$(M,2),true);break;default:J=""}}if(G>0){if(F){J="</"+BBCodeTags[G]+">"}else{if(C!=""){J=(L[G]?"</"+BBCodeTags[G]+">":"");L[G]=true;J+="<"+BBCodeTags[G]+" "+C+">"}else{if(!L[G]){L[G]=true}J="<"+BBCodeTags[G]+">"}}}if((O-B+1)==A){I=false}if(J!=""){K=left$(K,B-1)+J+mid$(K,O+1);B=B+len(J)}else{B=O+1}}if(N){for(H=1;H<=UBound(L);H++){if(L[H]){K=K+"</"+BBCodeTags[H]+">";L[H]=false}}}if(I){K=K+"<BR />"}return K};var BMarkupImage=function(B){var A=[];var D=0;var F="";var E="";var C=false;B=trim$(B);if(B==""){return""}F="center";A=split$(B," ");for(D=0;D<=UBound(A);D++){switch(LCase$(A[D])){case"alignleft":F="left";C=true;break;case"alignright":F="right";C=true;break;case"aligncenter":F="center";C=true;break;case"noalign":F="";C=true;break;default:if(!C){E=E+(E==""?"":" ")+A[D]}}}switch(LCase$(pathGetExtension(E))){case"jpg":break;case"gif":break;case"png":break;case"bmp":E=pathGetPathAndFile(E)+".jpg";break;default:E=pathGetPathAndFile(E)+".jpg"}if((E!="")&&!(leftLike$(E,"image/"))){E="image/"+E}return"<img src='"+E+"'"+(F!=""?" align='"+F+"'":"")+" />"};var BMarkupLink=function(C,B){var H=0;var F="";var D="";var E="";var A="";var G="";H=inStr(C,"|");if(H==0){H=inStr(C," ")}if(H>0){F=left$(C,H-1);D=mid$(C,H+1)}else{D=C;F=C}H=inStr(D,"callback=");if(H>0){G=trim$(mid$(D,H+9));D=trim$(mid$(D,1,H-1))}if(F!=""){if(inStr(LCase$(F),"www.")==0){switch(pathGetExtension(F)){case"pdf":case"doc":F=replace$(F,"\\\\","/");F=trim$(pathGetFileAndExtension(F));if(LCase$(left$(F,4))!=documentsPath){F=documentsPath+F}}}else{if(LCase$(left$(F,7))!="http://"){F="http://"+F}}if(B){E=" class='readmore'"}if(G!=""){A="<A HREF='"+F+"' target='_blank'"+E+" onmouseover='return "+G+"(event)' onmouseout='return "+G+"(event)' onclick='return "+G+"(event)'>"+D+"</A>"}else{A="<A HREF='"+F+"' target='_blank'"+E+">"+D+"</A>"}}return A};var dailyScoreLow=0;var hourlyScoreLow=0;var currentScore=0;var currentDemoTime="";var currentPlayerName="";classCreate("oScore",cControl);var oScore=(function(){_P.property("text","",true);_P.property("score","",true);_P.handleEvent=function(A){switch(A.eventID){case"Load":var B=this.createControl("lblName",oLabel,0,0,205,20);B.style("overflow","hidden");B=null;var B=this.createControl("lblScore",oLabel,210,0,30,20);B.style("overflow","hidden");B=null;break;case"Paint":this.controls["lblName"].text(this.text());this.controls["lblScore"].text(this.score());break}};return classUpdate()})();classCreate("scrDemoStart",cControl);var scrDemoStart=(function(){_P.property("scoreList",null);_P.handleEvent=function(B){switch(B.eventID){case"Load":this.style(ecsFontSize,12);this.style("color","#000");this.picture("image/interface/bgDemo.gif");var C=this.createControl("DnpStart",oDnpStart,30,92,685,555);C=null;var C=this.createControl("DnpScores",oDnpScores,740,67,200,520);C.visible(false);C=null;var C=this.createControl("UitlegDnp",oButton,440,615,93,22);C.picture("image/buttons/DemoUitleg.gif");C=null;var C=this.createControl("StartDnp",oButton,545,615,93,22);C.picture("image/buttons/MenuStart.gif");C=null;var C=this.createControl("btnClose",oLink,906,14,80,14);C.text(langLms("GameClose"));C=null;break;case"btnClose_Click":window.close();break;case"Show":this.drawPicture(this.picture());var C=this.controls["btnClose"];C.colorFore("#FFFFFF");C.style(ecsTextAlign,"right");C.style(ecsFontWeight,"bold");C=null;break;case"Paint":break;case"UitlegDnp_Click":showPopup(720,540,oPopupUitleg,null,null,true);break;case"StartDnp_Click":var A=debugMode;var C=gameStats;C.name=this.formValue("Voornaam");C.lastName=this.formValue("Achternaam");C.email=this.formValue("Email");C.nieuwsBrief=this.formValue("Nieuwsbrief");C.score=0;if(C.name&&C.lastName&&C.email){A=true;currentPlayerName=C.name}C=null;if(A){showScreen("dnp",dnpDemoXml)}else{msgBox(langLms("GameErrorRequired"))}break}};_P.formValue=function(A,C){var D=this.controls["DnpStart"];var B=D.controls["fld"+A];if(B==null){return }D=null;return B.value(C)};return classUpdate()})();classCreate("scrDemoEnd",cControl);var scrDemoEnd=(function(){_P.property("scoreList",null);_P.handleEvent=function(C){switch(C.eventID){case"Load":this.style(ecsFontSize,12);this.style("color","#000");var B=0;var A=0;this.picture("image/interface/bgDemo.gif");var D=this.createControl("DnpAward",oDnpAward,30,92,685,555);D=null;var D=this.createControl("DnpEnd",oDnpEnd,30,92,685,555,false);D=null;var D=this.createControl("DnpScores",oDnpScores,740,67,200,520);D=null;var D=this.createControl("SkipDnpAward",oButton,440,615,93,22);D.picture("image/buttons/DemoSkip.gif");D=null;var D=this.createControl("EndDnp",oButton,545,615,93,22);D.picture("image/buttons/MenuStart.gif");D=null;var D=this.createControl("btnClose",oLink,906,14,80,14);D.text(langLms("GameClose"));D=null;break;case"btnClose_Click":window.close();break;case"Show":this.drawPicture(this.picture());var D=this.controls["btnClose"];D.colorFore("#FFFFFF");D.style(ecsTextAlign,"right");D.style(ecsFontWeight,"bold");D=null;break;case"Paint":break;case"SkipDnpAward_Click":this.saveScore();this.showEnd();break;case"EndDnp_Click":var E=debugMode;var D=gameStats;D.adress=this.formValue("Adres");D.zipCode=this.formValue("Postcode");D.city=this.formValue("Plaats");D.phone=this.formValue("Telefoon");D.occupation=this.formValue("Functie");D.company=this.formValue("Werkgever");D.voorwaarden=this.formValue("Voorwaarden");D.score=0;if(D.adress&&D.zipCode&&D.city&&D.phone&&D.occupation&&D.company&&D.voorwaarden){E=true}D=null;if(E){this.saveScore();this.showEnd()}else{msgBox(langLms("GameErrorRequired"))}break}};_P.saveScore=function(){gameStats.score=currentScore;saveScore()};_P.showEnd=function(){var A=this.controls["DnpAward"];A.visible(false);A=null;var A=this.controls["SkipDnpAward"];A.visible(false);A=null;var A=this.controls["EndDnp"];A.visible(false);A=null;var A=this.controls["DnpEnd"];A.visible(true);A=null;var A=this.controls["DnpScores"];A.show();A=null};_P.formValue=function(A,C){var D=this.controls["DnpAward"];var B=D.controls["fld"+A];if(B==null){return }D=null;return B.value(C)};return classUpdate()})();var getHour=function(){var A=new date();return A.getHours()};var getlastHour=function(){var B=new date();var A=B.getHours()-1;if(A<=0){A=23}return A};var gameStats={};var saveScore=function(){name=left$(name,70);var B=getHour();var C=new cHttpRequest();C.addCommand("savescore",gameStats);var A=new dbNode;A=C.send()};classCreate("oDnpScores",cControl);var oDnpScores=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":var G=0;var H=0;var E=this.createControl("lblScore",oLabel,0,H,200,20);E.style("fontWeight","bold");E.style("fontSize","12");E.text("Scores");E=null;H+=30;var E=this.createControl("lblScoreLastHour",oLabel,0,H,200,20);E.style("fontWeight","bold");E.text("Top Score afgelopen maand");E.visible(false);E=null;H+=25;var E=this.createControl("ScoreLastHour",oScore,0,H+G*20,240,18);E.text("");E.score("");E.visible(false);E=null;H+=60;var E=this.createControl("lblScoresCurrent",oLabel,0,H,200,20);E.style("fontWeight","bold");E.text(langLms("GameScoreCurrent"));E=null;var E=this.createControl("lblScoresNow",oLabel,0,H,200,20);E.style("fontWeight","bold");E.text("Top 5 van vandaag");E.visible(false);E=null;H+=25;var E=this.createControl("ScoresCurrent",oScore,0,H,240,18);E.text("");E.score("");E=null;for(G=1;G<=5;G++){var E=this.createControl("ScoresNow#"+G,oScore,0,H,240,18);E.text("");E.score("");E=null;H+=20}H+=60;var E=this.createControl("lblScoresToday",oLabel,0,H,200,20);E.style("fontWeight","bold");E.text(langLms("GameTopScoresMonth"));E=null;H+=25;for(G=1;G<=10;G++){var E=this.createControl("ScoresToday#"+G,oScore,0,H,240,18);E.text("");E.score("");E=null;H+=20}break;case"Show":var E=this.controls["ScoreLastHour"];E.text("");E.score("");E=null;for(G=1;G<=5;G++){var E=this.controls["ScoresNow#"+G];E.text("");E.score("");E.visible(false);E=null}for(G=1;G<=10;G++){var E=this.controls["ScoresToday#"+G];E.text("");E.score("");E=null}var E=this.controls["ScoresCurrent"];E.text(currentPlayerName);E.score(currentScore);E=null;var B=new cHttpRequest();var C=getlastHour();var F=getHour();B.addCommand("getdayscores");B.addCommand("getmonthscores");var I=new dbNode;I=B.send();var D;G=0;D=getXmlNodeClone(I,"getdayscores");if(D){do{G+=1;if(G>5){break}var E=this.controls["ScoresNow#"+G];E.text(D.get("Name"));E.score(D.get("Score"));hourlyScoreLow=cVal(D.get("Score"));E=null}while(D.moveNext())}G=0;D=getXmlNodeClone(I,"getmonthscores");if(D){do{G+=1;if(G>10){break}var E=this.controls["ScoresToday#"+G];E.text(D.get("Name"));E.score(D.get("Score"));hourlyScoreLow=cVal(D.get("Score"));E=null}while(D.moveNext())}}};return classUpdate()})();classCreate("oDnpStart",cControl);var oDnpStart=(function(){_P.handleEvent=function(C){switch(C.eventID){case"Load":var E=0;this.style(ecsFontWeight,"bold");var D=this.createControl("lblText",oLabel,10,10,this.width()-20,80);D.autoSize(true);D=null;var D=this.createControl("lblText2",oLabel,10,290,this.width()-20,80);D.style(ecsFontWeight,"normal");D.autoSize(true);D=null;E=170;for(_EC1 in ["Voornaam","Achternaam","Email"]){name=["Voornaam","Achternaam","Email"][_EC1];var D=this.createControl("lbl"+name,oLabel,10,E,150,18);D.text(name);D=null;var D=this.createControl("lblReq"+name,oLabel,150,E,10,18);D.text("*");D=null;this.createControl("fld"+name,oText,160,E,300,18);E+=22}name="Nieuwsbrief";var D=this.createControl("lbl"+name,oLabel,160,E,150,18);D.text(langLms("GameNieuwsbrief"));D=null;this.createControl("fld"+name,oCheckBox,10,E,20,18);break;case"Show":var A=false;this.drawColorBack("#FFF");if(currentScore>dailyScoreLow){A=true}else{if(currentScore>hourlyScoreLow){A=true}}var B=0;var D=this.controls["lblText"];D.text(langLms("GameIntroTextTop"));B=D.top()+D.height();D=null;var D=this.controls["lblText2"];D.text(markupToHtml(langLms("GameIntroTextBottom"),true));D=null}};return classUpdate()})();classCreate("oDnpAward",cControl);var oDnpAward=(function(){_P.handleEvent=function(B){switch(B.eventID){case"Load":var E=0;var C=this.createControl("lblText",oLabel,10,10,this.width()-20,10);C.text("");C.autoSize(true);C.style(ecsFontWeight,"bold");C=null;E=170;for(_EC2 in ["Adres","Postcode","Plaats","Telefoon","Functie","Werkgever"]){name=["Adres","Postcode","Plaats","Telefoon","Functie","Werkgever"][_EC2];var C=this.createControl("lbl"+name,oLabel,10,E,150,18);C.text(name);C=null;var C=this.createControl("lblReq"+name,oLabel,150,E,10,18);C.text("*");C=null;this.createControl("fld"+name,oText,160,E,300,18);E+=22}name="Voorwaarden";var C=this.createControl("lbl"+name,oLabel,160,E,300,18);C.text(markupToHtml(langLms("GameAlgemeneVoorwaarden")));C=null;this.createControl("fld"+name,oCheckBox,10,E,20,18);break;case"lnkVoorwaarden_Click":break;case"Show":var A=false;this.drawColorBack("FFF");var C=this.controls["lblVoorwaarden"];C=null;if(currentScore>dailyScoreLow){A=true}else{if(currentScore>hourlyScoreLow){A=true}}var D=markupToHtml(langLms("GameOutroText"),true);D=replace$(D,"[SCORE]",currentScore,true);D=replace$(D,"[TIME]",currentDemoTime,true);this.controls["lblText"].text(D)}};return classUpdate()})();classCreate("oDnpEnd",cControl);var oDnpEnd=(function(){_P.handleEvent=function(B){switch(B.eventID){case"Load":var E=0;var C=this.createControl("lblText",oLabel,10,10,this.width()-20,10);C.text("");C.autoSize(true);C.style(ecsFontWeight,"bold");C=null;break;case"Show":var A=false;this.drawColorBack("FFF");if(currentScore>dailyScoreLow){A=true}else{if(currentScore>hourlyScoreLow){A=true}}var D=markupToHtml(langLms("GameEndText"),true);this.controls["lblText"].text(D)}};return classUpdate()})();classCreate("oPopupUitleg",cControl);var oPopupUitleg=(function(){_P.property("params",null);_P.handleEvent=function(A){switch(A.eventID){case"Load":this.picture("image/lms/interface/bg.gif");var B=this.createControl("Html",oHtml,6,6,this.width()-12,this.height()-35);B=null;break;case"_popup__Show":this.drawScreen(A.params);break;case"_popup__Ok":}};_P.drawScreen=function(B){var A;this.params(B);this.controls["Html"].showPage("intro/dnp_game.htm")};return classUpdate()})();classCreate("scrInternalMail",cControl);var scrInternalMail=(function(){_P.property("currentMessageID","");_P.property("currentMessageSenderID",0);_P.property("isReply",false);_P.handleEvent=function(A){switch(A.eventID){case"Load":this.picture("image/lms/interface/popupmailmenu.jpg");var B=this.createControl("MailHistory",oInternMailHistory,4,55,677,145);B=null;var B=this.createControl("lblMailTo",oLabel,4,211,100,18);B.text(langLms("MailTo"));B=null;this.createControl("cboMailTo",oComboBox,131,211,200,18);var B=this.createControl("lblMailToLevel",oLabel,336,213,300,18);B.text(langLms("MailToLevel"));B=null;var B=this.createControl("lblMailTitle",oLabel,4,234,100,18);B.text(langLms("MailMessageSubject"));B=null;this.createControl("txtMailTitle",oText,131,233,550,20);var B=this.createControl("lblMailText",oLabel,4,258,100,18);B.text(langLms("MailMessageText"));B=null;this.createControl("txtMailMessage",oTextMultiLine,131,258,550,200);var B=this.createControl("lblMailMessage",oInternMailMessage,4,234,677,222);B=null;var B=this.createControl("btnMailReply",oTextButton,528,461,75,22);B.picture("image/lms/buttons/default.gif");B.text(langLms("ReplyMail"));B.style(ecsFontWeight,"bold");B.style(ecsForeColor,"white");B=null;var B=this.createControl("btnMailDelete",oTextButton,606,461,75,22);B.picture("image/lms/buttons/default.gif");B.text(langLms("DeleteMail"));B.style(ecsFontWeight,"bold");B.style(ecsForeColor,"white");B=null;var B=this.createControl("btnMailSend",oTextButton,606,461,75,22);B.picture("image/lms/buttons/default.gif");B.text(langLms("SendMail"));B.style(ecsFontWeight,"bold");B.style(ecsForeColor,"white");B=null;var B=this.createControl("btnMailNew",oTextButton,606,205,75,22);B.picture("image/lms/buttons/default.gif");B.text(langLms("NewMail"));B.style(ecsFontWeight,"bold");B.style(ecsForeColor,"white");B=null;break;case"Show":this.drawPicture(this.picture());this.showScreen();break;case"btnMailNew_Click":if(lms.isAdmin()){this.showMailInput(true)}break;case"btnMailSend_Click":if(this.sendMail()){this.showScreen()}break;case"btnMailDelete_Click":this.deleteMail(this.currentMessageID());this.showScreen();break;case"btnMailReply_Click":this.replyMail(this.currentMessageID());break;case"MailHistory_Select":this.showMailInput(false);this.showMessage(A.params.messageID);this.raiseEvent("UpdateTopMenu")}};_P.showMessage=function(A){var C=requestFast("mailrequestmail",{userid:lms.userID(),messageID:A});var B="";if(!C){return }C=getXmlAction(C,"mailrequestmail");if(!C){return }this.currentMessageID(A);this.currentMessageSenderID(C.get("SenderID"));var D=this.controls["lblMailMessage"];D.title(replace$(C.get("title"),"[USERNAME]",lms.userFullName(),true));D.text(replace$(C.get("Text"),"[USERNAME]",lms.userFullName(),true));D.show();D=null;var D=this.controls["btnMailReply"];D.visible(true);D=null;var D=this.controls["btnMailDelete"];D.visible(true);D=null};_P.showMailInput=function(A){this.controls["btnMailNew"].visible(!A&&lms.isAdmin());this.controls["lblMailTitle"].visible(A);this.controls["txtMailTitle"].visible(A);this.controls["lblMailText"].visible(A);this.controls["txtMailMessage"].visible(A);this.controls["btnMailSend"].visible(A);this.controls["lblMailTo"].visible(A&&lms.isAdmin()&&!this.isReply());this.controls["cboMailTo"].visible(A&&lms.isAdmin()&&!this.isReply());this.controls["lblMailToLevel"].visible(A&&lms.isAdmin()&&!this.isReply());this.controls["lblMailMessage"].visible(false);this.controls["btnMailReply"].visible(false);this.controls["btnMailDelete"].visible(false);this.controls["txtMailTitle"].value("");this.controls["txtMailMessage"].value("");if(!A){this.isReply(false)}};_P.sendMail=function(){var C=this.controls["txtMailTitle"].value();var B=this.controls["txtMailMessage"].value();var A=this.controls["cboMailTo"].value();if(isEmptyString(B)||isEmptyString(C)){msgBox(langLms("IncompleMailMessage"));return false}if(this.isReply()){requestFast("MailSendMail",{userID:lms.userID(),target:"user|"+this.currentMessageSenderID(),title:C,message:B})}else{requestFast("MailSendMail",{userID:lms.userID(),target:getCurrentLmsLevel(),title:C,message:B,mailTo:A})}this.showMailInput(false);return true};_P.replyMail=function(A){if(isEmptyString(A)){return }this.isReply(true);var E=this.controls["lblMailMessage"].title();var D=this.controls["lblMailMessage"].text();var B="Unknown";this.showMailInput(true);var C=requestFast("findrecord",{tableName:"Users",fieldName:"ID",search:cVal(this.currentMessageSenderID()),searchType:"number"});C=getXmlAction(C,"findrecord");if(C){if(C.find("id",this.currentMessageSenderID(),true)){B=C.get("Name")}}quoteText=langLms("MailQuoteHeader");replace$(quoteText,"[SENDERNAME]",B,true);this.controls["txtMailTitle"].value("RE: "+E);D=replace$(D,"[/b][/quote]","",true);D=replace$(D,"[quote][b]","",true);this.controls["txtMailMessage"].value(vbCrLf+vbCrLf+"[quote][b]"+vbCrLf+B+" schreef het volgende:"+vbCrLf+D+vbCrLf+"[/b][/quote]")};_P.deleteMail=function(A){if(isEmptyString(A)){return }requestFast("MailDeleteMail",{userID:lms.userID(),messageID:A})};_P.showScreen=function(){this.showMailInput(false);this.controls["MailHistory"].loadControl();var B=getCurrentLmsLevelExt();var C=this.controls["lblMailToLevel"];C.text(replace$(langLms("MailToLevel"),"[CURRENTLMSLEVEL]",B.name,true));C=null;var A=lms.rightValue(lms.userRights());var C=this.controls["cboMailTo"];C.clear();if(A>=2){C.addItem(langLms("MailToEveryone"),1)}if(A>=4&&B.rightsValue>=4){C.addItem(langLms("MailToSuperAdmins"),2)}if(A>=3&&B.rightsValue>=3){C.addItem(langLms("MailToAdmins"),3)}if(A>=2&&B.rightsValue>=2){C.addItem(langLms("MailToSuperUsers"),4)}if(A>=2&&B.rightsValue>=2){C.addItem(langLms("MailToUsers"),5)}C=null};return classUpdate()})();classCreate("oInternMailHistory",cControl);var oInternMailHistory=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":this.style("overflowY","auto");this.style("overflowX","hidden");break;case"Hide":this.clearControl();break;case"Row_Click":this.raiseEvent("Select",{messageID:A.sender.tag()})}};_P.clearControl=function(){this.removeControl("*")};_P.loadControl=function(){var A=0;var B="";this.clearControl();var D=requestFast("MailMessageList");var D=getXmlNodeClone(D,"MailMessageList");if(D){do{A++;var C=this.createControl("Row#"+A,oInternMailHistoryRow,0,(A-1)*18,this.width(),17);C.loadControl(D.get("MessageID"),D.get("Title"),D.get("SenderName"),D.get("Read"),D.get("SendDate"));C.setBorder(edBottom,WWBlue,"solid",1);C.style(ecsOverFlow,"hidden");C=null}while(D.moveNext())}else{B=langLms("MailNoMail");B=replace$(B,"[USERNAME]",lms.userFullName(),true);var C=this.createControl("Row#NoMail",oLabel,0,0,this.width()-20,17);C.text(B);C.style(ecsTextAlign,"center");C=null}};return classUpdate()})();classCreate("oInternMailHistoryRow",cControl);var oInternMailHistoryRow=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":this.focusBehavior(efbOptionAction);this.createControl("Read",oImage,0,0,20,20);this.createControl("Title",oLabel,24,2,300,16);this.createControl("Sender",oLabel,328,2,220,16);var B=this.createControl("SendDate",oLabel,552,2,75,16);B.style(ecsTextAlign,"right");B=null;break;case"Paint":if(this.selected()){this.drawColorBack(colorMenuSelected)}else{if(this.mouseFocus()){this.drawColorBack(colorMenuHighlight)}else{this.drawColorBack("")}}break;case"Click":this.controls["Read"].picture("image/lms/interface/mailread.gif")}};_P.loadControl=function(A,E,B,C,D){this.tag(A);this.controls["Title"].text(replace$(E,"[USERNAME]",lms.userFullName(),true));this.controls["Sender"].text(B);this.controls["SendDate"].text(formatDate(cDate(D),"DD-MM-YYYY"));this.controls["Read"].picture("image/lms/interface/"+(cBool(C)?"mailread":"mailunread")+".gif")};return classUpdate()})();classCreate("oInternMailMessage",cControl);var oInternMailMessage=(function(){_P.property("title","");_P.property("text","");_P.handleEvent=function(A){switch(A.eventID){case"Load":var B=this.createControl("Title",oLabel,5,2,this.width()-10,14);B.style(ecsFontSize,"12px");B.style(ecsFontWeight,"bold");B=null;var B=this.createControl("Text",oLabel,5,19,this.width()-7,this.height()-21);B.style("overflowY","auto");B=null;break;case"Paint":this.drawPicture("image/lms/interface/bgmailmessage.gif");break;case"Show":var B=this.controls["Title"];B.text(this.title());B=null;var B=this.controls["Text"];B.text(markupToHtml(this.text(),true));B=null}};return classUpdate()})();var mailAutoSend=function(D,B,C,A){requestFast("MailSendMailAuto",{senderID:D,targetID:B,titleName:C,messageName:A})};var _lang=0;var debugMode=false;var defaultCompanyStyleDir="";var companyStyleDir="";var showDisclaimer=false;var lockModuleStart=false;var newUsersCanRegister=false;var showForgotPassButton=false;var showCourseOverviewFilters=true;var showUserMenu=true;var showUserProgress=true;var showUserFirstEdit=true;var studentDefaultScreen="Admin";var colorLmsPageName="White";var colorLmsUserCrumbPath="#FFFFFF";var registerNewUserShowMode=0;var courseGenDoneAlert=false;var welcomeMailReceiverID=0;var documentsPath="doc/";var styleFont={fontSize:11,fontFamily:"arial"};var loginScreenCoords={left:0,top:0};var courseGenStyleTextLeft={left:73,top:175,width:590,height:10,fontSize:11};var courseGenStyleTextRight={left:675,top:175,width:280,height:400,fontSize:11};var courseGenStyleOptions={fontSize:11};var userCourseMenuID=0;var userCourseMenuTitle="";var _langLms={"":["",""]};var langLms=function(B){var A="";if(_langLms[B]){A=_langLms[B][_lang];if(A==""){A=_langLms[B][0]}}else{if(debugMode){debug.out("Missing Translation for "+B);A=B}}return xmlToValue(A,"string")};dataLmsCourseTypeInfo={"caselesson":{scorm:false,icon:"icoBalloons",status:["open","started","completed"]},"dnp":{scorm:false,certificate:false,icon:"icoClock",status:["open","started","passed","failed"]},"enc":{scorm:false,certificate:false,icon:"icoEnc",status:["open","started"]},"wpo":{scorm:false,certificate:false,icon:"icoWpo",status:["open","started"]},"tut":{scorm:false,certificate:false,icon:"icoBook",status:["open","started","completed"]},"pretest":{scorm:false,certificate:false,icon:"icoExam",status:[]},"testexam":{scorm:false,certificate:false,icon:"icoExam",status:[]},"exam":{scorm:false,certificate:false,icon:"icoExam",status:[]},"coursegenexam":{scorm:false,certificate:false,icon:"icoExam",status:["waiting","accepted","requested","rejected","cancelled","closed","passed","failed"]},"coursegenscan":{scorm:false,certificate:false,icon:"icoExam",status:[]},"coursegenevaluation":{scorm:false,certificate:false,icon:"icoExam",status:[]},"coursegenassessment":{scorm:false,certificate:false,icon:"icoWpo",status:[]},"coursegenselftest":{scorm:false,certificate:false,icon:"icoExam",status:["open","started","passed","failed","alert"]},"extern":{scorm:false,certificate:false,icon:"icoExternal",status:["waiting","accepted","requested","rejected","cancelled","closed"]},"evaluatie":{scorm:false,certificate:false,icon:"icoEval",status:[]},"scorm":{scorm:true,certificate:false,icon:"icoBook",status:[]},"scormpractical":{scorm:true,certificate:false,icon:"icoWpo",status:[]},"scormselftest":{scorm:true,certificate:false,icon:"icoExam",status:[]},"scormexam":{scorm:true,certificate:false,icon:"icoExam",status:[]},"scormtestexam":{scorm:true,certificate:false,icon:"icoBook",status:[]},"encyclopedia":{scorm:false,certificate:false,icon:"icoBook",status:["open","started"]}};dataLmsStatus={"open":{name:"open",externalState:true,icon:"icoBallBlueEmpty",warningLevel:"",courseType:["wpo","tut","dnp","coursegenselftest","caselesson","enc","encyclopedia"]},"started":{name:"started",externalState:false,icon:"icoBallBlueHalf",warningLevel:"",courseType:["wpo","tut","dnp","coursegenselftest","caselesson","enc","encyclopedia"]},"incomplete":{name:"incomplete",externalState:false,icon:"icoBallBlueHalf",warningLevel:"",courseType:[]},"unavailable":{name:"unavailable",externalState:false,icon:"icoBalldis",warningLevel:"",courseType:[]},"completed":{name:"completed",externalState:false,icon:"icoBallGreen",warningLevel:"green",courseType:["tut","caselesson"]},"passed":{name:"passed",externalState:false,icon:"icoBallGreen",warningLevel:"green",courseType:["dnp","coursegenexam","coursegenselftest"]},"failed":{name:"failed",externalState:false,icon:"icoBallRed",warningLevel:"red",courseType:["dnp","coursegenexam","coursegenselftest"]},"waiting":{name:"waiting",externalState:false,icon:"icoAlert",warningLevel:"",courseType:["coursegenexam","extern"]},"requested":{name:"requested",externalState:false,icon:"icoAlertOrange",warningLevel:"yellow",courseType:["coursegenexam","extern"]},"rejected":{name:"rejected",externalState:true,icon:"icoAlertRed",warningLevel:"red",courseType:["coursegenexam","extern"]},"accepted":{name:"accepted",externalState:true,icon:"icoAlertGreen",warningLevel:"orange",courseType:["coursegenexam","extern"]},"cancelled":{name:"cancelled",externalState:false,icon:"icoAlertRed",warningLevel:"red",courseType:["coursegenexam","extern"]},"closed":{name:"closed",externalState:false,icon:"icoRestrictedRed",warningLevel:"red",courseType:["coursegenexam","extern"]},"reexamine":{name:"reexamine",externalState:true,icon:"icoAlertRed",warningLevel:"green",courseType:[]},"alert":{name:"alert",externalState:false,icon:"icoAlert",warningLevel:"orange",courseType:["coursegenselftest"]}};classCreate("scrLmsAdmin",cControl);var scrLmsAdmin=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":var J=0;var D=styleBtnMenuUp;var B=this.createControl("btnMenuUp",oButton,D.left,D.top,D.width,D.height,false);B.picture("image/lms/buttons/menu.gif");B=null;D=null;var D=this.createControl("lblPageName",oLabel,739,68,200,20);D.style(ecsForeColor,colorLmsPageName);D.style(ecsFontWeight,"bold");D.text("Persoonlijke pagina");D=null;var D=this.createControl("lblUserName",oLabel,739,98,250,20);D=null;var D=this.createControl("lblCrumbpath",oLabel,135,68,590,24);D.style(ecsFontWeight,"bold");if(lms.isUser()){D.move(32,66);D.style(ecsForeColor,colorLmsUserCrumbPath);D.style(ecsFontSize,14)}else{D.style(ecsFontSize,12)}D=null;this.createControl("LmsForm",oLmsFormTabbed,30,140,680,506,false);this.createControl("LmsReport",oLmsReport,30,100,680,540,false);var D=this.createControl("LmsImportCourses",oLmsImportCourses,30,100,690,550);D=null;var D=this.createControl("AdminMenu",scrAdminMenu,30,90,680,540,false);D=null;this.createControl("ModuleMenu",scrModuleMenu,0,100,this.width(),this.height()-100,false);this.createControl("TheScan",scrTheScan,30,140,this.width(),500,false);this.createControl("MailInvitation",scrMailInvitation,30,140,this.width(),500,false);this.createControl("Forum",scrForum,30,140,685,506,false);this.createControl("Mail",scrInternalMail,30,140,685,506,false);this.createControl("Downloads",scrDownloads,30,140,685,506,false);var D=this.createControl("btnAddNew",oLmsButton,905,615,22,75,false);D.text(langLms("New"));D=null;var D=this.createControl("btnAddNewTree",oLmsButton,905,615,22,75,false);D.text(langLms("New"));D=null;var D=this.createControl("btnMigrate",oLmsButton,905,615,22,75,false);D.text(langLms("Migrate"));D=null;var D=this.createControl("btnSearch",oLmsButton,905,570,22,75,false);D.text(langLms("Search"));D=null;for(J=1;J<=9;J++){this.createControl("chkColSearch#"+J,oCheckBox,741,566-J*42,16,16,false);this.createControl("lblColSearch#"+J,oLabel,761,566-J*42,240,16,false);this.createControl("txtColSearch#"+J,oText,741,582-J*42,240,20,false)}this.controls["lblColSearch#1"].left(741);var D=this.createControl("btnClose",oLink,906,14,80,14);D.text(langLms("LogOff"));D=null;break;case"btnClose_Click":window.location.reload();break;case"Show":if(welcomeMailReceiverID&&lms.userIsFirstLogin()){mailAutoSend(welcomeMailReceiverID,lms.userID(),"MailAutoWelcomeSubject","MailAutoWelcomeMessage")}if(lms.isUser()){var D=this.controls["AdminMenu"];D.style(ecsZOrder,100);D.height(40);D=null;this.controls["btnMenuUp"].visible(false);this.drawPicture("image/lms/interface/bguser.gif")}else{this.drawPicture("image/lms/interface/bglms.gif")}this.controls["lblUserName"].text(langLms("LoggedOnAs")+"  "+lms.userFullName());this.navigateMoveHome();if(lms.isAdmin()&&lms.userIsFirstLogin()){if(lms.hasRight("superadmin")){window.open("guidedtoursuperadmin.html","guidedtour","width=1024,height=768")}else{if(lms.hasRight("admin")){window.open("guidedtouradmin.html","guidedtour","width=1024,height=768")}else{window.open("guidedtoursuperuser.html","guidedtour","width=1024,height=768")}}}if(lms.userRights()=="user"){if(lms.userIsFirstLogin()&&showUserFirstEdit){lms.userIsFirstLogin(false);window.open("guidedtour.html","guidedtour","width=1024,height=768");msgBox("Wilt u uw gegevens controleren en de gegevens bij * invullen?");var F={ID:lms.userID(),name:"Edit",title:langLms("Edit"),typeName:"_edit_"};this.navigateMoveDown(F)}else{if(userCourseMenuID!=0){var F={ID:userCourseMenuID,name:"CoursesOpen",title:userCourseMenuTitle,typeName:"Structure"};this.navigateMoveDown(F)}}}else{if(startArgument("JTU")){var F={ID:startArgument("JTU"),name:"Student",title:langLms("Student"),typeName:"USER"};this.navigateMoveDown(F)}}var D=this.controls["btnClose"];D.colorFore("#FFFFFF");D.style(ecsTextAlign,"right");D.style(ecsFontWeight,"bold");D=null;break;case"AdminMenu_Select":if(A.params.actions){this.doAction(A.params)}else{if(lms.isUser()){switch(LCase$(A.params.name)){case"encyclopedia":break;default:this.navigateMoveUp(1,true)}}this.navigateMoveDown(A.params)}this.controls["AdminMenu"].updateMailButton();break;case"btnMenuUp_Click":this.navigateMoveUp();break;case"btnSearch_Click":if(lmsPath.length==0){break}this.saveCurrentFilter();this.navigate();break;case"chkColSearch_Click":if(lmsPath.length==0){break}this.navigate();break;case"btnAddNew_Click":if(lmsPath.length==0){break}var H=requestStart();var C=fillParam();H.addCommand("AddRecord",C);H.addCommand("GetChildStructure",{structureID:C["ParentStructureID"]});var N=H.send();var E=getXmlNodeClone(N,"GetChildStructure");N=getXmlAction(N,"AddRecord");var K=N.get("ID");var I=new sLmsPath();I.ID=K;I.name=langLms("New");I.title=langLms("New");I.typeName=E.get("Name");I.filters={};lmsPath[lmsPath.length]=I;var C={ID:K,title:langLms("Edit"),title:langLms("Edit"),typeName:"_edit_"};this.navigateMoveDown(C);break;case"btnAddNewTree_Click":if(lmsPath.length==0){break}var H=requestStart();var C=fillParam();H.addCommand("AddRecord",C);H.addCommand("GetStructure",{structureID:C["ParentStructureID"]});var N=H.send();var E=getXmlNodeClone(N,"GetStructure");N=getXmlAction(N,"AddRecord");var K=N.get("ID");var I=new sLmsPath();I.ID=K;I.name=langLms("New");I.title=langLms("New");I.typeName=E.get("Name");I.filters={};lmsPath[lmsPath.length]=I;var C={ID:K,title:langLms("Edit"),title:langLms("Edit"),typeName:"_edit_"};this.navigateMoveDown(C);break;case"btnMigrate_Click":var G=this.controls["AdminMenu"].getSelectedItems();var M;var L="";for(_EC1 in G){M=G[_EC1];L+=(L!=""?";":"")+M.ID}var C=fillParam();C.migrationList=L;var N=requestFast("Migrate",C);this.navigate();break;case"Mail_UpdateTopMenu":this.controls["AdminMenu"].updateMailButton()}};_P.doAction=function(A){switch(LCase$(A.actions)){case"showcertificate":downloadFile("GetCertificate=CourseResultID:'"+A.ID+"'")}};_P.navigateMoveDown=function(A){var C=new sLmsPath();var B=A;if(debugMode){debug.out(B.ID+" : "+B.name+" : "+B.title+" : "+B.typeName)}B=null;C.ID=A.ID;C.name=A.name;C.title=A.title;C.typeName=A.typeName;C.filters={};lmsPath[lmsPath.length]=C;this.navigate()};_P.navigateMoveUp=function(A,B){A=A||1;if(lmsPath.length-A>=0){lmsPath.length-=A}if(!B){this.navigate()}};_P.navigateMoveHome=function(){lmsPath=new array();this.navigate()};_P.navigate=function(){var H={};if((lmsPath.length==0)&&(userCourseMenuID!=0)){var G={ID:userCourseMenuID,name:"CoursesOpen",title:userCourseMenuTitle,typeName:"Structure"};this.navigateMoveDown(G)}var C=requestStart();if(lmsPath.length==0){H={parentStructureID:0};var F=new sLmsPath();F.ID=0;F.name="Home";F.title="Home";F.typeName="structure";F.filters={}}else{H=fillParam();var F=lmsPath[lmsPath.length-1];var B=F.typeName;if(left$(F.typeName,1)=="_"){if(lmsPath.length>1){B=lmsPath[lmsPath.length-2].typeName}else{switch(LCase$(lms.userRights())){case"user":B="user";break;case"superuser":B="department";currentID=lms.userDepartmentID();break;case"admin":B="company";currentID=lms.userCompanyID();break;case"superadmin":}}}else{B=F.typeName}var E=this.getCurrentFilter();C.addCommand("GetRecord",{structureID:B,currentID:F.ID});C.addCommand("GetFields",{structureID:B,currentID:F.ID});C.addCommand("GetStructure",{structureID:H["ParentStructureID"]});C.addCommand("GetChildStructure",{structureID:H["ParentStructureID"]})}H.filters=E;C.addCommand("GetChildNodes",H);var A=new dbNode;A=C.send();if(A==null){return }this.showScreen(A,F);var D="";for(index=0;index<=lmsPath.length-1;index++){if((index==lmsPath.length-1)||(LCase$(lmsPath[index].typeName)!="structure")){D=D+"/"+lmsPath[index].title}}this.controls["lblCrumbpath"].text(mid$(D,2))};_P.redraw=function(){var A=this.controls["ModuleMenu"];if(A.visible()){A.redraw()}A=null};_P.showScreen=function(O,G){var C;var L=0;var H="0";var M=langLms("PersPage");var I;var N;var D;var K;var J;var E;var F=0;this.controls["LmsForm"].hide();this.controls["LmsImportCourses"].visible(false);this.controls["LmsReport"].hide();if(!lms.isUser()){this.controls["AdminMenu"].hide()}this.controls["ModuleMenu"].hide();this.controls["TheScan"].visible(false);this.controls["MailInvitation"].hide();this.controls["Mail"].hide();this.controls["Forum"].hide();this.controls["Downloads"].visible(false);this.controls["btnAddNew"].visible(false);this.controls["btnAddNewTree"].visible(false);this.controls["btnMigrate"].visible(false);I=getXmlNodeClone(O,"GetRecord");if(G&&I){G.title=I.get("Name")||G.title}if(I){if(I.nodeType()=="COMPANY"){companyStyleDir=I.get("Tag")||defaultCompanyStyleDir;if((companyStyleDir!="")&&left$(companyStyleDir,1)!="/"){companyStyleDir="/"+companyStyleDir}}}for(F=1;F<=9;F++){var B=this.controls["chkColSearch#"+F];B.checked(false);B.visible(false);B=null;this.controls["lblColSearch#"+F].visible(false);var B=this.controls["txtColSearch#"+F];B.visible(false);B.tag("");B.value("");B=null}this.controls["txtColSearch#1"].tag("Name");this.controls["btnSearch"].visible(false);N=getXmlNodeClone(O,"GetStructure");if(N){H=N.get("structureview");M=N.get("Text")}switch(LCase$(G.typeName)){case"_edit_":var B=this.controls["LmsForm"];B.showScreen2(G.typeName,G.name,getXmlNodeClone(O,"GetRecord"),getXmlNodeClone(O,"GetFields"));B.visible(true);B=null;break;case"_showchildren_":D=getXmlNodeClone(O,"GetStructure");lmsPath.length-=1;var B=this.controls["AdminMenu"];B.updateScreen("overviewmenu",0,getXmlNodeClone(O,"GetChildNodes"),"",true);B.visible(true);B=null;if(N.get("CanAdd")=="true"){this.controls["btnAddNewTree"].visible(true)}this.initializeColumns(D.get("Columns"));break;case"generalreport":case"companyreport":case"departmentreport":case"classreport":case"userreport":case"coursereport":case"report":var B=this.controls["LmsReport"];B.showScreen(G.ID,I.get("ShowDateFilters"),I.get("ShowNameFilter"));B.visible(true);B=null;break;default:C="iconmenu";if((H=="3")){if(I){L=I.get("ID")}var B=this.controls["AdminMenu"];var A=B.controls["IconMenu"];A.clearScreen();if(L>0){A.showButton(langLms("Edit"),"edit.gif",{ID:L,title:langLms("Edit"),title:langLms("Edit"),typeName:"_edit_"})}A.showButton(langLms("ShowChildren"),"roles.gif",{ID:L,title:langLms("ShowChildren"),title:langLms("ShowChildren"),typeName:"_showchildren_"});A.show();A=null;B.controls["OverviewMenu"].visible(false);B.show();B=null}else{if(H=="5"){switch(LCase$(N.get("name"))){case"coursesopen":var B=this.controls["ModuleMenu"];B.showScreen();B=null;break;case"encyclopedia":this.navigateMoveUp();showEncyclopedia(lms.viewUserID());break;case"scan":var B=this.controls["TheScan"];B.showScreen();B=null;break;case"coursehistory":var B=this.controls["ModuleMenu"];B.showScreen();B=null;break;case"mailinvitation":var B=this.controls["MailInvitation"];B.show();B=null;break;case"mail":var B=this.controls["Mail"];B.show();B=null;break;case"downloads":var B=this.controls["Downloads"];B.start(N.get("linkedtable"));B=null;break;case"resources":var B=this.controls["Downloads"];B.start(N.get("linkedtable"));B=null;break;case"forum":this.controls["Forum"].start();break;default:alert("Unknown: "+N.get("name"))}}else{D=getXmlNodeClone(O,"GetChildStructure");if(D){E=D.get("Actions");switch(D.get("structureview")){case"1":case"5":break;case"6":C="statemenu";break;default:C="overviewmenu"}}if(C!=""){if(I){L=I.get("ID")}else{switch(LCase$(lms.userRights())){case"superadmin":break;case"user":L=lms.userID();break;case"superuser":L=lms.userDepartmentID();break;case"admin":L=lms.userCompanyID()}}if(C=="overviewmenu"){L=0;if(N.get("CanAdd")=="true"){this.controls["btnAddNew"].visible(true)}}if(C=="statemenu"){switch(LCase$(N.get("Actions"))){case"migrate":this.controls["btnMigrate"].visible(true)}}if((C=="overviewmenu")||(C=="statemenu")){this.initializeColumns(D.get("Columns"))}K=getXmlNodeClone(O,"GetChildNodes");if(K){var B=this.controls["AdminMenu"];B.updateScreen(C,L,K,E);B.visible(true);B=null}else{J=getXmlNodeClone(O,"GetFields");if(J){var B=this.controls["LmsForm"];B.showScreen2(G.typeName,G.name,getXmlNodeClone(O,"GetRecord"),J);B.visible(true);B=null}}}}}}I=null;N=null;D=null;K=null;J=null;this.controls["lblPageName"].text(M);if(!lms.isUser()){this.controls["btnMenuUp"].visible(lmsPath.length>0)}};_P.initializeColumns=function(B){var A="";var F="";var D={};if(UBound(lmsPath)>=0){D=lmsPath[UBound(lmsPath)].filters}if(isEmptyString(B)){B="Name: "+langLms("DefaultFilter")}else{if(LCase$(left$(B,4))!="name"){B="Name: Naam"+vbCrLf+B}}var C=split$(vbLf+B,vbLf);index=UBound(C);for(index=1;index<=UBound(C);index++){A=nameFromIni$(C[index],":");F=valueFromIni$(C[index],":");if((A!="")&&(F!="")){if(index>1){var E=this.controls["chkColSearch#"+index];E.visible(true);E.checked((D[A]==undefined?false:true));E=null}var E=this.controls["lblColSearch#"+index];E.text(F);E.visible(true);E=null;var E=this.controls["txtColSearch#"+index];E.tag(A);E.value((D[A]==U?"":D[A]));E.visible(true);E=null}}this.controls["btnSearch"].visible(true)};_P.saveCurrentFilter=function(){var B=0;var A="";var D="";var C={};for(B=1;B<=9;B++){if((B==1)||(this.controls["chkColSearch#"+B].checked())){var E=this.controls["txtColSearch#"+B];if(E.visible()){A=E.tag();D=E.value();C[A]=D}E=null}}if(UBound(lmsPath)>=0){lmsPath[UBound(lmsPath)].filters=C}};_P.getCurrentFilter=function(){var B="";var D="";var C={};var A=[];if(UBound(lmsPath)>=0){C=lmsPath[UBound(lmsPath)].filters;for(B in C){D=C[B];A.push(B+":"+D)}return join$(A,vbCrLf)}else{return""}};return classUpdate()})();classCreate("scrAdminMenu",cControl);var scrAdminMenu=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":this.createControl("IconMenuSmall",oLmsIconTopMenu,0,0,this.width(),40,false);var B=this.createControl("IconMenu",oLmsIconMenu,0,10,this.width(),this.height()-10,false);B=null;var B=this.createControl("OverviewMenu",oLmsOverviewMenu,0,10,this.width(),this.height()-10,false);B=null;break;case"Hide":this.controls["OverviewMenu"].hide();this.controls["IconMenu"].hide();this.controls["IconMenuSmall"].hide();break;case"IconMenu_Select":this.raiseEvent("Select",A.params);break;case"IconMenuSmall_Select":this.raiseEvent("Select",A.params);break;case"OverviewMenu_Select":switch(this.controls["OverviewMenu"].focusStyle()){case efbStateAction:break;case efbOptionAction:break;default:this.raiseEvent("Select",A.params)}}};_P.getSelectedItems=function(){var A=this.controls["OverviewMenu"];if(A.visible()){return A.getSelectedItems()}A=null};_P.updateScreen=function(B,H,I,D,K){var F;var E=0;switch(LCase$(B)){case"iconmenu":F=this.controls[(lms.isUser()?"IconMenuSmall":"IconMenu")];this.controls["OverviewMenu"].hide();break;case"statemenu":F=this.controls["OverviewMenu"];F.focusStyle(efbStateAction);this.controls["IconMenu"].hide();break;case"overviewmenu":F=this.controls["OverviewMenu"];F.focusStyle(efbDefault);this.controls["IconMenu"].hide()}if(lms.isUser()){if(I.moveFirst()){userCourseMenuID=I.get("ID");userCourseMenuTitle=I.get("Text")}}var A=F;A.clearScreen();if(I){if(I.moveFirst()){do{var J={};var C=[];var G="";for(E=3;E<=I.fieldCount();E++){C[E-2]=I.get(E)}if(K==true){C=[]}J.ID=I.get("ID");J.name=I.get("Name");J.title=I.get("text")||I.get("name");if(K){J.title=I.get("title")||I.get("name")}J.typeName=I.nodeType();J.actions=D;A.showButton(J.title,I.get("Icon"),J,I.get("HelpText"),C)}while(I.moveNext())}}A.visible(lms.isAdmin()||showUserMenu);if(H>0){A.showButton(langLms("Edit"),"edit.gif",{ID:H,title:langLms("Edit"),title:langLms("Edit"),typeName:"_edit_"},langLms("EditHelpText"))}A=null;this.updateMailButton()};_P.updateMailButton=function(){var B;var D=false;var C=0;B=this.controls[(lms.isUser()?"IconMenuSmall":"IconMenu")];if(!B.visible()){return }var A=requestFast("MailNewMail");A=getXmlNodeClone(A,"MailNewMail",true);if(A){D=A.childCount()>0}var G;var E="";var H=B;for(C=1;C<=H.buttonIndex();C++){G=H.controls["Button#"+C];if(G){var F=G;if(LCase$(G.tag().name)=="mail"){E=(F.controls["Icon"]?F.controls["Icon"].picture():F.picture());if(D){if(inStr(E,"new.")==0){E=replace$(E,".","new.",true)}}else{E=replace$(E,"new.",".",true)}if(F.controls["Icon"]){F.controls["Icon"].picture(E)}else{F.picture(E)}}F=null}}H=null};return classUpdate()})();classCreate("oLmsTable",cControl);var oLmsTable=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":this.style("fontSize","8");this.style("overflow","auto");break;case"Show":this.clear();break}};_P.clear=function(){this.drawInnerHtml("")};_P.fillTable=function(B,A){B=replace$(B,vbTab,"</th><th>");A=replace$(A,vbTab,"</td><td>");A=replace$(A,vbLf,"</td></tr><tr><td>");A="<table><tr><th>"+B+"</th></tr><tr><td>"+A+"</td></tr></table>";this.drawInnerHtml(A)};return classUpdate()})();classCreate("oLmsImportCourses",cControl);var oLmsImportCourses=(function(){_P.handleEvent=function(B){switch(B.eventID){case"Load":var C=this.createControl("lblText",oLabel,10,10,400,45);C.text("Importeren cursussen");C=null;var C=this.createControl("btnImport",oButton,100,70,48,18);C.picture("image/lms/buttons/default.gif");C=null;break;case"Show":break;case"btnImport_Click":var A=requestFast("ImportCourses",{});break}};return classUpdate()})();var downloadFile=function(C){var B=fillParam();var A=encodeURI(httpDebug+httpXmlRequestPage+"?user=userid:'"+lms.userID()+"'&"+C);for(paramName in B){A=A+paramName+":'"+B[paramName]+"'"}A=A+"&"+date();window.location=A};classCreate("oLmsReport",cControl);var oLmsReport=(function(){_P.property("reportID",0);_P.handleEvent=function(A){switch(A.eventID){case"Load":var B=this.createControl("btnFetch",oLmsButton,875,470);B.text(langLms("Refresh"));B=null;var B=this.createControl("lblName",oLabel,741,400,120,19);B.text(langLms("ReportName"));B=null;var B=this.createControl("txtName",oText,741,423,120,19);B=null;var B=this.createControl("lblDateFrom",oLabel,741,400,100,19,false);B.text(langLms("ReportDateFrom"));B=null;var B=this.createControl("txtDateFrom",oDate,741,423,100,19,false);B=null;var B=this.createControl("lblDateTo",oLabel,851,400,100,19,false);B.text(langLms("ReportDateTo"));B=null;var B=this.createControl("txtDateTo",oDate,851,423,100,19,false);B=null;var B=this.createControl("lblPeriod",oLabel,741,447,120,19);B.text(langLms("ReportPeriod"));B=null;var B=this.createControl("opPeriod",oComboBox,741,470,120,18);B.addItem(langLms("Day"),"day");B.addItem(langLms("LastDay"),"lastday");B.addItem(langLms("Week"),"week");B.addItem(langLms("LastWeek"),"lastweek");B.addItem(langLms("Month"),"month");B.addItem(langLms("LastMonth"),"lastmonth");B.addItem(langLms("Year"),"year");B.addItem(langLms("LastYear"),"lastyear");B.addItem(langLms("ReportUserSelection"),"userselection");B=null;var B=this.createControl("tableReport",oLmsTable,0,0,670,540);B=null;var B=this.createControl("btnSave",oLmsButton,875,this.height()-25);B.text(langLms("Save"));B=null;break;case"Show":this.loadTable(0);break;case"opPeriod_Change":var C=this.controls["opPeriod"].value()=="userselection";this.showUserSelect(C);break;case"btnSave_Click":showPopup(400,300,oLmsReportDelimiterChoice,null,this);break;case"btnFetch_Click":if(!this.isValidDates()){msgBox(langLms("ReportDateInvalid"))}else{this.loadTable(this.reportID(),this.controls["opPeriod"].value(),this.controls["txtName"].value(),this.controls["txtDateFrom"].value(),this.controls["txtDateTo"].value())}break;case"_popup__Ok":if(!this.isValidDates()){msgBox(langLms("ReportDateInvalid"))}else{this.getCSV(this.reportID(),this.controls["opPeriod"].value(),A.params,this.controls["txtName"].value(),this.controls["txtDateFrom"].value(),this.controls["txtDateTo"].value())}break;case"Hide":if(this.controls["tableReport"]){this.controls["tableReport"].clear()}this.showUserSelect(false)}};_P.showUserSelect=function(A){this.controls["lblName"].top((A?400-46:400));this.controls["txtName"].top((A?423-46:423));this.controls["lblDateFrom"].visible(A);this.controls["lblDateTo"].visible(A);this.controls["txtDateFrom"].visible(A);this.controls["txtDateTo"].visible(A)};_P.isValidDates=function(){if(this.controls["opPeriod"].value()=="userselection"){var C=this.controls["txtDateFrom"].isValid();var B=this.controls["txtDateTo"].isValid();var A=cDate(this.controls["txtDateFrom"].value())<=cDate(this.controls["txtDateTo"].value());return C&&B&&A}return true};_P.showScreen=function(A,D,B){this.reportID(A);this.controls["tableReport"].clear();var C=this.controls["lblName"];C.visible(cBool(B));C=null;var C=this.controls["txtName"];C.visible(cBool(B));C=null;var C=this.controls["lblPeriod"];C.visible(cBool(D));C=null;var C=this.controls["opPeriod"];C.visible(cBool(D));C.value("day");C=null};_P.getCSV=function(C,G,A,B,F,D){if(C==0){return }var E="semicolon";switch(A){case",":E="comma";break;case"tab":E="tab"}downloadFile("GetReportCSV=ReportID:'"+C+"' period:'"+G+"'delimiter:'"+E+"'name:'"+B+"'datefrom:'"+F+"'dateto:'"+D+"'")};_P.loadTable=function(A,I,B,H,K){var L="";this.controls["tableReport"].clear();if(A==0){return }var C=fillParam({reportID:A,period:I,name:B,dateFrom:H,dateTo:K});var M=requestFast("GetReport",C);M=getXmlNodeClone(M,"GetReport",true);if(M!=null){var E="";var F="";var J="";var G=0;var D=new array();F=M.get("FieldList");D=split$(F,",");for(G=0;G<=D.length-1;G++){J=D[G];if(J!=""){E=E+nameFromIni$(J,":")+vbTab}}E=left$(E,E.length-1);L=M.get("CSV");this.controls["tableReport"].fillTable(E,L)}};return classUpdate()})();classCreate("oLmsReportDelimiterChoice",cControl);var oLmsReportDelimiterChoice=(function(){_P.property("delimiter",";");_P.handleEvent=function(A){switch(A.eventID){case"Load":var B=this.createControl("lblCourseDetails",oLabel,10,30,310,30);B.text("Kies scheidingsteken:");B=null;var B=this.createControl("ItemList",oLmsOverviewMenu,10,70,this.width()-20,120);B.focusStyle(efbOptionAction);B=null;break;case"Show":this.controls["ItemList"].addListener(this);break;case"ItemList_Select":this.delimiter(A.params);break;case"_popup__Show":this.drawScreen(A.params);break;case"_popup__Ok":A.params=this.delimiter()}};_P.drawScreen=function(C){var A=this.controls["ItemList"];A.clearScreen();this.delimiter(";");var B=A.showButton("Semi Colon (;)","",";");B.selected(true);B=null;var B=A.showButton("Comma (,)","",",");B.selected(false);B=null;var B=A.showButton("Tab","","tab");B.selected(false);B=null};return classUpdate()})();classCreate("oLmsButton",cControl);var oLmsButton=(function(){_P.property("pictureDisabled","");_P.property("pictureSelected","");_P.property("text","");_P.handleEvent=function(A){switch(A.eventID){case"Load":this.mouseIcon("pointer");this.focusBehavior(efbNormalAction);this.size(75,22);this.picture("image/lms/buttons/default.gif");var B=this.createControl("lblCaption",oLabel,0,(this.height()-16)/2,this.width(),20);B.style(ecsTextAlign,"center");B.style(ecsFontWeight,"bold");B.style(ecsFontSize,12);B.style(ecsForeColor,"#FFF");B=null;break;case"Paint":this.setBackgroundPicture(true);this.controls["lblCaption"].text(this.text())}};return classUpdate()})();classCreate("scrForum",cControl);var scrForum=(function(){_P.property("boardName","");_P.property("topicName","");_P.property("topicTitle","");_P.handleEvent=function(A){switch(A.eventID){case"Load":this.picture("image/lms/interface/popupforummenu.jpg");break;case"Show":this.drawPicture(this.picture());this.createControl("frameForum",oHtml,4,55,this.width()-8,this.height()-70,true);break;case"Hide":this.removeControl("frameForum")}};_P.start=function(A){var C="";if(A==undefined){A=this.boardName()}this.show();if(right$(A,1)=="/"){A=left$(A,len(A)-1)}var B=this.controls["frameForum"];C=httpDebug+"forum.htm?start="+escape(A);if(!isEmptyString(this.topicName())){C+="&topicname="+escape(this.topicName())+"&topictitle="+escape(this.topicTitle())}B.showPage(C);B.visible(true);B=null};return classUpdate()})();classCreate("scrMailInvitation",cControl);var scrMailInvitation=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":var B=this.createControl("lblCaption",oLabel,20,20,400,170);B.text("Hier kun je mail sturen aan de cursisten uit het cursistenoverzicht.\nHet bericht wordt dan automatisch verzonden aan alle cursisten van deze vestiging/bedrijf aan wie nog geen mail gestuurd is. \n\nHet verzenden neemt wat tijd in beslag. Als je ook cursisten van een andere vestiging/bedrijf wilt mailen kan het zijn dat je even moet wachten.\n\nKlik op ‘Verstuur’ om cursisten uit te nodigen voor een opleiding.\n\nKlik op ‘Rappèl’ om een herinnering te sturen aan cursisten die al uitgenodigd waren, maar nog niet zijn gestart met de opleiding.");B=null;var B=this.createControl("lblStatus",oLabel,20,190,400,40,false);B.text("");B=null;var B=this.createControl("btnSend",oLmsButton,20,240,75,22);B.text("Verstuur");B=null;var B=this.createControl("btnSendReminder",oLmsButton,20,266,75,22);B.text("Rappèl");B=null;break;case"Timer_MailProgress":this.mailProgress();break;case"Show":this.controls["btnSend"].enabled(false);this.controls["btnSendReminder"].enabled(false);this.timerStart("MailProgress",2000);this.mailProgress();break;case"Hide":this.clearTimers();break;case"btnSend_Click":this.mailStart(false);break;case"btnSendReminder_Click":this.mailStart(true)}};_P.mailStart=function(C){var B=(C?"InviteReminderMailStart":"InviteMailStart");this.clearTimers();this.controls["btnSend"].enabled(false);this.controls["btnSendReminder"].enabled(false);var A=requestFast(B,fillParam());A=getXmlAction(A,B,true);this.updateStatus(A.get("Status"));this.timerStart("MailProgress",2000)};_P.mailProgress=function(){var A=requestFast("InviteMailProgress");A=getXmlAction(A,"InviteMailProgress",true);if(A){this.updateStatus(A.get("Status"))}};_P.updateStatus=function(A){if(isEmptyString(A)){this.clearTimers();this.controls["btnSend"].enabled(true);this.controls["btnSendReminder"].enabled(true);var B=this.controls["lblStatus"];B.visible(false);B=null}else{var B=this.controls["lblStatus"];B.text("Bezig met verzenden "+replace$(A,"/"," van "));B.visible(true);B=null}};return classUpdate()})();classCreate("scrDownloads",cControl);var scrDownloads=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":this.picture("image/lms/interface/popuphelpmenu.jpg");var B=this.createControl("Text",oLabel,4,55,this.width()-8,this.height()-70,true);B.style(ecsOverFlow,"auto");B=null;break;case"Show":this.drawPicture(this.picture())}};_P.start=function(A){this.controls["Text"].text(markupToHtml(A,true));this.show()};return classUpdate()})();var LMSV2=["passed","completed","failed","incomplete","browsed","not attempted"];var sLmsPath=function(){ID=0;name="";title="";typeName=""};var lmsPath=new array();var pageData;var requestStart=function(){var A=new cHttpRequest();if(lms.userID()!=0){A.addCommand("user",{userID:lms.userID(),langCode:_lang})}return A};var requestFast=function(C,B){var A=requestStart();A.addCommand(C,B);return A.send()};var fillParam=function(C){var A;var C=C||{};for(A=0;A<=lmsPath.length-1;A++){var B=lmsPath[A];switch(LCase$(B.typeName)){case"structure":C["ParentStructureID"]=B.ID;break;case"_edit_":break;case"_showchildren_":break;default:C["ParentStructureID"]=B.typeName;C[B.typeName+"ID"]=B.ID}}return C};var getCurrentLmsLevel=function(){var A="Everyone";if(lms.userCompanyID()!=0){A="Company";if(lms.userDepartmentID()!=0){A="Department";if(lms.userClassID()!=0){A="User"}}}for(_EC1 in lmsPath){current=lmsPath[_EC1];switch(LCase$(current.typeName)){case"department":case"company":case"user":A=current.typeName;if(current.ID>0){A+="|"+current.ID}}}return A};var getCurrentLmsLevelExt=function(){var A={ID:0,name:"Organisatie",typeName:"EveryOne",rightsValue:4};if(lms.userCompanyID()!=0){A.name="Bedrijf";A.rightsValue=3;A.typeName="Company";if(lms.userDepartmentID()!=0){A.name="Vestiging";A.rightsValue=2;A.typeName="Department";if(lms.userClassID()!=0){A.name="Cursist";A.rightsValue=1;A.typeName="User"}}}for(_EC2 in lmsPath){current=lmsPath[_EC2];switch(LCase$(current.typeName)){case"company":A.ID=current.ID;A.name=current.title||current.name;A.typeName=current.typeName;A.rightsValue=3;break;case"department":A.ID=current.ID;A.name=current.title||current.name;A.typeName=current.typeName;A.rightsValue=2;break;case"user":A.ID=current.ID;A.name=current.title||current.name;A.typeName=current.typeName;A.rightsValue=1}}return A};var jsonToColumnar=function(C,A){var D=[];var E="";var B=0;var I=[];var H;var G={};var F=0;for(_EC3 in C){G=C[_EC3];break}if(G==null){return""}if(!A){for(E in G){D.push(E)}}else{for(E in G){B=inArray(A,E,true);if(B>=0){D[B]=E}}}H=[""];F=UBound(D);for(B=0;B<=F;B++){E=D[B];H.push(E)}I.push(join$(H,"|"));for(_EC4 in C){G=C[_EC4];H=[""];for(B=0;B<=F;B++){E=D[B];H.push(G[E])}I.push(join$(H,"|"))}return join$(I,vbLf)};var columnarToJson=function(E,A,D){var B;var C;var F;var I="";var J="";var G=0;var K=0;var H="";var M=[];if(D){var L={}}else{var L=[]}if(isEmptyString(E)){return L}B=split$(E,vbLf);if(left$(E,1)=="|"){C=split$(B[0],"|");for(G=0;G<=UBound(C);G++){J=C[G];for(I in A){if(LCase$(J)==LCase$(I)){M[G]=I}}}for(K=1;K<=UBound(B);K++){C=split$(B[K],"|");F=clone(A);for(G in C){if(M[G]){F[M[G]]=C[G]}}H=(D?C[1]:K-1);L[H]=F}}else{}return L};classCreate("lms",null);lms=(function(){var A=(function(){_P.property("userID",0);_P.property("userFullName","");_P.property("userName","");_P.property("userRoles","");_P.property("userCompanyID",0);_P.property("userDepartmentID",0);_P.property("userClassID",0);_P.property("userProfiles","");_P.property("userRights","");_P.property("userIsFirstLogin","");_P.property("userCompanyTags","");_P.property("lastPageID","");_P.property("suspendData","");_P.property("testMatrix","");_P.property("courseID",0);_P.property("courseTryCount",0);_P.property("courseScore",0);_P.property("coursePassScore",0);_P.property("courseGameScore",0);_P.property("courseDuration",0);_P.property("courseLaunchData","");_P.property("courseMaxTryCount",0);_P.property("courseResultData","");_P.property("objectives",null);_P.property("highScores",null);_P.property("interactions",null);_P.property("courseSeed","");_P.property("courseType","");_P.property("courseStatus","");_P.property("examinator","");_P.property("profiles",null);_P.canUserSubscribe=function(){result=requestFast("UserCanSubscribe",{viewUserID:this.viewUserID()});result=getXmlNodeClone(result,"UserCanSubscribe",true);if((result)&&(result.get("cansubscribe")=="true")){return true}return false};_P.viewMode=function(){return this.viewUserID()!=this.userID()};_P.logOut=function(){if(this.userID()==0){return }this.userID(0);this.userName("");this.userFullName("");this.userRoles("");this.userCompanyID(0);this.userDepartmentID(0);this.userClassID(0);this.userProfiles("");this.userRights("");this.userIsFirstLogin=true;this.userCompanyTags("");this.lastPageID("");this.suspendData("");this.testMatrix("");this.courseResultData("");this.courseSeed("");this.courseType("");this.courseStatus("");this.examinator("")};_P.login=function(G,F,C){this.logOut();var E=new cHttpRequest();var B=new dbNode;var D;E.addCommand("logon",{name:G,password:F,langCode:_lang});E.addCommand("getchildnodes",{parentStructureID:"RoleProfiles"});B=E.send();if(B==null){return"Couldn't connect to server"}D=getXmlNodeClone(B,"logon",true);if(D==null){return"Couldn't connect to server"}if(!isEmptyString(D.get("errors"))){return D.get("Errors")}this.profiles=getXmlNodeClone(B,"getchildnodes");this.userID(D.get("userid"));this.userFullName(D.get("fullname"));this.userName(D.get("name"));this.userRoles(D.get("roles"));this.userCompanyID(D.get("companyid"));this.userDepartmentID(D.get("departmentid"));this.userClassID(D.get("classid"));this.userProfiles(LCase$(D.get("profiles")));this.userRights(LCase$(D.get("userrights")));this.userIsFirstLogin(cDate(D.get("lastlogon"))<=cDate("1980-01-01"));this.userCompanyTags(D.get("CompanyTags"));this.objectives=[];this.interactions=[];this.highScores=[]};_P.isUser=function(){return LCase$(this.userRights())=="user"};_P.isAdmin=function(){return LCase$(this.userRights())!="user"};_P.rightValue=function(B){switch(LCase$(trim$(B))){case"user":return 1;break;case"superuser":return 2;break;case"admin":return 3;break;case"superadmin":return 4;break;default:return 0}};_P.hasRight=function(B){return this.rightValue(this.userRights())>=this.rightValue(B)};_P.viewUserID=function(){var B=lms.getNavigationParam("UserID")||lms.getNavigationParam("DepartmentAdminID")||lms.getNavigationParam("CompanyAdminID");if(isEmptyString(B)){B=this.userID()}return B};_P.viewCompanyID=function(){var B=lms.getNavigationParam("CompanyID");if(isEmptyString(B)){B=0}return B};_P.update=function(H,G,D,I){var B;var F;if(debugMode){debug.out("Lms.Update: "+H+", status: "+G+", score: "+D)}if(inStr(H,".xml")>0){H=replace$(H,"\\\\","/");H=replace$(H,"xml/course/","");H="#"+replace$(H,".xml","")}I=I||0;viewUserID=this.viewUserID();var J=requestStart();switch(G){case"viewing":break;case"started":break;default:if(this.courseID()!=H){if(debugMode){debug.out("Update Error: Different CourseID's: "+this.courseID()+":"+H)}}this.courseStatus(G);this.courseScore(D)}this.courseID(H);B=jsonToColumnar(this.objectives,["id","status","score","name","drawcount","passscore","correctcount","failcount","skipcount"]);if(UBound(this.interactions)<=0){F=this.courseResultData()}else{F=jsonToColumnar(this.interactions,["id","score","value","correctresponse"])}if(debugMode){debug.out("Lms.Update - CourseID:"+H+", Status:"+G+", Score:"+D+", DayID:"+I+", ViewUserID:"+viewUserID+", LastPageID:"+this.lastPageID()+", SuspendData:"+this.suspendData()+", ResultData:"+(F||"")+', Seed:", Objectives:'+(B||"")+", GameScore:"+this.courseGameScore()+", Examinator:"+this.examinator())}var E={courseID:H,status:G,score:D,dayID:I,viewUserID:viewUserID,lastPageID:this.lastPageID(),suspendData:this.suspendData(),resultData:F||"",seed:"",objectives:B||"",gameScore:this.courseGameScore(),examinator:this.examinator()};J.addCommand("CourseUpdate",E);C=J.send();var C=getXmlNodeClone(C,"CourseUpdate");if(G=="viewing"){if(C){this.loadData(C)}}};_P.loadHighScores=function(){this.highScores=[];var B=requestFast("GetHighScores",{courseID:this.courseID()});if(B){B=getXmlNodeClone(B,"gethighscores",true);if(B){this.highScores=columnarToJson(B.get("CsvHighScores"),{name:"",gameScore:0,medals:0})}}};_P.loadData=function(B){this.objectives=[];this.interactions=[];if(!B){B={get:function(){}}}var C=B;this.suspendData(C.get("SuspendData")||"");this.lastPageID(C.get("LastPageID")||"");this.testMatrix(C.get("TestMatrix")||"");this.courseScore(cVal(C.get("Score"))||"");this.courseStatus(C.get("Status")||"");this.examinator(C.get("Examinator")||"");this.courseGameScore(cVal(C.get("GameScore"))||"0");this.courseTryCount(cVal(C.get("Tries"))||0);this.coursePassScore(cVal(C.get("PassScore"))||0);this.courseDuration(cVal(C.get("CourseDuration"))||0);this.courseLaunchData(C.get("LaunchData")||"");this.courseMaxTryCount(cVal(C.get("MaxRetries"))||99999);this.courseResultData(C.get("ResultData")||"");this.courseSeed(C.get("Seed")||"");this.courseType(C.get("CourseType")||"");this.objectives=columnarToJson(C.get("Objectives"),{ID:0,status:"",score:0,name:""});this.interactions=columnarToJson(C.get("ResultData"),{ID:0,score:0,value:"",correctResponse:""});C=null};_P.courseRegister=function(E,D,B){var C="";if(this.viewMode()){C="accepted"}else{if(B=="true"){C="requested"}else{C="requested"}}this.update(E,C,"",D)};_P.courseInitialize=function(B){this.loadData();this.update(B,"viewing","","")};_P.courseStart=function(B){if(debugMode){debug.out("Lms.CourseStart: "+B)}if(this.canSaveProgress()){this.update(B,"viewing");this.update(B,"started","")}};_P.courseCommit=function(B,C){if(!this.viewMode()){this.update(B,"commit","")}};_P.canSaveProgress=function(){return this.viewMode()==(LCase$(this.courseType())=="coursegenassessment")};_P.courseStop=function(C,D,B){D=(D==null?-1:cVal(D));B=LCase$(this.courseStatus());if(backGround.controls["ScormOverlay"]){backGround.controls["ScormOverlay"].scormFinish()}if(debugMode){debug.out("CanSaveProgress : "+this.canSaveProgress())}if(this.canSaveProgress()){if(D<0){switch(LCase$(this.courseStatus())){case"failed":break;case"completed":break;case"passed":break;default:B="incomplete"}}else{if((this.coursePassScore()>0)&&(D>0)){if((D>=this.coursePassScore())){B="passed"}else{B="failed"}}else{B="completed"}}if(D<0){D=0}this.update(C,B,D);if(debugMode){debug.out("lms.CourseStop - CourseID: "+C+", Status: "+B+", Score: "+D)}}};_P.getNavigationParam=function(B){var C=fillParam();return C[UCase$(B)]};return classUpdate()})();return new A()})();classCreate("API",null);API=(function(){var A=(function(){_P.property("link","");_P.property("score",-1);_P.property("dirty",false);_P.property("status","incomplete");_P.property("lastError",0);_P.courseID=function(B){B=cStr(B);if(B==this.mCourseID){return }if(this.mCourseID){this.LMSFinish()}this.mCourseID=B;this.score(-1);this.dirty(false);this.lastError(0);lms.courseStart(this.mCourseID)};_P.LMSInitialize=function(){if(debugMode){debug.out("Initialize")}return(this.mCourseID!=""?"true":"false")};_P.LMSFinish=function(){if(this.mCourseID==0){return"true"}if(debugMode){debug.out("Finishing")}this.dirty(false);lms.courseStop(this.mCourseID,this.score());this.mCourseID=0;this.lastError(0);return"true"};_P.LMSGetValue=function(C){var B=this.intLMSGetValue(C);if(debugMode){if(this.lastError()){debug.out("LmsGetValue: "+C+" = Error: Unknown command")}else{debug.out("LmsGetValue: "+C+" = "+B)}}return B};_P.intLMSGetValue=function(C){this.lastError(0);C=LCase$(trim$(C));if((C!="")){var E=split$(C+"....",".");if(right$(C,10)=="._children"){}else{if((E[0]=="cmi")){switch(E[1]){case"core":switch(E[2]){case"student_name":return lms.userFullName();break;case"launch_data":return lms.courseLaunchData();break;case"lesson_status":return this.status();break;case"gamescore":return lms.courseGameScore();break;case"lesson_location":return lms.lastPageID();break;case"exit":return"logout"}break;case"suspend_data":return lms.suspendData();break;case"highscores":var B=E[2];if(B=="_count"){lms.loadHighScores();return lms.highScores.length||0}else{if(cVal(B)<lms.highScores.length){var D=lms.highScores[cVal(B)];switch(E[3]){case"name":return D.name;break;case"score":return D.gameScore;break;case"gamescore":return D.gameScore;break;case"medals":return D.medals}D=null}}break;case"objectives":var B=E[2];if(B=="_count"){return lms.objectives.length||0}else{if(cVal(B)<lms.objectives.length){var D=lms.objectives[cVal(B)];switch(E[3]){case"id":return D.ID;break;case"status":return D.status;break;case"score":return D.score;break;case"name":return D.name}D=null}}break;case"interactions":var B=E[2];if(B=="_count"){return lms.interactions.length||0}else{if(cVal(B)<lms.interactions.length){var D=lms.interactions[cVal(B)];switch(E[3]){case"id":return D.ID;break;case"score":return D.score;break;case"correct_responses":return D.correctResponse;break;case"student_response":return D.value}D=null}}break}}}}this.lastError(401);return""};_P.LMSSetValue=function(C,E){var B=0;var D={};this.lastError(0);C=LCase$(trim$(C));if(debugMode){debug.out("LmsSetValue: "+C+":"+E)}if((C!="")){var F=split$(C+"....",".");if((F[0]=="cmi")){switch(F[1]){case"core":switch(F[2]){case"score":if(F[3]=="raw"){E=(cVal(E)<=1?1:cVal(E));if(E>this.score()){this.score(E)}}break;case"gamescore":lms.courseGameScore(cVal(E));break;case"lesson_status":E=LCase$(E);if(inArray(LMSV2,E)){this.status(E);if(E=="completed"){if(this.score()<=0){this.score(0)}}}else{this.lastError(405)}break;case"lesson_location":lms.lastPageID(E);break;case"session_time":break;case"exit":break;default:this.lastError(401);break}break;case"objectives":var B=F[2];if(B=="_count"){this.lastError(402)}else{if(cVal(B)<=lms.objectives.length){D=lms.objectives[cVal(B)]||{};switch(F[3]){case"id":D.ID=E;D.status=D.status||"incomplete";break;case"status":if(inArray(LMSV2,E)){D.status=E}else{D=null;this.lastError(405)}break;case"score":D.score=cVal(E);break;case"name":D.name=E;break;default:D=null;this.lastError(401);break}if(D){lms.objectives[cVal(B)]=D}}}break;case"interactions":var B=F[2];if(B=="_count"){this.lastError(402)}else{if(cVal(B)<=lms.interactions.length){D=lms.interactions[cVal(B)]||{};switch(F[3]){case"id":D.ID=E;D.score=0||D.score;break;case"correct_responses":D.correctResponse=E;break;case"score":D.score=cVal(E);break;case"student_response":D.value=E;break;default:D=null;this.lastError(401);break}if(D){lms.interactions[cVal(B)]=D}}}break;case"suspend_data":this.dirty(true);lms.suspendData(E);break;default:this.lastError(401);break}}}if(this.lastError()==0){return"true"}else{if(debugMode){debug.out("Error "+this.lastError()+" in LmsSetValue: "+C+":"+E)}return"false"}};_P.LMSCommit=function(){if(this.dirty()){if(debugMode){debug.out("Committing")}lms.courseCommit(this.mCourseID,this.score())}return"true"};_P.LMSGetLastError=function(){return this.lastError()};_P.LMSGetErrorString=function(B){return B};_P.LMSGetDiagnostic=function(){return"false"};_P.test=function(){lms.loadData()};return classUpdate()})();return new A()})();classCreate("oLmsFormTabbed",cControl);var oLmsFormTabbed=(function(){_P.property("currentID",0);_P.property("currentTypeName","");_P.handleEvent=function(B){switch(B.eventID){case"Load":var D=this.createControl("LmsFormTabButtons",oLmsFormTabButtons,0,0,680,20);D.style(ecsZOrder,2);D=null;var D=this.createControl("LmsFormTabPage",oLmsFormTabPage,0,19,680,this.height()-19);D.style(ecsZOrder,1);D=null;var D=this.createControl("lblInfo",oLabel,706,20,246,435);D.text("");D=null;var D=this.createControl("btnSave",oLmsButton,875,this.height()-25);D.text(langLms("Save"));D=null;var D=this.createControl("btnDelete",oLmsButton,780,this.height()-25);D.text(langLms("Delete"));D=null;break;case"Show":this.drawColorBack("#FFF");break;case"Hide":if(this.controls["LmsFormTabPage"]){this.controls["LmsFormTabPage"].clearScreen()}break;case"btnDelete_Click":var K=requestFast("CanDeleteRecord",fillParam({structureID:this.currentTypeName(),currentID:this.currentID()}));if(K){K=getXmlNodeClone(K,"CanDeleteRecord",true);if(K){var G={};var D=G;D.canDelete=K.get("CanDelete");D.canArchive=K.get("CanArchive");D.structureID=this.currentTypeName();D.currentID=this.currentID();D=null;showPopup(300,200,oLmsPopupDeleteRecord,G,this)}}break;case"btnSave_Click":if(lmsPath.length==0){break}var C={structureID:this.currentTypeName(),currentID:this.currentID()};C=this.controls["LmsFormTabPage"].getFormValues(C);request=requestStart();request.addCommand("UpdateRecord",C);var F=lmsPath[lmsPath.length-1];var I=this.currentTypeName();request.addCommand("GetRecord",{structureID:I,currentID:F.ID});request.addCommand("GetFields",{structureID:I,currentID:F.ID});var K=request.send();this.showScreen2(I,F.name,getXmlNodeClone(K,"GetRecord"),getXmlNodeClone(K,"GetFields"));K=getXmlAction(K,"UpdateRecord");if(K){var E=K.get("Description");if(!isEmptyString(E)){msgBox(E,(cBool(K.get("failed"))?null:function(){backGround.controls["LmsAdmin"].navigateMoveUp()}))}}break;case"LmsFormTabButtons_btnTabClick":var H=B.params.tabName;this.controls["LmsFormTabPage"].showTabPage(H);break;case"LmsFormTabPage_ShowTabs":var J=B.params.tabPages;var A=B.params.activeTab;this.controls["LmsFormTabButtons"].showTabButtons(J,A);break;case"LmsFormTabPage_ItemMouseEnter":this.controls["lblInfo"].text(B.params.info);break;case"LmsFormTabPage_ItemMouseLeave":this.controls["lblInfo"].text("")}};_P.showScreen=function(A){this.showScreen2(A.typeName,A.name,A.record,A.fields)};_P.showScreen2=function(C,B,A,E){var C=A.nodeType();var B=A.get("ID");this.currentTypeName(C);this.currentID(B);this.visible(true);var D=this.controls["LmsFormTabPage"];D.visible(true);D.showScreen2(E,A);D=null;this.controls["btnDelete"].visible(lms.isAdmin(),true,false)};return classUpdate()})();classCreate("oLmsFormTabButtons",cControl);var oLmsFormTabButtons=(function(){_P.handleEvent=function(A){switch(A.eventID){case"btnTab_btnClick":this.raiseEvent("btnTabClick",{"tabName":A.params.tabName})}};_P.clearScreen=function(){this.removeControl("*")};_P.showTabButtons=function(E,A){var C=0;var B=0;this.clearScreen();for(C=1;C<=E.length;C++){var D=this.createControl("btnTab#"+C,oLmsFormTabButton,B,this.top(),80,this.height());D.text(E[C-1]);if((E[C-1]==A)){D.active(true)}B+=D.width()+5;D=null}};return classUpdate()})();classCreate("oLmsFormTabButton",cControl);var oLmsFormTabButton=(function(){_P.property("active",false,true);_P.property("text","",true);_P.handleEvent=function(A){this.focusBehavior(efbNormalAction);switch(A.eventID){case"Load":var B=this.createControl("lblTabButton",oLabel,0,0,this.width(),this.height());B=null;break;case"Show":var B=this.controls["lblTabButton"];B.drawPicture("image/lms/buttons/btn_tab.gif");B=null;break;case"Paint":var B=this.controls["lblTabButton"];B.text(this.text());B.style("paddingTop",3);B.style(ecsFontWeight,"bold");B.style(ecsTextAlign,"center");if((this.active())){B.drawPicture("image/lms/buttons/btn_tab_p.gif");B.style(ecsForeColor,WWBlue)}B=null;break;case"MouseEnter":if(!this.active()){var B=this.controls["lblTabButton"];B.drawPicture("image/lms/buttons/btn_tab_h.gif");B=null}break;case"MouseLeave":if(!this.active()){var B=this.controls["lblTabButton"];B.drawPicture("image/lms/buttons/btn_tab.gif");B=null}break;case"MouseDown":if(!this.active()){this.raiseEvent("btnClick",{"tabName":this.text()})}}};return classUpdate()})();classCreate("oLmsFormTabPage",cControl);var oLmsFormTabPage=(function(){var D;var A;var C={};var B=[];_P.handleEvent=function(E){switch(E.eventID){case"Load":this.style("overflow","auto");this.setBorder(edAll,WWBlue,"solid","1");break;case"btnUpload_Click":showPopup(760,450,popupFile);break;case"fldprofiles_ItemMouseEnter":this.raiseEvent("ItemMouseEnter",E.params);break;case"fldprofiles_ItemMouseLeave":this.raiseEvent("ItemMouseLeave")}};_P.showScreen=function(E){this.showScreen2(E.fields,E.record)};_P.showScreen2=function(F,E){this.clearScreen();if(!E){return }D=F;A=E;C={};B=[];this.loadFormValues(F,E);this.showTabPage(B[0])};_P.clearScreen=function(){this.removeControl("*")};_P.canShow=function(F){var E=true;if(!isEmptyString(F)){E=lms.hasRight(F)}return E};_P.addTabPage=function(F){var E="";E="|"+B.join("|")+"|";if(!inStr(E,"|"+F+"|")>0){B.push(F)}};_P.showTabPage=function(E){this.saveFormValues();this.clearScreen();this.loadControls(D,A,E);this.raiseEvent("ShowTabs",{"tabPages":B,"activeTab":E})};_P.loadFormValues=function(K,F){var J="";var I="";var H=null;var G="";var L="";var E=false;if(K.moveFirst()){do{G=K.get("ShowOn");L=K.get("Type");E=!inStr(LCase$(L),"label")>0;if((isEmptyString(G))||(this.canShow(G))){J=K.get("Name");I=K.get("Tab");H=F.get(J);if((I!=null)){this.addTabPage(I)}this.addFormValue(J,{value:H,tabName:I,modified:false,canEdit:E})}}while(K.moveNext())}};_P.saveFormValues=function(){var E="";var F="";for(E in this.controls){if(this.controls[E]!=null){if(left$(E,3)=="fld"){try{F=this.controls[E].value();this.setFormValue(mid$(LCase$(E),4),F)}catch(G){}}}}};_P.getFormValues=function(H){var E=H||{};var G="";var F="";this.saveFormValues();for(G in C){if(C[G]!=null){if(C[G].canEdit){if((C[G].modified||isEmptyString(this.getFormValue(G)))){E[G]=this.getFormValue(G)}}}}return E};_P.addFormValue=function(F,H){var G=H||{};var E={};if(C[LCase$(F)]){E=C[LCase$(F)]}if(E.canEdit){G.canEdit=G.canEdit||E.canEdit}C[LCase$(F)]=G};_P.getFormValue=function(E){if(C[LCase$(E)]!=null){return C[LCase$(E)].value}return""};_P.setFormValue=function(E,F){if(C[LCase$(E)]&&C[LCase$(E)].value!=F){C[LCase$(E)].value=F;C[LCase$(E)].modified=true}};_P.loadControls=function(K,H,E){var a="";var M=5;var P=0;var X=0;var G="";var Q=null;var f="";var T="";var L="";var J="";var R;var I=false;if(K.moveFirst()){do{X+=1;G=K.get("Name");f=G;controlType=K.get("Type");L=K.get("ShowOn");J=K.get("Options");fieldTab=K.get("Tab");I=false;R=null;if(LCase$(E)==LCase$(fieldTab)){if((isEmptyString(L))||(this.canShow(L))){T=f;if(this.controls["lbl"+T]){T=T+"_"}var F=this.createControl("lbl"+T,oLabel,5,M,150,22);a=K.get("Caption")||T;a=replace$(a,"_"," ");F.text(a);F.visible(true);F.style("overflow","visible");F=null;f="fld"+LCase$(f);switch(LCase$(nameFromIni$(controlType,":"))){case"label":if(inStr(LCase$(controlType),":date")>0){R=this.createControl("_"+f,oLabelDate,170,M,450,22);P=25}else{if(inStr(LCase$(controlType),":yes/no")>0){R=this.createControl("_"+f,oCheckBox,170,M,20,22);var F=R;F.mObject.disabled=true;F=null;P=32}else{R=this.createControl("_"+f,oLabel,170,M,450,22);P=25}}break;case"text":R=this.createControl(f,oText,170,M,450,22);P=25;break;case"genderselection":R=this.createControl(f,oGenderSelection,170,M,450,22);P=25;break;case"date":R=this.createControl(f,oDate,170,M,450,22);P=25;break;case"memo":R=this.createControl(f,oMemo,170,M,450,110);P=113;break;case"yes/no":R=this.createControl(f,oCheckBox,170,M,20,22);P=22;break;case"html":R=this.createControl(f,oMemo,170,M,450,210);var F=this.createControl("btnUpload#"+X,oUploadButton,625,M,22,18,false);F.text("...");F.show();F=null;P=213;break;case"lookup":switch(LCase$(valueFromIni$(controlType,":"))){case"labelroleprofile":R=this.createControl("_"+f,oLmsProfileListLabel,170,M,450,110);var d=lms.viewCompanyID();var c=lms.viewUserID();var V=requestFast("GetRoleProfileList",{companyID:d,userID:c});V=getXmlNodeClone(V,"GetRoleProfileList");if(V){do{R.addItem(V.get("ID"),V.get("Name"),V.get("Info"))}while(V.moveNext())}var O=UBound(split$(this.getFormValue(G),"|"));P=22;if(O>0){P+=22*O}break;case"roleprofile":R=this.createControl(f,oLmsProfileList,170,M,450,110);P=113;var b=0;var d=lms.viewCompanyID();var c=lms.viewUserID();var V=requestFast("GetRoleProfileList",{companyID:d,userID:c});V=getXmlNodeClone(V,"GetRoleProfileList");if(V){do{R.addItem(V.get("ID"),V.get("Name"),V.get("Info"));b+=1}while(V.moveNext())}var F=this.controls[f];F.height(b*22);P=F.height()+3;F=null;break;case"roletreecourse":R=this.createControl(f,oLmsRoleTree,170,M,450,297);R.includeHalfChecked(true);P=300;break;case"roletreeuser":R=this.createControl(f,oLmsRoleTree,170,M,450,297);R.includeHalfChecked(false);P=300;break;case"windowmode":R=this.createControl(f,oComboBox,170,M,450,22);P=25;var N;for(_EC1 in ["Full Screen","1024x768","800x600"]){N=["Full Screen","1024x768","800x600"][_EC1];R.addItem(N,N)}break;case"courseresultstate":var Z=getCourseType(this.getFormValue("Course"));if(Z==""){I=true}case"courseresultexternalstate":R=this.createControl(f,oComboBox,170,M,450,22);P=25;var Z=getCourseType(this.getFormValue("Course"));var N;for(_EC2 in dataLmsStatus){N=dataLmsStatus[_EC2];if(Z!=""){if(inArray(N.courseType,Z,true)>=0){R.addItem(langLms(N.name),UCase$(N.name))}}else{if((I)||(N.externalState)){R.addItem(langLms(N.name),UCase$(N.name))}}}break;case"courseowners":R=this.createControl(f,oComboBox,170,M,450,22);P=25;var V=requestFast("GetCourseOwnersList",{});V=getXmlNodeClone(V,"GetCourseOwnersList");if(V){do{R.addItem(V.get("Name"),V.get("ID"))}while(V.moveNext())}break;case"courseobjectives":R=this.createControl(f,oComboBox,170,M,450,22);P=25;var V=requestFast("GetCourseObjectives",fillParam());V=getXmlNodeClone(V,"GetCourseObjectives");if(V){do{var W=V.get("Name");if(isEmptyString(W)){W=V.get("ObjectiveID")}R.addItem(W,V.get("ObjectiveID"))}while(V.moveNext())}break;case"subscription":R=this.createControl(f,oComboBox,170,M,450,22);P=25;var Y=split$("|"+langLms("Subscriptions"),"|");for(index=0;index<=UBound(Y);index++){R.addItem(Y[index],Y[index])}}break;case"selection":P=25}}if(R){Q=this.getFormValue(G);if(inStr(J,"required")>0){if((isEmptyString(Q))||(inStr(LCase$(Q)," nieuw")==1)){var F=this.createControl("__"+f,oLabel,160,M,16,22);F.style(ecsForeColor,"#F00");F.text("*");F=null}}if(!this.canShow(L)){R.enabled(false)}R.value(Q);M+=P}}}while(K.moveNext())}};return classUpdate()})();var getCourseType=function(B){var C="";var A=requestFast("GetCourseType",{courseID:B});A=getXmlNodeClone(A,"GetCourseType");if(A){C=A.get("CourseType")}return C};classCreate("oLabelDate",oLabel);var oLabelDate=(function(){_P.value=function(A){if(A!=undefined){if(isEmptyString(A)){this.text("")}else{this.text(formatDate(new date(cDate(A)),"dd-mm-yyyy"))}}return this.text()};return classUpdate()})();classCreate("oLmsProfileListLabel",cControl);var oLmsProfileListLabel=(function(){_P.property("itemCount",0);_P.handleEvent=function(A){switch(A.eventID){case"Load":this.style("overflow","auto");break;case"Show":this.clear()}};_P.clear=function(){this.removeControl("*");this.itemCount(0)};_P.addItem=function(A,D,C){if(C==undefined){C=""}this.itemCount(this.itemCount()+1);var B=this.createControl("Item#"+A,oLmsProfileListLabelItem,0,0,this.width()-20,0,false);B.loadItem(A,D,C);B=null};_P.value=function(H){var C;var F;var E;var B=new array();var A=0;var D="";var G=0;if(!isEmptyString(H)){C=split$(H,"|");for(_EC3 in C){F=C[_EC3];A=nameFromIni$(F,";");D=valueFromIni$(F,";");E=this.controls["Item#"+A];if(E!=null){E.height(21);E.top(G*22);E.visible(true);E.date(D);G+=1}}}for(_EC4 in this.controls){E=this.controls[_EC4];if(E.visible()){B.push(E.tag()+";"+E.date())}}return B.join("|")};return classUpdate()})();classCreate("oLmsProfileListLabelItem",cControl);var oLmsProfileListLabelItem=(function(){_P.property("info","",true);_P.handleEvent=function(A){switch(A.eventID){case"Load":this.createControl("Caption",oLabel,0,1,this.width()-100,16);var B=this.createControl("Date",oLabelDate,this.width()-99,0,99,20,false);B=null;break;case"Paint":if(this.mouseFocus()){this.raiseEvent("MouseEnter",{"info":this.info()})}else{this.raiseEvent("MouseLeave")}}};_P.loadItem=function(A,C,B){this.tag(A);this.controls["Caption"].text(C);this.info(B)};_P.date=function(A){return this.controls["Date"].value(A)};return classUpdate()})();classCreate("oGenderSelection",cControl);var oGenderSelection=(function(){_P.property("internValue","");_P.handleEvent=function(A){switch(A.eventID){case"Load":var B=this.createControl("Option#1",oLabel,0,0,40,17);B.text("Man");B.focusBehavior(efbDefault);B=null;var B=this.createControl("Option#2",oLabel,45,0,40,17);B.text("Vrouw");B.focusBehavior(efbDefault);B=null;break;case"Option_Click":this.value(left$(A.sender.text(),1))}};_P.value=function(C){if(C!=null){var B=this.controls["Option#1"];var A=this.controls["Option#2"];B.setBorder(edAll,"#fff","solid",0);A.setBorder(edAll,"#fff","solid",0);switch(UCase$(C)){case"M":B.setBorder(edAll,"#000","solid",1);this.internValue("M");break;case"V":A.setBorder(edAll,"#000","solid",1);this.internValue("V");break;default:this.internValue("")}}return this.internValue()};return classUpdate()})();classCreate("oUploadButton",cControl);var oUploadButton=(function(){_P.property("pictureDisabled","");_P.property("pictureSelected","");_P.property("text","");_P.handleEvent=function(A){switch(A.eventID){case"Load":this.focusBehavior(efbNormalAction);var B=this.createControl("Caption",oLabel,0,(this.height()-16)/2,this.width(),20);B.style(ecsTextAlign,"center");B.style(ecsFontWeight,"bold");B=null;this.setBorder(edAll,WWBlue,"solid",1);case"Show":this.controls["Caption"].text(this.text());break;case"Paint":if(this.mouseFocus()){this.drawColorBack("#E8E8E8")}else{this.drawColorBack("")}}};return classUpdate()})();classCreate("oLmsPopupDeleteRecord",cControl);var oLmsPopupDeleteRecord=(function(){_P.property("params",null);_P.handleEvent=function(A){switch(A.eventID){case"Load":this.picture("image/lms/interface/bg.gif");var B=this.createControl("lblTitle",oLabel,6,3,this.width()-12,22);B.text("Naam");B=null;var B=this.createControl("lblText",oLabel,6,23,this.width()-12,50);B.text("Naam");B=null;break;case"_popup__Show":this.drawScreen(A.params);break;case"_popup__Ok":this.deleteRecord()}};_P.drawScreen=function(C){var B;var A;this.params(C);B=langLms("titleDelRec");switch(LCase$(C.canDelete)){case"true":A=langLms("txtDelRec1");break;case"false":A=langLms("txtDelRec2");break;case"never":A=langLms("txtDelRec3")}if(LCase$(C.canDelete)!="true"){switch(LCase$(C.canArchive)){case"true":B=langLms("titleArchRec");A=A+vbCrLf+langLms("txtArchRec1")}}this.controls["lblTitle"].text(B);this.controls["lblText"].text(A)};_P.deleteRecord=function(){if((this.params().canDelete=="true")||(this.params().canArchive=="true")){var A=requestFast("deleterecord",fillParam(this.params()));backGround.controls["LmsAdmin"].navigateMoveUp(2)}};return classUpdate()})();classCreate("oLmsProfileList",cControl);var oLmsProfileList=(function(){_P.property("itemCount",0);_P.handleEvent=function(A){switch(A.eventID){case"Load":this.style("overflow","auto");break;case"Show":this.clear();break;case"Item_MouseEnter":this.raiseEvent("ItemMouseEnter",A.params);break;case"Item_MouseLeave":this.raiseEvent("ItemMouseLeave")}};_P.clear=function(){this.removeControl("*");this.itemCount(0)};_P.addItem=function(A,D,C){if(C==undefined){C=""}this.itemCount(this.itemCount()+1);var B=this.createControl("Item#"+A,oLmsProfileListItem,0,(this.itemCount()-1)*22,this.width()-20,22);B.loadItem(A,D,C);B=null};_P.value=function(G){var C;var F;var E;var B=new array();var A=0;var D="";if(!isEmptyString(G)){C=split$(G,"|");for(_EC5 in C){F=C[_EC5];A=nameFromIni$(F,";");D=valueFromIni$(F,";");E=this.controls["Item#"+A];if(E!=null){E.selected(true);E.date(D)}}}for(_EC6 in this.controls){E=this.controls[_EC6];if(E.selected()){B.push(E.tag()+";"+E.date())}}return B.join("|")};return classUpdate()})();classCreate("oLmsProfileListItem",cControl);var oLmsProfileListItem=(function(){_P.property("info","",true);_P.handleEvent=function(A){switch(A.eventID){case"Load":this.style("overflow","auto");this.focusBehavior(efbStateAction);this.createControl("CheckBox",oImage,1,1,16,16);this.createControl("Caption",oLabel,20,1,this.width()-100,16);var B=this.createControl("Date",oDate,this.width()-99,0,99,20);B.focusBehavior(efbClick);B=null;break;case"Paint":this.drawColorBack((this.mouseFocus()?colorMenuHighlight:"#FFFFFF"));if(this.mouseFocus()){this.raiseEvent("MouseEnter",{"info":this.info()})}else{this.raiseEvent("MouseLeave")}var B=this.controls["CheckBox"];if(this.selected()){B.picture("image/lms/buttons/icocheckfull.gif")}else{B.picture("image/lms/buttons/icocheckempty.gif")}B=null}};_P.loadItem=function(A,C,B){this.tag(A);this.controls["Caption"].text(C);this.info(B)};_P.date=function(A){return this.controls["Date"].value(A)};return classUpdate()})();classCreate("scrLmsLogon",cControl);var scrLmsLogon=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":this.picture("image/lms/interface/bg.gif");this.createControl("Logon",oLmsLogon,loginScreenCoords.left,loginScreenCoords.top,this.width()-loginScreenCoords.left,this.height()-loginScreenCoords.top,false);break;case"Show":this.drawPicture(this.picture());this.controls["Logon"].show();break;case"Hide":this.controls["Logon"].destroy()}};return classUpdate()})();classCreate("oLmsLogon",cControl);var oLmsLogon=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":var C=this.createControl("lblName",oLabel,316,166,150,22);C.text(langLms("LogonName"));C=null;var C=this.createControl("fldName",oText,470,166,245,25);C=null;var C=this.createControl("lblPassword",oLabel,316,196,150,22);C.text(langLms("Password"));C=null;var C=this.createControl("fldPassword",oPassword,470,196,245,25);C=null;var C=this.createControl("btnLogin",oTextButton,627,240,88,22);C.picture("image/lms/buttons/btn_login.gif");var B=C.controls["Caption"];B.style(ecsTextAlign,"center");B.left(2);B.width(71);B.text(langLms("logon"));B=null;C=null;var C=this.createControl("lblRegister",oLabel,316,300,490,360);C.text(markupToHtml(langLms("LogonWelcome"),true));C=null;var C=this.createControl("btnForgotPass",oLink,627,266,150,20);C.style(ecsOverFlow);C.text(langLms("ForgotLogon"));C.style(ecsTextAlign,"right");C=null;var C=this.createControl("btnRegister",oLink,647,525,150,20,false);C.style(ecsOverFlow);C.text(langLms("NewStudent"));C.style(ecsTextAlign,"right");C=null;break;case"Show":lms.logOut();this.controls["btnForgotPass"].visible(showForgotPassButton);this.controls["btnRegister"].visible(newUsersCanRegister);if(window.debugLogin){this.login(debugLogin,debugPass)}break;case"btnLogin_Click":this.uiLogin();break;case"btnForgotPass_Click":showPopup(300,160,oPopupForgotPass);break;case"btnRegister_Click":showPopup(500,250,oLmsUserRegistration);break;case"fldName_KeyUp":if(A.params.key==13){this.uiLogin()}break;case"fldPassword_KeyUp":if(A.params.key==13){this.uiLogin()}break;case"_popup__Ok":showDefaultMenu()}};_P.uiLogin=function(){this.login(this.formValue("Name"),this.formValue("Password"))};_P.login=function(C,B,A){var D=lms.login(C,B,A);if(isEmptyString(D)){if(showDisclaimer&&lms.userIsFirstLogin()){showPopup(800,600,oPopupDisclaimer,null,this,true)}else{showDefaultMenu()}}else{msgBox(D)}};_P.formValue=function(A,C){var B=this.controls["fld"+A];if(B==null){return }return B.value(C)};return classUpdate()})();classCreate("oPopupForgotPass",cControl);var oPopupForgotPass=(function(){_P.handleEvent=function(B){switch(B.eventID){case"Load":var C=this.createControl("lblText",oLabel,8,8,284,80);C.text(langLms("TextForgotPassword"));C=null;var C=this.createControl("Text",oText,8,80,284,22);C=null;break;case"_popup__Ok":var A=this.controls["Text"].value();if(isEmail(A)){requestFast("ForgotPass",{email:A})}}};return classUpdate()})();classCreate("oPopupDisclaimer",cControl);var oPopupDisclaimer=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":var B=this.createControl("Text",oHtml,12,20,this.width()-24,this.height()-60);B=null;break;case"_popup__Show":this.controls["Text"].showPage("doc/disclaimer.htm")}};return classUpdate()})();classCreate("oLmsUserRegistration",cControl);var oLmsUserRegistration=(function(){_P.property("defaultRegisterOption",0);_P.handleEvent=function(A){switch(A.eventID){case"Load":var D=this.createControl("lblText",oLabel,12,4,436,100);D.text(langLms("TextRegistration"));D=null;break;case"Show":var I=false;var K;K=requestFast("GetRegisterOptions",{langCode:_lang});K=getXmlNodeClone(K,"getregisteroptions",true);this.defaultRegisterOption(0);if(K!=null){if(K.childCount()>1){var D=this.controls["fldRegisterOption"];D.clear();if(K.moveDown()){do{D.addItem(K.get("name"),K.get("id"))}while(K.moveNext())}D=null;I=true}else{if(K.moveDown()){this.defaultRegisterOption(K.get("ID"))}}}var H=66;if((registerNewUserShowMode<2)){var D=this.createControl("lblName",oLabel,12,66,150,20);D.text(langLms("LogonName"));D=null;var D=this.createControl("fldName",oLabel,12,170,150,20);D=null;H+=27}if((registerNewUserShowMode<1)){var D=this.createControl("lblPassword",oLabel,12,H,150,20);D.text(langLms("Password"));D=null;var D=this.createControl("fldPassword",oPassword,170,H,255,23);D=null;H+=27}var D=this.createControl("lblEmail",oLabel,12,H,150,20);D.text("Email ");D=null;var D=this.createControl("fldEmail",oText,170,H,255,23);D=null;H+=27;if((registerNewUserShowMode==4)){var D=this.createControl("lblEmailContact",oLabel,12,H,150,20);D.text("Email contact");D=null;var D=this.createControl("fldEmailContact",oText,170,H,255,23);D=null;H+=27}if(I){var D=this.createControl("lblRegisterOption",oLabel,12,H,150,20);D.text(langLms("RegisterOption"));D=null;var D=this.createControl("fldRegisterOption",oComboBox,170,H,255,23);D=null}break;case"_popup__Ok":var C=new cHttpRequest();var F=this.controls["fldEmail"].value();var B=(registerNewUserShowMode<2?this.controls["fldName"].value():F);var G=(registerNewUserShowMode<1?this.controls["fldPassword"].value():makeRandomPassword());var J=(registerNewUserShowMode==4?this.controls["fldEmailContact"].value():"");var E=(this.controls["fldRegisterOption"]?this.controls["fldRegisterOption"].value():"")||this.defaultRegisterOption();var K=requestFast("RegisterNewUser",{name:B,password:G,email:F,registerOption:E,emailContact:J,langCode:_lang});if(K==null){return }K=getXmlNodeClone(K,"RegisterNewUser",true);if(!K){alert("Unhandled Registration Error.")}else{if(!isEmptyString(K.get("errors"))){alert(K.get("Errors"));return{cancelUnload:true}}else{backGround.controls["LmsLogon"].controls["Logon"].login(B,G,-1)}}}};return classUpdate()})();var makeRandomPassword=function(){var C="123456789abcdefghijklmnopqrstuvwxyz123456789";var B;var A="";for(B=1;B<=10;B++){A+=mid$(C,random(len(C)),1)}return A};classCreate("oPopupAlert",cControl);var oPopupAlert=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":var B=this.createControl("lblText",oLabel,12,20,276,120);B.text("");B.style("overflowY","auto");B=null;break;case"_popup__Show":if(this.controls["lblText"]){this.controls["lblText"].text(A.params.text)}}};return classUpdate()})();var msgBox=function(B,A){showPopup(300,200,oPopupAlert,{text:B},A,true)};var confirmBox=function(B,A){showPopup(300,200,oPopupAlert,{text:B},A,false)};var popupCounter=0;var showPopup=function(G,C,E,B,F,A){popupCounter++;if(popupCounter==3){popupCounter=1}var D=backGround.controls["_popup_#"+popupCounter];if(!D){D=backGround.createControl("_popup_#"+popupCounter,cPopup,0,0,backGround.width(),backGround.height(),false)}D.loadPopup(G,C,E,B,F,A)};classCreate("cPopup",cControl);var cPopup=(function(){_P.property("caption","",true);_P.handleEvent=function(A){switch(A.eventID){case"Load":this.style(ecsZOrder,1000);var B=this.createControl("Form",oRect,150,150,400,400);B.colorBack(colorPopupBackGround);B=null;var B=this.createControl("Client",oRect,150,150,400,400);B=null;var B=this.createControl("btnOk",oLmsButton,210,370);B.style(ecsZOrder,10);B.text(langLms("Ok"));B=null;var B=this.createControl("btnCancel",oLmsButton,210,370);B.style(ecsZOrder,10);B.text(langLms("Cancel"));B=null;var B=this.createControl("CaptionBack",oRect,10,10,100,100);B.colorBack(colorMenuFontSpecial);B.style(ecsZOrder,10);B=null;var B=this.createControl("lblCaption",oLabel,10,10,100,18);B.style(ecsForeColor,"white");B.style(ecsFontWeight,"bold");B.style(ecsZOrder,11);B=null;var B=this.createControl("btnClose",oButton,0,0,17,18);B.picture("image/lms/buttons/mainclose.gif");B.style(ecsZOrder,12);B=null;break;case"btnCancel_Click":this.unloadPopup();break;case"btnClose_Click":this.unloadPopup();break;case"btnOk_Click":result=this.raiseEvent("Ok");if((!result)||(result.cancelUnload!=true)){this.unloadPopup()}if(!!this.callBack){this.callBack();delete this.callBack}break;case"Paint":this.controls["lblCaption"].text(this.caption())}};_P.unloadPopup=function(){this.controls["Client"].removeControl("ClientControl");backGround.controls["Overlay"].visible(false);this.destroy()};_P.loadPopup=function(A,I,G,K,F,L){var J=this.controls["Form"];var E=(backGround.width()-A)/2;var H=(backGround.height()-I)/2;var B;J.move(E,H,A,I);var D=this.controls["Client"];D.move(E+2,H+20,A-4,I-22);var C=D.createControl("ClientControl",G,0,0,D.width(),D.height());D=null;this.addListener(C);if(!!F){if(typeof (F)=="function"){this.callBack=F}else{this.addListener(F)}}this.controls["CaptionBack"].move(E+2,H+2,A-4,18);this.controls["lblCaption"].move(E+12,H+4,A-30,16);var D=this.controls["btnClose"];D.move(E+A-19,H+2,17,18);D.visible(!L);D=null;var D=this.controls["btnCancel"];if(L){B=E+A;D.visible(false)}else{B=E+A-D.width()-4;D.move(B,H+I-D.height()-4);D.visible(true)}D=null;var D=this.controls["btnOk"];D.move(B-D.width()-4,H+I-D.height()-4);D=null;backGround.controls["Overlay"].visible(true);J.setBorder(edAll,"","outset",2);this.show();this.raiseEvent("Show",K)};return classUpdate()})();var elsPassed="passed";var elsCompleted="completed";var elsBrowsed="browsed";var elsFailed="failed";var elsNotAttempted="not attempted";var elsIncomplete="incomplete";eesTimeOut="time-out";eesSuspend="suspend";eesLogout="logout";var scormPlayerWindow;var scormWindowTimer;classCreate("scrScormOverlay",cControl);var scrScormOverlay=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":this.visible(false);this.focusBehavior(efbClick);this.style("zIndex",800);var B=backGround.createControl("bottomWarning",oLabel,350,240,400,200);B=null;var B=this.createControl("lblWarning",oLabel,400,280,300,120);B.style(ecsFontWeight,12);B.style(ecsForeColor,"#2AB0EF");B.style(ecsFontWeight,"bold");B.text("");B=null;break;case"Show":this.opacity(80);this.drawColorBack("black");var B=backGround.controls["bottomWarning"];B.opacity(85);B.drawColorBack("#000");B=null;var B=this.controls["lblWarning"];B.text(langLms("ScormBusy1"));B=null;break;case"Hide":if(backGround.controls["bottomWarning"]){backGround.controls["bottomWarning"].destroy()}}};_P.scormFinish=function(){var A=this.controls["lblWarning"];A.text(langLms("ScormBusy2"));A.setDirty();A=null};return classUpdate()})();var scormWindowStart=function(D,A,C){API.courseID(D);API.link(A);switch(C){case"1280x1024":scormWindowWidth=1280-8;scormWindowHeight=1024-60;break;case"1024x768":scormWindowWidth=1024-8;scormWindowHeight=768-60;break;case"800x600":scormWindowWidth=800-8;scormWindowHeight=600-60;break;default:scormWindowWidth=(screen.width-8);scormWindowHeight=(screen.height-60)}A=replace$(A,"\\[userid\\]",lms.userID());A=replace$(A,"\\[courseid\\]",lms.courseID());try{scormPlayerWindow=window.open(A,"ScormPlayer","width="+scormWindowWidth+",height="+scormWindowHeight+",scrollbars=auto,resizable=yes,status=no");new scrScormOverlay("ScormOverlay",backGround,0,0,1016,675).show();scormWindowTimer=setInterval("scormWindowPoll()",500)}catch(B){msgBox("De cursus kon niet gevonden worden.")}};var scormWindowPoll=function(){if(!popupWindowExists(scormPlayerWindow)){scormWindowClose()}};var scormWindowClose=function(){if(scormWindowTimer){clearInterval(scormWindowTimer);scormWindowTimer=null}if(popupWindowExists(scormPlayerWindow)){scormPlayerWindow.close()}scormPlayerWindow=null;if(backGround.controls["ScormOverlay"]){backGround.controls["ScormOverlay"].destroy()}API.LMSFinish();showDefaultMenu(true)};var popupWindowExists=function(A){if(!A){return false}try{if(!A.closed){return true}}catch(B){}return false};var showDefaultMenu=function(A){switch(lms.userRights()){case"user":showScreen(studentDefaultScreen);break;default:showScreen("Admin",null,A);break}};classCreate("scanScores",null);scanScores=(function(){var A=(function(){_P.property("adminScan",null);_P.property("userScan",null);_P.create=function(){this.adminScan=null;this.userScan=null};_P.load=function(C){var D;var B=0;this.adminScan={};this.userScan={};if(!C){return }strAdminScan=trim$(C.get("ScanAdmin"));if(!isEmptyString(strAdminScan)){D=split$(strAdminScan,",");for(B=0;B<=UBound(D);B++){this.adminScan[nameFromIni$(D[B],":")]=D[B]}}strUserScan=trim$(C.get("ScanUser"));if(!isEmptyString(strUserScan)){D=split$(strUserScan,",");for(B=0;B<=UBound(D);B++){this.userScan[nameFromIni$(D[B],":")]=D[B]}}};_P.save=function(G){var H="";var E="";var D="";var C=new array();if(this.adminScan){for(_EC1 in this.adminScan){D=this.adminScan[_EC1];C.push(D)}H=C.join(",")}var C=new array();if(this.userScan){for(_EC2 in this.userScan){D=this.userScan[_EC2];C.push(D)}E=C.join(",")}var F=new cHttpRequest();F.addCommand("User",{userID:lms.userID()});F.addCommand("SaveScan",{currentID:G,scanUser:E,scanAdmin:H});var B=F.send()};_P.userScore=function(B,C){if(C!=undefined){this.userScan[B]=B+":"+C}return valueFromIni$(this.userScan[B],":")||0};_P.adminScore=function(B,C){if(C!=undefined){this.adminScan[B]=B+":"+C}return valueFromIni$(this.adminScan[B],":")||0};_P.isSuggestedRole=function(C,D){var B;if(D){B=this.adminScore(C)||this.userScore(C)}else{B=this.userScore(C)}return(B>0)&&(B<=3)};return classUpdate()})();return new A()})();classCreate("oTheScanHeader",cControl);var oTheScanHeader=(function(){_P.property("isAdmin",false);_P.handleEvent=function(C){var A=0;switch(C.eventID){case"Load":this.focusBehavior(efbOptionAction);this.size(555,21);var D=this.createControl("Icon",oImage,3,2,22,20);D=null;var D=this.createControl("CheckBox",oButton,this.width()-25,2,22,20);D.picture("image/default/icocheck.gif");D.focusBehavior(efbOptionAction);D=null;var D=this.createControl("Caption",oLabel,28,2,480,20);D=null;for(A=1;A<=5;A++){var D=this.createControl("imgScan#"+A,oImage,560+(A-1)*20,2,17,17,false);D.picture("image/lms/interface/scan"+A+".gif");D=null}break;case"Paint":var B=false;this.drawColorBack("#A4DDF8");var D=this.controls["Icon"];if((scanScores.userScore(this.tag())==-1)||(this.isAdmin())){D.picture("image/lms/buttons/arrow_"+(this.selected()?"open":"closed")+".gif");D.visible(true);if(this.selected()){B=true}}else{D.visible(false)}D=null;for(A=1;A<=5;A++){this.controls["imgScan#"+A].visible(B)}this.controls["CheckBox"].selected(scanScores.userScore(this.tag())==-1);break;case"CheckBox_Click":if(!this.isAdmin()){scanScores.userScore(this.tag(),scanScores.userScore(this.tag())^-1);this.raiseEvent("Select",(scanScores.userScore(this.tag())==-1?this.tag():0));this.setDirty()}break;case"Click":if(this.isAdmin()||(scanScores.userScore(this.tag())==-1)){this.raiseEvent("Select",this.tag())}}};_P.update=function(C,A,B){this.controls["Caption"].text(C);this.selected(false);this.tag(A);this.isAdmin(B);this.visible(true)};return classUpdate()})();classCreate("oTheScanLine",cControl);var oTheScanLine=(function(){_P.property("userScore",0,true);_P.property("adminScore",0,true);_P.property("isAdmin",false);_P.property("linkedTags",null);_P.handleEvent=function(A){switch(A.eventID){case"Load":this.size(555,17);var B=this.createControl("Caption",oLabel,3,1,540,15);B.autoSize(true);B=null;for(index=1;index<=5;index++){var B=this.createControl("btnScan#"+index,oImage,560+(index-1)*20,2,17,17,true);B.focusBehavior(efbOptionAction);B=null}break;case"Show":this.showButtons();break;case"btnScan_Click":if(this.isAdmin()){this.adminScore(A.sender.groupIndex());scanScores.adminScore(this.tag(),this.adminScore())}else{this.userScore(A.sender.groupIndex());scanScores.userScore(this.tag(),this.userScore());for(index=0;index<=UBound(this.linkedTags);index++){scanScores.userScore(this.linkedTags[index],this.userScore())}}this.showButtons();this.raiseEvent("Select")}};_P.showButtons=function(){var A="";for(index=1;index<=5;index++){A="image/lms/interface/btnscan"+(this.userScore()==index?"user":"")+(this.adminScore()==index?"admin":"")+".gif";this.controls["btnScan#"+index].picture(A)}};_P.update=function(C,A,B){this.controls["Caption"].text(C);this.tag(A);this.linkedTags=new array();this.isAdmin(B);this.userScore(cVal(scanScores.userScore(this.tag())));this.adminScore(cVal(scanScores.adminScore(this.tag())));this.visible(true);this.height(this.controls["Caption"].height())};_P.addAnotherRole=function(A){this.linkedTags.push(A)};return classUpdate()})();classCreate("oTheScanPage",cControl);var oTheScanPage=(function(){_P.property("roles",null);_P.property("currentSelectedID","0");_P.property("isAdmin",false);_P.handleEvent=function(A){switch(A.eventID){case"Load":this.style("overflowY","scroll");this.roles=null;break;case"Header_Select":this.currentSelectedID(A.params);this.drawScreen();break;case"Line_Select":this.raiseEvent("Select",this.getSelectedRoles());break;case"Show":this.raiseEvent("Select",this.getSelectedRoles())}};_P.clearScreen=function(){this.removeControl("*")};_P.getSelectedRoles=function(){var D=this.roles;var C;var E=new array();var F="";if(D.moveFirst()){do{if(D.get("ParentID")=="0"){F=D.get("ID");if(scanScores.userScore(F)==-1){C=D.clone();do{if(C.get("ParentID")==F){if(scanScores.isSuggestedRole(C.get("ID"),this.isAdmin())){E.push(C.get("Title"))}}}while(C.moveNext())}}}while(D.moveNext())}var B=0;var A="";for(B=0;B<=(UBound(E)>15?15:UBound(E));B++){A=A+"<div "+(B%2==0?"style='padding=6px'":"style='padding=6px; background-color:#f8e8e8'")+">"+E[B]+"</div>"}return A};_P.drawScreen=function(){var D=this.roles;var C;var B;var E;var A=0;this.clearScreen();if(D.moveFirst()){do{if((D.get("ParentID")=="0")&&(!isEmptyString(D.get("Scan")))){var F=this.createControl("Header#"+A,oTheScanHeader,0,A,650,25,true);F.update(D.get("Scan"),D.get("ID"),this.isAdmin());if(F.tag()==this.currentSelectedID()){F.selected(true)}A+=F.height()+2;F=null;if(D.get("ID")==this.currentSelectedID()){C=D.clone();do{if((C.get("ParentID")==this.currentSelectedID())&&(!isEmptyString(C.get("Scan")))){if(B!=C.get("Scan")){B=C.get("Scan");E=this.createControl("Line#"+A,oTheScanLine,0,A,650,25,false);var F=E;F.update(C.get("Scan"),C.get("ID"),this.isAdmin());A+=F.height()+8;F=null}else{E.addAnotherRole(C.get("ID"))}}else{E=""}}while(C.moveNext())}}}while(D.moveNext())}this.raiseEvent("Select",this.getSelectedRoles())};_P.update=function(B,A){this.roles=B;this.currentSelectedID(0);this.isAdmin(A);this.drawScreen();this.visible(true)};return classUpdate()})();classCreate("scrTheScan",cControl);var scrTheScan=(function(){_P.property("isAdmin",false);_P.property("currentUserID",0);_P.property("finished",false);_P.handleEvent=function(A){switch(A.eventID){case"Load":var B=this.createControl("btnSave",oLmsButton);B.text((this.isAdmin()?"Opslaan":"Opslaan"));B.move(875,this.height()-30);B=null;var B=this.createControl("lblIntro",oLabel,0,0,555,30);B.text("Vink aan over welke van onderstaande onderwerpen je iets wilt leren.<br />Geef vervolgens aan in hoeverre de vraag op jou van toepassing is.");B.style(ecsFontWeight,"bold");B=null;var B=this.createControl("lblSelectedHeader",oLabel,705,0,250,40);B.style(ecsFontWeight,"bold");B.text("Hieronder staat een overzicht van het aanbod dat bij jouw keuze past.");B=null;var B=this.createControl("lblSelectedModules",oLabel,700,47,257,450);B.style("overflowY","auto");B.text("");B=null;var B=this.createControl("imgScoreHeader",oImage,560,0,106,30);B.picture("image/lms/interface/header.gif");B=null;var B=this.createControl("ScanPage",oTheScanPage,0,40,680,this.height()-40);B=null;break;case"Show":this.controls["lblIntro"].drawColorBack("#f8e6e6");break;case"Slider_Slide":if(this.finished()){this.parent().navigateMoveUp()}break;case"Slider_Home":this.parent().navigateMoveUp();break;case"ScanPage_Select":var B=this.controls["lblSelectedModules"];B.drawInnerHtml(A.params);B=null;break;case"btnSave_Click":scanScores.save(this.currentUserID());var B=backGround.controls["Slider"];B.clearMenu();B.showHtml("intro/scanuitro.htm");B.slide(true);B=null;this.finished(true)}};_P.showScreen=function(){this.finished(false);var D=backGround.controls["Slider"];D.style("zIndex",1000);D.addListener(this);D.show();D.showHtml("intro/scanintro.htm");D.slide(true);D=null;var B=new cHttpRequest();this.currentUserID(lms.getNavigationParam("UserID")||cStr(lms.userID()));this.isAdmin(this.currentUserID()!=lms.userID());B.addCommand("User",{userID:lms.userID()});B.addCommand("GetRoleTree",{});B.addCommand("GetScan",{userID:this.currentUserID()});var A=B.send();var C=getXmlNodeClone(A,"GetRoleTree");if(!C){return }scanScores.load(getXmlNodeClone(C,"GetScan"));this.controls["ScanPage"].update(C,this.isAdmin());this.visible(true)};return classUpdate()})();var showProgress=true;classCreate("oLmsLanguageSelector",cControl);var oLmsLanguageSelector=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":this.focusBehavior(efbDefault);this.mouseIcon("pointer");this.style(ecsForeColor,"#333366");this.style(ecsTextAlign,"right");break;case"Paint":var B=(_lang==0?"English":"Nederlands");this.drawText(B);this.style(ecsTextDecoration,(this.mouseFocus()?"underline":""));break;case"Click":if(_lang==1){_lang=0}else{_lang=1}this.setDirty()}};return classUpdate()})();classCreate("oLmsRegisterCourse",cControl);var oLmsRegisterCourse=(function(){_P.property("buttonIndex",0);_P.property("selectedCourseID",0);_P.property("selectedDayID",0);_P.property("selectedInfo","");_P.property("inProfile",true);_P.handleEvent=function(A){switch(A.eventID){case"Load":var B=this.createControl("ItemList",oLmsOverviewMenu,10,30,this.width()-330,this.height()-60);B.focusStyle(efbOptionAction);B=null;var B=this.createControl("lblCourseDetails",oLabel,this.width()-320,30,310,this.height()-60);B.text("");B=null;break;case"Show":this.controls["ItemList"].addListener(this);break;case"ItemList_Select":this.selectedCourseID(A.params.courseID);this.selectedDayID(A.params.dayID);this.selectedInfo(A.params.info3);break;case"ItemList_ItemMouseEnter":this.controls["lblCourseDetails"].text(A.params.info3);break;case"ItemList_ItemMouseLeave":this.controls["lblCourseDetails"].text(this.selectedInfo());break;case"_popup__Show":this.drawScreen(A.params);break;case"_popup__Ok":lms.courseRegister(this.selectedCourseID(),this.selectedDayID(),this.inProfile());backGround.controls["LmsAdmin"].redraw()}};_P.drawScreen=function(D){var B=this.controls["ItemList"];this.inProfile(D.inProfile);this.selectedCourseID(0);this.selectedDayID(0);B.clearScreen();var A=requestFast("GetCoursesByRole",{userID:lms.viewUserID(),roleID:D.roleID});A=getXmlNodeClone(A,"GetCoursesByRole");if(A!=null){if(D.canDelete==true){B.showButton("Uitschrijven","",{courseID:A.get("CourseID"),dayID:0,info3:""})}do{var C=B.showButton(A.get("CourseName"),"",{courseID:A.get("CourseID"),dayID:A.get("DayID"),info3:A.get("Info3")});if(!isEmptyString(A.get("resultcourseid"))){C.selected(true);this.selectedCourseID(A.get("CourseID"));this.selectedDayID(A.get("DayID"));this.selectedInfo(A.get("Info3"))}C=null}while(A.moveNext())}};return classUpdate()})();classCreate("courseOverview",null);courseOverview=(function(){var A=(function(){_P.property("courses",null);_P.property("currentUserProfiles","");_P.property("profileSelection","0");_P.property("statusSelection","nofilter");_P.property("profileText",langLms("AllProfiles"));_P.load=function(){var D=new cHttpRequest();var B;var C=lms.viewUserID();if(!C){C=lms.userID()}if(offLine==true){this.profiles=null;this.courses=null;this.courses=new dbNode("testxml/testmenu.xml")}else{D.addCommand("User",{userID:lms.userID(),langCode:_lang});D.addCommand("getuserprofiles",{userID:C});D.addCommand("getcourseoverview",{userID:C,profileID:this.profileSelection()||0,status:this.statusSelection()||""});this.courses=D.send()}if(!this.courses){this.courses=null}else{var E=getXmlNodeClone(this.courses,"getuserprofiles",true);if(E){this.currentUserProfiles(E.get("profile"))}E=null;this.courses=getXmlNodeClone(this.courses,"getcourseoverview");if(this.courses){this.courses.moveFirst(0)}}this.filters=null};_P.clearFilters=function(){this.courses.clearFilters()};_P.setFilter=function(D,C,B){this.courses.setFilter(D,C,B)};_P.find=function(B){if(!this.moveFirst()){return false}return this.courses.find("RoleID",B,false)};_P.moveFirst=function(B){if(!this.courses){return false}this.courses.clearFilters();if(B!=undefined){this.courses.setFilter("RoleParentID",B,"=")}return this.courses.moveFirst()};_P.moveNext=function(){return this.courses.moveNext()};_P.debugDump=function(){this.courses.debugDump()};_P.roleID=function(){return this.courses.get("roleid")};_P.review=function(){return cBool(this.courses.get("review"))};_P.courseID=function(){return this.courses.get("CourseID")};_P.link=function(){return(this.courses.get("Url")||this.courses.get("identifier"))};_P.courseType=function(){return LCase$(this.courses.get("coursetype"))};_P.courseTypeText=function(){return langLms(this.courseType())};_P.courseTypeInfo=function(){return dataLmsCourseTypeInfo[this.courseType()]||dataLmsCourseTypeInfo["scorm"]};_P.courseTypeImage=function(){var B=this.courseTypeInfo();if((!!B)){return"image/lms/interface/"+B.icon+".gif"}else{return""}B=null};_P.completionText=function(){var C="";var B=this.courseState()||"open";C=langLms(B);if(LCase$(B)=="passed"||LCase$(B)=="failed"){C=C+" "+this.menuScore()}return C};_P.completionImage=function(){var B=dataLmsStatus[this.courseState()||"open"];if((!!B)){return"image/lms/interface/"+LCase$(B.icon)+".gif"}else{return""}B=null};_P.childStatus=function(){var E=this.courses.clone();var D=E.get("RoleID");var C={};var B={itemCount:0,red:0,orange:0,yellow:0,green:0};if(E.moveFirst()){do{if(E.get("RoleParentID")==D){B.itemCount++;C=dataLmsStatus[LCase$(E.get("Status"))];if(C&&!isEmptyString(C.warningLevel)){B[C.warningLevel]++}}}while(E.moveNext())}return B};_P.windowMode=function(){return this.courses.get("WindowMode")};_P.menuInfo=function(){return stringOptionalAdd(this.courses.get("info1"),"",vbCrLf+vbCrLf)+stringOptionalAdd(this.courses.get("info2"),"",vbCrLf+vbCrLf)+cStr(this.courses.get("info3"))};_P.menuInfo1=function(){return this.courses.get("info1")};_P.menuInfo2=function(){return this.courses.get("info2")};_P.menuInfo3=function(){return this.courses.get("info3")};_P.menuInfoImage=function(){return this.courses.get("infoimage")};_P.courseDuration=function(){return cVal(this.courses.get("courseduration"))};_P.courseState=function(){return LCase$(this.courses.get("status"))};_P.moduleName=function(){if(!this.courses){return""}var B=trim$(this.courses.get("roletitle"));var C=trim$(this.courses.get("coursename"));if(C!=""&&LCase$(B)!=LCase$(C)){if(B!=""){B=B+" ("+C+")"}else{B=C}}return B};_P.menuScore=function(){if(!this.courses){return""}var B="";switch(LCase$(this.courses.get("coursetype"))){case"scormexam":case"coursegenexam":case"exam":B="Score: "+this.courses.get("normalscore")/10;break;case"scormtestexam":case"testexam":B="Score: "+this.courses.get("score")+"%"}return B};_P.inProfile=function(){return this.courses.get("Inprofile")};_P.roleParentID=function(){return this.courses.get("RoleParentID")};_P.hasChildren=function(){return cBool(this.courses.get("HasChildren"))};_P.courseStart=function(E,F){if(!this.find(E)){return false}if(this.hasChildren()){return false}if(lockModuleStart&&(!lms.canUserSubscribe())){msgBox("Om cursussen te kunnen starten of op cursussen te kunnen inschrijven, dienen alle relevante gegevens ingevuld te zijn. Dit is te doen onder 'Gegevens wijziging' in het hoofdscherm.");return false}var C=this.courseState();if(debugMode&&(C=="unavailable")){C="open"}switch(C){case"alert":break;case"unavailable":break;case"accepted":break;case"cancelled":case"requested":case"rejected":case"reexamine":case"waiting":if(!lms.canUserSubscribe()){msgBox("Om te kunnen inschrijven voor externe cursussen dienen alle relevante gegevens ingevuld te zijn. Dit is te doen onder 'Gegevens wijziging' in het hoofdscherm.");return }var B={roleID:this.roleID(),inProfile:this.inProfile(),canDelete:C=="requested"};showPopup(800,600,oLmsRegisterCourse,B,F);break;default:var D=false;switch(this.courseType()){case"enc":lms.courseInitialize(this.courseID());lms.courseStatus("started");lms.courseStop(this.courseID(),null,"started");lms.update(this.courseID(),"started");backGround.controls["scrEncyclopedia"].tabStart(1);showEncyclopedia(lms.viewUserID(),this.roleID());D=true;break;case"encyclopedia":break;case"pretest":switch(C){case"failed":case"passed":D=true}break;case"exam":switch(C){case"open":break;case"started":break;case"":break;default:D=true}}if(!D){if(this.courseTypeInfo().scorm){scormWindowStart(this.courseID(),this.link(),this.windowMode())}else{showScreen(this.courseType(),this.link())}}}};return classUpdate()})();return new A()})();classCreate("scrModuleMenu",cControl);var scrModuleMenu=(function(){_P.property("link","");_P.handleEvent=function(C){switch(C.eventID){case"Load":var B=0;var A=0;var D=this.createControl("CourseMenu",oCourseMenu,29,38,685,475);D=null;var D=this.createControl("lblInfo",oLabel,739,54,220,510);D.text("");D=null;var D=this.createControl("FilterMenu",popupFilterMenu,29,38,685,506,false);D.focusBehavior(efbHighLight);D=null;break;case"Show":break;case"Hide":this.controls["CourseMenu"].clearControl();break;case"FilterMenu_Hide":this.redraw(true);this.drawFilterMenuButton();break;case"FilterMenu_StatusSelect":courseOverview.statusSelection(C.params.ID);break;case"FilterMenu_ProfileSelect":courseOverview.profileSelection(C.params.ID);courseOverview.profileText(C.params.name);break;case"FilterMenu_ProfileMouseEnter":helpText=C.params.helpText;this.controls["lblInfo"].drawInnerHtml(replace$(helpText,"\n","<BR />"));break;case"FilterMenu_ProfileMouseLeave":this.controls["lblInfo"].drawInnerHtml("")}};_P.drawFilterMenuButton=function(){var A=this.parent().controls["lblCrumbpath"];if((!!A)){A.text(courseOverview.profileText())}A=null};_P.menuEnter=function(B){var A;if(courseOverview.find(B)){var D="";if(showProgress){var C=courseOverview;if(C.courseDuration()>0){D+="[#image/lms/interface/icoClock.gif]"+vbSpacer+vbSpacer+C.courseDuration()+" "+langLms("Minutes")+vbLf}if(C.courseTypeText()!=""){D+="[#"+C.courseTypeImage()+"]"+vbSpacer+vbSpacer+C.courseTypeText()+vbLf;D+="[#"+C.completionImage()+"]"+vbSpacer+vbSpacer+C.completionText()+vbLf}if(D!=""){D+=vbLf}if(C.menuInfoImage()!=""){D+="[#"+C.menuInfoImage()+" alignleft]"}if(!isEmptyString(C.menuInfo1())){D+="[color="+WWBlue+"]"+C.menuInfo1()+"[/color]"+vbLf}D+=vbLf+vbLf+vbLf;if(!isEmptyString(C.menuInfo3())){D+=C.menuInfo3()+vbLf}D+=C.menuInfo2();C=null;this.controls["lblInfo"].text(markupToHtml(D,true))}}};_P.menuLeave=function(A){this.controls["lblInfo"].text("")};_P.menuClick=function(A){courseOverview.courseStart(A)};_P.showScreen=function(){this.visible(true);this.drawPicture(this.picture());this.reloadCourses();if(showCourseOverviewFilters){this.controls["FilterMenu"].loadControl()}this.redraw()};_P.reloadCourses=function(){courseOverview.load()};_P.redraw=function(A){this.reloadCourses();if(A){var B=this.controls["CourseMenu"];if((!!B)){B.loadControl(this,courseOverview,0)}B=null}else{var B=this.controls["CourseMenu"];B.redraw();B=null}};return classUpdate()})();classCreate("popupFilterMenu",cControl);var popupFilterMenu=(function(){_P.property("selectionMode",false);_P.handleEvent=function(A){switch(A.eventID){case"Load":this.size(685,506);this.createControl("ProfileList",oProfileList,8,110,327,335);this.createControl("StatusList",oStatusList,347,110,327,335);var B=this.createControl("btnDone",oTextButton,602,475,75,22);B.picture("image/lms/buttons/default.gif");B.style(ecsForeColor,"white");B.text(langLms("Show"));B=null;this.createControl("lblCaptionMenu",oLabel,8,80,327,20);this.createControl("lblCaptionFilter",oLabel,347,80,327,20);var B=this.createControl("btnDocent",oLabel,8,447,327,20,false);B.focusBehavior(efbDefault);B=null;break;case"Show":this.controls["lblCaptionMenu"].text(markupToHtml(langLms("CourseFilterIntro")));this.controls["lblCaptionFilter"].text(markupToHtml(langLms("CourseFilterExtraFilters")));break;case"Paint":this.drawPicture("image/lms/interface/popupfiltermenu.jpg");break;case"ProfileList_Select":if(this.selectionMode()){}else{this.raiseEvent("ProfileSelect",A.params)}break;case"ProfileList_MouseEnter":if(this.selectionMode()){}else{this.raiseEvent("ProfileMouseEnter",A.params)}break;case"ProfileList_MouseLeave":if(this.selectionMode()){}else{this.raiseEvent("ProfileMouseLeave",A.params)}break;case"StatusList_Select":this.raiseEvent("StatusSelect",A.params);break;case"btnDocent_Click":this.selectionMode(!this.selectionMode());this.controls["ProfileList"].loadControl(courseOverview.profileSelection(),this.selectionMode());this.updateScreen();break;case"btnDone_Click":this.hide()}};_P.updateScreen=function(){this.controls["StatusList"].visible(!this.selectionMode());this.controls["lblCaptionFilter"].visible(!this.selectionMode());var A=this.controls["btnDocent"];if(this.selectionMode()){A.text(langLms("CourseFilterConfirm"))}else{A.text(langLms("CourseFilterAddCourse"))}A=null};_P.loadControl=function(){this.controls["btnDocent"].visible(false);this.selectionMode(false);this.controls["ProfileList"].loadControl(courseOverview.profileSelection());this.controls["StatusList"].loadControl(courseOverview.statusSelection());this.updateScreen();this.visible(true)};return classUpdate()})();classCreate("oProfileList",cControl);var oProfileList=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":this.style("overflowY","auto");break;case"Item_Click":this.raiseEvent("Select",{ID:A.sender.tag(),name:A.sender.text()});break;case"Item_MouseEnter":this.raiseEvent("MouseEnter",{ID:A.sender.tag(),name:A.sender.text(),helpText:A.sender.helpText()});break;case"Item_MouseLeave":this.raiseEvent("MouseLeave",{ID:A.sender.tag(),name:A.sender.text(),helpText:A.sender.helpText()})}};_P.loadControl=function(E,H){var G=lms.profiles;var D=courseOverview.currentUserProfiles();var F=false;this.removeControl("*");var C=new cHttpRequest();var A;var B=lms.viewUserID();if(!B){B=lms.userID()}if(offLine==true){}else{C.addCommand("User",{userID:lms.userID(),langCode:_lang});C.addCommand("getroleprofilelist",{userID:B});A=C.send();G=getXmlNodeClone(A,"getroleprofilelist",false)}E=E;this.addItem(0,langLms("AllProfiles"),E);if(G){if(G.moveFirst()){do{F=inStr("|"+D+"|","|"+G.get("ID")+"|")>0;if(H||F){this.addItem(G.get("ID"),G.get("name"),E,F&&H,G.get("Info"))}}while(G.moveNext())}}};_P.addItem=function(D,B,C,G,F){var A=this.getMaxGroupIndex("Item")+1;var E=this.createControl("Item#"+A,oProfileListItem,1,1+(A*21),this.width()-22,20);E.loadControl(D,B,G,F);if(G){E.selected(G)}else{E.selected(D==C)}E=null};return classUpdate()})();classCreate("oProfileListItem",cControl);var oProfileListItem=(function(){_P.property("text","");_P.property("helpText","");_P.handleEvent=function(A){switch(A.eventID){case"Load":this.focusBehavior(efbOptionAction);this.createControl("Text",oLabel,20,3,this.width()-42,16);var B=this.createControl("CheckBox",oButton,1,3,16,16);B.picture("image/default/icoradio.gif");B.focusBehavior(efbIgnoreAll);B=null;break;case"Paint":this.controls["CheckBox"].selected(this.selected())}};_P.showCheckBox=function(A){switch(A){case true:break;case false:break;default:}};_P.loadControl=function(B,A,D,C){this.tag(B);this.text(A);this.controls["Text"].text(A);this.showCheckBox(D);this.helpText(C)};return classUpdate()})();var filterStatusList={"nofilter":{ID:"nofilter",text:"statusnofilter",icon:""},"open":{ID:"open",text:"statusnoopen",icon:"icoballblueempty"},"done":{ID:"done",text:"statusnodone",icon:"icoballgreen"},"warning":{ID:"warning",text:"statuswarning",icon:"icoadvice"},"register":{ID:"register",text:"statusnoregister",icon:"icoalert"}};classCreate("oStatusList",cControl);var oStatusList=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":break;case"Item_Click":this.raiseEvent("Select",{ID:A.sender.tag()})}};_P.loadControl=function(B){var A="";this.removeControl("*");for(A in filterStatusList){this.addItem(A,B)}};_P.addItem=function(B,A){var C=this.getMaxGroupIndex("Item")+1;var D=this.createControl("Item#"+C,oStatusListItem,1,1+(C*21),this.width()-22,20);D.loadControl(B);D.selected(filterStatusList[B].ID==A);D=null};return classUpdate()})();classCreate("oStatusListItem",cControl);var oStatusListItem=(function(){_P.property("text","");_P.handleEvent=function(A){switch(A.eventID){case"Load":this.focusBehavior(efbOptionAction);this.createControl("Text",oLabel,20,3,this.width()-42,16);this.createControl("Icon",oImage,130,1,20,20);var B=this.createControl("CheckBox",oButton,1,3,16,16);B.picture("image/default/icoradio.gif");B.focusBehavior(efbIgnoreAll);B=null;break;case"Paint":this.controls["CheckBox"].selected(this.selected())}};_P.loadControl=function(A){this.tag(A);var B=filterStatusList[A];this.controls["Text"].text(langLms(B.text));this.controls["Icon"].picture("image/lms/interface/"+B.icon+".gif");B=null};return classUpdate()})();classCreate("oCourseMenu",cControl);var oCourseMenu=(function(){_P.property("roleID",0);_P.property("courseScreen",null);_P.property("collapsed",true);_P.property("indent",0);_P.property("expandedHeight",0);_P.handleEvent=function(B){switch(B.eventID){case"Load":var A=langLms("NoCourseMenu");A=replace$(A,"[USERNAME]",lms.userFullName(),true);var C=this.createControl("NoMenuItem",oLabel,0,0,this.width()-30,26,false);C.text(A);C.style(ecsTextAlign,"center");C=null;this.createControl("MenuItem",oCourseMenuItem,0,0,this.width()-30,26,false);this.layoutPosition("relative");this.style(ecsOverFlow,"hidden");this.courseMenu=null;break;case"Unload":this.courseMenu=null;break;case"MenuItem_MouseDown":if(courseOverview.find(this.roleID())){if(!courseOverview.hasChildren()){this.courseScreen.menuClick(B.sender.roleID())}else{if(B.sender.collapsed()){this.collapse()}else{this.expand()}}}break;case"MenuItem_MouseEnter":this.courseScreen.menuEnter(B.sender.roleID());break;case"MenuItem_MouseLeave":this.courseScreen.menuLeave(B.sender.roleID())}};_P.loadControl=function(C,B,A){this.clearControl();this.courseScreen=C;if(!B.courses){this.controls["NoMenuItem"].visible(true)}else{this.controls["NoMenuItem"].visible(false)}showProgress=showUserProgress||lms.isAdmin();A=A||0;this.indent(A);if(!A){this.roleID(0);this.controls["MenuItem"].visible(false);this.loadChildren();this.style("overflowY","auto")}else{this.roleID(B.roleID());this.controls["MenuItem"].visible(true);this.controls["MenuItem"].loadControl(B,A)}};_P.collapse=function(){this.clearControl();this.sequenceInit("Self",300,libEasing.easeExpo,libEasing.easeExpo);this.sequenceLoad("Self","","height",this.height(),25);this.sequenceStart("Self")};_P.expand=function(){var A=this.loadChildren();this.sequenceInit("Self",300,libEasing.easeExpo,libEasing.easeExpo);this.sequenceLoad("Self","","height",this.height(),A);this.sequenceStart("Self")};_P.redraw=function(){var B=0;var A=0;var D=0;for(itemIndex=1;itemIndex<=99999;itemIndex++){var C=this.controls["ChildItems#"+itemIndex];if(!(!!C)){break}C.controls["MenuItem"].redraw();C=null}};_P.clearControl=function(){this.removeControl("ChildItems*")};_P.siblingReview=function(){var A=clone(courseOverview);if(A.moveFirst(this.roleID())){do{return true}while(A.moveNext())}return false};_P.redrawChildren=function(){var A=0;var C=0;this.clearControl();var B=this.controls["MenuItem"];C=B.height();B=null;if(courseOverview.moveFirst(this.roleID())){do{A++;var B=this.createControl("ChildItems#"+A,oCourseMenu,0,0,this.width(),C);B.loadControl(this.courseScreen,courseOverview,this.indent()+1);B=null}while(courseOverview.moveNext())}};_P.loadChildren=function(){var B=0;var A=0;var E=0;var D=this.controls["MenuItem"];E=D.height();D=null;if(courseOverview.moveFirst(this.roleID())){do{B++;var D=this.createControl("ChildItems#"+B,oCourseMenu,0,0,this.width(),E);D.loadControl(this.courseScreen,courseOverview,this.indent()+1);var C=D.mObject;A=C.offsetTop+C.offsetHeight;C=null;D=null}while(courseOverview.moveNext())}return A||25};return classUpdate()})();classCreate("oCourseMenuItem",cControl);var oCourseMenuItem=(function(){_P.property("colorFore","#000000");_P.property("indent",0);_P.property("roleID",0);_P.property("roleParentID",0);_P.property("collapsed",true,true);_P.property("review",false);_P.handleEvent=function(A){switch(A.eventID){case"Load":this.picture("image/lms/buttons/menuitem.gif");this.mouseIcon("pointer");this.width(665);this.height(25);this.layoutPosition("relative");this.focusBehavior(efbNormalAction);var B=this.createControl("lblText",oLabel,40+(this.indent()*10),3,450-(this.indent()*10),20);B.text(this.name());B.style(ecsForeColor,"#000");B=null;var B=this.createControl("imgExpander",oImage,4,4,11,11);B.visible(false);B.picture("image/lms/buttons/menuexpander.gif");B=null;var B=this.createControl("imgReview",oImage,6,2,8,20);B.visible(false);B.picture("image/lms/interface/icoalertadvice.gif");B=null;var B=this.createControl("IconMenuType",oImage,15,2,20,20);B=null;var B=this.createControl("IconMenuStatus",oImage,630,2,20,20,false);B=null;var B=this.createControl("ChildrenStatus",oMultiProgress,550,8,100,8,false);B=null;break;case"Paint":this.controls["imgExpander"].picture("image/lms/buttons/menuexpander"+(this.collapsed()?"":"_P")+".gif");this.setBackgroundPicture(false);break;case"MouseDown":this.collapsed(!this.collapsed())}};_P.loadControl=function(B,A){var C=0;this.indent(A||0);this.roleID(B.roleID());this.review(B.review());this.collapsed(true);this.controls["imgExpander"].visible(B.hasChildren());this.controls["imgReview"].visible(this.review());if(this.indent()==1){this.controls["IconMenuType"].visible(false);C=15}else{var D=this.controls["IconMenuType"];D.visible(true);D.left(28);D=null;C=40}var D=this.controls["lblText"];D.left(C+(this.indent()*10));D.width(450-(this.indent()*10));D.drawText(B.moduleName());D=null;this.controls["IconMenuType"].picture(B.courseTypeImage());if(showProgress){if((this.indent()==1)){var D=this.controls["ChildrenStatus"];D.loadControl(0,B.childStatus());D.visible(true);D=null}else{var D=this.controls["IconMenuStatus"];D.picture(B.completionImage());D.visible(true);D=null}}this.controls["lblText"].style(ecsForeColor,(B.courseState()=="unavailable"?"#777":"#000"))};_P.redraw=function(){var A=0;courseOverview.find(this.roleID());this.controls["imgExpander"].visible(courseOverview.hasChildren());this.controls["imgReview"].visible(this.review());if(this.indent()==1){this.controls["IconMenuType"].visible(false);A=15}else{var B=this.controls["IconMenuType"];B.visible(true);B.left(28);B=null;A=40}var B=this.controls["lblText"];B.left(A+(this.indent()*10));B.width(450-(this.indent()*10));B.drawText(courseOverview.moduleName());B=null;this.controls["IconMenuType"].picture(courseOverview.courseTypeImage());if(showProgress){if((this.indent()==1)){var B=this.controls["ChildrenStatus"];B.loadControl(0,courseOverview.childStatus());B.visible(true);B=null}else{var B=this.controls["IconMenuStatus"];B.picture(courseOverview.completionImage());B.visible(true);B=null}}if(!this.collapsed()){this.parent().redrawChildren()}this.picture("image/lms/buttons/menuitem.gif");this.controls["lblText"].style(ecsForeColor,(courseOverview.courseState()=="unavailable"?"#777":"#000"))};return classUpdate()})();classCreate("oLmsIconMenu",cControl);var oLmsIconMenu=(function(){_P.property("buttonIndex",0);_P.handleEvent=function(B){var A="";switch(B.eventID){case"Load":var C=this.createControl("lblHelp",oLabel,705,47,250,438);C.style(ecsFontSize,11);C.style("color",WWBlue);C.text("");C=null;break;case"Button_MouseEnter":A=B.sender.helpText();this.controls["lblHelp"].drawInnerHtml("<image src='"+B.sender.controls["Icon"].picture()+"' align=left><br />"+replace$(A,"\n","<BR />"));break;case"Button_MouseLeave":break;case"Button_Click":this.raiseEvent("Select",B.sender.tag());break;case"Hide":this.clearScreen()}};_P.clearScreen=function(){for(index=1;index<=this.buttonIndex();index++){this.controls["Button#"+index].visible(false)}this.buttonIndex(0)};_P.showButton=function(J,E,K,F,C){var D;var G=0;var A=0;var H=math.floor((this.width()-20)/160);var I=this.buttonIndex();G=I%H;A=math.floor(I/H);I+=1;D=this.controls["Button#"+I];if(!D){D=this.createControl("Button#"+I,oLmsIconMenuButton,0,0,120,55)}var B=D;B.move(20+G*160,40+A*160);B.helpText(F||J);B.update(J,E,K);B=null;this.buttonIndex(I)};return classUpdate()})();classCreate("oLmsIconMenuButton",cControl);var oLmsIconMenuButton=(function(){_P.property("helpText","");_P.handleEvent=function(A){switch(A.eventID){case"Load":this.mouseIcon("pointer");this.focusBehavior(efbDefault);this.size(160,160);var B=this.createControl("Icon",oImage,42,23,76,76);B=null;var B=this.createControl("Caption",oLabel,3,118,154,130);B.style(ecsTextAlign,"center");B=null;break;case"Paint":if(this.selected()){this.drawColorBack(colorMenuSelected)}else{if(this.mouseFocus()){this.drawColorBack(colorMenuHighlight)}else{this.drawColorBack("")}}}};_P.update=function(B,C,A){this.controls["Icon"].picture("image/lms/icons/"+C);this.controls["Caption"].text(B);this.mouseFocus(false);this.selected(false);this.tag((A!=undefined?A:B));this.visible(true)};return classUpdate()})();classCreate("oLmsOverviewMenu",cControl);var oLmsOverviewMenu=(function(){_P.property("buttonIndex",0);_P.property("focusStyle",efbDefault);_P.handleEvent=function(A){switch(A.eventID){case"Load":var B=this.createControl("ButtonFrame",oRect,0,0,this.width(),this.height());B.focusBehavior(efbClick);B.style("overflowY","scroll");B=null;break;case"Hide":this.clearScreen();break;case"Button_Select":this.raiseEvent("Select",A.params);break;case"Button_ItemMouseEnter":this.raiseEvent("ItemMouseEnter",A.params);break;case"Button_ItemMouseLeave":this.raiseEvent("ItemMouseLeave",A.params)}};_P.clearScreen=function(){var A=this.controls["ButtonFrame"];for(index=1;index<=this.buttonIndex();index++){var B=A.controls["Button#"+index];B.removeListener(this);B.visible(false);B=null}A.move(0,0,this.width(),this.height());if(A.mObject){A.mObject.scrollTop=0}this.buttonIndex(0)};_P.getSelectedItems=function(){var D=0;var B=this.controls["ButtonFrame"];var C;var A=[];do{D++;C=B.controls["Button#"+D];if(C){if(C.selected()){A.push(C.tag())}}}while(C);return A};_P.showButton=function(I,D,J,E,B){var C;var H=this.buttonIndex();var G=H;var F=this.controls["ButtonFrame"];H+=1;C=F.controls["Button#"+H];if(!C){C=F.createControl("Button#"+H,oLmsOverviewMenuButton,0,0,this.width()-24,18)}var A=C;A.move(0,G*18);A.focusBehavior(this.focusStyle());A.update(I,D,J,B);A.addListener(this);A=null;this.buttonIndex(H);return C};return classUpdate()})();classCreate("oLmsOverviewMenuButton",cControl);var oLmsOverviewMenuButton=(function(){_P.property("columns",null);_P.handleEvent=function(B){switch(B.eventID){case"Load":this.mouseIcon("pointer");this.height(18);this.setBorder(edBottom,colorMenuFontSpecial,"solid",1);var C=this.createControl("Caption",oLabel,4,2,this.width()-8,16);C=null;var C=this.createControl("imgState",oImage,4,2,16,16,false);C=null;break;case"Paint":var A="icocheck";if(this.selected()){A="icocheckfull";this.drawColorBack(colorMenuSelected)}else{if(this.mouseFocus()){this.drawColorBack(colorMenuHighlight)}else{this.drawColorBack("")}}switch(this.focusBehavior()){case efbStateAction:case efbOptionAction:this.controls["imgState"].picture("image/lms/buttons/"+A+".gif")}break;case"Click":this.raiseEvent("Select",B.sender.tag());break;case"MouseEnter":this.raiseEvent("ItemMouseEnter",B.sender.tag());break;case"MouseLeave":this.raiseEvent("ItemMouseLeave",B.sender.tag())}};_P.setColumns=function(A){this.columns=A};_P.update=function(I,H,J,D){var F=0;var G=0;var B=0;var A=null;switch(this.focusBehavior()){case efbStateAction:case efbOptionAction:var C=this.controls["imgState"];C.visible(true);C.picture("image/lms/buttons/icocheck.gif");C=null;break;default:this.controls["imgState"].visible(false)}this.selected(false);this.mouseFocus(false);this.tag((J!=undefined?J:I));this.visible(true);F=1;if(D){G=UBound(D);B=(this.width()-50)/(G+1);for(F=1;F<=G;F++){if(!this.controls["Col#"+F]){this.createControl("Col#"+F,oLabel,0,2,100,16,false)}var C=this.controls["Col#"+F];C.left(50+(B*F));C.width(B);C.text(D[F]);C.visible(true);C=null}}var E=0;var C=this.controls["Caption"];C.text(I);if(G>0){E=50+B}else{E=this.width()}switch(this.focusBehavior()){case efbStateAction:case efbOptionAction:C.left(20);E-=24;break;default:C.left(4);E-=8}C.width(E);C=null;while(true){A=this.controls["Col#"+F];if(!A){break}if(!A.visible()){break}A.visible(false);F++}};return classUpdate()})();classCreate("oLmsIconTopMenu",cControl);var oLmsIconTopMenu=(function(){_P.property("buttonIndex",0);_P.property("helpTextActive","");_P.handleEvent=function(C){var B="";var A="";switch(C.eventID){case"Load":this.style("textAlign","right");var D=this.createControl("lblHelp",oLabel,707,58,244,448);D.style(ecsFontSize,11);D.style(ecsForeColor,WWBlue);D.text("");D.style("textAlign","left");D=null;break;case"Button_MouseEnter":B=C.sender.helpText();this.controls["lblHelp"].drawInnerHtml(replace$(B,"\n","<BR />"));break;case"Button_MouseLeave":this.controls["lblHelp"].drawInnerHtml(replace$(this.helpTextActive(),"\n","<BR />"));break;case"Button_Click":A=LCase$(C.sender.tag().name);if(A=="mail"||A=="forum"||A=="resources"){this.helpTextActive(C.sender.helpText())}else{this.helpTextActive("")}this.raiseEvent("Select",C.sender.tag());break;case"Hide":this.clearScreen()}};_P.clearScreen=function(){for(index=1;index<=this.buttonIndex();index++){this.controls["Button#"+index].visible(false)}this.buttonIndex(0)};_P.showButton=function(B,F,A,E,D){var C;var G=this.buttonIndex();G+=1;C=this.controls["Button#"+G];if(!C){C=this.createControl("Button#"+G,oLmsIconMenuTopButton,0,0,38,38)}var H=C;H.helpText(E||B);H.update(B,F,A);H=null;this.buttonIndex(G)};return classUpdate()})();classCreate("oLmsIconMenuTopButton",cControl);var oLmsIconMenuTopButton=(function(){_P.property("helpText","");_P.handleEvent=function(A){switch(A.eventID){case"Load":this.htmlTag("img");this.layoutPosition("relative");this.mouseIcon("pointer");this.focusBehavior(efbDefault);this.style("verticalAlign","top");break;case"Paint":this.mObject.src=this.picture();break;case"MouseEnter":this.sequenceInit("TopMenu",300,libEasing.easeExpo,libEasing.easeExpo);this.sequenceLoad("TopMenu","","height",this.height(),76);this.sequenceLoad("TopMenu","","width",this.width(),76);this.sequenceStart("TopMenu");break;case"MouseLeave":this.sequenceInit("TopMenu",300,libEasing.easeExpo,libEasing.easeExpo);this.sequenceLoad("TopMenu","","height",this.height(),38);this.sequenceLoad("TopMenu","","width",this.width(),38);this.sequenceStart("TopMenu")}};_P.update=function(B,C,A){this.picture("image/lms/icons/"+C);this.tag((A!=undefined?A:B));this.selected(false);this.visible(true)};return classUpdate()})();var debugLogin=startArgument("LN");var debugPass=startArgument("LP");var backGround=null;var activeScreenName="";var lmsMain=function(){backGround=new scrBackGround("BackGround",null,0,0,1016,675);new scrOverlay("Overlay",backGround,0,0,1016,675,false);new scrOverlayWhite("OverlayWhite",backGround,0,0,1016,675,false);new oWWSlider("Slider",backGround,-772,44,800,599,false);if(dnpDemo){}else{new scrManual("scrEncyclopedia",backGround,40,40,935,600,false)}backGround.show();if(offLine==true){showScreen("demostart")}else{showScreen("logon")}};var destroy=function(){destroyScreen(backGround)};var destroyScreen=function(A){if(A!=null){A.destroy();A=null}};var logon=function(C,B,A){if(LCase$(C)=="admin"){}else{showScreen("menu")}};var screenDefs={"logon":{name:"LmsLogon",screen:scrLmsLogon,linkAs:""},"demostart":{name:"scrDemoStart",screen:scrDemoStart,linkAs:""},"demoend":{name:"scrDemoEnd",screen:scrDemoEnd,linkAs:""},"admin":{name:"LmsAdmin",screen:scrLmsAdmin,linkAs:""},"modulemenu":{name:"ModuleMenu",screen:scrModuleMenu,linkAs:""}};var frameLoad=function(A){if(inStr(A,"forumenc")){backGround.controls["scrEncyclopedia"].raiseEvent("UpdatePostCount")}};var showEncyclopediaPage=function(B){var A=new array();if(inStr(LCase$(B),"_tut_")>0){A=split$(replace$(LCase$(B),"_tut_",""),"_");for(index=0;index<=UBound(A);index++){A[index]=pad$(A[index],"0",2)}B="E"+join$(A,".")}var C=backGround.controls["scrEncyclopedia"];C.link(B);C=null;showEncyclopedia("","",false)};var showEncyclopedia=function(B,D,A){if(lmsPath.length>0){if(LCase$(lmsPath[lmsPath.length-1].typeName)=="user"){B=lmsPath[lmsPath.length-1].ID}}var C=backGround.controls["OverlayWhite"];C.style("zIndex",1000);C.focusBehavior(efbIgnoreAll);C.drawColorBack("#FFF");C.show();C=null;var C=backGround.controls["scrEncyclopedia"];C.userID(B);C.courseID(D||"");C.show();C=null;return };var handleEnc=function(D){var C=D.target||D.srcElement;var A=D.type;switch(A){case"mouseover":var B=backGround.controls["scrEncyclopedia"];B.controls["EncArticle"].raiseEvent("ShowPopup",{element:C});B=null;break;case"mouseout":var B=backGround.controls["scrEncyclopedia"];B.controls["EncArticle"].hidePopup();B=null;break;case"click":var B=backGround.controls["scrEncyclopedia"];B.controls["EncArticle"].raiseEvent("LinkClick",{element:C});B=null}return false};var showScreen=function(C,G,F){var D=false;var E;var H;var I;if((dnpDemo==true)&&LCase$(C)=="menu"){C="demo"}switch(LCase$(C)){case"enc":break;case"dnp":if(dnpDemo==false){D=true}break;case"wpo":D=true;break;case"tut":D=true;break;case"caselesson":D=true;break;case"pretest":D=true;break;case"testexam":D=true;break;case"exam":D=false}var A=backGround.controls["Slider"];var B=screenDefs[LCase$(C)];if(!!B){H=backGround.controls[activeScreenName];if(H){if(H.redraw){H.hide()}else{H.destroy()}}H=null;activeScreenName=B.name;if(G&&!isEmptyString(B.linkAs)){G=B.linkAs+":"+G}H=backGround.controls[activeScreenName]||new B.screen(activeScreenName,backGround,0,0,1016,675,false);if(H!=null){if(D==true){A.show();A.slide(false);A.style("zIndex",1000)}else{A.hide()}if(!isEmptyString(G)){H.link(G)}if(H.redraw){H.visible(true);H.redraw()}else{H.show()}}}};classCreate("scrBackGround",cControl);var scrBackGround=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":this.style("fontSize",styleFont.fontSize);this.style("fontFamily",styleFont.fontFamily);this.style(ecsOverFlow,"hidden");this.focusBehavior(efbResize);break;case"Show":this.centerScreen();break;case"Resize":this.centerScreen()}};_P.centerScreen=function(){var B=document.body.clientWidth;var A=document.body.clientHeight;var D=(B-1016)/2;if(D<0){D=0}var C=(A-675)/2;if(C<0){C=0}this.move(D,C)};return classUpdate()})();classCreate("scrOverlayWhite",cControl);var scrOverlayWhite=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":this.visible(false);this.focusBehavior(efbIgnoreAll);this.style("zIndex",1000);break;case"Show":this.drawColorBack("#FFF")}};return classUpdate()})();classCreate("scrOverlay",cControl);var scrOverlay=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":this.visible(false);this.focusBehavior(efbClick);this.style("zIndex",800);break;case"Show":this.opacity(5);this.drawColorBack("black")}};return classUpdate()})();var makeImageName=function(A,B){A=replace$(A,"\\\\","/");A=trim$(pathGetFile(A));if(A!=""){switch(UCase$(B)){case"BGGAME":A="image/game/bg/"+A+".gif";break;case"FLASH":A="anim/"+A+".swf";break;case"TB":A="image/app_n/tutvd_43x36/"+A+".gif";break;case"TBVIDEO":A="image/interface/thumbvideo.gif";break;case"TUTS":A="image/app_n/tutvl_207x169/"+A+".jpg";break;case"EXAM":A="image/app_n/tex_208x170/"+A+".jpg";break;case"EXAM2":A="image/app_n/tex_255x208/"+A+".jpg";break;case"TUTL":A="image/app_n/tutvd_305x250/"+A+".jpg";break;case"DNP":A="image/app_n/dnp_227x186/"+A+".jpg";break;case"DNPZOOM":A="image/app_n/dnp_586x480/"+A+".jpg";break;case"CAS":A="image/app_n/cas_227x186/"+A+".jpg";break;case"CASZOOM":A="image/app_n/cas_586x480/"+A+".jpg";break;default:A="image/app_n/"+A+".jpg"}}else{switch(UCase$(B)){case"TB":A="image/interface/thumbneutral.gif";break;case"TBVIDEO":A="image/interface/thumbvideo.gif"}}return A};var getIconName=function(B,C){var A="";switch(LCase$(B)){case"open":A="icoBallBlueEmpty";break;case"started":A="icoBallBlueHalf";break;case"incomplete":A="icoBallBlueHalf";break;case"completed":A="icoBallGreen";break;case"passed":A="icoBallGreen";break;case"failed":A="icoBallRed"}if(LCase$(C)=="small"){A+="_sm"}if(A!=""){A="image/interface/"+A+".gif"}return A};classCreate("oWWSlider",cControl);var oWWSlider=(function(){_P.property("visibleIndex",0);_P.property("showLarge",false);_P.property("ignoreSlideBack",false);_P.property("sellerNr",1);_P.property("score",0);_P.handleEvent=function(B){switch(B.eventID){case"Load":var A;this.width(800);this.height(599);this.picture("image/interface/tabgroot.gif");this.style("fontSize","12");var C=this.createControl("SlideOut",oButton,776,0,26,73);C.picture("image/buttons/tabSlideOut.gif");C=null;var C=this.createControl("SlideIn",oButton,776,0,26,73);C.picture("image/buttons/tabSlideIn.gif");C=null;var C=this.createControl("MenuHome",oEncButton,469,77,299,25);C.text(langLms("MainMenuUp"));C.style("color","#ffffff");C.picture("image/buttons/tabHome.gif");C.style("fontWeight","bold");C.style("fontSize","12");C.leftAlign(32);C=null;var C=this.createControl("lblScore",oLabel,35,162,760,90,false);C.style("fontSize","12");C.text("<B>Aantal punten</B>");C=null;var C=this.createControl("valScore",oLabel,213,162,760,90,false);C.style("fontSize","12");C.text("");C=null;var C=this.createControl("lblEmoMeter",oLabel,35,184,760,90,false);C.style("fontSize","12");C.text("<B>Emotie klant</B>");C=null;var C=this.createControl("imgEmoMeter",oImage,213,184,263,28,false);C.picture("image/interface/DnpEmometer.gif");C=null;var C=this.createControl("EmoPointer",oImage,213+100,184,18,18,false);C.picture("image/interface/DnpEmoPointer.gif");C=null;for(A=1;A<=15;A++){var C=this.createControl("SliderMenu#"+A,oEncButton,469,122+(A*20),291,20);C.picture("image/buttons/sliderMenu.gif");C.focusBehavior(efbOptionAction);C.visible(false);C=null}var C=this.createControl("Html",oHtml,7,142,760,340);C.visible(false);C=null;var C=this.createControl("lblStart",oLabel,7,489,500,90,false);C.style("fontSize","12");C.text("Klik op de verkoopadviseur naar je keuze om te beginnen.");C=null;var C=this.createControl("ChoiceMale",oButton,540,489,103,103);C.picture("image/game/keuze_m.gif");C=null;var C=this.createControl("ChoiceFemale",oButton,650,489,103,103);C.picture("image/game/keuze_v.gif");C=null;break;case"ChoiceMale_Click":this.clearFooter();this.sellerNr(1);this.slide();break;case"ChoiceFemale_Click":this.clearFooter();this.sellerNr(2);this.slide();break;case"Show":this.controls["SlideIn"].visible(true);this.controls["SlideOut"].visible(false);this.left(-777);this.drawPicture(this.picture());this.clearMenu();break;case"SlideIn_Click":this.slide();break;case"Overlay_Click":case"SlideOut_Click":if(this.ignoreSlideBack()!=true){this.slide();this.clearFooter()}break;case"MenuHome_Click":this.slide(false,true);this.raiseEvent("Home");showScreen("Admin");break;case"Hide":if(backGround.controls["Overlay"]){backGround.controls["Overlay"].hide()}break;case"SliderMenu_Click":for(A=1;A<=15;A++){if(A!=B.sender.groupIndex()){this.controls["SliderMenu#"+A].selected(false)}}this.raiseEvent("Select",B.sender.groupIndex());this.slide(false)}};_P.clearMenu=function(){var A;this.ignoreSlideBack(false);for(A=1;A<=15;A++){this.controls["SliderMenu#"+A].visible(false)}this.visibleIndex(0);this.controls["Html"].visible(false);this.clearFooter()};_P.clearFooter=function(){this.controls["lblStart"].visible(false);this.controls["ChoiceMale"].visible(false);this.controls["ChoiceFemale"].visible(false);this.controls["lblScore"].visible(false);this.controls["valScore"].visible(false);this.controls["lblEmoMeter"].visible(false);this.controls["imgEmoMeter"].visible(false);this.controls["EmoPointer"].visible(false)};_P.showHtmlSmall=function(A,B){};_P.showHtml=function(B,E,D,A){this.showLarge(true);this.clearFooter();var C=this.controls["Html"];C.visible(true);C.move(7,142,760,340);C.showPage(B);C=null;this.showButton(E);if(LCase$(E)=="score"){this.controls["lblScore"].visible(true);var C=this.controls["valScore"];if(D!=undefined){C.text(D);C.visible(true)}C=null;if(A!=undefined){this.controls["lblEmoMeter"].visible(true);this.controls["EmoPointer"].left(this.controls["imgEmoMeter"].left()+123+A);this.controls["imgEmoMeter"].visible(true);this.controls["EmoPointer"].visible(true)}}};_P.showButton=function(B){switch(LCase$(B)){case"start":this.controls["lblStart"].visible(true);this.controls["ChoiceMale"].visible(true);this.controls["ChoiceFemale"].visible(true);var A=this.controls["Html"];A.top(136);A.height(352);A=null;break;case"score":var A=this.controls["Html"];A.top(222);A.height(360);A=null}};_P.showMenuItem=function(F,C,D,A){var B;this.clearFooter();this.showLarge(false);B=this.visibleIndex();if(B>=15){return }B+=1;this.visibleIndex(B);var E=this.controls["SliderMenu#"+B];E.link(D);E.text(F);E.icon((A?"passed":(C?"started":"open")));E.selected(C);E.visible(true);E=null};_P.slide=function(B,A){if(B==undefined){B=this.left()==-777}if((B==false)){if(this.left()==-777){return }this.left(-777);backGround.controls["Overlay"].hide()}else{var C=backGround.controls["Overlay"];C.show();C.addListener(this);C=null;if(this.showLarge()){this.controls["MenuHome"].left(7);if(this.left()==0){return }this.left(0)}else{this.controls["MenuHome"].left(469);if(this.left()==-462){return }this.left(-462)}}this.controls["SlideIn"].visible(!B);this.controls["SlideOut"].visible(B);if(!A){this.raiseEvent("Slide",{slideIn:B})}};return classUpdate()})();classCreate("oWWHelpPopupLink",cControl);var oWWHelpPopupLink=(function(){_P.property("text","",true);_P.property("link","");_P.handleEvent=function(A){switch(A.eventID){case"Load":this.mouseIcon("pointer");this.style("overflow","hidden");this.focusBehavior(efbDefault);break;case"Paint":if(this.mouseFocus()){this.style(ecsTextDecoration,"underline")}else{this.style(ecsTextDecoration,"none")}this.drawText(this.text())}};_P.value=function(A){return this.text(A)};return classUpdate()})();classCreate("oWWHelpPopup",cControl);var oWWHelpPopup=(function(){_P.handleEvent=function(B){switch(B.eventID){case"Load":this.focusBehavior(efbHighLight);this.size(337,169);this.style("zIndex",500);this.picture("image/interface/popupenc.gif");this.style("color","white");var C=this.createControl("lblTitle",oLabel,10,10,307,34);C.style("fontWeight","bold");C.style("color","white");C.text("");C=null;var C=this.createControl("LinksBox",oRect,5,40,327,127);C.style(ecsOverFlow,"auto");C=null;var C=this.createControl("Close",oButton,316,4,17,18);C.picture("image/buttons/MainClose.gif");C=null;break;case"Show":this.drawPicture(this.picture());break;case"Close_Click":this.visible(false);break;case"EncLink_Click":var A=LCase$(cStr(B.sender.link()));showEncyclopediaPage(A);this.visible(false);break;case"MouseLeave":}};_P.showLinks=function(A){var B=1;var F;var D;var E="";if(isEmptyString(A)){A="Hoofdpagina encyclopedie:";this.controls["lblTitle"].text("Er zijn geen onderwerpen uit dit onderdeel opgenomen in de encyclopedie")}else{this.controls["lblTitle"].text("Klik op één van onderstaande links voor extra informatie uit de Woonencyclopedie")}F=split$(vbLf+A,vbLf);var C=this.controls["LinksBox"];for(B=1;B<=UBound(F);B++){E=F[B];if(E!=""){D=C.controls["EncLink#"+B];if(!D){D=C.createControl("EncLink#"+B,oWWHelpPopupLink,6+((B-1)%2)*154,math.floor((B-1)/2)*16,150,14);D.addListener(this)}D.text(nameFromIni$(E,":"));D.link(valueFromIni$(E,":"));D.visible(true)}}for(B=B;B<=999;B++){D=C.controls["EncLink#"+B];if(!D){break}D.visible(false)}};return classUpdate()})();var beautifyText=function(H,K){var M=split$(H,"\n");var J=0;var G=false;var A=0;var I=0;var B="";var D="";var F="";var C=false;var E=0;var L="";for(J=0;J<=M.length-1;J++){F=left$(M[J],1);L=M[J];switch(F){case"!":break;case"-":if(G){L="<LI>"+mid$(L,2)+"</LI>"}else{L="<UL><LI>"+mid$(L,2)+"</LI>";G=true}break;case"#":L=WWMarkupImage(mid$(L,2));break;case"@":L=WWMarkupLink(mid$(L,2),true)+"<BR>";break;case"|":L=replace$(L,"\\|!","<th>");L=replace$(L,"\\|","<td>");if(C){L="<tr>"+L+"</tr>"}else{L="<table><tr>"+L+"</tr>";C=true}break;default:if(G){M[J-1]=M[J-1]+"</UL>";G=false}else{L+="<BR />"}if((J==0)){if((!K)){L=styleTextHeaderOpen+L+styleTextHeaderClose}}if(C){L="</table>"+L;C=false}}posb=0;while(true){A=inStr(L,"[",A+1);if(A==0){break}B=mid$(L,A+1,1);switch(B){case"@":case"#":case"*":case"/":case"_":case"!":I=inStr(L,"]",A+1);break;default:I=0;break}if(I>0){D=mid$(L,A+2,I-A-2);switch(B){case"#":D=WWMarkupLink(D);break;case"@":D=WWMarkupLink(D);break;case"*":D="<B>"+D+"</B>";break;case"/":D="<I>"+D+"</I>";break;case"!":default:D="";break}if(D!=""){L=left$(L,A-1)+D+mid$(L,I+1)}}}M[J]=L}return M.join("")};var WWMarkupImage=function(B){var A;var C=0;var D="left";B=trim$(B);if(isEmptyString(B)){return""}A=split$(B," ");for(C=1;C<=UBound(A);C++){switch(LCase$(A[C])){case"alignleft":D="left";break;case"alignright":D="right";break;case"aligncenter":D="center"}}return"<img src='image/"+A[0]+"' align='"+D+"' />"};var WWMarkupLink=function(B){var A;if(inStr(B,"|")>0){A=nameFromIni$(B,"|");B=valueFromIni$(B,"|")}else{A=pathGetFile(B)}if(isEmptyString(trim$(B))){return""}if(LCase$(left$(B,7))!="http://"){switch(pathGetExtension(B)){case"pdf":case"doc":B=replace$(B,"\\\\","/");B=trim$(pathGetFileAndExtension(B));if(LCase$(left$(B,4))!="doc/"){B="doc/"+B}}}return"<A href='"+B+"' target='_blank'>"+A+"</A>"};classCreate("scrManual",cControl);var scrManual=(function(){_P.property("history",0);_P.property("historyIndex",0);_P.property("lockHistory",false);_P.property("link","");_P.property("topicID","");_P.property("forumEnabled",false);_P.property("userID","");_P.property("courseID","");_P.property("tabStart",0);_P.handleEvent=function(B){switch(B.eventID){case"Load":this.visible(false);this.picture("image/lms/enc/bgEnc.gif");this.style("zIndex",1300);var D=this.createControl("lblCategory",oLabel,322,71,415,22);D.text("");D.style("fontWeight","bold");D.style(ecsOverFlow,"hidden");D=null;var D=this.createControl("MainClose",oLink,847,12,80,14);D.text(langLms("ClosePopup"));D=null;var D=this.createControl("TabIndex",oButton,18,69,85,20);D.picture("image/lms/enc/btn/EncTabIndex.gif");D.focusBehavior(efbStateAction);D.selected(true);D=null;var D=this.createControl("TabFilter",oButton,103,69,104,20);D.visible(false);D.picture("image/lms/enc/btn/EncTabFilter.gif");D.focusBehavior(efbStateAction);D=null;var D=this.createControl("TabSearch",oButton,103,69,104,20);D.picture("image/lms/enc/btn/EncTabSearch.gif");D.focusBehavior(efbStateAction);D=null;var D=this.createControl("EncMenu",oEncMenu,12,102,288,485);D.filtered(false);D.style("overflowY","auto");D=null;var D=this.createControl("EncFilter",oEncMenu,12,102,288,480);D.filtered(true);D.style("overflowY","auto");D=null;this.createControl("EncSearch",oEncSearch,12,102,288,480);var D=this.createControl("EncArticle",oEncArticle,318,102,611,485);D.style("overflowY","auto");D=null;var D=this.createControl("EncForum",scrEncForum,318,345,611,242,false);D.style("overflowY","auto");D=null;var D=this.createControl("Forum",oLink,740,71,94,18);D.text(langLms("ForumComment"));D.visible(false);D=null;var D=this.createControl("HistoryBack",oButton,842,69,40,18);D.picture("image/lms/enc/btn/EncBack.gif");D.enabled(false);D=null;var D=this.createControl("HistoryForward",oButton,886,69,40,18);D.picture("image/lms/enc/btn/Encfw.gif");D.enabled(false);D=null;var D=backGround.createControl("PopupLink",oEncPopup,600,500,337,168);D.visible(false);D.style(ecsZOrder,"2000");D=null;break;case"Show":this.historyClear();this.drawPicture(this.picture());var D=backGround.controls["PopupLink"];D.setBorder(edAll,"#000","solid",1);D=null;var D=this.controls["Forum"];D.colorFore("#000");D.style(ecsTextAlign,"right");D.style(ecsFontWeight,"bold");D=null;var D=this.controls["MainClose"];D.colorFore("#FFFFFF");D.style(ecsTextAlign,"right");D.style(ecsFontWeight,"bold");D=null;var D=this.controls["EncMenu"];D.profileRoles([]);D.reviewRoles([]);D=null;var D=this.controls["EncFilter"];D.profileRoles([]);D.reviewRoles([]);D=null;this.loadManual();var C=false;var D=this.controls["EncFilter"];C=this.inProfile(D.profileRoles());D=null;var D=this.controls["TabFilter"];D.visible(C);D=null;var D=this.controls["TabSearch"];if(C){D.left(188)}else{D.left(103)}D=null;if(this.tabStart()>0&&C){this.raiseEvent("TabFilter_Click")}else{this.raiseEvent("TabIndex_Click")}this.tabStart(0);break;case"Hide":this.controls["EncMenu"].currentPage("");this.controls["EncFilter"].currentPage("");this.controls["EncForum"].hide();backGround.controls["LmsAdmin"].redraw();break;case"EncMenu_Select":this.showPage(B.params);break;case"EncFilter_Select":this.showPage(B.params);break;case"EncSearch_Select":this.showPage(B.params);break;case"EncArticle_Select":this.tabClicked("TabIndex",true);this.controls["EncMenu"].drawScreen(B.params.link);break;case"TabIndex_Click":this.tabClicked("TabIndex");break;case"TabFilter_Click":this.tabClicked("TabFilter");break;case"TabSearch_Click":this.tabClicked("TabSearch");break;case"MainClose_Click":this.hide();backGround.controls["OverlayWhite"].hide();break;case"Forum_Click":this.toggleForum();break;case"HistoryForward_Click":this.lockHistory(true);var A=this.historyGet(true);this.controls["EncMenu"].drawScreen(A);this.lockHistory(false);break;case"HistoryBack_Click":this.lockHistory(true);var A=this.historyGet();this.controls["EncMenu"].drawScreen(A);this.lockHistory(false);break;case"UpdatePostCount":this.updateForumButton()}};_P.toggleForum=function(){if(this.forumEnabled()){this.controls["EncForum"].hide();this.controls["EncArticle"].height(485)}else{this.controls["EncArticle"].height(242);var A=this.controls["EncForum"];A.start();A=null}this.forumEnabled(!this.forumEnabled());this.updateForumButton()};_P.tabClicked=function(A,B){if(B==undefined){B=false}this.controls["TabIndex"].selected(A=="TabIndex");this.controls["EncMenu"].visible(A=="TabIndex");this.controls["TabFilter"].selected(A=="TabFilter");this.controls["EncFilter"].visible(A=="TabFilter");this.controls["TabSearch"].selected(A=="TabSearch");this.controls["EncSearch"].visible(A=="TabSearch");if(!isEmptyString(this.link())){if(A=="TabIndex"){this.controls["EncMenu"].currentPage(this.link())}if(A=="TabFilter"){this.controls["EncFilter"].currentPage(this.link())}this.link("")}if(!B){if(A=="TabIndex"){this.controls["EncMenu"].updateMenu()}if(A=="TabFilter"){this.controls["EncFilter"].updateMenu()}}};_P.inProfile=function(A){var B=this.manualArticles.clone();if(B.moveRoot()){if(B.moveDown()){if(B.moveDown()){do{if(roleMatch(B.get("ChildRoles"),A)){return true}}while(B.moveNext())}}}return false};_P.loadManual=function(){this.manualArticles=new dbNode(httpDebug+"enc/manual.xml");this.manualKeywords=new dbNode(httpDebug+"enc/keywords.xml");this.manualRoles=new dbNode(httpDebug+"webmanual.intern?page=manualroles&userid="+this.userID()+"&courseid="+this.courseID());var B=this.manualRoles.get("Profile");var A=this.manualRoles.get("Review");var C=this.controls["EncMenu"];if(B){C.profileRoles(split$("|"+B,"|"))}if(A){C.reviewRoles(split$("|"+A,"|"))}C=null;var C=this.controls["EncFilter"];if(B){C.profileRoles(split$("|"+B,"|"))}if(A){C.reviewRoles(split$("|"+A,"|"))}C=null};_P.showScreen=function(){this.visible(true)};_P.chapterMatch=function(D,C){var B=mid$(D,2,2);var A=mid$(C,2,2);if((B!=A)){return false}return(D!=C)};_P.cleanKeyWord=function(C){var A=0;var B=0;A=inStr(C,"(");B=inStr(C,")",B);if(A>0&&B>A){C=mid$(C,1,A-1)+mid$(C,B+1)}return trim$(C)};_P.linkKeywords=function(N,B){var I=0;var C="";var M="";var K=new array();var L={};var F=new array();var H="";var A="";var J="E09";var O="";var P="";var E=0;N=" "+N+" ";C=LCase$(cleanText(N));if(!this.manualKeywords){return }var G=this.manualKeywords.clone();O=B;if(G.moveDown()){if(G.moveLast()){do{A=G.get("Link");if(len(G.get("Title"))<=1){continue}if(!this.chapterMatch(A,O)&&!this.chapterMatch(A,J)){continue}K=split$(LCase$(G.get("Title")),",");for(E=0;E<=UBound(K);E++){M=this.cleanKeyWord(K[E]);I=inStr(C," "+M+" ");if(I>1){if(!L[M]){L[M]={name:A,chapterMatch:this.chapterMatch(A,B)};F[F.length]=M}else{if(this.chapterMatch(A,L[M].name)){if(UBound(split$(A))>UBound(split$(L[M].name))){L[M].name=A}}else{if(!L[M].chapterMatch){if(this.chapterMatch(A,B)){L[M].name=A}}}}}}}while(G.movePrev())}}G.moveUp();for(E=0;E<=UBound(F);E++){P=F[E];var D=false;A=L[P].name;if((A==B)){D=true}M=P;while(inStr(C," "+M+" ")>0){I=inStr(C," "+M+" ");if(!D){H="[url='_ENC_"+A+"' "+mid$(N,I+1,len(M))+" callback=handleEnc]"}else{H=mid$(N,I+1,len(M))}D=true;N=mid$(N,1,I)+H+mid$(N,I+len(M)+1);C=mid$(C,1,I)+string$(len(H)," ")+mid$(C,I+len(M)+1)}}return mid$(N,2)};_P.updateForumButton=function(B){var D="";var C=this.topicID();if(this.forumEnabled()||B){D=langLms("ForumComment");var A=new dbNode(httpDebug+"webmanual.intern?page=forumcount&id="+C);if(A.moveRoot()){D+=" ("+(A.get("PostCount")||"0")+")"}else{}this.controls["Forum"].text(D)}};_P.showPage=function(E){var H=E.pageTitle||"";var L=E.link||"";var O="";var I="";var F=false;var J="";var N="";var M="";var A="";var B="";var G="";var D=[];if(inStr(LCase$(L),"_tut_")>0){D=split$(replace$(LCase$(L),"_tut_",""),"_");for(index=0;index<=UBound(D);index++){D[index]=pad$(D[index],"0",2)}L="E"+join$(D,".")}if((this.forumEnabled())){this.toggleForum()}if(this.manualArticles.moveRoot()){F=false;if(this.manualArticles.find("Name",L,true)){A=this.manualArticles.get("ID");G=this.manualArticles.get("Title");this.topicID(A);this.manualArticles.moveRoot();N=split$(L,".")[0];if(this.manualArticles.find("Name",N,true)){J=this.manualArticles.get("ID");M=this.manualArticles.get("Title")||this.manualArticles.get("Name")}var C=this.controls["EncForum"];C.boardID(J);C.boardName(N);C.boardTitle(M);C.topicID(A);C.topicName(L);C.topicTitle(G);F=split$(L,".").length>0&&L!="E00";C=null}this.controls["Forum"].visible(F);this.updateForumButton(true)}var K=new dbNode(httpDebug+"webmanual.intern?page=manualarticle&id="+A);if(K.moveRoot()){if(K.moveDown()){if(K.get("Name")!="E00"){O="!!!"+this.beautifyName(K.get("Name"))+" "+K.get("Title")+vbLf}O+=K.get("Text")||"";I=K.get("RightColumn")||""}}this.controls["lblCategory"].text(E.pageTitle);var C=this.controls["EncArticle"];C.text(markupToHtml(this.linkKeywords(O,L)));C.rightColumn(markupToHtml(I));C.drawScreen();C=null;this.controls["EncArticle"].mObject.scrollTop=0;this.controls["EncArticle"].hidePopup();this.historyAdd(L)};_P.beautifyName=function(C){var B=0;var A=[];A=split$(mid$(C,2),".");for(B=0;B<=UBound(A);B++){A[B]=cVal(A[B])}return join$(A,".")};_P.historyAdd=function(A){var B=0;if(this.lockHistory()){return }if(this.history==null){this.history=new array();B=0}else{B=this.historyIndex()+1}this.historyIndex(B);if(B<this.history.length){this.history.length=B}this.history[B]=A;this.controls["HistoryForward"].enabled(B<this.history.length-1);this.controls["HistoryBack"].enabled(B>1)};_P.historyGet=function(B){var A="";var C=this.historyIndex();if((this.history==null)||(C<=0)){this.historyClear();return }if(B){if(C>=this.history.length-1){this.controls["HistoryForward"].enabled(false);return }C+=1}else{C-=1;if(C<=1){this.controls["HistoryBack"].enabled(false)}}this.controls["HistoryForward"].enabled(C<this.history.length-1);this.controls["HistoryBack"].enabled(C>1);this.historyIndex(C);return this.history[C]};_P.historyClear=function(){this.controls["HistoryBack"].enabled(false);this.history=null;this.historyIndex(0)};return classUpdate()})();classCreate("oEncMenu",cControl);var oEncMenu=(function(){_P.property("text","",true);_P.property("currentPage","E00");_P.property("pageTitle","");_P.property("filtered",false,true);_P.property("profileRoles",[]);_P.property("reviewRoles",[]);_P.handleEvent=function(B){switch(B.eventID){case"Load":var C=this.createControl("EncMenuHome",oEncButton,1,1,270,20);C.text("Start");C.style("color","#ffffff");C.picture("image/lms/enc/btn/EncMenuHome.gif");C.leftAlign(32);C=null;var C=this.createControl("EncSubMenu",oEncSubMenu,9,31,260,20);C.text("Menu Up");C.picture("image/lms/enc/btn/EncMenuSub.gif");C.style("color","#ffffff");C=null;var C=this.createControl("EncMenuDots",oImage,1,31,188,0);C.picture("image/lms/enc/EncMenuDots.gif");C=null;break;case"Show":break;case"EncMenuUp_Click":var A=B.sender.link();this.drawScreen(A);break;case"EncMenuHome_Click":this.drawScreen("");break;case"EncMenuItem_Click":var A=B.sender.link();this.drawScreen(A);break}};_P.updateMenu=function(){this.drawScreen(this.currentPage())};_P.clearMenu=function(){this.removeControl("EncMenuUp*");this.removeControl("EncMenuAlert*")};_P.drawScreen=function(I){var G=new array();var J=0;var D=0;var N=31;var H=0;var K=0;var B="E00";var O=false;var M=false;var F=false;if(isEmptyString(I)){I=B}this.currentPage(I);if(I!=B){I=B+"."+mid$(I,2)}G=split$(I,".");this.pageTitle("");if(!this.parent().manualArticles){return }var L=new dbNode();L=this.parent().manualArticles.clone();if(L.moveRoot()==false){return }if(L.moveDown()==false){return }this.clearMenu();D=0;for(J=1;J<=G.length-1;J++){K=cVal(G[J]);if(K==0){break}L.moveDown(K);if(L.childCount()>0){if(L.get("title")!=""){if(J==1){this.pageTitle(L.get("title"))}if(J==G.length-1){continue}D++;var C=this.createControl("EncMenuUp#"+D,oEncButton,1,N,270,20);C.text("Menu Up");C.picture("image/lms/enc/btn/EncMenuUp.gif");C.style("color","#ffffff");C.leftAlign(12);C.text(L.get("title"));C.link(L.get("Name"));C.top(N);C.visible(true);C.selected(false);C=null;N+=22;if(J==1){this.pageTitle(L.get("title"))}}}else{H=G[J];L.moveUp()}}N+=3;var C=this.controls["EncMenuDots"];C.visible(true);C.top(N);N+=5;C=null;if(L.eof()==false){menuName=L.get("title")}if(L.get("Name")==B){menuName=""}var C=this.controls["EncSubMenu"];if(isEmptyString(menuName)){C.visible(false)}else{C.text(menuName);C.top(N);C.mouseFocus(false);C.visible(true);C.selected(false);N+=20}C=null;J=0;if(L.moveDown()==true){do{O=false;F=false;M=false;O=roleMatch(L.get("Roles")+"|"+L.get("ChildRoles"),this.profileRoles());if(this.filtered()&&!O){continue}J=J+1;if(O){F=roleMatch(L.get("Roles"),this.reviewRoles());if(!F){M=roleMatch(L.get("ChildRoles"),this.reviewRoles())}}if(F||M){var C=this.createControl("EncMenuAlert#"+J,oImage,1,N,8,20);if(F){C.picture("image/lms/enc/icoalertmanualadvice.gif")}else{C.picture("image/lms/enc/icoalertchildadvice.gif")}C.visible(true);C=null}var A=this.controls["EncMenuItem#"+J];if(!A){A=this.createControl("EncMenuItem#"+J,oEncButton,9,N,260,20);var C=A;C.picture("image/lms/enc/btn/EncMenu.gif");C.focusBehavior(efbOptionAction);C.mouseFocus(false);C=null}var C=A;C.text(L.get("title"));C.link(L.get("Name"));C.top(N);C.selected(J==H);C.visible(true);C=null;N+=20}while(L.moveNext()==true)}for(ctrlIndex=J+1;ctrlIndex<=999;ctrlIndex++){A=this.controls["EncMenuItem#"+ctrlIndex];if(!A){break}A.visible(false)}L.moveRoot();var E=new object();E.link="";E.pageTitle=this.pageTitle();if(L.find("Name",this.currentPage(),true)){E.link=L.get("Name")}this.raiseEvent("Select",E);E=null};return classUpdate()})();classCreate("oEncButton",cControl);var oEncButton=(function(){_P.property("text","",true);_P.property("internalName","");_P.property("leftAlign",4,true);_P.property("icon","");_P.property("link","");_P.handleEvent=function(A){switch(A.eventID){case"Load":this.mouseIcon("pointer");var B=this.createControl("Label",oLabel,this.leftAlign(),4,0,14);B.text(this.name());B.style("overflow","hidden");B=null;var B=this.createControl("Icon",oImage,this.width()-20,0,14,14);B.visible(false);B=null;this.focusBehavior(efbNormalAction);break;case"Show":var B=this.controls["Label"];B.left(this.leftAlign());B.width(this.width()-this.leftAlign()-2);B=null;break;case"Hide":break;case"Unload":break;case"Click":break;case"Paint":var B=this.controls["Label"];B.left(this.leftAlign());B.width(this.width()-this.leftAlign()-2);B.drawText(this.text());B=null;this.setBackgroundPicture();var B=this.controls["Icon"];if(this.icon()==""){B.visible(false)}else{B.picture(getIconName(this.icon(),"small"));B.visible(true)}B=null;break}};return classUpdate()})();classCreate("oEncSubMenu",cControl);var oEncSubMenu=(function(){_P.property("text","",true);_P.property("leftAlign",4,true);_P.property("internalName","");_P.property("link","");_P.handleEvent=function(A){switch(A.eventID){case"Load":this.picture("interfaceEncMenuSub.gif");var B=this.createControl("Label",oLabel,this.leftAlign(),4,170,14);B.text(this.name());B.style("overflow","hidden");B=null;break;case"Show":this.controls["Label"].left(this.leftAlign());break;case"Paint":this.controls["Label"].drawText(this.text());this.drawPicture(this.picture());break}};return classUpdate()})();classCreate("oEncSearch",cControl);var oEncSearch=(function(){_P.property("text","",true);_P.property("searchCount",0,true);_P.property("timerCount",0);_P.handleEvent=function(A){switch(A.eventID){case"Load":var B=this.createControl("SearchText",oText,1,1,this.width()-20,22);B=null;var B=this.createControl("lblFound",oLabel,1,23,this.width()-20,16);B.text("");B.style("color","green");B=null;var B=this.createControl("lblResults",oEncSearchResult,1,40,this.width()-20,this.height()-48);B.style("overflowY","auto");B=null;break;case"Show":this.drawScreen();break;case"lblResults_Select":this.raiseEvent("Select",{"link":A.params.link});break;case"SearchText_KeyUp":this.timerCount(0);this.timerStart("ShowResults",100);break;case"Timer_ShowResults":this.timerCount(this.timerCount()+1);if(this.timerCount()>=4){this.drawScreen();this.timerStop("ShowResults");this.timerCount(0)}break}};_P.drawScreen=function(){var D=LCase$(this.controls["SearchText"].value());var C=0;var B="";var A=100;if(!this.parent().manualKeywords){return }this.controls["lblResults"].clearScreen();var G=new dbNode();G=this.parent().manualKeywords;if(G.moveRoot()==true){if(G.moveDown()==true){do{var F=G.get("title");if(F==null){continue}if(inStr(LCase$(F),D)>0){C=C+1;if(C>A){break}var E=this.controls["lblResults"];E.loadControl(C,F,G.get("Link"));E=null}}while(G.moveNext()==true);G.moveUp()}}this.searchCount(C);if(C<=A){B=C+" resultaten gevonden."}else{B="Meer dan "+A+" resultaten gevonden."}this.controls["lblFound"].text(B)};return classUpdate()})();classCreate("oEncSearchResult",cControl);var oEncSearchResult=(function(){_P.property("itemCount",0);_P.handleEvent=function(A){switch(A.eventID){case"Load":break;case"EncMenuItem_Click":for(index=1;index<=this.itemCount();index++){if(index!=A.sender.groupIndex()){this.controls["EncMenuItem#"+index].selected(false)}}this.raiseEvent("Select",{"link":A.sender.link()});break}};_P.clearScreen=function(){for(ctrlIndex=1;ctrlIndex<=this.itemCount();ctrlIndex++){var A=this.controls["EncMenuItem#"+ctrlIndex];if(A){A.visible(false)}}this.itemCount(0);this.mObject.scrollTop=0};_P.loadControl=function(A,E,B){var C=this.controls["EncMenuItem#"+A];if(!C){C=this.createControl("EncMenuItem#"+A,oEncButton,9,(A-1)*20,this.width()-29,20);var D=C;D.picture("image/lms/enc/btn/EncMenu.gif");D.focusBehavior(efbOptionAction);D=null}var D=C;D.top((A-1)*20);D.text(E);D.link(B);D.selected(false);D.visible(true);D=null;this.itemCount(A)};return classUpdate()})();classCreate("oEncArticle",cControl);var oEncArticle=(function(){_P.property("text","",true);_P.property("rightColumn","",true);_P.property("fullWidth",0);_P.property("fullHeight",0);_P.handleEvent=function(C){switch(C.eventID){case"Load":this.fullWidth(this.width());this.fullHeight(this.height());var F=this.createControl("ArticleText",oLabel,0,0,360,485);F.style(ecsOverFlow,"visible");F.text("");F=null;var F=this.createControl("ArticleRightColumn",oLabel,365,0,227,485);F.style(ecsOverFlow,"visible");F.text("");F=null;break;case"Show":this.drawScreen();break;case"ShowPopup":var E=C.params.element;if(E.nodeName!="A"){this.hidePopup();break}this.showPopup(E);break;case"LinkClick":this.hidePopup();var B="";var D=C.params.element;var A=inStr(LCase$(D.href),"_enc_");if(A==0){window.open(D.href);return }B=mid$(D.href,A+5);this.raiseEvent("Select",{"link":B});break}};_P.hidePopup=function(){backGround.controls["PopupLink"].visible(false)};_P.showPopup=function(M){var J=M;var I=null;var D=318+40;var B=102+40;var O=20;var N=15;var C=0;var A=0;I=J;while(LCase$(I.tagName)!="div"){C+=I.offsetLeft;A+=I.offsetTop;I=I.offsetParent}C+=I.offsetLeft;A+=I.offsetTop;var L=J.offsetWidth;var H=J.offsetHeight;var K={};var E=inStr(LCase$(J.href),"_enc_");if(E==0){return }K=this.getPopupText(mid$(J.href,E+5));var G=this;var F=backGround.controls["PopupLink"];if(C+F.width()+O>G.width()+G.mObject.scrollLeft){C+=L-F.width()}if(A+H+F.height()+N>G.fullHeight()+G.mObject.scrollTop){A-=(F.height()+N)}else{A+=(H+N)}C-=G.mObject.scrollLeft;A-=G.mObject.scrollTop;if(C<0){C=0}if(A<0){A=0}if(C>G.width()-F.width()-O){C=G.width()-F.width()-O}F.left(C+D);F.top(A+B);F.showLink(K);F.show();F=null;G=null};_P.getPopupText=function(C){var F=new dbNode();var E="";var B=400;var A=false;F=this.parent().manualArticles.clone();if(F.moveRoot()==true){if(F.find("Name",C,true)==true){var D=new dbNode(httpDebug+"webmanual.intern?page=manualarticle&id="+F.get("ID"));if(D.moveRoot()){if(D.moveDown()){E=mid$(" "+D.get("Text")+" ",1,B+500);E=cleanText(E,vbCrLf);if(E.length>B){E=mid$(E,2,B)+" ...";A=true}}}}}return{link:C,text:E,more:A}};_P.drawScreen=function(){var A=this.controls["ArticleText"];if(isEmptyString(this.rightColumn())){A.width(365+227)}else{A.width(360)}A.drawInnerHtml(this.text());A=null;var A=this.controls["ArticleRightColumn"];if(isEmptyString(this.rightColumn())){A.width(0)}else{A.width(227)}A.drawInnerHtml(this.rightColumn());A=null};return classUpdate()})();classCreate("oEncPopup",cControl);var oEncPopup=(function(){_P.property("link","");_P.handleEvent=function(A){switch(A.eventID){case"Load":this.visible(false);this.focusBehavior(efbDefault);this.mouseIcon("default");this.picture("image/lms/enc/popupEnc.gif");this.style("color","white");var B=this.createControl("lblText",oLabel,10,10,317,128);B.text("");B=null;var B=this.createControl("lblMore",oLabel,10,145,217,20);B.text("Klik link voor meer.");B.visible(false);B=null;break;case"Show":this.drawPicture(this.picture());this.setBorder(edAll,"#FFF","solid",0);break;case"MouseEnter":this.hide();break;case"Close_Click":break}};_P.showLink=function(A){this.link(A.link);this.controls["lblText"].text(A.text);this.controls["lblMore"].visible(A.more)};return classUpdate()})();var cleanBBTag=function(C,B,E){var A=0;var D=0;do{A=inStr(C,B);D=inStr(C,E,A);if(A>0&&D>A){C=mid$(C,1,A-1)+string$(D-A+len(E)," ")+mid$(C,D+len(E))}}while(A>0&&D>0);return C};var cleanText=function(D,B){var C=D;if(B==undefined){B=",.;:<>?()"+vbCrLf}var A=0;var F=0;var E=0;F=inStr(C,"!!!");E=inStr(C,vbLf,F);if((F>0&&E>F)){C=mid$(C,1,F-1)+string$(E-F," ")+mid$(C,E)}C=cleanBBTag(C,"[color","[/color]");C=cleanBBTag(C,"[","]");if(len(B)>0){F=1;do{do{C=replace$(C,mid$(B,F,1)," ",true)}while(inStr(C,mid$(B,F,1))>0);F+=1}while(F<=len(B))}return C};classCreate("scrEncForum",cControl);var scrEncForum=(function(){_P.property("boardID","");_P.property("boardName","");_P.property("boardTitle","");_P.property("topicID","");_P.property("topicName","");_P.property("topicTitle","");_P.handleEvent=function(A){switch(A.eventID){case"Load":break;case"Show":this.createControl("frameForum",oHtml,0,0,this.width(),this.height(),true);break;case"Hide":this.removeControl("frameForum")}};_P.start=function(A){var C="";if(A==undefined){A=this.boardName()}this.show();if(right$(A,1)=="/"){A=left$(A,len(A)-1)}var B=this.controls["frameForum"];C=httpDebug+"forumenc.htm?start="+escape(A)+"&boardid="+escape(this.boardID())+"&boardtitle="+escape(this.boardTitle());if(!isEmptyString(this.topicName())){C+="&topicid="+this.topicID()+"&topicname="+escape(this.topicName())+"&topictitle="+escape(this.topicTitle())}B.showPage(C);B.visible(true);B=null};return classUpdate()})();var roleMatch=function(D,A){var C=0;var B=false;if((D)){for(C=1;C<=UBound(A);C++){if(A[C]!=""){if(inStr("|"+D+"|","|"+A[C]+"|")>0){return true}}}}return false};classCreate("timeLog",null);timeLog=(function(){var A=new array();_P.start=function(B){if(!A[B]){A[B]={start:0,diff:0}}A[B].start=new date().getTime()};_P.stop=function(B){if(!A[B]){A[B]={start:0,diff:0}}A[B].diff+=new date().getTime()-A[B].start};_P.log=function(){var B="";for(key in A){B+=key+" : "+A[key].diff+vbLf}return B};_P.clear=function(B){if(B!=undefined){A[B].diff=0}else{A=new array()}};return classUpdate()})();var emitNormal=0;var emitHasChildren=1;var emitLine=2;var emitText=3;var emitHeader=4;var emitCheck=5;classCreate("oPopupMenuItem",cControl);var oPopupMenuItem=(function(){_P.property("value",false);_P.property("menuItemType",emitNormal);_P.property("text","","this.setText(value)");_P.property("colorFore","","this.controls['Caption'].style(ecsForeColor, value)");_P.handleEvent=function(A){switch(A.eventID){case"Load":this.focusBehavior(efbDefault);var B=this.createControl("Bottom",oRect,0,0,this.width(),this.height());B=null;var B=this.createControl("Caption",oLabel,2,2,this.width()-4,this.height());B.style(ecsOverFlow,"hidden");B.style(ecsForeColor,"#FFF");B.style(ecsTextAlign,"Left");B=null;var B=this.createControl("Special",oImage,0,2,18,14,false);B=null;break;case"Show":var B=this.controls["Bottom"];B.drawColorBack("#000");B.opacity("60");B=null;break;case"Paint":var B=this.controls["Bottom"];if(this.mouseFocus()){B.drawColorBack("#222")}else{B.drawColorBack("#000")}B=null;this.controls["Caption"].width(this.width()-4);this.controls["Special"].left(this.width()-18)}};_P.loadItem=function(H,D,A,F){var E=4;var C="";var B=efbDefault;this.value(F);this.tag(A);this.menuItemType(D);switch(this.menuItemType()){case emitHasChildren:E+=20;C="arrow.gif";break;case emitCheck:E+=20;C="icocheck.gif";break;case emitText:B=efbClick;break;case emitHeader:B=efbClick;this.controls["Caption"].style(ecsFontWeight,"bold");break;case emitLine:B=efbClick;this.controls["Caption"].visible(false);this.height(10);break;default:}var G=this.controls["Caption"];G.width("");G.text(H);E+=G.width();this.focusBehavior(B);G=null;var G=this.controls["Special"];if(C!=""){G.picture("image/default/"+C);G.visible(true)}else{G.visible(false)}G=null;this.width(E)};return classUpdate()})();classCreate("oPopupMenuPanel",cControl);var oPopupMenuPanel=(function(){_P.property("colorFore","","this.mObject.style(ecsForeColor, value)");_P.property("itemCount",0);_P.property("minWidth",30);_P.property("minHeight",10);_P.handleEvent=function(A){switch(A.eventID){case"Load":this.style(ecsOverFlow,"hidden");var B=this.createControl("Bottom",oRect,0,0,this.width(),this.height());B=null;break;case"Show":this.minWidth(0);this.minHeight(0);this.size(0,0);var B=this.controls["Bottom"];B.drawColorBack("#000");B.opacity("60");B=null;break;case"Item_MouseEnter":this.raiseEvent("ShowChildren",A.sender);break;case"Item_MouseDown":this.raiseEvent("Select",A.sender);break;case"Hide":this.clear()}};_P.loadItem=function(H,B,A,D){var F=this.itemCount();var G=0;var C=0;F+=1;var E=this.createControl("Item#"+F,oPopupMenuItem,2,2+((F-1)*18),700,18);E.loadItem(H,B,A,D);C=E.top()+E.height();G=E.left()+E.width();E=null;if(C>this.minHeight()){this.minHeight(C+4)}if(G>this.minWidth()){this.minWidth(G+4)}this.itemCount(F)};_P.place=function(B){var A=0;for(A=1;A<=this.itemCount();A++){var C=this.controls["Item#"+A];C.width(this.minWidth()-C.left());C.setDirty();C=null}B=calcPopupPlacement(this.minWidth(),this.minHeight(),(this.groupIndex()==0?-1:0),B,this.parent().getRect());this.move(B.left,B.top,B.width,B.height);this.controls["Bottom"].move(0,0,B.width,B.height)};_P.clear=function(){this.removeControl("*")};return classUpdate()})();var calcPopupPlacement=function(E,B,D,C,F){var A={};A.width=E;A.height=B;if(D>=0){A.left=C.left+C.width;if(A.left+E>F.width){if(E<rect.left){A.left=rect.left-E}else{A.left=F.width-E}}A.top=C.top-D;if(A.top+B>F.height){A.top=C.top+C.height-B;if(A.top<0){A.top=0}}}else{A.left=C.left;A.top=C.top-C.height;if(A.top+B>F.height){A.top=C.top-B}}return A};classCreate("oPopupMenu",cControl);var oPopupMenu=(function(){_P.property("levelCount",0);_P.property("showing",false);_P.property("colorFore","","this.mObject.style(ecsForeColor, value)");_P.handleEvent=function(C){switch(C.eventID){case"Load":this.visible(false);this.focusBehavior(efbClick);break;case"Show":break;case"MouseDown":this.hide();break;case"Panel_ShowChildren":this.clearLevels(C.sender.groupIndex()+1);switch(C.params.menuItemType()){case emitHasChildren:var B=C.params.getRect();B.left+=C.sender.left();B.top+=C.sender.top();this.loadPanel(C.sender.parent().groupIndex()+1,C.params.text(),C.params.tag(),B)}break;case"Panel_Select":var D={text:C.params.text(),tag:C.params.tag()};var A="";switch(C.params.menuItemType()){case emitNormal:this.raiseEvent("Select",D);this.hide();break;case emitHasChildren:this.loadPanel(this.groupIndex()+1,D.text,D.tag,this.getRect());break;case emitCheck:D.value=C.sender.value();this.raiseEvent("SetValue",D)}break;case"Hide":this.showing(false);this.clearLevels(0)}};_P.clearLevels=function(B){var A=0;if(B<=this.levelCount()){for(A=this.levelCount();A>=B;A-=1){this.removeControl("Panel#"+A)}this.levelCount(B)}};_P.showPopup=function(A){this.startRect=A;this.show();this.loadPanel(0,"Root","Root");this.showing(true)};_P.loadPanel=function(D,B,A,C){var C=C||this.startRect;this.clearLevels(D);this.levelCount(D);this.createControl("Panel#"+D,oPopupMenuPanel,10,10,500,100);this.raiseEvent("Expand",{level:D,caption:B,tag:A});this.controls["Panel#"+D].place(C)};_P.addItem=function(B,C,A,D){this.controls["Panel#"+this.levelCount()].loadItem(B,C,A,D)};return classUpdate()})();var examMpcButtonCount=6;var examMppButtonCount=3;var totalPages=50;var setShowTimer=false;var setShowFeedback=false;var setUserCanView=false;var setAddSkipAnswerOption=false;var setRandomizeQuestionOrder=true;var setAutoMoveNext=true;var isAssessment=false;var feedbackHeaderCorrect="Correct";var feedbackHeaderWrong="Wrong";var colorMpcBack="";var colorMpcBack_H="#FFF";var colorMpcBack_P="#FFF";var colorMpcBack_D="#CCC";var colorMpcFore="#000000";var colorMpcFore_H="#000000";var colorMpcFore_P="#000000";var colorMpcFore_D="#000000";var getCourseGetTypeName=function(A){switch(LCase$(A)){case"assessment":return"Assessment";break;case"evaluation":return"Evaluation";break;case"questionnaire":return"Questionnaire";break;case"exam":case"testexam":return"Exam";break;case"enc":return"Encyclopedia";break;case"selftest":return"SelfTest";break;default:return"Course"}};var courseGenSetSettings=function(D,B){var C={"exam":[true,false,false,false,true,false,false],"testexam":[true,false,true,false,true,false,false],"course":[false,true,true,false,true,false,false],"scan":[true,false,false,true,true,false,false],"evaluation":[false,false,true,false,false,false,false],"assessment":[false,false,true,false,false,false,true],"selftest":[false,false,false,false,true,true,false]};D=replace$(LCase$(D),"coursegen","");var A=C[D];if(!A){A=C["course"]}setShowTimer=A[0];setShowFeedback=A[1];setUserCanView=A[2];setAddSkipAnswerOption=A[3];setRandomizeQuestionOrder=A[4];setAutoMoveNext=A[5];isAssessment=A[6]};var loadPageData=function(A){var J={ID:cVal(A.get("ID")),name:A.get("Name"),type:"text",fixedOrder:false,text:A.get("Text"),answers:[],feedback:A.get("Feedback"),textRight:trim$(A.get("textright"))};var B=replace$(trim$(A.get("Question")),vbCr,"");var I="";var C=0;var F=false;var E=0;var G=0;B=replace$(B,vbCr,"");if(B!=""){var H=split$(B,vbLf);if(pathIsImage(H[0])){J.type="mpp"}else{J.type="mpc"}for(_EC1 in H){I=H[_EC1];E=0;G=1;F=false;switch(left$(I,1)){case"-":F=true;break;case"+":J.fixedOrder=true;F=true;break;case"?":E=1;J.type="match";break;case"!":E=2;break;case"*":J.type="special";E=3;F=true;break;default:G=0}if(F){C+=1;J.answers[C]={text:"",correctAnswer:"",feedback:""}}var D=J.answers[C];if(F){if(mid$(I,2,1)=="X"){G=2;D.correctAnswer=true}}I=trim$(mid$(I,G+1));if(I!=""){switch(E){case 0:D.text+=I+vbLf;break;case 1:D.correctAnswer+=I+vbLf;break;case 2:D.feedback+=I+vbLf;break;case 3:D.text=I}}D=null}}return J};classCreate("moduleHistory3",null);moduleHistory3=(function(){var A=(function(){_P.property("count",0);_P.property("answerCount",0);_P.property("answers",null);_P.property("questions",null);_P.property("currentPageID",0);_P.property("objectives",null);_P.view=function(D){var C=0;var H;var E="";var B="";var I="";var G="";var F="";this.answers=new object();this.questions=[];this.answers=columnarToJson(D,{ID:0,score:"",value:""},true);for(_EC2 in this.answers){F=this.answers[_EC2];C+=1;this.questions[C]=F.ID}this.answerCount(C);this.count(UBound(this.questions));this.moveFirst()};_P.start=function(G,E){var F=0;var L=G.clone();var D={};var J="";var M;var I;var N;var K;L.moveRoot();this.answers=new object();this.questions=[];this.objectives=[];if((LCase$(lms.courseType())!="coursegenselftest")&&(!E)){if(L.moveDown()){do{F=F+1;I=L.get("ID");this.questions[F]=I;this.answers[I]={ID:I,value:"",score:"",objectiveID:0}}while(L.moveNext())}}else{E="|ID|Name|DrawCount|PassScore"+vbLf+replace$(E,";","|");E=replace$(E,vbLf,vbLf+"|");this.objectives=columnarToJson(E,{ID:0,roleID:0,name:"",drawCount:0,passScore:0,drawn:0,status:"",score:"",correctCount:0,failCount:0,skipCount:0,items:[]},true);if(L.moveDown()){do{M=L.get("Objective");if(!isEmptyString(M)){if((LCase$(lms.courseType())=="coursegenselftest")&&(!this.objectives[M])){this.objectives[M]={ID:M,roleID:M,name:"",drawCount:3,passScore:60,drawn:0,status:"",score:"",correctCount:0,failCount:0,skipCount:0,items:[]}}if(!this.objectives[M]){if(debugMode){debug.out("Objective Not found "+M+" - "+L.get("Name"))}}else{I=L.get("ID");this.objectives[M].items.push(I)}}else{if(debugMode){debug.out("Not found "+L.get("Name"))}}}while(L.moveNext())}var B=0;var C=0;for(_EC3 in this.objectives){D=this.objectives[_EC3];var H="";for(_EC4 in D.items){F=D.items[_EC4];H=H+", "+F}if((D.drawCount>0)&&(UBound(D.items)>=0)){randomizeArray(D.items);F=0;C=0;while((F<=UBound(D.items))&&(C<D.drawCount)){I=D.items[F];B+=1;this.questions[B]=I;this.answers[I]={ID:I,value:"",score:"",objectiveID:D.ID};C+=1;F+=1}if(debugMode&&(D.drawCount!=C)){debug.out("Drawn too few from "+D.name+" : "+D.drawCount+" - "+C)}}}D.drawn=C}this.answerCount(0);this.count(UBound(this.questions));this.moveFirst()};_P.moveFirst=function(){this.pageIndex=1;this.setCurrent()};_P.moveLast=function(){this.pageIndex=this.count();this.setCurrent()};_P.moveNext=function(){if(this.pageIndex<this.count()){this.pageIndex+=1;this.setCurrent();return true}};_P.movePrev=function(){if(this.pageIndex>1){this.pageIndex-=1;this.setCurrent();return true}};_P.move=function(B){if((B>0)&&(B<=this.count())){this.pageIndex=B;this.setCurrent();return true}};_P.setCurrent=function(){if((this.pageIndex>0)&&(this.pageIndex<=UBound(this.questions))){this.currentPageID(this.questions[this.pageIndex])}else{this.currentPageID(0)}};_P.saveCurrent=function(B,D){if(debugMode){debug.out("ModuleHistory.SaveCurrent - Value: "+B+", Score: "+D)}if(this.currentPageID()<=0){return }var C=this.answers[this.currentPageID()];if((C.value==null)||(C.value=="")){this.answerCount(this.answerCount()+1)}C.value=B;C.score=D;C=null};_P.getCurrentAnswer=function(){if(this.currentPageID()<=0){return }return this.answers[this.currentPageID()].value};_P.maxScore=function(){var C;var B=0;B=this.count();for(_EC5 in this.answers){C=this.answers[_EC5];if(C!=null){B-=1;B=B+cVal(C.score)/100}}return(math.round(B*100/this.count()))||1};_P.score=function(){var C;var B=0;this.updateObjectives();for(_EC6 in this.answers){C=this.answers[_EC6];if(C!=null){B=B+cVal(C.score)}}return(math.round(B/this.count()))||1};_P.answerCorrectCount=function(){var B=0;for(_EC7 in this.answers){answer=this.answers[_EC7];if((answer!=null)&&(answer.score==100)){B+=1}}return B};_P.updateObjectives=function(){var C=0;var D;var E;var B=0;for(_EC8 in this.objectives){D=this.objectives[_EC8];D.correctCount=0;D.failCount=0;D.skipCount=0}for(_EC9 in this.answers){E=this.answers[_EC9];var F=this.objectives[E.objectiveID];if((!!F)){switch(E.score){case 25:F.skipCount+=1;break;case 100:F.correctCount+=1;break;case 0:F.failCount+=1}}F=null}for(_EC10 in this.objectives){D=this.objectives[_EC10];B=D.correctCount+D.failCount+D.skipCount;if(B==0){D.status="NOT ATTEMPTED"}else{if(cVal(D.passScore)==0){if(B==cVal(D.drawn)){D.status="COMPLETED"}else{D.status="INCOMPLETE"}}else{if(D.correctCount>=cVal(D.passScore)){D.status="PASSED"}else{D.status="FAILED"}}}}};_P.resultData=function(){if(debugMode){debug.out("ModuleHistory.ResultData: "+jsonToColumnar(this.answers,["ID","Score","Value"]))}return jsonToColumnar(this.answers,["ID","Score","Value"])};_P.answeredAll=function(){return this.answerCount()>=this.count()};return classUpdate()})();return new A()})();var langCourseGen=function(B){var A=langLms(B);A=replace$(A,vbLf,"<br />");A=replace$(A,"\\[correctcount\\]",moduleHistory3.answerCorrectCount());A=replace$(A,"\\[score\\]",moduleHistory3.score());A=replace$(A,"\\[pagecount\\]",moduleHistory3.count());A=replace$(A,"\\[passscore\\]",lms.coursePassScore());A=replace$(A,"\\[duration\\]",lms.courseDuration());A=replace$(A,"\\[trycount\\]",lms.courseTryCount());A=replace$(A,"\\[tryremaining\\]",lms.courseMaxTryCount()-lms.courseTryCount());A=replace$(A,"\\[maxtrycount\\]",lms.courseMaxTryCount());return A};classCreate("oExamPageMarker2",cControl);var oExamPageMarker2=(function(){_P.property("active",false,true);_P.handleEvent=function(B){switch(B.eventID){case"Create":this.focusBehavior(efbOptionAction);var C=this.createControl("lblPageNum",oLabel,0,5,this.width(),this.height()-10);C.colorFore("#000");C.style(ecsTextAlign,"center");C=null;break;case"Show":this.controls["lblPageNum"].text(this.groupIndex());break;case"Paint":var A="pagemarker";if(this.selected()){A+="_H"}else{if(this.active()){A+="_P"}}this.drawPicture("image/lms/player/btn/"+A+".gif");break}};return classUpdate()})();classCreate("oExamPageMenu2",cControl);var oExamPageMenu2=(function(){_P.property("activePage",0);_P.property("pageCount",0);_P.handleEvent=function(B){switch(B.eventID){case"Create":var A;for(A=1;A<=(totalPages/2);A++){this.createControl("PageMarker#"+A,oExamPageMarker2,0+(A-1)*24,0,24,24,false);this.createControl("PageMarker#"+((totalPages/2)+A),oExamPageMarker2,0+(A-1)*24,24,24,24,false)}break;case"Show":break;case"PageMarker_Click":this.selectPage(B.sender.groupIndex());break}};_P.drawScreen=function(B){var A;this.activePage(0);if(B>totalPages){B=totalPages}this.pageCount(B);for(A=1;A<=B;A++){var C=this.controls["PageMarker#"+A];C.active(false);C.selected(false);C.visible(true);C=null}for(A=A+1;A<=totalPages;A++){this.controls["PageMarker#"+A].visible(false)}if(B>0){this.selectPage(1)}};_P.selectPage=function(A){var C=this.activePage();if(C==A){return }if(C>0){var B=this.controls["PageMarker#"+C];B.selected(false);B=null}if(A>totalPages){A=0}this.activePage(A);if(A>0){var B=this.controls["PageMarker#"+A];B.selected(true);B=null}this.raiseEvent("Select",A)};_P.activatePage=function(){var B=this.activePage();if(B>0){var A=this.controls["PageMarker#"+B];A.active(true);A=null}};return classUpdate()})();classCreate("oCountdownTimer",cControl);var oCountdownTimer=(function(){_P.property("timeStart",0);_P.property("countDownTime",0);_P.property("showTime",0,true);_P.property("state",0);_P.handleEvent=function(A){switch(A.eventID){case"Create":var C=this.createControl("lblTitle",oLabel,0,3,115,23);C.text(langLms("TimeLeft"));C.style(ecsFontWeight,"bold");C.style(ecsTextAlign,"right");C.focusBehavior(efbDefault);C=null;var C=this.createControl("rectTimeBack",oRect,126,0,75,20,false);C.colorBack("#EBF1F5");C.focusBehavior(efbClick);var B=C.createControl("lblText",oLabel,10,3,105,23);B.text("");B=null;C=null;break;case"lblTitle_MouseEnter":this.showTime(this.showTime()|1);break;case"lblTitle_MouseLeave":this.showTime(this.showTime()&~1);break;case"lblTitle_Click":this.showTime(this.showTime()^2);break;case"rectTimeBack_Click":this.showTime(this.showTime()&~2);break;case"Paint":this.paintTimer();break;case"Timer_Countdown":this.paintTimer();break;case"Hide":this.timerStop("Countdown")}};_P.paintTimer=function(){if(this.state()==0){return }var A=this.timeStart()+this.countDownTime()-cDate();if((A<=0)){A=0;this.state(0);this.timerStop("Countdown");this.raiseEvent("Alarm")}else{if((A<=(5*1000))&&(this.state()==2)){this.state(3);this.mShowTime=this.mShowTime|2}else{if((A<=(5*60*1000))&&(this.state()==1)){this.state(2);this.mShowTime=this.mShowTime|2}}}var C=this.showTime()>0;var B=this.controls["rectTimeBack"];B.visible(C);if(C){B.controls["lblText"].text(formatDate(new date(A),"hh:mm:ss"))}B=null};_P.startCountDown=function(A){this.state(1);this.mShowTime=0;if(this.controls["rectTimeBack"]){this.controls["rectTimeBack"].visible(false)}this.countDownTime(A*60*1000);this.timeStart(cDate().getTime());this.timerStart("Countdown",1000);this.show()};return classUpdate()})();classCreate("scrCourseGen",cControl);var scrCourseGen=(function(){_P.property("link","");_P.property("activeScreen",null);_P.property("menuNode",null);_P.property("pageCount",0);_P.property("examType","pretest");_P.property("assessmentScore",0);_P.property("assessmentExaminator","");_P.handleEvent=function(A){switch(A.eventID){case"Create":this.picture("image/lms/player/bgcourse.gif");this.style(ecsFontSize,12);var C=this.createControl("lblLessonTitle",oLabel,73,83,590,25);C=null;var C=this.createControl("lblPageTitle",oLabel,73,122,590,35);C.style("fontSize",14);C=null;var C=courseGenStyleTextLeft;var B=this.createControl("TextLeft",oLabel,55,120,430);B.move(C.left,C.top,C.width);B.style(ecsFontSize,C.fontSize);B.text("");B.autoSize(true);B=null;C=null;var C=courseGenStyleTextRight;var B=this.createControl("TextRight",oLabel,531,120,430);B.move(C.left,C.top,C.width,C.height);B.style(ecsFontSize,C.fontsize);B.text("");B.style("overflowY","auto");B=null;C=null;var C=this.createControl("Mpc",scrCourseGenMpc,20,200,590,400);C.visible(false);C=null;var C=this.createControl("Mpp",scrCourseGenMpp,20,200,820,400);C.visible(false);C=null;var C=this.createControl("Special",scrCourseGenSpecial,20,200,430,400);C.visible(false);C=null;var C=this.createControl("Feedback",oLabel,20,450,430,100);C.autoSize(true);C.visible(false);C=null;var C=this.createControl("MainPrev",oTextButton,666,599,88,22);C.picture("image/lms/player/btn/prev.gif");var B=C.controls["Caption"];B.style(ecsTextAlign,"left");B.left(26);B.style(ecsForeColor,"#000");B=null;C=null;var C=this.createControl("MainNext",oTextButton,760,599,88,22);C.picture("image/lms/player/btn/next.gif");var B=C.controls["Caption"];B.style(ecsTextAlign,"left");B.left(6);B.style(ecsForeColor,"#000");B=null;C=null;var C=this.createControl("MainDone",oTextButton,860,599,93,22);C.picture("image/lms/player/btn/done.gif");C.enabled(debugMode);C=null;this.createControl("PageMenu",oExamPageMenu2,55,599,495,48);if(!backGround.controls["popupExamIntro"]){backGround.createControl("popupExamIntro",popupExamIntro)}var C=this.createControl("Countdown",oCountdownTimer,538,122,200,25,false);C.showTime(true);C=null;this.activeScreen=null;this.menuNode=null;break;case"Show":this.controls["lblLessonTitle"].text("");this.controls["lblPageTitle"].text("");this.controls["Mpc"].visible(false);this.controls["Mpp"].visible(false);this.controls["MainPrev"].visible(false);this.controls["MainNext"].visible(false);this.drawPicture(this.picture());this.initialize();break;case"Hide":if(backGround.controls["popupExamIntro"]){var C=backGround.controls["popupExamIntro"];C.hide();C.removeListener(this);C=null}break;case"MainPrev_Click":this.mainPrev();break;case"MainNext_Click":this.mainNext();break;case"popupExamIntro_Select":this.popupButtonClick(A.params.action);break;case"Mpc_Select":this.setPageIndexState(true);break;case"Mpp_Select":this.setPageIndexState(true);break;case"Special_Change":moduleHistory3.saveCurrent(this.controls["Special"].value(),0);this.setPageIndexState(false);break;case"PageMenu_Select":this.leaveScreen();this.showPage(A.params);break;case"Countdown_Alarm":this.theEnd();break;case"MainDone_Click":if(isViewing){showDefaultMenu()}else{if(courseGenDoneAlert&&(this.examType()=="exam")){confirmBox(langCourseGen("CourseGenDoneAlert"),classBind(this,this.theEnd))}else{this.theEnd()}}break}};_P.setPageIndexState=function(A){this.controls["PageMenu"].activatePage();if(moduleHistory3.answerCount()>=moduleHistory3.count()){this.controls["MainDone"].enabled(true)}if(A&&setAutoMoveNext){this.mainNext()}};_P.popupButtonClick=function(A){switch(LCase$(A)){case"start":this.startExam(false);break;case"quit":showDefaultMenu();break;case"closepopup":window.location.reload();break;case"view":this.startExam(true);break;case"cancel":showDefaultMenu()}};_P.initialize=function(){var G="";var F="";var D="";var C="";var B="";this.controls["MainDone"].enabled(debugMode);this.examType(LCase$(nameFromIni$(this.link(),":")));this.link(valueFromIni$(this.link(),":"));this.menuNode=new dbNode(httpDebug+"webcourse.intern?page=coursexml&uid="+lms.userID()+"&courseid="+this.link());lms.courseInitialize(this.link());var A=(LCase$(lms.courseType())=="coursegenselftest");if(A){this.controls["MainDone"].enabled(true)}courseGenSetSettings(lms.courseType(),lms.courseLaunchData());isViewing=lms.viewMode()!=isAssessment;if(!isViewing){switch(LCase$(lms.courseStatus())){case"open":break;case"":break;default:if(higherOrEqual(lms.courseTryCount(),lms.courseMaxTryCount())){isViewing=true}}}if(isViewing){if(isEmptyString(lms.courseResultData())){showDefaultMenu();return }moduleHistory3.view(lms.courseResultData());if(lms.isAdmin()){C="View"}else{C="Cancel"}}else{if((setUserCanView)&&(lms.courseResultData()!="")){moduleHistory3.view(lms.courseResultData())}else{moduleHistory3.start(this.menuNode,lms.testMatrix())}C="Start"}if(C!="Cancel"){B="Cancel"}else{if(debugMode){B="Start"}}D=getCourseGetTypeName(this.examType());G=langCourseGen(this.examType());if(lms.isAdmin()!=isAssessment){D+="View"}else{switch(LCase$(lms.courseStatus())){case"failed":if(A){D+="Rewelcome"}else{D+="Failed"}break;case"completed":case"passed":if(A){D+="Rewelcome"}else{D+="Passed"}break;default:if(isViewing){D="CourseGenStartError"}else{D+="Start"}}}F=markupToHtml(langCourseGen(D),true);var E=backGround.controls["popupExamIntro"];E.showPopup(G,F,C,B);E.addListener(this);E=null};_P.startExam=function(A){this.pageCount(moduleHistory3.count());if(!A){lms.courseStart(this.link())}var B=backGround.controls["popupExamIntro"];B.hide();B.removeListener(this);B=null;this.controls["lblLessonTitle"].text(this.menuNode.get("Name"));this.controls["PageMenu"].drawScreen(this.pageCount());if(cVal(lms.courseDuration())>0&&setShowTimer){this.controls["Countdown"].startCountDown(cVal(lms.courseDuration()))}this.updatePageIndexStates()};_P.updatePageIndexStates=function(){var A=0;var C=moduleHistory3.pageIndex;for(A=1;A<=moduleHistory3.count();A++){moduleHistory3.move(A);if(!isEmptyString(moduleHistory3.getCurrentAnswer())){var B=this.controls["PageMenu"];B.selectPage(A);B.activatePage();B=null}}if(moduleHistory3.answerCount()>=moduleHistory3.count()){this.controls["MainDone"].enabled(true)}if(moduleHistory3.move(C)){this.controls["PageMenu"].selectPage(C)}};_P.mainPrev=function(){if(moduleHistory3.movePrev()){this.leaveScreen();this.controls["PageMenu"].selectPage(moduleHistory3.pageIndex)}};_P.mainNext=function(){if(moduleHistory3.moveNext()){this.leaveScreen();this.controls["PageMenu"].selectPage(moduleHistory3.pageIndex)}};_P.showPage=function(A){if(!this.menuNode){return }moduleHistory3.move(A);if(this.menuNode.moveRoot()){if(this.menuNode.findChild("id",moduleHistory3.currentPageID())){this.drawScreen()}}};_P.leaveScreen=function(){var A=this.controls["Special"];if(A.visible()){switch(LCase$(A.inputType())){case"score":this.assessmentScore(A.value());break;case"examinator":this.assessmentExaminator(A.value())}moduleHistory3.saveCurrent(this.controls["Special"].value(),0)}A=null;this.controls["TextLeft"].visible(false);this.controls["TextRight"].visible(false);this.controls["Mpc"].visible(false);this.controls["Mpp"].visible(false);this.controls["Special"].visible(false);this.controls["lblPageTitle"].visible(false)};_P.drawScreen=function(){if(this.activeScreen!=null){this.activeScreen.hide()}if(this.menuNode==null){return }var C=loadPageData(this.menuNode);var D=55;var A=8;var E=this.controls["lblPageTitle"];E.text(langLms("Page")+" "+moduleHistory3.pageIndex+" "+langLms("PageOf")+" "+moduleHistory3.count());E.visible(true);E=null;var E=this.controls["TextLeft"];E.text(markupToHtml(C.text,true));E.visible(true);D=E.top()+E.height()+16;E=null;var E=this.controls["TextRight"];E.text(markupToHtml(C.textRight));E.show();A=E.top()+E.height()+16;if(D>500&&A<300){D=E.left()}else{A=D;D=this.controls["TextLeft"].left()}E=null;this.controls["MainPrev"].visible(true);this.controls["MainNext"].visible(true);var B={"mpc":"Mpc","special":"Special","mpp":"Mpp"}[C.type];this.activeScreen=this.controls[B];var E=this.activeScreen;if((!!E)){E.move(D,A+40);E.show();E.loadData(C)}E=null};_P.theEnd=function(){var G=0;var F="";var E="";var C="";var B="";var A="";if(lms.courseType()=="coursegenexam"){B="ClosePopup"}else{B="Quit"}this.leaveScreen();G=moduleHistory3.score();if(!isViewing){lms.interactions=null;lms.courseResultData(moduleHistory3.resultData());switch(this.examType()){case"assessment":G=this.assessmentScore()||G;lms.examinator(this.assessmentExaminator())}C=getCourseGetTypeName(this.examType());lms.objectives=moduleHistory3.objectives;lms.courseStop(this.link(),G,"");switch(LCase$(lms.courseStatus())){case"failed":C+="Failed";break;default:C+="Passed"}E=markupToHtml(langCourseGen(C),true)}F=langCourseGen(this.examType());if(!isEmptyString(E)){var D=backGround.controls["popupExamIntro"];D.showPopup(F,E,B,A);D.addListener(this);D=null}else{showDefaultMenu()}};return classUpdate()})();var showFeedback=function(C,A){var B="";if(C==null){}else{if(C){B=feedbackHeaderCorrect}else{B=feedbackHeaderWrong}A=markupToHtml(A,true)}};var showFeedbackCheckButton=function(){};classCreate("scrCourseGenSpecial",cControl);var scrCourseGenSpecial=(function(){_P.property("inputType","");_P.handleEvent=function(A){switch(A.eventID){case"Create":this.createControl("Edit",oText,8,95,270,20);break;case"Edit_KeyUp":this.raiseEvent("Change");break;case"Show":}};_P.loadData=function(A){if(!A.answers[1]){return }switch(LCase$(A.answers[1].text)){case"score":this.inputType("score");break;case"examinator":this.inputType("examinator")}this.controls["Edit"].value(moduleHistory3.getCurrentAnswer())};_P.value=function(A){if(A!=undefined){}return this.controls["Edit"].value()};return classUpdate()})();classCreate("scrCourseGenMpc",cControl);var scrCourseGenMpc=(function(){_P.property("ID",0);_P.property("answer",0);_P.property("correctAnswer",-1);_P.property("score",0);_P.property("feedback","");_P.handleEvent=function(B){switch(B.eventID){case"Create":var A;this.style(ecsOverFlow,"hidden");break;case"Show":this.clear();for(A=1;A<=examMpcButtonCount;A++){this.createControl("Mpc#"+A,scrCourseGenMpcButton,0,0+(A-1)*50,this.width(),49)}break;case"Mpc_MouseDown":break;case"Mpc_MouseUp":this.answer(B.sender.groupIndex());this.score(B.sender.score());moduleHistory3.saveCurrent(this.answer(),this.score());this.raiseEvent("Select");break}};_P.clear=function(){this.removeControl("Mpc*")};_P.loadData=function(B){var C=0;var F=0;var A=[];this.correctAnswer(-1);this.answer(0);this.score(0);this.ID(0);this.ID(B.ID);if(UBound(B.answers)>examMpcButtonCount){return }var D;var C;for(C=1;C<=UBound(B.answers);C++){A[C]=C}if(setRandomizeQuestionOrder){randomizeArray(A,1)}for(C=1;C<=UBound(B.answers);C++){D=B.answers[A[C]];var E=this.controls["Mpc#"+A[C]];E.selected(false);E.text(markupToHtml(D.text,true));E.isCorrect(D.correctAnswer);E.score((D.correctAnswer?100:0));E.visible(true);if(E.isCorrect()){this.correctAnswer(C)}E.feedback(D.feedback);E.top(F);F=E.top()+E.height()+1;E=null}if(setAddSkipAnswerOption){var E=this.controls["Mpc#"+C];E.selected(false);E.text(markupToHtml(langCourseGen("SkipQuestion"),true));E.isCorrect("Special");E.score(25);E.top(F);E.visible(true);F=E.top()+E.height()+1;E=null;C++}this.height(F+10);for(C=C;C<=examMpcButtonCount;C++){this.controls["Mpc#"+C].visible(false)}this.getAnswer()};_P.getAnswer=function(){var A=0;showFeedback(null,"");this.answer(cVal(moduleHistory3.getCurrentAnswer()));if(this.answer()>0){this.controls["Mpc#"+this.answer()].selected(true);this.checkAnswer()}};_P.checkAnswer=function(){var B=0;var C=true;var A="";for(B=1;B<=examMpcButtonCount;B++){var D=this.controls["Mpc#"+B];if(D.visible()){if(D.selected()){D.showResult(setShowFeedback);if(!D.isCorrect()){C=false}A+=this.feedback()+vbLf+vbLf}}D=null}showFeedback(C,A)};return classUpdate()})();classCreate("scrCourseGenMpcButton",cControl);var scrCourseGenMpcButton=(function(){_P.property("isCorrect",false);_P.property("text","",true);_P.property("feedback","");_P.property("showResult",false,true);_P.property("score",0);_P.handleEvent=function(C){switch(C.eventID){case"Create":this.focusBehavior(efbOptionAction);var D=this.createControl("Label",oLabel,0,4,this.width()-29,this.height()-8);D.style(ecsFontSize,courseGenStyleOptions.fontSize);D=null;this.createControl("imgCheck",oImage,this.width()-20,4,19,18);this.createControl("imgResult",oImage,this.width()-20,4,19,18);break;case"Show":this.isCorrect(false);this.showResult(false);break;case"Paint":var D=this.controls["Label"];D.text(replace$(this.text(),"\n",""));this.height(D.height()+8);D=null;var B="radio";var E=colorMpcBack;var A=colorMpcFore;this.controls["imgResult"].visible(false);if(this.enabled()==false){E=colorMpcBack_D;A=colorMpcFore_D}else{if(this.selected()){E=colorMpcBack_P;A=colorMpcFore_P;B="radio_p";var D=this.controls["imgResult"];D.picture("image/lms/player/btn/"+(this.isCorrect()==true?"icogood":"icofalse")+".gif");D.visible(this.showResult());D=null}else{if(this.mouseFocus()){E=colorMpcBack_H;A=colorMpcFore_H;this.controls["imgResult"].visible(false)}}}this.controls["imgCheck"].picture("image/lms/player/btn/"+B+".gif");this.drawColorBack(E);this.style("color",A);break;case"MouseDown":}};return classUpdate()})();classCreate("scrCourseGenMpp",cControl);var scrCourseGenMpp=(function(){_P.property("ID",0);_P.property("answer",0);_P.property("correctAnswer",-1);_P.property("score",0);_P.property("feedback","");_P.handleEvent=function(B){switch(B.eventID){case"Create":var A;this.style(ecsOverFlow,"hidden");break;case"Show":this.clear();this.size(820,400);for(A=1;A<=examMppButtonCount;A++){var C=this.createControl("Mpp#"+A,scrCourseGenMppButton,0+(A-1)*267,0,259,240);C=null}break;case"Mpp_MouseDown":break;case"Mpp_MouseUp":this.answer(B.sender.groupIndex());this.score(B.sender.score());moduleHistory3.saveCurrent(this.answer(),this.score());this.raiseEvent("Select");break}};_P.clear=function(){this.removeControl("Mpp*")};_P.loadData=function(B){var C=0;var F=0;var A=[];if(UBound(B.answers)>examMppButtonCount){return }this.correctAnswer(-1);this.answer(0);this.score(0);this.ID(0);this.ID(B.ID);var D;var C;for(C=1;C<=UBound(B.answers);C++){A[C]=C}if(setRandomizeQuestionOrder){randomizeArray(A,1)}for(C=1;C<=UBound(B.answers);C++){D=B.answers[A[C]];var E=this.controls["Mpp#"+A[C]];E.selected(false);E.picturePath(D.text);E.isCorrect(D.correctAnswer);E.score((D.correctAnswer?100:0));E.visible(true);if(E.isCorrect()){this.correctAnswer(C)}E.feedback(D.feedback);E.top(F);E=null}var E=this.controls["Mpp#1"];this.height(E.top()+E.height()+10);E=null;for(C=C;C<=examMppButtonCount;C++){this.controls["Mpp#"+C].visible(false)}this.getAnswer()};_P.getAnswer=function(){var A=0;showFeedback(null,"");this.answer(cVal(moduleHistory3.getCurrentAnswer()));if(this.answer()>0){this.controls["Mpp#"+this.answer()].selected(true);this.checkAnswer()}};_P.checkAnswer=function(){var B=0;var C=true;var A="";for(B=1;B<=examMppButtonCount;B++){var D=this.controls["Mpp#"+B];if(D.visible()){if(D.selected()){D.showResult(setShowFeedback);if(!D.isCorrect()){C=false}A+=this.feedback()+vbLf+vbLf}}D=null}showFeedback(C,A)};return classUpdate()})();classCreate("scrCourseGenMppButton",cControl);var scrCourseGenMppButton=(function(){_P.property("isCorrect",false);_P.property("picturePath","",true);_P.property("feedback","");_P.property("showResult",false,true);_P.property("score",0);_P.handleEvent=function(B){switch(B.eventID){case"Create":this.focusBehavior(efbOptionAction);this.createControl("imgQuestion",oImage,2,2,255,208);this.createControl("imgCheck",oImage,124,222,12,15);break;case"Show":this.isCorrect(false);this.showResult(false);break;case"Paint":var A="radio";this.controls["imgQuestion"].picture(makeImageName(trim$(this.picturePath()),"EXAM2"));if(this.enabled()==false){}else{if(this.selected()){A="radio_p"}else{if(this.mouseFocus()){}}}this.controls["imgCheck"].picture("image/lms/player/btn/"+A+".gif")}};return classUpdate()})();var centerPopup=function(C,B,D,A){var F=math.round(B.width()-D)/2;var E=math.round(B.height()-A)/2;if(!C.parent()){F+=B.left();E+=B.top()}C.move(F,E,D,A)};classCreate("popupExamIntro",cControl);var popupExamIntro=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":centerPopup(this,backGround,504,336);this.style(ecsZOrder,1000);var C=this.createControl("Title",oLabel,8,5,this.width()-16,20);C.style(ecsForeColor,"#FFF");C=null;var C=this.createControl("Text",oLabel,8,35,this.width()-16,this.height()-50);C.style(ecsForeColor,"#0049ff");C=null;var C=this.createControl("Btn2",oTextButton,this.width()-185,this.height()-40,75,22);C.picture("image/lms/player/btn/default.gif");var B=C.controls["Caption"];B.style(ecsTextAlign,"center");B.style(ecsFontWeight,"bold");B.style(ecsFontSize,12);B.style(ecsForeColor,"#FFF");B=null;C=null;var C=this.createControl("Btn1",oTextButton,this.width()-100,this.height()-40,75,22);C.picture("image/lms/player/btn/default.gif");var B=C.controls["Caption"];B.style(ecsTextAlign,"center");B.style(ecsFontWeight,"bold");B.style(ecsFontSize,12);B.style(ecsForeColor,"#FFF");B=null;C=null;this.picture("image/lms/player/popup.gif");break;case"Show":this.drawPicture(this.picture());break;case"Hide":if(backGround.controls["Overlay"]){backGround.controls["Overlay"].hide()}break;case"Btn1_Click":case"Btn2_Click":this.raiseEvent("Select",{action:A.sender.tag()})}};_P.showPopup=function(E,D,B,A){backGround.controls["Overlay"].show();this.controls["Title"].text(E);this.controls["Text"].text(D);var C=this.controls["Btn1"];C.text(langCourseGen(B));C.tag(B);C=null;var C=this.controls["Btn2"];if(isEmptyString(A)){C.visible(false)}else{C.text(langCourseGen(A));C.tag(A);C.visible(true)}C=null;this.show()};return classUpdate()})();screenDefs["coursegenexam"]={name:"scrCourseGen",screen:scrCourseGen,linkAs:"exam"};screenDefs["coursegenscan"]={name:"scrCourseGen",screen:scrCourseGen,linkAs:"exam"};screenDefs["coursegenevaluation"]={name:"scrCourseGen",screen:scrCourseGen,linkAs:"evaluation"};screenDefs["coursegenassessment"]={name:"scrCourseGen",screen:scrCourseGen,linkAs:"assessment"};screenDefs["coursegenselftest"]={name:"scrCourseGen",screen:scrCourseGen,linkAs:"selftest"};classCreate("popupFile",cControl);var popupFile=(function(){_P.property("filePath","image/app_n");_P.handleEvent=function(A){switch(A.eventID){case"Load":this.createControl("FileList",oFileList,10,10,400,300);this.createControl("Uploader",oUpload,10,330,210,200);this.createControl("Picture",oPicture,420,10,300,300);var B=this.createControl("Path",oLabel,420,330,300);B.autoSize(true);B=null;break;case"Show":this.controls["FileList"].setPath(this.filePath());break;case"Uploader_Complete":this.controls["FileList"].reload();break;case"FileList_Select":this.controls["Picture"].visible(false);this.controls["Path"].text("");if(A.params.isDir){this.controls["Uploader"].uploadPath(A.params.fileName)}else{if(pathIsImage(A.params.fileName)){var B=this.controls["Picture"];B.picture(A.params.fileName);B.visible(true);B=null}this.controls["Path"].text(this.getCaption(A.params.fileName))}this.parent().parent().caption(A.params.fileName)}};_P.getCaption=function(A){return"[#"+A+"]"};return classUpdate()})();classCreate("oFileList",cControl);var oFileList=(function(){_P.property("path","");_P.handleEvent=function(B){switch(B.eventID){case"Load":this.style("overflowY","scroll");break;case"Item_Click":var A=this.path();var D=0;var C=B.sender;if((C.isDir())&&(C.fileName()=="..")){D=inStrRev(A,"/");if(D>0){A=left$(A,D-1)}}else{A=A+"/"+C.fileName()}if(C.isDir()){this.setPath(A)}else{this.raiseEvent("Select",{isDir:C.isDir(),fileName:A})}C=null}};_P.reload=function(){this.setPath(this.path())};_P.setPath=function(F){var A;var B=0;var C="";this.removeControl("*");A=new dbNode(httpDebug+"file.intern?page=getdir&path="+F);if(A){var E=A;C=trim$(A.get("path"));if(C!=""){this.path(C);if(inStr(this.path(),"/")>0){B+=1;var D=this.createControl("Item#"+B,oFileListItem,0,0+(B-1)*18,this.width()-20,18);D.loadItem(true,"..");D=null}if(A.moveDown()){do{B+=1;var D=this.createControl("Item#"+B,oFileListItem,0,0+(B-1)*18,this.width()-20,18);D.loadItem(LCase$(A.nodeType())=="dir",A.get("name"));D=null}while(A.moveNext())}this.raiseEvent("Select",{isDir:true,fileName:this.path()})}E=null}};return classUpdate()})();classCreate("oFileListItem",cControl);var oFileListItem=(function(){_P.property("fileName","");_P.property("isDir",false);_P.handleEvent=function(A){switch(A.eventID){case"Load":this.focusBehavior(efbNormalAction);var B=this.createControl("Caption",oLabel,0,(this.height()-16)/2,this.width(),16);B=null;case"Paint":if(this.selected()){this.drawColorBack("#DDD")}else{if(this.mouseFocus()){this.drawColorBack("#EEE")}else{this.drawColorBack("#FFF")}}}};_P.loadItem=function(B,C){this.fileName(C);this.isDir(B);var A=this.controls["Caption"];if(this.isDir()){C="+ "+C;A.left(0);A.width(this.width())}else{A.left(12);A.width(this.width()-12)}A.drawText(C);A=null};return classUpdate()})();classCreate("oMultiProgress",cControl);var oMultiProgress=(function(){_P.property("mColors",{});_P.property("length",0);_P.handleEvent=function(A){switch(A.eventID){case"Load":this.style(ecsOverFlow,"hidden");this.setBorder(edAll,WWBlue,"solid",1);this.style(ecsFontSize,1);break;case"Paint":this.redraw()}};_P.loadControl=function(B,A){if(A&&A.itemCount){B=A.itemCount;delete A.itemCount}this.length(B);this.colors=A||{};this.redraw()};_P.color=function(A,B){if(!(B==undefined)){this.colors[A]=cVal(B);this.redraw()}return this.colors[A]};_P.redraw=function(){if(!this.showed()){return }var C=0;var B=0;var A=0;if(this.length()>0){A=this.width()/this.length();for(color in this.colors){B=this.colors[color]*A;var D=this.controls[color]||this.createControl(color,oRect,0,0,0,this.height());if(B<=0){D.visible(false)}else{D.left(C);D.width(B);D.colorBack(color);D.visible(true);C+=B}D=null}}};return classUpdate()})();classCreate("oLmsRoleTree",cControl);var oLmsRoleTree=(function(){_P.property("includeHalfChecked",false);_P.property("roles",null);_P.property("checkBoxes",true);_P.handleEvent=function(A){switch(A.eventID){case"Load":this.roles=null;break;case"Create":var B=this.createControl("Tree",oTree,0,0,this.width(),this.height());B.showCheckBoxes(this.checkBoxes());B=null;this.fillTree();break;case"btnOk_Click":break;case"btnCancel_Click":break;case"btnClose_Click":break}};_P.fillTree=function(){var C;var A=new cHttpRequest();var G;var E;var B;A.addCommand("GetRoleTree",{});C=A.send();if(C==null){return }C=getXmlNodeClone(C,"GetRoleTree");if(C!=null){var F=this.controls["Tree"];do{G=C.get("name")||C.get("title");E=C.get("parentid");if(E==0){B=F.rootNode()}else{B=F.nodes[E]}var D=B.addChildNode(G,C.get("ID"),-1,undefined,undefined,false);D=null}while(C.moveNext());F=null}};_P.value=function(A){if(A!=null){this.controls["Tree"].stringToChecked(A,this.includeHalfChecked())}else{A=this.controls["Tree"].checkedToString(this.includeHalfChecked())}return A};_P.clearChecked=function(){this.controls["Tree"].clearChecked()};return classUpdate()})();classCreate("oTreeNode",cControl);var oTreeNode=(function(){_P.property("showSelf",true,true);_P.property("text","",true);_P.property("icon","",true);_P.property("key","");_P.property("checked",undefined,"this.mChecked = cVal(value); this.checkChildNodes(); this.checkParentNodes(); this.setDirty()");_P.property("collapsed",true,"if (value) {this.collapse()} else {this.expand()}");_P.property("childCount",0);_P.property("halfChecked",false);_P.property("treeControl",null);_P.handleEvent=function(A){switch(A.eventID){case"Load":this.focusBehavior(efbNormalAction);this.style(ecsOverFlow,"hidden");var B=this.createControl("Caption",oLabel,20,1,60,16);B=null;var B=this.createControl("Expander",oImage,0,0,18,18);B.focusBehavior(efbClick);B=null;var B=this.createControl("CheckBox",oImage,20,1,16,16);B.focusBehavior(efbClick);B=null;this.mTreeControl=this.parent();if(this.mTreeControl.mTreeControl){this.mTreeControl=this.mTreeControl.mTreeControl}break;case"Show":break;case"Paint":var C=20;if(this.showSelf()){var B=this.controls["Expander"];B.picture((this.childCount()==0?"":"image/lms/buttons/"+(this.collapsed()?"plus.gif":"minus.gif")));B.visible(true);B=null;var B=this.controls["CheckBox"];switch(this.mChecked){case 0:if(this.mHalfChecked==true){B.picture("image/lms/buttons/icocheckhalf.gif")}else{B.picture("image/lms/buttons/icocheckempty.gif")}C=40;B.visible(true);break;case 1:B.picture("image/lms/buttons/icocheckfull.gif");C=40;B.visible(true);break;case -1:B.picture("image/lms/buttons/icocheckfull_red.gif");C=40;B.visible(true);break;default:B.visible(false)}B=null;var B=this.controls["Caption"];if(this.mChecked==null){B.drawColorBack((this.selected()?"#FFF":""))}B.left(C);B.width(this.width()-C);B.text(this.text());B.visible(true);B=null}else{this.controls["Expander"].visible(false);this.controls["Caption"].visible(false)}break;case"Unload":if(this.key()!=""){this.treeControl().delKey(this.key())}break;case"Expander_MouseDown":this.collapsed(!this.collapsed());this.setDirty();break;case"CheckBox_RightClick":if(this.mChecked!=1){this.checked((this.checked()-1)%-2)}break;case"CheckBox_MouseDown":if(this.mChecked!=-1){this.checked((this.checked()+1)%2)}break;case"MouseDown":if(!this.checked()===null){if(this.selected()){this.selected(false)}}else{this.treeControl().setSelectedNode(this)}}};_P.drawChildren=function(F){var C=0;var E;var B=0;var A=this.childCount();if(this.collapsed()){for(C=1;C<=this.childCount();C++){this.controls["Nodes#"+C].visible(false)}if(this.showSelf()){B=18}}else{if(F>1){var G=this.controls["Nodes#"+(F-1)];B=G.top()+G.height();G=null;C=F}else{if(this.showSelf()){B=18}C=1}for(C=C;C<=A;C++){var G=this.controls["Nodes#"+C];G.top(B);G.visible(true);B+=G.height()+1;G=null}}this.height(B);var D=this.parent();if(D.className=="oTreeNode"){D.drawChildren(this.groupIndex()+1)}};_P.collapse=function(){this.raiseEvent("Collapse",null,this.treeControl());this.drawChildren()};_P.expand=function(){if(this.childCount()<0){this.childCount(0)}this.raiseEvent("Expand",null,this.treeControl());this.drawChildren()};_P.allowExpand=function(B){var A=this.childCount();if(A==0){this.childCount((B==false?0:-1))}};_P.addChildNode=function(L,K,B,I,J,E){var A=null;var G=0;var F=this.childCount();if(F<0){F=0}if((!isEmptyString(K))&&(this.mTreeControl.nodes[K]!=null)){return null}B=(B==undefined?-1:cVal(B));if((B<=0)||(B>this.mChildCount)){B=F+1}for(G=F;G>=B;G-=1){A=this.controls["Nodes#"+G];if(A!=null){A.mGroupIndex=G+1;this.controls["Nodes#"+(G+1)]=A}}var H=18;if((F>0)){var D=this.controls["Nodes#"+F];H=D.top()+D.height();D=null}var C=(this.mParent.className=="oTree"?0:(this.checked()===null?10:20));var A=this.createControl("Nodes#"+B,oTreeNode,C,H,this.width()-20,16,false);if((J==undefined)&&(A.mParent.className=="oTreeNode")){A.mChecked=A.mParent.mChecked;if(A.mParent.mChecked==-1){A.mParent.mChecked=0}}else{A.mChecked=J}A.mText=L;A.mIcon=I;A.mChildCount=(E==true?-1:0);if(!isEmptyString(K)){A.mKey=K;this.mTreeControl.addKey(K,A)}this.childCount(F+1);if((!this.collapsed())){if((B<F+1)){this.drawChildren(B)}else{this.height(H+A.height()+1);A.visible(true)}}if(this.mChildCount!=0){this.setDirty()}return A};_P.removeChildNode=function(B){var A=this.childCount();var C;var B=0;var D=this.controls["Nodes#"+B];D.destroy();D=null;delete this.controls[A];for(B=B+1;B<=A;B++){C=this.controls["Nodes#"+B];C.mGroupIndex=B-1;this.controls["Nodes#"+(B-1)]=C}this.mChildCount-=1};_P.checkChildNodes=function(){var A=0;var B=this.checked();if(B==undefined){return }if(B==-1){return }for(A=1;A<=this.childCount();A++){var C=this.controls["Nodes#"+A];C.mChecked=B;C.checkChildNodes();C=null}this.mHalfChecked=false;this.setDirty()};_P.checkParentNodes=function(){var C=this.parent();var A=0;var B=undefined;var D;if(this.mChecked==undefined){return }if(C.mChecked==undefined){return }if(C.className!="oTreeNode"){return }for(A=1;A<=C.childCount();A++){D=(C.controls["Nodes#"+A].mChecked==1);if(B!=undefined){if(D!=B){B=undefined;break}}else{B=D}}C.mChecked=(B==true?1:0);C.mHalfChecked=(B==undefined?true:false);C.setDirty();C.checkParentNodes()};return classUpdate()})();classCreate("oTree",cControl);var oTree=(function(){_P.property("indent",10);_P.property("showCheckBoxes",false,"this.controls['Root'].checked(value? 0: undefined)");_P.property("nodes",null);_P.property("selectedNode",null);_P.handleEvent=function(A){switch(A.eventID){case"Load":this.style("overflow","auto");this.nodes={};var B=this.createControl("Root",oTreeNode,0,0,this.width()-20,this.height());B.collapsed(false);B.showSelf(false);if(this.showCheckBoxes()){B.checked(0)}B=null;break;case"Show":break;case"Paint":break;case"Nodes_Collapse":this.raiseEvent("Collapse",{node:A.sender});break;case"Nodes_Expand":this.raiseEvent("Expand",{node:A.sender});break;case"Hide":this.setSelectedNode(null)}};_P.rootNode=function(){return this.controls["Root"]};_P.addKey=function(A,B){if(this.nodes[A]!=undefined){return false}this.nodes[A]=B;return true};_P.delKey=function(A){if(this.nodes[A]!=undefined){delete this.nodes[A]}};_P.checkedToString=function(B){var C;var D;var A={};var A=[];for(C in this.nodes){D=this.nodes[C];if(D.mChecked==-1){A.push(-C)}else{if(B){if(D.mChecked||D.mHalfChecked){A.push(C)}}else{if((D.mChecked==1)&&((!D.mParent.mChecked)||(D.mParent.mName=="Root"))){A.push(C)}}}}D=null;return join$(A,"|")};_P.clearChecked=function(){var A;for(A in this.nodes){this.nodes[A].mChecked=0}};_P.stringToChecked=function(B,C){var D;var F;var E;var A=split$(B,"|");this.clearChecked();for(_EC1 in A){D=A[_EC1];E=(cVal(D)<0?-1:1);D=cStr(math.abs(cVal(D)));F=this.nodes[D];if(F){if(C){if(F.childCount()==0){F.checked(E)}}else{F.checked(E)}}else{}}F=null};_P.setSelectedNode=function(A){if(this.selectedNode()){this.selectedNode().selected(false);this.selectedNode(null)}this.selectedNode(A)};return classUpdate()})();classCreate("oWWCaseButton",cControl);var oWWCaseButton=(function(){_P.property("text","",true);_P.property("media","");_P.property("colorBackNormal","#FFFFFF",true);_P.property("colorBackHigh","#EEEEFF",true);_P.property("colorBackSelect","#FFFFFF",true);_P.handleEvent=function(A){switch(A.eventID){case"Load":this.mouseIcon("pointer");var B=this.createControl("lblDot",oLabel,2,2,10,18);B.text("-");B=null;var B=this.createControl("Label",oLabel,10,2,this.width()-19-4,0);B.text(this.name());B.autoSize(true);B=null;this.focusBehavior(efbNormalAction);break;case"Paint":var B=this.controls["Label"];B.height("");B.drawText(this.text());this.height(B.height()+2);B=null;if(this.mouseFocus()||this.selected()){this.drawColorBack(this.colorBackHigh())}else{this.drawColorBack(this.colorBackNormal())}}};return classUpdate()})();var animateResponse=function(M,T,R,N,I,K,J,H,O,E,F){var P=split$(J," ");var B=split$(H," ");var A=0;var C=0;var L=0,D=0,Q=0,G=setInterval(function(){if(new Date()<=D){return 0}_TL:while(1){switch(L){case 0:if(P.length>0){M.setText(P[0])}D=setWakeup(debugMode?0:50);L++;return ;case 1:R.picture(I);Q=setWakeup(10000);L++;case 2:A++;if(A>P.length-1){L++;break _TL}M.addText(" "+P[A]);if(new Date()<=Q){D=setWakeup(debugMode?0:50);return }else{L++}case 3:D=setWakeup(debugMode?0:250);L++;return ;case 4:if(B.length>0){T.setText(B[0])}D=setWakeup(debugMode?0:50);L++;return ;case 5:N.picture(K);Q=setWakeup(10000);L++;case 6:C++;if(C>B.length-1){L++;break _TL}T.addText(" "+B[C]);if(new Date()<=Q){D=setWakeup(debugMode?0:50);return }else{L++}case 7:D=setWakeup(debugMode?0:100);L++;return ;case 8:if(!isEmptyString(E)){O.showText(E)}D=setWakeup(debugMode?0:150);L++;return ;case 9:F();default:clearInterval(G);return }}},10)};var eVisible=1;var eVisited=2;var eHiddenVisited=4;var eHidden=8;var eEscape=16;classCreate("popupChef",cControl);var popupChef=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":this.focusBehavior(efbClick);this.style("zIndex",500);this.style("color","white");var B=this.createControl("Close",oButton,182,4,17,18);B.picture("image/buttons/caschefclose.gif");B=null;var B=this.createControl("lblText",oLabel,12,18,180,180);B.focusBehavior(efbClick);B.text("");B.style("color","black");B.style("overflow","auto");B=null;break;case"Show":this.drawPicture(this.picture());break;case"lblText_Click":this.visible(false);break;case"Click":this.visible(false);break;case"Close_Click":this.visible(false);break}};_P.showText=function(A){this.controls["lblText"].text(A);this.show()};return classUpdate()})();classCreate("popupNoteBook",cControl);var popupNoteBook=(function(){_P.property("link","");_P.handleEvent=function(A){switch(A.eventID){case"Load":this.style("zIndex",1600);this.style("color","white");var B=this.createControl("Close",oButton,602,10,17,18);B.picture("image/buttons/MainClose.gif");B=null;var B=this.createControl("lblText",oLabel,12,47,600,330);B.text("");B.style("color","black");B.style("overflow","auto");B=null;break;case"Show":this.drawPicture(this.picture());break;case"Close_Click":this.visible(false);break}};_P.showText=function(A){this.controls["lblText"].text(A);this.show()};return classUpdate()})();classCreate("oWWCaseBalloonSelect",cControl);var oWWCaseBalloonSelect=(function(){_P.property("itemCount",0);_P.property("selectedIndex",0);_P.property("itemTop",0);_P.handleEvent=function(B){switch(B.eventID){case"Load":var A;for(A=1;A<=10;A++){var D=this.createControl("Answer#"+A,oWWCaseButton,2,0-16+(A*16),this.width()-8,16);D=null}break;case"Show":this.clear();break;case"Answer_Click":this.selectedIndex(B.sender.groupIndex());this.raiseEvent("Click",{selectedIndex:this.selectedIndex()});break;case"Answer_MouseEnter":var C;var A;for(A=1;A<=999;A++){C=this.controls["Answer#"+A];if(!C){break}if(A!=B.sender.groupIndex()){C.mouseFocus(false)}}if(!isEmptyString(B.sender.media())){this.raiseEvent("ShowMedia",B.sender.media())}break;case"Answer_MouseLeave":if(!isEmptyString(B.sender.media())){this.raiseEvent("HideMedia")}}};_P.clear=function(){var A=0;this.itemTop(2);this.itemCount(0);this.selectedIndex(0);for(A=1;A<=10;A++){var B=this.controls["Answer#"+A];B.selected(false);B.visible(false);B=null}};_P.addItem=function(H,A,E,G){var C=false;var D=this.itemCount()+1;this.itemCount(D);var B;var F=this.controls["Answer#"+D];switch(E){case eVisible:F.colorFore("#000000");C=true;break;case eVisited:F.colorFore(WWGreen);C=true;break;case eHiddenVisited:F.colorFore(WWRed);C=true;break;case eHidden:F.colorFore("#AAAAAA");C=true;break;case eEscape:F.colorFore("#000000");C=true}if(E==eEscape){F.top(this.height()-20)}else{F.top(this.itemTop())}F.text("xxxxx");if(C==true){F.mouseFocus(false);F.visible(true);F.text(H);this.itemTop(this.itemTop()+F.height())}F.media(G);F=null;B=this.itemTop()+6;if(B<50){B=50}};_P.animatedHide=function(){this.visible(false)};_P.animatedShow=function(){this.opacity(0);this.visible(true);fadeIn(this,debugMode?0:300)};return classUpdate()})();classCreate("oWWCaseBalloonRight",cControl);var oWWCaseBalloonRight=(function(){_P.property("note","");_P.handleEvent=function(A){switch(A.eventID){case"Load":this.picture("image/interface/casBalloonRight_235x268.gif");this.move(745,110,235,268);var B=this.createControl("Text",oLabel,40,4,this.width()-40-4,this.height()-8-40);B=null;var B=this.createControl("btnNote",oButton,140,this.height()-40,85,33);B.picture("image/buttons/casnote.gif");B=null;break;case"Show":this.drawPicture(this.picture());break;case"btnNote_Click":this.raiseEvent("Note",this.note());break}};_P.animatedHide=function(){this.visible(false)};_P.setNote=function(A){this.note(A)};_P.setText=function(B,A){this.controls["Text"].text(B);this.visible(true)};_P.addText=function(A){this.controls["Text"].text(this.controls["Text"].text()+A)};return classUpdate()})();classCreate("oWWCaseBalloonLeft",cControl);var oWWCaseBalloonLeft=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":this.picture("image/interface/casballoonleft_235x105.gif");this.move(257,110,290,78);var B=this.createControl("Text",oLabel,30,4,this.width()-34,this.height()-8);B=null;break;case"Show":this.drawPicture(this.picture());break}};_P.animatedHide=function(){this.visible(false)};_P.setText=function(A){this.controls["Text"].text(A);this.visible(true)};_P.addText=function(A){this.controls["Text"].text(this.controls["Text"].text()+A)};return classUpdate()})();var randomizer=function(D,C,B){var A=0;if(B<D||B>C){C+=1;B=C+1}if(C-D<1){return D}A=D-1+random(C-D);if(A>=B){A+=1}return A};classCreate("scrCaseGame",cControl);var scrCaseGame=(function(){_P.property("activeNode",null);_P.property("rootNode",null);_P.property("subPathAnchor",0);_P.property("emoScore",0);_P.property("lowestEmo",0);_P.property("moduleScore",0);_P.property("status","None");_P.property("score",0);_P.property("link","");_P.property("customerNr",1);_P.property("sellerNr",1);_P.property("imageBackGround","");_P.property("lastVerkoperImageNr",0);_P.property("lastKlantImageNr",0);_P.property("isEnded",false);_P.property("zapperMedia","");_P.property("coachText","");_P.handleEvent=function(A){switch(A.eventID){case"Load":this.picture("image/interface/bgCase.gif");this.focusBehavior(efbClick);var C=this.createControl("lblModuleTitle",oLabel,29,60,594-29,18);C.style("fontWeight","bold");C.text("");C=null;var C=this.createControl("imgBackGround",oImage,150,80,724,448);C.picture("image/game/bg/bghardevloeren.gif");C=null;var C=this.createControl("BalloonSelect",oWWCaseBalloonSelect,52,536,520,126);C.style("zIndex",250);C=null;var C=this.createControl("BalloonLeft",oWWCaseBalloonLeft,277,69,235,105);C.style("zIndex",250);C=null;var C=this.createControl("BalloonRight",oWWCaseBalloonRight,745,115,185,131);C.style("zIndex",250);C=null;var C=this.createControl("imgEmoMeter",oImage,550,500,263,28);C.picture("image/interface/DnpEmometer.gif");C.style("zIndex",225);C=null;var C=this.createControl("EmoPointer",oImage,550+123,500,18,18);C.picture("image/interface/DnpEmoPointer.gif");C.style("zIndex",250);C=null;var C=this.createControl("Help",oButton,577,543,99,102);C.picture("image/buttons/CasIcoonTv.gif");C.style("zIndex",150);C=null;var C=this.createControl("Note",oButton,667,543,99,102);C.picture("image/buttons/CasIcoonNote.gif");C.style("zIndex",150);C=null;var C=this.createControl("Chef",oButton,760,543,99,102);C.picture("image/buttons/CasIcoonChef.gif");C.style("zIndex",150);C=null;var C=this.createControl("Zapper",oButton,859,543,99,102);C.picture("image/buttons/CasIcoonZapper.gif");C.style("zIndex",150);C=null;var C=this.createControl("imgVerkoper",oImage,72,126,355,448);C.picture("image/game/chars/Verkoper1_1L.gif");C.style("zIndex",150);C=null;var C=this.createControl("imgKlant",oImage,513,126,355,448);C.picture("image/game/chars/Klant4_1R.gif");C.style("zIndex",150);C=null;var C=this.createControl("NoteBook",popupNoteBook,225,132,629,396);C.picture("image/interface/casSchuifLog.gif");C.style("zIndex",1600);C.visible(false);C=null;var C=this.createControl("PopupChef",popupChef,625,339,203,200);C.picture("image/interface/cas_chefballon.gif");C.style("zIndex",300);C.visible(false);C=null;var C=this.createControl("Image",oImage,52,46,586,480,false);C.style("borderWidth","4px");C.style("borderColor","#FFFFFF");C.style("borderStyle","solid");C.style(ecsZOrder,275);C=null;break;case"Show":game.create();this.status("none");this.emoScore(0);this.lowestEmo(0);this.moduleScore(0);this.isEnded(false);this.coachText("");this.zapperMedia("");this.status("none");if(dnpDemo==false){var C=backGround.controls["Slider"];C.showHtml("intro/casintro.htm","Start");C.addListener(this);C.slide(true);C=null}this.controls["Zapper"].enabled(false);this.controls["Image"].visible(false);this.controls["NoteBook"].visible(false);this.controls["BalloonRight"].visible(false);this.controls["BalloonLeft"].visible(false);this.controls["BalloonSelect"].visible(false);this.controls["PopupChef"].visible(false);this.drawPicture(this.picture());this.activeNode=new dbNode(this.link());this.rootNode=null;this.subPathAnchor(0);this.controls["lblModuleTitle"].text(this.activeNode.get("Title"));do{if(LCase$(this.activeNode.nodeType())=="caselesson"){break}}while(this.activeNode.moveDown(true)==true);var C=this.controls["imgBackGround"];C.picture(makeImageName(this.activeNode.get("ImageBackground"),"BGGAME"));C=null;this.customerNr(this.activeNode.get("CustomerNumber"));this.controls["imgKlant"].picture("image/game/chars/klant"+this.customerNr()+"_"+random(4)+"r.gif");break;case"Slider_Slide":if(A.params.slideIn==false){switch(LCase$(this.status())){case"none":lms.courseStart(this.link());this.status("started");this.sellerNr(backGround.controls["Slider"].sellerNr());this.controls["imgVerkoper"].picture("image/game/chars/verkoper"+this.sellerNr()+"_"+random(5)+"l.gif");this.coachText("Geef aan hoe je deze klant ontvangt.<BR /><BR />Maak zo weinig mogelijk fouten in het gesprek, dan blijft je klant blij. Weet je het niet meer? Klik dan op mij.");this.showAnswerOptions();this.controls["PopupChef"].showText(this.coachText());break}}break;case"Hide":switch(LCase$(this.status())){case"started":lms.courseStop(this.link(),-1)}break;case"Click":this.controls["PopupChef"].visible(false);break;case"BalloonSelect_Click":this.answer(A.params.selectedIndex);break;case"BalloonRight_Note":if(trim$(A.params)!=""){game.addNote(trim$(A.params));this.controls["NoteBook"].showText(game.getNotes())}break;case"BalloonSelect_ShowMedia":var C=this.controls["Image"];C.picture(makeImageName(A.params,"CASZOOM"));C.visible(true);C=null;break;case"BalloonSelect_HideMedia":this.controls["Image"].visible(false);break;case"Help_Click":showEncyclopediaPage();break;case"Coffee_Click":break;case"Note_Click":this.controls["NoteBook"].showText(game.getNotes());break;case"Chef_Click":var C=this.controls["PopupChef"];if(C.visible()){C.visible(false)}else{C.showText(this.coachText())}C=null;break;case"Zapper_Click":var B=backGround.controls["PopupZapper"];if(B==null){B=backGround.createControl("PopupZapper",popupZapper,0,0,0,0)}B.media(makeImageName(this.zapperMedia(),"FLASH"));B.show();break;case"MainClose_Click":showScreen("Menu");break}};_P.answer=function(G){var B="";var H=null;var I="";var C=false;var N="";var B="";var M=0;var J=0;var A="";var F=false;var L=false;var D=(this.subPathAnchor()==0?this.activeNode.childCount():this.rootNode.childCount());this.controls["Image"].visible(false);this.controls["BalloonSelect"].visible(false);this.controls["BalloonLeft"].visible(false);this.controls["BalloonRight"].visible(false);this.controls["PopupChef"].visible(false);this.controls["NoteBook"].visible(false);if(G<=D){if((this.subPathAnchor()!=0)&&(this.subPathAnchor()!=G)){this.activeNode=this.rootNode;this.subPathAnchor(0)}H=this.activeNode.clone();H.moveDown(G);if(!isEmptyString(H.get("Zapper"))){this.zapperMedia(H.get("Zapper"));this.controls["Zapper"].enabled(true)}if(LCase$(H.get("post"))=="the end"){this.isEnded(true)}this.lastVerkoperImageNr(randomizer(1,5,this.lastVerkoperImageNr()));if(game.evalPre(H.get("ShowCond"))){game.checkNode(H);B=H.get("respt");if(H.get("IsFalse")=="true"){L=true;B=B||H.get("respf")}}else{game.peek(H.get("ID"));B=H.get("respf")||H.get("respt");L=true;F=true}if(L){this.lastKlantImageNr(randomizer(5,7,this.lastKlantImageNr()));this.emoScore(this.emoScore()-25)}else{this.lastKlantImageNr(randomizer(1,4,this.lastKlantImageNr()));this.emoScore(this.emoScore()+10)}if(this.emoScore()<-100){this.emoScore(-100)}if(this.emoScore()>100){this.emoScore(100)}this.controls["EmoPointer"].left(this.controls["imgEmoMeter"].left()+123+this.emoScore());if(!game.evalPre(H.get("ShowCond"))){N=trim$(H.get("textf"))}if(N==""){N=H.get("text")}I=trim$(H.get("Note"))||B;this.coachText(trim$(H.get("Coach")));if(H.get("AutoCoach")=="true"){A=this.coachText()}game.addHistory("Verkoper",N);game.addHistory("Klant",B);game.evalPost(H.get("Post"));this.controls["BalloonRight"].setNote(I);if(F&&!debugMode){H.moveUp()}switch(H.childCount()){case 0:this.subPathAnchor(0);this.rootNode=null;while(H.moveUp()){if(H.childCount()>1){break}if(LCase$(H.nodeType())=="caselesson"){break}}break;case 1:if(this.subPathAnchor()==0){this.subPathAnchor(G);this.rootNode=this.activeNode.clone()}break;default:this.subPathAnchor(0);this.rootNode=null;this.activeNode.moveDown(G)}this.activeNode=H}else{this.subPathAnchor(0);this.rootNode=null;while(LCase$(this.activeNode.nodeType())!="caselesson"){if(!isEmptyString(this.activeNode.get("esc"))){C=true}this.activeNode.moveUp();if(C==true){break}}}var E="image/game/chars/verkoper"+this.sellerNr()+"_"+this.lastVerkoperImageNr()+"L.gif";var K="image/game/chars/klant"+this.customerNr()+"_"+this.lastKlantImageNr()+"R.gif";animateResponse(this.controls["BalloonLeft"],this.controls["BalloonRight"],this.controls["imgVerkoper"],this.controls["imgKlant"],E,K,N,B,this.controls["PopupChef"],A,classBind(this,this.showAnswerOptions))};_P.showAnswerOptions=function(){var E="";var B=0;var F=null;var C=null;var D=null;var I=false;var G="";var H=0;var A=this.controls["BalloonSelect"];A.clear();if(this.subPathAnchor()==0){F=this.activeNode.clone()}else{F=this.rootNode.clone();C=this.activeNode.clone();C.moveDown(1)}if(this.isEnded()){this.theEnd();return }if(LCase$(F.nodeType())=="caselesson"){I=true}if(F.moveDown()==true){do{B=B+1;D=(B!=this.subPathAnchor()?F:C);H=eVisible;if(!game.evalPre(D.get("ShowCond"))){G=trim$(D.get("textf"));if(G==""){H=eHidden}else{if(game.isPeeked(D.get("ID"))){H=eHiddenVisited}}}else{G=""}if(G==""){G=trim$(D.get("textshort"));if(G==""){G=D.get("text")}}if(H==eVisible&&game.isChecked(D.get("ID"))){H=(D.get("IsFalse")=="true"?eHiddenVisited:eVisited)}if(I==true){G="<SPAN style='FONT-WEIGHT: bold; FONT-SIZE:12'>"+G+"</SPAN>"}A.addItem(G,B,H,F.get("Media"))}while(F.moveNext()==true);F.moveUp()}do{if(LCase$(F.nodeType())=="caselesson"){break}E=F.get("esc");if(isEmptyString(E)==false){E="<B>"+E+"</B>";A.addItem(E,"ESC",eEscape);break}}while(F.moveUp());A.animatedShow();F=null;A=null};_P.theEnd=function(){var B="";this.status("done");var A=backGround.controls["Slider"];A.ignoreSlideBack(true);this.moduleScore(50+(this.emoScore()+this.lowestEmo())/4);if(this.moduleScore()<=50){B=1}else{if(this.moduleScore()<=75){B=2}else{B=3}}lms.courseStop(this.link(),this.moduleScore());A.showHtml("intro/casuitro"+B+".htm","Score",this.moduleScore(),this.emoScore());A.slide(true);A=null};return classUpdate()})();classCreate("game",null);game=(function(){var A=(function(){_P.property("values",null);_P.property("history",null);_P.property("notes",null);_P.property("checked",null);_P.property("peeked",null);_P.create=function(){this.values=[];this.history=[];this.notes=[];this.checked=[];this.peeked=[]};_P.checkNode=function(C){var B=C.get("ID");if(this.checked[B]!=null){return }this.checkParentNodes(C.clone())};_P.checkParentNodes=function(C){if(C==null){return }var D;var B=C.get("ID");for(D=1;D<=C.childCount();D++){var E=C.child(D);if(E.get("isfalse")!="true"){if(!this.checked[E.get("ID")]){return }}E=null}this.checked[B]=true;if(C.moveUp()){this.checkParentNodes(C)}};_P.isChecked=function(B){return this.checked[B]};_P.peek=function(B){this.peeked[B]=true};_P.isPeeked=function(B){return this.peeked[B]};_P.item=function(B,C){if(typeof (C)!=null){this.values[LCase$(B)]=LCase$(C)}return this.values[B]};_P.addNote=function(B){this.notes.push(B)};_P.getNotes=function(){return this.notes.join("<BR /><BR />")};_P.addHistory=function(B,C){if(LCase$(B)=="verkoper"){C=B+": <B style='COLOR:"+WWBlue+"'>"+C+"</B>"}else{C=B+": "+C}this.history.push(C)};_P.getHistory=function(){return this.history.join("<BR />")};_P.evalPre=function(C){var B=new array();var D=0;var E;if(isEmptyString(C)){return true}B=splitTrim$(LCase$(C),vbLf);for(D=0;D<=B.length-1;D++){E=this.evalParam(B[D]);if(E!=null){if(E.value!=this.values[E.name]){return false}}}return true};_P.evalPost=function(C){var B=new array();var D=0;var E;if(isEmptyString(C)){return }B=splitTrim$(LCase$(C),vbLf);for(D=0;D<=B.length-1;D++){E=this.evalParam(B[D]);if(E!=null){this.values[E.name]=E.value}}};_P.evalParam=function(C){var B={name:"",value:""};if(C==""){return }if(inStr(C,"niet")>0){B.value=false;C=replace$(C,"niet","")}else{if(inStr(C,"not")>0){B.value=false;C=replace$(C,"not","")}else{B.value=true}}B.name=C;return B};_P.debugOut=function(){var B=0;for(B=0;B<=this.values.length-1;B++){}};return classUpdate()})();return new A()})();classCreate("popupZapper",cControl);var popupZapper=(function(){_P.property("media","");_P.handleEvent=function(A){switch(A.eventID){case"Load":this.move(310,108,384,374);this.style(ecsZOrder,900);this.picture("image/interface/zapper.gif");this.focusBehavior(efbClick);var B=this.createControl("btnClose",oButton,357,9,17,18);B.picture("image/buttons/caschefclose.gif");B=null;var B=this.createControl("Media",oMedia,11,32,362,341);B=null;var B=this.createControl("CaptionBarIcon",oImage,7,3,23,25);B.picture("image/interface/zappermini.gif");B=null;break;case"Show":this.drawPicture(this.picture());var B=this.controls["Media"];B.fileName(this.media());B.show();B=null;var B=backGround.controls["Overlay"];B.show();B.addListener(this);B=null;break;case"Click":case"Image_Click":case"Overlay_Click":case"btnClose_Click":var B=this.controls["Media"];B.hide();B.fileName("");B=null;var B=backGround.controls["Overlay"];B.hide();B.addListener(null);B=null;this.hide()}};return classUpdate()})();screenDefs["caselesson"]={name:"scrCaseGame",screen:scrCaseGame,linkAs:""};var dnpStartTimeOut=10;var dnpPageTimeOut=10;var dnpMaxTimeSaved=25;classCreate("oWWDnpLargeButton",cControl);var oWWDnpLargeButton=(function(){_P.property("count",0,true);_P.handleEvent=function(A){switch(A.eventID){case"Load":this.mouseIcon("pointer");this.focusBehavior(efbNormalAction);var B=this.createControl("imgCounter",oImage,this.width()-38,this.height()-38,28,28);B.picture("image/interface/DnpCircleIcons.gif");B=null;var B=this.createControl("lblCounter",oLabel,this.width()-28,this.height()-32,20,20);B.style("fontWeight","bold");B.style("zIndex",10);B=null;break;case"Show":break;case"Hide":break;case"Unload":break;case"Click":if(this.count()>0){this.count(this.count()-1)}break;case"Paint":this.enabled(this.count()>0);this.setBackgroundPicture(true);this.controls["lblCounter"].text(this.count());break}};return classUpdate()})();classCreate("oWWDnpBalloonLeft",cControl);var oWWDnpBalloonLeft=(function(){_P.handleEvent=function(A){switch(A.eventID){case"Load":this.picture("image/interface/DnpTextballoonLeft.gif");this.width(185);this.height(135);var B=this.createControl("Text",oLabel,8,8,165,135);B=null;break;case"Show":this.drawPicture(this.picture());break}};_P.animatedHide=function(){fadeOut(this,200)};_P.setText=function(A){this.controls["Text"].text(A)};_P.animatedShow=function(){this.opacity(0);this.visible(true);fadeIn(this,0)};return classUpdate()})();classCreate("oWWDnpButton",cControl);var oWWDnpButton=(function(){_P.property("text","",true);_P.property("isYesNo",false,true);_P.property("correctValue",false);_P.property("isCorrect",null);_P.property("leftAlign",4);_P.property("link","");_P.property("autoSize",true);_P.property("showResult",true);_P.property("showMpcIcon",false);_P.property("colorBackNormal","#FFFFFF",true);_P.property("colorBackHigh","#EEEEFF",true);_P.property("colorBackSelect","#FFFFFF",true);_P.handleEvent=function(C){switch(C.eventID){case"Load":this.mouseIcon("pointer");var E=this.createControl("Label",oLabel,this.leftAlign(),2,this.width()-this.leftAlign()-3,this.height()-6);E.text(this.name());E.autoSize(true);E=null;var E=this.createControl("mpcImage",oImage,2,3,19,18);E.picture("image/buttons/Radio.gif");E.visible(false);E=null;var E=this.createControl("btnYes",oButton,2,3,19,18);E.picture("image/buttons/Radio.gif");E.focusBehavior(efbStateAction);E.visible(false);E=null;var E=this.createControl("btnNo",oButton,2,3,19,18);E.picture("image/buttons/Radio.gif");E.focusBehavior(efbStateAction);E.visible(false);E=null;this.focusBehavior(efbIgnoreAll);break;case"Hide":break;case"Unload":break;case"btnYes_Click":this.controls["btnNo"].selected(false);this.raiseEvent("Click");break;case"btnNo_Click":this.controls["btnYes"].selected(false);this.raiseEvent("Click");break;case"Click":break;case"Show":this.update();break;case"Paint":var B="Radio";var A;var E=this.controls["Label"];E.text(this.text());E=null;var D=this.controls["Label"];if(this.autoSize()==true){A=this.controls["Label"].height()+3;if(A<25){A=22}this.height(A)}var F=this.colorBackNormal();if(this.selected()){F=this.colorBackSelect()}else{if(this.mouseFocus()){F=this.colorBackHigh()}}this.drawColorBack(F);if(this.showMpcIcon()==true){B="Radio";if(this.selected()){if(this.isCorrect()==true){B="RadioCorrect_d"}else{if(this.isCorrect()==false){B="RadioFalse_d"}else{B="Radio_d"}}}else{if(this.mouseFocus()){B="Radio_H"}}B="image/buttons/"+B+".gif";this.controls["mpcImage"].picture(B)}break}};_P.highLightCorrect=function(){this.drawColorBack("#33EE33")};_P.update=function(){dnpPageTimeOut=(dnpDemo?3:10);this.colorBackSelect("#FFFFFF");var A=this.controls["Label"];A.left(this.leftAlign());A.text(this.text());A=null;if(this.isYesNo()==true){var A=this.controls["btnNo"];A.left(this.width()-22);A.selected(false);A.visible(true);A.picture("image/buttons/Radio.gif");if((this.showResult())){if(this.isCorrect()==false){A.pictureSelected("image/buttons/RadioCorrect_d.gif")}else{if(this.isCorrect()==true){A.pictureSelected("image/buttons/RadioFalse_d.gif")}else{A.pictureSelected("image/buttons/Radio_d.gif")}}}A=null;var A=this.controls["btnYes"];A.left(this.width()-44);A.selected(false);A.visible(true);A.picture("image/buttons/Radio.gif");if((this.showResult())){if(this.isCorrect()==true){A.pictureSelected("image/buttons/RadioCorrect_d.gif")}else{if(this.isCorrect()==false){A.pictureSelected("image/buttons/RadioFalse_d.gif")}else{A.pictureSelected("image/buttons/Radio_d.gif")}}}A=null;this.controls["Label"].width(this.width()-this.leftAlign()-47);this.controls["mpcImage"].visible(false);this.focusBehavior(efbIgnoreAll)}else{var A=this.controls["btnYes"];A.visible(false);A=null;var A=this.controls["btnNo"];A.visible(false);A=null;this.selected(false);if(this.showMpcIcon()==true){var A=this.controls["Label"];A.left(this.leftAlign()+21);A.width(this.width()-this.leftAlign()-21-3);A=null;var A=this.controls["mpcImage"];A.picture("image/buttons/Radio.gif");A.visible(true);A=null;this.focusBehavior(efbStateAction)}else{this.controls["mpcImage"].visible(false);this.controls["Label"].width(this.width()-this.leftAlign()-3);this.focusBehavior(efbStateAction)}}};return classUpdate()})();classCreate("oWWDnpBalloonRight",cControl);var oWWDnpBalloonRight=(function(){_P.property("itemCount",0);_P.handleEvent=function(B){switch(B.eventID){case"Load":var A;this.picture("image/interface/DnpTextballoonRight.gif");this.width(249);this.height(131);for(A=1;A<=4;A++){var C=this.createControl("Answer#"+A,oWWDnpButton,4,8-30+(A*30),236,30);C.focusBehavior(efbOptionAction);C=null}var C=this.createControl("imgResult",oImage,45,20,95,85);C.picture("image/interface/dnpCorrect.gif");C.style(ecsZOrder,100);C.visible(false);C=null;break;case"Show":this.drawPicture(this.picture());this.clear();break;case"Answer_Click":this.lockButtons();this.raiseEvent("Click",{isCorrect:B.sender.isCorrect()});break}};_P.lockButtons=function(){var A=0;for(A=1;A<=4;A++){this.controls["Answer#"+A].focusBehavior(efbOptionAction)}};_P.animatedHide=function(D){var B=200;var C="";if(D==true){C="dnpcorrect.gif"}else{C="dnpfalse.gif";if(!dnpDemo){B=1000}}var A;for(A=1;A<=4;A++){this.controls["Answer#"+A].enabled(false)}this.controls["imgResult"].picture("image/interface/"+C);this.controls["imgResult"].visible(true);fadeOut(this,B,classBind(this,this.raiseMoveNext))};_P.raiseMoveNext=function(){this.controls["imgResult"].picture("");this.raiseEvent("MoveNext")};_P.clear=function(){var A=0;this.itemCount(0);for(A=1;A<=4;A++){var B=this.controls["Answer#"+A];B.focusBehavior(efbOptionAction);B.enabled(true);B.visible(false);B.mouseFocus(false);B.selected(false);B=null}this.controls["imgResult"].visible(false)};_P.addItem=function(D,C){this.opacity(0);this.visible(true);var A=this.itemCount()+1;this.itemCount(A);if(A<=4){var B=this.controls["Answer#"+A];B.visible(true);B.text(D);B.isCorrect(C);var B=null}};_P.animatedShow=function(){fadeIn(this,300)};_P.hightLightCorrect=function(){var A;for(A=1;A<=4;A++){var B=this.controls["Answer#"+A];if(B.isCorrect()){B.highLightCorrect()}B=null}fadeOut(this,1000,classBind(this,this.raiseMoveNext))};return classUpdate()})();classCreate("popupImageZoom",cControl);var popupImageZoom=(function(){_P.property("media","");_P.handleEvent=function(A){switch(A.eventID){case"Load":this.move(200,78,601,526);this.style(ecsZOrder,900);this.picture("image/interface/tutpopup_foto.gif");this.focusBehavior(efbClick);var B=this.createControl("btnClose",oButton,573,10,17,18);B.picture("image/buttons/caschefclose.gif");B=null;var B=this.createControl("Image",oImage,8,39,586,480);B.focusBehavior(efbClick);B=null;var B=this.createControl("CaptionBarIcon",oImage,11,11,18,18);B.picture("image/interface/magnifier.gif");B=null;break;case"Show":this.drawPicture(this.picture());this.controls["Image"].picture(this.media());var B=backGround.controls["Overlay"];B.show();B.addListener(this);B=null;break;case"Click":case"Image_Click":case"Overlay_Click":case"btnClose_Click":var B=backGround.controls["Overlay"];B.hide();B.removeListener(this);B=null;this.hide()}};return classUpdate()})();classCreate("scrDrillAndPractice",cControl);var scrDrillAndPractice=(function(){_P.property("pageCount",0);_P.property("score",0);_P.property("emoScore",10);_P.property("link","");_P.property("currentQuestion",0);_P.property("openQuestions",null);_P.property("status","None");_P.property("moduleScore",0);_P.property("doubleScoreSet",false);_P.property("answerCount",0);_P.property("timeDown",5,"if (this.mTimeDown > dnpMaxTimeSaved) { this.mTimeDown = dnpMaxTimeSaved }");_P.property("lowestEmo",0);_P.property("highestEmo",10);_P.property("customerNr",1);_P.property("sellerNr",1);_P.property("menuNode",null);_P.property("questionCount",0);_P.handleEvent=function(B){switch(B.eventID){case"Load":this.visible(false);var L=93;var C=68;this.picture("image/interface/bgDnp.gif");var D=this.createControl("lblModuleTitle",oLabel,29,60,594-29,18);D.style("fontWeight","bold");D.text("");D=null;var D=this.createControl("imgBackGround",oImage,150,80,724,448);D.picture("image/game/bg/bgzachtevloeren.gif");D=null;var D=this.createControl("Image",oImage,L+277,C+180,227,185);D.style("borderWidth","4px");D.style("borderColor","#FFFFFF");D.style("borderStyle","solid");D.style("zIndex",200);D.visible(false);D=null;var D=this.createControl("ImageZoom",oButton,L+405,C+190,85,22);D.visible(false);D.style("zIndex",250);D.picture("image/buttons/magnify.gif");D=null;var D=this.createControl("BalloonLeft",oWWDnpBalloonLeft,L+134,C,185,112,false);D.style("zIndex",250);D=null;var D=this.createControl("BalloonRight",oWWDnpBalloonRight,L+420,C-30,249,131,false);D.style("zIndex",250);D=null;var D=this.createControl("imgEmoMeter",oImage,L+34,C+433,263,28);D.picture("image/interface/DnpEmometer.gif");D.style("zIndex",325);D=null;var D=this.createControl("EmoPointer",oImage,L+160,C+433,18,18);D.picture("image/interface/DnpEmoPointer.gif");D.style("zIndex",350);D=null;var D=this.createControl("Help",oButton,119,538,102,102,!dnpDemo);D.picture("image/buttons/DnpTv.gif");D.style("zIndex",150);D=null;var D=this.createControl("DoubleScore",oWWDnpLargeButton,354,538,102,102);D.picture("image/buttons/Dnp2X.gif");D.style("zIndex",150);D=null;var D=this.createControl("Coffee",oWWDnpLargeButton,472,538,102,102);D.picture("image/buttons/DnpCoffee.gif");D.style("zIndex",150);D=null;var D=this.createControl("Joker",oWWDnpLargeButton,590,538,136,102);D.picture("image/buttons/DnpJoker.gif");D.style("zIndex",150);D=null;var D=this.createControl("lblCount",oLabel,L+667,C+504,100,20);D.text("_");D.style("fontWeight","bold");D.style("fontSize",11);D=null;var D=this.createControl("lblScore",oLabel,L+741,C+504,100,20);D.text("_");D.style("fontWeight","bold");D.style("fontSize",14);D=null;var D=this.createControl("lblTime",oLabel,L+728,C+545,100,20);D.text("");D.style("fontWeight","bold");D=null;var D=this.createControl("imgKlant",oImage,42,127,355,448);D.style("zIndex",150);D=null;var D=this.createControl("imgVerkoper",oImage,552,127,355,448);D.style("zIndex",150);D=null;var D=this.createControl("HelpPopup",oWWHelpPopup,135,364,337,169,false);D=null;this.mInt=0;break;case"Slider_Slide":if(B.params.slideIn==false){switch(LCase$(this.status())){case"none":this.startGame()}}break;case"DnpStart_Start":this.startGame();break;case"Show":this.status("none");if(!dnpDemo){var D=backGround.controls["Slider"];D.showHtml("intro/dnpintro.htm","Start");D.addListener(this);D.slide(true);D=null}var I=0;this.drawPicture(this.picture());this.menuNode=new dbNode(this.link());this.controls["lblModuleTitle"].text(this.menuNode.get("Title"));if(this.menuNode==null){break}var D=this.controls["imgBackGround"];D.picture(makeImageName(this.menuNode.get("Background"),"BGGAME"));D=null;this.customerNr(random(10));this.controls["imgKlant"].picture("image/game/chars/klant"+this.customerNr()+"_"+random(4)+"l.gif");var A=this.menuNode.childCount();if(dnpDemo==true){this.pageCount((debugMode?2:20))}else{this.pageCount(A)}this.openQuestions=new array(A);for(I=1;I<=A;I++){this.openQuestions[I]=I}this.score(0);this.moduleScore(0);this.lowestEmo(0);this.highestEmo(10);this.emoScore(10);this.controls["lblTime"].text("");this.controls["Coffee"].count(0);this.controls["Joker"].count(2);this.controls["DoubleScore"].count(0);if(dnpDemo){this.startGame()}break;case"Hide":this.stopInterrupt();if(LCase$(this.status())!="done"){if(!dnpDemo){lms.courseStop(this.link())}}break;case"BalloonRight_MoveNext":this.moveNext();break;case"BalloonRight_Click":var H=(B.params.isCorrect?1:-1);var M=0;var G="";var J="";var F=false;var E="";switch(H){case -1:F=false;G="Fout";J="Red";this.emoScore(this.emoScore()-20);E="klant"+this.customerNr()+"_"+(4+random(3));if(dnpDemo){this.openQuestions.splice(this.currentQuestion(),1);this.pageCount(this.pageCount()-1)}this.timeDown(dnpPageTimeOut);break;case 1:this.timeDown(this.timeDown()+dnpPageTimeOut);this.answerCount(this.answerCount()+1);if(this.answerCount()%3==0){if(this.emoScore()<0){controlName="Coffee"}else{if((this.emoScore()>50)||(random(2)==2)){controlName="DoubleScore"}else{controlName="Coffee"}}var D=this.controls[controlName];D.count(D.count()+1);D=null}F=true;G="Goed";J="Green";this.emoScore(this.emoScore()+10);this.openQuestions.splice(this.currentQuestion(),1);this.pageCount(this.pageCount()-1);E="klant"+this.customerNr()+"_"+random(4);break}this.controls["imgKlant"].picture("image/game/chars/"+E+"l.gif");this.controls["imgVerkoper"].picture("image/game/chars/verkoper"+this.sellerNr()+"_"+random(5)+"r.gif");if(this.emoScore()<-100){this.emoScore(-100)}if(this.emoScore()>100){this.emoScore(100)}if(this.emoScore()<this.lowestEmo()){this.lowestEmo(this.emoScore())}if(this.emoScore()>this.highestEmo()){this.highestEmo(this.emoScore())}M=math.round(this.emoScore()/10);if(M<1){M=1}if(this.doubleScoreSet()==true){H=H*2;this.doubleScoreSet(false)}this.score(this.score()+H*M);if(this.score()<0){this.score(0)}this.updateScore();this.controls["BalloonRight"].animatedHide(F);this.controls["BalloonLeft"].animatedHide();break;case"Coffee_Click":this.emoScore(this.emoScore()+25);if(this.emoScore()>100){this.emoScore(100)}this.updateScore();break;case"DoubleScore_Click":this.doubleScoreSet(true);break;case"Joker_Click":this.controls["BalloonRight"].hightLightCorrect();break;case"Help_Click":this.controls["HelpPopup"].visible(true);break;case"MainClose_Click":showScreen("Menu");break;case"ImageZoom_Click":var K=backGround.controls["PopupZoom"];if(K==null){K=backGround.createControl("PopupZoom",popupImageZoom,0,0,0,0)}K.media(makeImageName(this.menuNode.get("media"),"DNPZOOM"));K.show()}};_P.startGame=function(){this.status("started");this.startInterrupt();this.timeDown(dnpStartTimeOut);this.sellerNr(backGround.controls["Slider"].sellerNr());this.controls["imgVerkoper"].picture("image/game/chars/verkoper"+this.sellerNr()+"_"+random(5)+"r.gif");if(!dnpDemo){lms.courseStart(this.link())}this.showQuestion()};_P.startInterrupt=function(){if(this.mInt==0){var A=new date();this.mInt=setInterval(function(){updateTime(A)},1000)}};_P.stopInterrupt=function(){if(this.mInt!=0){clearInterval(this.mInt);this.mInt=0}};_P.moveNext=function(){var C="";var A="";if(this.pageCount()>0){this.showQuestion()}else{this.status("done");this.stopInterrupt();if(!dnpDemo){var B=backGround.controls["Slider"];B.ignoreSlideBack(true);this.moduleScore(50+(this.highestEmo()+this.lowestEmo())/2);if(this.moduleScore()<=50){C=1}else{if(this.moduleScore()<=75){C=2}else{C=3}}lms.courseStop(this.link(),this.moduleScore());B.showHtml("intro/dnpuitro"+C+".htm","Score",this.moduleScore(),this.emoScore());B.slide(true);B=null}else{currentScore=this.score();currentDemoTime=this.controls["lblTime"].text();showScreen("demoend")}}};_P.showQuestion=function(){var A=0;this.menuNode.moveRoot();if(!debugMode){this.currentQuestion(random(UBound(this.openQuestions)))}else{this.currentQuestion(1)}this.menuNode.moveDown(this.openQuestions[this.currentQuestion()]);var B=this.menuNode.get("Correct");if(B>0){B-=1}this.controls["BalloonLeft"].setText(this.menuNode.get("text"));var D=this.menuNode.get("answers");this.controls["HelpPopup"].showLinks(this.menuNode.get("KeyWordLinks"));this.controls["BalloonRight"].clear();if(isEmptyString(D)==false){var D=D.split("/");for(index=0;index<=D.length-1;index++){this.controls["BalloonRight"].addItem(D[index],B==index)}}this.updateScore();var C=this.controls["Image"];if(isEmptyString(this.menuNode.get("media"))){C.visible(false);this.controls["ImageZoom"].visible(false)}else{C.visible(true);C.picture(makeImageName(this.menuNode.get("media"),"DNP"));this.controls["ImageZoom"].visible(true)}C=null;this.controls["BalloonLeft"].animatedShow();this.controls["BalloonRight"].animatedShow()};_P.updateScore=function(){this.controls["lblCount"].text(this.pageCount());this.controls["lblScore"].text(this.score()+" ");this.controls["EmoPointer"].left(95+155+this.emoScore())};return classUpdate()})();var fadeOut=function(G,D,F){var B=100;var A=0,E=0,C=0,H=setInterval(function(){if(new Date()<=E){return 0}_TL:while(1){switch(A){case 0:G.opacity(B);E=setWakeup(D||0);A++;return ;case 1:C=setWakeup(5000);A++;case 2:B-=15;if((B<=0)){B=0}G.opacity(B);if((B<=0)){A++;break _TL}if(new Date()<=C){E=setWakeup(15);return }else{A++}case 3:if(F!=null){F()}default:clearInterval(H);return }}},10)};var fadeIn=function(G,D,F){var B=0;var A=0,E=0,C=0,H=setInterval(function(){if(new Date()<=E){return 0}_TL:while(1){switch(A){case 0:G.opacity(B);E=setWakeup(D||0);A++;return ;case 1:C=setWakeup(5000);A++;case 2:B+=15;if(B>100){B=100}G.opacity(B);if((B==100)){A++;break _TL}if(new Date()<=C){E=setWakeup(15);return }else{A++}case 3:if(F!=null){F()}default:clearInterval(H);return }}},10)};var updateTime=function(B){var A=backGround.controls["scrDrillAndPractice"];var C=new date();C.setTime(C.getTime()-B.getTime());A.controls["lblTime"].text(doubleDigit(C.getMinutes())+":"+doubleDigit(C.getSeconds()));if(A.timeDown()==1){A.emoScore(A.emoScore()-1);if(A.emoScore()<-100){A.emoScore(-100)}A.timeDown(1)}else{A.timeDown(A.timeDown()-1)}A.updateScore()};var doubleDigit=function(A){if(A<10){return"0"+A}else{return A}};screenDefs["dnp"]={name:"scrDrillAndPractice",screen:scrDrillAndPractice,linkAs:""};var gloPageLinkCount=8;var maxTutParagraphs=15;classCreate("tutHistory",null);tutHistory=(function(){var A=(function(){_P.property("answers",null);_P.create=function(){this.answers=new array()};_P.saveAnswer=function(B){this.answers[B]=true};_P.getAnswer=function(B){if(B===undefined){return false}if(this.answers[B]===undefined){return false}return true};return classUpdate()})();return new A()})();classCreate("scrTutorial",cControl);var scrTutorial=(function(){_P.property("link","");_P.property("lmsStatus","open");_P.handleEvent=function(D){switch(D.eventID){case"Load":this.visible(false);var C=29;var F=88;var B=0;this.picture("image/interface/bgTut.gif");var E=this.createControl("LinkImage",oImage,618,68,15,15);E.picture("image/buttons/TutInfo.gif");E.visible(false);E=null;var E=this.createControl("RightTitle",oLabel,638,68,330,14);E.text("");E.style("fontWeight","bold");E.style("zIndex",1000);E.style("overflow","hidden");E=null;var E=this.createControl("lblModuleTitle",oLabel,29,70,594-29,18);E.style("fontWeight","bold");E.text("Voordat je begint");E=null;var E=this.createControl("Page",oWWTutPage,29,90,594-29,557);E=null;var E=this.createControl("TutDepthMenu",oWWTutDepthMenu,618,68,350,88);E.visible(false);E=null;var E=this.createControl("TutDepthText",oWWTutDepthText,618,158,360,500);E=null;var E=this.createControl("Help",oButton,20,595,27,80);E.picture("image/buttons/HelpSmall.gif");E=null;var E=this.createControl("HelpPopup",oWWHelpPopup,10,444,337,169,false);E=null;break;case"Show":var G;this.lmsStatus("open");lms.courseStart(this.link());this.drawPicture(this.picture());this.menuNode=new dbNode(this.link());this.menuNode.moveRoot();this.menuNode.moveDown();this.updateSliderMenu(this.menuNode.clone(),1);var E=backGround.controls["Slider"];E.showHtmlSmall("intro/tutintro.htm");E.slide(true);E.addListener(this);E=null;var E=this.controls["Page"];E.show();E=null;this.drawScreen();break;case"Slider_Select":this.menuNode.moveRoot();this.menuNode.moveDown(D.params);this.drawScreen();break;case"Hide":if(this.lmsStatus()=="open"){lms.courseStop(this.link())}break;case"MainClose_Click":showScreen("Menu");break;case"TutDepthMenu_Select":this.selectRight();break;case"Page_Select":var A=D.params.linkNode.get("ID");tutHistory.saveAnswer(A);this.showRight(D.params.linkNode);break;case"Page_MoveNext":this.moveNext();break;case"Help_Click":this.controls["HelpPopup"].visible(true);break}};_P.updateSliderMenu=function(D){var A=0;var C=backGround.controls["Slider"];var B;D.moveRoot();D.moveDown();B=true;C.clearMenu();if(D.eof()==false){D.moveFirst();do{A+=1;var E=tutHistory.getAnswer(D.get("ID"));C.showMenuItem(D.get("name"),false,D.get("ID"),E);if(!E){B=false}}while(D.moveNext()==true)}if(B){if(this.lmsStatus()=="open"){this.lmsStatus("completed");lms.courseStop(this.link(),0)}}};_P.moveToNextPage=function(){};_P.moveNext=function(){if(this.menuNode.moveNext()==true){this.drawScreen()}};_P.showPage=function(){var A;var C;var B;A=pathGetFile(this.menuNode.get("Media"));C=A;this.controls["HelpPopup"].showLinks(this.menuNode.get("KeyWordLinks"));if(!isEmptyString(C)){B=right$(C,1);if(B=="9"){if(isNumber(mid$(C,len(C)-1,1))){B=right$(C,2);C=left$(C,len(C)-1)}}B=cVal(B)+1;C=left$(C,len(C)-1)+B}title=this.menuNode.parent().get("title");title+=": "+this.menuNode.get("title");this.controls["lblModuleTitle"].text(title);this.controls["RightTitle"].text("");this.controls["Page"].clearScreen(this.menuNode.get("Title"),A,C);this.menuNode.moveDown();this.controls["TutDepthMenu"].resetMenu();this.controls["TutDepthText"].updateScreen("","","");this.drawScreen()};_P.showRight=function(A){this.linkNode=A.clone();if((this.linkNode.childCount()>1)){this.controls["TutDepthMenu"].resetMenu();this.controls["TutDepthMenu"].visible(true);this.controls["TutDepthText"].move(618,158,350,420);this.controls["TutDepthText"].visible(true)}else{this.controls["TutDepthMenu"].visible(false);this.controls["TutDepthText"].move(618,98,350,570);this.controls["TutDepthText"].visible(true)}this.selectRight()};_P.selectRight=function(){var B="";var A="";var D=1;var C;this.controls["RightTitle"].text(this.linkNode.get("linktext"));if(this.linkNode.childCount()>1){D=this.controls["TutDepthMenu"].currentPage();this.controls["TutDepthMenu"].updateMenu(this.linkNode.clone())}if(D>0){C=this.linkNode.child(D);if(C!=null){B=C.get("text")}A=makeImageName(C.get("media"),"TUTL");this.controls["TutDepthText"].updateScreen(B,A,C.get("template"))}else{this.controls["TutDepthText"].updateScreen("","")}};_P.showParagraph=function(){var B=this.menuNode.get("text");var A=this.menuNode.get("linktext");this.controls["Page"].showItem(B,A,this.menuNode.clone())};_P.drawScreen=function(){var A=this.menuNode.nodeType();switch(A){case"PAGE":case"TUTPAGE":this.showPage();if(this.menuNode.canGoNext()==false){}break;case"PARAGRAPH":case"TUTPARAGRAPH":if(!this.menuNode.canGoNext()){tutHistory.saveAnswer(this.menuNode.parent().get("ID"));this.updateSliderMenu(this.menuNode.clone())}this.showParagraph();break}};return classUpdate()})();classCreate("oWWTutParagraph",cControl);var oWWTutParagraph=(function(){_P.property("text","",true);_P.property("linkText","",true);_P.property("linkNode",null);_P.handleEvent=function(A){switch(A.eventID){case"Load":this.text(this.name());this.focusBehavior(efbIgnoreAll);this.style("overflow","hidden");var B=this.createControl("Paragraph",oLabel,0,0,435);B=null;var B=this.createControl("LinkImage",oButton,445,0,15,15);B.picture("image/buttons/TutInfo.gif");B=null;var B=this.createControl("Link",oLabel,445,20,540-445,200);B.focusBehavior(efbNormalAction);B.style("textDecoration","underline");B.mouseIcon("pointer");B.style("color",WWBlue);B=null;break;case"Show":break;break;case"Link_Click":this.selectThis(A.sender.parent().groupIndex());this.raiseEvent("Select",null);break;case"LinkImage_Click":this.selectThis(A.sender.parent().groupIndex());this.raiseEvent("Select",null);break;case"Hide":break;case"Paint":if(this.selected()){this.drawColorBack("#F2E5E5")}else{if(this.mouseFocus()){this.drawColorBack("#F2D7D7")}else{this.drawColorBack("")}}this.controls["Paragraph"].text(this.text());var B=this.controls["Link"];B.text(this.linkText());B.visible(!isEmptyString(this.linkText()));if(this.linkNode()!=null){B.style("color",(tutHistory.getAnswer(this.linkNode().get("ID"))?WWVisited:WWBlue))}B=null;break;case"MouseEnter":break;case"MouseLeave":break;default:}};_P.selectThis=function(B){var A;var C=this.parent();for(A in C.controls){C.controls[A].selected(B==C.controls[A].groupIndex())}C=null};_P.loadItem=function(A,E,D,C){this.controls["Paragraph"].style("height","");this.locked(true);this.top(A);var F=inStr(E,"\n");if(F>0){E="<B style='COLOR:"+WWBlue+"'>"+left$(E,F-1)+"</B /COLOR>"+mid$(E,F)}this.text(replace$(E,"\n","<BR />"));this.controls["LinkImage"].visible((D!="")&&(D!=null));this.linkText(D);this.linkNode(C);this.selectThis(this.groupIndex());this.selected(true);this.locked(false);this.visible(true);var B=this.controls["Paragraph"].style("-clientHeight")+20;this.controls["Paragraph"].height(B);this.controls["Link"].height(B);this.height(B);return this.top()+B};return classUpdate()})();classCreate("oWWTutPage",cControl);var oWWTutPage=(function(){_P.property("currentIndex",0);_P.property("textTop",0);_P.handleEvent=function(B){switch(B.eventID){case"Load":var A;this.style("overflowY","scroll");for(A=1;A<=maxTutParagraphs;A++){var C=this.createControl("TutPar#"+A,oWWTutParagraph,0,238+((A-1)*75),545);C=null}var C=this.createControl("Dots",oImage,0,100,532,1);C.picture("image/interface/tutPageDots.gif");C=null;var C=this.createControl("TutNext",oButton,-100,-100,93,22);C.picture("image/buttons/tutnext.gif");C=null;var C=this.createControl("Image1",oImage,0,5,208,170);C=null;var C=this.createControl("Image2",oImage,217,5,208,170);C=null;break;case"Show":break;case"Hide":break;case"Paint":break;case"TutPar_Select":var D={};D.linkNode=B.sender.linkNode();this.raiseEvent("Select",D);break;case"TutNext_Click":this.raiseEvent("MoveNext")}};_P.showItem=function(D,C,B){this.currentIndex(this.currentIndex()+1);var A=this.controls["TutPar#"+this.currentIndex()].loadItem(this.textTop(),D,C,B);this.textTop(A);this.controls["Dots"].move(0,this.textTop()-5);this.controls["Dots"].visible(true);this.controls["TutNext"].move(450,this.textTop());this.controls["TutNext"].visible(B.canGoNext());this.mObject.scrollTop=A;var E={};E.linkNode=B};_P.clearScreen=function(D,A,E){var B;for(B=1;B<=maxTutParagraphs;B++){var C=this.controls["TutPar#"+B];C.top(0);C.visible(false);C=null}this.controls["Image1"].picture(makeImageName(A,"TUTS"));this.controls["Image2"].picture(makeImageName(E,"TUTS"));var C=this.controls["Dots"];C.top(0);C.visible(false);C=null;var C=this.controls["TutNext"];C.top(0);C.visible(false);C=null;this.currentIndex(0);this.textTop(198);this.height((this.height()==557?556:557))};return classUpdate()})();classCreate("oWWTutDepthMenu",cControl);var oWWTutDepthMenu=(function(){_P.property("currentPage",0);_P.property("pageCount",0);_P.handleEvent=function(A){switch(A.eventID){case"Load":var B=this.createControl("ScrollLeft",oButton,0,40,6,11);B.picture("image/buttons/ScrollLeft.gif");B=null;var B=this.createControl("ScrollRight",oButton,356,40,6,11);B.picture("image/buttons/ScrollRight.gif");B=null;for(index=1;index<=gloPageLinkCount;index++){var B=this.createControl("PageLink#"+index,oImage,10+(index-1)*49,25,46,38);B.focusBehavior(efbOptionAction);B.style("borderWidth","1px");B.style("borderColor",WWGrey);B.style("borderStyle","solid");B.opacity(40);B=null}break;case"Show":break;case"ScrollLeft_Click":if(this.currentPage()>1){this.currentPage(this.currentPage()-1);this.raiseEvent("Select",null)}break;case"ScrollRight_Click":if(this.currentPage()<this.pageCount()){this.currentPage(this.currentPage()+1);this.raiseEvent("Select",null)}break;case"PageLink_Click":this.currentPage(A.sender.groupIndex());this.raiseEvent("Select",null);break;case"PageLink_MouseEnter":if(A.sender.opacity()==40){A.sender.opacity(80)}break;case"PageLink_MouseLeave":if(A.sender.opacity()==80){A.sender.opacity(40)}break}};_P.resetMenu=function(){var A;this.currentPage(1);this.pageCount(1);this.controls["ScrollLeft"].visible(false);this.controls["ScrollRight"].visible(false);this.parent().controls["LinkImage"].visible(false);for(A=1;A<=gloPageLinkCount;A++){var B=this.controls["PageLink#"+A];B.visible(false);B.picture(makeImageName("","TB"));B.style("borderColor",WWGrey);B=null}};_P.updateMenu=function(D){var B=0;var H="";var A="";var G=0;var E="";this.parent().controls["LinkImage"].visible(true);if(D.moveDown()==true){do{B++;H=D.get("text");G=inStr(H,"\n");if(G>0){H=left$(H,G-1)}if(B==this.currentPage()){A="black";E=""}else{E="underline";A=WWBlue}var F=this.controls["PageLink#"+B];F.visible(true);var C=D.get("template");switch(LCase$(C)){case"video":F.picture(makeImageName("","TBVIDEO"));break;default:F.picture(makeImageName(D.get("media"),"TB"))}F.opacity((B==this.currentPage()?100:40));F.style("borderColor",(B==this.currentPage()?WWBlue:WWGrey));F=null}while(D.moveNext()==true);this.pageCount(B);for(B=B+1;B<=gloPageLinkCount;B++){this.controls["PageLink#"+B].visible(false)}}this.controls["ScrollLeft"].visible(true);this.controls["ScrollRight"].visible(true)};return classUpdate()})();classCreate("oWWTutDepthText",cControl);var oWWTutDepthText=(function(){_P.property("showFeedbackAfter",0);_P.property("currentTop",0);_P.handleEvent=function(A){switch(A.eventID){case"Load":var B=this.createControl("Image",oImage,0,0,305,249);B.picture("");B=null;var B=this.createControl("Flash",oMedia,-7,0,377,522,false);B.fileName("");B=null;var B=this.createControl("Text",oLabel,0,300,350);B.text("");B.autoSize(true);B=null;var B=this.createControl("YesNoHeader",oLabel,300,330,100,20);B.visible(false);B.text("");B=null;for(index=1;index<=10;index++){var B=this.createControl("Answer#"+index,oWWDnpButton,0,0,350,35);B.text("");B.showMpcIcon(true);B.autoSize(true);B.visible(false);B=null}var B=this.createControl("Feedback",oLabel,0,300,350,200);B.text("Bla");B.style("zIndex",100);B.autoSize(true);B.visible(false);B=null;break;case"Show":break;case"Answer_Click":if(A.sender.groupIndex()>=this.showFeedbackAfter()){var B=this.controls["Feedback"];B.top(this.currentTop()+6);B.visible(true);B=null}else{var B=this.controls["Answer#"+(A.sender.groupIndex()+1)];if(B.visible()==false){B.top(this.currentTop());B.show();this.currentTop(this.currentTop()+B.height()+2)}B=null}break}};_P.clearScreen=function(){var A;this.controls["Text"].visible(false);this.controls["Image"].visible(false);this.controls["Feedback"].visible(false);this.controls["Flash"].hide();this.controls["YesNoHeader"].visible(false);for(A=1;A<=10;A++){this.controls["Answer#"+A].visible(false)}};_P.updateScreenFlash=function(C,A){C=makeImageName(C,"FLASH");var B=this.controls["Flash"];B.fileName(C);if(A=="flash"){B.move(-7,0,377,522)}else{B.move(0,0,362,318)}B.show();B=null};_P.updateScreen=function(P,F,O){var B="";var D;var G;var I=[];var N;var K=1;var A;var M=0;var H;var L;var C=0;var J;this.clearScreen();this.currentTop(0);switch(LCase$(O)){case"flash":this.updateScreenFlash(F,"flash");F="";break;case"video":this.updateScreenFlash(F,"video");this.currentTop(300);F=""}B=valueFromIni$(P,"Uitslag:");if(B!=""){B=beautifyText("Uitslag:\n"+B);P=nameFromIni$(P,"Uitslag:")}if(B!=""){D=valueFromIni$(P,"-");P=nameFromIni$(P,"-");D=splitTrim$(D,"-");for(K=0;K<=D.length-1;K++){G=trim$(D[K]);N=false;if(G!=""){H=right$(G,1);switch(H){case"v":case"V":G=trim$(left$(G,G.length-1));N=true;break;case")":if((G.length>3)&&LCase$(right$(G,3))=="(v)"){G=trim$(left$(G,G.length-3));N=true}}}if(N==true){C+=1}I[K+1]={text:G,value:N}}if(LCase$(O)=="mpc"){J="mpc"}else{if(inStr(O,"/")>0){J="yesno"}else{if(C==1){J="mpc"}else{if(C>1){J="yesno";O="ja/nee"}}}}}A=this.controls["Image"];if(F==""){A.visible(false)}else{A.visible(true);A.picture(F);this.currentTop(260)}P=beautifyText(P);A=this.controls["Text"];A.height(0);A.mObject.style.height="";A.text(P);A.top(this.currentTop());A.visible(true);this.currentTop(this.currentTop()+A.style("-clientHeight")+10);A=this.controls["YesNoHeader"];if(J=="yesno"){A.top(this.currentTop());A.text(O);this.currentTop(this.currentTop()+30);A.visible(true)}else{A.visible(false)}for(K=1;K<=I.length-1;K++){A=this.controls["Answer#"+K];A.text(I[K].text);A.isCorrect((C==0?null:I[K].value));A.isYesNo(J=="yesno");A.showResult(C>0);if((J=="mpc")||(K==1)){A.show();A.top(this.currentTop());this.currentTop(this.currentTop()+A.height()+2)}else{A.visible(false)}}this.showFeedbackAfter((J=="mpc"?0:K-1));var E=this.controls["Feedback"];E.text(B);E=null};return classUpdate()})();screenDefs["wpo"]={name:"scrTutorial",screen:scrTutorial,linkAs:""};screenDefs["tut"]={name:"scrTutorial",screen:scrTutorial,linkAs:""}
