PageSourceSearch

https://www.reiso.org/components/com_flexicontent/assets/js/tabber…?e48044b83e6db9cb4775317895c19a21

js reiso.org collected 2026-10-02 06:03:08 UTC 22,502 bytes, 823 lines download raw bytes

1/*==================================================
2	tabber.js by Patrick Fitzgerald [email protected]
3
4	Documentation can be found at the following URL:
5	http://www.barelyfitz.com/projects/tabber/
6
7	License (http://www.opensource.org/licenses/mit-license.php)
8
9	Copyright (c) 2006 Patrick Fitzgerald
10
11	Permission is hereby granted, free of charge, to any person
12	obtaining a copy of this software and associated documentation files
13	(the "Software"), to deal in the Software without restriction,
14	including without limitation the rights to use, copy, modify, merge,
15	publish, distribute, sublicense, and/or sell copies of the Software,
16	and to permit persons to whom the Software is furnished to do so,
17	subject to the following conditions:
18
19	The above copyright notice and this permission notice shall be
20	included in all copies or substantial portions of the Software.
21
22	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
26	BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
27	ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
28	CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29	SOFTWARE.
30	==================================================*/
31
32
33Element.prototype.tabber_hasClass = function(className)
34{
35	if (!!this.classList)
36	{
37		return this.classList.contains(className);
38	}
39	else
40	{
41		return !!this.className.match(new RegExp('(\\s|^)' + className + '(\\s|$)'));
42	}
43}
44
45
46Element.prototype.tabber_addClass = function(className)
47{
48	var css_classes = className.split(/[\s]+/);
49
50	for (i=0; i < css_classes.length; i++)
51	{
52	  if (!this.tabber_hasClass(css_classes[i]))
53		{
54			this.className += ' ' + css_classes[i];
55		}
56	}
57}
58
59
60Element.prototype.tabber_removeClass = function(className)
61{
62	var css_classes = className.split(/[\s]+/);
63
64	for (i=0; i < css_classes.length; i++)
65	{
66	  if (this.tabber_hasClass(css_classes[i]))
67		{
68	    var reg = new RegExp('(\\s|^)' + css_classes[i] + '(\\s|$)');
69	    this.className = this.className.replace(reg, ' ');
70	  }
71	}
72}
73
74
75function tabberObj(argsObj)
76{
77	var arg; /* name of an argument to override */
78
79	/* Element for the main tabber div. If you supply this in argsObj,
80		 then the init() method will be called.
81	*/
82	this.div = null;
83
84	/* Class of the main tabber div */
85	this.classMain = "fctabber";
86
87	/* Rename classMain to classMainLive after tabifying
88		 (so a different style can be applied)
89	*/
90	this.classMainLive = "tabberlive";
91
92	/* Class of each DIV that contains a tab */
93	this.classTab = "tabbertab";
94
95	/* Class to indicate which tab should be active on startup by default */
96	this.classTabDefault = "tabbertabdefault";
97
98	/* Class to indicate which tab should be active on startup ignoring cookie*/
99	this.classTabForced = "tabbertabforced";
100
101	/* Class for the navigation UL */
102	this.classNav = "tabbernav";
103
104	/* When a tab is to be hidden, instead of setting display='none', we
105		 set the class of the div to classTabHide. In your screen
106		 stylesheet you should set classTabHide to display:none.  In your
107		 print stylesheet you should set display:block to ensure that all
108		 the information is printed.
109	*/
110	this.classTabHide = "tabbertabhide";
111
112	/* Class to set the navigation LI when the tab is active, so you can
113		 use a different style on the active tab.
114	*/
115	this.classNavActive = "tabberactive";
116
117	/* Elements that might contain the title for the tab, only used if a
118		 title is not specified in the TITLE attribute of DIV classTab.
119	*/
120	this.titleElements = ['h3','h2','h4','h5','h6'];
121
122	/* Should we strip out the HTML from the innerHTML of the title elements?
123		 This should usually be true.
124	*/
125	this.titleElementsStripHTML = true;
126
127	/* If the user specified the tab names using a TITLE attribute on
128		 the DIV, then the browser will display a tooltip whenever the
129		 mouse is over the DIV. To prevent this tooltip, we can remove the
130		 TITLE attribute after getting the tab name.
131	*/
132	this.removeTitle = true;
133
134	/* If you want to add an id to each link set this to true */
135	this.addLinkId = true;
136
137	/* If addIds==true, then you can set a format for the ids.
138		 <tabberid> will be replaced with the id of the main tabber div.
139		 <tabnumberzero> will be replaced with the tab number
140			 (tab numbers starting at zero)
141		 <tabnumberone> will be replaced with the tab number
142			 (tab numbers starting at one)
143		 <tabtitle> will be replaced by the tab title
144			 (with all non-alphanumeric characters removed)
145	 */
146	this.linkIdFormat = '<tabberid>_nav_<tabnumberone>';
147
148	/* You can override the defaults listed above by passing in an object:
149		 var mytab = new tabber({property:value,property:value});
150	*/
151	for (arg in argsObj) { this[arg] = argsObj[arg]; }
152
153	/* Create regular expressions for the class names; Note: if you
154		 change the class names after a new object is created you must
155		 also change these regular expressions.
156	*/
157	this.REclassMain = new RegExp('\\b' + this.classMain + '\\b', 'gi');
158	this.REclassMainLive = new RegExp('\\b' + this.classMainLive + '\\b', 'gi');
159	this.REclassTab = new RegExp('\\b' + this.classTab + '\\b', 'gi');
160	this.REclassTabDefault = new RegExp('\\b' + this.classTabDefault + '\\b', 'gi');
161	this.REclassTabForced = new RegExp('\\b' + this.classTabForced + '\\b', 'gi');
162	this.REclassTabHide = new RegExp('\\b' + this.classTabHide + '\\b', 'gi');
163
164	/* Array of objects holding info about each tab */
165	this.tabs = new Array();
166
167	/* If the main tabber div was specified, call init() now */
168	if (this.div)
169	{
170		this.init(this.div);
171
172		/* We don't need the main div anymore, and to prevent a memory leak
173			 in IE, we must remove the circular reference between the div
174			 and the tabber object. */
175		this.div = null;
176	}
177}
178
179
180/*--------------------------------------------------
181	Methods for tabberObj
182	--------------------------------------------------*/
183
184
185tabberObj.prototype.init = function(e)
186{
187	/* Set up the tabber interface.
188
189		 e = element (the main containing div)
190
191		 Example:
192		 init(document.getElementById('mytabberdiv'))
193	 */
194
195	var
196	childNodes, /* child nodes of the tabber div */
197	i, i2, /* loop indices */
198	t, /* object to store info about a single tab */
199	defaultTab=0, /* which tab to select by default */
200	forcedTab=-1,  /* activate specific tab ignoring last set cookie */
201	DOM_ul, /* tabbernav list */
202	DOM_li, /* tabbernav list item */
203	DOM_a, /* tabbernav link */
204	aId, /* A unique id for DOM_a */
205	headingElement; /* searching for text to use in the tab */
206
207	/* Verify that the browser supports DOM scripting */
208	if (!document.getElementsByTagName) { return false; }
209
210	/* If the main DIV has an ID then save it. */
211	if (e.id)
212	{
213		this.id = e.id;
214	}
215
216	/* Clear the tabs array (but it should normally be empty) */
217	this.tabs.length = 0;
218
219	/* Loop through an array of all the child nodes within our tabber element. */
220	childNodes = e.childNodes;
221
222	for (i = 0; i < childNodes.length; i++)
223	{
224		/* Find the nodes where class="tabbertab" */
225		if (childNodes[i].className && childNodes[i].className.match(this.REclassTab))
226		{
227			/* Create a new object to save info about this tab */
228			t = new Object();
229
230			/* Save a pointer to the div for this tab */
231			t.div = childNodes[i];
232
233			/* Add the new object to the array of tabs */
234			this.tabs[this.tabs.length] = t;
235
236			/* If the class name contains classTabDefault,
237				 then select this tab by default.
238			*/
239			if (childNodes[i].className.match(this.REclassTabDefault))
240			{
241				defaultTab = this.tabs.length-1;
242			}
243
244			/* If the class name contains classTabForced,
245				 then select this tab by default.
246			*/
247			if (childNodes[i].className.match(this.REclassTabForced))
248			{
249				forcedTab = this.tabs.length-1;
250			}
251		}
252	}
253
254	/* Create a new UL list to hold the tab headings */
255	DOM_ul = document.createElement("ul");
256	DOM_ul.className = this.classNav;
257
258	var decode_entities = document.createElement("textarea");  // used to decode html entities
259
260	/* Loop through each tab we found */
261	for (i=0; i < this.tabs.length; i++)
262	{
263		t = this.tabs[i];
264
265		/* Get the label to use for this tab:
266			 From the title attribute on the DIV,
267			 Or from one of the this.titleElements[] elements,
268			 Or use an automatically generated number.
269		 */
270		t.headingText = t.div.title;
271		t.headingTitle = '';
272		t.headingIconClass  = t.div.getAttribute('data-icon-class');
273		t.headingIcon2Class = t.div.getAttribute('data-icon2-class');
274		t.headingPrefixTxt  = t.div.getAttribute('data-prefix-text');
275
276		/* Remove the title attribute to prevent a tooltip from appearing */
277		if (this.removeTitle)
278		{
279			t.div.title = '';
280		}
281
282		var tab_classes = '';
283		if (!t.headingText)
284		{
285			/* Title was not defined in the title of the DIV,
286				 So try to get the title from an element within the DIV.
287				 Go through the list of elements in this.titleElements
288				(typically heading elements ['h2','h3','h4'])
289			*/
290			for (i2=0; i2<this.titleElements.length; i2++)
291			{
292				headingElement = t.div.getElementsByTagName(this.titleElements[i2])[0];
293				if (headingElement)
294				{
295					decode_entities.innerHTML = headingElement.innerHTML;
296					t.headingText = decode_entities.value;
297					t.headingTitle = headingElement.title;
298					t.headingDataTitle = headingElement.dataset.title;
299					t.headingContent = headingElement.dataset.content;
300					t.headingPlacement = headingElement.dataset.placement;
301					t.headingDataAttrA = headingElement.dataset.data_attr_a;
302					t.headingDataAttrB = headingElement.dataset.data_attr_b;
303					t.headingOnMouseUp = headingElement.onmouseup;
304					if (headingElement.hasAttribute('class'))
305					{
306						tab_classes=headingElement.getAttribute('class');
307					}
308					if (this.titleElementsStripHTML)
309					{
310						t.headingText.replace(/<br>/gi,"[br]");
311						t.headingText.replace(/<br\/>/gi,"[br]");
312						t.headingText.replace(/<br \/>/gi,"[br]");
313						t.headingText = t.headingText.replace(/<[^>]+>/g,"");
314						t.headingText = t.headingText.replace(/\[br\]/g,"<br/>");
315					}
316					break;
317				}
318			}
319		}
320
321		if (!t.headingText)
322		{
323			/* Title was not found (or is blank) so automatically generate a
324				 number for the tab.
325			*/
326			t.headingText = '' + (i + 1);
327		}
328
329		/* Create a list element for the tab */
330		DOM_li = document.createElement("li");
331
332		/* Save a reference to this list item so we can later change it to
333			 the "active" class */
334		t.li = DOM_li;
335
336		/* Create a link to activate the tab */
337		DOM_a = document.createElement("a");
338		if (t.headingIconClass || t.headingIcon2Class)
339		{
340			var icon_classes = [];
341			icon_classes[0] = t.headingIconClass;
342			icon_classes[1] = t.headingIcon2Class;
343			for (var j = 0; j < icon_classes.length; j++)
344			{
345				if (!icon_classes[j]) continue;
346				var icon = document.createElement("i");
347				icon.setAttribute('class', icon_classes[j]);
348				DOM_a.appendChild(icon);
349				DOM_a.appendChild(document.createTextNode(' '));
350			}
351		}
352		DOM_a.appendChild(document.createTextNode(t.headingText));
353		DOM_a.href = "javascript:void(null);";
354
355		if (t.headingTitle)
356		{
357			DOM_a.title = t.headingTitle;
358		}
359		if (t.headingDataTitle)
360		{
361			DOM_a.dataset.title = t.headingDataTitle;
362		}
363		if (t.headingContent)
364		{
365			DOM_a.dataset.content = t.headingContent;
366		}
367		if (t.headingPlacement)
368		{
369			DOM_a.dataset.placement = t.headingPlacement;
370		}
371		if (t.headingDataAttrA)
372		{
373			DOM_a.dataset.data_attr_a = t.headingDataAttrA;
374		}
375		if (t.headingDataAttrB)
376		{
377			DOM_a.dataset.data_attr_b = t.headingDataAttrB;
378		}
379		if (t.headingOnMouseUp)
380		{
381			DOM_a.onmouseup = t.headingOnMouseUp;
382		}
383
384		DOM_a.onclick = this.navClick;
385		if (tab_classes)
386		{
387			DOM_a.tabber_addClass(tab_classes);
388		}
389
390		/* Add some properties to the link so we can identify which tab
391			 was clicked. Later the navClick method will need this.
392		*/
393		this.forcedTab = forcedTab;
394		DOM_a.tabber = this;
395		DOM_a.tabberIndex = i;
396
397		/* Do we need to add an id to DOM_a? */
398		if (this.addLinkId && this.linkIdFormat)
399		{
400			/* Determine the id name */
401			aId = this.linkIdFormat;
402			aId = aId.replace(/<tabberid>/gi, this.id);
403			aId = aId.replace(/<tabnumberzero>
403/gi, i);
404			aId = aId.replace(/<tabnumberone>/gi, i+1);
405			aId = aId.replace(/<tabtitle>/gi, t.headingText.replace(/[^a-zA-Z0-9\-]/gi, ''));
406
407			DOM_a.id = aId;
408		}
409
410		/* Add the link to the list element */
411		if (t.headingPrefixTxt) {
412			var span = document.createElement("span");
413			span.setAttribute('class', 'label');
414			span.appendChild(document.createTextNode(t.headingPrefixTxt));
415			DOM_li.appendChild(span);
416			DOM_li.appendChild(document.createElement("br"));
417		}
418		DOM_li.appendChild(DOM_a);
419
420		/* Add the list element to the list */
421		DOM_ul.appendChild(DOM_li);
422
423		if (DOM_a.tabber_hasClass('hasTooltip') && !!jQuery)
424		{
425			try{
426				jQuery(DOM_a).tooltip({html: true, container: DOM_a});
427			}catch(e){}
428		}
429
430		if (DOM_a.tabber_hasClass('hasPopover') && !!jQuery)
431		{
432			try {
433				jQuery(DOM_a).popover({html: true, container: DOM_a, trigger : 'hover focus'});
434			}
435			catch(e) {}
436		}
437	}
438
439	/* Add the UL list to the beginning of the tabber div */
440	e.insertBefore(DOM_ul, e.firstChild);
441
442	/* Make the tabber div "live" so different CSS can be applied */
443	e.className = e.className.replace(this.REclassMain, this.classMainLive);
444
445	/* Activate the default or forced tab, and do not call the onclick handler */
446	this.tabShow(forcedTab >= 0 ? forcedTab : defaultTab);
447
448	/* If the user specified an onLoad function, call it now. */
449	if (typeof this.onLoad == 'function') {
450		this.onLoad({tabber:this});
451	}
452
453	return this;
454};
455
456
457tabberObj.prototype.navClick = function(event)
458{
459	/* This method should only be called by the onClick event of an <A>
460		 element, in which case we will determine which tab was clicked by
461		 examining a property that we previously attached to the <A>
462		 element.
463
464		 Since this was triggered from an onClick event, the variable
465		 "this" refers to the <A> element that triggered the onClick
466		 event (and not to the tabberObj).
467
468		 When tabberObj was initialized, we added some extra properties
469		 to the <A> element, for the purpose of retrieving them now. Get
470		 the tabberObj object, plus the tab number that was clicked.
471	*/
472
473	var
474	rVal, /* Return value from the user onclick function */
475	a, /* element that triggered the onclick event */
476	self, /* the tabber object */
477	tabberIndex, /* index of the tab that triggered the event */
478	onClickArgs; /* args to send the onclick function */
479
480	a = this;
481	if (!a.tabber) { return false; }
482
483	self = a.tabber;
484	tabberIndex = a.tabberIndex;
485
486	/* Remove focus from the link because it looks ugly.
487		 I don't know if this is a good idea...
488	*/
489	a.blur();
490
491	/* If the user specified an onClick function, call it now.
492		 If the function returns false then do not continue.
493	*/
494	if (typeof self.onClick == 'function')
495	{
496		onClickArgs = {'tabber':self, 'index':tabberIndex, 'event':event};
497
498		/* IE uses a different way to access the event object */
499		if (!event)
500		{
501			onClickArgs.event = window.event;
502		}
503
504		rVal = self.onClick(onClickArgs);
505		if (rVal === false) { return false; }
506	}
507
508	self.tabShow(tabberIndex);
509
510	return false;
511};
512
513
514tabberObj.prototype.tabHideAll = function()
515{
516	var i; /* counter */
517
518	/* Hide all tabs and make all navigation links inactive */
519	for (i = 0; i < this.tabs.length; i++)
520	{
521		this.tabHide(i);
522	}
523};
524
525
526tabberObj.prototype.tabHide = function(tabberIndex)
527{
528	var div;
529
530	if (!this.tabs[tabberIndex]) { return false; }
531
532	/* Hide a single tab and make its navigation link inactive */
533	div = this.tabs[tabberIndex].div;
534
535	/* Hide the tab contents by adding classTabHide to the div */
536	if (!div.className.match(this.REclassTabHide)) {
537		div.className += ' ' + this.classTabHide;
538	}
539	this.navClearActive(tabberIndex);
540
541	return this;
542};
543
544
545tabberObj.prototype.tabShow = function(tabberIndex)
546{
547	/* Show the tabberIndex tab and hide all the other tabs */
548
549	var div;
550
551	if (!this.tabs[tabberIndex]) { return false; }
552
553	/* Hide all the tabs first */
554	this.tabHideAll();
555
556	/* Get the div that holds this tab */
557	div = this.tabs[tabberIndex].div;
558
559	/* Remove classTabHide from the div */
560	//div.className = div.className.replace(this.REclassTabHide, '');
561
562	/* Use a CSS transition for making tab contents visible */
563	div.className = div.className.replace(this.REclassTabHide, '  tabbertablow');
564	setTimeout(function(){
565		div.className = div.className.replace(' tabbertablow', '');
566	}, 10);
567
568	/* Mark this tab navigation link as "active" */
569	this.navSetActive(tabberIndex);
570
571	/* If the user specified an onTabDisplay function, call it now. */
572	if (typeof this.onTabDisplay == 'function') {
573		this.onTabDisplay({'tabber':this, 'index':tabberIndex});
574	}
575
576	// Force redraw of any google maps inside TAB
577	var elArr = document.querySelectorAll('#' + div.id + ' .has_fc_google_maps_map');
578	for (var n = 0, len = elArr.length; n < len; n++)
579	{
580		google.maps.event.trigger(elArr[n].dataset.google_maps_ref, 'resize');
581	}
582
583	// Force redraw of any openstreet maps inside TAB
584	var osArr = document.querySelectorAll('#' + div.id + ' .has_fc_openstreet_map');
585	for (var n = 0, len = osArr.length; n < len; n++)
586	{
587		osArr[n].os_maps_ref.invalidateSize();
588	}
589
590	return this;
591};
592
593tabberObj.prototype.navSetActive = function(tabberIndex)
594{
595	/* Note: this method does *not* enforce the rule
596		 that only one nav item can be active at a time.
597	*/
598
599	/* Set classNavActive for the navigation list item */
600	this.tabs[tabberIndex].li.className = this.classNavActive;
601
602	return this;
603};
604
605
606tabberObj.prototype.navClearActive = function(tabberIndex)
607{
608	/* Note: this method does *not* enforce the rule
609		 that one nav should always be active.
610	*/
611
612	/* Remove classNavActive from the navigation list item */
613	this.tabs[tabberIndex].li.className = '';
614
615	return this;
616};
617
618
619/*==================================================*/
620
621
622function tabberAutomatic(tabberArgs, container_id)
623{
624	/* This function finds all DIV elements in the document where
625		 class=tabber.classMain, then converts them to use the tabber
626		 interface.
627
628		 tabberArgs = an object to send to "new tabber()"
629	*/
630	var
631		tempObj, /* Temporary tabber object */
632		divs, /* Array of all divs on the page */
633		i; /* Loop index */
634
635	if (!tabberArgs) { tabberArgs = {}; }
636
637	/* Create a tabber object without initializing any tabset,so we can get the value of classMain */
638	tabberArgs.div = null;
639	tempObj = new tabberObj(tabberArgs);
640
641	/* Find all DIV elements in the document that have the configured classname */
642	var container_selector = typeof container_id != 'undefined' ? '#' + container_id + ' ' : 'body ';
643	var divs = new Array();
644
645	var divArr = document.querySelectorAll(container_selector + 'div.' + tempObj.classMain);
646	for (var n = 0, len = divArr.length; n < len; n++)
647	{
648		divs[n] = divArr[n];
649	}
650
651	/* Loop through all found DIV elements, and initialize TABBER in them */
652	for (var i = 0; i < divs.length; i++)
653	{
654		/* Recheck if each DIV has the correct classname */
655		if (divs[i].className && divs[i].className.match(tempObj.REclassMain))
656		{
657			/* Now tabify the DIV */
658			tabberArgs.div = divs[i];
659			divs[i].tabber = new tabberObj(tabberArgs);
660		}
661	}
662
663	var elArr = document.querySelectorAll(container_selector + ' .fc-element-auto-init');//.trigger('initialize-fc-element');
664	var event;
665
666	if (elArr.length)
667	{
668		if (window.CustomEvent && typeof(window.CustomEvent) === 'function')
669		{
670			event = new CustomEvent('initialize-fc-element', {
671				bubbles:    true,
672				cancelable: true,
673				customdata: {}
674			});
675		}
676		// IE trap
677		else
678		{
679			event = document.createEvent('Event');
680			event.initEvent('initialize-fc-element', true, true); //can bubble, and is cancellable
681			event.customdata = {};
682		}
683
684		for (var n = 0, len = elArr.length; n < len; n++)
685		{
686			elArr[n].dispatchEvent(event);
687		}
688	}
689
690	return this;
691}
692
693
694/*==================================================*/
695
696
697function tabberAutomaticOnLoad(tabberArgs)
698{
699	tabberArgs = tabberArgs || {};
700
701	document.addEventListener('DOMContentLoaded', function()
702	{
703		tabberAutomatic(tabberArgs);
704	});
705}
706
707
708/**
709 * Cookie functions
710 */
711
712function tabberSetCookie(name, value, expires, path, domain, secure)
713{
714	document.cookie= name + "=" + escape(value) +
715		((expires) ? "; expires=" + expires.toGMTString() : "") +
716		((path) ? "; path=" + path : "") +
717		((domain) ? "; domain=" + domain : "") +
718		((secure) ? "; secure" : "") +
719		((secure) ? "; samesite=secure" : "; samesite=lax");
720}
721
722function tabberGetCookie(name)
723{
724	var dc = document.cookie;
725	var prefix = name + "=";
726
727	var begin = dc.indexOf("; " + prefix);
728	if (begin == -1)
729	{
730		begin = dc.indexOf(prefix);
731		if (begin != 0) return null;
732	}
733	else
734	{
735		begin += 2;
736	}
737
738	var end = document.cookie.indexOf(";", begin);
739	if (end == -1)
740	{
741		end = dc.length;
742	}
743
744	return unescape(dc.substring(begin + prefix.length, end));
745}
746
747function tabberDeleteCookie(name, path, domain)
748{
749	if (getCookie(name))
750	{
751		document.cookie = name + "=" +
752			((path) ? "; path=" + path : "") +
753			((domain) ? "; domain=" + domain : "") +
754			"; expires=Thu, 01-Jan-70 00:00:01 GMT";
755	}
756}
757
758
759
760
761/*==================================================
762	Set the tabber options (must do this before including tabber.js)
763	==================================================*/
764
765var fctabber = new Object();
766
767var tabberOptions =
768{
769	'cookie':"fctabber", /* Name to use for the cookie */
770
771	'onLoad': function(argsObj)
772	{
773		var t = argsObj.tabber;
774		var i;
775
776		/* Create a reference to the every tabber object that has an HTML tag id */
777		if (t.id)
778		{
779			fctabber[t.id] = argsObj.tabber;
780		}
781
782		/* Optional: Add the id of the tabber to the cookie name to allow
783			 for multiple tabber interfaces on the site.  If you have
784			 multiple tabber interfaces (even on different pages) I suggest
785			 setting a unique id on each one, to avoid having the cookie set
786			 the wrong tab.
787		*/
788		if (t.id)
789		{
790			t.cookie = t.id + t.cookie;
791		}
792
793		/* If a cookie was previously set, restore the active tab */
794		i = parseInt(tabberGetCookie(t.cookie));
795
796		//window.console.log(t.forcedTab);
797
798		if (isNaN(i) || t.forcedTab >= 0) { return; }
799		t.tabShow(i);
800	},
801
802	'onClick':function(argsObj)
803	{
804		var c = argsObj.tabber.cookie;
805		var i = argsObj.index;
806
807		tabberSetCookie(c, i);
808	}
809};
810
811
812/**
813 * Run tabberAutomaticOnload() unless the "manualStartup" option was specified
814 */
815
816if (typeof tabberOptions == 'undefined')
817{
818	tabberAutomaticOnLoad();
819}
820else if (!tabberOptions['manualStartup'])
821{
822	tabberAutomaticOnLoad(tabberOptions);
823}

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.