summaryrefslogtreecommitdiff
path: root/modules_v3/lightbox/js
diff options
context:
space:
mode:
authorfisharebest <fisharebest@gmail.com>2011-08-04 19:03:17 +0000
committerfisharebest <fisharebest@gmail.com>2011-08-04 19:03:17 +0000
commit3a66749533ae4ec372c95f7b0a6363efa4f5d294 (patch)
tree48931d265ee51c08f56820a767237975b00ebc3a /modules_v3/lightbox/js
parentd83d060a1ac10dc72134c3d4804e89b04cc68ad6 (diff)
downloadwebtrees-3a66749533ae4ec372c95f7b0a6363efa4f5d294.tar.gz
webtrees-3a66749533ae4ec372c95f7b0a6363efa4f5d294.tar.bz2
webtrees-3a66749533ae4ec372c95f7b0a6363efa4f5d294.zip
#821050 - Error calling page after update to 1.2.2
Diffstat (limited to 'modules_v3/lightbox/js')
-rw-r--r--modules_v3/lightbox/js/Sound.js197
-rw-r--r--modules_v3/lightbox/js/SoundBridge.swfbin0 -> 692 bytes
-rw-r--r--modules_v3/lightbox/js/clearbox.js371
-rw-r--r--modules_v3/lightbox/js/clsource_music.js2243
-rw-r--r--modules_v3/lightbox/js/swfobject.js145
-rw-r--r--modules_v3/lightbox/js/tip_balloon.js231
-rw-r--r--modules_v3/lightbox/js/tip_balloon/b.gifbin0 -> 46 bytes
-rw-r--r--modules_v3/lightbox/js/tip_balloon/background.gifbin0 -> 43 bytes
-rw-r--r--modules_v3/lightbox/js/tip_balloon/l.gifbin0 -> 46 bytes
-rw-r--r--modules_v3/lightbox/js/tip_balloon/lb.gifbin0 -> 85 bytes
-rw-r--r--modules_v3/lightbox/js/tip_balloon/lt.gifbin0 -> 86 bytes
-rw-r--r--modules_v3/lightbox/js/tip_balloon/r.gifbin0 -> 46 bytes
-rw-r--r--modules_v3/lightbox/js/tip_balloon/rb.gifbin0 -> 86 bytes
-rw-r--r--modules_v3/lightbox/js/tip_balloon/rt.gifbin0 -> 85 bytes
-rw-r--r--modules_v3/lightbox/js/tip_balloon/stemb.gifbin0 -> 165 bytes
-rw-r--r--modules_v3/lightbox/js/tip_balloon/stemt.gifbin0 -> 167 bytes
-rw-r--r--modules_v3/lightbox/js/tip_balloon/t.gifbin0 -> 46 bytes
-rw-r--r--modules_v3/lightbox/js/tip_balloon_RTL.js233
-rw-r--r--modules_v3/lightbox/js/tip_centerwindow.js104
-rw-r--r--modules_v3/lightbox/js/wz_tooltip.js1259
20 files changed, 4783 insertions, 0 deletions
diff --git a/modules_v3/lightbox/js/Sound.js b/modules_v3/lightbox/js/Sound.js
new file mode 100644
index 0000000000..2d65d036a1
--- /dev/null
+++ b/modules_v3/lightbox/js/Sound.js
@@ -0,0 +1,197 @@
+/*
+Copyright (c) 2006, Gustavo Ribeiro Amigo
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ * Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+ function Sound(options) {
+
+ this.options = options;
+ if (this.options == undefined) this.options = new Object();
+
+ if (!this.options.swfLocation) {
+ this.options.swfLocation = "js/SoundBridge.swf";
+ }
+
+ if (Sound.id_count == undefined) {
+ Sound.id_count = 1;
+ } else {
+ Sound.id_count ++;
+ }
+
+ if (Sound.instances == undefined) {
+ Sound.instances = new Object();
+ }
+
+ this.object_id = 'object_id_' + Sound.id_count;
+
+ Sound.instances[this.object_id] = this;
+
+ movie_swf = this.options.swfLocation;
+ movie_id = this.object_id;
+
+ movie_element = "";
+ movie_element += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="0" height="0"';
+ movie_element += ' id="' + movie_id+ '"';
+ movie_element += ' align="middle">';
+ movie_element += '<param name="movie" value="'+movie_swf+'" />';
+ movie_element += '<param name="quality" value="high" />';
+ movie_element += '<param name="bgcolor" value="#ffffff" />';
+ movie_element += '<param name="FlashVars" value="id='+ movie_id +'"/>';
+ movie_element += '<param name="allowScriptAccess" value="allowScriptAccess"/>';
+ movie_element += '<embed src="'+movie_swf+'" FlashVars="id='+ movie_id +'"';
+ movie_element += ' allowScriptAccess="always" quality="high" bgcolor="#ffffff" width="0" height="0"';
+ movie_element += ' name="' + movie_id + '" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
+ movie_element += '</object>';
+
+/*
+ this.so = new SWFObject(movie_swf, movie_id, "0", "0", "8", "#ffffff");
+ this.so.addParam("quality", "high");
+ this.so.addParam("FlashVars", "id="+ movie_id);
+ this.so.addParam("allowScriptAccess", "always");
+*/
+
+ if ( document.getElementById('__sound_flash__') == undefined) {
+ var element = document.createElement("div");
+ element.id = "__sound_flash__";
+ document.body.appendChild(element);
+ }
+
+ document.getElementById('__sound_flash__').innerHTML += movie_element;
+ //this.so.write('__sound_flash__');
+
+ }
+
+ Sound.prototype.loadSound = function(url, streaming) {
+ return Sound.__call('loadSound',this.object_id, url, streaming);
+ }
+
+ Sound.prototype.start= function() {
+ return Sound.__call('start', this.object_id);
+ }
+
+ Sound.prototype.stop = function() {
+ return Sound.__call('stop', this.object_id);
+ }
+
+ Sound.prototype.getId3 = function() {
+ return Sound.__call('id3', this.object_id);
+ }
+
+ Sound.prototype.getPan = function() {
+ return Sound.__call('getPan', this.object_id);
+ }
+
+ Sound.prototype.getTransform = function() {
+ return Sound.__call('getTransform', this.object_id);
+ }
+
+ Sound.prototype.getVolume = function(){
+ return Sound.__call('getVolume', this.object_id);
+ }
+
+ Sound.prototype.setPan = function(value){
+ return Sound.__call('setPan', this.object_id, value);
+ }
+
+ Sound.prototype.setTransform = function(transformObject){
+ return Sound.__call('setTransform', this.object_id, transformObject);
+ }
+
+ Sound.prototype.setVolume = function(value){
+ return Sound.__call('setVolume', this.object_id, value);
+ }
+
+ Sound.prototype.start = function(secondOffset, loops){
+ return Sound.__call('start', this.object_id, secondOffset, loops);
+ }
+
+ Sound.prototype.getDuration = function(){
+ return Sound.__call('getDuration', this.object_id);
+ }
+
+ Sound.prototype.setDuration = function(value){
+ return Sound.__call('setDuration', this.object_id, value);
+ }
+
+ Sound.prototype.getPosition = function(){
+ return Sound.__call('getPosition', this.object_id);
+ }
+
+ Sound.prototype.setPosition = function(value){
+ return Sound.__call('setPosition', this.object_id, value);
+ }
+
+ Sound.prototype.getBytesLoaded = function(){
+ return Sound.__call('getBytesLoaded', this.object_id);
+ }
+
+ Sound.prototype.getBytesTotal = function(){
+ return Sound.__call('getBytesTotal', this.object_id);
+ }
+
+ Sound.prototype.onLoad = function(success){
+ Sound.trace('Sound:onLoad('+success+') event triggered');
+ }
+
+ Sound.onLoad = function(object_id, success) {
+ //Sound.trace('Sound.onLoad('+success+') object_id=' + object_id);
+ Sound.instances[object_id].onLoad(success);
+ }
+
+ Sound.prototype.onSoundComplete = function(){
+ Sound.trace('Sound:onSoundComplete() event triggered');
+ }
+
+ Sound.onSoundComplete = function(object_id) {
+ Sound.instances[object_id].onSoundComplete;
+ }
+
+ Sound.prototype.onID3 = function(){
+ Sound.trace('Sound:onID3() event triggered');
+ }
+
+ Sound.onID3 = function(object_id) {
+ Sound.instances[object_id].onID3();
+ }
+
+ Sound.trace = function(value, isJavascript) {
+ if (document.getElementById('sound_tracer') != undefined) {
+ if (isJavascript == undefined || isJavascript == true) {
+ document.getElementById('sound_tracer').value += 'Javascript: ' + value + '\n';
+ } else {
+ document.getElementById('sound_tracer').value += value + '\n';
+ }
+ }
+ }
+
+ Sound.__thisMovie = function(movieName) {
+ if (navigator.appName.indexOf("Microsoft") != -1) {
+ return window[movieName]
+ }
+ else {
+ return document[movieName]
+ }
+ }
+
+ Sound.__call = function () {
+ Sound.trace('Sound.__call '+ arguments[0]+ ' on object_id ' + arguments[1] );
+ var functionname = arguments[0];
+ var object_id = arguments[1];
+ var justArgs = new Array();
+ if (arguments.length > 1) {
+ for (var i = 2; i < arguments.length; i++ ) {
+ justArgs.push(arguments[i]);
+ }
+ }
+
+ return Sound.__thisMovie(object_id).proxyMethods(functionname, justArgs);
+ }
diff --git a/modules_v3/lightbox/js/SoundBridge.swf b/modules_v3/lightbox/js/SoundBridge.swf
new file mode 100644
index 0000000000..2131e4d49c
--- /dev/null
+++ b/modules_v3/lightbox/js/SoundBridge.swf
Binary files differ
diff --git a/modules_v3/lightbox/js/clearbox.js b/modules_v3/lightbox/js/clearbox.js
new file mode 100644
index 0000000000..3b2a9b5cba
--- /dev/null
+++ b/modules_v3/lightbox/js/clearbox.js
@@ -0,0 +1,371 @@
+/* clearbox.js - Author Brian Holland .... email webman@windmillway.f2s.com - (modified from Clearbox.js - Author Pyro ... email pyrex@chello.hu)
+ * @package webtrees
+ * @subpackage Module
+ * @version $Id$
+ * @author Brian Holland
+*/
+
+/*
+ ClearBox JS by pyro
+
+ script home: http://www.kreatura.hu/pyro/clearbox
+ author e-mail: pyrexkukacchelloponthu
+ author msn: prokukacradiomaxponthu
+ support forum 1: http://www.sg.hu/listazas.php3?id=1172325655
+ support forum 2: http://www.tutorial.hu/forum/index.php?showtopic=1391&st=0
+
+ LICENSZ FELT?TELEK:
+
+ A ClearBox szabadon felhaszn?lhat? b?rmilyen nem kereskedelmi jelleg? honlapon, teh?t olyanokon
+ amik nem hivatalos c?gek oldalai, amik nem tartalmaznak kereskedelmi jelleg? szolg?ltat?st vagy
+ term?k(ek) elad?s(?)t, illetve rekl?moz?s?t. A kereskedelmi jelleg? honlapokon val?
+ felhaszn?l?s?r?l ?rdekl?dj a k?sz?t?n?l! A ClearBox forr?sa (clsource.js) kiz?r?lag a k?sz?t?
+ el?zetes hozz?j?rul?s?val m?dos?that?. A ClearBox a k?sz?t? beleegyez?se n?lk?l p?nz?rt harmadik
+ f?lnek tov?bb nem adhat?!
+*/
+ var CB_version='200beta';
+
+/*
+ clearbox.js:
+
+ ClearBox konfigur?ci?s f?jl. Ebben a f?jlban tudod kedved szerint testre szabni a scriptet.
+ Az 1.70 verzi?t?l kezdve a ClearBox script k?t k?l?n .js f?jlra tagol?dott: clearbox.js ?s
+ cbsource.js. A cbsource.js f?jl k?dolva ?s t?m?r?tve tartalmazza a ClearBox scriptet, azt
+ ne v?ltoztasd! A dokument?ci?t k?l?n f?jlok helyett a clearbox.js (ez a f?jl) tartalmazza.
+ Minden param?tern?l le?r?st tal?lsz, hogy az hogyan befoly?solja a ClearBox m?k?d?s?t.
+
+ CB_HideColor:
+
+ ?rt?ke egy sz?nk?d. Megadja, hogy a script megh?v?sakor a dokumentumot 'eltakar?'
+ fel?let milyen sz?n?rnyalat? legyen. Mindenk?ppen haszn?ld a ' ' jeleket ?s a #-et.
+*/
+ var CB_HideColor='#000';
+
+/*
+ CB_HideOpacity:
+
+ ?rt?ke egy nem negat?v eg?sz sz?m (0-100). Megadja, hogy a h?tt?r h?ny sz?zal?kig
+ vegye fel a CB_HideColor sz?nk?dot. Ha 0, akkor egy?ltal?n nem fog l?tsz?dni, ha 100,
+ akkor teljesen elfedi a dokumentumot. A k?ztes esetekben pedig ?ttetsz? lesz.
+*/
+ var CB_HideOpacity=75;
+
+/*
+ CB_OpacityStep:
+
+ ?rt?ke egy pozit?v eg?sz sz?m (1-CB_HideOpacity). Megadja, hogy a h?tt?r el?t?n?se,
+ halv?ny?t?sa mekkora l?p?sekben t?rt?njen, am?g el nem ?ri a CB_HideOpacity ?rt?ket.
+ (Ne legyen nagyobb, mint CB_HideOpacity ?s nem ?rt, ha CB_HideOpacity marad?ktalanul
+ oszthat? CB_OpacityStep-pel!)
+
+*/
+ var CB_OpacityStep=25;
+
+/*
+ CB_WinBaseW:
+
+ ?rt?ke egy pozit?v eg?sz sz?m. (25- ) A ClearBox ablak kezdeti sz?less?ge
+ (ehhez m?g hozz?ad?dik a CB_RoundPix ?rt?knek a k?tszerese).
+ Ne adj meg t?l nagy ?rt?ket! Ha nem l?tfontoss?g?, ne v?ltoztass az alap?rt?ken!
+*/
+ var CB_WinBaseW=120;
+
+/*
+ CB_WinBaseH:
+
+ ?rt?ke egy pozit?v eg?sz sz?m. (50- ) A ClearBox ablak kezdeti magass?ga
+ (ehhez m?g hozz?ad?dik a CB_RoundPix ?rt?knek a k?tszerese, viszont beletartozik a
+ CB_TextH ?rt?ke.). Ne adj meg t?l nagy ?rt?ket! Ha nem l?tfontoss?g?, ne v?ltoztass az
+ alap?rt?ken!
+*/
+ var CB_WinBaseH=110;
+
+/*
+ CB_WinPadd:
+
+ ?rt?ke egy nem negat?v eg?sz sz?m. (0- ) Megadja, hogy norm?lis esetben minimum h?ny
+ pixel legyen a b?ng?sz? sz?le ?s a ClearBox ablak k?z?tt. Ne adj meg t?l nagy ?rt?ket!
+ Megjegyz?s: alap?llapotban a ClearBox ablakot k?r?lvev? ?rny?k miatt ez az ?rt?k nagyobbnak
+ n?z ki, mint ami meg van adva!)
+*/
+ var CB_WinPadd=1;
+
+/*
+ CB_RoundPix:
+
+ ?rt?ke nem negat?v eg?sz sz?m. Megadja a lekerek?t?sek k?peinek nagys?g?t.
+ Fontos: V?ltoztat?s?hoz a lekerek?t?sek k?peit is cser?lni kell, ez?rt ennek a megv?ltoztat?sa
+ csak a jobban hozz?rt?knek aj?nlott!
+ Tipp: Amennyiben azt szeretn?d, hogy a ClearBox ablak sarkai sz?gletesek legyenek, ?ll?tsd az
+ ?rt?ket 0-ra. (Ilyenkor nem ?rt megn?velni a CB_Padd ?rt?k?t minimum 5-re, a szebb vizu?lis
+ megjelen?s ?rdek?ben.)
+*/
+ var CB_RoundPix=12;
+
+/*
+ CB_Animation:
+
+ A ClearBox ablak anim?ci?ja ?ll?that? be vele. T?bbf?le lehet?s?g k?z?l v?laszthatsz:
+
+ 'none': ilyenkor az ablak egy l?p?sben felveszi a m?retet,
+ 'normal': ez a m?r megszokott anim?ci?,
+ 'double': ilyenkor az ablak egyszerre m?retez?dik X ?s Y ir?nyban
+ 'warp': mint a double, de a k?p m?g az anim?ci? megkezd?se el?tt megjelenik
+ (nagy a cpu ig?nye, ez?rt kisebb m?ret? k?pekhez aj?nlott)
+
+ Mindenk?ppen haszn?ld a ' ' jeleket.
+*/
+// var CB_Animation='none';
+
+/*
+ CB_Jump_X:
+
+ ?rt?ke egy pozit?v eg?sz sz?m (1-99). Megadja a v?zszintes ?tm?retez? anim?ci? gyorsas?g?t,
+ r?szletess?g?t.
+*/
+ var CB_Jump_X= 40;
+
+/*
+ CB_Jump_Y:
+
+ ?rt?ke egy pozit?v eg?sz sz?m (1-99). Megadja a f?gg?leges ?tm?retez? anim?ci? gyorsas?g?t,
+ r?szletess?g?t.
+*/
+ var CB_Jump_Y= 40;
+
+/*
+ CB_AnimTimeout:
+
+ ?rt?ke egy pozit?v eg?sz sz?m (5- ). Megadja (milisecundumban), hogy ?tm?retez? anim?ci? l?p?sei
+ k?zben mennyit 'v?rjon' a script.
+*/
+ var CB_AnimTimeout=5;
+
+/*
+ CB_ImgBorder:
+
+ ?rt?ke egy nem negat?v eg?sz sz?m (0- ). Megadja a k?p k?r?li keret vastags?g?t.
+*/
+ var CB_ImgBorder=1;
+
+/*
+ CB_ImgBorderColor:
+
+ ?rt?ke egy sz?nk?d. Megadja a k?p k?r?li keret sz?n?t. Mindenk?ppen haszn?ld a ' ' jeleket ?s a #-et.
+*/
+ var CB_ImgBorderColor='#ccc';
+
+/*
+ CB_Padd:
+
+ ?rt?ke egy nem negat?v eg?sz sz?m (0- ). A k?p keret?n (?s a lekerek?t?seken) k?v?l ad m?g egy plusz
+ ? gyakorlatilag l?thatatlan - keretet a k?pnek (magyarul a k?p k?r?li feh?r keret vastags?g?t n?veli).
+*/
+ var CB_Padd=0;
+
+/*
+ CB_ShowImgURL:
+
+ ?rt?ke lehet 'be' vagy 'ki'. Megadja, hogy a ClearBox ablakban megjelenjen-e a k?p el?r?si ?tja, amennyiben
+ nincs c?m megadva a k?pnek. Mindenk?ppen haszn?ld a ' ' jeleket.
+*/
+ var CB_ShowImgURL='be';
+
+/*
+ CB_ImgNum:
+
+ ?rt?ke lehet 'be' vagy 'ki'. Megadja, hogy ha a ClearBox gal?ri?kn?l legyen-e kijelezve az ?sszes k?p, illetve,
+ hogy ?ppen h?nyadik k?p van megjelen?tve. Mindenk?ppen haszn?ld a ' ' jeleket.
+*/
+ var CB_ImgNum='ki';
+
+/*
+ CB_ImgNumBracket:
+
+ Ha a CB_ImgNum be van kapcsolva, akkor ez adja meg, hogy milyen z?r?jelben legyen a k?pek sz?moz?s?nak a
+ kijelz?se. Mindenk?ppen haszn?ld a ' ' jeleket ?s mindenk?ppen k?t, azaz 2 karaktert adj meg, sz?net n?lk?l.
+*/
+ var CB_ImgNumBracket='[]';
+
+/*
+ CB_SlShowTime:
+
+ ?rt?ke egy pozit?v eg?sz sz?m (1- ). Megadja, hogy a SlideShow effekt (1.6 verzi?t?l) mennyit v?rjon
+ (m?sodpercben), miel?tt megjelen?ti a k?vetkez? k?pet. Megjegyz?s: sajnos ez csak k?zel?t?leges ?rt?ket ad,
+ val?j?ban a b?ng?sz?t?l is f?gg.
+*/
+// var CB_SlShowTime=6;
+
+/*
+ CB_PadT:
+
+ ?rt?ke egy nem negat?v eg?sz sz?m (0- ). A sz?vegmez? k?p alj?t?l val? t?vols?g?t adja meg.
+ Fontos: haszn?ld okosan ezt a param?tert a CB_TextH ?rt?kkel. A CB_PaddT a CB_TextH-b?l mindenk?ppen
+ levon?dik, ?gy k?nnyen hib?t gener?lhatunk a nem megfelel? ?rt?kad?ssal!
+*/
+// var CB_PadT=10;
+ var CB_PadT=8;
+
+/*
+ CB_TextH:
+
+ ?rt?ke egy pozit?v eg?sz sz?m (25- ). A k?p alatti sz?vegmez? magass?g?t adja meg.
+ Fontos: figyelj a CB_PadT megfelel? ?rt?k?re is!
+*/
+// var CB_TextH=40;
+ var CB_TextH=30;
+
+/*
+ CB_Font:
+
+ ?rt?ke egy (vagy t?bb) bet?t?pus. A k?p alatti sz?veg bet?t?pus?t adja meg.
+ Haszn?lhatunk egyszerre a CSS-ben is alkalmazhat? t?bb ?rt?ket, pl: 'Arial, Verdana, Tahoma'.
+ Mindenk?ppen haszn?ld a ' ' jeleket.
+*/
+ var CB_Font='arial';
+
+/*
+ Cb_FontSize:
+
+ ?rt?ke egy pozit?v eg?sz sz?m (6- ). A k?p alatti sz?veg m?ret?t adja meg.
+*/
+ var CB_FontSize=12;
+
+/*
+ CB_FontColor:
+
+ ?rt?ke egy sz?nk?d. A k?p alatti sz?veg sz?n?t adja meg. Mindenk?ppen haszn?ld a ' ' jeleket ?s a #-et.
+*/
+// var CB_FontColor='#656565';
+ var CB_FontColor='#0000FF';
+
+/*
+ CB_FontWeight:
+
+ ?rt?ke lehet 'normal' vagy 'bold'. A k?p alatti sz?veg bet?vastags?g?t adja meg.
+ Mindenk?ppen haszn?ld a ' ' jeleket.
+*/
+ var CB_FontWeigth='bold';
+
+/*
+ CB_CheckDuplicates:
+
+ K?s?bbi funkci?, jelenleg nem m?k?dik!
+ ?rt?ke lehet 'be' vagy 'ki'. Megadja, hogy legyen-e a gel?ri?kban ism?tl?d?s-ellen?rz?s. Amennyiben be van
+ kapcsolva, ?gy agy adott gal?ri?ban ugyanazzal az el?r?si ?ttal egyszerre csak egy k?p lehet, teh?t v?letlen?l
+ sem t?rt?nik ism?tl?d?s. Mindenk?ppen haszn?ld a ' ' jeleket.
+*/
+ var CB_CheckDuplicates='ki';
+
+/*
+ CB_LoadingText:
+
+ Megadja, hogy alul milyen sz?veg jelenjen meg a k?pek bet?lt?se k?zben. Mindenk?ppen haszn?ld a ' ' jeleket.
+*/
+// var CB_LoadingText='- k?p bet?lt?se -';
+ var CB_LoadingText='- > < -';
+
+/*
+ CB_PicDir:
+
+ Megadja a ClearBox-hoz tartoz? k?pek el?r?si ?tj?t. Amennyiben megv?ltoztatod, a clearbox.css-ben se felejtsd el
+ v?grehajtani a sz?ks?ges v?ltoztat?sokat! Mindenk?ppen haszn?ld a ' ' jeleket.
+*/
+ var CB_PicDir=WT_MODULES_DIR+'lightbox/pic';
+// var CB_MusicDir='../music';
+
+/*
+ CB_BodyMargin param?terek:
+
+ Amennyiben az oldaladon sz?nd?kozol konkr?t ?rt?ket adni a BODY margin-j?nak, teh?t ha:
+ margin-left, margin-top, margin-bottom vagy margin-right B?RMELYIKE NEM 0 ?s NEM auto, akkor az al?bbi
+ param?terekkel meg KELL adnod azt a ClearBox-nak is. Ez a HideContent Layer pontos m?retez?se miatt sz?ks?ges!
+ Megjegyz?s: figyelj arra, hogy ha nem adt?l meg a css f?jlodban a body-nak egy?ltal?n margin ?rt?ket, akkor is van egy
+ alap?rtelmezett margin ?rt?k a b?ng?sz?k szerint!
+ Fontos: NE haszn?lj %-os ?rt?keket, mert akkor a ClearBox HideContent Layer-e nem fog megfelel?en megjelenni!
+*/
+ var CB_BodyMarginLeft=0;
+ var CB_BodyMarginRight=0;
+ var CB_BodyMarginTop=0;
+ var CB_BodyMarginBottom=0;
+
+/*
+ CB_Preload:
+
+ ?rt?ke lehet 'be' vagy 'ki'. Megadja, hogy gal?ri?kn?l legyen-e az el?z? ?s k?vetkez? k?pek el?re t?lt?se.
+ Mindenk?ppen haszn?ld a ' ' jeleket.
+*/
+ var CB_Preload='be';
+
+/*
+ CB_TextNav:
+
+ ?rt?ke lehet 'be' vagy 'ki'. Megadja, hogy gal?ri?kn?l legyen-e el?z? ?s k?vetkez? felirat megjelen?t?se a CB_TextH
+ s?vban (ahol a k?p neve is tal?lhat?). Mindenk?ppen haszn?ld a ' ' jeleket.
+*/
+ var CB_TextNav='ki';
+
+/*
+ CB_NavText param?terek:
+
+ Megadhatod a CB_TextH megjelen? gombok (linkek) nev?t. Mindenk?ppen haszn?ld a ' ' jeleket.
+ A linkek kin?zet?t a clearbox.css f?jlban tudod m?dos?tani, a linkek class oszt?lya: CB_TextNav.
+*/
+//BH var CB_NavTextPrv='el?z?';
+//BH var CB_NavTextNxt='k?vetkez?';
+//BH var CB_NavTextCls='bez?r';
+ var CB_NavTextPrv='Prev';
+ var CB_NavTextNxt='Next';
+//BH var CB_NavTextCls='';
+
+/*
+ CB_Picture param?terek:
+
+ Ha meg akarod v?ltoztatni a ClearBox ?ltal haszn?lt Start, Pause ?s Close gombokat, valamint a Loading k?pet,
+ akkor azt itt teheted meg. Fontos: kiz?r?lag a f?jlnevet add meg, / jel ?s mappa n?lk?l!
+ Mindenk?ppen haszn?ld a ' ' jeleket.
+ Megjegyz?s: az El?z? ?s K?vetkez? gombokat a clearbox.css-ben tudod megv?ltoztatni.
+
+*/
+ var CB_PictureStart='start.png';
+ var CB_PicturePause='pause.png';
+ var CB_PictureClose='close_red.png';
+ var CB_PictureLoading='loading.gif';
+ var CB_PictureNotes='notes.png';
+ var CB_PictureDetails='detail.png';
+ var CB_MusicStart='music_off.png';
+ var CB_MusicStop='music_on.png';
+ var CB_MusicNull='music_null.png';
+ var CB_Speak='music_off.png';
+ var CB_ZoomStart='zoom_on.png';
+ var CB_ZoomStop='zoom_off.png';
+
+
+// Slideshow music configurable options ---------------------------------------------------------
+ var foreverLoop = 0; // Set 0 if want to stop on the last image or Set it to 1 for Infinite loop feature
+ var loopMusic = true; //loops music if it is shorter then slideshow
+ var SoundBridgeSWF = WT_MODULES_DIR+"lightbox/js/SoundBridge.swf";
+
+// Music variables ---------------------------------------------------------
+ var slideshowMusic = null;
+ var firstTime = 1;
+ var objSpeakerImage;
+ var saveLoopMusic;
+
+
+/*
+ Az al?bbi k?don ne v?ltoztass, ellenkez? esetben a ClearBox nem (megfelel?en) fog m?k?dni!.
+ clearbox.js el?r?si ?tj?nak megkeres?se, majd ez alapj?n cbsource.js beilleszt?se a html dokumentumba:
+*/
+
+ var CB_Scripts = document.getElementsByTagName('script');
+ for (i=0;i<CB_Scripts.length;i++){
+ if (CB_Scripts[i].src.match('clearbox.js')!=null){
+ var CB_jsdir=CB_Scripts[i].src.substring(0,CB_Scripts[i].src.length-11);
+ }
+ }
+ document.write('<' + 'script');
+ document.write(' language="javascript"');
+ document.write(' type="text/javascript"');
+ document.write(' src="'+CB_jsdir+'clsource_music.js">');
+ document.write('</' + 'script' + '>');
diff --git a/modules_v3/lightbox/js/clsource_music.js b/modules_v3/lightbox/js/clsource_music.js
new file mode 100644
index 0000000000..314620ca8a
--- /dev/null
+++ b/modules_v3/lightbox/js/clsource_music.js
@@ -0,0 +1,2243 @@
+/* clsource_music.js - Author Brian Holland .... email webman@windmillway.f2s.com - (modified from Clsource.js - Author Pyro ... email pyrex@chello.hu)
+ * @package webtrees
+ * @subpackage Module
+ * @version $Id$
+ * @author Brian Holland
+*/
+
+//Browser detection ====================================================================
+
+var nVer = navigator.appVersion;
+var nAgt = navigator.userAgent;
+var browserName = '';
+var fullVersion = 0;
+var majorVersion = 0;
+
+// In Internet Explorer, the true version is after "MSIE" in userAgent
+if ((verOffset=nAgt.indexOf("MSIE"))!=-1) {
+ browserName = "Microsoft Internet Explorer";
+ fullVersion = parseFloat(nAgt.substring(verOffset+5));
+ majorVersion = parseInt(''+fullVersion);
+}
+
+// In Opera, the true version is after "Opera"
+else if ((verOffset=nAgt.indexOf("Opera"))!=-1) {
+ browserName = "Opera";
+ fullVersion = parseFloat(nAgt.substring(verOffset+6));
+ majorVersion = parseInt(''+fullVersion);
+}
+
+// In Firefox, the true version is after "Firefox"
+else if ((verOffset=nAgt.indexOf("Firefox"))!=-1) {
+ browserName = "Firefox";
+ fullVersion = parseFloat(nAgt.substring(verOffset+8));
+ majorVersion = parseInt(''+fullVersion);
+}
+
+// In most other browsers, "name/version" is at the end of userAgent
+else if ( (nameOffset=nAgt.lastIndexOf(' ')+1) < (verOffset=nAgt.lastIndexOf('/')) )
+{
+ browserName = nAgt.substring(nameOffset,verOffset);
+ fullVersion = parseFloat(nAgt.substring(verOffset+1));
+ if (!isNaN(fullVersion)) majorVersion = parseInt(''+fullVersion);
+ else {fullVersion = 0; majorVersion = 0;}
+}
+
+// Finally, if no name and/or no version detected from userAgent...
+if (browserName.toLowerCase() == browserName.toUpperCase()
+ || fullVersion==0 || majorVersion == 0 )
+{
+ browserName = navigator.appName;
+ fullVersion = parseFloat(nVer);
+ majorVersion = parseInt(nVer);
+}
+
+//document.write('Browser name = '+browserName+'<br>');
+//document.write('Full version = '+fullVersion+'<br>');
+//document.write('Major version = '+majorVersion+'<br>');
+//document.write('navigator.appName = '+navigator.appName+'<br>');
+//document.write('navigator.userAgent = '+navigator.userAgent+'<br>');
+
+// =================================================================================================
+
+// Initial variable settings
+
+var CB_Show = 1;
+var CB_Zoom = null;
+var zoomSet = 0; // ZoomSet = 0 means No Lightbox window. (Leave at 0 here please)
+ // Note: ZoomSet = 1 means Lightbox window open.
+ // Note: ZoomSet = 2 means Lightbox window open and zoomed.
+
+var soond = null;
+var CB_Alignm = CB_Alignm;
+var CB_Balloon = CB_Balloon;
+var CB_Animation = CB_Animation;
+var CB_SlShowTime = CB_SlShowTime;
+var CB_ImgDetails = CB_ImgDetails;
+var CB_Detail_Info = CB_Detail_Info;
+var CB_ImgNotes = CB_ImgNotes;
+var CB_ImgNotes2 = CB_ImgNotes2;
+var CB_Note_Info = CB_Note_Info;
+var CB_Start_SS = CB_Start_SS;
+var CB_Pause_SS = CB_Pause_SS;
+var CB_Music = CB_Music;
+var CB_Zoom_Off = CB_Zoom_Off;
+var CB_Zoom_On = CB_Zoom_On;
+var CB_Close_Win = CB_Close_Win;
+
+// ------- Keyboard options ---------------------------------------------------------
+
+ function CB_KeyPress(a) {
+
+ var b;
+ if (!a) {
+ var a = window.event;
+ }
+ if (a.keyCode) {
+ b = a.keyCode;
+ }else if (a.which) {
+ b = a.which;
+ }
+ var c = String.fromCharCode(b);
+
+ if (CB_ClearBox == "be") {
+
+ // Previous or Move Left - "Keys P, or left arrow, or 4"
+ if (c == "%" || c == "p" || c == "l" || b == 80 || b == 37 || b == 52) {
+ if (CB_Zoom == "true" ) {
+ moveLeft();
+ return false;
+ }else if (CB_ActImgId > 1) {
+ if (CB_SSTimer ) {
+ CB_SlideShowJump();
+ }
+ CB_LoadImage(CB_ActImgId - 1);
+ return false;
+ }else{
+ }
+ }
+
+ // Next or Move Right - "Keys N, or right arrow, or 6"
+ if (c == "'" || c == "n" || c == "r" || b == 78 || b == 39 || b == 54) {
+ if (CB_Zoom == "true") {
+ moveRight();
+ return false;
+ }else if (CB_ActImgId < CB_Gallery.length - 1) {
+ if (CB_SSTimer) {
+ CB_SlideShowJump();
+ }
+ CB_LoadImage(CB_ActImgId + 1);
+ return false;
+ }else{
+ }
+ }
+
+ // Move Up - "Keys U, or up arrow"
+ if (c == "u" || b == 38 || b == 85) {
+ if (CB_Zoom == "true") {
+ moveUp();
+ return false;
+ }else{
+ }
+ }
+
+ // Move Up - "Keys D, or down arrow"
+ if (c == "d" || b == 40 || b == 68) {
+ if (CB_Zoom == "true") {
+ moveDown();
+ return false;
+ }else{
+ }
+ }
+
+ // Start/Stop Slideshow - "Key Spacebar"
+ if ((c == " " || b == 32) && CB_IsAnimating == 0) {
+ if (CB_Gallery.length < 3) {
+ return false;
+ }
+ if (CB_SS == "start") {
+ resetZoom();
+ CB_SSStart();
+ return false;
+ }else{
+ CB_SSPause();
+ return false;
+ }
+ }
+
+ // Close - "Keys Esc or X"
+ if (c == "\x1B" || b == 27 || c == "x" || b == 88 ) {
+ CB_Close();
+ return false;
+ }
+
+ // Toggle Volume - "Key S"
+ if (c == "s" || b == 83) {
+ player.toggleVolume();
+ return false;
+ }
+
+ // Zoom in - "Key I"
+ if (c == "i" || b == 73) {
+ if (CB_SS == "start") {
+ zoomIn();
+ return false;
+ }
+ }
+
+ // Zoom Out - "Key O"
+ if (c == "o" || b == 79) {
+ if (CB_SS == "start") {
+ zoomOut();
+ return false;
+ }
+ }
+
+ // Reset Zoom - "Key Z"
+ if (c == "z" || b == 90) {
+ if (CB_SS == "start") {
+ resetZoom();
+ CB_SSStart();
+ CB_SSPause();
+ return false;
+ // }else if (CB_SS == "start" && zoomSet==1) {
+ // CB_FullSize();
+ }else{
+ }
+ }
+
+ // Do nothing - "Key Enter"
+ if (b == 13) {
+ return false;
+ }
+
+ }else{
+
+ // If animating Do nothing - "Keys Spacebar, or Enter"
+ if (CB_IsAnimating == 1 && (c == " " || b == 32 || b == 13)) {
+ return false;
+ }
+ }
+ }
+// End function keyboard ----------------------------------------------
+
+
+// Mousewheel for zooming ---------------------------------------------
+// if (zoomSet == 2) {
+ function handle(delta) {
+ if (delta <0) {
+ if (CB_SS == "start" ) {
+ zoomIn();
+ return false;
+ }
+ }else{
+ if (CB_SS == "start" ) {
+ zoomOut();
+ return false;
+ }
+ }
+ }
+
+ function wheel(event){
+ var delta = 0;
+ if (!event) event = window.event;
+ if (event.wheelDelta) {
+ delta = event.wheelDelta/120;
+ if (window.opera) delta = -delta;
+ } else if (event.detail) {
+ delta = -event.detail/3;
+ }
+ if (delta)
+ handle(delta);
+
+ if (zoomSet == 2 || zoomSet == 1) {
+ // Prevents default scrolling
+ if (event.preventDefault)
+ event.preventDefault();
+ event.returnValue = false;
+ }
+ }
+
+ /* Initialization code. */
+ if (window.addEventListener)
+ window.addEventListener('DOMMouseScroll', wheel, false);
+ window.onmousewheel = document.onmousewheel = wheel;
+//}
+// End Mousewheel for zooming ---------------------------------------------
+
+
+// Music Player Class ----------------------------------------------
+ function Player () {
+ this.paused = true;
+ this.stoped = true;
+
+ this.options = new Object();
+ this.options.swfLocation = SoundBridgeSWF;
+ this.sound = new Sound(this.options);
+
+ this.position = 0;
+ this.frequency = 1000;
+ this.isLoaded = false;
+ this.duration = 0;
+ this.bytesTotal = 0;
+ this.callback = this.registerCallback();
+ }
+
+
+ Player.prototype.onTimerEvent = function() {
+ var isDurationOk = false
+ if (!this.paused) {
+ var position = this.sound.getPosition();
+ if (!position) position = 0;
+
+ if (position != this.position && position != 0) {
+ this.onPlaying();
+ } else {
+ this.onBuffering();
+ }
+ this.position = position;
+
+ var duration = 0;
+ duration = this.sound.getDuration();
+
+ if (!duration) duration = 0;
+ if (duration == this.duration && duration != 0) {
+ isDurationOk = true;
+ }
+ this.duration = duration;
+ var progress = position/duration;
+ if (isDurationOk) {
+ this.setProgressBar(progress);
+ }
+
+ var isBytesTotalOk = false;
+
+ var bytesTotal = this.sound.getBytesTotal();
+ if (bytesTotal == this.bytesTotal) {
+ isBytesTotalOk = true;
+ }
+ this.bytesTotal = bytesTotal;
+
+ if (isBytesTotalOk) {
+ var loaded = this.sound.getBytesLoaded()/bytesTotal;
+ this.setLoadedBar(loaded);
+ }
+ if (progress == 1 && duration != 0 && position != 0) {
+ this.onSoundComplete();
+ }
+ }
+ }
+
+ Player.prototype.registerCallback = function() {
+ return setInterval(this.onTimerEvent.bind(this), this.frequency);
+ }
+
+ Player.prototype.clearCallback = function() {
+ clearInterval(this.callback);
+ this.callback = null;
+ }
+
+ Player.prototype.setProgressBar = function(progress) {
+ if (!progress) progress = 0;
+ }
+
+ Player.prototype.setLoadedBar = function(loaded) {
+ if (!loaded) loaded = 0;
+ }
+
+ Player.prototype.onPlaying = function() {
+ //Element.show('caption');
+ //Element.setInnerHTML( 'caption', this.sound.getId3());
+ }
+
+ Player.prototype.onPause = function() {
+ }
+
+ Player.prototype.onBuffering = function() {
+ }
+
+ Player.prototype.onSoundComplete = function() {
+ if (!this.paused) {
+ if (loopMusic) {
+ this.onForward();
+ }
+ }
+ }
+
+ Player.prototype.onForward = function() {
+ this.position = 0;
+ this.duration = 0;
+ this.sound.start(this.duration/1000, 1);
+ this.sound.stop();
+ this.loadTrack(this.track);
+ this.stoped = true;
+ this.setProgressBar(0);
+ this.setLoadedBar(0);
+ if (this.sound.getVolume() == 0) {
+ if (!this.paused) {
+ this.paused = true;
+ this.play();
+ this.sound.setVolume(0);
+ }
+ }else{
+ if (!this.paused) {
+ this.paused = true;
+ this.play();
+ }
+ }
+ }
+
+ Player.prototype.fadeOut = function() {
+ for (var i=this.sound.getVolume()-1; i>=0; i--) {
+ this.sound.setVolume(i);
+ //pause(1);
+ }
+ }
+
+ Player.prototype.fadeIn = function() {
+ for (var i=1; i <= 100; i++) {
+ this.sound.setVolume(i);
+ //pause(1);
+ }
+ }
+
+ Player.prototype.toggleVolume = function() {
+ if (this.paused) return;
+ var volume = this.sound.getVolume();
+ if (volume == 0) {
+ this.fadeIn();
+ //this.sound.setVolume(100);
+ CB_Speak.setAttribute('src', CB_PicDir + CB_MusicStop);
+ }
+ if (volume == 100) {
+ this.fadeOut();
+ //this.sound.setVolume(0);
+ CB_Speak.setAttribute('src', CB_PicDir + CB_MusicStart);
+ }
+ }
+
+ Player.prototype.play = function() {
+ if (this.paused) {
+ this.paused = false;
+ if (this.stoped) {
+ this.sound.loadSound(this.track, true);
+ }
+ this.sound.start(this.position/1000, 1);
+ this.stoped = false;
+ CB_Speak.setAttribute('src', CB_PicDir + CB_MusicStop);
+ } else {
+ this.position = this.sound.getPosition();
+ this.sound.stop();
+ this.paused = true;
+ this.onPause();
+ CB_Speak.setAttribute('src', CB_PicDir + CB_MusicStart);
+ }
+ }
+
+ Player.prototype.stop = function() {
+ if (! this.paused) {
+ //fade out
+ for (var i=this.sound.getVolume()-1; i>=0; i--) {
+ this.sound.setVolume(i);
+ pause(1);
+ }
+ }
+ this.paused = true;
+ this.stoped = true;
+ this.position = 0;
+ this.duration = 0;
+ this.sound.start(this.duration/1000, 1);
+ this.sound.stop();
+ }
+
+ Player.prototype.loadTrack = function(track) {
+ this.track = track;
+ }
+
+ Player.prototype.onStopButtonClick = function() {
+ this.paused = true;
+ this.stoped = true;
+ this.position = 0;
+ this.duration = 0;
+ this.sound.start(this.duration/1000, 1);
+ this.sound.stop();
+ this.setProgressBar(0);
+// $('button_play').className ='button_play';
+// $('display').innerHTML = "stoped";
+ }
+
+ var player;
+
+// Set Music Player functions ----------------------------------------------
+ function setMusicPlayer() {
+ if (slideshowMusic == null) {
+ player = new Player();
+ slideshowMusic = null;
+ }
+ }
+
+ function resetVolume() {
+ if (player.sound.getVolume() == 0) {
+ player.toggleVolume();
+ }else{
+ }
+ }
+
+
+// Start slideshow ---------------------------------------------------------------------
+ function CB_SSStart() {
+ resetZoom();
+ saveForeverLoop = foreverLoop;
+ saveLoopMusic = loopMusic;
+// if (imageArray.length == 1) {
+// slideshowMusic = anchor.getAttribute('music');
+ slideshowMusic = myMusic;
+ if (slideshowMusic == null) {
+ CB_Speak.style.display = "none";
+ } else {
+ CB_Speak.style.display = "block";
+ player.loadTrack(slideshowMusic);
+ if ( soond==null ){
+ CB_Speak.setAttribute('src', CB_PicDir + CB_MusicStart);
+ }else{
+ }
+ }
+// var foreverMusic = anchor.getAttribute('loopMusic');
+ var foreverMusic = "true";
+ if (foreverMusic != null) {
+ if (foreverMusic == "true") loopMusic = true; else loopMusic = false;
+ }
+ if (foreverLoop == 1) { loopMusic = true; }
+// }
+
+// CB_Prv.style.display = "none";
+// CB_Nxt.style.display = "none";
+ CB_SlideS.style.display = "none";
+ CB_SlideP.style.display = "block";
+ CB_ZoomS.style.display = "none";
+ CB_ZoomP.style.display = "none";
+ CB_SlideB.style.display = "block";
+ CB_SS = "pause";
+ CB_SlideShow();
+ if ( slideshowMusic != null && soond==null) {
+ soond="playing";
+ }else{
+ }
+ }
+
+
+// Pause slideshow ---------------------------------------------------------------------
+ function CB_SSPause() {
+// CB_Prv.style.display = "block";
+// CB_Nxt.style.display = "block";
+ CB_SlideP.style.display = "none";
+ CB_SlideS.style.display = "block";
+ if (slideshowMusic == null) {
+ CB_Speak.style.display = "none";
+ }else{
+ CB_Speak.style.display = "block";
+ }
+ CB_ZoomS.style.display = "block";
+ CB_ZoomP.style.display = "none";
+ CB_SlideShowStop();
+ }
+
+// ---------------------------------------------------------------------
+
+
+ CB_AnimTimeout = parseInt(CB_AnimTimeout);
+ if (CB_AnimTimeout < 5) {
+ CB_AnimTimeout = 5;
+ }
+ CB_BodyMarginLeft = parseInt(CB_BodyMarginLeft);
+ if (CB_BodyMarginLeft < 0) {
+ CB_BodyMarginLeft = 0;
+ }
+ CB_BodyMarginRight = parseInt(CB_BodyMarginRight);
+ if (CB_BodyMarginRight < 0) {
+ CB_BodyMarginRight = 0;
+ }
+ CB_BodyMarginTop = parseInt(CB_BodyMarginTop);
+ if (CB_BodyMarginTop < 0) {
+ CB_BodyMarginTop = 0;
+ }
+ CB_BodyMarginBottom = parseInt(CB_BodyMarginBottom);
+ if (CB_BodyMarginBottom < 0) {
+ CB_BodyMarginBottom = 0;
+ }
+ CB_HideOpacity = parseInt(CB_HideOpacity);
+ if (CB_HideOpacity < 0 || CB_HideOpacity > 100) {
+ CB_HideOpacity = 70;
+ }
+ CB_OpacityStep = parseInt(CB_OpacityStep);
+ if (CB_OpacityStep < 1 || CB_OpacityStep > CB_HideOpacity) {
+ CB_OpacityStep = 10;
+ }
+ CB_WinBaseW = parseInt(CB_WinBaseW);
+ if (CB_WinBaseW < 25 || CB_WinBaseW > 1000) {
+ CB_WinBaseW = 120;
+ }
+ CB_WinBaseH = parseInt(CB_WinBaseH);
+ if (CB_WinBaseH < 50 || CB_WinBaseH > 1000) {
+ CB_WinBaseH = 110;
+ }
+ CB_WinPadd = parseInt(CB_WinPadd);
+ if (CB_WinPadd < 0) {
+ CB_WinPadd = 5;
+ }
+
+ if (CB_Animation != "none" &&
+ CB_Animation != "normal" &&
+ CB_Animation != "double" && CB_Animation != "warp") {
+ CB_Animation = "double";
+ }
+
+ CB_Jump_X = parseInt(CB_Jump_X);
+ if (CB_Jump_X < 1 || CB_Jump_X > 99) {
+ CB_Jump_X = 50;
+ }
+
+ CB_Jump_Y = parseInt(CB_Jump_Y);
+ if (CB_Jump_Y < 1 || CB_Jump_Y > 99) {
+ CB_Jump_Y = 50;
+ }
+
+ CB_ImgBorder = parseInt(CB_ImgBorder);
+ if (CB_ImgBorder < 0) {
+ CB_ImgBorder = 1;
+ }
+
+ CB_Padd = parseInt(CB_Padd);
+ if (CB_Padd < 0) {
+ CB_Padd = 2;
+ }
+
+ if (CB_ShowImgURL != "be" && CB_ShowImgURL != "ki") {
+ CB_ShowImgURL = "ki";
+ }
+
+ CB_PadT = parseInt(CB_PadT);
+ if (CB_PadT < 0) {
+ CB_PadT = 10;
+ }
+
+ CB_RoundPix = parseInt(CB_RoundPix);
+ if (CB_RoundPix < 0) {
+ CB_RoundPix = 12;
+ }
+
+ CB_TextH = parseInt(CB_TextH);
+ if (CB_TextH < 25) {
+ CB_TextH = 25;
+ }
+
+ CB_FontSize = parseInt(CB_FontSize);
+ if (CB_FontSize < 6) {
+ CB_FontSize = 13;
+ }
+
+ if (CB_ImgNum != "be" && CB_ImgNum != "ki") {
+ CB_ImgNum = "be";
+ }
+
+ CB_SlShowTime = parseInt(CB_SlShowTime);
+ if (CB_SlShowTime < 1) {
+ CB_SlShowTime = 5;
+ }
+
+// var CB_SlShowTime = 5;
+
+ CB_SlShowTime *= 1000;
+ if (CB_CheckDuplicates != "be" && CB_CheckDuplicates != "ki") {
+ CB_CheckDuplicates = "ki";
+ }
+
+ if (CB_Preload != "be" && CB_Preload != "ki") {
+ CB_Preload = "be";
+ }
+
+ var CB_AllThumbsWidth, CB_ResizeTimer, CB_IsAnimating, CB_ImgWidthOrig, CB_ImgHeightOrig;
+ var CB_ieRPBug = 0, CB_ie6RPBug = "", CB_ClearBox, CB_AnimX, CB_AnimY;
+ var CB_BodyMarginX = CB_BodyMarginLeft + CB_BodyMarginRight, CB_BodyMarginY = CB_BodyMarginTop + CB_BodyMarginBottom;
+ var FF_ScrollbarBug, CB_Links, CB_SlideBW = 0, CB_SSTimer, CB_SS = "start", CB_ii = 0, CB_jj = 0;
+ var CB_Hide, CB_LoadingImg, CB_JumpX, CB_JumpY, CB_MarginL, CB_MarginT, CB_Content;
+ var CB_ImgWidth = CB_WinBaseW, CB_ImgHeight = CB_WinBaseH - CB_TextH;
+ var CB_ImgRate, CB_Win, CB_Txt, CB_Img, CB_Prv, CB_Nxt, CB_ImgWidthOld, CB_ImgHeightOld, CB_ActImgId;
+ var CB_Gallery, CB_Count, CB_preImages, CB_Loaded, CB_Header, CB_Footer, CB_Left, CB_Right, CB_Txt3, CB_Txt3a;
+
+ CB_PicDir += "/";
+
+ var IE = document.all ? true : false;
+ if (!IE) {
+ document.captureEvents(Event.MOUSEMOVE);
+ }
+
+ function OnLoad(a, b) {
+ if (typeof window.addEventListener != "undefined") {
+ window.addEventListener(a, b, false);
+ } else if (typeof document.addEventListener != "undefined") {
+ document.addEventListener(a, b, false);
+ } else if (typeof window.attachEvent != "undefined") {
+ window.attachEvent("on" + a, b);
+ }
+ }
+
+ OnLoad("load", CB_Init);
+
+
+ function CB_Init() {
+ //BH --------------- Changed following lines for IE7 arrow keys -------------
+ if (navigator.appVersion.indexOf("MSIE")!=-1){
+ document.onkeydown = CB_KeyPress;
+ }else{
+ document.onkeypress = CB_KeyPress;
+ }
+ //BH ------------------------------------------------------------------------------
+
+ if (!document.getElementById("CB_All") && CB_Show != 0) {
+ document.body.style.position = "static";
+ var a = "<div class=\"CB_RoundPixBugFix\" style=\"width: " + CB_RoundPix + "px; height: " + CB_RoundPix + "px;\"></div>";
+ var b = document.getElementsByTagName("body").item(0);
+ var c = document.createElement("div");
+ c.setAttribute("id", "CB_All");
+ b.appendChild(c);
+
+ document.getElementById("CB_All").innerHTML = "<table cellspacing=\"0\" cellpadding=\"0\" id=\"CB_Window\"><tr id=\"CB_Header\"><td id=\"CB_TopLeft\">" + a + "</td><td id=\"CB_Top\"></td><td id=\"CB_TopRight\">" + a + "</td></tr><tr id=\"CB_Body\"><td id=\"CB_Left\"></td><td id=\"CB_Content\" valign=\"top\" align=\"left\"><div id=\"CB_Padding\"><div id=\"CB_Text\"></div><div id=\"CB_ImgContainer\"><iframe frameborder=\"0\" id=\"CB_iFrame\" src=\"\"></iframe><div id=\"CB_UrlNotes\" ></div><div id=\"CB_ShowTh\"></div><div id=\"CB_Thumbs\"><div id=\"CB_Thumbs2\"></div></div><img id=\"CB_LoadingImage\" title=\"loading\" src=\"" + CB_PicDir + CB_PictureLoading + "\" alt=\"\" /><img id=\"CB_Image\" alt=\"\" src=\"" + CB_PicDir + "blank.gif\" /><div id=\"CB_PrevNext\"><div id=\"CB_ImgHide\"></div><img id=\"CB_SlideShowBar\" src=\"" + CB_PicDir + "white.gif\" alt=\"\" /><a id=\"CB_Prev\" href=\"#\"></a><a id=\"CB_Next\" href=\"#\"></a></div></div><div id=\"CB_NavBar\"><img id=\"CB_SlideShowP\" title=\"" + CB_Pause_SS + "\" src=\"" + CB_PicDir + CB_PicturePause + "\" alt=\"\" /><img id=\"CB_SlideShowS\" title=\"" + CB_Start_SS + "\" src=\"" + CB_PicDir + CB_PictureStart + "\" alt=\"\" /><img id=\"CB_Speaker\" title=\"" + CB_Music + "\" src=\"" + CB_PicDir + CB_MusicNull + "\" alt=\"\" /><img id=\"CB_ZoomOff\" title=\"" + CB_Zoom_Off + "\" src=\"" + CB_PicDir + CB_ZoomStop + "\" alt=\"\" /><img id=\"CB_ZoomOn\" title=\"" + CB_Zoom_On + "\" src=\"" + CB_PicDir + CB_ZoomStart + "\" alt=\"\" /><center><table><tr><td valign=\"top\"><div id=\"CB_Notes\"></div></td><td><div id=\"CB_NoteText\" ></div></td><td><div id=\"CB_DetailText\" title=\"" + CB_Detail_Info + "\" alt=\"\"></div></td><td valign=\"top\"><a href=\"\"><img id=\"CB_Details\" title=\"" + CB_Detail_Info + "\" src=\"" + CB_PicDir + CB_PictureDetails + "\" alt=\"\" /></a></td></tr></table></center><img id=\"CB_CloseWindow\" title=\"" + CB_Close_Win + "\" src=\"" + CB_PicDir + CB_PictureClose + "\" alt=\"\" /></div></div></td><td id=\"CB_Right\"></td></tr><tr id=\"CB_Footer\"><td id=\"CB_BtmLeft\">" + a + "</td><td id=\"CB_Btm\"></td><td id=\"CB_BtmRight\">" + a + "</td></tr></table><div id=\"CB_ContentHide\"></div>";
+
+ if (navigator.userAgent.indexOf("MSIE 6") != -1 &&
+ CB_RoundPix == 0) {
+ CB_ie6RPBug = 1;
+ }
+
+ if (navigator.userAgent.indexOf("MSIE") != -1 &&
+ CB_RoundPix < 2) {
+ CB_ieRPBug = 6;
+ }
+
+ //Music player
+ var objFlashPlayer = document.createElement("div");
+ objFlashPlayer.setAttribute('id','__sound_flash__');
+ b.appendChild(objFlashPlayer);
+
+ //CB All elements
+ document.getElementById("CB_Padding").style.padding = CB_Padd + "px";
+ CB_ShTh = document.getElementById("CB_ShowTh");
+ CB_ImgHd = document.getElementById("CB_ImgHide");
+ CB_ImgHd.style.backgroundColor = "#fff";
+ CB_ImgHd.style.opacity = 0.75;
+ CB_ImgHd.style.filter = "alpha(opacity=75)";
+ CB_Win = document.getElementById("CB_Window");
+ CB_Thm = document.getElementById("CB_Thumbs");
+ CB_Thm2 = document.getElementById("CB_Thumbs2");
+ CB_HideContent = document.getElementById("CB_ContentHide");
+ CB_HideContent.style.backgroundColor = CB_HideColor;
+ CB_HideContent.style.opacity = 0;
+ CB_HideContent.style.filter = "alpha(opacity=0)";
+ CB_Img = document.getElementById("CB_Image");
+ CB_LoadingImg = document.getElementById("CB_LoadingImage");
+ CB_ImgCont = document.getElementById("CB_ImgContainer");
+ CB_Img.style.border = CB_ImgBorder + "px solid " + CB_ImgBorderColor;
+ CB_Cls = document.getElementById("CB_CloseWindow");
+ CB_SlideS = document.getElementById("CB_SlideShowS");
+ CB_SlideP = document.getElementById("CB_SlideShowP");
+ CB_Speak = document.getElementById("CB_Speaker");
+ CB_ZoomS = document.getElementById("CB_ZoomOn");
+ CB_ZoomP = document.getElementById("CB_ZoomOff");
+ CB_SlideB = document.getElementById("CB_SlideShowBar");
+ CB_SlideB.style.opacity = 0.5;
+ CB_SlideB.style.filter = "alpha(opacity=50)";
+ CB_Prv = document.getElementById("CB_Prev");
+ CB_Nxt = document.getElementById("CB_Next");
+ CB_Txt = document.getElementById("CB_Text");
+ // CB_Txt.style.height = CB_TextH - CB_PadT + "px";
+ // CB_Txt.style.marginTop = CB_PadT + "px";
+ CB_Txt.style.fontFamily = CB_Font;
+ CB_Txt.style.fontSize = CB_FontSize + "px";
+ CB_Txt.style.fontWeight = CB_FontWeigth;
+ //CB_Txt.style.color = CB_FontColor;
+
+ CB_Txt2 = document.getElementById("CB_DetailText");
+ CB_Txt2.style.fontFamily = CB_Font;
+ CB_Txt2.style.fontSize = CB_FontSize + "px";
+ CB_Txt2.style.fontWeight = CB_FontWeigth;
+
+ CB_Txt2a = document.getElementById("CB_Details");
+ CB_Txt2a.style.fontFamily = CB_Font;
+ CB_Txt2a.style.fontSize = CB_FontSize + "px";
+ CB_Txt2a.style.fontWeight = CB_FontWeigth;
+
+ CB_Txt3 = document.getElementById("CB_NoteText");
+ CB_Txt3.style.fontFamily = CB_Font;
+ CB_Txt3.style.fontSize = CB_FontSize + "px";
+ CB_Txt3.style.fontWeight = CB_FontWeigth;
+
+ CB_Txt3a = document.getElementById("CB_Notes");
+ CB_Txt3a.style.fontFamily = CB_Font;
+ CB_Txt3a.style.fontSize = CB_FontSize + "px";
+ CB_Txt3a.style.fontWeight = CB_FontWeigth;
+
+ CB_Txt4 = document.getElementById("CB_UrlNotes");
+ CB_Txt4.style.fontFamily = CB_Font;
+ CB_Txt4.style.fontSize = CB_FontSize + "px";
+ CB_Txt4.style.fontWeight = CB_FontWeigth;
+
+ CB_Header = document.getElementById("CB_Header").style;
+ CB_Header.height = CB_RoundPix + "px";
+ CB_Footer = document.getElementById("CB_Footer").style;
+ CB_Footer.height = CB_RoundPix + "px";
+ CB_Left = document.getElementById("CB_Left").style;
+ CB_Left.width = CB_RoundPix + CB_ie6RPBug + "px";
+ CB_Right = document.getElementById("CB_Right").style;
+ CB_Right.width = CB_RoundPix + "px";
+ CB_iFr = document.getElementById("CB_iFrame");
+ CB_PrvNxt = document.getElementById("CB_PrevNext").style;
+ CB_ShTh.onmouseover = function () {CB_ShowThumbs();return;};
+ CB_ImgHd.onmouseover = function () {CB_HideThumbs();return;};
+ CB_Txt.onmouseover = function () {CB_HideThumbs();return;};
+ CB_HideContent.onmouseover = function () {CB_HideThumbs();return;};
+
+ if (navigator.userAgent.indexOf("MSIE") != -1 &&
+ navigator.userAgent.indexOf("Windows") != -1 &&
+ navigator.userAgent.indexOf("MSIE 7") == -1) {
+ CB_pngFixIE();
+ }
+
+ if (navigator.userAgent.indexOf("Opera") != -1) {
+ CB_BodyMarginX = 0;
+ CB_BodyMarginY = 0;
+ }
+
+ if (navigator.userAgent.indexOf("Firefox") != -1) {
+ CB_BodyMarginY = 0;
+ }
+ }
+
+ document.getElementById("CB_Thumbs").onmousemove = getMouseXY;
+
+ var d = 0;
+ var e = 0;
+ CB_Links = document.getElementsByTagName("a");
+ for (i = 0; i < CB_Links.length; i++) {
+ CB_Rel = CB_Links[i].rel;
+ CB_URL = CB_Links[i].getAttribute("href");
+ if (CB_Rel.match("clearbox") != null && CB_Show != 0) {
+ if (CB_Rel == "clearbox") {
+ CB_Links[i].onclick = function () {CB_ClickIMG(this.rel + "+\\+" + this.getAttribute("href") + "+\\+" + this.getAttribute("rev"));return false;};
+ } else {
+ if (CB_Rel.substring(0, 8) == "clearbox" &&
+ CB_Rel.charAt(8) == "[" &&
+ CB_Rel.charAt(CB_Rel.length - 1) == "]") {
+ if (CB_Links[i].rel.substring(9, CB_Links[i].rel.length - 1).split(/\s*,\s*/)[0] != "clearbox") {
+ CB_Links[i].onclick = function () {CB_ClickIMG(this.rel.substring(9, this.rel.length - 1) + "+\\+" + this.getAttribute("href") + "+\\+" + this.getAttribute("rev"));return false;};
+ } else {
+ alert("ClearBox HIBA:\n\nClearBox galeria neve NEM lehet \"clearbox[clearbox]\"!\n(Helye: dokumentum, a " + i + ". <a> tag-en belul.)"); }
+ } else if (CB_Rel.substring(0, 8) == "clearbox" &&
+ CB_Rel.charAt(8) == "(" &&
+ CB_Rel.charAt(CB_Rel.length - 1) == ")") {
+ if (CB_Rel.substring(9, CB_Rel.length - 1).split(/\s*,\s*/)[2] == "click") {
+ CB_Links[i].onclick = function () {CB_ClickURL(this.rel.substring(9, this.rel.length - 1) + "+\\+" + this.getAttribute("href") + "+\\+" + this.getAttribute("rev"));return false;};
+ } else {
+ CB_Links[i].onmouseover = function () {CB_ClickURL(this.rel.substring(9, this.rel.length - 1) + "+\\+" + this.getAttribute("href") + "+\\+" + this.getAttribute("rev"));return false;};
+ }
+ } else {
+ alert("ClearBox HIBA:\n\nHibasan megadott clearbox REL azonosito: \"" + CB_Links[i].rel + "\"!\n(Helye: dokumentum, a " + i + ". <a> tag-en belul.)");
+ }
+ }
+ }
+ }
+ }
+
+ function CB_ClickIMG(a) {
+ zoomSet=1;
+ if (CB_Show == 0) {
+ return false;
+ }
+ CB_Cls.onclick = "";
+ CB_SlideS.onclick = "";
+ CB_SlideP.onclick = "";
+ CB_Clicked = a.split("+\\+");
+ CB_Rel = CB_Clicked[0].split(/\s*,\s*/);
+
+ if (CB_Rel[1] > 0) {
+ CB_SlShowTimer = parseInt(CB_Rel[1]) * 1000;
+ } else {
+ CB_SlShowTimer = CB_SlShowTime;
+ }
+
+ if (CB_Rel[2] == "start") {
+ CB_SS = "pause";
+ }
+
+ if (CB_Gallery &&
+ CB_Rel[0] == CB_Gallery[0][0] && CB_Gallery[0][0] != "clearbox") {
+ } else {
+ CB_Gallery = new Array;
+ CB_Gallery.push(new Array(CB_Rel[0], CB_Rel[1], CB_Rel[2]));
+ if (CB_Clicked[0] == "clearbox") {
+ CB_Gallery.push(new Array(CB_Clicked[1], CB_Clicked[2]));
+ } else {
+ for (i = 0; i < CB_Links.length; i++) {
+ if (CB_Links[i].rel.substring(9, CB_Links[i].rel.length - 1).split(/\s*,\s*/)[0] == CB_Gallery[0][0]) {
+ var b = CB_PicDir + "blank.gif";
+ if (CB_Links[i].getAttribute("tnhref") == null ||
+ CB_Links[i].getAttribute("tnhref") == "null") {
+ for (j = 0; j < CB_Links[i].childNodes.length; j++) {
+ if (CB_Links[i].childNodes[j].src != undefined) {
+ b = CB_Links[i].childNodes[j].src;
+ }
+ }
+ } else {
+ b = CB_Links[i].getAttribute("tnhref");
+ }
+ // Split the rev attribute
+ var splitTitle = CB_Links[i].getAttribute("rev").split("::",4);
+ CB_Gallery.push(new Array(CB_Links[i].getAttribute("href"), splitTitle[2], b, splitTitle[0], splitTitle[1], splitTitle[3]));
+ }
+ }
+ }
+ }
+
+ CB_ActImgId = 0;
+
+ while (CB_Gallery[CB_ActImgId][0] != CB_Clicked[1]) {
+ CB_ActImgId++;
+ }
+ CB_ImgWidthOld = CB_WinBaseW;
+ CB_ImgHeightOld = CB_WinBaseH - CB_TextH;
+ CB_SetAllPositions();
+ CB_HideDocument();
+ }
+
+ function CB_SetAllPositions() {
+ getBrowserSize();
+ getDocumentSize();
+ getScrollPosition();
+ if (BrSizeY > DocSizeY) {
+ DocSizeY = BrSizeY;
+ }
+ if ((navigator.userAgent.indexOf("Netscape") != -1 ||
+ navigator.userAgent.indexOf("Firefox") != -1) &&
+ BrSizeX != DocSizeX) {
+ FF_ScrollbarBug = window.scrollMaxY + window.innerHeight - DocSizeY;
+ } else {
+ FF_ScrollbarBug = 0;
+ }
+ CB_SetMargins();
+ if (CB_BodyMarginX == 0) {
+ if (DocSizeX > BrSizeX) {
+ CB_HideContent.style.width = DocSizeX + "px";
+ } else {
+ CB_HideContent.style.width = BrSizeX + "px";
+ }
+ } else {
+ CB_HideContent.style.width = DocSizeX + CB_BodyMarginX + "px";
+ }
+ CB_HideContent.style.height = BrSizeY + DocScrY + "px";
+ CB_HideContent.style.visibility = "visible";
+ return;
+ }
+
+ var clicks=0;
+ function CB_BrBack_Close() {
+ // Debug -----------------
+ // alert(browserName);
+ if (browserName=="Firefox" || browserName=="Opera"){
+ CB_Close();
+ history.go(-1);
+ }else if (browserName=="Microsoft Internet Explorer") {
+ clicks=(clicks+1);
+ if (clicks==1) {
+ CB_Close();
+ }else{
+ CB_Close();
+ clicks=0;
+ history.go(-1);
+ }
+ }else{
+ CB_Close();
+ }
+ }
+
+
+ function CB_ClickURL(a) {
+ CB_iFr.src = "";
+ // alert("Open = " + clicks);
+ if (CB_Show == 0) {
+ return false;
+ }
+ CB_ClearBox = "ki";
+ CB_Clicked = a.split("+\\+");
+ CB_PrvNxt.display = "none";
+ CB_Cls.style.display = "block";
+ CB_Cls.onclick = function () { CB_BrBack_Close();return false; };
+ CB_Rel = CB_Clicked[0].split(/\s*,\s*/);
+ // alert(CB_Clicked[0] + " and " + CB_Clicked[1] + " and " + CB_Clicked[2]);
+ CB_SetAllPositions();
+ CB_ImgWidth = parseInt(CB_Rel[0]);
+ CB_ImgHeight = parseInt(CB_Rel[1]);
+ CB_ImgWidthOld = CB_WinBaseW;
+ CB_ImgHeightOld = CB_WinBaseH - CB_TextH;
+ if (CB_ImgWidth > BrSizeX - 2 * (CB_RoundPix + CB_ImgBorder + CB_Padd + CB_WinPadd)) {
+ CB_ImgWidth = BrSizeX - 2 * (CB_RoundPix + CB_ImgBorder + CB_Padd + CB_WinPadd);
+ }
+ if (CB_ImgHeight > BrSizeY - 2 * (CB_RoundPix + CB_ImgBorder + CB_Padd + CB_WinPadd) - CB_TextH) {
+ CB_ImgHeight = BrSizeY - 2 * (CB_RoundPix + CB_ImgBorder + CB_Padd + CB_WinPadd) - CB_TextH;
+ }
+ CB_Img.style.width = CB_WinBaseW + "px";
+ CB_Img.style.height = CB_WinBaseH - CB_TextH + "px";
+ CB_Img.style.display = "block";
+ CB_Img.style.visibility = "hidden";
+ CB_Win.style.visibility = "visible";
+ CB_SlideS.style.display = "none";
+ CB_SlideP.style.display = "none";
+ CB_Speak.style.display = "none";
+ CB_ZoomS.style.display = "none";
+ CB_ZoomP.style.display = "none";
+
+ CB_Txt2.style.visibility = "hidden";
+ CB_Txt2a.style.visibility = "hidden";
+ CB_HideDocument("x");
+ CB_HideContent.onclick = function () {CB_Close();return false;};
+ CB_SS = "pause";
+ }
+
+ function CB_HideDocument(a) {
+ var b = a;
+ if (CB_ii < CB_HideOpacity) {
+ CB_ii += CB_OpacityStep;
+ CB_HideContent.style.opacity = CB_ii / 100;
+ CB_HideContent.style.filter = "alpha(opacity=" + CB_ii + ")";
+ CB_Hide = CB_ii;
+ CB_Blur = setTimeout("CB_HideDocument('" + b + "')", 5);
+ } else {
+ CB_ii = 0;
+ CB_HideContent.style.height = DocSizeY + CB_BodyMarginY + "px";
+ if (CB_HideOpacity != 0) {
+ clearTimeout(CB_Blur);
+ }
+ if (b == "x") {
+ CB_LoadingImg.style.visibility = "visible";
+ CB_AnimatePlease("x");
+ } else {
+ CB_NewWindow();
+ }
+ return;
+ }
+ }
+
+ function CB_NewWindow() {
+ CB_Img.style.width = CB_WinBaseW + "px";
+ CB_Img.style.height = CB_WinBaseH - CB_TextH + "px";
+ CB_Img.style.display = "block";
+ CB_Img.style.visibility = "hidden";
+ CB_Win.style.visibility = "visible";
+ CB_LoadImage();
+ }
+
+ function CB_LoadImage(a) {
+ CB_ImgWidthOld = CB_ImgWidth;
+ CB_ImgHeightOld = CB_ImgHeight;
+ CB_Thm.style.display = "none";
+ CB_ImgHd.style.width = "0px";
+ CB_ImgHd.style.height = "0px";
+ CB_ImgHd.style.visibility = "hidden";
+ CB_Thm.style.width = "0px";
+ CB_ClearBox = "ki";
+ CB_jj = 0;
+ CB_HideContent.onclick = "";
+ if (CB_Gallery.length < 3) {
+ CB_SlideS.style.display = "none";
+ CB_SlideP.style.display = "none";
+ CB_Speak.style.display = "none";
+ CB_ZoomP.style.display = "none";
+ CB_ZoomS.style.display = "block";
+ } else {
+ if (CB_SS == "start") {
+ CB_SlideS.style.display = "block";
+ CB_SlideP.style.display = "none";
+ if (slideshowMusic == null) {
+ CB_Speak.style.display = "none";
+ }else{
+ CB_Speak.style.display = "block";
+ }
+// CB_ZoomS.style.display = "none";
+ CB_ZoomP.style.display = "none";
+ } else {
+ CB_SlideP.style.display = "block";
+ CB_SlideS.style.display = "none";
+// CB_Speak.style.display = "none";
+ CB_ZoomP.style.display = "none";
+ CB_ZoomS.style.display = "none";
+ }
+ }
+ CB_Prv.style.display = "none";
+ CB_Nxt.style.display = "none";
+
+ if (a) {
+ CB_ActImgId = parseInt(a);
+ }
+ CB_JumpX = CB_Jump_X;
+ CB_JumpY = CB_Jump_Y;
+ if (CB_Animation != "warp") {
+ CB_Img.style.visibility = "hidden";
+ CB_LoadingImg.style.visibility = "visible";
+ }
+ CB_Txt.innerHTML = CB_LoadingText;
+ CB_Txt.innerHTML = "";
+ CB_Count = 0;
+ CB_preImages = new Image;
+ CB_preImages.src = CB_Gallery[CB_ActImgId][0];
+ CB_Loaded = false;
+// CB_preImages.onerror = function () {CB_ShowImage();alert("ClearBox ERROR:\n\nCould not open Image: " + CB_Gallery[CB_ActImgId][0]);return;};
+ CB_preImages.onerror = function () {CB_ShowImage();alert("Lightbox ERROR:\n\nCould not open Image : " );return;};
+ CB_CheckLoaded();
+// resetZoom();
+ }
+
+ function CB_CheckLoaded() {
+ if (CB_Count == 1) {
+ CB_Loaded = true;
+ clearTimeout(CB_ImgLoadTimer);
+ CB_GetImageSize();
+ return;
+ }
+ if (CB_Loaded == false && CB_preImages.complete) {
+ CB_Count++;
+ }
+ CB_ImgLoadTimer = setTimeout("CB_CheckLoaded()", 5);
+ return;
+ }
+
+ function CB_GetImageSize() {
+ CB_ImgWidth = CB_preImages.width;
+ CB_ImgHeight = CB_preImages.height;
+ CB_ImgWidthOrig = CB_ImgWidth;
+ CB_ImgHeightOrig = CB_ImgHeight;
+ CB_ImgRate = CB_ImgWidth / CB_ImgHeight;
+ CB_FitToBrowser();
+ CB_Img.src = CB_Gallery[CB_ActImgId][0];
+// CB_Img.mid = CB_Gallery[CB_ActImgId][2];
+// CB_Txt.style.width = CB_ImgWidth + "px";
+ CB_AnimatePlease();
+ return;
+ }
+
+ function CB_AnimatePlease(a) {
+ // CB_Speak.style.display = "none";
+ tt_HideInit();
+ CB_tt="closed";
+ CB_JumpX = CB_Jump_X;
+ CB_JumpY = CB_Jump_Y;
+ CB_AnimX = "false";
+ CB_AnimY = "false";
+ CB_IsAnimating = 1;
+
+ if (CB_Animation == "double") {
+ CB_WindowResizeX();
+ CB_WindowResizeY();
+ } else if (CB_Animation == "warp") {
+ if (!a) {
+ CB_LoadingImg.style.visibility = "hidden";
+ CB_Img.style.visibility = "visible";
+ }
+ CB_WindowResizeX();
+ CB_WindowResizeY();
+ } else if (CB_Animation == "none") {
+ CB_SetMargins();
+ CB_ImgCont.style.height = CB_ImgHeight + 2 * CB_ImgBorder + "px";
+ CB_Img.style.width = CB_ImgWidth + "px";
+ CB_Img.style.height = CB_ImgHeight + "px";
+ CB_AnimX = "true";
+ CB_AnimY = "true";
+ } else if (CB_Animation == "normal") {
+ CB_WindowResizeX();
+ }else{
+ // ---Adjust Title width to image ---------------------------------------
+ CB_Txt.style.width = CB_ImgWidthOld + "px";
+ // --------------------------------------------------------------------------
+
+ }
+ if (a) {
+ CB_CheckResize2();
+ } else {
+ CB_CheckResize();
+ }
+ return;
+ }
+
+ function CB_WindowResizeX() {
+ if (CB_ImgWidth == CB_ImgWidthOld) {
+ if (CB_TimerX) {
+ clearTimeout(CB_TimerX);
+ }
+ if (CB_Animation == "normal") {
+ CB_AnimX = "true";
+ CB_WindowResizeY();
+ } else {
+ CB_AnimX = "true";
+ }
+ return;
+ } else {
+ if (CB_ImgWidth < CB_ImgWidthOld) {
+ if (CB_ImgWidthOld < CB_ImgWidth + 100 && CB_Jump_X > 20) {
+ CB_JumpX = 20;
+ }
+ if (CB_ImgWidthOld < CB_ImgWidth + 60 && CB_Jump_X > 10) {
+ CB_JumpX = 10;
+ }
+ if (CB_ImgWidthOld < CB_ImgWidth + 30 && CB_Jump_X > 5) {
+ CB_JumpX = 5;
+ }
+ if (CB_ImgWidthOld < CB_ImgWidth + 15 && CB_Jump_X > 2) {
+ CB_JumpX = 2;
+ }
+ if (CB_ImgWidthOld < CB_ImgWidth + 4) {
+ CB_JumpX = 1;
+ }
+ CB_ImgWidthOld -= CB_JumpX;
+ } else {
+ if (CB_ImgWidthOld > CB_ImgWidth - 100 && CB_Jump_X > 20) {
+ CB_JumpX = 20;
+ }
+ if (CB_ImgWidthOld > CB_ImgWidth - 60 && CB_Jump_X > 10) {
+ CB_JumpX = 10;
+ }
+ if (CB_ImgWidthOld > CB_ImgWidth - 30 && CB_Jump_X > 50) {
+ CB_JumpX = 5;
+ }
+ if (CB_ImgWidthOld > CB_ImgWidth - 15 && CB_Jump_X > 2) {
+ CB_JumpX = 2;
+ }
+ if (CB_ImgWidthOld > CB_ImgWidth - 4) {
+ CB_JumpX = 1;
+ }
+ CB_ImgWidthOld += CB_JumpX;
+ }
+ CB_Img.style.width = CB_ImgWidthOld + "px";
+ // ---Adjust Title width to image ---------------------------------------
+ CB_Txt.style.width = CB_ImgWidthOld + "px";
+ // --------------------------------------------------------------------------
+ CB_MarginL = parseInt(DocScrX - (CB_ImgWidthOld + 2 * (CB_RoundPix + CB_ImgBorder + CB_Padd)) / 2);
+ CB_Win.style.marginLeft = CB_MarginL + "px";
+ CB_TimerX = setTimeout("CB_WindowResizeX()", CB_AnimTimeout);
+ }
+ }
+
+ function CB_WindowResizeY() {
+ if (CB_ImgHeight == CB_ImgHeightOld) {
+ if (CB_TimerY) {
+ clearTimeout(CB_TimerY);
+ }
+ CB_AnimY = "true";
+ return;
+ } else {
+ if (CB_ImgHeight < CB_ImgHeightOld) {
+ if (CB_ImgHeightOld < CB_ImgHeight + 100 && CB_Jump_Y > 20) {
+ CB_JumpY = 20;
+ }
+ if (CB_ImgHeightOld < CB_ImgHeight + 60 && CB_Jump_Y > 10) {
+ CB_JumpY = 10;
+ }
+ if (CB_ImgHeightOld < CB_ImgHeight + 30 && CB_Jump_Y > 5) {
+ CB_JumpY = 5;
+ }
+ if (CB_ImgHeightOld < CB_ImgHeight + 15 && CB_Jump_Y > 2) {
+ CB_JumpY = 2;
+ }
+ if (CB_ImgHeightOld < CB_ImgHeight + 4) {
+ CB_JumpY = 1;
+ }
+ CB_ImgHeightOld -= CB_JumpY;
+ } else {
+ if (CB_ImgHeightOld > CB_ImgHeight - 100 && CB_Jump_Y > 20) {
+ CB_JumpY = 20;
+ }
+ if (CB_ImgHeightOld > CB_ImgHeight - 60 && CB_Jump_Y > 10) {
+ CB_JumpY = 10;
+ }
+ if (CB_ImgHeightOld > CB_ImgHeight - 30 && CB_Jump_Y > 5) {
+ CB_JumpY = 5;
+ }
+ if (CB_ImgHeightOld > CB_ImgHeight - 15 && CB_Jump_Y > 2) {
+ CB_JumpY = 2;
+ }
+ if (CB_ImgHeightOld > CB_ImgHeight - 4) {
+ CB_JumpY = 1;
+ }
+ CB_ImgHeightOld += CB_JumpY;
+ }
+ CB_Img.style.height = CB_ImgHeightOld + "px";
+ CB_ImgCont.style.height = CB_ImgHeightOld + 2 * CB_ImgBorder + "px";
+ CB_MarginT = parseInt(DocScrY - (CB_ieRPBug + CB_ImgHeightOld + CB_TextH + 2 * (CB_RoundPix + CB_ImgBorder + CB_Padd)) / 2);
+ CB_Win.style.marginTop = CB_MarginT - FF_ScrollbarBug / 2 + "px";
+ CB_TimerY = setTimeout("CB_WindowResizeY()", CB_AnimTimeout);
+ }
+ }
+
+ function CB_CheckResize() {
+ if (CB_AnimX == "true" && CB_AnimY == "true") {
+ if (CB_ResizeTimer) {
+ clearTimeout(CB_ResizeTimer);
+ }
+
+ // ---Adjust Title width to image ---------------------------------------
+ CB_Txt.style.width = CB_ImgWidthOld + "px";
+ // --------------------------------------------------------------------------
+
+ CB_ShowImage();
+ return;
+ } else {
+ CB_ResizeTimer = setTimeout("CB_CheckResize()", 5);
+ }
+ }
+
+ function CB_CheckResize2() {
+ if (CB_AnimX == "true" && CB_AnimY == "true") {
+ if (CB_ResizeTimer) {
+ clearTimeout(CB_ResizeTimer);
+ }
+ CB_Gallery = "";
+ CB_iFr.src = CB_Clicked[1];
+ CB_Img.style.visibility = "visible";
+ CB_LoadingImg.style.visibility = "hidden";
+ CB_iFr.style.top = CB_ImgBorder + "px";
+ CB_iFr.style.left = CB_ImgBorder + "px";
+ CB_iFr.style.width = CB_ImgWidth + "px";
+ //BH next line changed to make url navbar smaller in Firefox
+ //BH CB_iFr.style.height = CB_ImgHeight + 2 + "px";
+ CB_iFr.style.height = CB_ImgHeight + 4 + "px";
+
+ if (CB_Clicked[2] &&
+ CB_Clicked[2] != "null" && CB_Clicked[2] != null) {
+
+ CB_Txt.style.visibility = "visible";
+ CB_Txt3.style.visibility = "visible";
+ CB_Txt3a.style.visibility = "visible";
+
+ CB_Txt4.style.top = "20px";
+ CB_Txt4.style.left = "20px";
+ CB_Txt4.style.width = "200px";
+ CB_Txt4.style.height = "80px";
+ CB_Txt4.innerHTML = " Testing ";
+ CB_Txt4.style.visibility = "hidden";
+
+ // Split URL title and also create CB_Txt.innerHTML
+ // CB_Txt.innerHTML = CB_Clicked[2];
+ var splitURLTitle = CB_Clicked[2].split("::",4);
+ CB_Txt.innerHTML = splitURLTitle[2];
+ var MIDa = splitURLTitle[0];
+ var GEDCOMa = splitURLTitle[1];
+ var notey = splitURLTitle[3];
+ if (notey != "&lt;br /&gt;" && notey) {
+ CB_Txt3.innerHTML = "<a href=\"JavaScript:void(0);\" onclick=\"TipTog('<font color=#008800><b>" + CB_ImgNotes2 + ":</b></font><br />" + notey + "', CENTERWINDOW, false, DELAY, 0, TEXTALIGN, '" + CB_Alignm + "', WIDTH, -450, BGCOLOR, '#fffbcc', BALLOON, true, BALLOONSTEMWIDTH, 0, ABOVE, false, BORDERCOLOR, '', TITLEBGCOLOR, '', CLOSEBTNTEXT, 'X', CLOSEBTN, false, CLOSEBTNCOLORS, ['#ff0000', '#ffffff', '#ffffff', '#ff0000'], OFFSETY, -25, OFFSETX, 40, STICKY, true, PADDING, 6, CLICKCLOSE, true );\" ></a>";
+ CB_Txt3a.innerHTML = "<a href=\"JavaScript:void(0);\" onclick=\"TipTog('<font color=#008800><b>" + CB_ImgNotes2 + ":</b></font><br />" + notey + "', CENTERWINDOW, false, DELAY, 0, TEXTALIGN, '" + CB_Alignm + "', WIDTH, -450, BGCOLOR, '#fffbcc', BALLOON, true, BALLOONSTEMWIDTH, 0, ABOVE, false, BORDERCOLOR, '', TITLEBGCOLOR, '', CLOSEBTNTEXT, 'X', CLOSEBTN, false, CLOSEBTNCOLORS, ['#ff0000', '#ffffff', '#ffffff', '#ff0000'], OFFSETY, -25, OFFSETX, 40, STICKY, true, PADDING, 6, CLICKCLOSE, true );\" ><img id=\"CB_PicNotes\" title=\"" + CB_ImgNotes + "\" src=\"" + CB_PicDir + CB_PictureNotes + "\" alt=\"\" /></a>";
+
+ }
+ CB_Txt2.onclick = function () { window.location.href = 'mediaviewer.php?mid='+MIDa+'&ged='+GEDCOMa; return false; };
+ CB_Txt2a.onclick = function () { window.location.href = 'mediaviewer.php?mid='+MIDa+'&ged='+GEDCOM; return false; };
+ } else {
+ CB_Txt.innerHTML = CB_Clicked[1];
+ }
+//Temp CB_Txt.innerHTML += " " + CB_ImgNumBracket.substring(0, 1) + "<a class=\"CB_TextNav\" href=\"javascript:void(0)\" onclick=\"CB_Close();\">" + CB_NavTextCls + "</a>" + CB_ImgNumBracket.substring(1, 2);
+ CB_HideContent.onclick = function () {CB_BrBack_Close();return false;};
+ CB_ClearBox = "be";
+ CB_IsAnimating = 0;
+ return;
+ } else {
+ CB_ResizeTimer = setTimeout("CB_CheckResize2()", 5);
+ }
+ }
+
+
+ function moveLeft() {
+ if ( CB_ImgWidthOld > BrSizeX ) {
+ CB_MarginL = CB_MarginL - 10;
+ CB_Win.style.marginLeft = CB_MarginL + "px";
+ CB_Prv.style.display = "none";
+ CB_Nxt.style.display = "none";
+ CB_SlideB.style.display = "none";
+ CB_ZoomP.style.display = "block";
+ CB_ZoomS.style.display = "none";
+ CB_SlideS.style.display = "block";
+ CB_SlideP.style.display = "none";
+ CB_ShTh.style.display = "none";
+ }else{
+ }
+ }
+
+ function moveRight() {
+ if (CB_ImgWidthOld > BrSizeX ){
+ CB_MarginL = CB_MarginL + 10;
+ CB_Win.style.marginLeft = CB_MarginL + "px";
+ CB_Prv.style.display = "none";
+ CB_Nxt.style.display = "none";
+ CB_SlideB.style.display = "none";
+ CB_ZoomP.style.display = "block";
+ CB_ZoomS.style.display = "none";
+ CB_SlideS.style.display = "block";
+ CB_SlideP.style.display = "none";
+ CB_ShTh.style.display = "none";
+ }else{
+ }
+ }
+
+ function moveUp() {
+ if ( CB_ImgHeightOld > BrSizeY ) {
+ CB_MarginT = CB_MarginT - 10;
+ CB_Win.style.marginTop = CB_MarginT + "px";
+ CB_Prv.style.display = "none";
+ CB_Nxt.style.display = "none";
+ CB_SlideB.style.display = "none";
+ CB_ZoomP.style.display = "block";
+ CB_ZoomS.style.display = "none";
+ CB_SlideS.style.display = "block";
+ CB_SlideP.style.display = "none";
+ CB_ShTh.style.display = "none";
+ }else{
+ }
+ }
+
+ function moveDown() {
+ if ( CB_ImgHeightOld > BrSizeY ) {
+ CB_MarginT = CB_MarginT + 10;
+ CB_Win.style.marginTop = CB_MarginT + "px";
+ CB_Prv.style.display = "none";
+ CB_Nxt.style.display = "none";
+ CB_SlideB.style.display = "none";
+ CB_ZoomP.style.display = "block";
+ CB_ZoomS.style.display = "none";
+ CB_SlideS.style.display = "block";
+ CB_SlideP.style.display = "none";
+ CB_ShTh.style.display = "none";
+ }else{
+ }
+ }
+
+ function zoomIn() {
+ if (zoomSet == 1) {
+ CB_ImgWidthOld = CB_ImgWidthOld + ( CB_ImgWidthOld * 0.05 );
+ CB_ImgHeightOld = CB_ImgHeightOld + ( CB_ImgHeightOld * 0.05 );
+ CB_Img.style.width = CB_ImgWidthOld + "px";
+ CB_Img.style.height = CB_ImgHeightOld + "px" ;
+ CB_ImgCont.style.height = CB_ImgHeightOld + ( 2 ) * CB_ImgBorder + "px";
+ CB_MarginL = parseInt(DocScrX - (CB_ImgWidthOld + 2 * (CB_RoundPix + CB_ImgBorder + CB_Padd)) / 2);
+ CB_Win.style.marginLeft = CB_MarginL + "px";
+ CB_MarginT = parseInt(DocScrY - (CB_ieRPBug + CB_ImgHeightOld + CB_TextH + 2 * (CB_RoundPix + CB_ImgBorder + CB_Padd)) / 2);
+ CB_Win.style.marginTop = CB_MarginT - FF_ScrollbarBug / 2 + "px";
+ CB_Prv.style.display = "none";
+ CB_Nxt.style.display = "none";
+ CB_SlideB.style.display = "none";
+ CB_ZoomP.style.display = "block";
+ CB_ZoomS.style.display = "none";
+ if (CB_Gallery.length < 3) {
+ CB_SlideS.style.display = "none";
+ }else{
+ CB_SlideS.style.display = "block";
+ }
+ CB_SlideP.style.display = "none";
+ CB_ShTh.style.display = "none";
+ // ---Adjust Title width to image ---------------------------------------
+ CB_Txt.style.width = CB_ImgWidthOld + "px";
+ // --------------------------------------------------------------------------
+ CB_Zoom = "true";
+ // Drag and Drop
+ dragDrop.initElement(CB_Win);
+ CB_Win.onclick = function() {return false;};
+ }
+ }
+
+ function zoomOut() {
+ if (zoomSet == 1) {
+ CB_ImgWidthOld = CB_ImgWidthOld - ( CB_ImgWidthOld * 0.05 );
+ CB_ImgHeightOld = CB_ImgHeightOld - ( CB_ImgHeightOld * 0.05 );
+ CB_Img.style.width = CB_ImgWidthOld + "px";
+ CB_Img.style.height = CB_ImgHeightOld + "px";
+ CB_ImgCont.style.height = CB_ImgHeightOld + ( 2 ) * CB_ImgBorder + "px";
+ CB_MarginL = parseInt(DocScrX - (CB_ImgWidthOld + 2 * (CB_RoundPix + CB_ImgBorder + CB_Padd)) / 2);
+ CB_Win.style.marginLeft = CB_MarginL + "px";
+ CB_MarginT = parseInt(DocScrY - (CB_ieRPBug + CB_ImgHeightOld + CB_TextH + 2 * (CB_RoundPix + CB_ImgBorder + CB_Padd)) / 2);
+ CB_Win.style.marginTop = CB_MarginT - FF_ScrollbarBug / 2 + "px";
+ CB_Prv.style.display = "none";
+ CB_Nxt.style.display = "none";
+ CB_SlideB.style.display = "none";
+ CB_ZoomP.style.display = "block";
+ CB_ZoomS.style.display = "none";
+ if (CB_Gallery.length < 3) {
+ CB_SlideS.style.display = "none";
+ }else{
+ CB_SlideS.style.display = "block";
+ }
+ CB_SlideP.style.display = "none";
+ CB_ShTh.style.display = "none";
+ // ---Adjust Title width to image ---------------------------------------
+ CB_Txt.style.width = CB_ImgWidthOld + "px";
+ // --------------------------------------------------------------------------
+ CB_Zoom = "true";
+ // Drag and Drop
+ dragDrop.initElement(CB_Win);
+ CB_Win.onclick = function() {return false;};
+ }
+ }
+
+ function setZoom() {
+ zoomSet = 2;
+ // Drag and Drop
+ }
+
+ function resetZoom() {
+
+ CB_AnimatePlease();
+
+ CB_ImgWidthOld = CB_ImgWidthOrig;
+ CB_ImgHeightOld = CB_ImgHeightOrig;
+ CB_Img.style.width = CB_ImgWidthOld + "px";
+ CB_Img.style.height = CB_ImgHeightOld + "px";
+ CB_ImgCont.style.height = CB_ImgHeightOld + ( 2 ) * CB_ImgBorder + "px";
+ CB_MarginL = parseInt(DocScrX - (CB_ImgWidthOld + 2 * (CB_RoundPix + CB_ImgBorder + CB_Padd)) / 2);
+ CB_Win.style.marginLeft = CB_MarginL + "px";
+ CB_MarginT = parseInt(DocScrY - (CB_ieRPBug + CB_ImgHeightOld + CB_TextH + 2 * (CB_RoundPix + CB_ImgBorder + CB_Padd)) / 2);
+ CB_Win.style.marginTop = CB_MarginT - FF_ScrollbarBug / 2 + "px";
+ if (CB_Gallery.length < 3) {
+ CB_Prv.style.display = "none";
+ CB_Nxt.style.display = "none";
+ }else{
+ CB_Prv.style.display = "block";
+ CB_Nxt.style.display = "block";
+ }
+ CB_SlideB.style.display = "none";
+ CB_ZoomS.style.display = "block";
+ CB_ZoomP.style.display = "none";
+
+ if (CB_Gallery.length < 3) {
+ CB_SlideS.style.display = "none";
+ }else{
+ CB_SlideS.style.display = "block";
+ }
+ CB_SlideP.style.display = "none";
+ CB_ShTh.style.display = "block";
+ zoomSet=1;
+ CB_Win.style.left = "50%";
+ CB_Win.style.top = "50%";
+ return;
+ }
+
+
+
+ function closeZoom() {
+ CB_ImgWidthOld = CB_ImgWidthOrig;
+ CB_ImgHeightOld = CB_ImgHeightOrig;
+ CB_Img.style.width = CB_ImgWidthOrig + "px";
+ CB_Img.style.height = CB_ImgHeightOrig + "px";
+ CB_ImgCont.style.height = CB_ImgHeightOrig + ( 2 ) * CB_ImgBorder + "px";
+ CB_MarginL = parseInt(DocScrX - (CB_ImgWidthOrig + 2 * (CB_RoundPix + CB_ImgBorder + CB_Padd)) / 2);
+ CB_Win.style.marginLeft = CB_MarginL + "px";
+ CB_MarginT = parseInt(DocScrY - (CB_ieRPBug + CB_ImgHeightOrig + CB_TextH + 2 * (CB_RoundPix + CB_ImgBorder + CB_Padd)) / 2);
+ CB_Win.style.marginTop = CB_MarginT - FF_ScrollbarBug / 2 + "px";
+ CB_Prv.style.display = "block";
+ CB_Nxt.style.display = "block";
+ CB_SlideB.style.display = "none";
+ CB_ZoomS.style.display = "block";
+ CB_ZoomP.style.display = "none";
+ CB_SlideS.style.display = "block";
+ CB_SlideP.style.display = "none";
+ CB_ShTh.style.display = "block";
+ zoomSet=1;
+ return;
+ }
+
+ // New function used when counting number of lines in a Note ====================================
+ function countOccurrencesOf(source, pattern) {
+ count = 0;
+ if (source!=null) {
+ len = pattern.length;
+ found = -1;
+ start = 0;
+ while( (found = source.indexOf(pattern, start) ) != -1) {
+ start = found + len;
+ count++;
+ }
+ return count;
+ }
+ else return 0;
+ }
+ // ========================================================================================
+
+ function decode_htmlspecialchars(p_string) {
+ p_string = p_string.replace(/&amp;/g, '&');
+ p_string = p_string.replace(/&lt;/g, '<');
+ p_string = p_string.replace(/&gt;/g, '>');
+ p_string = p_string.replace(/\\&quot;/g, '"');
+ p_string = p_string.replace(/&quot;/g, '"');
+ p_string = p_string.replace(/&#039;/g, '\'');
+ p_string=p_string.replace(/\\'/g,'\'');
+ p_string=p_string.replace(/\\"/g,'"');
+ p_string=p_string.replace(/\\\\/g,'\\');
+ p_string=p_string.replace(/\\0/g,'\0');
+ return p_string;
+ };
+
+ function CB_ShowImage() {
+ // ---Adjust Title width to image ----------------------------
+ CB_Txt.style.width = CB_ImgWidth + "px";
+ // ---------------------------------------------------------------
+
+ // UnTip(); // Supposed to Clear Notes Tooltip ... Does not work ?
+ tt_HideInit(); // Clears Notes Tooltip
+
+ // init music player
+ setMusicPlayer();
+ // set navigation controls
+ CB_Cls.onclick = function () {resetVolume(); CB_Close();}; // Close
+ CB_SlideS.onclick = function () {resetZoom(); CB_SSStart();return false; }; // Start Slideshow
+ CB_SlideP.onclick = function () {CB_SSPause();return false;}; // pause Slideshow
+ CB_Speak.onclick = function () {player.play();return false;}; // Speaker on/off
+ CB_ZoomP.onclick = function () {resetZoom(); CB_SSStart(); CB_SSPause(); return false; }; // Reset Zoom
+ CB_Win.ondblclick= function () {resetZoom(); CB_SSStart(); CB_SSPause(); return false; }; // REset Zoom
+// CB_ZoomS.onclick = function () {CB_FullSize(); };
+
+ CB_PrvNxt.display = "block";
+ if (CB_Animation != "warp") {
+ CB_Txt.innerHTML = "";
+ CB_Txt3.innerHTML = "";
+ CB_Txt3a.innerHTML = "";
+ CB_LoadingImg.style.visibility = "hidden";
+ CB_Img.src = CB_Gallery[CB_ActImgId][0];
+ CB_Img.style.visibility = "visible";
+ }
+ CB_Cls.style.display = "block";
+ CB_HideContent.onclick = function () {CB_Close();return false;};
+ CB_Prv.style.height = CB_ImgHeight + "px";
+ CB_Nxt.style.height = CB_ImgHeight + "px";
+
+ if (CB_Gallery[CB_ActImgId][1] &&
+ CB_Gallery[CB_ActImgId][1] != "null" &&
+ CB_Gallery[CB_ActImgId][1] != null) {
+
+ CB_Txt.innerHTML = CB_Gallery[CB_ActImgId][1];
+ var notey1 = CB_Gallery[CB_ActImgId][5];
+ if (notey1 != "&lt;br /&gt;" && notey1 ) {
+ // alert(notey1);
+ var brs = countOccurrencesOf(notey1, "&lt;br /&gt;");
+ var spacer=7;
+ if (brs==1) {spacer=spacer+0;}
+ if (brs==2) {spacer=spacer+5;}
+ if (brs==3) {spacer=spacer+10;}
+ if (brs==4) {spacer=spacer+17;}
+ if (brs==5) {spacer=spacer+20;}
+ if (brs==6) {spacer=spacer+27;}
+ if (brs==7) {spacer=spacer+35;}
+ if (brs==8) {spacer=spacer+45;}
+ if (brs==9) {spacer=spacer+55;}
+ if (brs==10) {spacer=spacer+65;}
+ //alert(brs + " - " + spacer);
+
+ // CB_Txt3.innerHTML = "<a href=\"JavaScript:void(0);\" onclick=\"TipTog('<font color=#008800><b>" + CB_ImgNotes2 + ":</b></font><br />" + notey1 + "', CENTERWINDOW, true, DELAY, 0, TEXTALIGN, '" + CB_Alignm + "', WIDTH, "+CB_ImgWidth+"-30, BGCOLOR, '#fffbcc', BALLOON, true , BALLOONSTEMWIDTH, 0, ABOVE, true, BORDERCOLOR, '', TITLEBGCOLOR, '', CLOSEBTNTEXT, 'X', CLOSEBTN, false, CLOSEBTNCOLORS, ['#ff0000', '#ffffff', '#ffffff', '#ff0000'], OFFSETY, 150-" + ((DocSizeY-BrSizeY)/2) + ", OFFSETX, 0, STICKY, true, PADDING, 6, CLICKCLOSE, true );\" ></a>";
+ // CB_Txt3a.innerHTML = "<a href=\"JavaScript:void(0);\" onclick=\"TipTog('<font color=#008800><b>" + CB_ImgNotes2 + ":</b></font><br />" + notey1 + "', CENTERWINDOW, true, DELAY, 0, TEXTALIGN, '" + CB_Alignm + "', WIDTH, "+CB_ImgWidth+"-30, BGCOLOR, '#fffbcc', BALLOON, true, BALLOONSTEMWIDTH, 0, ABOVE, true, BORDERCOLOR, '', TITLEBGCOLOR, '', CLOSEBTNTEXT, 'X', CLOSEBTN, false, CLOSEBTNCOLORS, ['#ff0000', '#ffffff', '#ffffff', '#ff0000'], OFFSETY, -10-" + ((DocSizeY-BrSizeY)/2) + "+" +(CB_ImgHeight/2)+ "-" +(spacer)+ ", OFFSETX, 0, STICKY, true, PADDING, 6, CLICKCLOSE, true );\" ><img id=\"CB_PicNotes\" title=\"" + CB_ImgNotes + "\" src=\"" + CB_PicDir + CB_PictureNotes + "\" alt=\"\" /></a>";
+ CB_Txt3.innerHTML = "<a href=\"JavaScript:void(0);\" onclick=\"TipTog('" + notey1 + "', CENTERWINDOW, true, DELAY, 0, TEXTALIGN, '" + CB_Alignm + "', WIDTH, "+CB_ImgWidth+"-30, BGCOLOR, '#fffbcc', BALLOON, true , BALLOONSTEMWIDTH, 0, ABOVE, true, BORDERCOLOR, '', TITLEBGCOLOR, '', CLOSEBTNTEXT, 'X', CLOSEBTN, false, CLOSEBTNCOLORS, ['#ff0000', '#ffffff', '#ffffff', '#ff0000'], OFFSETY, 150-" + ((DocSizeY-BrSizeY)/2) + ", OFFSETX, 0, STICKY, true, PADDING, 6, CLICKCLOSE, true );\" ></a>";
+ CB_Txt3a.innerHTML = "<a href=\"JavaScript:void(0);\" onclick=\"TipTog('" + notey1 + "', CENTERWINDOW, true, DELAY, 0, TEXTALIGN, '" + CB_Alignm + "', WIDTH, "+CB_ImgWidth+"-30, BGCOLOR, '#fffbcc', BALLOON, true, BALLOONSTEMWIDTH, 0, ABOVE, true, BORDERCOLOR, '', TITLEBGCOLOR, '', CLOSEBTNTEXT, 'X', CLOSEBTN, false, CLOSEBTNCOLORS, ['#ff0000', '#ffffff', '#ffffff', '#ff0000'], OFFSETY, -10-" + ((DocSizeY-BrSizeY)/2) + "+" +(CB_ImgHeight/2)+ "-" +(spacer)+ ", OFFSETX, 0, STICKY, true, PADDING, 6, CLICKCLOSE, true );\" ><img id=\"CB_PicNotes\" title=\"" + CB_ImgNotes + "\" src=\"" + CB_PicDir + CB_PictureNotes + "\" alt=\"\" /></a>";
+
+ // ENABLE NOTES DISPLAY DURING SLIDESHOW (Remove the comment on the following line)
+ // Tip(decode_htmlspecialchars(notey1), CENTERWINDOW, true, DELAY, 0, TEXTALIGN, CB_Alignm, WIDTH, CB_ImgWidth-30, BGCOLOR, '#fffbcc', BALLOON, true, BALLOONSTEMWIDTH, 0, ABOVE, true, BORDERCOLOR, '', TITLEBGCOLOR, '', CLOSEBTNTEXT, 'X', CLOSEBTN, false, CLOSEBTNCOLORS, ['#ff0000', '#ffffff', '#ffffff', '#ff0000'], OFFSETY, -10-((DocSizeY-BrSizeY)/2)+(CB_ImgHeight/2)-(spacer), OFFSETX, 0, STICKY, true, PADDING, 6, CLICKCLOSE, true );
+
+ }
+ } else {
+ if (CB_ShowImgURL == "be") {
+ CB_Txt.innerHTML = CB_Gallery[CB_ActImgId][0].split("/")[CB_Gallery[CB_ActImgId][0].split("/").length - 1];
+ var notey2 = CB_Gallery[CB_ActImgId][5];
+ if (notey2 != "&lt;br /&gt;" && notey2 ) {
+ // alert(notey2);
+ var brs = countOccurrencesOf(notey2, "&lt;br /&gt;");
+ var spacer=7;
+ if (brs==1) {spacer=spacer+0;}
+ if (brs==2) {spacer=spacer+5;}
+ if (brs==3) {spacer=spacer+10;}
+ if (brs==4) {spacer=spacer+17;}
+ if (brs==5) {spacer=spacer+20;}
+ if (brs==6) {spacer=spacer+27;}
+ if (brs==7) {spacer=spacer+35;}
+ if (brs==8) {spacer=spacer+45;}
+ if (brs==9) {spacer=spacer+55;}
+ if (brs==10) {spacer=spacer+65;}
+ // alert(brs + " - " + spacer);
+ CB_Txt3.innerHTML = "<a href=\"JavaScript:void(0);\" onclick=\"TipTog('<font color=#008800><b>" + CB_ImgNotes2 + ":</b></font><br />" + notey2 + "', CENTERWINDOW, true, DELAY, 0, TEXTALIGN, '" + CB_Alignm + "', WIDTH, "+CB_ImgWidth+"-30, BGCOLOR, '#fffbcc', BALLOON, true , BALLOONSTEMWIDTH, 0, ABOVE, true, BORDERCOLOR, '', TITLEBGCOLOR, '', CLOSEBTNTEXT, 'X', CLOSEBTN, false, CLOSEBTNCOLORS, ['#ff0000', '#ffffff', '#ffffff', '#ff0000'], OFFSETY, 150-" + ((DocSizeY-BrSizeY)/2) + ", OFFSETX, 0, STICKY, true, PADDING, 6, CLICKCLOSE, true );\" ></a>";
+ CB_Txt3a.innerHTML = "<a href=\"JavaScript:void(0);\" onclick=\"TipTog('<font color=#008800><b>" + CB_ImgNotes2 + ":</b></font><br />" + notey2 + "', CENTERWINDOW, true, DELAY, 0, TEXTALIGN, '" + CB_Alignm + "', WIDTH, "+CB_ImgWidth+"-30, BGCOLOR, '#fffbcc', BALLOON, true, BALLOONSTEMWIDTH, 0, ABOVE, true, BORDERCOLOR, '', TITLEBGCOLOR, '', CLOSEBTNTEXT, 'X', CLOSEBTN, false, CLOSEBTNCOLORS, ['#ff0000', '#ffffff', '#ffffff', '#ff0000'], OFFSETY, -10-" + ((DocSizeY-BrSizeY)/2) + "+" +(CB_ImgHeight/2)+ "-" +(spacer)+ ", OFFSETX, 0, STICKY, true, PADDING, 6, CLICKCLOSE, true );\" ><img id=\"CB_PicNotes\" title=\"" + CB_ImgNotes + "\" src=\"" + CB_PicDir + CB_PictureNotes + "\" alt=\"\" /></a>";
+ }
+ }
+ }
+ if (CB_ImgNum == "be" && CB_Gallery.length > 2) {
+ CB_Txt.innerHTML += " " + CB_ImgNumBracket.substring(0, 1) + CB_ActImgId + "/" + (CB_Gallery.length - 1) + CB_ImgNumBracket.substring(1, 2);
+ }
+
+ CB_PrevNext();
+
+ CB_Txt.style.visibility = "visible";
+ CB_Txt3.style.visibility= "visible";
+ CB_Txt3a.style.visibility= "visible";
+ if (CB_Gallery.length > 0) {
+ CB_ImgWidthOld = CB_ImgWidth;
+ CB_ImgHeightOld = CB_ImgHeight;
+ }
+ if (CB_Gallery.length > 2) {
+ if (CB_SS == "pause") {
+ CB_SlideP.style.display = "block";
+ CB_SlideB.style.display = "block";
+ if (slideshowMusic == null) {
+ CB_Speak.style.display = "none";
+ }else{
+ CB_Speak.style.display = "block";
+ }
+ CB_SlideShow();
+ } else {
+ CB_SlideS.style.display = "block";
+ if (soond==null && CB_SS == "start") {
+ CB_Speak.style.display = "none";
+ }else{
+ CB_Speak.style.display = "block";
+ }
+ }
+ } else {
+ CB_SS = "start";
+ }
+ CB_ClearBox = "be";
+ CB_IsAnimating = 0;
+ if (CB_Gallery.length > 2) {
+ CB_ShTh.style.visibility = "visible";
+ CB_ImgHd.style.width = CB_ImgWidth + 2 + "px";
+ CB_ImgHd.style.height = CB_ImgHeight + 2 + "px";
+ CB_Thm.style.width = CB_ImgWidth + 2 + "px";
+
+ var a = "";
+ var b = 5;
+ CB_AllThumbsWidth = 0;
+ for (i = 1; i < CB_Gallery.length; i++) {
+ CB_preThumbs = new Image;
+ CB_preThumbs.src = CB_Gallery[i][2];
+ CB_AllThumbsWidth += Math.round(CB_preThumbs.width / CB_preThumbs.height * 50);
+ }
+ CB_AllThumbsWidth += (CB_Gallery.length - 2) * b;
+
+ var c = 0;
+ for (i = 1; i < CB_Gallery.length; i++) {
+ CB_preThumbs = new Image;
+ CB_preThumbs.src = CB_Gallery[i][2];
+ a += "<a href=\"javascript:void(0)\" onclick=\"if (CB_SSTimer){CB_SlideShowJump();}CB_LoadImage(" + i + ")\"><img style=\"border: 0; left: " + c + "px;\" \" src=\"" + CB_Gallery[i][2] + "\" height=\"50\" class=\"CB_ThumbsImg\" alt=\"\" /></a>";
+ c += Math.round(CB_preThumbs.width / CB_preThumbs.height * 50) + b;
+ }
+ CB_Thm2.style.width = CB_AllThumbsWidth + "px";
+ CB_Thm2.innerHTML = a;
+ CB_Thm2.style.marginLeft = (CB_ImgWidth - CB_AllThumbsWidth) / 2 + "px";
+ }
+
+// var MID = splitURLTitle[0]
+ var MID = CB_Gallery[CB_ActImgId][3];
+ var GEDCOM = CB_Gallery[CB_ActImgId][4];
+// CB_Txt2.onclick = function () { window.open('mediaviewer.php?filename='+MID+'&ged='+GEDCOM+'', "win01", " resizable=1, scrollbars=1, top=50, HEIGHT=800, WIDTH=1100 "); };
+ if (MID != "") {
+ CB_Txt2.onclick = function () { window.location.href = 'mediaviewer.php?mid='+MID+'&ged='+GEDCOM; return false; };
+ CB_Txt2a.onclick = function () { window.location.href = 'mediaviewer.php?mid='+MID+'&ged='+GEDCOM; return false; };
+ //CB_Txt3.onclick = function () { alert(CB_Gallery[CB_ActImgId][5]); };
+
+ }else{
+ CB_Txt2.onclick = function () { CB_Close(); };
+ CB_Txt2a.onclick = function () { CB_Close(); };
+ }
+
+ return true;
+ }
+
+
+
+ function CB_ShowThumbs() {
+ CB_ImgHd.style.visibility = "visible";
+ CB_Thm.style.display = "block";
+ return;
+ }
+
+ function CB_HideThumbs() {
+ CB_ImgHd.style.visibility = "hidden";
+ CB_Thm.style.display = "none";
+ return;
+ }
+
+ function getMouseXY(e) {
+ if (CB_AllThumbsWidth > CB_ImgWidth) {
+ if (IE) {
+ tempX = event.clientX;
+ } else {
+ tempX = e.pageX;
+ }
+ if (tempX < 0) {
+ tempX = 0;
+ }
+ CB_Thm2.style.marginLeft = ((BrSizeX - CB_ImgWidth) / 2 - tempX) / (CB_ImgWidth / (CB_AllThumbsWidth - CB_ImgWidth)) + "px";
+ }
+ }
+
+ function CB_FullSize() {
+ setZoom();
+ CB_Img.style.width = CB_ImgWidthOrig + "px";
+ CB_Img.style.height = CB_ImgHeightOrig + "px";
+ CB_ImgCont.style.height = CB_ImgHeightOrig + 2 * CB_ImgBorder + "px";
+ CB_ZoomS.style.display = "none";
+ CB_ZoomP.style.display = "block";
+// CB_Speak.style.display = "block";
+ }
+
+ function CB_SlideShowStop() {
+ CB_SS = "start";
+ CB_SlideShowJump();
+ }
+
+ function CB_SlideShowJump() {
+ if (CB_SSTimer) {
+ clearTimeout(CB_SSTimer);
+ }
+ CB_jj = 0;
+ CB_SlideBW = 0;
+ CB_SlideB.style.display = "none";
+ }
+
+ function CB_SlideShow() {
+ if (CB_SlShowTimer > CB_jj) {
+ CB_SSTimer = setTimeout("CB_SlideShow()", 25);
+ CB_jj += 25;
+//BH ----- Changed slide show progress bar width as controls are now at bottom ---------------------
+//BH CB_SlideBW += (CB_ImgWidth - 44) / (CB_SlShowTimer / 25);
+ CB_SlideBW += (CB_ImgWidth - 4) / (CB_SlShowTimer / 25);
+
+ CB_SlideB.style.width = CB_SlideBW + "px";
+ } else {
+ clearTimeout(CB_SSTimer);
+ CB_SlideBW = 0;
+ CB_SlideB.style.width = CB_SlideBW + "px";
+ if (CB_ActImgId == CB_Gallery.length - 1) {
+ CB_LoadImage(1);
+ } else {
+ CB_LoadImage(CB_ActImgId + 1);
+ }
+ return;
+ }
+ }
+
+ function CB_FitToBrowser() {
+ if (CB_ImgWidth > BrSizeX - 2 * (CB_RoundPix + CB_ImgBorder + CB_Padd + CB_WinPadd)) {
+ CB_ImgWidth = BrSizeX - 2 * (CB_RoundPix + CB_ImgBorder + CB_Padd + CB_WinPadd);
+ CB_ImgHeight = Math.round(CB_ImgWidth / CB_ImgRate);
+ }
+ if (CB_ImgHeight > BrSizeY - 2 * (CB_RoundPix + CB_ImgBorder + CB_Padd + CB_WinPadd) - 3*CB_TextH) {
+ CB_ImgHeight = BrSizeY - 2 * (CB_RoundPix + CB_ImgBorder + CB_Padd + CB_WinPadd) - 3*CB_TextH;
+ CB_ImgWidth = Math.round(CB_ImgRate * CB_ImgHeight);
+ }
+ return;
+ }
+
+ function CB_SetMargins() {
+ CB_MarginL = parseInt(DocScrX - (CB_ImgWidth + 2 * (CB_RoundPix + CB_ImgBorder + CB_Padd)) / 2);
+ CB_MarginT = parseInt(DocScrY - (CB_ieRPBug + CB_ImgHeight + CB_TextH + 2 * (CB_RoundPix + CB_ImgBorder + CB_Padd)) / 2);
+ CB_Win.style.marginLeft = CB_MarginL + "px";
+ CB_Win.style.marginTop = CB_MarginT - FF_ScrollbarBug / 2 + "px";
+ return;
+ }
+
+ function CB_PrevNext() {
+ if (CB_ActImgId > 1) {
+ if (CB_Preload == "be") {
+ PreloadPrv = new Image;
+ PreloadPrv.src = CB_Gallery[CB_ActImgId - 1][0];
+ }
+ if (CB_TextNav == "be") {
+ var a = CB_Txt.innerHTML;
+ CB_Txt.innerHTML = "<a class=\"CB_TextNav\" href=\"javascript:void(0)\" onclick=\"if (CB_SSTimer){CB_SlideShowJump();}CB_LoadImage(" + (CB_ActImgId - 1) + ")\" alt=\"&lt;\">" + CB_NavTextPrv + "</a> " + a;
+ }
+ CB_Prv.style.display = "block";
+ if (slideshowMusic == null) {
+ CB_Speak.style.display = "none";
+ }else{
+ CB_Speak.style.display = "block";
+ }
+ CB_Prv.onclick = function () {
+ if (CB_SSTimer) {
+ CB_SlideShowJump();
+ } CB_LoadImage(CB_ActImgId - 1);
+ return false;
+ };
+ }
+ if (CB_ActImgId < CB_Gallery.length - 1) {
+ if (CB_Preload == "be") {
+ PreloadNxt = new Image;
+ PreloadNxt.src = CB_Gallery[CB_ActImgId + 1][0];
+ }
+ if (CB_TextNav == "be") {
+ CB_Txt.innerHTML += " <a class=\"CB_TextNav\" href=\"javascript:void(0)\" onclick=\"if (CB_SSTimer){CB_SlideShowJump();}CB_LoadImage(" + (CB_ActImgId + 1) + ")\" alt=\"&gt;\">" + CB_NavTextNxt + "</a>";
+ }
+ CB_Nxt.style.display = "block";
+ CB_Nxt.onclick = function () {
+ if (CB_SSTimer) {
+ CB_SlideShowJump();
+ } CB_LoadImage(CB_ActImgId + 1);
+ return false;
+ };
+ }
+ if (CB_ActImgId == 1 && CB_SS == "start" && soond=="playing" ) {
+ if (slideshowMusic == null) {
+ CB_Speak.style.display = "none";
+ }else{
+ CB_Speak.style.display = "block";
+ }
+ }
+ return;
+ }
+
+ function CB_Close() {
+ CB_Win.style.left = "50%";
+ CB_Win.style.top = "50%";
+ CB_ImgHd.style.width = "0px";
+ CB_ImgHd.style.height = "0px";
+ CB_ImgHd.style.visibility = "hidden";
+ CB_ShTh.style.visibility = "hidden";
+ CB_SlideShowStop();
+ CB_Txt.style.visibility = "hidden";
+ CB_Txt3.style.visibility = "hidden";
+ CB_Txt3a.style.visibility = "hidden";
+ CB_Txt4.style.visibility = "hidden";
+ CB_Txt.innerHTML = "";
+ CB_Txt3.innerHTML = "";
+ CB_Txt3a.innerHTML = "";
+ CB_Txt4.innerHTML = "";
+ CB_Img.src = "";
+ CB_ImgWidth = CB_WinBaseW;
+ CB_ImgHeight = CB_WinBaseH - CB_TextH;
+ CB_ImgCont.style.height = CB_ImgHeight + 2 * CB_ImgBorder + "px";
+ CB_Img.style.display = "none";
+ CB_Win.style.visibility = "hidden";
+ CB_HideContent.onclick = "";
+ CB_iFr.src = "";
+ CB_iFr.style.top = "0px";
+ CB_iFr.style.left = "0px";
+ CB_iFr.style.width = "0px";
+ CB_iFr.style.height = "0px";
+ CB_ShowDocument();
+ if (slideshowMusic == null) {
+ //do nothing
+ }else{
+ player.onStopButtonClick();
+ }
+
+ soond=null;
+// closeZoom();
+ zoomSet=0;
+ return;
+ }
+
+ function CB_ShowDocument() {
+ if (CB_Hide > 0) {
+ CB_HideContent.style.opacity = CB_Hide / 100;
+ CB_HideContent.style.filter = "alpha(opacity=" + CB_Hide + ")";
+ CB_Hide -= CB_OpacityStep;
+ CB_Blur = setTimeout("CB_ShowDocument()", 5);
+ } else {
+ CB_HideContent.style.visibility = "hidden";
+ CB_HideContent.style.width = "0px";
+ CB_HideContent.style.height = "0px";
+ if (CB_HideOpacity != 0) {
+ clearTimeout(CB_Blur);
+ }
+ CB_ClearBox = "ki";
+ return;
+ }
+ }
+
+ function getDocumentSize() {
+ this.DocSizeX = 0;
+ this.DocSizeY = 0;
+ if (window.innerWidth && window.scrollMaxX) {
+ DocSizeX = window.innerWidth + window.scrollMaxX;
+ DocSizeY = window.innerHeight + window.scrollMaxY;
+ } else if (document.body.scrollWidth > document.body.offsetWidth) {
+ DocSizeX = document.body.scrollWidth;
+ DocSizeY = document.body.scrollHeight;
+ } else {
+ DocSizeX = document.body.offsetWidth;
+ DocSizeY = document.body.offsetHeight;
+ }
+ if (navigator.userAgent.indexOf("MSIE") != -1 ||
+ navigator.userAgent.indexOf("Opera") != -1) {
+ DocSizeX = document.body.scrollWidth;
+ DocSizeY = document.body.scrollHeight;
+ }
+ if (navigator.userAgent.indexOf("Firefox") != -1 ||
+ navigator.userAgent.indexOf("Netscape") != -1) {
+ DocSizeX = BrSizeX + window.scrollMaxX;
+ DocSizeY = BrSizeY + window.scrollMaxY;
+ }
+ return;
+ }
+
+ function getBrowserSize() {
+ this.BrSizeX = 0;
+ this.BrSizeY = 0;
+ if (document.documentElement &&
+ (document.documentElement.clientWidth ||
+ document.documentElement.clientHeight)) {
+ BrSizeX = document.documentElement.clientWidth;
+ BrSizeY = document.documentElement.clientHeight;
+ } else if (typeof window.innerWidth == "number") {
+ BrSizeX = window.innerWidth;
+ BrSizeY = window.innerHeight;
+ } else if (document.body &&
+ (document.body.clientWidth || document.body.clientHeight)) {
+ BrSizeX = document.body.clientWidth;
+ BrSizeY = document.body.clientHeight;
+ return;
+ }
+ if (navigator.userAgent.indexOf("Opera") != -1) {
+ BrSizeX = document.documentElement.clientWidth;
+ BrSizeY = window.innerHeight;
+ }
+ if (document.compatMode != undefined) {
+ if (document.compatMode.match("Back") &&
+ navigator.userAgent.indexOf("Firefox") != -1) {
+ BrSizeY = document.body.clientHeight;
+ }
+ }
+ return;
+ }
+
+ function getScrollPosition() {
+ this.DocScrX = 0;
+ this.DocScrY = 0;
+ if (typeof window.pageYOffset == "number") {
+ DocScrY = window.pageYOffset;
+ DocScrX = window.pageXOffset;
+ } else if (document.body &&
+ (document.body.scrollLeft || document.body.scrollTop)) {
+ DocScrY = document.body.scrollTop;
+ DocScrX = document.body.scrollLeft;
+ } else if (document.documentElement &&
+ (document.documentElement.scrollLeft ||
+ document.documentElement.scrollTop)) {
+ DocScrY = document.documentElement.scrollTop;
+ DocScrX = document.documentElement.scrollLeft;
+ }
+ return;
+ }
+
+ function CB_pngFixIE() {
+ var s, i, j;
+ var a = new Array;
+ a.push(document.getElementById("CB_CloseWindow"));
+ a.push(document.getElementById("CB_SlideShowS"));
+ a.push(document.getElementById("CB_SlideShowP"));
+ for (i = 0; i < a.length; i++) {
+ s = a[i].getAttribute("src");
+ if (s.toLowerCase().indexOf(".png") != -1) {
+ a[i].src = CB_PicDir + "blank.gif";
+ a[i].style.filter += "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + s + "', sizingMethod=image);";
+ }
+ }
+ for (i = 0; i < document.styleSheets.length; i++) {
+ if (document.styleSheets[i].href.match("clearbox.css")) {
+ var b = document.styleSheets[i].href.lastIndexOf("/");
+ var c = b != -1 ? document.styleSheets[i].href.substring(0, b + 1) : "";
+ for (j = 0; j < document.styleSheets[i].rules.length; j++) {
+ var d = document.styleSheets[i].rules[j].style;
+ if (d.backgroundImage.toLowerCase().indexOf(".png") != -1) {
+ var e = d.backgroundImage.substring(4, d.backgroundImage.length - 1);
+ if (e.indexOf("http://") != 0 &&
+ e.indexOf("/") != 0) {
+ e = c + e;
+ d.backgroundImage = "none";
+ d.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + e + "', sizingMethod='crop');";
+ }
+ }
+ }
+ }
+ }
+ }
+
+
+// ---------------------------------------------------
+
+function showFlash(){
+ var flashObjects = document.getElementsByTagName("object");
+ for (i = 0; i < flashObjects.length; i++) {
+ flashObjects[i].style.visibility = "visible";
+ }
+
+ var flashEmbeds = document.getElementsByTagName("embed");
+ for (i = 0; i < flashEmbeds.length; i++) {
+ flashEmbeds[i].style.visibility = "visible";
+ }
+}
+
+// ---------------------------------------------------
+
+
+function hideFlash(){
+ var flashObjects = document.getElementsByTagName("object");
+ for (i = 0; i < flashObjects.length; i++) {
+ flashObjects[i].style.visibility = "hidden";
+ }
+
+ var flashEmbeds = document.getElementsByTagName("embed");
+ for (i = 0; i < flashEmbeds.length; i++) {
+ flashEmbeds[i].style.visibility = "hidden";
+ }
+}
+
+
+/*------------------------------Drag and Drop - quirksmode----------------------------------------------*/
+
+dragDrop = {
+ keyHTML: '<a href="#" class="keyLink">#</a>',
+ keySpeed: 10, // pixels per keypress event
+ initialMouseX: undefined,
+ initialMouseY: undefined,
+ startX: undefined,
+ startY: undefined,
+ dXKeys: undefined,
+ dYKeys: undefined,
+ draggedObject: undefined,
+
+ initElement: function (element) {
+/*
+ if (typeof element == 'string')
+ element = document.getElementById(element);
+ element = document.getElementById(element);
+*/
+ if (CB_ZoomP.style.display == "block") {
+ element.onmousedown = dragDrop.startDragMouse;
+ }
+/*
+ element.innerHTML += dragDrop.keyHTML;
+ var links = element.getElementsByTagName('a');
+ var lastLink = links[links.length-1];
+ lastLink.relatedElement = element;
+ lastLink.onclick = dragDrop.startDragKeys;
+*/
+ },
+
+ startDragMouse: function (e) {
+ dragDrop.startDrag(CB_Win);
+ var evt = e || window.event;
+ dragDrop.initialMouseX = evt.clientX;
+ dragDrop.initialMouseY = evt.clientY;
+ addEventSimple(document,'mousemove',dragDrop.dragMouse);
+ addEventSimple(document,'mouseup',dragDrop.releaseElement);
+ return false;
+ },
+
+ startDragKeys: function () {
+ dragDrop.startDrag(this.relatedElement);
+ dragDrop.dXKeys = dragDrop.dYKeys = 0;
+ addEventSimple(document,'keydown',dragDrop.dragKeys);
+ addEventSimple(document,'keypress',dragDrop.switchKeyEvents);
+ this.blur();
+ return false;
+ },
+
+ startDrag: function (obj) {
+ if (dragDrop.draggedObject)
+ dragDrop.releaseElement();
+ if (IE){
+ dragDrop.startX = (obj.offsetLeft+(CB_ImgWidthOld + 2 * (CB_RoundPix + CB_ImgBorder + CB_Padd)) / 2);
+ dragDrop.startY = ((obj.offsetTop-document.documentElement.scrollTop)+(CB_ieRPBug + CB_ImgHeightOld + CB_TextH + 2 * (CB_RoundPix + CB_ImgBorder + CB_Padd)) / 2);
+ }else{
+ // dragDrop.startX = (obj.offsetLeft)+CB_ieRPBug ;
+ // dragDrop.startY = (obj.offsetTop)+CB_ieRPBug ;
+ dragDrop.startX = (obj.offsetLeft+(CB_ImgWidthOld + 2 * (CB_RoundPix + CB_ImgBorder + CB_Padd)) / 2);
+ dragDrop.startY = ((obj.offsetTop-document.documentElement.scrollTop)+(CB_ieRPBug + CB_ImgHeightOld + CB_TextH + 2 * (CB_RoundPix + CB_ImgBorder + CB_Padd)) / 2);
+
+ }
+ dragDrop.draggedObject = obj;
+ obj.className += ' dragged';
+ },
+
+ dragMouse: function (e) {
+ var evt = e || window.event;
+ var dX = evt.clientX - dragDrop.initialMouseX;
+ var dY = evt.clientY - dragDrop.initialMouseY;
+ dragDrop.setPosition(dX,dY);
+ return false;
+ },
+
+ dragKeys: function(e) {
+ var evt = e || window.event;
+ var key = evt.keyCode;
+ switch (key) {
+ case 37: // left
+ case 63234:
+ dragDrop.dXKeys -= dragDrop.keySpeed;
+ break;
+
+ case 38: // up
+ case 63232:
+ dragDrop.dYKeys -= dragDrop.keySpeed;
+ break;
+
+ case 39: // right
+ case 63235:
+ dragDrop.dXKeys += dragDrop.keySpeed;
+ break;
+
+ case 40: // down
+ case 63233:
+ dragDrop.dYKeys += dragDrop.keySpeed;
+ break;
+
+ case 13: // enter
+ case 27: // escape
+ dragDrop.releaseElement();
+ return false;
+
+ default:
+ return true;
+ }
+
+ dragDrop.setPosition(dragDrop.dXKeys,dragDrop.dYKeys);
+ if (evt.preventDefault) // also solves problem in Saf; keypress part of default ???
+ evt.preventDefault();
+ return false;
+ },
+
+ setPosition: function (dx,dy) {
+ dragDrop.draggedObject.style.left = dragDrop.startX + dx + 'px';
+ dragDrop.draggedObject.style.top = dragDrop.startY + dy + 'px';
+ },
+
+ switchKeyEvents: function () {
+ // for Opera and Safari 1.3
+ removeEventSimple(document,'keydown',dragDrop.dragKeys);
+ removeEventSimple(document,'keypress',dragDrop.switchKeyEvents);
+ addEventSimple(document,'keypress',dragDrop.dragKeys);
+
+ },
+
+
+ releaseElement: function() {
+ removeEventSimple(document,'mousemove',dragDrop.dragMouse);
+ removeEventSimple(document,'mouseup',dragDrop.releaseElement);
+ removeEventSimple(document,'keypress',dragDrop.dragKeys);
+ removeEventSimple(document,'keypress',dragDrop.switchKeyEvents);
+ removeEventSimple(document,'keydown',dragDrop.dragKeys);
+ dragDrop.draggedObject.className = dragDrop.draggedObject.className.replace(/dragged/,'');
+ dragDrop.draggedObject = null;
+ }
+}
+
+
+function addEventSimple(obj,evt,fn) {
+ if (obj.addEventListener)
+ obj.addEventListener(evt,fn,false);
+ else if (obj.attachEvent)
+ obj.attachEvent('on'+evt,fn);
+}
+
+function removeEventSimple(obj,evt,fn) {
+ if (obj.removeEventListener)
+ obj.removeEventListener(evt,fn,false);
+ else if (obj.detachEvent)
+ obj.detachEvent('on'+evt,fn);
+}
+
+// --------------------------------------------------------------------------------------
diff --git a/modules_v3/lightbox/js/swfobject.js b/modules_v3/lightbox/js/swfobject.js
new file mode 100644
index 0000000000..083b9b1a06
--- /dev/null
+++ b/modules_v3/lightbox/js/swfobject.js
@@ -0,0 +1,145 @@
+/**
+ * SWFObject v1.4.3: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
+ *
+ * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
+ * legal reasons.
+ */
+if(typeof deconcept=="undefined"){var deconcept=new Object();}
+if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
+if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
+deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){
+if(!document.getElementById){return;}
+this.DETECT_KEY=_b?_b:"detectflash";
+this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
+this.params=new Object();
+this.variables=new Object();
+this.attributes=new Array();
+if(_1){this.setAttribute("swf",_1);}
+if(id){this.setAttribute("id",id);}
+if(w){this.setAttribute("width",w);}
+if(h){this.setAttribute("height",h);}
+if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
+this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();
+if(c){this.addParam("bgcolor",c);}
+var q=_8?_8:"high";
+this.addParam("quality",q);
+this.setAttribute("useExpressInstall",_7);
+this.setAttribute("doExpressInstall",false);
+var _d=(_9)?_9:window.location;
+this.setAttribute("xiRedirectUrl",_d);
+this.setAttribute("redirectUrl","");
+if(_a){this.setAttribute("redirectUrl",_a);}};
+deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
+this.attributes[_e]=_f;
+},getAttribute:function(_10){
+return this.attributes[_10];
+},addParam:function(_11,_12){
+this.params[_11]=_12;
+},getParams:function(){
+return this.params;
+},addVariable:function(_13,_14){
+this.variables[_13]=_14;
+},getVariable:function(_15){
+return this.variables[_15];
+},getVariables:function(){
+return this.variables;
+},getVariablePairs:function(){
+var _16=new Array();
+var key;
+var _18=this.getVariables();
+for(key in _18){_16.push(key+"="+_18[key]);}
+return _16;
+},getSWFHTML:function(){
+var _19="";
+if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
+if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");}
+_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
+_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
+var _1a=this.getParams();
+for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
+var _1c=this.getVariablePairs().join("&");
+if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}
+_19+="/>";
+}else{
+if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
+_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
+_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
+var _1d=this.getParams();
+for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
+var _1f=this.getVariablePairs().join("&");
+if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}
+_19+="</object>";}
+return _19;
+},write:function(_20){
+if(this.getAttribute("useExpressInstall")){
+var _21=new deconcept.PlayerVersion([6,0,65]);
+if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
+this.setAttribute("doExpressInstall",true);
+this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
+document.title=document.title.slice(0,47)+" - Flash Player Installation";
+this.addVariable("MMdoctitle",document.title);}}
+if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
+var n=(typeof _20=="string")?document.getElementById(_20):_20;
+n.innerHTML=this.getSWFHTML();
+return true;
+}else{
+if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
+return false;}};
+deconcept.SWFObjectUtil.getPlayerVersion=function(){
+var _23=new deconcept.PlayerVersion([0,0,0]);
+if(navigator.plugins&&navigator.mimeTypes.length){
+var x=navigator.plugins["Shockwave Flash"];
+if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
+}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}
+catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
+_23=new deconcept.PlayerVersion([6,0,21]);
+axo.AllowScriptAccess="always";
+}catch(e){
+if(_23.major==6){return _23;}}
+try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}
+catch(e){}}
+if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}
+return _23;};
+deconcept.PlayerVersion=function(_27){
+this.major=_27[0]!=null?parseInt(_27[0]):0;
+this.minor=_27[1]!=null?parseInt(_27[1]):0;
+this.rev=_27[2]!=null?parseInt(_27[2]):0;
+};
+deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
+if(this.major<fv.major){return false;}
+if(this.major>fv.major){return true;}
+if(this.minor<fv.minor){return false;}
+if(this.minor>fv.minor){return true;}
+if(this.rev<fv.rev){return false;}return true;};
+deconcept.util={getRequestParameter:function(_29){
+var q=document.location.search||document.location.hash;
+if(q){var _2b=q.substring(1).split("&");
+for(var i=0;i<_2b.length;i++){
+if(_2b[i].substring(0,_2b[i].indexOf("="))==_29){
+return _2b[i].substring((_2b[i].indexOf("=")+1));}}}
+return "";}};
+deconcept.SWFObjectUtil.cleanupSWFs=function(){
+var _2d=document.getElementsByTagName("OBJECT");
+if(_2d.length>0){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};}
+for(var i=0;i<_2d.length;i++){
+_2d[i].style.display="none";
+for(var x in _2d[i]){
+if(typeof _2d[i][x]=="function"){_2d[i][x]=function(){};}}}};
+if(typeof window.onbeforeunload=="function"){
+var oldBeforeUnload=window.onbeforeunload;
+window.onbeforeunload=function(){
+deconcept.SWFObjectUtil.cleanupSWFs();
+oldBeforeUnload();};
+}else{window.onbeforeunload=deconcept.SWFObjectUtil.cleanupSWFs;}
+if(Array.prototype.push==null){
+Array.prototype.push=function(_30){
+this[this.length]=_30;
+return this.length;};}
+
+var getQueryParamValue=deconcept.util.getRequestParameter;
+var FlashObject=deconcept.SWFObject;
+var SWFObject=deconcept.SWFObject;
+
diff --git a/modules_v3/lightbox/js/tip_balloon.js b/modules_v3/lightbox/js/tip_balloon.js
new file mode 100644
index 0000000000..0b0e476930
--- /dev/null
+++ b/modules_v3/lightbox/js/tip_balloon.js
@@ -0,0 +1,231 @@
+/*
+tip_balloon.js v. 1.51
+
+The latest version is available at
+http://www.walterzorn.com
+or http://www.devira.com
+or http://www.walterzorn.de
+
+Initial author: Walter Zorn
+Last modified: 3.6.2008
+
+Extension for the tooltip library wz_tooltip.js.
+Implements balloon tooltips.
+*/
+
+// Make sure that the core file wz_tooltip.js is included first
+if(typeof config == "undefined")
+ alert("Error:\nThe core tooltip script file 'wz_tooltip.js' must be included first, before the plugin files!");
+
+// Here we define new global configuration variable(s) (as members of the
+// predefined "config." class).
+// From each of these config variables, wz_tooltip.js will automatically derive
+// a command which can be passed to Tip() or TagToTip() in order to customize
+// tooltips individually. These command names are just the config variable
+// name(s) translated to uppercase,
+// e.g. from config. Balloon a command BALLOON will automatically be
+// created.
+
+//=================== GLOBAL TOOPTIP CONFIGURATION =========================//
+
+config. Balloon = false // true or false - set to true if you want this to be the default behaviour
+config. BalloonImgPath = WT_MODULES_DIR+"lightbox/js/tip_balloon/" // Path to images (border, corners, stem), in quotes. Path must be relative to your HTML file.
+
+// Sizes of balloon images
+config. BalloonEdgeSize = 6 // Integer - sidelength of quadratic corner images
+config. BalloonStemWidth = 15 // Integer
+config. BalloonStemHeight = 19 // Integer
+config. BalloonStemOffset = -7 // Integer - horizontal offset of left stem edge from mouse (recommended: -stemwidth/2 to center the stem above the mouse)
+
+//======= END OF TOOLTIP CONFIG, DO NOT CHANGE ANYTHING BELOW ==============//
+
+
+
+
+
+// Create a new tt_Extension object (make sure that the name of that object,
+// here balloon, is unique amongst the extensions available for wz_tooltips.js):
+var balloon = new tt_Extension();
+
+// Implement extension eventhandlers on which our extension should react
+
+balloon.OnLoadConfig = function()
+{
+ if(tt_aV[BALLOON])
+ {
+ // Turn off native style properties which are not appropriate
+ balloon.padding = Math.max(tt_aV[PADDING] - tt_aV[BALLOONEDGESIZE], 0);
+ balloon.width = tt_aV[WIDTH];
+ //if(tt_bBoxOld)
+ // balloon.width += (balloon.padding << 1);
+ tt_aV[BORDERWIDTH] = 0;
+ tt_aV[WIDTH] = 0;
+ tt_aV[PADDING] = 0;
+ tt_aV[BGCOLOR] = "";
+ tt_aV[BGIMG] = "";
+ tt_aV[SHADOW] = false;
+ // Append slash to img path if missing
+ if(tt_aV[BALLOONIMGPATH].charAt(tt_aV[BALLOONIMGPATH].length - 1) != '/')
+ tt_aV[BALLOONIMGPATH] += "/";
+ return true;
+ }
+ return false;
+};
+
+balloon.OnCreateContentString = function()
+{
+ if(!tt_aV[BALLOON])
+ return false;
+
+ var aImg, sImgZ, sCssCrn, sVaT, sVaB, sCssImg;
+
+ // Cache balloon images in advance:
+ // Either use the pre-cached default images...
+ if(tt_aV[BALLOONIMGPATH] == config.BalloonImgPath)
+ aImg = balloon.aDefImg;
+ // ...or load images from different directory
+ else
+ aImg = Balloon_CacheImgs(tt_aV[BALLOONIMGPATH]);
+ sCssCrn = ' style="position:relative;width:' + tt_aV[BALLOONEDGESIZE] + 'px;padding:0px;margin:0px;overflow:hidden;line-height:0px;';
+ sVaT = 'vertical-align:top;" valign="top"';
+ sVaB = 'vertical-align:bottom;" valign="bottom"';
+ sCssImg = 'padding:0px;margin:0px;border:0px;';
+ sImgZ = '" style="' + sCssImg + '" />';
+
+ tt_sContent = '<table border="0" cellpadding="0" cellspacing="0" style="width:auto;padding:0px;margin:0px;left:0px;top:0px;"><tr>'
+ // Left-top corner
+ + '<td' + sCssCrn + sVaB + '>'
+ + '<img src="' + aImg[1].src + '" width="' + tt_aV[BALLOONEDGESIZE] + '" height="' + tt_aV[BALLOONEDGESIZE] + sImgZ
+ + '</td>'
+ // Top border
+ + '<td valign="bottom" style="position:relative;padding:0px;margin:0px;overflow:hidden;">'
+ + '<img id="bALlOOnT" style="position:relative;top:1px;z-index:1;display:none;' + sCssImg + '" src="' + aImg[9].src + '" width="' + tt_aV[BALLOONSTEMWIDTH] + '" height="' + tt_aV[BALLOONSTEMHEIGHT] + '" />'
+ + '<div style="position:relative;z-index:0;padding:0px;margin:0px;overflow:hidden;width:auto;height:' + tt_aV[BALLOONEDGESIZE] + 'px;background-image:url(' + aImg[2].src + ');">'
+ + '</div>'
+ + '</td>'
+ // Right-top corner
+ + '<td' + sCssCrn + sVaB + '>'
+ + '<img src="' + aImg[3].src + '" width="' + tt_aV[BALLOONEDGESIZE] + '" height="' + tt_aV[BALLOONEDGESIZE] + sImgZ
+ + '</td>'
+ + '</tr><tr>'
+ // Left border
+ + '<td style="position:relative;padding:0px;margin:0px;width:' + tt_aV[BALLOONEDGESIZE] + 'px;overflow:hidden;background-image:url(' + aImg[8].src + ');">'
+ // Redundant image for bugous old Geckos that won't auto-expand TD height to 100%
+ + '<img width="' + tt_aV[BALLOONEDGESIZE] + '" height="100%" src="' + aImg[8].src + sImgZ
+ + '</td>'
+ // Content
+ + '<td id="bALlO0nBdY" style="position:relative;line-height:normal;'
+ + ';background-image:url(' + aImg[0].src + ')'
+ + ';color:' + tt_aV[FONTCOLOR]
+ + ';font-family:' + tt_aV[FONTFACE]
+ + ';font-size:' + tt_aV[FONTSIZE]
+ + ';font-weight:' + tt_aV[FONTWEIGHT]
+ + ';text-align:' + tt_aV[TEXTALIGN]
+ + ';padding:' + balloon.padding + 'px'
+ + ';width:' + ((balloon.width > 0) ? (balloon.width + 'px') : 'auto')
+ + ';">' + tt_sContent + '</td>'
+ // Right border
+ + '<td style="position:relative;padding:0px;margin:0px;width:' + tt_aV[BALLOONEDGESIZE] + 'px;overflow:hidden;background-image:url(' + aImg[4].src + ');">'
+ // Image redundancy for bugous old Geckos that won't auto-expand TD height to 100%
+ + '<img width="' + tt_aV[BALLOONEDGESIZE] + '" height="100%" src="' + aImg[4].src + sImgZ
+ + '</td>'
+ + '</tr><tr>'
+ // Left-bottom corner
+ + '<td' + sCssCrn + sVaT + '>'
+ + '<img src="' + aImg[7].src + '" width="' + tt_aV[BALLOONEDGESIZE] + '" height="' + tt_aV[BALLOONEDGESIZE] + sImgZ
+ + '</td>'
+ // Bottom border
+ + '<td valign="top" style="position:relative;padding:0px;margin:0px;overflow:hidden;">'
+ + '<div style="position:relative;left:0px;top:0px;padding:0px;margin:0px;overflow:hidden;width:auto;height:' + tt_aV[BALLOONEDGESIZE] + 'px;background-image:url(' + aImg[6].src + ');"></div>'
+ + '<img id="bALlOOnB" style="position:relative;top:-1px;left:2px;z-index:1;display:none;' + sCssImg + '" src="' + aImg[10].src + '" width="' + tt_aV[BALLOONSTEMWIDTH] + '" height="' + tt_aV[BALLOONSTEMHEIGHT] + '" />'
+ + '</td>'
+ // Right-bottom corner
+ + '<td' + sCssCrn + sVaT + '>'
+ + '<img src="' + aImg[5].src + '" width="' + tt_aV[BALLOONEDGESIZE] + '" height="' + tt_aV[BALLOONEDGESIZE] + sImgZ
+ + '</td>'
+ + '</tr></table>';
+ return true;
+};
+
+balloon.OnSubDivsCreated = function()
+{
+ if(tt_aV[BALLOON])
+ {
+ balloon.iStem = tt_aV[ABOVE] * 1;
+ balloon.aStem = [tt_GetElt("bALlOOnT"), tt_GetElt("bALlOOnB")];
+ balloon.aStem[balloon.iStem].style.display = "inline";
+ if (balloon.width < -1)
+ Balloon_MaxW();
+ return true;
+ }
+ return false;
+};
+
+// Display the stem appropriately
+balloon.OnMoveAfter = function()
+{
+ if(tt_aV[BALLOON])
+ {
+ var iStem = (tt_aV[ABOVE] != tt_bJmpVert) * 1;
+
+ // Tooltip position vertically flipped?
+ if(iStem != balloon.iStem)
+ {
+ // Display opposite stem
+ balloon.aStem[balloon.iStem].style.display = "none";
+ balloon.aStem[iStem].style.display = "inline";
+ balloon.iStem = iStem;
+ }
+
+ balloon.aStem[iStem].style.left = Balloon_CalcStemX() + "px";
+ return true;
+ }
+ return false;
+};
+
+function Balloon_CalcStemX()
+{
+ var x = tt_musX - tt_x + tt_aV[BALLOONSTEMOFFSET] - tt_aV[BALLOONEDGESIZE];
+ return Math.max(Math.min(x, tt_w - tt_aV[BALLOONSTEMWIDTH] - (tt_aV[BALLOONEDGESIZE] << 1) - 2), 2);
+}
+
+function Balloon_CacheImgs(sPath)
+{
+ var asImg = ["background", "lt", "t", "rt", "r", "rb", "b", "lb", "l", "stemt", "stemb"],
+ n = asImg.length,
+ aImg = new Array(n),
+ img;
+
+ while(n)
+ {--n;
+ img = aImg[n] = new Image();
+ img.src = sPath + asImg[n] + ".gif"; // Change to ".png" if you want to use PNG images
+ }
+ return aImg;
+}
+
+function Balloon_MaxW()
+{
+ var bdy = tt_GetElt("bALlO0nBdY");
+
+ if (bdy)
+ {
+ var iAdd = tt_bBoxOld ? (balloon.padding << 1) : 0, w = tt_GetDivW(bdy);
+ if (w > -balloon.width + iAdd)
+ bdy.style.width = (-balloon.width + iAdd) + "px";
+ }
+}
+
+// This mechanism pre-caches the default images specified by
+// congif.BalloonImgPath, so, whenever a balloon tip using these default images
+// is created, no further server connection is necessary.
+function Balloon_PreCacheDefImgs()
+{
+ // Append slash to img path if missing
+ if(config.BalloonImgPath.charAt(config.BalloonImgPath.length - 1) != '/')
+ config.BalloonImgPath += "/";
+ // Preload default images into array
+ balloon.aDefImg = Balloon_CacheImgs(config.BalloonImgPath);
+}
+
+Balloon_PreCacheDefImgs();
diff --git a/modules_v3/lightbox/js/tip_balloon/b.gif b/modules_v3/lightbox/js/tip_balloon/b.gif
new file mode 100644
index 0000000000..ff0c04b250
--- /dev/null
+++ b/modules_v3/lightbox/js/tip_balloon/b.gif
Binary files differ
diff --git a/modules_v3/lightbox/js/tip_balloon/background.gif b/modules_v3/lightbox/js/tip_balloon/background.gif
new file mode 100644
index 0000000000..cb61e7ffab
--- /dev/null
+++ b/modules_v3/lightbox/js/tip_balloon/background.gif
Binary files differ
diff --git a/modules_v3/lightbox/js/tip_balloon/l.gif b/modules_v3/lightbox/js/tip_balloon/l.gif
new file mode 100644
index 0000000000..14a68d93d2
--- /dev/null
+++ b/modules_v3/lightbox/js/tip_balloon/l.gif
Binary files differ
diff --git a/modules_v3/lightbox/js/tip_balloon/lb.gif b/modules_v3/lightbox/js/tip_balloon/lb.gif
new file mode 100644
index 0000000000..713c3739a3
--- /dev/null
+++ b/modules_v3/lightbox/js/tip_balloon/lb.gif
Binary files differ
diff --git a/modules_v3/lightbox/js/tip_balloon/lt.gif b/modules_v3/lightbox/js/tip_balloon/lt.gif
new file mode 100644
index 0000000000..93c71f465e
--- /dev/null
+++ b/modules_v3/lightbox/js/tip_balloon/lt.gif
Binary files differ
diff --git a/modules_v3/lightbox/js/tip_balloon/r.gif b/modules_v3/lightbox/js/tip_balloon/r.gif
new file mode 100644
index 0000000000..be041ff92b
--- /dev/null
+++ b/modules_v3/lightbox/js/tip_balloon/r.gif
Binary files differ
diff --git a/modules_v3/lightbox/js/tip_balloon/rb.gif b/modules_v3/lightbox/js/tip_balloon/rb.gif
new file mode 100644
index 0000000000..70b6834efc
--- /dev/null
+++ b/modules_v3/lightbox/js/tip_balloon/rb.gif
Binary files differ
diff --git a/modules_v3/lightbox/js/tip_balloon/rt.gif b/modules_v3/lightbox/js/tip_balloon/rt.gif
new file mode 100644
index 0000000000..2752a0ccb5
--- /dev/null
+++ b/modules_v3/lightbox/js/tip_balloon/rt.gif
Binary files differ
diff --git a/modules_v3/lightbox/js/tip_balloon/stemb.gif b/modules_v3/lightbox/js/tip_balloon/stemb.gif
new file mode 100644
index 0000000000..92f2ad5153
--- /dev/null
+++ b/modules_v3/lightbox/js/tip_balloon/stemb.gif
Binary files differ
diff --git a/modules_v3/lightbox/js/tip_balloon/stemt.gif b/modules_v3/lightbox/js/tip_balloon/stemt.gif
new file mode 100644
index 0000000000..d259a4aec5
--- /dev/null
+++ b/modules_v3/lightbox/js/tip_balloon/stemt.gif
Binary files differ
diff --git a/modules_v3/lightbox/js/tip_balloon/t.gif b/modules_v3/lightbox/js/tip_balloon/t.gif
new file mode 100644
index 0000000000..6fec86f81a
--- /dev/null
+++ b/modules_v3/lightbox/js/tip_balloon/t.gif
Binary files differ
diff --git a/modules_v3/lightbox/js/tip_balloon_RTL.js b/modules_v3/lightbox/js/tip_balloon_RTL.js
new file mode 100644
index 0000000000..661d60fbf1
--- /dev/null
+++ b/modules_v3/lightbox/js/tip_balloon_RTL.js
@@ -0,0 +1,233 @@
+/*
+tip_balloon.js v. 1.51
+
+The latest version is available at
+http://www.walterzorn.com
+or http://www.devira.com
+or http://www.walterzorn.de
+
+Initial author: Walter Zorn
+Last modified: 3.6.2008
+
+Extension for the tooltip library wz_tooltip.js.
+Implements balloon tooltips.
+*/
+
+// Make sure that the core file wz_tooltip.js is included first
+if(typeof config == "undefined")
+ alert("Error:\nThe core tooltip script file 'wz_tooltip.js' must be included first, before the plugin files!");
+
+// Here we define new global configuration variable(s) (as members of the
+// predefined "config." class).
+// From each of these config variables, wz_tooltip.js will automatically derive
+// a command which can be passed to Tip() or TagToTip() in order to customize
+// tooltips individually. These command names are just the config variable
+// name(s) translated to uppercase,
+// e.g. from config. Balloon a command BALLOON will automatically be
+// created.
+
+//=================== GLOBAL TOOPTIP CONFIGURATION =========================//
+
+config. Balloon = false // true or false - set to true if you want this to be the default behaviour
+config. BalloonImgPath = WT_MODULES_DIR+"lightbox/js/tip_balloon/" // Path to images (border, corners, stem), in quotes. Path must be relative to your HTML file.
+
+// Sizes of balloon images
+config. BalloonEdgeSize = 6 // Integer - sidelength of quadratic corner images
+config. BalloonStemWidth = 15 // Integer
+config. BalloonStemHeight = 19 // Integer
+config. BalloonStemOffset = -7 // Integer - horizontal offset of left stem edge from mouse (recommended: -stemwidth/2 to center the stem above the mouse)
+
+//======= END OF TOOLTIP CONFIG, DO NOT CHANGE ANYTHING BELOW ==============//
+
+
+
+
+
+// Create a new tt_Extension object (make sure that the name of that object,
+// here balloon, is unique amongst the extensions available for wz_tooltips.js):
+var balloon = new tt_Extension();
+
+// Implement extension eventhandlers on which our extension should react
+
+balloon.OnLoadConfig = function()
+{
+ if(tt_aV[BALLOON])
+ {
+ // Turn off native style properties which are not appropriate
+ balloon.padding = Math.max(tt_aV[PADDING] - tt_aV[BALLOONEDGESIZE], 0);
+ balloon.width = tt_aV[WIDTH];
+ //if(tt_bBoxOld)
+ // balloon.width += (balloon.padding << 1);
+ tt_aV[BORDERWIDTH] = 0;
+ tt_aV[WIDTH] = 0;
+ tt_aV[PADDING] = 0;
+ tt_aV[BGCOLOR] = "";
+ tt_aV[BGIMG] = "";
+ tt_aV[SHADOW] = false;
+ // Append slash to img path if missing
+ if(tt_aV[BALLOONIMGPATH].charAt(tt_aV[BALLOONIMGPATH].length - 1) != '/')
+ tt_aV[BALLOONIMGPATH] += "/";
+ return true;
+ }
+ return false;
+};
+
+balloon.OnCreateContentString = function()
+{
+ if(!tt_aV[BALLOON])
+ return false;
+
+ var aImg, sImgZ, sCssCrn, sVaT, sVaB, sCssImg;
+
+ // Cache balloon images in advance:
+ // Either use the pre-cached default images...
+ if(tt_aV[BALLOONIMGPATH] == config.BalloonImgPath)
+ aImg = balloon.aDefImg;
+ // ...or load images from different directory
+ else
+ aImg = Balloon_CacheImgs(tt_aV[BALLOONIMGPATH]);
+ sCssCrn = ' style="position:relative;width:' + tt_aV[BALLOONEDGESIZE] + 'px;padding:0px;margin:0px;overflow:hidden;line-height:0px;';
+ sVaT = 'vertical-align:top;" valign="top"';
+ sVaB = 'vertical-align:bottom;" valign="bottom"';
+ sCssImg = 'padding:0px;margin:0px;border:0px;';
+ sImgZ = '" style="' + sCssImg + '" />';
+
+ tt_sContent = '<table border="0" cellpadding="0" cellspacing="0" style="width:auto;padding:0px;margin:0px;left:0px;top:0px;"><tr>'
+ // Left-top corner
+ + '<td' + sCssCrn + sVaB + '>'
+ + '<img src="' + aImg[3].src + '" width="' + tt_aV[BALLOONEDGESIZE] + '" height="' + tt_aV[BALLOONEDGESIZE] + sImgZ
+ + '</td>'
+ // Top border
+ + '<td valign="bottom" style="position:relative;padding:0px;margin:0px;overflow:hidden;">'
+ + '<img id="bALlOOnT" style="position:relative;top:1px;z-index:1;display:none;' + sCssImg + '" src="' + aImg[9].src + '" width="' + tt_aV[BALLOONSTEMWIDTH] + '" height="' + tt_aV[BALLOONSTEMHEIGHT] + '" />'
+ + '<div style="position:relative;z-index:0;padding:0px;margin:0px;overflow:hidden;width:auto;height:' + tt_aV[BALLOONEDGESIZE] + 'px;background-image:url(' + aImg[2].src + ');">'
+ + '</div>'
+ + '</td>'
+ // Right-top corner
+ + '<td' + sCssCrn + sVaB + '>'
+ + '<img src="' + aImg[1].src + '" width="' + tt_aV[BALLOONEDGESIZE] + '" height="' + tt_aV[BALLOONEDGESIZE] + sImgZ
+ + '</td>'
+ + '</tr><tr>'
+ // Left border
+ + '<td style="position:relative;padding:0px;margin:0px;width:' + tt_aV[BALLOONEDGESIZE] + 'px;overflow:hidden;background-image:url(' + aImg[4].src + ');">'
+ // Redundant image for bugous old Geckos that won't auto-expand TD height to 100%
+ + '<img width="' + tt_aV[BALLOONEDGESIZE] + '" height="100%" src="' + aImg[4].src + sImgZ
+ + '</td>'
+ // Content
+ + '<td id="bALlO0nBdY" style="position:relative;line-height:normal;'
+ + ';background-image:url(' + aImg[0].src + ')'
+ + ';color:' + tt_aV[FONTCOLOR]
+ + ';font-family:' + tt_aV[FONTFACE]
+ + ';font-size:' + tt_aV[FONTSIZE]
+ + ';font-weight:' + tt_aV[FONTWEIGHT]
+ + ';text-align:' + tt_aV[TEXTALIGN]
+ + ';padding:' + balloon.padding + 'px'
+ + ';width:' + ((balloon.width > 0) ? (balloon.width + 'px') : 'auto')
+ + ';">' + tt_sContent + '</td>'
+ // Right border
+ + '<td style="position:relative;padding:0px;margin:0px;width:' + tt_aV[BALLOONEDGESIZE] + 'px;overflow:hidden;background-image:url(' + aImg[8].src + ');">'
+ // Image redundancy for bugous old Geckos that won't auto-expand TD height to 100%
+ + '<img width="' + tt_aV[BALLOONEDGESIZE] + '" height="100%" src="' + aImg[8].src + sImgZ
+ + '</td>'
+ + '</tr><tr>'
+ // Left-bottom corner
+ + '<td' + sCssCrn + sVaT + '>'
+ + '<img src="' + aImg[5].src + '" width="' + tt_aV[BALLOONEDGESIZE] + '" height="' + tt_aV[BALLOONEDGESIZE] + sImgZ
+ + '</td>'
+ // Bottom border
+ + '<td valign="top" style="position:relative;padding:0px;margin:0px;overflow:hidden;">'
+ + '<div style="position:relative;left:0px;top:0px;padding:0px;margin:0px;overflow:hidden;width:auto;height:' + tt_aV[BALLOONEDGESIZE] + 'px;background-image:url(' + aImg[6].src + ');"></div>'
+ + '<img id="bALlOOnB" style="position:relative;top:-1px;left:2px;z-index:1;display:none;' + sCssImg + '" src="' + aImg[10].src + '" width="' + tt_aV[BALLOONSTEMWIDTH] + '" height="' + tt_aV[BALLOONSTEMHEIGHT] + '" />'
+ + '</td>'
+ // Right-bottom corner
+ + '<td' + sCssCrn + sVaT + '>'
+ + '<img src="' + aImg[7].src + '" width="' + tt_aV[BALLOONEDGESIZE] + '" height="' + tt_aV[BALLOONEDGESIZE] + sImgZ
+ + '</td>'
+ + '</tr></table>';
+ return true;
+};
+
+balloon.OnSubDivsCreated = function()
+{
+ if(tt_aV[BALLOON])
+ {
+ balloon.iStem = tt_aV[ABOVE] * 1;
+ balloon.aStem = [tt_GetElt("bALlOOnT"), tt_GetElt("bALlOOnB")];
+ balloon.aStem[balloon.iStem].style.display = "inline";
+ if (balloon.width < -1)
+ Balloon_MaxW();
+ return true;
+ }
+ return false;
+};
+
+// Display the stem appropriately
+balloon.OnMoveAfter = function()
+{
+ if(tt_aV[BALLOON])
+ {
+ var iStem = (tt_aV[ABOVE] != tt_bJmpVert) * 1;
+
+ // Tooltip position vertically flipped?
+ if(iStem != balloon.iStem)
+ {
+ // Display opposite stem
+ balloon.aStem[balloon.iStem].style.display = "none";
+ balloon.aStem[iStem].style.display = "inline";
+ balloon.iStem = iStem;
+ }
+
+ balloon.aStem[iStem].style.left = Balloon_CalcStemX() + "px";
+ return true;
+ }
+ return false;
+};
+
+function Balloon_CalcStemX()
+{
+ // var x = tt_musX - tt_x + tt_aV[BALLOONSTEMOFFSET] - tt_aV[BALLOONEDGESIZE];
+ // return Math.max(Math.min(x, tt_w - tt_aV[BALLOONSTEMWIDTH] - (tt_aV[BALLOONEDGESIZE] << 1) - 2), 2);
+ var x = -tt_musX - tt_x + tt_aV[BALLOONSTEMOFFSET] - tt_aV[BALLOONEDGESIZE];
+ return Math.max(Math.min(x, tt_w - tt_aV[BALLOONSTEMWIDTH] - (tt_aV[BALLOONEDGESIZE] << 1) - 2), -2);
+}
+
+function Balloon_CacheImgs(sPath)
+{
+ var asImg = ["background", "lt", "t", "rt", "r", "rb", "b", "lb", "l", "stemt", "stemb"],
+ n = asImg.length,
+ aImg = new Array(n),
+ img;
+
+ while(n)
+ {--n;
+ img = aImg[n] = new Image();
+ img.src = sPath + asImg[n] + ".gif"; // Change to ".png" if you want to use PNG images
+ }
+ return aImg;
+}
+
+function Balloon_MaxW()
+{
+ var bdy = tt_GetElt("bALlO0nBdY");
+
+ if (bdy)
+ {
+ var iAdd = tt_bBoxOld ? (balloon.padding << 1) : 0, w = tt_GetDivW(bdy);
+ if (w > -balloon.width + iAdd)
+ bdy.style.width = (-balloon.width + iAdd) + "px";
+ }
+}
+
+// This mechanism pre-caches the default images specified by
+// congif.BalloonImgPath, so, whenever a balloon tip using these default images
+// is created, no further server connection is necessary.
+function Balloon_PreCacheDefImgs()
+{
+ // Append slash to img path if missing
+ if(config.BalloonImgPath.charAt(config.BalloonImgPath.length - 1) != '/')
+ config.BalloonImgPath += "/";
+ // Preload default images into array
+ balloon.aDefImg = Balloon_CacheImgs(config.BalloonImgPath);
+}
+
+Balloon_PreCacheDefImgs();
diff --git a/modules_v3/lightbox/js/tip_centerwindow.js b/modules_v3/lightbox/js/tip_centerwindow.js
new file mode 100644
index 0000000000..d2b1d0d92d
--- /dev/null
+++ b/modules_v3/lightbox/js/tip_centerwindow.js
@@ -0,0 +1,104 @@
+/*
+tip_centerwindow.js v. 1.21
+
+The latest version is available at
+http://www.walterzorn.com
+or http://www.devira.com
+or http://www.walterzorn.de
+
+Initial author: Walter Zorn
+Last modified: 3.6.2008
+
+Extension for the tooltip library wz_tooltip.js.
+Centers a sticky tooltip in the window's visible clientarea,
+optionally even if the window is being scrolled or resized.
+*/
+
+// Make sure that the core file wz_tooltip.js is included first
+if(typeof config == "undefined")
+ alert("Error:\nThe core tooltip script file 'wz_tooltip.js' must be included first, before the plugin files!");
+
+// Here we define new global configuration variable(s) (as members of the
+// predefined "config." class).
+// From each of these config variables, wz_tooltip.js will automatically derive
+// a command which can be passed to Tip() or TagToTip() in order to customize
+// tooltips individually. These command names are just the config variable
+// name(s) translated to uppercase,
+// e.g. from config. CenterWindow a command CENTERWINDOW will automatically be
+// created.
+
+//=================== GLOBAL TOOPTIP CONFIGURATION =========================//
+config. CenterWindow = false // true or false - set to true if you want this to be the default behaviour
+config. CenterAlways = false // true or false - recenter if window is resized or scrolled
+//======= END OF TOOLTIP CONFIG, DO NOT CHANGE ANYTHING BELOW ==============//
+
+
+// Create a new tt_Extension object (make sure that the name of that object,
+// here ctrwnd, is unique amongst the extensions available for
+// wz_tooltips.js):
+var ctrwnd = new tt_Extension();
+
+// Implement extension eventhandlers on which our extension should react
+ctrwnd.OnLoadConfig = function()
+{
+ if(tt_aV[CENTERWINDOW])
+ {
+ // Permit CENTERWINDOW only if the tooltip is sticky
+ if(tt_aV[STICKY])
+ {
+ if(tt_aV[CENTERALWAYS])
+ {
+ // IE doesn't support style.position "fixed"
+ if(tt_ie)
+ tt_AddEvtFnc(window, "scroll", Ctrwnd_DoCenter);
+ else
+ tt_aElt[0].style.position = "fixed";
+ tt_AddEvtFnc(window, "resize", Ctrwnd_DoCenter);
+ }
+ return true;
+ }
+ tt_aV[CENTERWINDOW] = false;
+ }
+ return false;
+};
+// We react on the first OnMouseMove event to center the tip on that occasion
+ctrwnd.OnMoveBefore = Ctrwnd_DoCenter;
+ctrwnd.OnKill = function()
+{
+ if(tt_aV[CENTERWINDOW] && tt_aV[CENTERALWAYS])
+ {
+ tt_RemEvtFnc(window, "resize", Ctrwnd_DoCenter);
+ if(tt_ie)
+ tt_RemEvtFnc(window, "scroll", Ctrwnd_DoCenter);
+ else
+ tt_aElt[0].style.position = "absolute";
+ }
+ return false;
+};
+// Helper function
+function Ctrwnd_DoCenter()
+{
+ if(tt_aV[CENTERWINDOW])
+ {
+ var x, y, dx, dy;
+
+ // Here we use some functions and variables (tt_w, tt_h) which the
+ // extension API of wz_tooltip.js provides for us
+ if(tt_ie || !tt_aV[CENTERALWAYS])
+ {
+ dx = tt_GetScrollX();
+ dy = tt_GetScrollY();
+ }
+ else
+ {
+ dx = 0;
+ dy = 0;
+ }
+ // Position the tip, offset from the center by OFFSETX and OFFSETY
+ x = (tt_GetClientW() - tt_w) / 2 + dx + tt_aV[OFFSETX];
+ y = (tt_GetClientH() - tt_h) / 2 + dy + tt_aV[OFFSETY];
+ tt_SetTipPos(x, y);
+ return true;
+ }
+ return false;
+}
diff --git a/modules_v3/lightbox/js/wz_tooltip.js b/modules_v3/lightbox/js/wz_tooltip.js
new file mode 100644
index 0000000000..b301545afd
--- /dev/null
+++ b/modules_v3/lightbox/js/wz_tooltip.js
@@ -0,0 +1,1259 @@
+/* This notice must be untouched at all times.
+Copyright (c) 2002-2008 Walter Zorn. All rights reserved.
+
+wz_tooltip.js v. 5.11
+
+The latest version is available at
+http://www.walterzorn.com
+or http://www.devira.com
+or http://www.walterzorn.de
+
+Created 1.12.2002 by Walter Zorn (Web: http://www.walterzorn.com )
+Last modified: 22.5.2008
+
+Easy-to-use cross-browser tooltips.
+Just include the script at the beginning of the <body> section, and invoke
+Tip('Tooltip text') from the desired HTML onmouseover eventhandlers,
+and UnTip(), usually from the onmouseout eventhandlers, to hide the tip.
+No container DIV required.
+By default, width and height of tooltips are automatically adapted to content.
+Is even capable of dynamically converting arbitrary HTML elements to tooltips
+by calling TagToTip('ID_of_HTML_element_to_be_converted') instead of Tip(),
+which means you can put important, search-engine-relevant stuff into tooltips.
+Appearance & behaviour of tooltips can be individually configured
+via commands passed to Tip() or TagToTip().
+
+Tab Width: 4
+LICENSE: LGPL
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License (LGPL) as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+For more details on the GNU Lesser General Public License,
+see http://www.gnu.org/copyleft/lesser.html
+*/
+
+var config = new Object();
+
+
+//=================== GLOBAL TOOPTIP CONFIGURATION =========================//
+var tt_Debug = true // false or true - recommended: false once you release your page to the public
+var tt_Enabled = true // Allows to (temporarily) suppress tooltips, e.g. by providing the user with a button that sets this global variable to false
+var TagsToTip = true // false or true - if true, HTML elements to be converted to tooltips via TagToTip() are automatically hidden;
+ // if false, you should hide those HTML elements yourself
+
+// For each of the following config variables there exists a command, which is
+// just the variablename in uppercase, to be passed to Tip() or TagToTip() to
+// configure tooltips individually. Individual commands override global
+// configuration. Order of commands is arbitrary.
+// Example: onmouseover="Tip('Tooltip text', LEFT, true, BGCOLOR, '#FF9900', FADEIN, 400)"
+
+config. Above = false // false or true - tooltip above mousepointer
+config. BgColor = '#E2E7FF' // Background colour (HTML colour value, in quotes)
+config. BgImg = '' // Path to background image, none if empty string ''
+config. BorderColor = '#003099'
+config. BorderStyle = 'solid' // Any permitted CSS value, but I recommend 'solid', 'dotted' or 'dashed'
+config. BorderWidth = 1
+config. CenterMouse = false // false or true - center the tip horizontally below (or above) the mousepointer
+config. ClickClose = false // false or true - close tooltip if the user clicks somewhere
+config. ClickSticky = false // false or true - make tooltip sticky if user left-clicks on the hovered element while the tooltip is active
+config. CloseBtn = false // false or true - closebutton in titlebar
+config. CloseBtnColors = ['#990000', '#FFFFFF', '#DD3333', '#FFFFFF'] // [Background, text, hovered background, hovered text] - use empty strings '' to inherit title colours
+config. CloseBtnText = '&nbsp;X&nbsp;' // Close button text (may also be an image tag)
+config. CopyContent = true // When converting a HTML element to a tooltip, copy only the element's content, rather than converting the element by its own
+config. Delay = 400 // Time span in ms until tooltip shows up
+config. Duration = 0 // Time span in ms after which the tooltip disappears; 0 for infinite duration, < 0 for delay in ms _after_ the onmouseout until the tooltip disappears
+config. FadeIn = 0 // Fade-in duration in ms, e.g. 400; 0 for no animation
+config. FadeOut = 0
+config. FadeInterval = 30 // Duration of each fade step in ms (recommended: 30) - shorter is smoother but causes more CPU-load
+config. Fix = null // Fixated position - x- an y-oordinates in brackets, e.g. [210, 480], or null for no fixation
+config. FollowMouse = true // false or true - tooltip follows the mouse
+config. FontColor = '#000044'
+config. FontFace = 'Verdana,Geneva,sans-serif'
+config. FontSize = '8pt' // E.g. '9pt' or '12px' - unit is mandatory
+config. FontWeight = 'normal' // 'normal' or 'bold';
+config. Height = 0 // Tooltip height; 0 for automatic adaption to tooltip content, < 0 (e.g. -100) for a maximum for automatic adaption
+config. JumpHorz = false // false or true - jump horizontally to other side of mouse if tooltip would extend past clientarea boundary
+config. JumpVert = true // false or true - jump vertically "
+config. Left = false // false or true - tooltip on the left of the mouse
+config. OffsetX = 14 // Horizontal offset of left-top corner from mousepointer
+config. OffsetY = 8 // Vertical offset
+config. Opacity = 100 // Integer between 0 and 100 - opacity of tooltip in percent
+config. Padding = 3 // Spacing between border and content
+config. Shadow = false // false or true
+config. ShadowColor = '#C0C0C0'
+config. ShadowWidth = 5
+config. Sticky = false // false or true - fixate tip, ie. don't follow the mouse and don't hide on mouseout
+config. TextAlign = 'left' // 'left', 'right' or 'justify'
+config. Title = '' // Default title text applied to all tips (no default title: empty string '')
+config. TitleAlign = 'left' // 'left' or 'right' - text alignment inside the title bar
+config. TitleBgColor = '' // If empty string '', BorderColor will be used
+config. TitleFontColor = '#FFFFFF' // Color of title text - if '', BgColor (of tooltip body) will be used
+config. TitleFontFace = '' // If '' use FontFace (boldified)
+config. TitleFontSize = '' // If '' use FontSize
+config. TitlePadding = 2
+config. Width = 0 // Tooltip width; 0 for automatic adaption to tooltip content; < -1 (e.g. -240) for a maximum width for that automatic adaption;
+ // -1: tooltip width confined to the width required for the titlebar
+//======= END OF TOOLTIP CONFIG, DO NOT CHANGE ANYTHING BELOW ==============//
+
+
+
+
+//===================== PUBLIC =============================================//
+var CB_tt="";
+function TipTog()
+{
+ if (CB_tt!="open") {
+ tt_Tip(arguments, null);
+ CB_tt="open";
+ }else{
+ tt_HideInit();
+ CB_tt="closed";
+ }
+}
+
+
+function Tip()
+{
+ tt_Tip(arguments, null);
+}
+function TagToTip()
+{
+ var t2t = tt_GetElt(arguments[0]);
+ if(t2t)
+ tt_Tip(arguments, t2t);
+}
+function UnTip()
+{
+ tt_OpReHref();
+ if(tt_aV[DURATION] < 0 && (tt_iState & 0x2))
+ tt_tDurt.Timer("tt_HideInit()", -tt_aV[DURATION], true);
+ else if(!(tt_aV[STICKY] && (tt_iState & 0x2)))
+ tt_HideInit();
+}
+
+//================== PUBLIC PLUGIN API =====================================//
+// Extension eventhandlers currently supported:
+// OnLoadConfig, OnCreateContentString, OnSubDivsCreated, OnShow, OnMoveBefore,
+// OnMoveAfter, OnHideInit, OnHide, OnKill
+
+var tt_aElt = new Array(10), // Container DIV, outer title & body DIVs, inner title & body TDs, closebutton SPAN, shadow DIVs, and IFRAME to cover windowed elements in IE
+tt_aV = new Array(), // Caches and enumerates config data for currently active tooltip
+tt_sContent, // Inner tooltip text or HTML
+tt_scrlX = 0, tt_scrlY = 0,
+tt_musX, tt_musY,
+tt_over,
+tt_x, tt_y, tt_w, tt_h; // Position, width and height of currently displayed tooltip
+
+function tt_Extension()
+{
+ tt_ExtCmdEnum();
+ tt_aExt[tt_aExt.length] = this;
+ return this;
+}
+function tt_SetTipPos(x, y)
+{
+ var css = tt_aElt[0].style;
+
+ tt_x = x;
+ tt_y = y;
+ css.left = x + "px";
+ css.top = y + "px";
+ if(tt_ie56)
+ {
+ var ifrm = tt_aElt[tt_aElt.length - 1];
+ if(ifrm)
+ {
+ ifrm.style.left = css.left;
+ ifrm.style.top = css.top;
+ }
+ }
+}
+function tt_HideInit()
+{
+ if(tt_iState)
+ {
+ tt_ExtCallFncs(0, "HideInit");
+ tt_iState &= ~0x4;
+ if(tt_flagOpa && tt_aV[FADEOUT])
+ {
+ tt_tFade.EndTimer();
+ if(tt_opa)
+ {
+ var n = Math.round(tt_aV[FADEOUT] / (tt_aV[FADEINTERVAL] * (tt_aV[OPACITY] / tt_opa)));
+ tt_Fade(tt_opa, tt_opa, 0, n);
+ return;
+ }
+ }
+ tt_tHide.Timer("tt_Hide();", 1, false);
+ }
+}
+function tt_Hide()
+{
+ if(tt_db && tt_iState)
+ {
+ tt_OpReHref();
+ if(tt_iState & 0x2)
+ {
+ tt_aElt[0].style.visibility = "hidden";
+ tt_ExtCallFncs(0, "Hide");
+ }
+ tt_tShow.EndTimer();
+ tt_tHide.EndTimer();
+ tt_tDurt.EndTimer();
+ tt_tFade.EndTimer();
+ CB_tt="closed";
+ if(!tt_op && !tt_ie)
+ {
+ tt_tWaitMov.EndTimer();
+ tt_bWait = false;
+ }
+ if(tt_aV[CLICKCLOSE] || tt_aV[CLICKSTICKY])
+ tt_RemEvtFnc(document, "mouseup", tt_OnLClick);
+ tt_ExtCallFncs(0, "Kill");
+ // In case of a TagToTip tooltip, hide converted DOM node and
+ // re-insert it into document
+ if(tt_t2t && !tt_aV[COPYCONTENT])
+ {
+ tt_t2t.style.display = "none";
+ tt_MovDomNode(tt_t2t, tt_aElt[6], tt_t2tDad);
+ }
+ tt_iState = 0;
+ tt_over = null;
+ tt_ResetMainDiv();
+ if(tt_aElt[tt_aElt.length - 1])
+ tt_aElt[tt_aElt.length - 1].style.display = "none";
+ }
+}
+function tt_GetElt(id)
+{
+ return(document.getElementById ? document.getElementById(id)
+ : document.all ? document.all[id]
+ : null);
+}
+function tt_GetDivW(el)
+{
+ return(el ? (el.offsetWidth || el.style.pixelWidth || 0) : 0);
+}
+function tt_GetDivH(el)
+{
+ return(el ? (el.offsetHeight || el.style.pixelHeight || 0) : 0);
+}
+function tt_GetScrollX()
+{
+ return(window.pageXOffset || (tt_db ? (tt_db.scrollLeft || 0) : 0));
+}
+function tt_GetScrollY()
+{
+ return(window.pageYOffset || (tt_db ? (tt_db.scrollTop || 0) : 0));
+}
+function tt_GetClientW()
+{
+ return(document.body && (typeof(document.body.clientWidth) != tt_u) ? document.body.clientWidth
+ : (typeof(window.innerWidth) != tt_u) ? window.innerWidth
+ : tt_db ? (tt_db.clientWidth || 0)
+ : 0);
+}
+function tt_GetClientH()
+{
+ // Exactly this order seems to yield correct values in all major browsers
+ return(document.body && (typeof(document.body.clientHeight) != tt_u) ? document.body.clientHeight
+ : (typeof(window.innerHeight) != tt_u) ? window.innerHeight
+ : tt_db ? (tt_db.clientHeight || 0)
+ : 0);
+}
+function tt_GetEvtX(e)
+{
+ return (e ? ((typeof(e.pageX) != tt_u) ? e.pageX : (e.clientX + tt_scrlX)) : 0);
+}
+function tt_GetEvtY(e)
+{
+ return (e ? ((typeof(e.pageY) != tt_u) ? e.pageY : (e.clientY + tt_scrlY)) : 0);
+}
+function tt_AddEvtFnc(el, sEvt, PFnc)
+{
+ if(el)
+ {
+ if(el.addEventListener)
+ el.addEventListener(sEvt, PFnc, false);
+ else
+ el.attachEvent("on" + sEvt, PFnc);
+ }
+}
+function tt_RemEvtFnc(el, sEvt, PFnc)
+{
+ if(el)
+ {
+ if(el.removeEventListener)
+ el.removeEventListener(sEvt, PFnc, false);
+ else
+ el.detachEvent("on" + sEvt, PFnc);
+ }
+}
+
+//====================== PRIVATE ===========================================//
+var tt_aExt = new Array(), // Array of extension objects
+
+tt_db, tt_op, tt_ie, tt_ie56, tt_bBoxOld, // Browser flags
+tt_body,
+tt_ovr_, // HTML element the mouse is currently over
+tt_flagOpa, // Opacity support: 1=IE, 2=Khtml, 3=KHTML, 4=Moz, 5=W3C
+tt_maxPosX, tt_maxPosY,
+tt_iState = 0, // Tooltip active |= 1, shown |= 2, move with mouse |= 4
+tt_opa, // Currently applied opacity
+tt_bJmpVert, tt_bJmpHorz,// Tip temporarily on other side of mouse
+tt_t2t, tt_t2tDad, // Tag converted to tip, and its parent element in the document
+tt_elDeHref, // The tag from which we've removed the href attribute
+// Timer
+tt_tShow = new Number(0), tt_tHide = new Number(0), tt_tDurt = new Number(0),
+tt_tFade = new Number(0), tt_tWaitMov = new Number(0),
+tt_bWait = false,
+tt_u = "undefined";
+
+
+function tt_Init()
+{
+ tt_MkCmdEnum();
+ // Send old browsers instantly to hell
+ if(!tt_Browser() || !tt_MkMainDiv())
+ return;
+ tt_IsW3cBox();
+ tt_OpaSupport();
+ tt_AddEvtFnc(window, "scroll", tt_OnScrl);
+ // IE doesn't fire onscroll event when switching to fullscreen;
+ // fix suggested by Yoav Karpeles 14.2.2008
+ tt_AddEvtFnc(window, "resize", tt_OnScrl);
+ tt_AddEvtFnc(document, "mousemove", tt_Move);
+ // In Debug mode we search for TagToTip() calls in order to notify
+ // the user if they've forgotten to set the TagsToTip config flag
+ if(TagsToTip || tt_Debug)
+ tt_SetOnloadFnc();
+ // Ensure the tip be hidden when the page unloads
+ tt_AddEvtFnc(window, "unload", tt_Hide);
+}
+// Creates command names by translating config variable names to upper case
+function tt_MkCmdEnum()
+{
+ var n = 0;
+ for(var i in config)
+ eval("window." + i.toString().toUpperCase() + " = " + n++);
+ tt_aV.length = n;
+}
+function tt_Browser()
+{
+ var n, nv, n6, w3c;
+
+ n = navigator.userAgent.toLowerCase(),
+ nv = navigator.appVersion;
+ tt_op = (document.defaultView && typeof(eval("w" + "indow" + "." + "o" + "p" + "er" + "a")) != tt_u);
+ tt_ie = n.indexOf("msie") != -1 && document.all && !tt_op;
+ if(tt_ie)
+ {
+ var ieOld = (!document.compatMode || document.compatMode == "BackCompat");
+ tt_db = !ieOld ? document.documentElement : (document.body || null);
+ if(tt_db)
+ tt_ie56 = parseFloat(nv.substring(nv.indexOf("MSIE") + 5)) >= 5.5
+ && typeof document.body.style.maxHeight == tt_u;
+ }
+ else
+ {
+ tt_db = document.documentElement || document.body ||
+ (document.getElementsByTagName ? document.getElementsByTagName("body")[0]
+ : null);
+ if(!tt_op)
+ {
+ n6 = document.defaultView && typeof document.defaultView.getComputedStyle != tt_u;
+ w3c = !n6 && document.getElementById;
+ }
+ }
+ tt_body = (document.getElementsByTagName ? document.getElementsByTagName("body")[0]
+ : (document.body || null));
+ if(tt_ie || n6 || tt_op || w3c)
+ {
+ if(tt_body && tt_db)
+ {
+ if(document.attachEvent || document.addEventListener)
+ return true;
+ }
+ else
+ tt_Err("wz_tooltip.js must be included INSIDE the body section,"
+ + " immediately after the opening <body> tag.", false);
+ }
+ tt_db = null;
+ return false;
+}
+function tt_MkMainDiv()
+{
+ // Create the tooltip DIV
+ if(tt_body.insertAdjacentHTML)
+ tt_body.insertAdjacentHTML("afterBegin", tt_MkMainDivHtm());
+ else if(typeof tt_body.innerHTML != tt_u && document.createElement && tt_body.appendChild)
+ tt_body.appendChild(tt_MkMainDivDom());
+ if(window.tt_GetMainDivRefs /* FireFox Alzheimer */ && tt_GetMainDivRefs())
+ return true;
+ tt_db = null;
+ return false;
+}
+function tt_MkMainDivHtm()
+{
+ return('<div id="WzTtDiV"></div>' +
+ (tt_ie56 ? ('<iframe id="WzTtIfRm" src="javascript:false" scrolling="no" frameborder="0" style="filter:Alpha(opacity=0);position:absolute;top:0px;left:0px;display:none;"></iframe>')
+ : ''));
+}
+function tt_MkMainDivDom()
+{
+ var el = document.createElement("div");
+ if(el)
+ el.id = "WzTtDiV";
+ return el;
+}
+function tt_GetMainDivRefs()
+{
+ tt_aElt[0] = tt_GetElt("WzTtDiV");
+ if(tt_ie56 && tt_aElt[0])
+ {
+ tt_aElt[tt_aElt.length - 1] = tt_GetElt("WzTtIfRm");
+ if(!tt_aElt[tt_aElt.length - 1])
+ tt_aElt[0] = null;
+ }
+ if(tt_aElt[0])
+ {
+ var css = tt_aElt[0].style;
+
+ css.visibility = "hidden";
+ css.position = "absolute";
+ css.overflow = "hidden";
+ return true;
+ }
+ return false;
+}
+function tt_ResetMainDiv()
+{
+ var w = (window.screen && screen.width) ? screen.width : 10000;
+
+ tt_SetTipPos(-w, 0);
+ tt_aElt[0].innerHTML = "";
+ tt_aElt[0].style.width = (w - 1) + "px";
+ tt_h = 0;
+}
+function tt_IsW3cBox()
+{
+ var css = tt_aElt[0].style;
+
+ css.padding = "10px";
+ css.width = "40px";
+ tt_bBoxOld = (tt_GetDivW(tt_aElt[0]) == 40);
+ css.padding = "0px";
+ tt_ResetMainDiv();
+}
+function tt_OpaSupport()
+{
+ var css = tt_body.style;
+
+ tt_flagOpa = (typeof(css.filter) != tt_u) ? 1
+ : (typeof(css.KhtmlOpacity) != tt_u) ? 2
+ : (typeof(css.KHTMLOpacity) != tt_u) ? 3
+ : (typeof(css.MozOpacity) != tt_u) ? 4
+ : (typeof(css.opacity) != tt_u) ? 5
+ : 0;
+}
+// Ported from http://dean.edwards.name/weblog/2006/06/again/
+// (Dean Edwards et al.)
+function tt_SetOnloadFnc()
+{
+ tt_AddEvtFnc(document, "DOMContentLoaded", tt_HideSrcTags);
+ tt_AddEvtFnc(window, "load", tt_HideSrcTags);
+ if(tt_body.attachEvent)
+ tt_body.attachEvent("onreadystatechange",
+ function() {
+ if(tt_body.readyState == "complete")
+ tt_HideSrcTags();
+ } );
+ if(/WebKit|KHTML/i.test(navigator.userAgent))
+ {
+ var t = setInterval(function() {
+ if(/loaded|complete/.test(document.readyState))
+ {
+ clearInterval(t);
+ tt_HideSrcTags();
+ }
+ }, 10);
+ }
+}
+function tt_HideSrcTags()
+{
+ if(!window.tt_HideSrcTags || window.tt_HideSrcTags.done)
+ return;
+ window.tt_HideSrcTags.done = true;
+ if(!tt_HideSrcTagsRecurs(tt_body))
+ tt_Err("There are HTML elements to be converted to tooltips.\nIf you"
+ + " want these HTML elements to be automatically hidden, you"
+ + " must edit wz_tooltip.js, and set TagsToTip in the global"
+ + " tooltip configuration to true.", true);
+}
+function tt_HideSrcTagsRecurs(dad)
+{
+ var ovr, asT2t;
+ // Walk the DOM tree for tags that have an onmouseover or onclick attribute
+ // containing a TagToTip('...') call.
+ // (.childNodes first since .children is bugous in Safari)
+ var a = dad.childNodes || dad.children || null;
+
+ for(var i = a ? a.length : 0; i;)
+ {--i;
+ if(!tt_HideSrcTagsRecurs(a[i]))
+ return false;
+ ovr = a[i].getAttribute ? (a[i].getAttribute("onmouseover") || a[i].getAttribute("onclick"))
+ : (typeof a[i].onmouseover == "function") ? (a[i].onmouseover || a[i].onclick)
+ : null;
+ if(ovr)
+ {
+ asT2t = ovr.toString().match(/TagToTip\s*\(\s*'[^'.]+'\s*[\),]/);
+ if(asT2t && asT2t.length)
+ {
+ if(!tt_HideSrcTag(asT2t[0]))
+ return false;
+ }
+ }
+ }
+ return true;
+}
+function tt_HideSrcTag(sT2t)
+{
+ var id, el;
+
+ // The ID passed to the found TagToTip() call identifies an HTML element
+ // to be converted to a tooltip, so hide that element
+ id = sT2t.replace(/.+'([^'.]+)'.+/, "$1");
+ el = tt_GetElt(id);
+ if(el)
+ {
+ if(tt_Debug && !TagsToTip)
+ return false;
+ else
+ el.style.display = "none";
+ }
+ else
+ tt_Err("Invalid ID\n'" + id + "'\npassed to TagToTip()."
+ + " There exists no HTML element with that ID.", true);
+ return true;
+}
+function tt_Tip(arg, t2t)
+{
+ if(!tt_db)
+ return;
+ if(tt_iState)
+ tt_Hide();
+ if(!tt_Enabled)
+ return;
+ tt_t2t = t2t;
+ if(!tt_ReadCmds(arg))
+ return;
+ tt_iState = 0x1 | 0x4;
+ tt_AdaptConfig1();
+ tt_MkTipContent(arg);
+ tt_MkTipSubDivs();
+ tt_FormatTip();
+ tt_bJmpVert = false;
+ tt_bJmpHorz = false;
+ tt_maxPosX = tt_GetClientW() + tt_scrlX - tt_w - 1;
+ tt_maxPosY = tt_GetClientH() + tt_scrlY - tt_h - 1;
+ tt_AdaptConfig2();
+ // Ensure the tip be shown and positioned before the first onmousemove
+ tt_OverInit();
+ tt_ShowInit();
+ tt_Move();
+}
+function tt_ReadCmds(a)
+{
+ var i;
+
+ // First load the global config values, to initialize also values
+ // for which no command is passed
+ i = 0;
+ for(var j in config)
+ tt_aV[i++] = config[j];
+ // Then replace each cached config value for which a command is
+ // passed (ensure the # of command args plus value args be even)
+ if(a.length & 1)
+ {
+ for(i = a.length - 1; i > 0; i -= 2)
+ tt_aV[a[i - 1]] = a[i];
+ return true;
+ }
+ tt_Err("Incorrect call of Tip() or TagToTip().\n"
+ + "Each command must be followed by a value.", true);
+ return false;
+}
+function tt_AdaptConfig1()
+{
+ tt_ExtCallFncs(0, "LoadConfig");
+ // Inherit unspecified title formattings from body
+ if(!tt_aV[TITLEBGCOLOR].length)
+ tt_aV[TITLEBGCOLOR] = tt_aV[BORDERCOLOR];
+ if(!tt_aV[TITLEFONTCOLOR].length)
+ tt_aV[TITLEFONTCOLOR] = tt_aV[BGCOLOR];
+ if(!tt_aV[TITLEFONTFACE].length)
+ tt_aV[TITLEFONTFACE] = tt_aV[FONTFACE];
+ if(!tt_aV[TITLEFONTSIZE].length)
+ tt_aV[TITLEFONTSIZE] = tt_aV[FONTSIZE];
+ if(tt_aV[CLOSEBTN])
+ {
+ // Use title colours for non-specified closebutton colours
+ if(!tt_aV[CLOSEBTNCOLORS])
+ tt_aV[CLOSEBTNCOLORS] = new Array("", "", "", "");
+ for(var i = 4; i;)
+ {--i;
+ if(!tt_aV[CLOSEBTNCOLORS][i].length)
+ tt_aV[CLOSEBTNCOLORS][i] = (i & 1) ? tt_aV[TITLEFONTCOLOR] : tt_aV[TITLEBGCOLOR];
+ }
+ // Enforce titlebar be shown
+ if(!tt_aV[TITLE].length)
+ tt_aV[TITLE] = " ";
+ }
+ // Circumvents broken display of images and fade-in flicker in Geckos < 1.8
+ if(tt_aV[OPACITY] == 100 && typeof tt_aElt[0].style.MozOpacity != tt_u && !Array.every)
+ tt_aV[OPACITY] = 99;
+ // Smartly shorten the delay for fade-in tooltips
+ if(tt_aV[FADEIN] && tt_flagOpa && tt_aV[DELAY] > 100)
+ tt_aV[DELAY] = Math.max(tt_aV[DELAY] - tt_aV[FADEIN], 100);
+}
+function tt_AdaptConfig2()
+{
+ if(tt_aV[CENTERMOUSE])
+ {
+ tt_aV[OFFSETX] -= ((tt_w - (tt_aV[SHADOW] ? tt_aV[SHADOWWIDTH] : 0)) >> 1);
+ tt_aV[JUMPHORZ] = false;
+ }
+}
+// Expose content globally so extensions can modify it
+function tt_MkTipContent(a)
+{
+ if(tt_t2t)
+ {
+ if(tt_aV[COPYCONTENT])
+ tt_sContent = tt_t2t.innerHTML;
+ else
+ tt_sContent = "";
+ }
+ else
+ tt_sContent = a[0];
+ tt_ExtCallFncs(0, "CreateContentString");
+}
+function tt_MkTipSubDivs()
+{
+ var sCss = 'position:relative;margin:0px;padding:0px;border-width:0px;left:0px;top:0px;line-height:normal;width:auto;',
+ sTbTrTd = ' cellspacing="0" cellpadding="0" border="0" style="' + sCss + '"><tbody style="' + sCss + '"><tr><td ';
+
+ tt_aElt[0].innerHTML =
+ (''
+ + (tt_aV[TITLE].length ?
+ // BH change for line below enables close to be within a bubble area---------------------------------------
+ // ('<div id="WzTiTl" style="position:relative;z-index:1;">'
+ // ------------------------------------------------------------------------------------------------------------------------
+ ('<div id="WzTiTl" style="position:relative;left:-3px;top:20px;z-index:1;">'
+ + '<table id="WzTiTlTb"' + sTbTrTd + 'id="WzTiTlI" style="' + sCss + '">'
+ + tt_aV[TITLE]
+ + '</td>'
+ + (tt_aV[CLOSEBTN] ?
+ ('<td align="right" style="' + sCss
+ + 'text-align:right;">'
+ + '<span id="WzClOsE" style="position:relative;left:2px;padding-left:2px;padding-right:2px;'
+ + 'cursor:' + (tt_ie ? 'hand' : 'pointer')
+ + ';" onmouseover="tt_OnCloseBtnOver(1)" onmouseout="tt_OnCloseBtnOver(0)" onclick="tt_HideInit()">'
+ + tt_aV[CLOSEBTNTEXT]
+ + '</span></td>')
+ : '')
+ + '</tr></tbody></table></div>')
+ : '')
+ + '<div id="WzBoDy" style="position:relative;z-index:0;">'
+ + '<table' + sTbTrTd + 'id="WzBoDyI" style="' + sCss + '">'
+ + tt_sContent
+ + '</td></tr></tbody></table></div>'
+ + (tt_aV[SHADOW]
+ ? ('<div id="WzTtShDwR" style="position:absolute;overflow:hidden;"></div>'
+ + '<div id="WzTtShDwB" style="position:relative;overflow:hidden;"></div>')
+ : '')
+ );
+ tt_GetSubDivRefs();
+ // Convert DOM node to tip
+ if(tt_t2t && !tt_aV[COPYCONTENT])
+ {
+ // Store the tag's parent element so we can restore that DOM branch
+ // once the tooltip is hidden
+ tt_t2tDad = tt_t2t.parentNode || tt_t2t.parentElement || tt_t2t.offsetParent || null;
+ if(tt_t2tDad)
+ {
+ tt_MovDomNode(tt_t2t, tt_t2tDad, tt_aElt[6]);
+ tt_t2t.style.display = "block";
+ }
+ }
+ tt_ExtCallFncs(0, "SubDivsCreated");
+}
+function tt_GetSubDivRefs()
+{
+ var aId = new Array("WzTiTl", "WzTiTlTb", "WzTiTlI", "WzClOsE", "WzBoDy", "WzBoDyI", "WzTtShDwB", "WzTtShDwR");
+
+ for(var i = aId.length; i; --i)
+ tt_aElt[i] = tt_GetElt(aId[i - 1]);
+}
+function tt_FormatTip()
+{
+ var css, w, h, pad = tt_aV[PADDING], padT, wBrd = tt_aV[BORDERWIDTH],
+ iOffY, iOffSh, iAdd = (pad + wBrd) << 1;
+
+ //--------- Title DIV ----------
+ if(tt_aV[TITLE].length)
+ {
+ padT = tt_aV[TITLEPADDING];
+ css = tt_aElt[1].style;
+ css.background = tt_aV[TITLEBGCOLOR];
+ css.paddingTop = css.paddingBottom = padT + "px";
+ css.paddingLeft = css.paddingRight = (padT + 2) + "px";
+ css = tt_aElt[3].style;
+ css.color = tt_aV[TITLEFONTCOLOR];
+ if(tt_aV[WIDTH] == -1)
+ css.whiteSpace = "nowrap";
+ css.fontFamily = tt_aV[TITLEFONTFACE];
+ css.fontSize = tt_aV[TITLEFONTSIZE];
+ css.fontWeight = "bold";
+ css.textAlign = tt_aV[TITLEALIGN];
+ // Close button DIV
+ if(tt_aElt[4])
+ {
+ css = tt_aElt[4].style;
+ css.background = tt_aV[CLOSEBTNCOLORS][0];
+ css.color = tt_aV[CLOSEBTNCOLORS][1];
+ css.fontFamily = tt_aV[TITLEFONTFACE];
+ css.fontSize = tt_aV[TITLEFONTSIZE];
+ css.fontWeight = "bold";
+ }
+ if(tt_aV[WIDTH] > 0)
+ tt_w = tt_aV[WIDTH];
+ else
+ {
+ tt_w = tt_GetDivW(tt_aElt[3]) + tt_GetDivW(tt_aElt[4]);
+ // Some spacing between title DIV and closebutton
+ if(tt_aElt[4])
+ tt_w += pad;
+ // Restrict auto width to max width
+ if(tt_aV[WIDTH] < -1 && tt_w > -tt_aV[WIDTH])
+ tt_w = -tt_aV[WIDTH];
+ }
+ // Ensure the top border of the body DIV be covered by the title DIV
+ iOffY = -wBrd;
+ }
+ else
+ {
+ tt_w = 0;
+ iOffY = 0;
+ }
+
+ //-------- Body DIV ------------
+ css = tt_aElt[5].style;
+ css.top = iOffY + "px";
+ if(wBrd)
+ {
+ css.borderColor = tt_aV[BORDERCOLOR];
+ css.borderStyle = tt_aV[BORDERSTYLE];
+ css.borderWidth = wBrd + "px";
+ }
+ if(tt_aV[BGCOLOR].length)
+ css.background = tt_aV[BGCOLOR];
+ if(tt_aV[BGIMG].length)
+ css.backgroundImage = "url(" + tt_aV[BGIMG] + ")";
+ css.padding = pad + "px";
+ css.textAlign = tt_aV[TEXTALIGN];
+ if(tt_aV[HEIGHT])
+ {
+ css.overflow = "auto";
+ if(tt_aV[HEIGHT] > 0)
+ css.height = (tt_aV[HEIGHT] + iAdd) + "px";
+ else
+ tt_h = iAdd - tt_aV[HEIGHT];
+ }
+ // TD inside body DIV
+ css = tt_aElt[6].style;
+ css.color = tt_aV[FONTCOLOR];
+ css.fontFamily = tt_aV[FONTFACE];
+ css.fontSize = tt_aV[FONTSIZE];
+ css.fontWeight = tt_aV[FONTWEIGHT];
+ css.background = "";
+ css.textAlign = tt_aV[TEXTALIGN];
+ if(tt_aV[WIDTH] > 0)
+ w = tt_aV[WIDTH];
+ // Width like title (if existent)
+ else if(tt_aV[WIDTH] == -1 && tt_w)
+ w = tt_w;
+ else
+ {
+ // Measure width of the body's inner TD, as some browsers would expand
+ // the container and outer body DIV to 100%
+ w = tt_GetDivW(tt_aElt[6]);
+ // Restrict auto width to max width
+ if(tt_aV[WIDTH] < -1 && w > -tt_aV[WIDTH])
+ w = -tt_aV[WIDTH];
+ }
+ if(w > tt_w)
+ tt_w = w;
+ tt_w += iAdd;
+
+ //--------- Shadow DIVs ------------
+ if(tt_aV[SHADOW])
+ {
+ tt_w += tt_aV[SHADOWWIDTH];
+ iOffSh = Math.floor((tt_aV[SHADOWWIDTH] * 4) / 3);
+ // Bottom shadow
+ css = tt_aElt[7].style;
+ css.top = iOffY + "px";
+ css.left = iOffSh + "px";
+ css.width = (tt_w - iOffSh - tt_aV[SHADOWWIDTH]) + "px";
+ css.height = tt_aV[SHADOWWIDTH] + "px";
+ css.background = tt_aV[SHADOWCOLOR];
+ // Right shadow
+ css = tt_aElt[8].style;
+ css.top = iOffSh + "px";
+ css.left = (tt_w - tt_aV[SHADOWWIDTH]) + "px";
+ css.width = tt_aV[SHADOWWIDTH] + "px";
+ css.background = tt_aV[SHADOWCOLOR];
+ }
+ else
+ iOffSh = 0;
+
+ //-------- Container DIV -------
+ tt_SetTipOpa(tt_aV[FADEIN] ? 0 : tt_aV[OPACITY]);
+ tt_FixSize(iOffY, iOffSh);
+}
+// Fixate the size so it can't dynamically change while the tooltip is moving.
+function tt_FixSize(iOffY, iOffSh)
+{
+ var wIn, wOut, h, add, pad = tt_aV[PADDING], wBrd = tt_aV[BORDERWIDTH], i;
+
+ tt_aElt[0].style.width = tt_w + "px";
+ tt_aElt[0].style.pixelWidth = tt_w;
+ wOut = tt_w - ((tt_aV[SHADOW]) ? tt_aV[SHADOWWIDTH] : 0);
+ // Body
+ wIn = wOut;
+ if(!tt_bBoxOld)
+ wIn -= (pad + wBrd) << 1;
+ tt_aElt[5].style.width = wIn + "px";
+ // Title
+ if(tt_aElt[1])
+ {
+ wIn = wOut - ((tt_aV[TITLEPADDING] + 2) << 1);
+ if(!tt_bBoxOld)
+ wOut = wIn;
+ tt_aElt[1].style.width = wOut + "px";
+ tt_aElt[2].style.width = wIn + "px";
+ }
+ // Max height specified
+ if(tt_h)
+ {
+ h = tt_GetDivH(tt_aElt[5]);
+ if(h > tt_h)
+ {
+ if(!tt_bBoxOld)
+ tt_h -= (pad + wBrd) << 1;
+ tt_aElt[5].style.height = tt_h + "px";
+ }
+ }
+ tt_h = tt_GetDivH(tt_aElt[0]) + iOffY;
+ // Right shadow
+ if(tt_aElt[8])
+ tt_aElt[8].style.height = (tt_h - iOffSh) + "px";
+ i = tt_aElt.length - 1;
+ if(tt_aElt[i])
+ {
+ tt_aElt[i].style.width = tt_w + "px";
+ tt_aElt[i].style.height = tt_h + "px";
+ }
+}
+function tt_DeAlt(el)
+{
+ var aKid;
+
+ if(el)
+ {
+ if(el.alt)
+ el.alt = "";
+ if(el.title)
+ el.title = "";
+ aKid = el.childNodes || el.children || null;
+ if(aKid)
+ {
+ for(var i = aKid.length; i;)
+ tt_DeAlt(aKid[--i]);
+ }
+ }
+}
+// This hack removes the native tooltips over links in Opera
+function tt_OpDeHref(el)
+{
+ if(!tt_op)
+ return;
+ if(tt_elDeHref)
+ tt_OpReHref();
+ while(el)
+ {
+ if(el.hasAttribute("href"))
+ {
+ el.t_href = el.getAttribute("href");
+ el.t_stats = window.status;
+ el.removeAttribute("href");
+ el.style.cursor = "hand";
+ tt_AddEvtFnc(el, "mousedown", tt_OpReHref);
+ window.status = el.t_href;
+ tt_elDeHref = el;
+ break;
+ }
+ el = el.parentElement;
+ }
+}
+function tt_OpReHref()
+{
+ if(tt_elDeHref)
+ {
+ tt_elDeHref.setAttribute("href", tt_elDeHref.t_href);
+ tt_RemEvtFnc(tt_elDeHref, "mousedown", tt_OpReHref);
+ window.status = tt_elDeHref.t_stats;
+ tt_elDeHref = null;
+ }
+}
+function tt_OverInit()
+{
+ if(window.event)
+ tt_over = window.event.target || window.event.srcElement;
+ else
+ tt_over = tt_ovr_;
+ tt_DeAlt(tt_over);
+ tt_OpDeHref(tt_over);
+}
+function tt_ShowInit()
+{
+ tt_tShow.Timer("tt_Show()", tt_aV[DELAY], true);
+ if(tt_aV[CLICKCLOSE] || tt_aV[CLICKSTICKY])
+ tt_AddEvtFnc(document, "mouseup", tt_OnLClick);
+}
+function tt_Show()
+{
+ var css = tt_aElt[0].style;
+
+ // Override the z-index of the topmost wz_dragdrop.js D&D item
+ css.zIndex = Math.max((window.dd && dd.z) ? (dd.z + 2) : 0, 1110);
+ if(tt_aV[STICKY] || !tt_aV[FOLLOWMOUSE])
+ tt_iState &= ~0x4;
+ if(tt_aV[DURATION] > 0)
+ tt_tDurt.Timer("tt_HideInit()", tt_aV[DURATION], true);
+ tt_ExtCallFncs(0, "Show")
+ css.visibility = "visible";
+ tt_iState |= 0x2;
+ if(tt_aV[FADEIN])
+ tt_Fade(0, 0, tt_aV[OPACITY], Math.round(tt_aV[FADEIN] / tt_aV[FADEINTERVAL]));
+ tt_ShowIfrm();
+}
+function tt_ShowIfrm()
+{
+ if(tt_ie56)
+ {
+ var ifrm = tt_aElt[tt_aElt.length - 1];
+ if(ifrm)
+ {
+ var css = ifrm.style;
+ css.zIndex = tt_aElt[0].style.zIndex - 1;
+ css.display = "block";
+ }
+ }
+}
+function tt_Move(e)
+{
+ if(e)
+ tt_ovr_ = e.target || e.srcElement;
+ e = e || window.event;
+ if(e)
+ {
+ tt_musX = tt_GetEvtX(e);
+ tt_musY = tt_GetEvtY(e);
+ }
+ if(tt_iState & 0x04)
+ {
+ // Prevent jam of mousemove events
+ if(!tt_op && !tt_ie)
+ {
+ if(tt_bWait)
+ return;
+ tt_bWait = true;
+ tt_tWaitMov.Timer("tt_bWait = false;", 1, true);
+ }
+ if(tt_aV[FIX])
+ {
+ var iY = tt_aV[FIX][1];
+ // For a fixed tip to be positioned above the mouse, use the
+ // bottom edge as anchor
+ // (recommended by Christophe Rebeschini, 31.1.2008)
+ if(tt_aV[ABOVE])
+ iY -= tt_h;
+ tt_iState &= ~0x4;
+ tt_SetTipPos(tt_aV[FIX][0], tt_aV[FIX][1]);
+ }
+ else if(!tt_ExtCallFncs(e, "MoveBefore"))
+ tt_SetTipPos(tt_Pos(0), tt_Pos(1));
+ tt_ExtCallFncs([tt_musX, tt_musY], "MoveAfter")
+ }
+}
+function tt_Pos(iDim)
+{
+ var iX, bJmpMode, cmdAlt, cmdOff, cx, iMax, iScrl, iMus, bJmp;
+
+ // Map values according to dimension to calculate
+ if(iDim)
+ {
+ bJmpMode = tt_aV[JUMPVERT];
+ cmdAlt = ABOVE;
+ cmdOff = OFFSETY;
+ cx = tt_h;
+ iMax = tt_maxPosY;
+ iScrl = tt_scrlY;
+ iMus = tt_musY;
+ bJmp = tt_bJmpVert;
+ }
+ else
+ {
+ bJmpMode = tt_aV[JUMPHORZ];
+ cmdAlt = LEFT;
+ cmdOff = OFFSETX;
+ cx = tt_w;
+ iMax = tt_maxPosX;
+ iScrl = tt_scrlX;
+ iMus = tt_musX;
+ bJmp = tt_bJmpHorz;
+ }
+ if(bJmpMode)
+ {
+ if(tt_aV[cmdAlt] && (!bJmp || tt_CalcPosAlt(iDim) >= iScrl + 16))
+ iX = tt_PosAlt(iDim);
+ else if(!tt_aV[cmdAlt] && bJmp && tt_CalcPosDef(iDim) > iMax - 16)
+ iX = tt_PosAlt(iDim);
+ else
+ iX = tt_PosDef(iDim);
+ }
+ else
+ {
+ iX = iMus;
+ if(tt_aV[cmdAlt])
+ iX -= cx + tt_aV[cmdOff] - (tt_aV[SHADOW] ? tt_aV[SHADOWWIDTH] : 0);
+ else
+ iX += tt_aV[cmdOff];
+ }
+ // Prevent tip from extending past clientarea boundary
+ if(iX > iMax)
+ iX = bJmpMode ? tt_PosAlt(iDim) : iMax;
+
+ // In case of insufficient space on both sides, ensure the left/upper part
+ // of the tip be visible
+//BH changed following line to correct HORZ JUMP
+ if(iX < (iScrl-OFFSETY))
+ // iX = bJmpMode ? tt_PosDef(iDim) : iScrl;
+ iX = (bJmpMode ? tt_PosDef(iDim) : iScrl)-(OFFSETY*9);
+ return iX;
+}
+function tt_PosDef(iDim)
+{
+ if(iDim)
+ tt_bJmpVert = tt_aV[ABOVE];
+ else
+ tt_bJmpHorz = tt_aV[LEFT];
+ return tt_CalcPosDef(iDim);
+}
+function tt_PosAlt(iDim)
+{
+ if(iDim)
+ tt_bJmpVert = !tt_aV[ABOVE];
+ else
+ tt_bJmpHorz = !tt_aV[LEFT];
+ return tt_CalcPosAlt(iDim);
+}
+function tt_CalcPosDef(iDim)
+{
+ return iDim ? (tt_musY + tt_aV[OFFSETY]) : (tt_musX + tt_aV[OFFSETX]);
+}
+function tt_CalcPosAlt(iDim)
+{
+ var cmdOff = iDim ? OFFSETY : OFFSETX;
+ var dx = tt_aV[cmdOff] - (tt_aV[SHADOW] ? tt_aV[SHADOWWIDTH] : 0);
+ if(tt_aV[cmdOff] > 0 && dx <= 0)
+ dx = 1;
+ return((iDim ? (tt_musY - tt_h) : (tt_musX - tt_w)) - dx);
+}
+function tt_Fade(a, now, z, n)
+{
+ if(n)
+ {
+ now += Math.round((z - now) / n);
+ if((z > a) ? (now >= z) : (now <= z))
+ now = z;
+ else
+ tt_tFade.Timer("tt_Fade("
+ + a + "," + now + "," + z + "," + (n - 1)
+ + ")",
+ tt_aV[FADEINTERVAL],
+ true);
+ }
+ now ? tt_SetTipOpa(now) : tt_Hide();
+}
+function tt_SetTipOpa(opa)
+{
+ // To circumvent the opacity nesting flaws of IE, we set the opacity
+ // for each sub-DIV separately, rather than for the container DIV.
+ tt_SetOpa(tt_aElt[5], opa);
+ if(tt_aElt[1])
+ tt_SetOpa(tt_aElt[1], opa);
+ if(tt_aV[SHADOW])
+ {
+ opa = Math.round(opa * 0.8);
+ tt_SetOpa(tt_aElt[7], opa);
+ tt_SetOpa(tt_aElt[8], opa);
+ }
+}
+function tt_OnScrl()
+{
+ tt_scrlX = tt_GetScrollX();
+ tt_scrlY = tt_GetScrollY();
+}
+function tt_OnCloseBtnOver(iOver)
+{
+ var css = tt_aElt[4].style;
+
+ iOver <<= 1;
+ css.background = tt_aV[CLOSEBTNCOLORS][iOver];
+ css.color = tt_aV[CLOSEBTNCOLORS][iOver + 1];
+}
+function tt_OnLClick(e)
+{
+ // Ignore right-clicks
+ e = e || window.event;
+ if(!((e.button && e.button & 2) || (e.which && e.which == 3)))
+ {
+ if(tt_aV[CLICKSTICKY] && (tt_iState & 0x4))
+ {
+ tt_aV[STICKY] = true;
+ tt_iState &= ~0x4;
+ }
+ else if(tt_aV[CLICKCLOSE])
+ tt_HideInit();
+ }
+}
+function tt_Int(x)
+{
+ var y;
+
+ return(isNaN(y = parseInt(x)) ? 0 : y);
+}
+Number.prototype.Timer = function(s, iT, bUrge)
+{
+ if(!this.value || bUrge)
+ this.value = window.setTimeout(s, iT);
+}
+Number.prototype.EndTimer = function()
+{
+ if(this.value)
+ {
+ window.clearTimeout(this.value);
+ this.value = 0;
+ }
+}
+function tt_SetOpa(el, opa)
+{
+ var css = el.style;
+
+ tt_opa = opa;
+ if(tt_flagOpa == 1)
+ {
+ if(opa < 100)
+ {
+ // Hacks for bugs of IE:
+ // 1.) Once a CSS filter has been applied, fonts are no longer
+ // anti-aliased, so we store the previous 'non-filter' to be
+ // able to restore it
+ if(typeof(el.filtNo) == tt_u)
+ el.filtNo = css.filter;
+ // 2.) A DIV cannot be made visible in a single step if an
+ // opacity < 100 has been applied while the DIV was hidden
+ var bVis = css.visibility != "hidden";
+ // 3.) In IE6, applying an opacity < 100 has no effect if the
+ // element has no layout (position, size, zoom, ...)
+ css.zoom = "100%";
+ if(!bVis)
+ css.visibility = "visible";
+ css.filter = "alpha(opacity=" + opa + ")";
+ if(!bVis)
+ css.visibility = "hidden";
+ }
+ else if(typeof(el.filtNo) != tt_u)
+ // Restore 'non-filter'
+ css.filter = el.filtNo;
+ }
+ else
+ {
+ opa /= 100.0;
+ switch(tt_flagOpa)
+ {
+ case 2:
+ css.KhtmlOpacity = opa; break;
+ case 3:
+ css.KHTMLOpacity = opa; break;
+ case 4:
+ css.MozOpacity = opa; break;
+ case 5:
+ css.opacity = opa; break;
+ }
+ }
+}
+function tt_MovDomNode(el, dadFrom, dadTo)
+{
+ if(dadFrom)
+ dadFrom.removeChild(el);
+ if(dadTo)
+ dadTo.appendChild(el);
+}
+function tt_Err(sErr, bIfDebug)
+{
+ if(tt_Debug || !bIfDebug)
+ alert("Tooltip Script Error Message:\n\n" + sErr);
+}
+
+//============ EXTENSION (PLUGIN) MANAGER ===============//
+function tt_ExtCmdEnum()
+{
+ var s;
+
+ // Add new command(s) to the commands enum
+ for(var i in config)
+ {
+ s = "window." + i.toString().toUpperCase();
+ if(eval("typeof(" + s + ") == tt_u"))
+ {
+ eval(s + " = " + tt_aV.length);
+ tt_aV[tt_aV.length] = null;
+ }
+ }
+}
+function tt_ExtCallFncs(arg, sFnc)
+{
+ var b = false;
+ for(var i = tt_aExt.length; i;)
+ {--i;
+ var fnc = tt_aExt[i]["On" + sFnc];
+ // Call the method the extension has defined for this event
+ if(fnc && fnc(arg))
+ b = true;
+ }
+ return b;
+}
+
+tt_Init();