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

	
var FLAG_MOUSEENTER=0x1;var FLAG_MOUSEEXIT=0x2;var FLAG_MOUSECLICK=0x4;var FLAG_MOUSEDBLCLICK=0x8;var FLAG_KEY=0x10;var FLAG_SHOW=0x20;var FLAG_DONE=0x40;var FLAG_ANYKEY=0x80;var FLAG_HIDE=0x100;var FLAG_RMOUSECLICK=0x200;var FLAG_TIMER=0x400;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';if(C) {D.div.insertBefore(G,D.div.firstChild);} else {var H=D.div.firstChild;D.div.removeChild(H);D.div.appendChild(G);G.appendChild(H);}};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==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&FLAG_MOUSECLICK)) 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&FLAG_MOUSEENTER) this.issueActions(0);};p.mouseExit=function(){if(!(this.editMode())) if (this.actFlags&FLAG_MOUSEEXIT) this.issueActions(1);};p.mouseDblClk=function(e){if(this.editMode()) this.mouseDblClkEdit(e);else if(this.actFlags&FLAG_MOUSEDBLCLICK) this.issueActions(3);};p.contextMenu=function(e){if(this.editMode()) this.contextMenuEdit(e);else if(this.actFlags&FLAG_RMOUSECLICK){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;if(!(A.editMode())){var B=A.isVisible();if(!A.bShown){A.bShown=t;B=f;};if(B||A.isTransitioning(t)) return;if(A.isTransitioning(f)) A.cancelTrans();if((!A.cwObj)||!A.cwObj.getTrans(t)) A.div.style.visibility='inherit';if(A.actFlags&FLAG_SHOW) A.issueActions(5);}else A.div.style.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&FLAG_HIDE) 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;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.setTrans(A==5);var D=C.getTransDelay(A==5);if(D) setTimeout(function(){B.doTrans(A==5);},D);else B.doTrans(A==5);if(A==5) B.parPage.arTransInWnds.push(B);else B.parPage.arTransOutWnds.push(B);return;};B.issueActionsInternal(A);};p.issueActionsInternal=function(A){var B=this;var C=B.cwObj;var D=B.parPage;var E=D.arDelayAct;trivArExec(C.arChld,function(chld,i){if(chld.type==6&&chld.on==A){if(!chld.delay){D.doAction(chld.actItem,chld.elseItem,chld);}else{var F=setTimeout(function(){for(var j=0;j<E.length;j++) {if(E[j]==F){E.splice(j,1);break;}};D.doAction(chld.actItem,chld.elseItem,chld);},chld.delay);E.push(F);}}});};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){var D=this;var E=D.div;if (!E) return;if(!jsTrans.isFIFO(D.currTrans)&&theApp.is.ie){E.style.filter="revealTrans(duration="+(11-D.cwObj.getTransSpeed(A))+",transition="+(D.currTrans-1)+")";E.onfilterchange=function() { if(C) C();else D.transDone(D);};E.filters.revealTrans.apply();E.style.visibility=A?"inherit":"hidden";E.filters.revealTrans.play();}else{if(jsTrans.isFIFO(D.currTrans)){if(A) doDivTrans(f,E,D.currTrans-1,(11-D.cwObj.getTransSpeed(A)),C?C:D.transDone,D,D.cwObj.getXPos(),D.cwObj.getYPos());else doDivTrans(t,E,D.currTrans-1,(11-D.cwObj.getTransSpeed(A)),C?C:D.transDone,D,D.rectTransOut.x,D.rectTransOut.y);}else doDivTrans(!A,E,D.currTrans-1,(11-D.cwObj.getTransSpeed(A)),C?C:D.transDone,D);}};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&FLAG_SHOW) 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&FLAG_HIDE) A.issueActionsInternal(8);break;}};if(!A.parPage.arTransOutWnds.length&&A.parPage.fDelayedSwitch){A.parPage.switchPage(A.parPage.nextPage);}};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.div.style.visibility=='hidden') this.show();else this.hide();};p.enable=function(A){this.bEnabled=A;};p.getRect=function(){return (this.rtRect.copy());};p.moveTo=function(x,y){this.rtRect.x=x;this.rtRect.y=y;this.div.style.left=x+'px';this.div.style.top=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;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){var C=this;jsWndObj.prototype.attach.call(C,A,B);C.dCon=C.div.getElementsByTagName('IMG')[0];};p.changeContents=function(A){if (this.dCon) this.dCon.src=this.designTime?A.getLink():A;};function jsWndButton(){jsWndObj.prototype.constructor.call(this);};p=jsWndButton.prototype=new jsWndObj();p.constructor=jsWndButton;p.attach=function(A,B){var C=this;jsWndObj.prototype.attach.call(C,A,B);C.dCon=C.div.getElementsByTagName('IMG')[0];C.src=B.res;C.clickSrc=B.resClick;C.overSrc=B.resOver;C.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){var C=this;jsWndObj.prototype.attach.call(C,A,B,1);C.bIsFlash=B.isFlash;C.getFlashObj();C.dCon=C.div.getElementsByTagName(C.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);});};function jsWndAudio(){jsWndObj.prototype.constructor.call(this);};p=jsWndAudio.prototype=new jsWndObj();p.constructor=jsWndAudio;p.attach=function(A,B){var C=this;jsWndObj.prototype.attach.call(C,A,B,1);var D=C.cwObj;C.name=A;D.iDisplay=B.iDisplay;C.snd=new jsSound();C.snd.div=document.getElementById("snd"+A);C.snd.audio=C;D.isFlashAudio=function(){return B.isFlash;};D.hasEvents=function(){return B.hasEvents;};D.supportsEvents=function(){return B.supportsEvents;};D.linkName=B.linkName;};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==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.onEvent=function(A) {var B=this.audio.cwObj;var C=this.designTime?wndPage:trivPage;if (!B.hasEvents()) return;trivArExec(B.arEvents,function(o,i){if (o.name==A) C.doAction(o.actItem);});};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);});};p.play=function() {var A=this;var B=A.div.getElementsByTagName('embed');if(A.audio.cwObj.isFlashAudio()) {A.setFlashPlayer();if (A.flsLoading(A.flsPlayer)){theApp.SetTimeout(A.play,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.wmPlayer.controls.play();} else {var C=(typeof B[0].controls=='object'?B[0].controls:B[0]);if (C){if (typeof C.pause!=='undefined'&&(!this.isOldWM(C)||C.playState!==3)){C.play();}else if (typeof C.Step!=='undefined'){var D=C.GetPluginStatus();if (!D) return;if (D.IContains('waiting')||D.IContains('playable')){setTimeout(function(){A.play();},100);return;};if (!D||!D.IContains('complete')) return;C.Play();}else if (typeof C.DoPause!=='undefined'){C.DoPlayPause();}else{A.resetEmbed((A.audio.cwObj.dwFlags&0x80000>0),t);}}};A.bPlaying=1;};p.togglePlay=function(){var A=this;var B=A.div.getElementsByTagName('embed');if(A.audio.cwObj.isFlashAudio()){A.setFlashPlayer();if (A.flsLoading(A.flsPlayer)){theApp.SetTimeout(A.togglePlay,100,A);return;};A.flsPlayer.sendEvent('playpause');} 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 C=(typeof B[0].controls!=='undefined'?B[0].controls:B[0]);if (C){A.setPlayState(C);if (typeof C.pause!=='undefined'){if (A.bPlaying) C.pause();else C.play();}else if (typeof C.Step!=='undefined'){var D=C.GetPluginStatus();if (!D) return;if (D.IContains('waiting')||D.IContains('playable')){setTimeout(function(){A.togglePlay();},100);return;};if (!D.IContains('complete')) return;if (A.bPlaying) C.Stop();else C.Play();}else if (typeof C.DoPause!=='undefined'){C.DoPlayPause();}}};A.bPlaying=(A.bPlaying==1?0:1);};p.pause=function(){var A=this;var B=A.div.getElementsByTagName('embed');if(A.audio.cwObj.isFlashAudio()){A.setFlashPlayer();if (A.flsLoading(A.flsPlayer)){theApp.SetTimeout(A.pause,100,A);return;};A.flsPlayer.sendEvent('pause');} 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 C=(B.length?(typeof B[0].controls=='object'?B[0].controls:B[0]):n);if (C){if (typeof C.pause!=='undefined'){C.pause();}else if (typeof C.Step!=='undefined'){var D=C.GetPluginStatus();if (!D||!D.IContains('complete')) return;C.Stop();}else if (typeof C.DoPause!=='undefined'){C.DoPause();}}};A.bPlaying=0;};p.stop=function(){var A=this;var B=A.div.getElementsByTagName('embed');if(A.audio.cwObj.isFlashAudio()){A.setFlashPlayer();if (A.flsLoading(A.flsPlayer)){theApp.SetTimeout(A.stop,100,A);return;};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 C=(B.length?(typeof B[0].controls=='object'?B[0].controls:B[0]):n);if (C){if (typeof C.pause!=='undefined'){C.stop();}else if (typeof C.Step!=='undefined'){var D=(typeof C.GetPluginStatus!=='undefined'?C.GetPluginStatus():"complete");if (!D||!D.IContains('complete')) return;C.Stop();if (typeof C.Rewind!=='undefined') C.Rewind();}else if (typeof C.DoPause!=='undefined'){C.DoStop();}else{A.resetEmbed(f,f);}}};A.bPlaying=0;};p.setPlayState=function(A) {if (!A){A=this.div.getElementsByTagName('embed');if (A) A=A[0];};this.bPlaying=jsWndVideo.getPlayState(A,this.isOldWM(A));return this.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?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(){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(){jsWndObj.prototype.constructor.call(this);};p=jsWndVideo.prototype=new jsWndObj();p.constructor=jsWndVideo;p.attach=function(A,B){var C=this;jsWndObj.prototype.attach.call(C,A,B,1);C.name=A;C.dCon=C.div.getElementsByTagName('DIV')[0];C.cwObj.isFlashVideo=function() {return B.isFlash;};C.cwObj.hasEvents=function(){return B.hasEvents;};C.cwObj.supportsEvents=function(){return B.supportsEvents;};};p.sizeTo=function(w,h){jsWndObj.prototype.sizeTo.call(this,w,h);if (this.cwObj.isFlashVideo) this.dCon.innerHTML=this.dCon.innerHTML.replace(/(width=[^0-9]*)[0-9.]*/ig,'$1'+w).replace(/(height=[^0-9]*)[0-9.]*/ig,'$1'+h);};p.onEvent=function(A){var B=this;if (!B.cwObj.hasEvents()) return;var C=B.designTime?wndPage:trivPage;trivArExec(B.cwObj.arEvents,function(o,i){if (o.name==A) C.doAction(o.actItem,n,B.cwObj);});};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,A.cwObj);});};p.play=function(){var A=this;var B=A.dCon.getElementsByTagName('embed');if ((!A.editMode())&&A.dCon) {if(A.cwObj.isFlashVideo()){A.setFlashPlayer();if (A.flsLoading(A.flsPlayer)){theApp.SetTimeout(A.play,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.wmPlayer.controls.play();} else {var C=(B.length?(typeof B[0].controls=='object'?B[0].controls:B[0]):n);if (C){if (typeof C.pause!=='undefined'){C.play();}else if (typeof C.Step!=='undefined'){var D=C.GetPluginStatus();if (!D) return;if (D.IContains('waiting')){setTimeout(function(){A.play();},100);return;};if (!D||!D.IContains('complete')) return;C.Play();}else if (typeof C.DoPause!=='undefined'){C.DoPlayPause();}else{var E=' 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"'+E+'" />';}}};A.bPlaying=1;}};p.togglePlay=function(){var A=this;var B=A.dCon.getElementsByTagName('embed');if ((!A.editMode())&&A.dCon) {if(A.cwObj.isFlashVideo()){A.setFlashPlayer();if (A.flsLoading(A.flsPlayer)){theApp.SetTimeout(A.togglePlay,100,A);return;};A.flsPlayer.sendEvent('playpause');} 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 {var C=(B.length?(typeof B[0].controls=='object'?B[0].controls:B[0]):n);if (C){A.setPlayState(C);C=(typeof C.controls!=='undefined'?C.controls:C);if (typeof C.pause!=='undefined'){if (A.bPlaying) C.pause();else C.play();}else if (typeof C.Step!=='undefined'){var D=C.GetPluginStatus();if (!D) return;if (D.IContains('waiting')){setTimeout(function(){A.togglePlay();},100);return;};if (!D.IContains('complete')) return;if (A.bPlaying) C.Stop();else C.Play();}else if (typeof C.DoPause!=='undefined'){C.DoPlayPause();}}};A.bPlaying=(A.bPlaying==1?0:1);}};p.pause=function(){var A=this;var B=A.dCon.getElementsByTagName('embed');if ((!A.editMode())&&A.dCon) {if(A.cwObj.isFlashVideo()){A.setFlashPlayer();if (A.flsLoading(A.flsPlayer)){theApp.SetTimeout(A.pause,100,A);return;};A.flsPlayer.sendEvent('pause');} else if ((A.cwObj.supportsEvents()||B.length==0)&&theApp.is.ie) {A.setWmPlayer();if (A.wmPlayer&&A.wmPlayer.controls) A.wmPlayer.controls.pause();} else {var C=(B.length?(typeof B[0].controls=='object'?B[0].controls:B[0]):n);if (C){if (typeof C.pause!=='undefined'){C.pause();}else if (typeof C.Step!=='undefined'){var D=C.GetPluginStatus();if (!D||!D.IContains('complete')) return;C.Stop();}else if (typeof C.DoPause!=='undefined'){C.DoPause();}}};A.bPlaying=0;}};p.stop=function(){var A=this;var B=A.dCon.getElementsByTagName('embed');if ((!A.editMode())&&A.dCon) {if(A.cwObj.isFlashVideo()){A.setFlashPlayer();if (A.flsLoading(A.flsPlayer)){theApp.SetTimeout(A.stop,100,A);return;};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 {var C=(B.length?(typeof B[0].controls=='object'?B[0].controls:B[0]):n);if (C){if (typeof C.pause!=='undefined'){C.stop();}else if (typeof C.Step!=='undefined'){var D=(typeof C.GetPluginStatus!=='undefined'?C.GetPluginStatus():"complete");if (!D||!D.IContains('complete')) return;C.Stop();if (typeof C.Rewind!=='undefined') C.Rewind();}else if (typeof C.DoPause!=='undefined'){C.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) {if (!A){A=this.dCon.getElementsByTagName('embed');if (A) A=A[0];};var B=jsWndVideo.getPlayState(A);this.bPlaying=(B===n?this.bPlaying:B);return this.bPlaying;};jsWndVideo.getPlayState=function(A,B) {var C=n;var D="WM";var E=n;var F=n;if (!A) return n;if (typeof A.controls=='object') C=A.controls;if (typeof A.playState!='undefined') E=A.playState;else if (C&&typeof C.playState!='undefined') E=C.playState;else if (typeof A.GetRate!='undefined'){D="QT";var G=A.GetPluginStatus();if (!G||!G.IContains('complete')) return E;E=A.GetRate();}else if (C&&typeof C.GetRate!='undefined'){D="QT";var G=C.GetPluginStatus();if (!G||!G.IContains('complete')) return E;E=C.GetRate();}else if (typeof A.GetPlayState!='undefined'){D="Real";E=A.GetPlayState();}else if (C&&typeof C.GetPlayState!='undefined'){D="Real";E=C.GetPlayState();};if (D=='WM'&&E!==n) {switch (E){case 2:F=(B)?t:f;break;case 0:case 1:case 6:case 7:case 8:case 9:case 10:F=f;break;case 3:case 4:case 5:F=t;break;}}else if (D=='QT'&&E!==n){if (E==0) F=f;else F=t;}else if (D=='Real'&&E!==n){switch (E){case 0:case 4:F=f;break;case 1:case 2:case 3:case 5:F=t;break;}};return F;};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){var C=this;jsWndObj.prototype.attach.call(C,A,B);C.dCon=C.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){var C=this;if (document.getElementById(A)) jsWndObj.prototype.attach.call(C,A,B);else if (!C.cwObj) C.cwObj={};trivArExec(C.arChld,function(o){if (!o.cwObj) o.cwObj={};o.cwObj.par=C;});};p.moveGrp=function(A,B){var C=9999;var D=9999;var E=this.arChld;var x,y;for(var i=0;E&&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;};for(var i=0;E&&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;for (var i=0;C&&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){var i;var C=this;jsWndObj.prototype.attach.call(C,A,B);var D=C.cwObj;D.textColor=B.textColor;D.bgHLColor=B.bgHLColor;D.textHLColor=B.textHLColor;D.bgColor=B.bgColor;D.res=B.res;var E=[];D.arItems=E;var F={};F.textColor=B.subTextColor;F.bgHLColor=B.subBgHLColor;F.textHLColor=B.subTextHLColor;F.bgColor=B.subBgColor;F.res=B.subRres;D.subMenu=F;C.div=document.getElementById(A);C.div.tObj=C;C.div.bMain=1;var G=document.getElementsByTagName("DIV");var H=[];var I=new RegExp("^[^0-9]*([0-9]*)");I.test(A);var J=RegExp.$1;I=new RegExp("^(tmenu|item)"+J+".*$");for (i=0;i<G.length;i++) if (I.test(G[i].id)) H.push(G[i]);var K;var L=new RegExp("^item("+J+".*)$");for (i=0;i<H.length;i++){K=H[i];if (L.test(K.id)){E.push({id:K.id,div:K,attached:t});}};for (i=0;i<E.length;i++){curNode=((E[i]&&E[i].div)?E[i].div.parentNode:n);while (curNode&&curNode.tagName=="DIV"){if (curNode.id&&curNode.id.indexOf("tobj")==0) { E[i].div.bSub=0;break;}else if (curNode.id&&curNode.id.indexOf("tmenu")==0) { E[i].div.bSub=1;break;};curNode=curNode.parentNode;}};var M=new RegExp("^tmenu("+J+".*)$");for (i=0;i<H.length;i++){K=H[i];if (M.test(K.id)){var N=new jsPopMenu(C);N.div=K;K.popM=N;for (var j=0;j<E.length;j++){var O=E[j];if (O.id=="item"+RegExp.$1){O.popMenu=N;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){var C=this;jsWndObj.prototype.attach.call(C,A,B);var D=B.iAppear==2?'SELECT':'DIV';C.dCon=C.div.getElementsByTagName(D)[0];};p.expand=function(A,B,C){if(A.style.visibility=='hidden')return;var D=A.parentNode;if(A.src.indexOf(B)>=0){A.src=A.src.replace(B,C);var E=D.getElementsByTagName('UL')[0];E.style.display='block';}else if(A.src.indexOf(C)>=0){A.src=A.src.replace(C,B);D.getElementsByTagName('UL')[0].style.display='none';};return f;};p.scrollTo=function(A){if(!this.div) return;var B=n;var C=this.div.getElementsByTagName('DIV');for(var D=0;C&&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){var C=this;jsWndObj.prototype.attach.call(C,A,B);var D=C.cwObj;C.dCon=C.div.getElementsByTagName('DIV')[0];C.dBkgnd=C.dCon.getElementsByTagName('DIV')[0];C.dBar=C.dBkgnd.getElementsByTagName('DIV')[0];C.step=B.step;C.range=B.range;C.barPos=B.barPos;D.tickTime=B.tickTime;D.dwBarFlags=B.dwBarFlags;if(D.dwBarFlags&0x20) C.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&FLAG_DONE) 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;if(D&0x80) C=B.rtRect.height-C;E.left='0px';E.top=(B.rtRect.height-C)+'px';E.width='100%';E.height=(C-2>0?C-2:0)+'px';}else{C*=B.rtRect.width;if(D&0x80) C=B.rtRect.width-C;E.left='0px';E.top='0px';E.width=(C-2>0?C-2:0)+'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){var C=this.cwObj;C.objType=11;C.formType=B.formType;C.dwFormFlags=B.dwFormFlags;};function jsWndFormEntry(){jsWndObj.prototype.constructor.call(this);};p=jsWndFormEntry.prototype=new jsWndObj();p.constructor=jsWndFormEntry;p.attach=function(A,B){var C=this;jsWndObj.prototype.attach.call(C,A,B);jsWndForm.prototype.attach.call(C,A,B);var D=C.div.getElementsByTagName('textarea');C.dCon=(D&&D.length?D[0]:C.div.getElementsByTagName('input')[0]);C.cwObj.iNumChars=B.iNumChars;};p.update=function(A,B,C){var D=this.dCon;if (D.value.length>B){alert(C);D.value=D.value.substring(0,B);D.focus();D.select();return f;};A.set(D.value);return;};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){var C=this;jsWndObj.prototype.attach.call(C,A,B);jsWndForm.prototype.attach.call(C,A,B);C.name=A;var D=C.div.getElementsByTagName('DIV')[0];C.dCon=D;C.dCtrl=D.getElementsByTagName('INPUT')[0];};p.setCheck=function(A){this.dCtrl.checked=A;};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){if(this.cwObj.formType==1) this.setCheck(1);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){var C=this;jsWndObj.prototype.attach.call(C,A,B);jsWndForm.prototype.attach.call(C,A,B);var D=C.div.getElementsByTagName('SELECT')[0];C.dCon=D;};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;for(var i=0;A.cwObj.arItems&&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){var C=this;jsWndObj.prototype.attach.call(C,A,B,1);C.cwObj.dwTextFlags=B.dwTextFlags;C.cwObj.borderSize=B.borderSize;C.cwObj.marginSize=B.marginSize;trivArExec(C.div.getElementsByTagName('DIV'),function(o){if (o.getAttribute("name")=="dCon") C.dCon=o;else if (o.getAttribute("name")=="dCon2") C.dCon2=o;if (C.dCon&&C.dCon2) return f;});};p.changeContents=function(A,B){var C=this;if (C.dCon2==n||C.inWriteContent) {if (!B||B<10) setTimeout(function(){C.changeContents(A,(B?++B:1));},200);return;};var D=C.dCon2;var E=0;var F=0;var G=0;var H=0;var I=0;var J=0;var K='left';var L=jsWndText.hasAncestor;var M=jsWndText.getFirstTextNode(D);if(M){var N=M.parentNode;if(L(N,D,"STRONG")) E=1;if(L(N,D,"EM")) F=1;if(L(N,D,"U")) G=1;var O=L(N,D,"SPAN");while (O!==n&&(H==0||I==0||J==0)){if(!H&&O.style.fontFamily) H=O.style.fontFamily;if(!I&&O.style.fontSize) I=O.style.fontSize;if(!J&&O.style.color) J=O.style.color;O=L(O.parentNode,D,"SPAN");};var P=L(M,D,"P");if(P) K=P.getAttribute("align");};var Q='<p align="'+K+'"><span style="font-size:'+(I?I:'10pt')+';color:'+(J?J:'#000000')+';font-family:'+(H?H:"'Arial',sans serif")+'">';if(E) Q+='<strong>';if(F) Q+='<em>';if(G) Q+='<u>';if(A!="~~~null~~~") Q+=A;if(E) Q+='</strong>';if(F) Q+='</em>';if(G) Q+='</u>';D.innerHTML=Q+'</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 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';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;
