PageSourceSearch

https://www.stadtwerk-am-see.de/de/static/js/HRSysLib/Transition/Sequenzen/FadeInWechsler.js?nc=1790327236423

js stadtwerk-am-see.de collected 2026-09-25 20:48:27 UTC 22,811 bytes, 739 lines download raw bytes

1/**
2 * Der FadeInWechsler wechselt animiert zwischen den Inhaltsbereichen in dem übergebenen Array mit IDs
3 * 
4 * @param {String} idHtmlElement                   ID des umschließenden Elements in dem die Inhalte dargestellt werden.
5 * @param {Array}  idsEinzelElemente               IDs der einzelnen Elemente zwischen denen gewechselt werden soll.
6 * @param {int}    durationOfDisplay    [optional] Die Zeitspanne, wie lange ein Einzelelement gezeigt werden soll.
7 * @param {int}    durationOfTransition [optional] Die Dauer eines Übergangs von Einzelelement zu Einzelelement.
8 */
9var FadeInWechsler = function (idHtmlElement, idsEinzelElemente, durationOfDisplay, durationOfTransition)
10{
11   try
12   {
13      // Das Element in dem die Bilder dargestellt werden.
14      this.idHtmlElement = idHtmlElement;
15      this.htmlElement = document.getElementById(this.idHtmlElement);
16      
17      // Das Array mit Bildern bzw deren URLs
18      this.m_idsEinzelElemente = idsEinzelElemente;
19      
20      // Die Zeitspanne, wie lange ein Bild gezeigt werden soll
21      if(durationOfDisplay)
22         this.durationOfDisplay = durationOfDisplay;
23      else
24         this.durationOfDisplay = 6000;
25           
26      // Die Dauer eines Übergangs von Bild zu Bild
27      if(durationOfTransition)
28         this.durationOfTransition = durationOfTransition;
29      else
30         this.durationOfTransition = 1500;
31      
32      this.m_IndexSichtbaresElement = -1;
33      this.m_IndexVorherSichtbaresElement = -1;
34      this.intervalId = null;
35      this.isAnimating = false;
36      this.m_Animator = null;
37      this.m_FadeOutAndIn = false;     //Altes Bild zuerst ganz ausblenden, dann erst neues rein.
38      this.m_AutoplayAllowed = true;
39      this.m_DynamicHeight = false;    // Vor allen bei Reitern schöner, die Gesamthöhe passt sich dem aktiven Element an.
40      this.m_ResizeTimerId = null;
41      this.m_HtmlElementHeight = -1;
42      this.UseEventManager = typeof(HREventManager) == "object";
43   }
44   catch (e) 
45   {
46      HRLogError(e);
47   }
48}
49
50FadeInWechsler.prototype.setConfiguration = function (configuration)
51{
52   if (configuration)
53   {
54      if (configuration.dynamicHeight)
55         this.m_DynamicHeight = configuration.dynamicHeight;
56   }
57}
58
59/**
60 * Initialisieren des Faders, ohne das erste Element
61 * zu aktivieren.
62 */
63FadeInWechsler.prototype.init = function()
64{
65   try
66   {
67      this.initElements();
68      //
69      // Bei diversen Tabs die selected-CSS Klasse entfernen, da ja kein
70      // Element aktiviert ist.
71      //
72      for (var i = 0; i < this.m_idsEinzelElemente.length; i++)
73      {
74         var tabElement = document.getElementById("Tab" + this.m_idsEinzelElemente[i]);
75         this.setTabElementSelectionState(tabElement, false);
76
77         tabElement = document.getElementById("TabUnten" + this.m_idsEinzelElemente[i]);
78         this.setTabElementSelectionState(tabElement, false);
79      }
80      this.addListener();
81   }
82   catch (e) 
83   {
84      HRLogError(e);
85   }
86}
87
88/**
89 * Initialisierung des Faders und Aktivierung des ersten Elements.
90 */
91FadeInWechsler.prototype.start = function(idInitialElement)
92{
93   try
94   {
95      this.initElements();
96      
97      var _this = this;
98      if (this.m_DynamicHeight)
99      {
100         this.startChangeToIndex(idInitialElement);
101      }
102      else
103      {
104         HRAddEventListener(window, "load", function() {_this.startChangeToIndex(idInitialElement);});
105         if (HREventManager && typeof(HREventManager.addListener) === 'function')
106         {
107            HREventManager.addListener(this.htmlElement, HREventNames.ajaxload, function() {_this.startChangeToIndex(idInitialElement);}, 
108                                       {useStandard: false, notifiedByParents: true});
109         }
110         
111      }
112
113      // Timer Intervall setzen
114      this.startAutoplay();
115
116      this.addListener();
117   }
118   catch (e) 
119   {
120      HRLogError(e);
121   }
122}
123
124FadeInWechsler.prototype.startChangeToIndex = function(idInitialElement)
125{
126   var newIndex = 0;
127   // Initialer Wechsel zum ersten Element.
128   if (idInitialElement != null && idInitialElement != '' && this.m_idsEinzelElemente.length > 0 && this.m_idsEinzelElemente[0] != idInitialElement)
129   {
130      this.m_IndexSichtbaresElement = 0;
131      newIndex = this.indexOfId(idInitialElement);
132      if (newIndex >= 0)
133      {
134         this.changeToIndex(newIndex);
135      }
136   }
137   else
138      this.next();
139   
140   if (!this.m_DynamicHeight)
141   {
142      var naechstesElement = null;
143      if (newIndex >= 0 && newIndex < this.m_idsEinzelElemente.length)
144         naechstesElement = document.getElementById(this.m_idsEinzelElemente[newIndex]);
145   
146      var newHeight = this.getElementHeight(naechstesElement);
147      if (newHeight > 0)
148      {
149         this.htmlElement.style.height = newHeight + "px";
150         this.m_HtmlElementHeight = newHeight;
151      }
152   }
153   try
154   {
155      this.htmlElement.parentNode.classList.add("hr-ready");
156   }
157   catch (e)
158   {
159      console.log(e);
160   }
161}
162
163/**
164 * Interne Methode für die Initialisierung der einzelnen Elemente des Faders.
165 * Setzen verschiedener style-Eigenschaften, Ermitteln
166 * der maximalen Höhe.
167 */
168FadeInWechsler.prototype.initElements = function()
169{
170   if(!this.htmlElement)
171      this.htmlElement = document.getElementById(this.idHtmlElement);
172   
173   /* Visibility bei allen ausschalten */
174   var maxHeight = 0;
175   for (var i = 0; i < this.m_idsEinzelElemente.length; i++)
176   {
177      if (this.m_idsEinzelElemente[i] && !this.m_idsEinzelElemente[i].trim().isEmpty())
178      {
179         var tempElem = document.getElementById(this.m_idsEinzelElemente[i]);
180         if (tempElem)
181         {
182            if (!this.m_DynamicHeight)
183            {
184               var height = getElementHeightValue(tempElem);
185               if (height > maxHeight)
186                  maxHeight = height;
187            }
188            //
189            // Dieses Objekt dem Element auch bekannt machen, damit wir
190            // leichteren Zugriff auf den Wechsel haben, ohne seinen Namen
191            // kennen zu müssen.
192            //
193            tempElem.m_HRFadeInWechsler = this;
194            tempElem.style.display = 'none';
195            tempElem.style.position = "absolute";
196            tempElem.style.top  = "0px";
197         }
198      }
199   }
200   if (maxHeight > 0 && !this.m_DynamicHeight)
201   {
202      this.htmlElement.style.height = maxHeight + "px";
203      this.m_HtmlElementHeight = maxHeight;
204   }
205}
206
207/**
208 * Interne Methode, um Listener für die Events load und resize beim
209 * window-Objekt zu ergänzen.
210 */
211FadeInWechsler.prototype.addListener = function()
212{
213   var _this = this;
214   if (typeof(HRAddEventListener) == "function")
215   {
216      if (this.m_DynamicHeight)
217      {
218         HRAddEventListener(window, "load", function() {_this.adjustHeight();});
219      }
220      HRAddEventListener(window, "resize", function() {_this.delayedAdjustHeight();});
221   }
222   if (this.UseEventManager)
223   {
224      HREventManager.addListener(this.htmlElement, "resize", function() {_this.adjustHeight();}, {useStandard: false, notifiedBySelf: false});
225      HREventManager.addListener(this.htmlElement, HREventNames.ajaxload, function() {_this.adjustHeight();}, {useStandard: false, notifiedBySelf: false});
226      HREventManager.addListener(this.htmlElement, "show", function() {_this.adjustHeight();}, {useStandard: false, notifiedBySelf: false, notifiedByParents: true});
227   }
228}
229
230/**
231 * Schliesst das übergebene Element ohne ein anderes zu öffnen.
232 * Danach sind alle Elemente geschlossen.
233 * Kann sinnvoll nur bei einem Reiter eingesetzt werden.
234 */
235FadeInWechsler.prototype.closeElement = function(idBisherigesElement)
236{
237   try
238   {
239      if(this.isAnimating == true)
240         return;
241
242      this.isAnimating = true;
243      var indexElement = this.indexOfId(idBisherigesElement);
244      if (indexElement >= 0)
245      {
246         var bisherigesElement = document.getElementById(this.m_idsEinzelElemente[indexElement]);
247         if (bisherigesElement)
248         {
249            var tabElement = document.getElementById("Tab" + this.m_idsEinzelElemente[indexElement]);
250            this.setTabElementSelectionState(tabElement, false);
251
252            tabElement = document.getElementById("TabUnten" + this.m_idsEinzelElemente[indexElement]);
253            this.setTabElementSelectionState(tabElement, false);
254
255            var _this = this;
256            var newHeight = 0;
257            
258            var animator = new Animator({duration: this.durationOfTransition, onComplete: function() 
259               {
260                  _this.isAnimating = false;
261                  _this.m_HtmlElementHeight = newHeight;
262                  _this.updateCSSClass();
263                  if (_this.UseEventManager)
264                  {
265                     HREventManager.dispatchEvent(bisherigesElement, 'hide', {'notifySelf': false, 'bubbles': true, notifyChildren: true, 'useStandard': false});
266                  }
267               },
268               onStep: function()
269               {
270                  if (_this.UseEventManager && _this.m_DynamicHeight)
271                  {
272                     HREventManager.dispatchEvent(_this.htmlElement, 'resize', {'n
272otifySelf': false, 'bubbles': true, 'useStandard': false});
273                  }
274               }});
275         
276            // sichtbares Element ausfaden und dann auf hidden setzen.
277            animator.addSubject(new NumericalStyleSubject(bisherigesElement, 'opacity', 1, 0)); // Wird von animator.js für ältere IE in filter: (alpha=...) übersetzt.
278            animator.addSubject(new DiscreteStyleSubject(bisherigesElement, "display", "block", "none", 0.99));
279         
280            if (this.m_DynamicHeight)
281            {
282               var actualHeight = this.m_HtmlElementHeight;
283               if (actualHeight <= 0)
284                  actualHeight = getElementHeightValue(this.htmlElement);
285               
286               animator.addSubject(new NumericalStyleSubject(this.htmlElement, 'height', actualHeight, newHeight));
287            }
288            this.m_Animator = animator;
289            animator.play();
290         }
291      }
292      this.m_IndexVorherSichtbaresElement = -1;
293      this.m_IndexSichtbaresElement = -1;
294   }
295   catch (e) 
296   {
297      HRLogError(e);
298   }
299   
300}
301
302/**
303 * Startet die automatische Animation auch nach einer Pause durch stopAutoplay().
304 * Startet allerdings nur, wenn das AutoplayAllowed-Flag gesetzt ist.
305 */
306FadeInWechsler.prototype.startAutoplay = function()
307{
308   try
309   {
310      if (!this.intervalId && this.m_AutoplayAllowed && this.m_idsEinzelElemente.length > 1)
311      {
312         var _this = this;
313         this.intervalId = window.setInterval(function(){_this.nextEvent(_this);}, this.durationOfDisplay);
314      }
315   }
316   catch (e) 
317   {
318      HRLogError(e);
319   }
320}
321
322/**
323 * Beendet die automatische Animation
324 */
325FadeInWechsler.prototype.stopAutoplay = function()
326{
327   try
328   {
329      if (this.intervalId)
330      {
331         window.clearInterval(this.intervalId);
332         this.intervalId = null;
333      }
334   }
335   catch (e) 
336   {
337      HRLogError(e);
338   }
339}
340
341/**
342 * Ein- und Ausschalten des Autoplay für z.B. eine Pause-Taste.
343 */
344FadeInWechsler.prototype.toggleAutoplay = function(pauseElement)
345{
346   if (this.m_AutoplayAllowed)
347   {
348      if (this.intervalId)
349      {
350         this.stopAutoplay();
351         if (pauseElement != null)
352         {
353            removeCSSClass(pauseElement, 'pause');
354            addCSSClass(pauseElement, 'play');
355         }
356      }
357      else
358      {
359         this.startAutoplay();
360         if (pauseElement != null)
361         {
362            removeCSSClass(pauseElement, 'play');
363            addCSSClass(pauseElement, 'pause');
364         }
365      }
366   }
367}
368
369/**
370 * Gibt true zurück, wenn der Autoplay aktiv ist, sonst false.
371 */
372FadeInWechsler.prototype.isAutoplayActive = function()
373{
374   return this.intervalId != null;
375}
376
377
378/**
379 * Methode wird aufgerufen, wenn der Benutzer aktiv den Wechsel veranlasst hat.
380 * ACHTUNG sollte wegen dem Neustart des Intervalls auch so bleiben!!!!
381 */
382FadeInWechsler.prototype.changeTo = function(newElementId)
383{
384   try
385   {
386      if(this.isAnimating == true)
387         return;
388   
389      var newIndex = this.indexOfId(newElementId);
390   
391      if (newIndex >= 0 && newIndex != this.m_IndexSichtbaresElement)
392      {
393         // Neustart des Timers damit nach dem Wechsel durch den Nutzer nicht zu schnell zum nächsten gewechselt wird.
394         this.stopAutoplay();
395         this.startAutoplay();
396         this.changeToIndex(newIndex);
397      }
398   }
399   catch (e) 
400   {
401      HRLogError(e);
402   }
403}
404
405FadeInWechsler.prototype.indexOfId = function(searchId)
406{
407   var newIndex = -1;
408   
409   for (var i = 0; i < this.m_idsEinzelElemente.length && newIndex < 0; i++)
410   {
411      if (searchId == this.m_idsEinzelElemente[i])
412         newIndex = i;
413   }
414   return newIndex;
415}
416
417FadeInWechsler.prototype.changeToIndex = function(newIndex)
418{
419   try
420   {
421      if(this.isAnimating == true)
422         return;
423      
424      this.isAnimating = true;
425   
426      var bisherigesElement = null;
427      var naechstesElement = null;
428   
429      if (this.m_IndexSichtbaresElement >= 0 && this.m_IndexSichtbaresElement < this.m_idsEinzelElemente.length)
430         bisherigesElement = document.getElementById(this.m_idsEinzelElemente[this.m_IndexSichtbaresElement]);
431   
432      if (newIndex >= 0 && newIndex < this.m_idsEinzelElemente.length)
433         naechstesElement = document.getElementById(this.m_idsEinzelElemente[newIndex]);
434   
435      var _this = this;
436      var theDuration = this.durationOfTransition;
437      if (this.m_FadeOutAndIn)
438         theDuration = this.durationOfTransition / 2;
439   
440      var tabElement = document.getElementById("Tab" + this.m_idsEinzelElemente[newIndex]);
441      this.setTabElementSelectionState(tabElement, true);
442
443      tabElement = document.getElementById("TabUnten" + this.m_idsEinzelElemente[newIndex]);
444      this.setTabElementSelectionState(tabElement, true);
445   
446      tabElement = document.getElementById("Tab" + this.m_idsEinzelElemente[_this.m_IndexSichtbaresElement]);
447      this.setTabElementSelectionState(tabElement, false);
448
449      tabElement = document.getElementById("TabUnten" + this.m_idsEinzelElemente[_this.m_IndexSichtbaresElement]);
450      this.setTabElementSelectionState(tabElement, false);
451   
452      var newHeight = this.getElementHeight(naechstesElement);
453      
454      var animator = new Animator({duration: theDuration, onComplete: function() 
455         {
456            if (!_this.m_FadeOutAndIn)
457            {
458               _this.isAnimating = false;
459               if (!_this.m_DynamicHeight)
460                  _this.m_HtmlElementHeight = newHeight;
461               else
462                  _this.adjustHeight();
463               
464               _this.updateCSSClass();
465            }
466            if (_this.UseEventManager)
467            {
468               HREventManager.dispatchEvent(bisherigesElement, 'hide', {'notifySelf': false, 'bubbles': true, notifyChildren: true, 'useStandard': false});
469               HREventManager.dispatchEvent(naechstesElement, 'show', {'notifySelf': false, 'bubbles': true, notifyChildren: true, 'useStandard': false});
470            }
471         },
472         onStep: function()
473         {
474            if (_this.UseEventManager && _this.m_DynamicHeight)
475            {
476               HREventManager.dispatchEvent(_this.htmlElement, 'resize', {'notifySelf': false, 'bubbles': true, 'useStandard': false});
477            }
478         }});
479   
480      var animatorFadeIn = animator;
481   
482      if (this.m_FadeOutAndIn)
483      {
484         animatorFadeIn = new Animator({duration: theDuration, onComplete: function() 
485            {
486               _this.isAnimating = false;
487               if (!_this.m_DynamicHeight)
488                  _this.m_HtmlElementHeight = newHeight;
489               else
490                  _this.adjustHeight();
491               
492               _this.updateCSSClass();
493            },
494            onStep: function()
495            {
496               if (_this.UseEventManager && _this.m_DynamicHeight)
497               {
498                  HREventManager.dispatchEvent(_this.htmlElement, 'resize', {'notifySelf': false, 'bubbles': true, 'useStandard': false});
499               }
500            }});
501      }
502   
503      // sichtbares Element ausfaden und dann auf hidden setzen.
504      if (bisherigesElement)
505      {
506         animator.addSubject(new NumericalStyleSubject(bisherigesElement, 'opacity', 1, 0)); // Wird von animator.js für ältere IE in filter: (alpha=...) übersetzt.
507         animator.addSubject(new DiscreteStyleSubject(bisherigesElement, "display", "block", "none", 0.99));
508      }
509   
510      // verstecktes Element einfaden. 
511      if (naechstesElement)
512      {
513         animatorFadeIn.addSubject(new NumericalStyleSubject(naechstesElement, 'opacity', 0, 1));
514         animatorFadeIn.addSubject(new DiscreteStyleSubject(naechstesElement, "display", "none", "block", 0.01));
515         
516         if (this.m_DynamicHeight)
517         {
518            var actualHeight = this.m_HtmlElementHeight;
519            if (actualHeight <= 0)
520               actualHeight = getElementHeightValue(this.htmlElement);
521            
522            animatorFadeIn.addSubject(new NumericalStyleSubject(this.htmlElement, 'height', actualHeight, newHeight));
523         }
524      }
525   
526      if (this.m_FadeOutAndIn)
527      {
528         var animatorArray = new Array();
529         animatorArray.push(animator);
530         animatorArray.push(animatorFadeIn);
531         var animatorChain = new AnimatorChain(animatorArray);
532         this.m_Animator = animatorChain;
533         animatorChain.toggle();
534      }
535      else
536      {
537         this.m_Animator = animator;
538         animator.play();
539      }
540      this.m_IndexVorherSichtbaresElement = this.m_IndexSichtbaresElement;
541      this.m_IndexSichtbaresElement = newIndex;
542   }
543   catch (e) 
544   {
545      HRLogError(e);
546   }
547}
548
549/**
550 * Blendet zu dem nächsten Einzelelement über.
551 */
552FadeInWechsler.prototype.next = function()
553{
554   try
555   {
556      var nextIndex = this.m_IndexSichtbaresElement + 1;
557
558      if (nextIndex >= this.m_idsEinzelElemente.length)
559         nextIndex = 0;
560
561      // Neustart des Timers damit nach dem Wechsel durch den Nutzer nicht zu schnell zum nächsten gewechselt wird.
562      this.stopAutoplay();
563      this.startAutoplay();
564      this.changeToIndex(nextIndex);
565   }
566   catch (e) 
567   {
568      HRLogError(e);
569   }
570}
571
572/**
573 * Blendet zu dem vorherigen Einzelelement über.
574 */
575FadeInWechsler.prototype.prev = function()
576{
577   try
578   {
579      var nextIndex = this.m_IndexSichtbaresElement - 1;
580
581      if (nextIndex < 0)
582         nextIndex = this.m_idsEinzelElemente.length - 1;
583
584      // Neustart des Timers damit nach dem Wechsel durch den Nutzer nicht zu schnell zum nächsten gewechselt wird.
585      this.stopAutoplay();
586      this.startAutoplay();
587      this.changeToIndex(nextIndex);
588   }
589   catch (e) 
590   {
591      HRLogError(e);
592   }
593}
594
595/**
596 * Das gleiche wie next() allerdings als Event-Methode konzipiert.
597 */
598FadeInWechsler.prototype.nextEvent = function(requesterObj)
599{
600    requesterObj.next();
601}
602
603
604FadeInWechsler.prototype.delayedAdjustHeight = function()
605{
606   if (this.m_ResizeTimerId)
607   {
608      window.clearTimeout(this.m_ResizeTimerId);
609      this.m_ResizeTimerId = null;
610   }
611   var _this = this;
612   this.m_ResizeTimerId = window.setTimeout(function(){_this.m_ResizeTimerId = null; _this.adjustHeight();}, 200);
613}
614
615/**
616 * 
617 */
618FadeInWechsler.prototype.adjustHeight = function()
619{
620   if (this.isAnimating === true && this.m_DynamicHeight)
621      return;
622   
623   var maxHeight = 0;
624   if (this.m_DynamicHeight)
625   {
626      if (this.m_IndexSichtbaresElement >= 0 && this.m_IndexSichtbaresElement < this.m_idsEinzelElemente.length)
627      {
628         var tempElem = document.getElementById(this.m_idsEinzelElemente[this.m_IndexSichtbaresElement]);
629         maxHeight = this.getElementHeight(tempElem);
630      }
631   }
632   else
633   {
634      for (var i = 0; i < this.m_idsEinzelElemente.length; i++)
635      {
636         if (this.m_idsEinzelElemente[i] && !this.m_idsEinzelElemente[i].trim().isEmpty())
637         {
638            var tempElem = document.getElementById(this.m_idsEinzelElemente[i]);
639            if (tempElem)
640            {
641               var height = this.getElementHeight(tempElem);
642               if (height > maxHeight)
643                  maxHeight = height;
644            }
645         }
646      }
647   }
648   if (maxHeight > 0)
649   {
650      this.htmlElement.style.height = maxHeight + "px";
651      this.m_HtmlElementHeight = maxHeight;
652   }
653}
654
655/**
656 * Methode vergibt für das sichtbare / aktive Element die
657 * CSS-Klasse hr-selected bei allen anderen wird die Klasse entfernt.
658 */
659FadeInWechsler.prototype.updateCSSClass = function()
660{
661   for (var i = 0; i < this.m_idsEinzelElemente.length; i++)
662   {
663      removeCSSClass(this.m_idsEinzelElemente[i], "hr-selected");
664   }
665   if (this.m_IndexSichtbaresElement >= 0)
666      addCSSClass(this.m_idsEinzelElemente[this.m_IndexSichtbaresElement], "hr-selected");
667}
668
669FadeInWechsler.prototype.setTabElementSelectionState = function(tabElement, newState)
670{
671   if (tabElement != null)
672   {
673      
674      if (newState === true)
675         addCSSClass(tabElement, "selected");
676      else
677         removeCSSClass(tabElement, 'selected');
678      
679      if (tabElement.tagName.toLowerCase() == "li")
680      {
681         const aTagList = tabElement.getElementsByTagName("a");
682         for (const aTag of aTagList) 
683         {
684            aTag.setAttribute('aria-selected', (newState === true ? 'true': 'false'));
685         }
686      }
687      else
688         tabElement.setAttribute('aria-selected', (newState === true ? 'true': 'false'));
689   }
690}
691
692/**
693 * Ermittelt die Höhe eines Elements. Falls das Element auf
694 * display="none" steht, wird notfalls zur Höhen-Ermittlung
695 * das Element temporär auf block umgeschaltet während gleichzeitig
696 * die visibility ausgeschaltet wird.
697 */
698FadeInWechsler.prototype.getElementHeight = function(elem)
699{
700   var elemHeight = 0;
701   if (elem)
702   {
703      var oldVisibility = "";
704      var visibilityChanged = false;
705      if (elem.style.display === 'none')
706      {
707//         oldVisibility = getStyleValue(elem, "visibility");
708         oldVisibility = elem.style.visibility;
709         elem.style.visibility = "hidden";
710         elem.style.display = "block";
711         visibilityChanged = true;
712      }
713      elemHeight = getElementHeightValue(elem);
714      
715      if (visibilityChanged === true)
716      {
717         elem.style.display = 'none';
718         elem.style.visibility = oldVisibility;
719         
720      }
721   }
722   return elemHeight;
723}
724
725FadeInWechsler.prototype.setDurationOfTransition = function(newDuration)
726{
727   this.durationOfTransition = newDuration;
728}
729
730FadeInWechsler.prototype.setDurationOfDisplay = function(newDuration)
731{
732	this.durationOfDisplay = newDuration + this.durationOfTransition;
733}
734
735FadeInWechsler.prototype.setAutoplay = function(newAutoplay)
736{
737	this.m_AutoplayAllowed = newAutoplay;
738}
739

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.