﻿
		/*
 * Copyright (C) 2007 Trivantis Corporation
 */

	
var QUESTION_LIKERT_3AGREE=0x20;var QUESTION_LIKERT_4AGREE=0x40;var QUESTION_LIKERT_5AGREE=0x80;var QUESTION_LIKERT_3IMP=0x100;var QUESTION_LIKERT_4IMP=0x200;var QUESTION_LIKERT_5IMP=0x400;var QUESTION_LIKERTBKGD_1BAR=0x800;var QUESTION_LIKERTBKGD_2BAR=0x1000;function jsWndObj(){var A=this;A.actFlags=0;A.bLButtonDown=0;A.cwObj=n;A.rtRect=new jsRect(0,0,0,0);A.name=n;A.div=n;A.ptPending=new jsPoint(-1,-1);A.ptDown=new jsPoint(-0,0);A.dTL=n;A.dT=n;A.dTR=n;A.dLT=n;A.dL=n;A.dLB=n;A.dBL=n;A.dB=n;A.dBR=n;A.dRT=n;A.dR=n;A.dRB=n;A.dCon=n;A.idSize=n;A.rectSize=n;A.zindex=0;A.bEnabled=1;A.currTrans=0;if (A.designTime){jsWndObj.prototype.designTime.call(A);A.designTime();}};var p=jsWndObj.prototype;p.attach=function(A,B,C){var D=this;var E=B.a;D.div=document.getElementById(A);D.div.tObj=D;var F=String(D.div.id);while (F&&F.length&&isNaN(F)) F=F.substring(1);if(F&&F.length){var G=document.createElement('A');G.name=String(F)+'anc';var H="javascript://"+F;var I=D.div.firstChild;G.href=H;if(C) {D.div.removeChild(I);D.div.appendChild(G);G.appendChild(I);}};D.parPage=trivPage;D.actFlags=E[0];D.dwFlags=E[1];D.cwObj=new cwObjPub();D.cwObj.wnd=D;D.cwObj.transData=E[2];D.rtRect.set(E[3][0],E[3][1],E[3][2],E[3][3]);if(D.cwObj.getTrans(t)||D.cwObj.getTrans(f)){D.cwObj.rect=D.rtRect.copy();if(typeof E[2][6]!='undefined'){D.cwObj.rect.x=E[2][6];D.cwObj.rect.y=E[2][7];}};D.setTrans(t);if(D.currTrans){if(!jsTrans.isFIFO(D.currTrans)) D.div.style.visibility='hidden';};D.bLiveWin=B.bLiveWin;};p.editMode=function() {return (this.designTime&&titleData.mode==1);};p.mouseDown=function(e){var A=this;if (A.editMode()) A.mouseDownEdit(e);else{if(e.which==1||(e.which==n&&(e.button==0||e.button==1))){A.bLButtonDown=1;var B=A.cwObj;if(A.designTime&&B&&B.par&&B.par.type==13){var C=B.par.isLiveQuestObject(B);if(C) A.parPage.questObjMouseDown(A,e,C);} else if(!A.designTime){if (A.down) return A.down();}}}};p.mouseMove=function(e){var A=this;if (A.editMode()) A.mouseMoveEdit(e);else{var B=A.cwObj;if(A.designTime&&B&&B.par&&B.par.type==13){var C=B.par.isLiveQuestObject(B);if(C) A.parPage.questObjMouseMove(A,e,C);}}};p.mouseUp=function(e){var A=this;if(A.parPage.rtData1!=-1){if(document.releaseEvents) document.releaseEvents(Event.MOUSEMOVE);if(document.releaseEvents) document.releaseEvents(Event.MOUSEUP);document.onmousemove=A.parPage.rtData1;document.onmouseup=A.parPage.rtData2;A.parPage.rtData1=-1;A.parPage.rtData2=-1;};if (A.editMode()) A.mouseUpEdit(e);else{if(A.bLButtonDown&&(A.actFlags&0x4)) A.issueActions(2);A.bLButtonDown=0;var B=A.cwObj;if(A.designTime&&B&&B.par&&B.par.type==13){var C=B.par.isLiveQuestObject(B);if(C) A.parPage.questObjMouseUp(A,e,C);}}};p.mouseEnter=function(){if(!(this.editMode())) if (this.actFlags&0x1) this.issueActions(0);};p.mouseExit=function(){if(!(this.editMode())) if (this.actFlags&0x2) this.issueActions(1);};p.mouseDblClk=function(e){if(this.editMode()) this.mouseDblClkEdit(e);else if(this.actFlags&0x8) this.issueActions(3);};p.contextMenu=function(e){if(this.editMode()) this.contextMenuEdit(e);else if(this.actFlags&0x200){this.issueActions(9);return cancelEvent(e);};if (this.designTime) return cancelEvent(e);};p.isPlaying=function(){return f;};p.play=function(){};p.actionPlay=p.play;p.stop=function(){};p.actionStop=p.stop;p.isVisible=function(){return (this.div&&this.div.style.visibility!='hidden');};p.show=function(){var A=this;var B=A.div.style;var C=window.titleData&&window.titleData.publishTextOnly?true:false;if(!(A.editMode())){var D=A.isVisible();if(!A.bShown){A.bShown=t;D=f;};if (C) B.visibility='inherit';else{if(D||A.isTransitioning(t)) return;if(A.isTransitioning(f)) A.cancelTrans();if((!A.cwObj)||!A.cwObj.getTrans(t)) B.visibility='inherit';};if(A.actFlags&0x20) A.issueActions(5);}else B.visibility='inherit';};p.actionShow=p.show;p.hide=function(){var A=this;if(!(A.editMode())){if(A.isVisible()==f||A.isTransitioning(f)||!A.div) return;if(A.isTransitioning(t)) A.cancelTrans();if((!A.cwObj)||!A.cwObj.getTrans(f)) A.div.style.visibility='hidden';if(A.actFlags&0x100) A.issueActions(8);}else A.div.style.visibility='hidden';};p.actionHide=p.hide;p.actionTogglePlay=p.togglePlay;p.actionToggleShow=p.toggleShow;p.issueActions=function(A){var B=this;var C=B.cwObj;var D=window.titleData&&window.titleData.publishTextOnly?true:false;if(!D){if ((A==5&&C.getTrans(t))||(A==8&&C.getTrans(f))){if(B.timerIn) clearTimer(B.timerIn);if(B.timerOut) clearTimer(B.timerOut);if(B.currTrans&&B.transTmrId){clearTimeout(B.transTmrId);B.transTmrId=n;B.transDone(B);};if(!B.currTrans) B.setTrans(A==5);var E=C.getTransDelay(A==5);trivLogMsg("Transition started to "+(A==5?"show":"hide")+" ["+C.name+"] with a "+E+"ms delay",4);if(E) B.transTmrId=setTimeout(function(){ B.transTmrId=n;B.doTrans(A==5);},E);else B.doTrans(A==5);if(A==5) B.parPage.arTransInWnds.push(B);else B.parPage.arTransOutWnds.push(B);return;}};B.issueActionsInternal(A,D);};p.issueActionsInternal=function(A,B){var C=this;var D=C.cwObj;var E=C.parPage;var F=E.arDelayAct;trivArExec(D.arChld,function(chld,i){if(chld.type==6&&chld.on==A){if(!chld.delay){if (B){var G=chld.actItem.action;if (!(G==8||G==11||G==22||G==23||G==28||G==3||G==4)) return;};E.doAction(chld.actItem,chld.elseItem,chld);}else if (!B){var H=setTimeout(function(){for(var j=0;j<F.length;j++) {if(F[j]==H){F.splice(j,1);break;}};E.doAction(chld.actItem,chld.elseItem,chld);},chld.delay);F.push(H);}}});};p.isTransitioning=function(A){var B=this.div;if(B&&B.bTrans&&B.bIn==A) return t;return f;};p.cancelTrans=function(){var A=this;var B=A.div;if(!jsTrans.isFIFO(A.currTrans)&&theApp.is.ie){B.filters.revealTrans.stop();}else{B.bTrans=f;if(jsTrans.isFIFO(A.currTrans)){B.style.left=B.fX+'px';B.style.top=B.fY+'px';if(!B.bIn) B.style.visibility="hidden";}else B.style.clip="rect(0px "+A.cwObj.rect.width+" "+A.cwObj.rect.height+" 0px)";};A.transDone(A);};p.updatePosForTrans=function(A){var B=this;var C=B.cwObj;var D=B.rtRect;var E=B.currTrans;var F=B.parPage;var G=20;var H=new jsRect(C.getXPos(F.currPage),C.getYPos(F.currPage),C.rect.width,C.rect.height);if(B.bHasMoved){H.x=D.x;H.y=D.y;};if(B.bHasSized){H.width=D.width;H.height=D.height;};D.setRect(H);var I=new jsRect(0,0,parseInt(F.div.style.width),parseInt(F.div.style.height));if (B.designTime){var J=C.par;var K=n;while(J){var L=titleData.isGroup(J);if (!L) break;if(J.getTrans(A)) K=J;J=J.par;};if(K){var M=H.copy();K.getBoundingRect(M,F.currPage);if(A){if(E==31||E==30||E==29) I.x-=(M.right()-H.right());if(E==31||E==24||E==25) I.y-=(M.bottom()-H.bottom());if(E==25||E==26||E==27) I.width+=(H.x-M.x);if(E==29||E==28||E==27) I.height+=(H.y-M.y);}else{if(E==31||E==30||E==29) I.x-=(M.right()-H.right());if(E==31||E==24||E==25) I.y-=(M.bottom()-H.bottom());if(E==25||E==26||E==27) I.width+=(H.x-M.x);if(E==29||E==28||E==27) I.height+=(H.y-M.y);}}};if(A){if(E==31||E==30||E==29){D.x=I.x-G-H.width;}else if(E==25||E==26||E==27){D.x=I.right()+G+H.width;};if(E==25||E==24||E==31){D.y=I.y-G-H.height;}else if(E==27||E==28||E==29){D.y=I.bottom()+G+H.height;};B.moveTo(D.x,D.y);}else{B.rectTransOut=H.copy();if(E==31||E==30||E==29){B.rectTransOut.x=I.x-G-H.width;}else if(E==25||E==26||E==27){B.rectTransOut.x=I.right()+G+H.width;};if(E==25||E==24||E==31){B.rectTransOut.y=I.y-G-H.height;}else if(E==27||E==28||E==29){B.rectTransOut.y=I.bottom()+G+H.width;}}};p.doTrans=function(A,B,C,D){var E=this;var F=E.div;if (!F) return;if(!jsTrans.isFIFO(E.currTrans)&&theApp.is.ie){F.style.filter="revealTrans(duration="+(11-(D!=undefined?D:E.cwObj.getTransSpeed(A)))+",transition="+(E.currTrans-1)+")";F.onfilterchange=function() { if(C) C();else E.transDone(E);};F.filters.revealTrans.apply();F.style.visibility=A?"inherit":"hidden";F.filters.revealTrans.play();}else{if(jsTrans.isFIFO(E.currTrans)){if(A) doDivTrans(f,F,E.currTrans-1,(11-E.cwObj.getTransSpeed(A)),C?C:E.transDone,E,E.cwObj.getXPos(),E.cwObj.getYPos());else if(E.rectTransOut) doDivTrans(t,F,E.currTrans-1,(11-E.cwObj.getTransSpeed(A)),C?C:E.transDone,E,E.rectTransOut.x,E.rectTransOut.y);}else doDivTrans(!A,F,E.currTrans-1,(11-E.cwObj.getTransSpeed(A)),C?C:E.transDone,E);}};p.transDone=function(A){if(!A.div) return;A.currTrans=0;A.rtRect.x=parseInt(A.div.style.left);A.rtRect.y=parseInt(A.div.style.top);var i=0;for(i=0;i<A.parPage.arTransInWnds.length;i++){if(A.parPage.arTransInWnds[i]==A){A.parPage.arTransInWnds.splice(i,1);if(A.actFlags&0x20) A.issueActionsInternal(5);return;}};for(i=0;i<A.parPage.arTransOutWnds.length;i++){if(A.parPage.arTransOutWnds[i]==A){A.parPage.arTransOutWnds.splice(i,1);if(A.actFlags&0x100) A.issueActionsInternal(8);break;}};if(!A.parPage.arTransOutWnds.length&&A.parPage.fDelayedSwitch){A.parPage.switchPage(A.parPage.nextPage,0,0,1);}};p.setTrans=function(A){var B=this;B.currTrans=B.cwObj.getTrans(A);if(B.currTrans){if(B.currTrans==33) B.currTrans=randMinMax(1,23);else if(B.currTrans==32){if(B.cwObj.bLiveWin) B.currTrans=randMinMax(24,31);else B.currTrans=randMinMax(1,31);};B.updatePosForTrans(A);}};p.toggleVisibility=function(){if (this.isVisible()) this.hide();else this.show();};p.enable=function(A){this.bEnabled=A;};p.getRect=function(){return (this.rtRect.copy());};p.moveTo=function(x,y){var A=this;A.rtRect.x=parseInt(x);A.rtRect.y=parseInt(y);if (A.div){A.div.style.left=x+'px';A.div.style.top=y+'px';}};p.moveBy=function(x,y){var A=this;A.rtRect.x+=parseInt(x);A.rtRect.y+=parseInt(y);if (A.div){A.div.style.left=this.rtRect.x+'px';A.div.style.top=this.rtRect.y+'px';}};p.sizeTo=function(w,h){var A=this;if(w<0)w=0;if(h<0)h=0;A.rtRect.width=w;A.rtRect.height=h;if (A.div){A.div.style.width=w+'px';A.div.style.height=h+'px';};if(A.dCon){A.dCon.style.width=w+'px';A.dCon.style.height=h+'px';}};p.flsLoading=function(A){if (!A||typeof A.PercentLoaded=='undefined') return t;return (A.PercentLoaded()!=100);};function jsWndImage(){jsWndObj.prototype.constructor.call(this);};p=jsWndImage.prototype=new jsWndObj();p.constructor=jsWndImage;p.attach=function(A,B,C){var D=this;jsWndObj.prototype.attach.call(D,A,B,C);D.dCon=D.div.getElementsByTagName('IMG')[0];};p.isVisible=function(){return (this.currTrans?t:jsWndObj.prototype.isVisible.call(this));};p.changeContents=function(A){if (this.dCon){var B=this.designTime?A.getLink():A;if (!this.designTime&&theApp.is.ie6){if (this.dCon.src.indexOf('.png')==this.dCon.src.length-4){this.div.style.filter='';this.dCon.style.filter='';};if (B.indexOf('.png')==B.length-4){this.div.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+B+"',sizingMethod='scale')";this.dCon.style.filter='progid:DXImageTransform.Microsoft.Alpha(opacity=0)';}};this.dCon.src=B;}};function jsWndButton(){jsWndObj.prototype.constructor.call(this);};p=jsWndButton.prototype=new jsWndObj();p.constructor=jsWndButton;p.attach=function(A,B,C){var D=this;jsWndObj.prototype.attach.call(D,A,B,C);D.dCon=D.div.getElementsByTagName('IMG')[0];D.src=B.res;D.clickSrc=B.resClick;D.overSrc=B.resOver;D.div.style.cursor="pointer";};p.mouseDown=function(e){if(!this.editMode()) this.dCon.src=this.clickSrc;return jsWndObj.prototype.mouseDown.call(this,e);};p.mouseUp=function(e){var A=this;if(!(A.editMode())){A.dCon.src=A.overSrc;if(A.bLButtonDown) A.parPage.doAction(A.cwObj.actItem,n,A.cwObj);};return jsWndObj.prototype.mouseUp.call(A,e);};p.mouseMove=function(e){if(this.editMode()) return jsWndObj.prototype.mouseMove.call(this,e);};p.mouseEnter=function(){if(!(this.editMode())){this.dCon.src=this.bLButtonDown?this.clickSrc:this.overSrc;return jsWndObj.prototype.mouseEnter.call(this);}};p.mouseExit=function(){if((!this.editMode())&&this.dCon){this.dCon.src=this.src;return jsWndObj.prototype.mouseExit.call(this);}};function jsWndAnimImage(){jsWndObj.prototype.constructor.call(this);};p=jsWndAnimImage.prototype=new jsWndObj();p.constructor=jsWndAnimImage;p.attach=function(A,B,C){var D=this;jsWndObj.prototype.attach.call(D,A,B,C);D.bIsFlash=B.isFlash;D.getFlashObj();D.dCon=D.div.getElementsByTagName(D.bIsFlash?'DIV':'IMG')[0];};p.getFlashObj=function(){var A=this;if (!A.bIsFlash) return f;if (!A.flshObj){try {if(theApp.is.ie||(navigator.appVersion.indexOf("Mac")!=-1)) A.flshObj=A.div.getElementsByTagName('OBJECT')[0];else A.flshObj=A.div.getElementsByTagName('embed')[0];}catch(e){}};return A.flshObj;};p.fReadyChk=function(A,B){B=B?B:0;if (B>4) return f;var C=this;var D=C.getFlashObj();var E=t;if ((!D)||typeof(D.PercentLoaded)=='undefined'||D.PercentLoaded()!=100){setTimeout(function(){A.call(C,++B);},100);E=f;};return E;};p.play=function(A){if (this.fReadyChk(this.play,A)) this.flshObj.Play();};p.stop=function(A){if (this.fReadyChk(this.stop,A)){this.flshObj.GotoFrame(0);this.flshObj.StopPlay();}};p.togglePlay=function(A){if (this.fReadyChk(this.play,A)){if (this.flshObj.IsPlaying()) this.stop();else this.play();}};p.pause=function(A){if (this.fReadyChk(this.pause,A)) this.flshObj.StopPlay();};p.gotoNextFrame=function(A){if (this.fReadyChk(this.gotoNextFrame,A)){var B=this.flshObj.CurrentFrame()+1;this.flshObj.GotoFrame(B);}};p.gotoPrevFrame=function(A){if (this.fReadyChk(this.gotoPrevFrame,A)){var B=this.flshObj.CurrentFrame()-1;this.flshObj.GotoFrame(B);}};p.gotoLabel=function(A){var B=this.getFlashObj();if(B) B.TGotoLabel('/',A);};p.setVariable=function(A,B){var C=this.getFlashObj();if(C) C.SetVariable(A,B);};p.getVariable=function(A){var B=this.getFlashObj();if(B) return B.GetVariable(A);return 0;};p.isPlaying=function(){var A=this.getFlashObj();if(A) return A.IsPlaying();return t;};p.gotoFrame=function(A){var B=this.getFlashObj();if(B) B.GotoFrame(A);};p.callFunction=function(A,B,C){var D=n;var E=this;if (!C) C=0;else if (C>4) return;var F=this.getFlashObj();if(F&&typeof F[A]!="undefined"){if(B==null||B=='') D=F[A]();else D=F[A](B);}else setTimeout(function(){E.callFunction(A,B,++C);},250);return D;};p.isDone=function(){var A=this.getFlashObj();if(!A||typeof A.CurrentFrame=="undefined") return;var B=parseInt(A.CurrentFrame())+1;var C;if(theApp.is.ie) {C=parseInt(A.TotalFrames);}else        {C=parseInt(A.TotalFrames());};if((!A.IsPlaying()&&this.autoPlay)||B>=C) {this.onDone();window.clearInterval(this.hasDone);}};p.onDone=function() {var A=this.designTime?wndPage:trivPage;trivArExec(this.cwObj.arChld,function(o,i){if (o.type==6&&o.on==6) A.doAction(o.actItem,o.elseItem,o);});};function jsWndAudio(){jsWndObj.prototype.constructor.call(this);};p=jsWndAudio.prototype=new jsWndObj();p.constructor=jsWndAudio;p.isVisible=function(){return (this.div&&this.div.style.visibility!='hidden'&&!this.initHidden);};p.show=function(){var A=this;if(A.initHidden){var B=A.rtRect;var C=A.div.style;var D=A.name;C.left=B.x+'px';C.top=B.y+'px';C.width=B.width+'px';C.height=B.height+'px';if(A.cwObj.iDisplay==2){var E=['swf'+D,'embed'+D,D+'obj'];for(var i=0;i<E.length;i++){var F=document.getElementById(E[i]);if(F){F.width=B.width;F.height=B.height;}};A.snd.div.style.visibility='inherit';var G=A.snd.div.getElementsByTagName('div');if(G&&G.length) G[0].style.display='none';};A.snd.show();};A.initHidden=f;if(theApp.is.iOS&&A.cwObj.iDisplay==2){var H=document.getElementById("html5"+A.name);H.controls=true;};jsWndObj.prototype.show.call(A);};p.hide=function(){var A=this;A.manualHide=t;if(theApp.is.iOS&&A.cwObj.iDisplay==2){var B=document.getElementById("html5"+A.name);B.controls=false;};jsWndObj.prototype.hide.call(A);};p.attach=function(A,B,C,D,E){var F=this;if(!D) D=F.stdHtml;if(!E) E=F.iosHtml;var G=B.a;if(theApp.is.iOS&&B.iDisplay==2) if(G[3][4]) G[3][3]+=G[3][4];jsWndObj.prototype.attach.call(F,A,B,C);var H=F.cwObj;F.name=A;if(typeof F.initHidden=='undefined') F.initHidden=B.initHidden;var I=(F.initHidden!=B.initHidden);F.initHidden=B.initHidden;if(F.manualHide){F.div.style.visibility='inherit';};H.iDisplay=B.iDisplay;F.snd=new jsSound();F.snd.div=document.getElementById("snd"+A);F.snd.div.innerHTML=(theApp.is.iOS?E:D);F.snd.audio=F;F.snd.div.tObj=F;H.isFlashAudio=function(){return B.isFlash;};H.hasEvents=function(){return B.hasEvents;};H.supportsEvents=function(){return B.supportsEvents;};H.linkName=B.linkName;F.onDone=function() { F.snd.onDone();};F.onEvent=function(o) { F.snd.onEvent(o);};if(theApp.is.iOS){var J=document.getElementById("html5"+A);J.addEventListener('ended',F.onDone,false);if(F.dwFlags&0x20000){J.load();J.play();}};var K=F.snd.div.getElementsByTagName('div');if(K&&K.length&&!theApp.is.ie&&F.cwObj.isFlashAudio()){K[0].style.display='none';K[0].style.overflow='hidden';};if(I) F.show();};p.mouseDown=function(e){var A=this;if(!A.editMode()&&(A.cwObj.iDisplay==0||A.cwObj.iDisplay==3)){if(e.which==1||(e.which==n&&(e.button==0||e.button==1))) A.togglePlay();};return jsWndObj.prototype.mouseDown.call(A,e);};p.play=function(){if ((!this.editMode())&&this.snd) this.snd.play();};p.togglePlay=function(){if ((!this.editMode())&&this.snd) this.snd.togglePlay();};p.pause=function(){if ((!this.editMode())&&this.snd) this.snd.pause();};p.stop=function(){if ((!this.editMode())&&this.snd) this.snd.stop();};p.isPlaying=function(){if ((!this.editMode())&&this.snd) return this.snd.isPlaying();return f;};p.isResType=function(A){var B=this.cwObj;var C=(this.cwObj.res&&B.res.linkName)?B.res.linkName:(B.linkName?B.linkName:"");if(!C||!C.length||!A||!A.length) return 0;var D="";for(var i=0;i<A.length;i++) {if(D.length) D+="|";D+=("\\."+A[i]);};if(!D.length) return 0;D=".*("+D+")$";var E=RegExp(D,"i");return E.test(C);};function jsSound(){var A=this;A.audio=n;A.bPlaying=0;A.winMgrId=n;A.flsPlayer=n;A.wmPlayer=n;A.wmEventHandlerScripts=[];};p=jsSound.prototype=new jsWndObj();p.constructor=jsSound;p.show=function() {var A=this;var B=A.audio.rtRect;var C=A.div.style;C.left='0px';C.top='0px';C.width=B.width+'px';C.height=B.height+'px';C.opacity='1';C.filter='alpha(opacity=100)';};p.onEvent=function(A) {var B=this.audio.cwObj;trivLogMsg("Event ["+A+" on "+B.name+"] fired!",4);var C=this.designTime?wndPage:trivPage;if (!B.hasEvents()) return;trivArExec(B.arEvents,function(o,i){if (o.name==A) {C.doAction(o.actItem);return f;}});};p.onDone=function() {var A=this.designTime?wndPage:trivPage;trivArExec(this.audio.cwObj.arChld,function(o,i){if (o.type==6&&o.on==6) A.doAction(o.actItem,o.elseItem,o);});};p.play=function(){var A=this;if (A.div){var B=A.div.getElementsByTagName('embed');if (theApp.is.iOS){var C=document.getElementById('html5'+A.audio.name);if (C) C.play();}else if (A.audio.cwObj.isFlashAudio()){A.setFlashPlayer();if (A.flsLoading(A.flsPlayer)){theApp.SetTimeout(A.play,100,A);return;};if (!A.isPlaying()) setTimeout(function(){A.flsPlayer.sendEvent('play');},500);}else if ((A.audio.cwObj.supportsEvents()||B.length==0)&&theApp.is.ie){A.setWmPlayer();if (A.wmPlayer&&A.wmPlayer.controls) A.wmPlayer.controls.play();}else{var D=(typeof B[0].controls=='object'?B[0].controls:B[0]);if (D){if (typeof D.pause!=='undefined'&&(!this.isOldWM(D)||D.playState!==3)){D.play();}else if (typeof D.Step!=='undefined'){var E=D.GetPluginStatus();if (!E) return;if (E.IContains('waiting')||E.IContains('playable')){setTimeout(function(){A.play();},100);return;};if (!E||!E.IContains('complete')) return;D.Play();}else if (typeof D.DoPause!=='undefined'){if(!A.bPlaying) D.DoPlayPause();}else{A.resetEmbed((A.audio.cwObj.dwFlags&0x80000>0),t);}}};A.bPlaying=1;}};p.togglePlay=function(){var A=this;if (A.div){var B=A.div.getElementsByTagName('embed');if (theApp.is.iOS){var C=document.getElementById('html5'+A.audio.name);if (C){if (A.bPlaying) C.pause();else C.play();}}else if(A.audio.cwObj.isFlashAudio()){A.setFlashPlayer();if (A.flsLoading(A.flsPlayer)){theApp.SetTimeout(A.togglePlay,100,A);return;};A.flsPlayer.sendEvent('play');}else if ((A.audio.cwObj.supportsEvents()||B.length==0)&&theApp.is.ie){A.setWmPlayer();if (A.wmPlayer&&A.wmPlayer.controls){A.setPlayState(A.wmPlayer);if (A.bPlaying) A.wmPlayer.controls.pause();else A.wmPlayer.controls.play();}}else{var D=(typeof B[0].controls!=='undefined'?B[0].controls:B[0]);if (D){A.setPlayState(D);if (typeof D.pause!=='undefined'){if (A.bPlaying) D.pause();else D.play();}else if (typeof D.Step!=='undefined'){var E=D.GetPluginStatus();if (!E) return;if (E.IContains('waiting')||E.IContains('playable')){setTimeout(function(){A.togglePlay();},100);return;};if (!E.IContains('complete')) return;if (A.bPlaying) D.Stop();else D.Play();}else if (typeof D.DoPause!=='undefined'){D.DoPlayPause();}}};A.bPlaying=(A.bPlaying==1?0:1);}};p.pause=function(){var A=this;if (A.div){var B=A.div.getElementsByTagName('embed');if (theApp.is.iOS){var C=document.getElementById('html5'+A.audio.name);if(C) C.pause();}else if (A.audio.cwObj.isFlashAudio()){A.setFlashPlayer();if (A.flsLoading(A.flsPlayer)){theApp.SetTimeout(A.pause,100,A);return;};if (A.isPlaying()) A.flsPlayer.sendEvent('play');}else if ((A.audio.cwObj.supportsEvents()||B.length==0)&&theApp.is.ie){A.setWmPlayer();if (A.wmPlayer&&A.wmPlayer.controls) A.wmPlayer.controls.pause();}else{var D=(B.length?(typeof B[0].controls=='object'?B[0].controls:B[0]):n);if (D){if (typeof D.pause!=='undefined'){D.pause();}else if (typeof D.Step!=='undefined'){var E=D.GetPluginStatus();if (!E||!E.IContains('complete')) return;D.Stop();}else if (typeof D.DoPause!=='undefined'){D.DoPause();}}};A.bPlaying=0;}};p.stop=function(){var A=this;if (A.div){var B=A.div.getElementsByTagName('embed');if (theApp.is.iOS){var C=document.getElementById('html5'+A.audio.name);if(C) C.pause();}else if (A.audio.cwObj.isFlashAudio()){A.setFlashPlayer();if (A.flsLoading(A.flsPlayer)){theApp.SetTimeout(A.stop,100,A);return;};if (A.flsPlayer.sendEvent) A.flsPlayer.sendEvent('stop');}else if ((A.audio.cwObj.supportsEvents()||B.length==0)&&theApp.is.ie){A.setWmPlayer();if (A.wmPlayer&&A.wmPlayer.controls) A.wmPlayer.controls.stop();}else{var D=(B.length?(typeof B[0].controls=='object'?B[0].controls:B[0]):n);if (D){if (typeof D.pause!=='undefined'){D.stop();}else if (typeof D.Step!=='undefined'){var E=(typeof D.GetPluginStatus!=='undefined'?D.GetPluginStatus():"complete");if (!E||!E.IContains('complete')) return;D.Stop();if (typeof D.Rewind!=='undefined') D.Rewind();}else if (typeof D.DoPause!=='undefined'){D.DoStop();}else{A.resetEmbed(f,f);}}};A.bPlaying=0;}};p.setPlayState=function(A) {var B=this;if (!A){A=B.div.getElementsByTagName('embed');if (A) A=A[0];if (!A){A=B.div.getElementsByTagName('object');if (A) A=A[0];}};B.bPlaying=jsWndVideo.getPlayState(A,B.isOldWM(A),B.audio.cwObj.isFlashAudio());return B.bPlaying;};p.resetEmbed=function(A,B){var C=this.div;var D=null;for (var i=0;!D&&C.childNodes&&i<C.childNodes.length;i++) if(C.childNodes[i]&&C.childNodes[i].setAttribute) D=C.childNodes[i];if (D) {D.setAttribute("loop",A);D.setAttribute("autostart",B);C.innerHTML=C.innerHTML;}};p.setFlashPlayer=function() {if (this.flsPlayer) return;if (theApp.is.ie) {var A=this.audio.cwObj;var B=(A.iDisplay==0||A.iDisplay==3?'Audio':'');this.flsPlayer=document['swf'+this.audio.name+B];} else {var C=this.div.getElementsByTagName('object');if (C&&C.length>0) this.flsPlayer=((theApp.is.Mac&&theApp.is.Safari)?C[0]:C[0].getElementsByTagName('embed')[0]);}};p.setWmPlayer=function(){if (this.wmPlayer) return;if (theApp.is.ie) {this.wmPlayer=document[this.audio.name+'obj'];} else {var A=this.div.getElementsByTagName('object');if (A&&A.length>0) this.wmPlayer=(theApp.is.Mac?A[0]:A[0].getElementsByTagName('embed')[0]);}};p.isPlaying=function(){this.setPlayState();return this.bPlaying;};p.isOldWM=function(A){return (A&&theApp.is.ie&&typeof A.playState!='undefined'&&(typeof A.versionInfo=='undefined')&&this.audio.isResType(["mp3","wav","au","midi"]));};function jsWndVideo(){this.bPlaying=0;jsWndObj.prototype.constructor.call(this);};p=jsWndVideo.prototype=new jsWndObj();p.constructor=jsWndVideo;p.isVisible=function(){return (this.div&&this.div.style.visibility!='hidden'&&!this.initHidden);};p.show=function(){var A=this;if(A.initHidden){var B=A.rtRect;var C=A.div.style;var D=A.name;C.left=B.x+'px';C.top=B.y+'px';C.opacity='1';C.filter='alpha(opacity=100)';var E=['swf'+D,'embed'+D,D+'obj'];for(var i=0;i<E.length;i++){var F=document.getElementById(E[i]);if(F){F.width='100%';F.height='100%';}}};A.initHidden=f;jsWndObj.prototype.show.call(A);};p.attach=function(A,B,C,D,E){var F=this;var G=D?1:0;if(!D) D=F.stdHtml;if(!E) E=F.iosHtml;var H=B.a;if(theApp.is.iOS) if(H[3][4]) H[3][3]+=H[3][4];if(G) F.stop();jsWndObj.prototype.attach.call(F,A,B,C);F.name=A;if(typeof F.initHidden=='undefined') F.initHidden=B.initHidden;var I=(F.initHidden!=B.initHidden);F.initHidden=B.initHidden;F.dCon=F.div.getElementsByTagName('DIV')[0];if(G){try{var J=F.dCon;var K=J.parentNode;J.innerHTML='';K.removeChild(J);var L=document.createElement('div');L.id=J.id;L.style.cssText=J.style.cssText;K.appendChild(L);F.wmPlayer=n;F.flsPlayer=n;F.dCon=L;}catch(e) {  }};F.dCon.innerHTML=(theApp.is.iOS?E:D);F.cwObj.isFlashVideo=function() {return B.isFlash;};F.cwObj.hasEvents=function(){return B.hasEvents;};F.cwObj.supportsEvents=function(){return B.supportsEvents;};if(theApp.is.iOS){var M=document.getElementById("html5"+A);M.addEventListener('ended',function() { F.onDone();},false);M.height=F.rtRect.height;var N=document.getElementById(A);N.height=F.rtRect.height;if(F.dwFlags&0x20000){M.load();M.play();}};if(I) F.show();};p.sizeTo=function(w,h){jsWndObj.prototype.sizeTo.call(this,w,h);if(theApp.is.iOS){var A=document.getElementById("html5"+this.name);A.width=w;A.height=h;}};p.onEvent=function(A){var B=this.cwObj;trivLogMsg("Event ["+A+"] fired!",4);if (!B.hasEvents()) return;var C=this.designTime?wndPage:trivPage;trivArExec(B.arEvents,function(o,i){if (o.name==A) C.doAction(o.actItem,n,B);});};p.onDone=function(){var A=this;var B=A.designTime?wndPage:trivPage;trivArExec(A.cwObj.arChld,function(o,i){if (o.type==6&&o.on==6) B.doAction(o.actItem,o.elseItem,o);});};p.play=function(){var A=this;if ((!A.editMode())&&A.dCon){var B=A.dCon.getElementsByTagName('embed');if(theApp.is.iOS) {var C=document.getElementById('html5'+A.name);if(C) C.play();} else if(A.cwObj.isFlashVideo()){A.setFlashPlayer();if (A.flsLoading(A.flsPlayer)){A.delayDone=t;theApp.SetTimeout(A.play,100,A);return;};try{if(!A.isPlaying()) A.flsPlayer.sendEvent('play');A.tryCount=0;}catch(e){var D=t;A.tryCount=(A.tryCount?A.tryCount+1:1);if(A.tryCount>30){A.tryCount=0;if(this.designTime) D=confirm(gStrings.IDS_MSG_VIDEO_STILL_LOADING);else{if (window.console) console.log("Cannot perform video operation. The video object is not ready.");D=f;}};if(D) theApp.SetTimeout(A.play,100,A);return;}} else if ((A.cwObj.supportsEvents()||B.length==0)&&theApp.is.ie) {A.setWmPlayer();if (A.wmPlayer&&A.wmPlayer.controls) A.wmPlayer.controls.play();} else if (B.length){var E=(typeof B[0].controls=='object'?B[0].controls:B[0]);if (E){if (typeof E.pause!=='undefined'){E.play();}else if (typeof E.Step!=='undefined'){var F=E.GetPluginStatus();if (!F) return;if (F.IContains('waiting')){setTimeout(function(){A.play();},100);return;};if (!F||!F.IContains('complete')) return;E.Play();}else if (typeof E.DoPause!=='undefined'){if(!A.bPlaying) E.DoPlayPause();}else{var G=' loop="'+(A.cwObj.dwFlags&0x80000?'true':'false')+'"';A.dCon.innerHTML='<embed src="'+A.fn+'"'+A.showCont+A.strScale+' width='+A.cwObj.rect.width+' height='+A.cwObj.rect.height+' autostart="true"'+G+'" />';}}};A.bPlaying=1;}};p.togglePlay=function(){var A=this;if ((!A.editMode())&&A.dCon){var B=A.dCon.getElementsByTagName('embed');if(theApp.is.iOS) {var C=document.getElementById('html5'+A.name);if(C) {if (A.bPlaying) C.pause();else C.play();}} else if(A.cwObj.isFlashVideo()){A.setFlashPlayer();if (A.flsLoading(A.flsPlayer)){theApp.SetTimeout(A.togglePlay,100,A);return;};A.flsPlayer.sendEvent('play');} else if ((A.cwObj.supportsEvents()||B.length==0)&&theApp.is.ie) {A.setWmPlayer();if (A.wmPlayer&&A.wmPlayer.controls) {A.setPlayState(A.wmPlayer);if (A.bPlaying) A.wmPlayer.controls.pause();else A.wmPlayer.controls.play();}} else if(B.length) {var D=(typeof B[0].controls=='object'?B[0].controls:B[0]);if (D){A.setPlayState(D);D=(typeof D.controls!=='undefined'&&D.controls!==''?D.controls:D);if (typeof D.pause!=='undefined'){if (A.bPlaying) D.pause();else D.play();}else if (typeof D.Step!=='undefined'){var E=D.GetPluginStatus();if (!E) return;if (E.IContains('waiting')){setTimeout(function(){A.togglePlay();},100);return;};if (!E.IContains('complete')) return;if (A.bPlaying) D.Stop();else D.Play();}else if (typeof D.DoPause!=='undefined'){D.DoPlayPause();}}};A.bPlaying=(A.bPlaying==1?0:1);}};p.pause=function(){var A=this;if ((!A.editMode())&&A.dCon){var B=A.dCon.getElementsByTagName('embed');if(theApp.is.iOS) {var C=document.getElementById('html5'+A.name);if(C) C.pause();} else if(A.cwObj.isFlashVideo()){A.setFlashPlayer();if (A.flsLoading(A.flsPlayer)){theApp.SetTimeout(A.pause,100,A);return;};if(A.isPlaying()) A.flsPlayer.sendEvent('play');} else if ((A.cwObj.supportsEvents()||B.length==0)&&theApp.is.ie) {A.setWmPlayer();if (A.wmPlayer&&A.wmPlayer.controls) A.wmPlayer.controls.pause();} else if (B.length){var D=(typeof B[0].controls=='object'?B[0].controls:B[0]);if (D){if (typeof D.pause!=='undefined'){D.pause();}else if (typeof D.Step!=='undefined'){var E=D.GetPluginStatus();if (!E||!E.IContains('complete')) return;D.Stop();}else if (typeof D.DoPause!=='undefined'){D.DoPause();}}};A.bPlaying=0;}};p.stop=function(){var A=this;if ((!A.editMode())&&A.dCon){var B=A.dCon.getElementsByTagName('embed');if(theApp.is.iOS) {var C=document.getElementById('html5'+A.name);if(C) C.pause();} else if(A.cwObj.isFlashVideo()){A.setFlashPlayer();if (A.flsLoading(A.flsPlayer)){theApp.SetTimeout(A.stop,100,A);return;};if(A.flsPlayer.sendEvent) A.flsPlayer.sendEvent('stop');} else if ((A.cwObj.supportsEvents()||B.length==0)&&theApp.is.ie) {A.setWmPlayer();if (A.wmPlayer&&A.wmPlayer.controls) A.wmPlayer.controls.stop();} else if (B.length) {var D=((typeof B[0].controls=='object'||typeof B[0].controls=='function')?B[0].controls:B[0]);if (D){if (typeof D.pause!=='undefined'){D.stop();}else if (typeof D.Step!=='undefined'){var E=(typeof D.GetPluginStatus!=='undefined'?D.GetPluginStatus():"complete");if (!E||!E.IContains('complete')) return;D.Stop();if (typeof D.Rewind!=='undefined') D.Rewind();}else if (typeof D.DoPause!=='undefined'){D.DoStop();}else{A.dCon.innerHTML='<embed src="'+A.fn+'"'+A.showCont+A.strScale+' width='+A.cwObj.rect.width+' height='+A.cwObj.rect.height+' autostart="false" loop="false" />';}}};A.bPlaying=0;}};p.isPlaying=function(){this.setPlayState();return this.bPlaying;};p.setPlayState=function(A) {var B=this;if (!A){A=B.dCon.getElementsByTagName('embed');if (A) A=A[0];if (!A){A=B.dCon.getElementsByTagName('object');if (A) A=A[0];}};var C=jsWndVideo.getPlayState(A,n,B.cwObj.isFlashVideo());B.bPlaying=(C===n?B.bPlaying:(C?1:0));return B.bPlaying;};jsWndVideo.getPlayState=function(A,B,C) {var D=n;var E="WM";var F=n;var G=n;if(C){E='Flash';}else{if (!A) return n;if (typeof A.controls=='object') D=A.controls;if (typeof A.playState!='undefined') F=A.playState;else if (D&&typeof D.playState!='undefined') F=D.playState;else if (typeof A.GetRate!='undefined'){E="QT";var H=A.GetPluginStatus();if (!H||!H.IContains('complete')) return F;F=A.GetRate();}else if (D&&typeof D.GetRate!='undefined'){E="QT";var H=D.GetPluginStatus();if (!H||!H.IContains('complete')) return F;F=D.GetRate();}else if (typeof A.GetPlayState!='undefined'){E="Real";F=A.GetPlayState();}else if (D&&typeof D.GetPlayState!='undefined'){E="Real";F=D.GetPlayState();}};if (E=='WM'&&F!==n) {switch (F){case 2:G=(B)?t:f;break;case 0:case 1:case 6:case 7:case 8:case 9:case 10:G=f;break;case 3:case 4:case 5:G=t;break;}}else if (E=='QT'&&F!==n){if (F==0) G=f;else G=t;}else if (E=='Real'&&F!==n){switch (F){case 0:case 4:G=f;break;case 1:case 2:case 3:case 5:G=t;break;}}else if(E=='Flash'){if (A&&A.wndObj){if(A.wndObj.playerState=='PLAYING') G=t;else if(A.wndObj.playerState=='BUFFERING') G=t;else G=f;}else G=f;};return G;};p.setFlashPlayer=function(){if (this.flsPlayer) return;if (theApp.is.ie) {this.flsPlayer=document['swf'+this.name];} else {var A=this.dCon.getElementsByTagName('object');if (A&&A.length>0) this.flsPlayer=(theApp.is.Mac?A[0]:A[0].getElementsByTagName('embed')[0]);}};p.setWmPlayer=function(){if (this.wmPlayer) return;if (theApp.is.ie) {this.wmPlayer=document[this.name+'obj'];} else {var A=this.dCon.getElementsByTagName('object');if (A&&A.length>0) this.wmPlayer=(theApp.is.Mac?A[0]:A[0].getElementsByTagName('embed')[0]);}};function jsWndDocument(){jsWndObj.prototype.constructor.call(this);};p=jsWndDocument.prototype=new jsWndObj();p.constructor=jsWndDocument;p.attach=function(A,B,C){var D=this;jsWndObj.prototype.attach.call(D,A,B,C);D.dCon=D.div.getElementsByTagName('IFRAME')[0];};p.changeContents=function(A){if (this.dCon) this.dCon.src=this.designTime?A.getLink():A;};function jsWndRefList(){jsWndObj.prototype.constructor.call(this);};p=jsWndRefList.prototype=new jsWndObj();p.constructor=jsWndRefList;function jsWndIpix(){jsWndObj.prototype.constructor.call(this);};p=jsWndIpix.prototype=new jsWndObj();p.constructor=jsWndIpix;function jsWndOther(){jsWndObj.prototype.constructor.call(this);};p=jsWndOther.prototype=new jsWndObj();p.constructor=jsWndOther;p.attach=function(A,B,C){var D=this;if (document.getElementById(A)) jsWndObj.prototype.attach.call(D,A,B,C);else{if (!D.cwObj) D.cwObj={};if (B&&B.a){var E=B.a;D.actFlags=E[0];D.dwFlags=E[1];}};trivArExec(D.arChld,function(o){if (!o.cwObj) o.cwObj={};o.cwObj.par=D;});};p.moveGrp=function(A,B){var C=9999;var D=9999;var E=this.arChld;var x,y;if (E) for(var i=0;i<E.length;i++){if (!E[i].div) continue;x=E[i].div.offsetLeft;y=E[i].div.offsetTop;if(x<C)C=x;if(y<D)D=y;};if (E) for(var i=0;i<E.length;i++){if (!E[i].div) continue;x=E[i].div.offsetLeft;y=E[i].div.offsetTop;E[i].moveTo(x-(C-A),y-(D-B));E[i].bHasMoved=t;}};p.offset=function(A) {var B=0;var C=this.arChld;if (C) for (var i=0;i<C.length;i++){if (!C[i].div) continue;C[i].div.style.top=String(C[i].div.offsetTop+A)+"px";var D=C[i].div.offsetTop+C[i].div.offsetHeight;if(B<D) {B=D;}};return B;};p.show=function(){if (this.div) return jsWndObj.prototype.show.call(this);trivArExec(this.arChld,function(o){if (o.show) o.show();});};p.hide=function(){if (this.div) return jsWndObj.prototype.hide.call(this);trivArExec(this.arChld,function(o){if (o.hide) o.hide();});};p.toggleVisibility=function(){if (this.div) return jsWndObj.prototype.toggleVisibility.call(this);trivArExec(this.arChld,function(o){if (o.toggleVisibility) o.toggleVisibility();});};p.pubRGUpdate=function(){var A=this.cwObj.formVar.getValue();trivArExec(this.arChld,function(o){if (o.constructor===jsWndFormRadio) o.setCheck(o.dCtrl.value==A);});};function jsWndMenu(){jsWndObj.prototype.constructor.call(this);};p=jsWndMenu.prototype=new jsWndObj();p.constructor=jsWndMenu;p.attach=function(A,B,C){var i;var D=this;jsWndObj.prototype.attach.call(D,A,B,C);var E=D.cwObj;E.textColor=B.textColor;E.bgHLColor=B.bgHLColor;E.textHLColor=B.textHLColor;E.bgColor=B.bgColor;E.res=B.res;var F=[];E.arItems=F;var G={};G.textColor=B.subTextColor;G.bgHLColor=B.subBgHLColor;G.textHLColor=B.subTextHLColor;G.bgColor=B.subBgColor;G.res=B.subRres;E.subMenu=G;D.div=document.getElementById(A);D.div.tObj=D;D.div.bMain=1;var H=document.getElementsByTagName("DIV");var I=[];var J=new RegExp("^[^0-9]*([0-9]*)");J.test(A);var K=RegExp.$1;J=new RegExp("^(tmenu|item)"+K+".*$");for (i=0;i<H.length;i++) if (J.test(H[i].id)) I.push(H[i]);var L;var M=new RegExp("^item("+K+".*)$");for (i=0;i<I.length;i++){L=I[i];if (M.test(L.id)){F.push({id:L.id,div:L,attached:t});}};for (i=0;i<F.length;i++){curNode=((F[i]&&F[i].div)?F[i].div.parentNode:n);while (curNode&&curNode.tagName=="DIV"){if (curNode.id&&curNode.id.indexOf("tobj")==0) { F[i].div.bSub=0;break;}else if (curNode.id&&curNode.id.indexOf("tmenu")==0) { F[i].div.bSub=1;break;};curNode=curNode.parentNode;}};var N=new RegExp("^tmenu("+K+".*)$");for (i=0;i<I.length;i++){L=I[i];if (N.test(L.id)){var O=new jsPopMenu(D);O.div=L;L.popM=O;for (var j=0;j<F.length;j++){var P=F[j];if (P.id=="item"+RegExp.$1){P.popMenu=O;break;}}}}};p.mouseDown=function(e){if(this.editMode()) return jsWndObj.prototype.mouseDown.call(this,e);else menuMouseDown(e,this);};p.mouseUp=function(e){if(this.editMode()) return jsWndObj.prototype.mouseUp.call(this,e);else menuMouseUp(e,this);};p.mouseMove=function(e){if(this.editMode()) return jsWndObj.prototype.mouseMove.call(this,e);else menuMouseMove(e,this);};p.mouseEnter=function(){if(!this.editMode()) menuMouseEnter(this);};p.mouseExit=function(){if(!this.editMode()) menuMouseExit(this);};function menuMouseMove(e,A){var B=n;var C=A.cwObj;if(e.target) B=e.target;else if(e.srcElement) B=e.srcElement;while(B){if(B&&B.id&&B.id.indexOf('item')==0) break;B=B.parentNode;};if(B){var D=menuFindItemByID(B.id,C.arItems);var E;if(D){D.div=B;if(A.currItem!=D){E=B.bSub&&B.bSub!=0;var F=E?C.subMenu:C;B.style.backgroundColor=((F.bgHLColor==-1||F.bgHLColor=='')?'transparent':F.bgHLColor);B.style.color=F.textHLColor;if(D.arrow) menuChangeArrowColor(B,F.textHLColor);if(A.currItem&&A.currItem.div){E=A.currItem.div.bSub&&A.currItem.div.bSub!=0;var G=E?C.subMenu:C;A.currItem.div.style.backgroundColor=((G.bgColor==-1||G.bgColor==''||G.res)?'transparent':G.bgColor);A.currItem.div.style.color=G.textColor;if(A.currItem.arrow) menuChangeArrowColor(A.currItem.div,G.textColor);};var H=A.currPopMenu;if(H&&H!=D.popMenu){H.hide();H=0;};if(D.popMenu){D.popMenu.show();A.currPopMenu=D.popMenu;};A.currItem=D;}}}};function menuMouseEnter(A){A.mouseIn=1;};function menuMouseExit(A){if(A.currItem&&A.currItem.div){var B=A.currItem.div.bSub&&A.currItem.div.bSub!=0;var C=B?A.cwObj.subMenu:A.cwObj;var D=A.currItem.div.style;D.backgroundColor=((C.bgColor==-1||C.bgColor==''||C.res)?'transparent':C.bgColor);D.color=C.textColor;if(A.currItem.arrow) menuChangeArrowColor(A.currItem.div,C.textColor);};A.currItem=0;A.mouseIn=0;};function menuMouseDown(e,A){A.bLButtonDown=1;};function menuMouseUp(e,A){if(A.bLButtonDown){var B=n;if(e.target) B=e.target;else if(e.srcElement) B=e.srcElement;while(B){if(B&&B.id&&B.id.indexOf('item')==0) break;B=B.parentNode;};if(B){var C=menuFindItemByID(B.id,A.cwObj.arItems);if (C&&!C.attached){var D=A.parPage;var E=A.par;while(!D){D=E.parPage;E=E.par;};if(C&&!C.bSep&&!C.popMenu) D.doAction(C.actItem,n,A);}}};A.bLButtonDown=0;};function menuFindItemByID(A,B){for(var i=0;i<B.length;i++){var C=B[i];if(C.id==A) return C;if(C.arItems){C=menuFindItemByID(A,C.arItems);if(C) return C;}};return n;};function menuChangeArrowColor(A,B){A=A.nextSibling;for(var i=0;i<4;i++){A.style.backgroundColor=B;A=A.nextSibling;}};function jsPopMenu(A){var B=this;B.par=A;B.mouseIn=0;B.timer=0;B.currItem=0;B.currPopMenu=0;B.cwObj=A.cwObj;};p=jsPopMenu.prototype;p.show=function(){var A=this;A.div.style.visibility='visible';A.timer=setTimeout(function(){A.menuTimeOut();},1000);};p.hide=function(){this.div.style.visibility='hidden';if(this.timer) clearTimeout(this.timer);this.timer=0;};p.menuTimeOut=function(){var A=this;if(!A.div||A.div.style.visibility!='visible') return;if(!A.mouseIn&&!A.par.mouseIn&&!A.currPopMenu){A.div.style.visibility='hidden';A.par.currPopMenu=0;}else A.timer=setTimeout(function(){A.menuTimeOut();},1000);};p.mouseEnter=function(){menuMouseEnter(this);};p.mouseMove=function(e){menuMouseMove(e,this);};p.mouseExit=function(){menuMouseExit(this);};p.mouseDown=function(e){menuMouseDown(e,this);};p.mouseUp=function(e){menuMouseUp(e,this);};function jsWndTOC(){jsWndObj.prototype.constructor.call(this);};p=jsWndTOC.prototype=new jsWndObj();p.constructor=jsWndTOC;p.attach=function(A,B,C){var D=this;jsWndObj.prototype.attach.call(D,A,B,C);var E=B.iAppear==2?'SELECT':'DIV';D.dCon=D.div.getElementsByTagName(E)[0];};p.expand=function(A,B,C,D){if ((!A||A.tagName!='IMG')&&D){var E=document.getElementById(D);var F=(E?E.childNodes:n);if (E) for (var i=0;i<F.length;i++){if (F[i].id=='expandImg'){A=F[i];break;}}};if (!A||A.tagName!='IMG') return;if(A.style.visibility=='hidden')return;var G=A.parentNode.parentNode;if(A.src.indexOf(B)>=0){A.src=A.src.replace(B,C);var H=G.getElementsByTagName('UL')[0];H.style.display='block';}else if(A.src.indexOf(C)>=0){A.src=A.src.replace(C,B);G.getElementsByTagName('UL')[0].style.display='none';}};p.scrollTo=function(A){if(!this.div) return;var B=n;var C=this.div.getElementsByTagName('DIV');if (C) for(var D=0;D<C.length;D++) {if(C[D]&&(C[D].id=='toc'||C[D].className=='DLG_treeview')){B=C[D];break;}};if(!B) return;var E='trivExitPage("'+A;var F=B.getElementsByTagName('LI');if(!F||!F.length) F=B.getElementsByTagName('P');if(!F) return;for(var D=F.length-1;D>=0;D--){var H=F[D];if(H.className=='DLG_selected'||H.innerHTML.indexOf(E)>-1){var I=H.offsetTop;if(I<5) I=0;else if (theApp.is.ie&&H.tagName=='P'){if((I+H.scrollHeight)>(B.scrollTop+B.clientHeight)||I<B.scrollTop){I+=H.scrollHeight;I-=B.clientHeight;}else I=0;};if(I) B.scrollTop=I;break;}}};function jsWndProgressBar(){jsWndObj.prototype.constructor.call(this);this.barPos=0;this.step=0;this.range=0;};p=jsWndProgressBar.prototype=new jsWndObj();p.constructor=jsWndProgressBar;p.attach=function(A,B,C){var D=this;jsWndObj.prototype.attach.call(D,A,B,C);var E=D.cwObj;D.dCon=D.div.getElementsByTagName('DIV')[0];D.dBkgnd=D.dCon.getElementsByTagName('DIV')[0];D.dBar=D.dBkgnd.getElementsByTagName('DIV')[0];D.step=B.step;D.range=B.range;D.barPos=B.barPos;E.tickTime=B.tickTime;E.dwBarFlags=B.dwBarFlags;if (theApp.is.ie) D.dBkgnd.style.width=B.a[3][2]+'px';if (theApp.is.ie) D.dBkgnd.style.height=B.a[3][3]+'px';if(E.dwBarFlags&0x20) D.play();};p.stepIt=function(){return this.setBarPosition(Number(this.barPos)+Number(this.step));};p.setPosition=function(A){if(this.cwObj.dwBarFlags&0x10) return this.setBarPosition(A);};p.isPlaying=function(){return ((this.cwObj.dwBarFlags&0x8)&&this.timer);};p.play=function(){var A=this;if(!A.cwObj.dwBarFlags&0x8) return 0;else if(A.timer) return A.barPos;else{A.timer=setTimeout(function(){A.onTimer();},A.cwObj.tickTime);return 1;}};p.stop=function(){var A=this;A.pause();A.setBarPosition(0);return 0;};p.pause=function(){var A=this;if(!A.cwObj.dwBarFlags&0x8) return 0;else if(A.timer){clearTimeout(A.timer);A.timer=0;};return A.barPos;};p.onTimer=function(){var A=this;if(A.stepIt()>=A.range){A.timer=0;if(A.actFlags&0x40) A.issueActions(6);}else A.timer=setTimeout(function(){A.onTimer();},A.cwObj.tickTime);};p.setBarPosition=function(A){if(typeof A!='number'||isNaN(A)) A=0;var B=this;if(A>B.range) A=B.range;else if(A<0) A=0;B.barPos=A;var C=A/B.range;var D=B.cwObj.dwBarFlags;var E=B.dBar.style;if(D&0x1){C*=B.rtRect.height;C=Math.round(C);if(D&0x80) C=B.rtRect.height-C;E.left='0px';E.top=(B.rtRect.height-C)+'px';E.width='100%';E.height=C+'px';}else{C*=B.rtRect.width;C=Math.round(C);if(D&0x80) C=B.rtRect.width-C;E.left='0px';E.top='0px';E.width=C+'px';E.height='100%';};return A;};jsWndProgressBar.prototype.createBarImgs=function(){var A=this;var B=A.cwObj.dwBarFlags;var C=A.dBar.getElementsByTagName('img');for(var i=0;i<C.length;i++) A.dBar.removeChild(C[i]);if(A.bImg){var D=B&0x1?A.rtRect.height:A.rtRect.width;var E=B&0x1?A.bImg.height:A.bImg.width;for(var i=0;i<D;i+=E){var F=document.createElement('img');F.src=A.bImg.src;F.style.position='absolute';if(B&0x1){F.style.left='0px';F.style.top=i+'px';F.style.width='100%';F.style.height=A.bImg.height+'px';}else{F.style.left=i+'px';F.style.top='0px';F.style.width=A.bImg.width+'px';F.style.height='100%';};A.dBar.appendChild(F);}}};function jsWndForm(){};jsWndForm.prototype.attach=function(A,B,C){var D=this.cwObj;D.objType=11;D.formType=B.formType;D.dwFormFlags=B.dwFormFlags;};function jsWndFormEntry(){jsWndObj.prototype.constructor.call(this);};p=jsWndFormEntry.prototype=new jsWndObj();p.constructor=jsWndFormEntry;p.attach=function(A,B,C){var D=this;jsWndObj.prototype.attach.call(D,A,B,C);jsWndForm.prototype.attach.call(D,A,B,C);var E=D.div.getElementsByTagName('textarea');D.dCon=(E&&E.length?E[0]:D.div.getElementsByTagName('input')[0]);D.cwObj.iNumChars=B.iNumChars;};p.update=function(A,B,C,D){var E=this;if (!E.trivAlert){var F=E.dCon;if (F.value.length>B){if (D&&trivAlert){E.trivAlert=t;trivAlert(D,'',C,function(){E.trivAlert=f;F.value=F.value.substring(0,B);});}else alert(C);F.value=F.value.substring(0,B);F.focus();F.select();return f;};A.set(F.value);}};p.changeContents=function(A){this.dCon.value=A;if(this.cwObj.formVar) this.cwObj.formVar.set(A);};p.reset=function(){this.dCon.value=this.cwObj.strDefValue;this.onChange();};function jsWndFormRadio(){jsWndObj.prototype.constructor.call(this);};p=jsWndFormRadio.prototype=new jsWndObj();p.constructor=jsWndFormRadio;p.attach=function(A,B,C){var D=this;jsWndObj.prototype.attach.call(D,A,B,C);jsWndForm.prototype.attach.call(D,A,B,C);D.name=A;var E=D.div.getElementsByTagName('DIV')[0];D.dCon=E;D.dCtrl=E.getElementsByTagName('INPUT')[0];D.dLbl=E.getElementsByTagName('LABEL')[0];};p.setCheck=function(A){var B=this;B.dCtrl.checked=A;var C=(this.cwObj.formType==1?(A?theApp.cr_on:theApp.cr_off):(A?theApp.cc_on:theApp.cc_off));if (C)	B.dLbl.style.backgroundImage="url('"+C+"')";};p.getCheck=function(){return this.dCtrl.checked;};p.changeContents=function(A){if(A.length==0) this.dCtrl.checked=f;else this.dCtrl.checked=t;if(this.cwObj.formVar) this.cwObj.formVar.set(A);};p.reset=function(A){this.dCtrl.checked=(this.cwObj.dwFormFlags&0x2);if(!A) this.onChange();};p.onClick=function(e){this.setCheck(this.cwObj.formType==1?1:this.dCtrl.checked);if(this.designTime) return this.onChange();};function jsWndFormList(){jsWndObj.prototype.constructor.call(this);};p=jsWndFormList.prototype=new jsWndObj();p.constructor=jsWndFormList;p.attach=function(A,B,C){var D=this;jsWndObj.prototype.attach.call(D,A,B,C);jsWndForm.prototype.attach.call(D,A,B,C);var E=D.div.getElementsByTagName('SELECT')[0];D.dCon=E;};p.changeContents=function(A){this.setSel(A);if(this.cwObj.formVar) this.cwObj.formVar.set(A);};p.reset=function(){var A=this;var B=-1;if (A.cwObj.arItems) for(var i=0;i<A.cwObj.arItems.length;i++){var C=A.cwObj.arItems[i];if(C.bSel){if(A.cwObj.dwFormFlags&0x20) A.dCon.options[i].selected=t;else B=i;}else if(A.cwObj.dwFormFlags&0x20) A.dCon.options[i].selected=f;};if(!(A.cwObj.dwFormFlags&0x20)) A.dCon.selectedIndex=B;if (A.onChange) A.onChange();};p.setSel=function(A){if (!A) return;if(this.cwObj.dwFormFlags&0x20){var B=this.dCon.options;for(var i=0;i<B.length;i++){var C=new RegExp("(?:^|[,])"+B[i].label+"(?:$|[,])");if (C.test(A)) B[i].selected=t;else B[i].selected=f;}}else this.dCon.value=A;};p.getSel=function(){if(this.cwObj.dwFormFlags&0x20){var A='';var B=this.dCon.options;for(var i=0;i<B.length;i++) if(B[i].selected) A+=(A.length==0?'':',')+B[i].label;return A;}else return this.dCon.value;};function jsWndTestTimer(){jsWndObj.prototype.constructor.call(this);};p=jsWndTestTimer.prototype=new jsWndObj();p.constructor=jsWndTestTimer;p.changeContents=function(A){if (this.div) (this.div.getElementsByTagName('DIV')[0]).innerHTML=A;};function jsWndText(){jsWndObj.prototype.constructor.call(this);};p=jsWndText.prototype=new jsWndObj();p.constructor=jsWndText;p.attach=function(A,B,C){var D=this;jsWndObj.prototype.attach.call(D,A,B,C);D.cwObj.dwTextFlags=B.dwTextFlags;D.cwObj.borderSize=B.borderSize;D.cwObj.marginSize=B.marginSize;trivArExec(D.div.getElementsByTagName('DIV'),function(o){if (o.getAttribute("name")=="dCon") D.dCon=o;else if (o.getAttribute("name")=="dCon2") D.dCon2=o;if (D.dCon&&D.dCon2) return f;});};p.changeContents=function(A,B){var C=this;var D=C.dCon2;if (D==n||C.inWriteContent) {if (!B||B<10) setTimeout(function(){C.changeContents(A,(B?++B:1));},200);return;};node=jsWndText.getFirstTextNode(D);if (node) {var E=[];while (node.parentNode!=D) {node=node.parentNode;E[E.length]=node;};if (E.length) {removeAllChildren(D,E);while (E[0].tagName&&E[0].tagName.toUpperCase()=="SPAN"&&!E[0].style.backgroundColor&&!E[0].style.fontFamily&&!E[0].style.fontSize&&!E[0].style.color){E[1].removeChild(E[0]);E.shift();};E[0].appendChild(document.createTextNode(A));}else node=null;};if (!node) D.innerHTML='<p style="text-align:left"><span style="font-size:10pt;color:#000000;font-family:Arial,sans serif">'+A+'</span></p>';};p.sizeTo=function(w,h){var A=this;var B=A.cwObj.borderSize;var C=A.cwObj.marginSize;var D=(this.cwObj.dwTextFlags&0x8?2:0);var E=B*2+D;if (w<E) w=E;if (h<E) h=E;A.rtRect.width=w;A.rtRect.height=h;A.div.style.width=w+'px';A.div.style.height=h+'px';A.setdConWidth();A.setdConHeight();var F=(B+C)+'px';A.dCon2.style.left=F;A.dCon2.style.top=F;A.setTxtWidth(A.dCon2);A.setTxtHeight(A.dCon2);if (B){var G=(h-E)+'px';var H=(w-E)+'px';var I=(h-B-D)+'px';var J=(w-B-D)+'px';var K=A.dCon.getElementsByTagName("DIV");for(var i=0;i<K.length;i++) {var L=K[i].id;if (L){if (L=='tbbt') K[i].style.width=H;else if (L=='tbbb'){K[i].style.width=H;K[i].style.top=I;}else if (L=='tbbl') K[i].style.height=G;else if (L=='tbbr'){K[i].style.height=G;K[i].style.left=J;}else if (L=='tbbbl') K[i].style.top=I;else if (L=='tbbtr') K[i].style.left=J;else if (L=='tbbbr'){K[i].style.left=J;K[i].style.top=I;}}}}};p.setdConWidth=function(){var w=(this.rtRect.width-(this.cwObj.dwTextFlags&0x8?2:0));this.dCon.style.width=(w<0?0:w)+'px';};p.setdConHeight=function(){var h=(this.rtRect.height-(this.cwObj.dwTextFlags&0x8?2:0));this.dCon.style.height=(h<0?0:h)+'px';};p.setTxtWidth=function(A){var w=(this.rtRect.width-this.cwObj.borderSize*2-this.cwObj.marginSize*2);A.style.width=(w<0?0:w)+'px';};p.setTxtHeight=function(A){var h=(this.rtRect.height-this.cwObj.borderSize*2-this.cwObj.marginSize*2);A.style.height=(h<0?0:h)+'px';};jsWndText.getFirstTextNode=function(A){if(A.nodeType==3&&A.nodeValue!="\n") return A;else{for(var j=0;j<A.childNodes.length;j++){var B=jsWndText.getFirstTextNode(A.childNodes[j]);if(B) return B;}};return n;};jsWndText.hasAncestor=function(A,B,C){while (A!=B){if (A.nodeType==1&&A.tagName.toUpperCase()==C.toUpperCase()) return A;A=A.parentNode;};return n;};function jsFlashHandler(){};jsFlashHandler.FlashStateChange=function(A){if(A&&A.id&&A.newstate){var B=document.getElementById(A.id);B.wndObj.playerState=A.newstate;if(B&&A.newstate=='COMPLETED') B.wndObj.onDone();}};jsFlashHandler.FlashMetaChange=function(A){if(A&&A.id&&A.type&&A.name){var B=document.getElementById(A.id);if(B&&A.type=='cuepoint'){var C=B.cwObj.arEvents;if(C&&C.length>0){for(var i=0;i<C.length;i++){if(C[i].name==A.name) B.wndObj.onEvent(A.name);}}}}};jsFlashHandler.getPlayer=function(A){if(theApp.is.ie) return(eval("document."+A));else{if (navigator.appVersion.indexOf("Mac")!=-1) return(eval(A));else{var B=document.getElementsByTagName('embed');for (var i=0;i<B.length;i++){if (B[i].name==A||B[i].id==A) return(window.document.embeds[i]);}}}};function playerReady(A){jsFlashHandler.playerState='IDLE';if(A&&A.id){var B=A.id;var C=document.getElementById(B);var D=n;if(C){var E=0;var F=function(){var G=jsFlashHandler.getPlayer(B);D=C.cwObj;if(!D){for(var i=0,tmp=C.parentNode;i<100&&tmp&&!tmp.tObj;i++) tmp=tmp.parentNode;if(tmp&&tmp.tObj){D=tmp.tObj.cwObj;C.wndObj=tmp.tObj;C.cwObj=tmp.tObj.cwObj;}};var H=f;if(D){if (D.arChld) for (var i=0;i<D.arChld.length;i++){var o=D.arChld[i];if (o.type==6&&o.on==6){H=t;break;}};G.addModelListener('STATE','jsFlashHandler.FlashStateChange');if(D.hasEvents()) G.addModelListener('META','jsFlashHandler.FlashMetaChange');};if(!D){if(E<5){E++;setTimeout(function() { F();},500);}else{window.status='Flash player not initialized properly. Events may not work.';setTimeout(function() { window.status='';},5000);}}};F();}}};function wndPageDrawLine(A,B,C,D){if(A>C){var t=A;A=C;C=t;t=B;B=D;D=t;};var E=Math.abs(C-A);var F=Math.abs(D-B);var G=3;var H=0,ccLeft=0,ccTop=0,ccBottom=0;var I=document.createElement('div');I.id='line';var J=I.style;J.position='absolute';J.left=Math.min(A,C)+'px';J.top=Math.min(B,D)+'px';J.width=E+'px';J.height=F+'px';J.zIndex=99999;this.div.appendChild(I);var K=function(par,l,t,w,h){var L=document.createElement('div');var M=L.style;M.position='absolute';M.left=l+'px';M.top=t+'px';M.width=w+'px';M.height=h+'px';M.backgroundColor="#0000FF";M.overflow='hidden';par.appendChild(L);};if(E>F){H=0;ccTop=0;while(H<E){ccLeft=H;while ((Math.round(H*F/E)==ccTop)&&(H<=E)) H++;K(I,(D>B?ccLeft:(E-H)),ccTop,(H-ccLeft+G),G);ccTop++;}}else{ccBottom=0;ccLeft=0;while(ccBottom<F){ccTop=ccBottom;while((Math.round(ccBottom*E/F)==ccLeft)&&(ccBottom<F)) ccBottom++;K(I,(D>B?ccLeft:(E-ccLeft)),ccTop,G,(ccBottom-ccTop+G));ccLeft++;}};return I;};p=n;

