var fStarted = true; var nCurrentStep = 0; var tmrScrollTo = null; var sTimerList = ''; var fAutoRunning = true; var fPlaying = false; var nTutorBoxColor = 0; var aTutorBoxColors = new Array('#821413', '#8D2923', '#983F33', '#A25443', '#AD6A53', '#B87F63', '#C39574', '#CDAA83', '#D8C094', '#E3D5A4', '#EEEBB4', '#E3D5A4', '#D8C094', '#CDAA83', '#C39574', '#B87F63', '#AD6A53', '#A25443', '#983F33', '#8D2923'); var nTutorControlLeft = 0; var nTutorControlTop = 0; function AbsoluteLeft(oSubject) { if(oSubject.offsetParent) { return AbsoluteLeft(oSubject.offsetParent) + oSubject.offsetLeft; } else { return oSubject.offsetLeft; } } function AbsoluteTop(oSubject) { if(oSubject.offsetParent) { return AbsoluteTop(oSubject.offsetParent) + oSubject.offsetTop; } else { return oSubject.offsetTop; } } function NextStep(nStep) { fStarted = false; fAutoRunning = true; fPlaying = true; if(nStep<0||nStep>=aSteps.length) { return false; } TutorClearAll(); nCurrentStep = nStep; TutorControlUpdate(); aActions = aSteps[nStep]; document.frm.wt.value = '1'; document.frm.ls.value = nCurrentStep; //Added for alternate voice, 9.06.06, Theo var nDelay = 0; var sDelay = ''; var sAltVoice = 'Both'; try { if(document.frm.lv.value != '') { sAltVoice = document.frm.lv.value; } } catch(err) { sAltVoice = 'Both'; } for(a=2;a-1) //{ if (sDelay.indexOf('/') > 0 ) //Format: Male/Female { if (sAltVoice == 'Both') { if (nCurrentStep % 2 != 0) { nDelay = sDelay.split('/')[0]; } else { nDelay = sDelay.split('/')[1]; } } else { if (sAltVoice == 'Male') { nDelay = sDelay.split('/')[0]; } else { nDelay = sDelay.split('/')[1]; } } } //} sTimerList += (sTimerList!=''?',':'') + window.setTimeout(aParts[1], nDelay); } //Added to correct the delays on Male/Female voices, 9.06.06, Theo nDelay = aActions[1]; sDelay = aActions[1].toString(); if (sDelay.indexOf('/') > 0 ) //Format: Male/Female { if (sAltVoice == 'Both') { if (nCurrentStep % 2 != 0) { nDelay = sDelay.split('/')[0]; } else { nDelay = sDelay.split('/')[1]; } } else { if (sAltVoice == 'Male') { nDelay = sDelay.split('/')[0]; } else { nDelay = sDelay.split('/')[1]; } } } if(nDelay > 0) //aActions[1] > 0 { if(nStep0)?1:0); } function TutorAudio_DoFSCommand(command, args) { if(command=='loaded') { window.status = ''; document.all.trTutorControlLoading.style.display = 'none'; document.all.trTutorControlButtons.style.display = ''; TutorPreloaded(); } if(command=='loading') { nPercent = Math.floor(Number(args) * 100) window.status = 'Loading Audio: ' + nPercent + '% complete'; document.all.divTutorLoadingProgress.style.clip = 'rect(0 ' + (7 + Math.floor(88 * Number(args))) + ' 20 0)'; document.all.divTutorLoadingCaption.innerHTML = nPercent + '% loaded'; } } function TutorBox(oSubject, nDuration, nLeft, nTop, nWidth, nHeight) { var oHighlight = document.all.idHighlight; oHighlight.style.display = ''; oHighlight.style.left = AbsoluteLeft(oSubject) + nLeft; oHighlight.style.top = AbsoluteTop(oSubject) + nTop; oHighlight.style.width = oSubject.clientWidth + nWidth; oHighlight.style.height = oSubject.clientHeight + nHeight; //Added for alternate voice, 9.07.06, Theo var nDelay = 0; var sDelay = ''; var sAltVoice = 'Both'; try { if(document.frm.lv.value != '') { sAltVoice = document.frm.lv.value; } } catch(err) { sAltVoice = 'Both'; } nDelay = nDuration; sDelay = nDuration.toString(); if (sDelay.indexOf('/') > 0 ) //Format: Male/Female { if (sAltVoice == 'Both') { if (nCurrentStep % 2 != 0) { nDelay = sDelay.split('/')[0]; } else { nDelay = sDelay.split('/')[1]; } } else { if (sAltVoice == 'Male') { nDelay = sDelay.split('/')[0]; } else { nDelay = sDelay.split('/')[1]; } } } if(nDelay > 0) //nDuration > 0 { sTimerList += (sTimerList!=''?',':'') + window.setTimeout('document.all.idHighlight.style.display=\'none\'', nDelay); //nDuration } TutorBoxColor(); } function TutorBoxColor() { if(document.all.idHighlight.style.display=='') { document.all.idHighlight.style.borderColor = aTutorBoxColors[nTutorBoxColor++]; if(nTutorBoxColor>=aTutorBoxColors.length) { nTutorBoxColor=0; } window.setTimeout('TutorBoxColor()', 20) } } function TutorClearAll() { document.all.idHighlight.style.display='none'; if(sTimerList.length>0) { aTimerList = sTimerList.split(','); for(a=0;a 2) || (Math.abs(nTutorControlNewTop - nTutorControlTop) > 2)) { oControl.style.left = nTutorControlNewLeft - sgn(nTutorControlCurrentLeft - nTutorControlLeft); oControl.style.top = nTutorControlNewTop - sgn(nTutorControlCurrentTop - nTutorControlTop); window.setTimeout('TutorControlMove()', 10); } else { oControl.style.left = nTutorControlLeft; oControl.style.top = nTutorControlTop; } } function TutorControlUpdate() { //Added for alternate voice, 9.12.06, Theo var sAltVoice = 'Both'; var fMale = false; var fFemale = false; var fAlternate = false; try { if(document.frm.lv.value != '') { sAltVoice = document.frm.lv.value; } } catch(err) { sAltVoice = 'Both'; } if (sAltVoice == 'Both') { fAlternate = true; } else { if (sAltVoice == 'Male') { fMale = true; } else { fFemale = true; } } var sImgTutorPrev = '/art/walkthrough/images/wtPrev' + ((fPlaying)?'':'Off') + '.gif' var sImgTutorPlay = '/art/walkthrough/images/wtPlay' + ((!fPlaying)?'':'On') + '.gif' var sImgTutorStop = '/art/walkthrough/images/wtStop' + ((fPlaying)?'':'Off') + '.gif' var sImgTutorNext = '/art/walkthrough/images/wtNext' + ((fPlaying)?'':'Off') + '.gif' var sImgTutorMale = '/art/walkthrough/images/wtMale' + ((fPlaying && fMale)?'On':(!fPlaying && fMale)?'Active':'Off') + '.gif' var sImgTutorFemale = '/art/walkthrough/images/wtFemale' + ((fPlaying && fFemale)?'On':(!fPlaying && fFemale)?'Active':'Off') + '.gif' var sImgTutorAlternate = '/art/walkthrough/images/wtAlternate' + ((fPlaying && fAlternate)?'On':(!fPlaying && fAlternate)?'Active':'Off') + '.gif' TutorSetImage(document.images.imgTutorPrev, sImgTutorPrev); TutorSetImage(document.images.imgTutorPlay, sImgTutorPlay); TutorSetImage(document.images.imgTutorStop, sImgTutorStop); TutorSetImage(document.images.imgTutorNext, sImgTutorNext); TutorSetImage(document.images.imgTutorMale, sImgTutorMale); TutorSetImage(document.images.imgTutorFemale, sImgTutorFemale); TutorSetImage(document.images.imgTutorAlternate, sImgTutorAlternate); } function TutorControlEZBntUpdate(nStep) { try { //var sImgEZBuildBnt = '/art/iTourEZBuildBnt_' + ((fPlaying)?'On':'Off') + '.gif'; var aStepsEZBnt = aSteps[nStep]; var sActiveEZBnt = aStepsEZBnt[2].split('=')[1].toString(); for(var a=0; a 0 ) { var aTemp = aSteps[a][0].split('|'); for (b=1; b < aTemp.length; b++) { //skip the first element which is the name. if (aTemp[b].indexOf('=') > 0 ) { //alert(aTemp[b].split('=')[0] + ':::' + aTemp[b].split('=')[1]); if (aTemp[b].split('=')[0].toLowerCase() == 'out') { window.setTimeout('hideDiv(\'' + aTemp[b].split('=')[1] + '\');', 100); //window.setTimeout('dojo.lfx.html.fadeOut(\'' + aTemp[b].split('=')[1] + '\', 500).play();', 500); } else if (aTemp[b].split('=')[0].toLowerCase() == 'in') { window.setTimeout('showDiv(\'' + aTemp[b].split('=')[1] + '\');', 500); //window.setTimeout('dojo.lfx.html.fadeIn(\'' + aTemp[b].split('=')[1] + '\', 1000).play();', 500); } } } //end for b } //end if } catch(err) { //ingored } } //end for a } function TutorGetCookie(c_name) { if (document.cookie.length > 0) { c_start = document.cookie.indexOf(c_name + "="); if (c_start != -1) { c_start = c_start + c_name.length + 1; c_end = document.cookie.indexOf(";", c_start); if (c_end == -1) c_end = document.cookie.length; return unescape(document.cookie.substring(c_start, c_end)); } } return null; } function TutorSetCookie(c_name, value, expiredays) { var exdate = new Date(); exdate.setDate(exdate.getDate() + expiredays); document.cookie = c_name + "=" + escape(value)+ ((expiredays == null) ? "" : ";expires=" + exdate); } function TutorCheckCookie() { altvoice = TutorGetCookie('altvoice'); if (altvoice != null) { //alert('The Cookie found: '+ altvoice + '!'); document.frm.lv.value = altvoice; } else { try { if(document.frm.lv.value != '') { altvoice = document.frm.lv.value; } else { altvoice = 'Both'; } } catch(err) { altvoice = 'Both'; } if (altvoice != null && altvoice != "") { TutorSetCookie('altvoice', altvoice, 365); } } } function TutorEraseCookie(c_name) { TutorSetCookie(c_name, "", -1); } function TutorControlWait() { //fAutoRunning = false; fPlaying = false; if(nCurrentStep 2) { document.body.scrollTop = nScrollToNew; tmrScrollTo = window.setTimeout('TutorScroll(' + nScrollTo + ')', 10); } else { document.body.scrollTop = nScrollTo; } } function TutorSetImage(oImage, sPath) { if(sPath.toLowerCase()!=oImage.src.substr(oImage.src.length - sPath.length).toLowerCase()) { oImage.src = sPath; } } function TutorShowObject(oSubject) { nTopEdge = AbsoluteTop(oSubject) - 20 nBottomEdge = AbsoluteTop(oSubject) + oSubject.offsetHeight + 20 if(nTopEdge < document.body.scrollTop) { TutorScroll(nTopEdge); } else { if(nBottomEdge > (document.body.scrollTop + document.body.clientHeight)) { TutorScroll(nBottomEdge - document.body.clientHeight); } } } function TutorStart() { var sTutorPreload = ''; var nTutorControlFound = false; var sVoiceFile = ''; //Added for alternate voice, 8.31.06, Theo for(a=0;a-1) { //sTutorPreload += (sTutorPreload!=''?',':'') + '/art/walkthrough/Female/' + sCommand.split('\'')[1]; var sTemp = sCommand.split('\'')[1]; if (sTemp.indexOf('=') > 0 ) { sVoiceFile = sTemp.split('=')[0]; } else { sVoiceFile = sTemp; } sTutorPreload += (sTutorPreload!=''?',':'') + '/art/walkthrough/Female/' + sVoiceFile; sTutorPreload += (sTutorPreload!=''?',':'') + '/art/walkthrough/Male/' + sVoiceFile; } if((sCommand.toLowerCase().indexOf('|tutorcontrol(')>-1)&&!nTutorControlFound) { nTutorControlFound = true; window.setTimeout(sCommand.split('|')[1], 0); } } } //alert(sTutorPreload); document.TutorAudio.SetVariable('files', sTutorPreload); document.TutorAudio.GotoFrame(0); fStarted = false; } function TutorStop() { fAutoRunning = false; fPlaying = false; TutorClearAll(); TutorPlay(''); TutorControlUpdate(); TutorControlEZBntUpdate(nCurrentStep) TutorCloseMenu(0); TutorEZBuildFadeAllIn() //for Home.asp, 11.29.06, Theo } function TutorTrigger(sStepName) { if(fAutoRunning) { if (fStarted == false) //fixed the error on triggering when the page is refreshed, 11.22.06, Theo { for(a=nCurrentStep;a-1 && this.dom)?1:0; this.ie4=(document.all && !this.dom)?1:0; this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; this.ns4=(document.layers && !this.dom)?1:0; this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5) return this } bw = new TutorCheckBrowser(); //How many pixels should it move every step? var tMove=3; //At what speed (in milliseconds, lower value is more speed) var tSpeed=10; //Do you want it to move with the page if the user scroll the page? var tMoveOnScroll=false; //How much of the menu should be visible in the in state? var tShow=0; function TutorMakeMenu(obj,nest,show,move,speed){ nest=(!nest) ? '':'document.'+nest+'.' this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0; this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0; this.x=(bw.ns4 || bw.ns5)? this.css.left:this.el.offsetLeft; this.y=(bw.ns4 || bw.ns5)? this.css.top:this.el.offsetTop; this.state=1; this.go=0; this.mup=TutorMUp; this.show=show; this.mdown=TutorMDown; this.height=bw.ns4?this.css.document.height:this.el.offsetHeight this.moveIt=TutorMoveIt; this.move=move; this.speed=speed this.obj = obj + "Object"; eval(this.obj + "=this") } function TutorMoveIt(x,y){ this.x=x; this.y=y; this.css.left=this.x; this.css.top=this.y } //Menu in function TutorMUp(){ var oShadow = document.getElementById('divTutorSlideShadow0'); var oMaleBtn = document.getElementById('divTutorMale'); var oFemaleBtn = document.getElementById('divTutorFemale'); var oAlternateBtn = document.getElementById('divAlternate'); //var oVoiceSel = document.getElementById('divTutorSlideMenu0'); //window.status = 'TutorMUp:' + this.y + '>' + (-this.height+this.show); if(this.y>-this.height+this.show+2){ //-this.height+this.show oShadow.style.visibility='hidden'; this.go=1; this.moveIt(this.x,this.y-this.move) if(this.y < 15) { oAlternateBtn.style.visibility='hidden'; } if(this.y < 45) { oMaleBtn.style.visibility='hidden'; } if(this.y < 40) { oFemaleBtn.style.visibility='hidden'; } setTimeout(this.obj+".mup()",this.speed) }else{ this.go=0; this.state=1; TutorSetImage(document.images.imgTutorHandle, '/art/walkthrough/images/wtHandleDown.gif'); } } //Menu out function TutorMDown(){ var oShadow = document.getElementById('divTutorSlideShadow0'); var oMaleBtn = document.getElementById('divTutorMale'); var oFemaleBtn = document.getElementById('divTutorFemale'); var oAlternateBtn = document.getElementById('divAlternate'); //var oVoiceSel = document.getElementById('divTutorSlideMenu0'); //window.status = 'TutorMDown:' + this.x + ', ' + this.y; if(this.y<=79){ //this.y 45) { oFemaleBtn.style.visibility='visible'; } if(this.y > 40) { oMaleBtn.style.visibility='visible'; } if(this.y > 15) { oAlternateBtn.style.visibility='visible'; } setTimeout(this.obj+".mdown()",this.speed) }else{ this.go=0; this.state=0; oShadow.x = this.x; oShadow.y = this.y; oShadow.style.visibility='visible'; TutorSetImage(document.images.imgTutorHandle, '/art/walkthrough/images/wtHandleUp.gif'); } //window.status = 'TutorMDown:' + this.go + ', ' + this.state + ', ' + this.y; } function TutorRegisterEvent(e) { if(!oMenu[0].go){ if(!oMenu[0].state) { if (!e) var e = window.event; var tg = (window.event) ? e.srcElement : e.target; //window.status = tg.nodeName + ', ' + e.type; if (tg.nodeName != 'TD' && tg.nodeName != 'TABLE' && tg.nodeName != 'DIV') return; var reltg = (e.relatedTarget) ? e.relatedTarget : e.toElement; while (reltg != tg && reltg.nodeName != 'BODY') reltg= reltg.parentNode if (reltg== tg) return; // Mouseout took place when mouse actually left layer // Handle event oMenu[0].mup() } else { oMenu[0].mdown() } } //return false; } function TutorOpenMenu(num){ if(!oMenu[num].go && oMenu[num].state) { //window.status = 'TutorSlideMenu - open'; oMenu[num].mdown() } } function TutorCloseMenu(num){ if(!oMenu[num].go && !oMenu[num].state) { //window.status = 'TutorSlideMenu - closed'; oMenu[num].mup() } } function TutorSlideMenu(num){ if(!oMenu[num].go){ if(!oMenu[num].state) { //window.status = 'TutorSlideMenu - closed'; oMenu[num].mup() } else { //window.status = 'TutorSlideMenu - open'; oMenu[num].mdown() } } } function TutorCheckScrolled(){ for(i=0;i \n'); document.write('on error resume next \n'); document.write('Sub TutorAudio_FSCommand(ByVal command, ByVal args)\n'); document.write(' call TutorAudio_DoFSCommand(command, args)\n'); document.write('end sub\n'); document.write(' \n'); }