if (typeof _pdftubeRootDirectory == 'undefined') { var _pdftubeRootDirectory=''; } if (typeof _pdftubeTITLEBGCOLOR == 'undefined') { var _pdftubeTITLEBGCOLOR='#b1ceb1'; } if (typeof _pdftubeBORDERCOLOR == 'undefined') { var _pdftubeBORDERCOLOR='#b1ceb1'; } if (typeof _pdftubeTITLECOLOR == 'undefined') { var _pdftubeTITLECOLOR='#375c38'; } if (typeof _pdftubeIcon == 'undefined') { var _pdftubeIcon='1'; } if (typeof _pdftubeAction == 'undefined') { var _pdftubeAction='mouseover'; } if (typeof _pdftubeDIV == 'undefined') { var _pdftubeDIV=''; } //2 if (typeof _pdftubeTITLE == 'undefined') { var _pdftubeTITLE="
PDFtube.comadd PDFtube to your website
"; } addLoadEvent(); document.write("
PDFtube.comadd PDFtube to your website
") var tip, pred; function initPDFTube () { if ("0" == "1"){ if (document.getElementsByTagName) { var spanelemente = document.getElementsByTagName('a'); } else if (document.all) { var spanelemente = document.all['linkbox'].all.tags('span'); } else return; for (var i=0;i < spanelemente.length;i++) { if (spanelemente[i].href.indexOf(".pdf") > 0) { spanelemente[i].onmouseover = PdfTubemover; // if (_pdftubeIcon=="1") { spanelemente[i].appendChild(imageIcon()); } } } } } // FIND HREF //--------------------------------------------------------------------------- function PdfTubemover () { var vhref = this.href.toLowerCase(); var vname = this.name.toLowerCase(); if (vhref.indexOf(".pdf") > 0) { //nur Files vom selben host if (vhref.indexOf(document.location.host)> 0 ){ if (vhref.indexOf('?')>0){ vhref = docpath(vhref); } //Fenster oeffnen if (_pdftubeDIV != ''){ document.getElementById(_pdftubeDIV).innerHTML = createdivPDFTube(vhref,vname); }else{ TipPDFTube( createdivPDFTube(vhref,vname), CLOSEBTN , 'true',TITLE, _pdftubeTITLE,TITLEBGCOLOR,_pdftubeTITLEBGCOLOR,BORDERCOLOR,_pdftubeBORDERCOLOR,FOLLOWMOUSE,'false',SHADOW,'true',STICKY, true); } } } } function createdivPDFTube(vhref,vname) { var vlinkhref = ""; vlinkhref = vhref; //alert(vhref); try{ var vContent = document.createElement('div'); var iframe = document.createElement('iframe'); iframe.setAttribute('id','parentframe'); iframe.setAttribute('framespacing','0'); iframe.setAttribute('scrolling','no'); iframe.setAttribute('frameborder','0'); iframe.setAttribute('width','500'); iframe.setAttribute('height','300'); iframe.setAttribute('allowtransparency','false'); iframe.setAttribute('src','http://www.pdftube.com/contento/desktopmodules/contentoFlashpaper/pop.htm'); var vobj = document.createElement('object'); vobj.setAttribute('classid','clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'); vobj.setAttribute('codebase','http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0'); vobj.setAttribute('width','800'); vobj.setAttribute('height','600'); var p_m = document.createElement('param'); p_m.setAttribute('name','movie'); p_m.setAttribute('value','http://www.pdftube.com/contento/desktopmodules/ContentoFlashpaper/player2Template/swf/Magazine.swf?webrootpath=http://www.pdftube.com/contento/Desktopmodules/contentoFlashpaper/Player2Template/&xmlFile=http://www.pdftube.com/contento/desktopmodules/ContentoFlashpaper/FlashpaperGetfromUrl.aspx?u=' + _pdftubeU + escape('&') +'s=' + escape(vhref)+ escape('&')+'p=2'); vobj.appendChild(p_m); var p_m1 = document.createElement('param'); p_m1.setAttribute('name','quality'); p_m1.setAttribute('value','high'); vobj.appendChild(p_m1); var p_m2 = document.createElement('param'); p_m2.setAttribute('name','bgcolor'); p_m2.setAttribute('value','#cccccc'); vobj.appendChild(p_m2); var p_m3 = document.createElement('param'); p_m3.setAttribute('name','allowFullScreen'); p_m3.setAttribute('value','true'); vobj.appendChild(p_m3); var p_m4 = document.createElement('param'); p_m4.setAttribute('name','allowScriptAccess'); p_m4.setAttribute('value','sameDomain'); vobj.appendChild(p_m4); var vembed = document.createElement('embed'); vembed.setAttribute('src','http://www.pdftube.com/contento/desktopmodules/ContentoFlashpaper/player2Template/swf/Magazine.swf?webrootpath=http://www.pdftube.com/contento/Desktopmodules/contentoFlashpaper/Player2Template/&xmlFile=http://www.pdftube.com/contento/desktopmodules/ContentoFlashpaper/FlashpaperGetfromUrl.aspx?u=' + _pdftubeU + escape('&') +'s=' + escape(vhref)+ escape('&')+'p=2'); vembed.setAttribute('id','embedfilm'); vembed.setAttribute('width','800'); vembed.setAttribute('height','600'); vembed.setAttribute('quality','high'); vembed.setAttribute('bgcolor','#ffffff'); vembed.setAttribute('flashvars','webrootpath=http://www.pdftube.com/contento/Desktopmodules/contentoFlashpaper/Player2Template/&xmlFile=http://www.pdftube.com/contento/desktopmodules/ContentoFlashpaper/FlashpaperGetfromUrl.aspx?u=' + _pdftubeU + escape('&') +'s=' + escape(vhref) + escape('&') +'p=2' ); vembed.setAttribute('scale','exactfit'); vembed.setAttribute('pluginspage','http://www.macromedia.com/go/getflashplayer'); vembed.setAttribute('type','application/x-shockwave-flash'); vembed.setAttribute('wmode','transparent'); vembed.setAttribute('allowFullScreen','true'); vembed.setAttribute('allowScriptAccess','sameDomain'); try{ vobj.appendChild(vembed); } catch(e){ } vContent.appendChild(vobj); if (document.location.host.indexOf('borema')> 0 ){ //window.location.href = "mailto:andre@tdv.ch?body="+ vContent.innerHTML +"--" ; //alert( vContent.innerHTML ); } return vContent.innerHTML ; } catch(e){ //alert(e.message); } } function addLoadEvent(func) { try{ var oldonloadt = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { oldonloadt(); func(); } } // alert(window.onload); }catch(e){ // alert(e.message); } } addLoadEvent('initPDFTube'); window.onload = initPDFTube; function imageIcon(){ var vembed = document.createElement('img'); vembed.setAttribute('src','http://www.pdftube.com/contento/desktopmodules/contentoFlashpaper/images/iconTube.gif'); vembed.setAttribute('border','0'); return vembed } function docpath(vhref){ var strfileurl = Left(vhref, vhref.indexOf('.pdf')+4); var revString = myreverse(strfileurl); var delimiterPos = revString.indexOf('='); strfileurl = Left(revString, delimiterPos); return _pdftubeRootDirectory + myreverse(strfileurl); } function myreverse(my_str){ var newstr =''; var i=my_str.length; i=i-1; for (var x = i; x >=0; x--) { newstr += my_str.charAt(x); } return newstr; } function Left(str, n){ if (n <= 0) return ""; else if (n > String(str).length) return str; else return String(str).substring(0,n); } function Right(str, n){ if (n <= 0) return ""; else if (n > String(str).length) return str; else { var iLen = String(str).length; return String(str).substring(iLen, iLen - n); } } /* This notice must be untouched at all times. wz_tooltip.js v. 4.12 The latest version is available at http://www.walterzorn.com or http://www.devira.com or http://www.walterzorn.de Copyright (c) 2002-2007 Walter Zorn. All rights reserved. Created 1.12.2002 by Walter Zorn (Web: http://www.walterzorn.com ) Last modified: 13.7.2007 Easy-to-use cross-browser tooltips. Just include the script at the beginning of the section, and invoke Tip('Tooltip text') from within the desired HTML onmouseover eventhandlers. No container DIV, no onmouseouts required. By default, width of tooltips is 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 of tooltips can be individually configPDFTubeured 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 configPDFTube = new Object(); //=================== GLOBAL TOOPTIP configPDFTubeURATION =========================// var tt_PDFTubeDebug = true // false or true - recommended: false once you release your page to the public var tt_PDFTubeEnabled = 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, the script is capable of converting HTML elements to tooltips // For each of the following configPDFTube variables there exists a command, which is // just the variablename in uppercase, to be passed to Tip() or TagToTip() to // configPDFTubeure tooltips individually. Individual commands override global // configPDFTubeuration. Order of commands is arbitrary. // Example: onmouseover="Tip('Tooltip text', LEFT, true, BGCOLOR, '#FF9900', FADEIN, 400)" configPDFTube. Above = false // false or true - tooltip above mousepointer? configPDFTube. BgColor = '#E4E7FF' // Background color configPDFTube. BgImg = '' // Path to background image, none if empty string '' configPDFTube. BorderColor = '#002299' configPDFTube. BorderStyle = 'solid' // Any permitted CSS value, but I recommend 'solid', 'dotted' or 'dashed' configPDFTube. BorderWidth = 1 configPDFTube. CenterMouse = false // false or true - center the tip horizontally below (or above) the mousepointer configPDFTube. ClickClose = false // false or true - close tooltip if the user clicks somewhere configPDFTube. CloseBtn = false // false or true - closebutton in titlebar configPDFTube. CloseBtnColors = ['#990000', '#FFFFFF', '#DD3333', '#FFFFFF'] // [Background, text, hovered background, hovered text] - use empty strings '' to inherit title colors configPDFTube. CloseBtnText = ' X ' // Close button text (may also be an image tag) configPDFTube. CopyContent = true // When converting a HTML element to a tooltip, copy only the element's content, rather than converting the element by its own configPDFTube. Delay = 400 // Time span in ms until tooltip shows up configPDFTube. Duration = 0 // Time span in ms after which the tooltip disappears; 0 for infinite duration configPDFTube. FadeIn = 0 // Fade-in duration in ms, e.g. 400; 0 for no animation configPDFTube. FadeOut = 0 configPDFTube. FadeInterval = 30 // Duration of each fade step in ms (recommended: 30) - shorter is smoother but causes more CPU-load configPDFTube. Fix = null // Fixated position - x- an y-oordinates in brackets, e.g. [210, 480], or null for no fixation configPDFTube. FollowMouse = true // false or true - tooltip follows the mouse configPDFTube. FontColor = '#000044' configPDFTube. FontFace = 'Verdana,Geneva,sans-serif' configPDFTube. FontSize = '8pt' // E.g. '9pt' or '12px' - unit is mandatory configPDFTube. FontWeight = 'normal' // 'normal' or 'bold'; configPDFTube. Left = false // false or true - tooltip on the left of the mouse configPDFTube. OffsetX = 14 // Horizontal offset of left-top corner from mousepointer configPDFTube. OffsetY = 8 // Vertical offset configPDFTube. Opacity = 100 // Integer between 0 and 100 - opacity of tooltip in percent configPDFTube. Padding = 3 // Spacing between border and content configPDFTube. Shadow = false // false or true configPDFTube. ShadowColor = '#C0C0C0' configPDFTube. ShadowWidth = 5 configPDFTube. Sticky = false // Do NOT hide tooltip on mouseout? false or true configPDFTube. TextAlign = 'left' // 'left', 'right' or 'justify' configPDFTube. Title = '' // Default title text applied to all tips (no default title: empty string '') configPDFTube. TitleAlign = 'left' // 'left' or 'right' - text alignment inside the title bar configPDFTube. TitleBgColor = '' // If empty string '', BorderColor will be used configPDFTube. TitleFontColor = '#ffffff' // Color of title text - if '', BgColor (of tooltip body) will be used configPDFTube. TitleFontFace = '' // If '' use FontFace (boldified) configPDFTube. TitleFontSize = '' // If '' use FontSize configPDFTube. Width = 0 // Tooltip width; 0 for automatic adaption to tooltip content //======= END OF TOOLTIP configPDFTube, DO NOT CHANGE ANYTHING BELOW ==============// //====================== PUBLIC ============================================// function TipPDFTube() { tt_PDFTubeTip(arguments, null); } function TagToTip() { if(TagsToTip) { var t2t = tt_PDFTubeGetElt(arguments[0]); if(t2t) tt_PDFTubeTip(arguments, t2t); } } //================== PUBLIC EXTENSION API ==================================// // Extension eventhandlers currently supported: // OnLoadconfigPDFTube, OnCreateContentString, OnSubDivsCreated, OnShow, OnMoveBefore, // OnMoveAfter, OnHideInit, OnHide, OnKill var tt_PDFTubeaElt = 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_PDFTubeaV = new Array(), // Caches and enumerates configPDFTube data for currently active tooltip tt_PDFTubesContent, // Inner tooltip text or HTML tt_PDFTubescrlX = 0, tt_PDFTubescrlY = 0, tt_PDFTubemusX, tt_PDFTubemusY, tt_PDFTubeover, tt_PDFTubex, tt_PDFTubey, tt_PDFTubew, tt_PDFTubeh; // Position, width and height of currently displayed tooltip function tt_PDFTubeExtension() { tt_PDFTubeExtCmdEnum(); tt_PDFTubeaExt[tt_PDFTubeaExt.length] = this; return this; } function tt_PDFTubeSetTipPos(x, y) { var css = tt_PDFTubeaElt[0].style; tt_PDFTubex = x; tt_PDFTubey = y; css.left = x + "px"; css.top = y + "px"; if(tt_PDFTubeie56) { var ifrm = tt_PDFTubeaElt[tt_PDFTubeaElt.length - 1]; if(ifrm) { ifrm.style.left = css.left; ifrm.style.top = css.top; } } } function tt_PDFTubeHide() { if(tt_PDFTubedb && tt_PDFTubeiState) { if(tt_PDFTubeiState & 0x2) { tt_PDFTubeaElt[0].style.visibility = "hidden"; tt_PDFTubeExtCallFncs(0, "Hide"); } tt_PDFTubetShow.EndTimer(); tt_PDFTubetHide.EndTimer(); tt_PDFTubetDurt.EndTimer(); tt_PDFTubetFade.EndTimer(); if(!tt_PDFTubeop && !tt_PDFTubeie) { tt_PDFTubetWaitMov.EndTimer(); tt_PDFTubebWait = false; } if(tt_PDFTubeaV[CLICKCLOSE]) tt_PDFTubeRemEvtFnc(document, "mouseup", tt_PDFTubeHideInit); tt_PDFTubeAddRemOutFnc(false); tt_PDFTubeExtCallFncs(0, "Kill"); // In case of a TagToTip tooltip, hide converted DOM node and // re-insert it into document if(tt_PDFTubet2t && !tt_PDFTubeaV[COPYCONTENT]) { tt_PDFTubet2t.style.display = "none"; tt_PDFTubeMovDomNode(tt_PDFTubet2t, tt_PDFTubeaElt[6], tt_PDFTubet2tDad); } tt_PDFTubeiState = 0; tt_PDFTubeover = null; tt_PDFTubeResetMainDiv(); if(tt_PDFTubeaElt[tt_PDFTubeaElt.length - 1]) tt_PDFTubeaElt[tt_PDFTubeaElt.length - 1].style.display = "none"; } } function tt_PDFTubeGetElt(id) { return(document.getElementById ? document.getElementById(id) : document.all ? document.all[id] : null); } function tt_PDFTubeGetDivW(el) { return(el ? (el.offsetWidth || el.style.pixelWidth || 0) : 0); } function tt_PDFTubeGetDivH(el) { return(el ? (el.offsetHeight || el.style.pixelHeight || 0) : 0); } function tt_PDFTubeGetScrollX() { return(window.pageXOffset || (tt_PDFTubedb ? (tt_PDFTubedb.scrollLeft || 0) : 0)); } function tt_PDFTubeGetScrollY() { return(window.pageYOffset || (tt_PDFTubedb ? (tt_PDFTubedb.scrollTop || 0) : 0)); } function tt_PDFTubeGetClientW() { return(document.body && (typeof(document.body.clientWidth) != tt_PDFTubeu) ? document.body.clientWidth : (typeof(window.innerWidth) != tt_PDFTubeu) ? window.innerWidth : tt_PDFTubedb ? (tt_PDFTubedb.clientWidth || 0) : 0); } function tt_PDFTubeGetClientH() { // Exactly this order seems to yield correct values in all major browsers return(document.body && (typeof(document.body.clientHeight) != tt_PDFTubeu) ? document.body.clientHeight : (typeof(window.innerHeight) != tt_PDFTubeu) ? window.innerHeight : tt_PDFTubedb ? (tt_PDFTubedb.clientHeight || 0) : 0); } function tt_PDFTubeGetEvtX(e) { return (e ? ((typeof(e.pageX) != tt_PDFTubeu) ? e.pageX : (e.clientX + tt_PDFTubescrlX)) : 0); } function tt_PDFTubeGetEvtY(e) { return (e ? ((typeof(e.pageY) != tt_PDFTubeu) ? e.pageY : (e.clientY + tt_PDFTubescrlY)) : 0); } function tt_PDFTubeAddEvtFnc(el, sEvt, PFnc) { if(el) { if(el.addEventListener) el.addEventListener(sEvt, PFnc, false); else el.attachEvent("on" + sEvt, PFnc); } } function tt_PDFTubeRemEvtFnc(el, sEvt, PFnc) { if(el) { if(el.removeEventListener) el.removeEventListener(sEvt, PFnc, false); else el.detachEvent("on" + sEvt, PFnc); } } //====================== PRIVATE ===========================================// var tt_PDFTubeaExt = new Array(), // Array of extension objects tt_PDFTubedb, tt_PDFTubeop, tt_PDFTubeie, tt_PDFTubeie56, tt_PDFTubebBoxOld, // Browser flags tt_PDFTubebody, tt_PDFTubeflagOpa, // Opacity support: 1=IE, 2=Khtml, 3=KHTML, 4=Moz, 5=W3C tt_PDFTubemaxPosX, tt_PDFTubemaxPosY, tt_PDFTubeiState = 0, // Tooltip active |= 1, shown |= 2, move with mouse |= 4 tt_PDFTubeopa, // Currently applied opacity tt_PDFTubebJmpVert, // Tip above mouse (or ABOVE tip below mouse) tt_PDFTubet2t, tt_PDFTubet2tDad, // Tag converted to tip, and its parent element in the document tt_PDFTubeelDeHref, // The tag from which Opera has removed the href attribute // Timer tt_PDFTubetShow = new Number(0), tt_PDFTubetHide = new Number(0), tt_PDFTubetDurt = new Number(0), tt_PDFTubetFade = new Number(0), tt_PDFTubetWaitMov = new Number(0), tt_PDFTubebWait = false, tt_PDFTubeu = "undefined"; function tt_PDFTubeInit() { tt_PDFTubeMkCmdEnum(); // Send old browsers instantly to hell if(!tt_PDFTubeBrowser() || !tt_PDFTubeMkMainDiv()) return; tt_PDFTubeIsW3cBox(); tt_PDFTubeOpaSupport(); tt_PDFTubeAddEvtFnc(document, "mousemove", tt_PDFTubeMove); // In Debug mode we search for TagToTip() calls in order to notify // the user if they've forgotten to set the TagsToTip configPDFTube flag if(TagsToTip || tt_PDFTubeDebug) tt_PDFTubeSetOnloadFnc(); tt_PDFTubeAddEvtFnc(window, "scroll", function() { tt_PDFTubescrlX = tt_PDFTubeGetScrollX(); tt_PDFTubescrlY = tt_PDFTubeGetScrollY(); if(tt_PDFTubeiState && !(tt_PDFTubeaV[STICKY] && (tt_PDFTubeiState & 2))) tt_PDFTubeHideInit(); } ); // Ensure the tip be hidden when the page unloads tt_PDFTubeAddEvtFnc(window, "unload", tt_PDFTubeHide); tt_PDFTubeHide(); } // Creates command names by translating configPDFTube variable names to upper case function tt_PDFTubeMkCmdEnum() { var n = 0; for(var i in configPDFTube) eval("window." + i.toString().toUpperCase() + " = " + n++); tt_PDFTubeaV.length = n; } function tt_PDFTubeBrowser() { var n, nv, n6, w3c; n = navigator.userAgent.toLowerCase(), nv = navigator.appVersion; tt_PDFTubeop = (document.defaultView && typeof(eval("w" + "indow" + "." + "o" + "p" + "er" + "a")) != tt_PDFTubeu); tt_PDFTubeie = n.indexOf("msie") != -1 && document.all && !tt_PDFTubeop; if(tt_PDFTubeie) { var ieOld = (!document.compatMode || document.compatMode == "BackCompat"); tt_PDFTubedb = !ieOld ? document.documentElement : (document.body || null); if(tt_PDFTubedb) tt_PDFTubeie56 = parseFloat(nv.substring(nv.indexOf("MSIE") + 5)) >= 5.5 && typeof document.body.style.maxHeight == tt_PDFTubeu; } else { tt_PDFTubedb = document.documentElement || document.body || (document.getElementsByTagName ? document.getElementsByTagName("body")[0] : null); if(!tt_PDFTubeop) { n6 = document.defaultView && typeof document.defaultView.getComputedStyle != tt_PDFTubeu; w3c = !n6 && document.getElementById; } } tt_PDFTubebody = (document.getElementsByTagName ? document.getElementsByTagName("body")[0] : (document.body || null)); if(tt_PDFTubeie || n6 || tt_PDFTubeop || w3c) { if(tt_PDFTubebody && tt_PDFTubedb) { if(document.attachEvent || document.addEventListener) return true; } else tt_PDFTubeErr("wz_tooltip.js must be included INSIDE the body section," + " immediately after the opening tag."); } tt_PDFTubedb = null; return false; } function tt_PDFTubeMkMainDiv() { // Create the tooltip DIV if(tt_PDFTubebody.insertAdjacentHTML) tt_PDFTubebody.insertAdjacentHTML("afterBegin", tt_PDFTubeMkMainDivHtm()); else if(typeof tt_PDFTubebody.innerHTML != tt_PDFTubeu && document.createElement && tt_PDFTubebody.appendChild) tt_PDFTubebody.appendChild(tt_PDFTubeMkMainDivDom()); // FireFox Alzheimer bug if(window.tt_PDFTubeGetMainDivRefs && tt_PDFTubeGetMainDivRefs()) return true; tt_PDFTubedb = null; return false; } function tt_PDFTubeMkMainDivHtm() { return('
' + (tt_PDFTubeie56 ? ('') : '')); } function tt_PDFTubeMkMainDivDom() { var el = document.createElement("div"); if(el) el.id = "WzTtDiV"; return el; } function tt_PDFTubeGetMainDivRefs() { tt_PDFTubeaElt[0] = tt_PDFTubeGetElt("WzTtDiV"); if(tt_PDFTubeie56 && tt_PDFTubeaElt[0]) { tt_PDFTubeaElt[tt_PDFTubeaElt.length - 1] = tt_PDFTubeGetElt("WzTtIfRm"); if(!tt_PDFTubeaElt[tt_PDFTubeaElt.length - 1]) tt_PDFTubeaElt[0] = null; } if(tt_PDFTubeaElt[0]) { var css = tt_PDFTubeaElt[0].style; css.visibility = "hidden"; css.position = "absolute"; css.overflow = "hidden"; return true; } return false; } function tt_PDFTubeResetMainDiv() { var w = (window.screen && screen.width) ? screen.width : 10000; tt_PDFTubeSetTipPos(-w, 0); tt_PDFTubeaElt[0].innerHTML = ""; tt_PDFTubeaElt[0].style.width = (w - 1) + "px"; } function tt_PDFTubeIsW3cBox() { var css = tt_PDFTubeaElt[0].style; css.padding = "10px"; css.width = "40px"; tt_PDFTubebBoxOld = (tt_PDFTubeGetDivW(tt_PDFTubeaElt[0]) == 40); css.padding = "0px"; tt_PDFTubeResetMainDiv(); } function tt_PDFTubeOpaSupport() { var css = tt_PDFTubebody.style; tt_PDFTubeflagOpa = (typeof(css.filter) != tt_PDFTubeu) ? 1 : (typeof(css.KhtmlOpacity) != tt_PDFTubeu) ? 2 : (typeof(css.KHTMLOpacity) != tt_PDFTubeu) ? 3 : (typeof(css.MozOpacity) != tt_PDFTubeu) ? 4 : (typeof(css.opacity) != tt_PDFTubeu) ? 5 : 0; } // Ported from http://dean.edwards.name/weblog/2006/06/again/ // (Dean Edwards et al.) function tt_PDFTubeSetOnloadFnc() { tt_PDFTubeAddEvtFnc(document, "DOMContentLoaded", tt_PDFTubeHideSrcTags); tt_PDFTubeAddEvtFnc(window, "load", tt_PDFTubeHideSrcTags); if(tt_PDFTubebody.attachEvent) tt_PDFTubebody.attachEvent("onreadystatechange", function() { if(tt_PDFTubebody.readyState == "complete") tt_PDFTubeHideSrcTags(); } ); if(/WebKit|KHTML/i.test(navigator.userAgent)) { var t = setInterval(function() { if(/loaded|complete/.test(document.readyState)) { clearInterval(t); tt_PDFTubeHideSrcTags(); } }, 10); } } function tt_PDFTubeHideSrcTags() { if(!window.tt_PDFTubeHideSrcTags || window.tt_PDFTubeHideSrcTags.done) return; window.tt_PDFTubeHideSrcTags.done = true; if(!tt_PDFTubeHideSrcTagsRecurs(tt_PDFTubebody)) tt_PDFTubeErr("To enable the capability to convert HTML elements to tooltips," + " you must set TagsToTip in the global tooltip configPDFTubeuration" + " to true."); } function tt_PDFTubeHideSrcTagsRecurs(dad) { var a, ovr, asT2t; // Walk the DOM tree for tags that have an onmouseover attribute // containing a TagToTip('...') call. // (.childNodes first since .children is bugous in Safari) a = dad.childNodes || dad.children || null; for(var i = a ? a.length : 0; i;) {--i; if(!tt_PDFTubeHideSrcTagsRecurs(a[i])) return false; ovr = a[i].getAttribute ? a[i].getAttribute("onmouseover") : (typeof a[i].onmouseover == "function") ? a[i].onmouseover : null; if(ovr) { asT2t = ovr.toString().match(/TagToTip\s*\(\s*'[^'.]+'\s*[\),]/); if(asT2t && asT2t.length) { if(!tt_PDFTubeHideSrcTag(asT2t[0])) return false; } } } return true; } function tt_PDFTubeHideSrcTag(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_PDFTubeGetElt(id); if(el) { if(tt_PDFTubeDebug && !TagsToTip) return false; else el.style.display = "none"; } else tt_PDFTubeErr("Invalid ID\n'" + id + "'\npassed to TagToTip()." + " There exists no HTML element with that ID."); return true; } function tt_PDFTubeTip(arg, t2t) { if(!tt_PDFTubedb) return; if(tt_PDFTubeiState) tt_PDFTubeHide(); if(!tt_PDFTubeEnabled) return; tt_PDFTubet2t = t2t; if(!tt_PDFTubeReadCmds(arg)) return; tt_PDFTubeiState = 0x1 | 0x4; tt_PDFTubeAdaptconfigPDFTube1(); tt_PDFTubeMkTipContent(arg); tt_PDFTubeMkTipSubDivs(); tt_PDFTubeFormatTip(); tt_PDFTubebJmpVert = false; tt_PDFTubemaxPosX = tt_PDFTubeGetClientW() + tt_PDFTubescrlX - tt_PDFTubew - 1; tt_PDFTubemaxPosY = tt_PDFTubeGetClientH() + tt_PDFTubescrlY - tt_PDFTubeh - 1; tt_PDFTubeAdaptconfigPDFTube2(); // We must fake the first mousemove in order to ensure the tip // be immediately shown and positioned tt_PDFTubeMove(); tt_PDFTubeShowInit(); } function tt_PDFTubeReadCmds(a) { var i; // First load the global configPDFTube values, to initialize also values // for which no command has been passed i = 0; for(var j in configPDFTube) tt_PDFTubeaV[i++] = configPDFTube[j]; // Then replace each cached configPDFTube value for which a command has been // 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_PDFTubeaV[a[i - 1]] = a[i]; return true; } tt_PDFTubeErr("Incorrect call of TipPDFTube() or TagToTip().\n" + "Each command must be followed by a value."); return false; } function tt_PDFTubeAdaptconfigPDFTube1() { tt_PDFTubeExtCallFncs(0, "LoadconfigPDFTube"); // Inherit unspecified title formattings from body if(!tt_PDFTubeaV[TITLEBGCOLOR].length) tt_PDFTubeaV[TITLEBGCOLOR] = tt_PDFTubeaV[BORDERCOLOR]; if(!tt_PDFTubeaV[TITLEFONTCOLOR].length) tt_PDFTubeaV[TITLEFONTCOLOR] = tt_PDFTubeaV[BGCOLOR]; if(!tt_PDFTubeaV[TITLEFONTFACE].length) tt_PDFTubeaV[TITLEFONTFACE] = tt_PDFTubeaV[FONTFACE]; if(!tt_PDFTubeaV[TITLEFONTSIZE].length) tt_PDFTubeaV[TITLEFONTSIZE] = tt_PDFTubeaV[FONTSIZE]; if(tt_PDFTubeaV[CLOSEBTN]) { // Use title colors for non-specified closebutton colors if(!tt_PDFTubeaV[CLOSEBTNCOLORS]) tt_PDFTubeaV[CLOSEBTNCOLORS] = new Array("", "", "", ""); for(var i = 4; i;) {--i; if(!tt_PDFTubeaV[CLOSEBTNCOLORS][i].length) tt_PDFTubeaV[CLOSEBTNCOLORS][i] = (i & 1) ? tt_PDFTubeaV[TITLEFONTCOLOR] : tt_PDFTubeaV[TITLEBGCOLOR]; } // Enforce titlebar be shown if(!tt_PDFTubeaV[TITLE].length) tt_PDFTubeaV[TITLE] = " "; } // Circumvents broken display of images and fade-in flicker in Geckos < 1.8 if(tt_PDFTubeaV[OPACITY] == 100 && typeof tt_PDFTubeaElt[0].style.MozOpacity != tt_PDFTubeu && !Array.every) tt_PDFTubeaV[OPACITY] = 99; // Smartly shorten the delay for fade-in tooltips if(tt_PDFTubeaV[FADEIN] && tt_PDFTubeflagOpa && tt_PDFTubeaV[DELAY] > 100) tt_PDFTubeaV[DELAY] = Math.max(tt_PDFTubeaV[DELAY] - tt_PDFTubeaV[FADEIN], 100); } function tt_PDFTubeAdaptconfigPDFTube2() { if(tt_PDFTubeaV[CENTERMOUSE]) tt_PDFTubeaV[OFFSETX] -= ((tt_PDFTubew - (tt_PDFTubeaV[SHADOW] ? tt_PDFTubeaV[SHADOWWIDTH] : 0)) >> 1); } // Expose content globally so extensions can modify it function tt_PDFTubeMkTipContent(a) { if(tt_PDFTubet2t) { if(tt_PDFTubeaV[COPYCONTENT]) tt_PDFTubesContent = tt_PDFTubet2t.innerHTML; else tt_PDFTubesContent = ""; } else tt_PDFTubesContent = a[0]; tt_PDFTubeExtCallFncs(0, "CreateContentString"); } function tt_PDFTubeMkTipSubDivs() { 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 + '">' + '' + tt_PDFTubeaV[TITLE] + '' + (tt_PDFTubeaV[CLOSEBTN] ? ('') : '') + '
' + '' + tt_PDFTubeaV[CLOSEBTNTEXT] + '
') : '') + '
' + '' + tt_PDFTubesContent + '
' + (tt_PDFTubeaV[SHADOW] ? ('
' + '
') : '') ); tt_PDFTubeGetSubDivRefs(); // Convert DOM node to tip if(tt_PDFTubet2t && !tt_PDFTubeaV[COPYCONTENT]) { // Store the tag's parent element so we can restore that DOM branch // once the tooltip is hidden tt_PDFTubet2tDad = tt_PDFTubet2t.parentNode || tt_PDFTubet2t.parentElement || tt_PDFTubet2t.offsetParent || null; if(tt_PDFTubet2tDad) { tt_PDFTubeMovDomNode(tt_PDFTubet2t, tt_PDFTubet2tDad, tt_PDFTubeaElt[6]); tt_PDFTubet2t.style.display = "block"; } } tt_PDFTubeExtCallFncs(0, "SubDivsCreated"); } function tt_PDFTubeGetSubDivRefs() { var aId = new Array("WzTiTl", "WzTiTlTb", "WzTiTlI", "WzClOsE", "WzBoDy", "WzBoDyI", "WzTtShDwB", "WzTtShDwR"); for(var i = aId.length; i; --i) tt_PDFTubeaElt[i] = tt_PDFTubeGetElt(aId[i - 1]); } function tt_PDFTubeFormatTip() { var css, w, iOffY, iOffSh; //--------- Title DIV ---------- if(tt_PDFTubeaV[TITLE].length) { css = tt_PDFTubeaElt[1].style; css.background = tt_PDFTubeaV[TITLEBGCOLOR]; css.paddingTop = (tt_PDFTubeaV[CLOSEBTN] ? 2 : 0) + "px"; css.paddingBottom = "1px"; css.paddingLeft = css.paddingRight = tt_PDFTubeaV[PADDING] + "px"; css = tt_PDFTubeaElt[3].style; css.color = tt_PDFTubeaV[TITLEFONTCOLOR]; css.fontFamily = tt_PDFTubeaV[TITLEFONTFACE]; css.fontSize = tt_PDFTubeaV[TITLEFONTSIZE]; css.fontWeight = "bold"; css.textAlign = tt_PDFTubeaV[TITLEALIGN]; // Close button DIV if(tt_PDFTubeaElt[4]) { css.paddingRight = (tt_PDFTubeaV[PADDING] << 1) + "px"; css = tt_PDFTubeaElt[4].style; css.background = tt_PDFTubeaV[CLOSEBTNCOLORS][0]; css.color = tt_PDFTubeaV[CLOSEBTNCOLORS][1]; css.fontFamily = tt_PDFTubeaV[TITLEFONTFACE]; css.fontSize = tt_PDFTubeaV[TITLEFONTSIZE]; css.fontWeight = "bold"; } if(tt_PDFTubeaV[WIDTH] > 0) tt_PDFTubew = tt_PDFTubeaV[WIDTH] + ((tt_PDFTubeaV[PADDING] + tt_PDFTubeaV[BORDERWIDTH]) << 1); else { tt_PDFTubew = tt_PDFTubeGetDivW(tt_PDFTubeaElt[3]) + tt_PDFTubeGetDivW(tt_PDFTubeaElt[4]); // Some spacing between title DIV and closebutton if(tt_PDFTubeaElt[4]) tt_PDFTubew += tt_PDFTubeaV[PADDING]; } // Ensure the top border of the body DIV be covered by the title DIV iOffY = -tt_PDFTubeaV[BORDERWIDTH]; } else { tt_PDFTubew = 0; iOffY = 0; } //-------- Body DIV ------------ css = tt_PDFTubeaElt[5].style; css.top = iOffY + "px"; if(tt_PDFTubeaV[BORDERWIDTH]) { css.borderColor = tt_PDFTubeaV[BORDERCOLOR]; css.borderStyle = tt_PDFTubeaV[BORDERSTYLE]; css.borderWidth = tt_PDFTubeaV[BORDERWIDTH] + "px"; } if(tt_PDFTubeaV[BGCOLOR].length) css.background = tt_PDFTubeaV[BGCOLOR]; if(tt_PDFTubeaV[BGIMG].length) css.backgroundImage = "url(" + tt_PDFTubeaV[BGIMG] + ")"; css.padding = tt_PDFTubeaV[PADDING] + "px"; css.textAlign = tt_PDFTubeaV[TEXTALIGN]; // TD inside body DIV css = tt_PDFTubeaElt[6].style; css.color = tt_PDFTubeaV[FONTCOLOR]; css.fontFamily = tt_PDFTubeaV[FONTFACE]; css.fontSize = tt_PDFTubeaV[FONTSIZE]; css.fontWeight = tt_PDFTubeaV[FONTWEIGHT]; css.background = ""; css.textAlign = tt_PDFTubeaV[TEXTALIGN]; if(tt_PDFTubeaV[WIDTH] > 0) w = tt_PDFTubeaV[WIDTH] + ((tt_PDFTubeaV[PADDING] + tt_PDFTubeaV[BORDERWIDTH]) << 1); else // We measure the width of the body's inner TD, because some browsers // expand the width of the container and outer body DIV to 100% w = tt_PDFTubeGetDivW(tt_PDFTubeaElt[6]) + ((tt_PDFTubeaV[PADDING] + tt_PDFTubeaV[BORDERWIDTH]) << 1); if(w > tt_PDFTubew) tt_PDFTubew = w; //--------- Shadow DIVs ------------ if(tt_PDFTubeaV[SHADOW]) { tt_PDFTubew += tt_PDFTubeaV[SHADOWWIDTH]; iOffSh = Math.floor((tt_PDFTubeaV[SHADOWWIDTH] * 4) / 3); // Bottom shadow css = tt_PDFTubeaElt[7].style; css.top = iOffY + "px"; css.left = iOffSh + "px"; css.width = (tt_PDFTubew - iOffSh - tt_PDFTubeaV[SHADOWWIDTH]) + "px"; css.height = tt_PDFTubeaV[SHADOWWIDTH] + "px"; css.background = tt_PDFTubeaV[SHADOWCOLOR]; // Right shadow css = tt_PDFTubeaElt[8].style; css.top = iOffSh + "px"; css.left = (tt_PDFTubew - tt_PDFTubeaV[SHADOWWIDTH]) + "px"; css.width = tt_PDFTubeaV[SHADOWWIDTH] + "px"; css.background = tt_PDFTubeaV[SHADOWCOLOR]; } else iOffSh = 0; //-------- Container DIV ------- tt_PDFTubeSetTipOpa(tt_PDFTubeaV[FADEIN] ? 0 : tt_PDFTubeaV[OPACITY]); tt_PDFTubeFixSize(iOffY, iOffSh); } // Fixate the size so it can't dynamically change while the tooltip is moving. function tt_PDFTubeFixSize(iOffY, iOffSh) { var wIn, wOut, i; tt_PDFTubeaElt[0].style.width = tt_PDFTubew + "px"; tt_PDFTubeaElt[0].style.pixelWidth = tt_PDFTubew; wOut = tt_PDFTubew - ((tt_PDFTubeaV[SHADOW]) ? tt_PDFTubeaV[SHADOWWIDTH] : 0); // Body wIn = wOut; if(!tt_PDFTubebBoxOld) wIn -= ((tt_PDFTubeaV[PADDING] + tt_PDFTubeaV[BORDERWIDTH]) << 1); tt_PDFTubeaElt[5].style.width = wIn + "px"; // Title if(tt_PDFTubeaElt[1]) { wIn = wOut - (tt_PDFTubeaV[PADDING] << 1); if(!tt_PDFTubebBoxOld) wOut = wIn; tt_PDFTubeaElt[1].style.width = wOut + "px"; tt_PDFTubeaElt[2].style.width = wIn + "px"; } tt_PDFTubeh = tt_PDFTubeGetDivH(tt_PDFTubeaElt[0]) + iOffY; // Right shadow if(tt_PDFTubeaElt[8]) tt_PDFTubeaElt[8].style.height = (tt_PDFTubeh - iOffSh) + "px"; i = tt_PDFTubeaElt.length - 1; if(tt_PDFTubeaElt[i]) { tt_PDFTubeaElt[i].style.width = tt_PDFTubew + "px"; tt_PDFTubeaElt[i].style.height = tt_PDFTubeh + "px"; } } function tt_PDFTubeDeAlt(el) { var aKid; 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_PDFTubeDeAlt(aKid[--i]); } } // This hack removes the annoying native tooltips over links in Opera function tt_PDFTubeOpDeHref(el) { if(!tt_PDFTubeop) return; if(tt_PDFTubeelDeHref) tt_PDFTubeOpReHref(); 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_PDFTubeAddEvtFnc(el, "mousedown", tt_PDFTubeOpReHref); window.status = el.t_href; tt_PDFTubeelDeHref = el; break; } el = el.parentElement; } } function tt_PDFTubeShowInit() { tt_PDFTubetShow.Timer("tt_PDFTubeShow()", tt_PDFTubeaV[DELAY], true); if(tt_PDFTubeaV[CLICKCLOSE]) tt_PDFTubeAddEvtFnc(document, "mouseup", tt_PDFTubeHideInit); } function tt_PDFTubeOverInit(e) { tt_PDFTubeover = e.target || e.srcElement; tt_PDFTubeDeAlt(tt_PDFTubeover); tt_PDFTubeOpDeHref(tt_PDFTubeover); tt_PDFTubeAddRemOutFnc(true); } function tt_PDFTubeShow() { var css = tt_PDFTubeaElt[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, 1010); if(tt_PDFTubeaV[STICKY] || !tt_PDFTubeaV[FOLLOWMOUSE]) tt_PDFTubeiState &= ~0x4; if(tt_PDFTubeaV[DURATION] > 0) tt_PDFTubetDurt.Timer("tt_PDFTubeHideInit()", tt_PDFTubeaV[DURATION], true); tt_PDFTubeExtCallFncs(0, "Show") css.visibility = "visible"; tt_PDFTubeiState |= 0x2; if(tt_PDFTubeaV[FADEIN]) tt_PDFTubeFade(0, 0, tt_PDFTubeaV[OPACITY], Math.round(tt_PDFTubeaV[FADEIN] / tt_PDFTubeaV[FADEINTERVAL])); tt_PDFTubeShowIfrm(); } function tt_PDFTubeShowIfrm() { if(tt_PDFTubeie56) { var ifrm = tt_PDFTubeaElt[tt_PDFTubeaElt.length - 1]; if(ifrm) { var css = ifrm.style; css.zIndex = tt_PDFTubeaElt[0].style.zIndex - 1; css.display = "block"; } } } function tt_PDFTubeMove(e) { e = window.event || e; if(e) { tt_PDFTubemusX = tt_PDFTubeGetEvtX(e); tt_PDFTubemusY = tt_PDFTubeGetEvtY(e); } if(tt_PDFTubeiState) { if(!tt_PDFTubeover && e) tt_PDFTubeOverInit(e); if(tt_PDFTubeiState & 0x4) { // Protect some browsers against jam of mousemove events if(!tt_PDFTubeop && !tt_PDFTubeie) { if(tt_PDFTubebWait) return; tt_PDFTubebWait = true; tt_PDFTubetWaitMov.Timer("tt_PDFTubebWait = false;", 1, true); } if(tt_PDFTubeaV[FIX]) { tt_PDFTubeiState &= ~0x4; tt_PDFTubeSetTipPos(tt_PDFTubeaV[FIX][0], tt_PDFTubeaV[FIX][1]); } else if(!tt_PDFTubeExtCallFncs(e, "MoveBefore")) tt_PDFTubeSetTipPos(tt_PDFTubePosX(), tt_PDFTubePosY()); tt_PDFTubeExtCallFncs([tt_PDFTubemusX, tt_PDFTubemusY], "MoveAfter") } } } function tt_PDFTubePosX() { var x; x = tt_PDFTubemusX; if(tt_PDFTubeaV[LEFT]) x -= tt_PDFTubew + tt_PDFTubeaV[OFFSETX] - (tt_PDFTubeaV[SHADOW] ? tt_PDFTubeaV[SHADOWWIDTH] : 0); else x += tt_PDFTubeaV[OFFSETX]; // Prevent tip from extending past right/left clientarea boundary if(x > tt_PDFTubemaxPosX) x = tt_PDFTubemaxPosX; return((x < tt_PDFTubescrlX) ? tt_PDFTubescrlX : x); } function tt_PDFTubePosY() { var y; // Apply some hysteresis after the tip has snapped to the other side of the // mouse. In case of insufficient space above and below the mouse, we place // the tip below. if(tt_PDFTubeaV[ABOVE] && (!tt_PDFTubebJmpVert || tt_PDFTubeCalcPosYAbove() >= tt_PDFTubescrlY + 16)) y = tt_PDFTubeDoPosYAbove(); else if(!tt_PDFTubeaV[ABOVE] && tt_PDFTubebJmpVert && tt_PDFTubeCalcPosYBelow() > tt_PDFTubemaxPosY - 16) y = tt_PDFTubeDoPosYAbove(); else y = tt_PDFTubeDoPosYBelow(); // Snap to other side of mouse if tip would extend past window boundary if(y > tt_PDFTubemaxPosY) y = tt_PDFTubeDoPosYAbove(); if(y < tt_PDFTubescrlY) y = tt_PDFTubeDoPosYBelow(); return y; } function tt_PDFTubeDoPosYBelow() { tt_PDFTubebJmpVert = tt_PDFTubeaV[ABOVE]; return tt_PDFTubeCalcPosYBelow(); } function tt_PDFTubeDoPosYAbove() { tt_PDFTubebJmpVert = !tt_PDFTubeaV[ABOVE]; return tt_PDFTubeCalcPosYAbove(); } function tt_PDFTubeCalcPosYBelow() { return(tt_PDFTubemusY + tt_PDFTubeaV[OFFSETY]); } function tt_PDFTubeCalcPosYAbove() { var dy = tt_PDFTubeaV[OFFSETY] - (tt_PDFTubeaV[SHADOW] ? tt_PDFTubeaV[SHADOWWIDTH] : 0); if(tt_PDFTubeaV[OFFSETY] > 0 && dy <= 0) dy = 1; return(tt_PDFTubemusY - tt_PDFTubeh - dy); } function tt_PDFTubeOnOut() { tt_PDFTubeAddRemOutFnc(false); if(!(tt_PDFTubeaV[STICKY] && (tt_PDFTubeiState & 0x2))) tt_PDFTubeHideInit(); } function tt_PDFTubeHideInit() { tt_PDFTubeExtCallFncs(0, "HideInit"); tt_PDFTubeiState &= ~0x4; if(tt_PDFTubeflagOpa && tt_PDFTubeaV[FADEOUT]) { tt_PDFTubetFade.EndTimer(); if(tt_PDFTubeopa) { var n = Math.round(tt_PDFTubeaV[FADEOUT] / (tt_PDFTubeaV[FADEINTERVAL] * (tt_PDFTubeaV[OPACITY] / tt_PDFTubeopa))); tt_PDFTubeFade(tt_PDFTubeopa, tt_PDFTubeopa, 0, n); return; } } tt_PDFTubetHide.Timer("tt_PDFTubeHide();", 1, false); } function tt_PDFTubeOpReHref() { if(tt_PDFTubeelDeHref) { tt_PDFTubeelDeHref.setAttribute("href", tt_PDFTubeelDeHref.t_href); tt_PDFTubeRemEvtFnc(tt_PDFTubeelDeHref, "mousedown", tt_PDFTubeOpReHref); window.status = tt_PDFTubeelDeHref.t_stats; tt_PDFTubeelDeHref = null; } } function tt_PDFTubeFade(a, now, z, n) { if(n) { now += Math.round((z - now) / n); if((z > a) ? (now >= z) : (now <= z)) now = z; else tt_PDFTubetFade.Timer("tt_PDFTubeFade(" + a + "," + now + "," + z + "," + (n - 1) + ")", tt_PDFTubeaV[FADEINTERVAL], true); } now ? tt_PDFTubeSetTipOpa(now) : tt_PDFTubeHide(); } // To circumvent the opacity nesting flaws of IE, we set the opacity // for each sub-DIV separately, rather than for the container DIV. function tt_PDFTubeSetTipOpa(opa) { tt_PDFTubeSetOpa(tt_PDFTubeaElt[5].style, opa); if(tt_PDFTubeaElt[1]) tt_PDFTubeSetOpa(tt_PDFTubeaElt[1].style, opa); if(tt_PDFTubeaV[SHADOW]) { opa = Math.round(opa * 0.8); tt_PDFTubeSetOpa(tt_PDFTubeaElt[7].style, opa); tt_PDFTubeSetOpa(tt_PDFTubeaElt[8].style, opa); } } function tt_PDFTubeOnCloseBtnOver(iOver) { var css = tt_PDFTubeaElt[4].style; iOver <<= 1; css.background = tt_PDFTubeaV[CLOSEBTNCOLORS][iOver]; css.color = tt_PDFTubeaV[CLOSEBTNCOLORS][iOver + 1]; } function tt_PDFTubeInt(x) { var y; return(isNaN(y = parseInt(x)) ? 0 : y); } // Adds or removes the document.mousemove or HoveredElem.mouseout handler // conveniently. Keeps track of those handlers to prevent them from being // set or removed redundantly. function tt_PDFTubeAddRemOutFnc(bAdd) { var PSet = bAdd ? tt_PDFTubeAddEvtFnc : tt_PDFTubeRemEvtFnc; if(bAdd != tt_PDFTubeAddRemOutFnc.bOn) { PSet(tt_PDFTubeover, "mouseout", tt_PDFTubeOnOut); tt_PDFTubeAddRemOutFnc.bOn = bAdd; if(!bAdd) tt_PDFTubeOpReHref(); } } tt_PDFTubeAddRemOutFnc.bOn = false; 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_PDFTubeSetOpa(css, opa) { tt_PDFTubeopa = opa; if(tt_PDFTubeflagOpa == 1) { // Hack for bugs of IE: // A DIV cannot be made visible in a single step if an opacity < 100 // has been applied while the DIV was hidden. // Moreover, in IE6, applying an opacity < 100 has no effect if the // concerned element has no layout (position, size, zoom, ...). if(opa < 100) { var bVis = css.visibility != "hidden"; css.zoom = "100%"; if(!bVis) css.visibility = "visible"; css.filter = "alpha(opacity=" + opa + ")"; if(!bVis) css.visibility = "hidden"; } else css.filter = ""; } else { opa /= 100.0; switch(tt_PDFTubeflagOpa) { 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_PDFTubeMovDomNode(el, dadFrom, dadTo) { if(dadFrom) dadFrom.removeChild(el); if(dadTo) dadTo.appendChild(el); } function tt_PDFTubeErr(sErr) { if(tt_PDFTubeDebug) alert("Tooltip Script Error Message:\n\n" + sErr); } //=========== DEALING WITH EXTENSIONS ==============// function tt_PDFTubeExtCmdEnum() { var s; // Add new command(s) to the commands enum for(var i in configPDFTube) { s = "window." + i.toString().toUpperCase(); if(eval("typeof(" + s + ") == tt_PDFTubeu")) { eval(s + " = " + tt_PDFTubeaV.length); tt_PDFTubeaV[tt_PDFTubeaV.length] = null; } } } function tt_PDFTubeExtCallFncs(arg, sFnc) { var b = false; for(var i = tt_PDFTubeaExt.length; i;) {--i; var fnc = tt_PDFTubeaExt[i]["On" + sFnc]; // Call the method the extension has defined for this event if(fnc && fnc(arg)) b = true; } return b; } tt_PDFTubeInit();