var hs = { lang: { cssDirection: "ltr", loadingText: "Loading...", loadingTitle: "Click to cancel", focusTitle: "Click to bring to front", fullExpandTitle: "Expand to actual size (f)", creditsText: "Powered by <i>Highslide JS</i>", creditsTitle: "Go to the Highslide JS homepage", previousText: "Previous", nextText: "Next", moveText: "Move", closeText: "Close", closeTitle: "Close (esc)", resizeTitle: "Resize", playText: "Play", playTitle: "Play slideshow (spacebar)", pauseText: "Pause", pauseTitle: "Pause slideshow (spacebar)", previousTitle: "Previous (arrow left)", nextTitle: "Next (arrow right)", moveTitle: "Move", fullExpandText: "1:1", restoreTitle: "Click to close image, click and drag to move" }, graphicsDir: "highslide/graphics/", expandCursor: "zoomin.cur", restoreCursor: "zoomout.cur", expandDuration: 250, restoreDuration: 250, marginLeft: 15, marginRight: 15, marginTop: 15, marginBottom: 15, zIndexCounter: 1001, loadingOpacity: 0.75, allowMultipleInstances: true, padToMinWidth: false, fullExpandPosition: "bottom right", fullExpandOpacity: 1, showCredits: true, creditsHref: "http://highslide.com/", creditsTarget: "_self", openerTagNames: ["a"], allowWidthReduction: false, allowHeightReduction: true, preserveContent: true, cacheAjax: true, dragByHeading: true, minWidth: 200, minHeight: 200, allowSizeReduction: true, skin: { contentWrapper: "" }, expanders: [], overrides: ["allowSizeReduction", "useBox", "captionId", "captionText", "captionEval", "captionOverlay", "headingId", "headingText", "headingEval", "headingOverlay", "creditsPosition", "dragByHeading", "width", "height", "contentId", "allowWidthReduction", "allowHeightReduction", "preserveContent", "objectType", "cacheAjax", "wrapperClassName", "minWidth", "minHeight", "maxWidth", "maxHeight", "slideshowGroup", "easing", "easingClose", "fadeInOut", "src"], overlays: [], idCounter: 0, oPos: { x: ["leftpanel", "left", "center", "right", "rightpanel"], y: ["above", "top", "middle", "bottom", "below"] }, mouse: {}, headingOverlay: {}, captionOverlay: {}, timers: [], sleeping: [], preloadTheseAjax: [], cacheBindings: [], cachedGets: {}, clones: {}, onReady: [], uaVersion: parseFloat((navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [0, "0"])[1]), ie: (document.all && !window.opera), safari: /Safari/.test(navigator.userAgent), geckoMac: /Macintosh.+rv:1\.[0-8].+Gecko/.test(navigator.userAgent), $: function (a) { if (a) { return document.getElementById(a) } }, push: function (a, b) { a[a.length] = b }, createElement: function (a, f, e, d, c) { var b = document.createElement(a); if (f) { hs.extend(b, f) } if (c) { hs.setStyles(b, { padding: 0, border: "none", margin: 0 }) } if (e) { hs.setStyles(b, e) } if (d) { d.appendChild(b) } return b }, extend: function (b, c) { for (var a in c) { b[a] = c[a] } return b }, setStyles: function (b, c) { for (var a in c) { if (hs.ie && a == "opacity") { if (c[a] > 0.99) { b.style.removeAttribute("filter") } else { b.style.filter = "alpha(opacity=" + (c[a] * 100) + ")" } } else { b.style[a] = c[a] } } }, animate: function (f, a, d) { var c, g, j; if (typeof d != "object" || d === null) { var i = arguments; d = { duration: i[2], easing: i[3], complete: i[4]} } if (typeof d.duration != "number") { d.duration = 250 } d.easing = Math[d.easing] || Math.easeInQuad; d.curAnim = hs.extend({}, a); for (var b in a) { var h = new hs.fx(f, d, b); c = parseFloat(hs.css(f, b)) || 0; g = parseFloat(a[b]); j = b != "opacity" ? "px" : ""; h.custom(c, g, j) } }, css: function (a, c) { if (document.defaultView) { return document.defaultView.getComputedStyle(a, null).getPropertyValue(c) } else { if (c == "opacity") { c = "filter" } var b = a.currentStyle[c.replace(/\-(\w)/g, function (e, d) { return d.toUpperCase() })]; if (c == "filter") { b = b.replace(/alpha\(opacity=([0-9]+)\)/, function (e, d) { return d / 100 }) } return b === "" ? 1 : b } }, getPageSize: function () { var f = document, b = window, e = f.compatMode && f.compatMode != "BackCompat" ? f.documentElement : f.body; var c = hs.ie ? e.clientWidth : (f.documentElement.clientWidth || self.innerWidth), a = hs.ie ? e.clientHeight : self.innerHeight; hs.page = { width: c, height: a, scrollLeft: hs.ie ? e.scrollLeft : pageXOffset, scrollTop: hs.ie ? e.scrollTop : pageYOffset} }, getPosition: function (a) { var b = { x: a.offsetLeft, y: a.offsetTop }; while (a.offsetParent) { a = a.offsetParent; b.x += a.offsetLeft; b.y += a.offsetTop; if (a != document.body && a != document.documentElement) { b.x -= a.scrollLeft; b.y -= a.scrollTop } } return b }, expand: function (b, h, f, d) { if (!b) { b = hs.createElement("a", null, { display: "none" }, hs.container) } if (typeof b.getParams == "function") { return h } if (d == "html") { for (var c = 0; c < hs.sleeping.length; c++) { if (hs.sleeping[c] && hs.sleeping[c].a == b) { hs.sleeping[c].awake(); hs.sleeping[c] = null; return false } } } try { new hs.Expander(b, h, f, d); return false } catch (g) { return true } }, htmlExpand: function (b, d, c) { return hs.expand(b, d, c, "html") }, getSelfRendered: function () { return hs.createElement("div", { className: "highslide-html-content", innerHTML: hs.replaceLang(hs.skin.contentWrapper) }) }, getElementByClass: function (e, c, d) { var b = e.getElementsByTagName(c); for (var a = 0; a < b.length; a++) { if ((new RegExp(d)).test(b[a].className)) { return b[a] } } return null }, replaceLang: function (c) { c = c.replace(/\s/g, " "); var b = /{hs\.lang\.([^}]+)\}/g, d = c.match(b), e; if (d) { for (var a = 0; a < d.length; a++) { e = d[a].replace(b, "$1"); if (typeof hs.lang[e] != "undefined") { c = c.replace(d[a], hs.lang[e]) } } } return c }, getCacheBinding: function (b) { for (var d = 0; d < hs.cacheBindings.length; d++) { if (hs.cacheBindings[d][0] == b) { var e = hs.cacheBindings[d][1]; hs.cacheBindings[d][1] = e.cloneNode(1); return e } } return null }, preloadAjax: function (f) { var b = hs.getAnchors(); for (var d = 0; d < b.htmls.length; d++) { var c = b.htmls[d]; if (hs.getParam(c, "objectType") == "ajax" && hs.getParam(c, "cacheAjax")) { hs.push(hs.preloadTheseAjax, c) } } hs.preloadAjaxElement(0) }, preloadAjaxElement: function (d) { if (!hs.preloadTheseAjax[d]) { return } var b = hs.preloadTheseAjax[d]; var c = hs.getNode(hs.getParam(b, "contentId")); if (!c) { c = hs.getSelfRendered() } var e = new hs.Ajax(b, c, 1); e.onError = function () { }; e.onLoad = function () { hs.push(hs.cacheBindings, [b, c]); hs.preloadAjaxElement(d + 1) }; e.run() }, focusTopmost: function () { var c = 0, b = -1, a = hs.expanders, e, f; for (var d = 0; d < a.length; d++) { e = a[d]; if (e) { f = e.wrapper.style.zIndex; if (f && f > c) { c = f; b = d } } } if (b == -1) { hs.focusKey = -1 } else { a[b].focus() } }, getParam: function (b, d) { b.getParams = b.onclick; var c = b.getParams ? b.getParams() : null; b.getParams = null; return (c && typeof c[d] != "undefined") ? c[d] : (typeof hs[d] != "undefined" ? hs[d] : null) }, getSrc: function (b) { var c = hs.getParam(b, "src"); if (c) { return c } return b.href }, getNode: function (e) { var c = hs.$(e), d = hs.clones[e], b = {}; if (!c && !d) { return null } if (!d) { d = c.cloneNode(true); d.id = ""; hs.clones[e] = d; return c } else { return d.cloneNode(true) } }, discardElement: function (a) { if (a) { hs.garbageBin.appendChild(a) } hs.garbageBin.innerHTML = "" }, registerOverlay: function (a) { hs.push(hs.overlays, hs.extend(a, { hsId: "hsId" + hs.idCounter++ })) }, getWrapperKey: function (c, b) { var e, d = /^highslide-wrapper-([0-9]+)$/; e = c; while (e.parentNode) { if (e.id && d.test(e.id)) { return e.id.replace(d, "$1") } e = e.parentNode } if (!b) { e = c; while (e.parentNode) { if (e.tagName && hs.isHsAnchor(e)) { for (var a = 0; a < hs.expanders.length; a++) { var f = hs.expanders[a]; if (f && f.a == e) { return a } } } e = e.parentNode } } return null }, getExpander: function (b, a) { if (typeof b == "undefined") { return hs.expanders[hs.focusKey] || null } if (typeof b == "number") { return hs.expanders[b] || null } if (typeof b == "string") { b = hs.$(b) } return hs.expanders[hs.getWrapperKey(b, a)] || null }, isHsAnchor: function (b) { return (b.onclick && b.onclick.toString().replace(/\s/g, " ").match(/hs.(htmlE|e)xpand/)) }, reOrder: function () { for (var a = 0; a < hs.expanders.length; a++) { if (hs.expanders[a] && hs.expanders[a].isExpanded) { hs.focusTopmost() } } }, mouseClickHandler: function (d) { if (!d) { d = window.event } if (d.button > 1) { return true } if (!d.target) { d.target = d.srcElement } var b = d.target; while (b.parentNode && !(/highslide-(image|move|html|resize)/.test(b.className))) { b = b.parentNode } var f = hs.getExpander(b); if (f && (f.isClosing || !f.isExpanded)) { return true } if (f && d.type == "mousedown") { if (d.target.form) { return true } var a = b.className.match(/highslide-(image|move|resize)/); if (a) { hs.dragArgs = { exp: f, type: a[1], left: f.x.pos, width: f.x.size, top: f.y.pos, height: f.y.size, clickX: d.clientX, clickY: d.clientY }; hs.addEventListener(document, "mousemove", hs.dragHandler); if (d.preventDefault) { d.preventDefault() } if (/highslide-(image|html)-blur/.test(f.content.className)) { f.focus(); hs.hasFocused = true } return false } else { if (/highslide-html/.test(b.className) && hs.focusKey != f.key) { f.focus() } } } else { if (d.type == "mouseup") { hs.removeEventListener(document, "mousemove", hs.dragHandler); if (hs.dragArgs) { if (hs.styleRestoreCursor && hs.dragArgs.type == "image") { hs.dragArgs.exp.content.style.cursor = hs.styleRestoreCursor } var c = hs.dragArgs.hasDragged; if (!c && !hs.hasFocused && !/(move|resize)/.test(hs.dragArgs.type)) { f.close() } hs.hasFocused = false; hs.dragArgs = null } else { if (/highslide-image-blur/.test(b.className)) { b.style.cursor = hs.styleRestoreCursor } } } } return false }, dragHandler: function (c) { if (!hs.dragArgs) { return true } if (!c) { c = window.event } var b = hs.dragArgs, d = b.exp; b.dX = c.clientX - b.clickX; b.dY = c.clientY - b.clickY; var f = Math.sqrt(Math.pow(b.dX, 2) + Math.pow(b.dY, 2)); if (!b.hasDragged) { b.hasDragged = (b.type != "image" && f > 0) || (f > (hs.dragSensitivity || 5)) } if (b.hasDragged && c.clientX > 5 && c.clientY > 5) { if (b.type == "resize") { d.resize(b) } else { d.moveTo(b.left + b.dX, b.top + b.dY); if (b.type == "image") { d.content.style.cursor = "move" } } } return false }, wrapperMouseHandler: function (c) { try { if (!c) { c = window.event } var b = /mouseover/i.test(c.type); if (!c.target) { c.target = c.srcElement } if (hs.ie) { c.relatedTarget = b ? c.fromElement : c.toElement } var d = hs.getExpander(c.target); if (!d.isExpanded) { return } if (!d || !c.relatedTarget || hs.getExpander(c.relatedTarget, true) == d || hs.dragArgs) { return } for (var a = 0; a < d.overlays.length; a++) { (function () { var e = hs.$("hsId" + d.overlays[a]); if (e && e.hideOnMouseOut) { if (b) { hs.setStyles(e, { visibility: "visible", display: "" }) } hs.animate(e, { opacity: b ? e.opacity : 0 }, e.dur) } })() } } catch (c) { } }, addEventListener: function (a, c, b) { if (a == document && c == "ready") { hs.push(hs.onReady, b) } try { a.addEventListener(c, b, false) } catch (d) { try { a.detachEvent("on" + c, b); a.attachEvent("on" + c, b) } catch (d) { a["on" + c] = b } } }, removeEventListener: function (a, c, b) { try { a.removeEventListener(c, b, false) } catch (d) { try { a.detachEvent("on" + c, b) } catch (d) { a["on" + c] = null } } }, init: function () { if (!hs.container) { hs.getPageSize(); hs.ieLt7 = hs.ie && hs.uaVersion < 7; hs.ie6SSL = hs.ieLt7 && location.protocol == "https:"; for (var a in hs.langDefaults) { if (typeof hs[a] != "undefined") { hs.lang[a] = hs[a] } else { if (typeof hs.lang[a] == "undefined" && typeof hs.langDefaults[a] != "undefined") { hs.lang[a] = hs.langDefaults[a] } } } hs.container = hs.createElement("div", { className: "highslide-container" }, { position: "absolute", left: 0, top: 0, width: "100%", zIndex: hs.zIndexCounter, direction: "ltr" }, document.body, true); hs.loading = hs.createElement("a", { className: "highslide-loading", title: hs.lang.loadingTitle, innerHTML: hs.lang.loadingText, href: "javascript:;" }, { position: "absolute", top: "-9999px", opacity: hs.loadingOpacity, zIndex: 1 }, hs.container); hs.garbageBin = hs.createElement("div", null, { display: "none" }, hs.container); hs.clearing = hs.createElement("div", null, { clear: "both", paddingTop: "1px" }, null, true); Math.linearTween = function (f, e, h, g) { return h * f / g + e }; Math.easeInQuad = function (f, e, h, g) { return h * (f /= g) * f + e } } }, ready: function () { if (hs.isReady) { return } hs.isReady = true; for (var a = 0; a < hs.onReady.length; a++) { hs.onReady[a]() } }, updateAnchors: function () { var a, d, l = [], h = [], k = [], b = {}, m; for (var e = 0; e < hs.openerTagNames.length; e++) { d = document.getElementsByTagName(hs.openerTagNames[e]); for (var c = 0; c < d.length; c++) { a = d[c]; m = hs.isHsAnchor(a); if (m) { hs.push(l, a); if (m[0] == "hs.expand") { hs.push(h, a) } else { if (m[0] == "hs.htmlExpand") { hs.push(k, a) } } var f = hs.getParam(a, "slideshowGroup") || "none"; if (!b[f]) { b[f] = [] } hs.push(b[f], a) } } } hs.anchors = { all: l, groups: b, images: h, htmls: k }; return hs.anchors }, getAnchors: function () { return hs.anchors || hs.updateAnchors() }, close: function (a) { var b = hs.getExpander(a); if (b) { b.close() } return false } }; hs.fx = function (b, a, c) { this.options = a; this.elem = b; this.prop = c; if (!a.orig) { a.orig = {} } }; hs.fx.prototype = { update: function () { (hs.fx.step[this.prop] || hs.fx.step._default)(this); if (this.options.step) { this.options.step.call(this.elem, this.now, this) } }, custom: function (e, d, c) { this.startTime = (new Date()).getTime(); this.start = e; this.end = d; this.unit = c; this.now = this.start; this.pos = this.state = 0; var a = this; function b(f) { return a.step(f) } b.elem = this.elem; if (b() && hs.timers.push(b) == 1) { hs.timerId = setInterval(function () { var g = hs.timers; for (var f = 0; f < g.length; f++) { if (!g[f]()) { g.splice(f--, 1) } } if (!g.length) { clearInterval(hs.timerId) } }, 13) } }, step: function (d) { var c = (new Date()).getTime(); if (d || c >= this.options.duration + this.startTime) { this.now = this.end; this.pos = this.state = 1; this.update(); this.options.curAnim[this.prop] = true; var a = true; for (var b in this.options.curAnim) { if (this.options.curAnim[b] !== true) { a = false } } if (a) { if (this.options.complete) { this.options.complete.call(this.elem) } } return false } else { var e = c - this.startTime; this.state = e / this.options.duration; this.pos = this.options.easing(e, 0, 1, this.options.duration); this.now = this.start + ((this.end - this.start) * this.pos); this.update() } return true } }; hs.extend(hs.fx, { step: { opacity: function (a) { hs.setStyles(a.elem, { opacity: a.now }) }, _default: function (a) { if (a.elem.style && a.elem.style[a.prop] != null) { a.elem.style[a.prop] = a.now + a.unit } else { a.elem[a.prop] = a.now } } } }); hs.Dimension = function (b, a) { this.exp = b; this.dim = a; this.ucwh = a == "x" ? "Width" : "Height"; this.wh = this.ucwh.toLowerCase(); this.uclt = a == "x" ? "Left" : "Top"; this.lt = this.uclt.toLowerCase(); this.ucrb = a == "x" ? "Right" : "Bottom"; this.rb = this.ucrb.toLowerCase(); this.p1 = this.p2 = 0 }; hs.Dimension.prototype = { get: function (a) { switch (a) { case "loadingPos": return this.tpos + this.tb + (this.t - hs.loading["offset" + this.ucwh]) / 2; case "wsize": return this.size + 2 * this.cb + this.p1 + this.p2; case "fitsize": return this.clientSize - this.marginMin - this.marginMax; case "maxsize": return this.get("fitsize") - 2 * this.cb - this.p1 - this.p2; case "opos": return this.pos; case "osize": return this.get("wsize"); case "imgPad": return this.imgSize ? Math.round((this.size - this.imgSize) / 2) : 0 } }, calcBorders: function () { this.cb = (this.exp.content["offset" + this.ucwh] - this.t) / 2; this.marginMax = hs["margin" + this.ucrb] }, calcThumb: function () { this.t = this.exp.el[this.wh] ? parseInt(this.exp.el[this.wh]) : this.exp.el["offset" + this.ucwh]; this.tpos = this.exp.tpos[this.dim]; this.tb = (this.exp.el["offset" + this.ucwh] - this.t) / 2; if (this.tpos < 1) { this.tpos = (hs.page[this.wh] / 2) + hs.page["scroll" + this.uclt] } }, calcExpanded: function () { var a = this.exp; this.justify = "auto"; this.pos = this.tpos - this.cb + this.tb; this.size = Math.min(this.full, a["max" + this.ucwh] || this.full); this.minSize = a.allowSizeReduction ? Math.min(a["min" + this.ucwh], this.full) : this.full; if (a.isImage && a.useBox) { this.size = a[this.wh]; this.imgSize = this.full } if (this.dim == "x" && hs.padToMinWidth) { this.minSize = a.minWidth } this.marginMin = hs["margin" + this.uclt]; this.scroll = hs.page["scroll" + this.uclt]; this.clientSize = hs.page[this.wh] }, setSize: function (a) { var c = this.exp; if (c.isImage && (c.useBox || hs.padToMinWidth)) { this.imgSize = a; this.size = Math.max(this.size, this.imgSize); c.content.style[this.lt] = this.get("imgPad") + "px" } else { this.size = a } c.content.style[this.wh] = a + "px"; c.wrapper.style[this.wh] = this.get("wsize") + "px"; if (c.isHtml) { var b = c.scrollerDiv; if (this.sizeDiff === undefined) { this.sizeDiff = c.innerContent["offset" + this.ucwh] - b["offset" + this.ucwh] } b.style[this.wh] = (this.size - this.sizeDiff) + "px"; if (this.dim == "x") { c.mediumContent.style.width = "auto" } if (c.body) { c.body.style[this.wh] = "auto" } } if (this.dim == "x" && c.overlayBox) { c.sizeOverlayBox(true) } }, setPos: function (a) { this.pos = a; this.exp.wrapper.style[this.lt] = a + "px" } }; hs.Expander = function (j, e, b, k) {if (document.readyState && hs.ie && !hs.isReady) { hs.addEventListener(document, "ready", function () { new hs.Expander(j, e, b, k) }); return } this.a = j; this.custom = b; this.contentType = k || "image"; this.isHtml = (k == "html"); this.isImage = !this.isHtml; this.overlays = []; hs.init(); var l = this.key = hs.expanders.length; for (var f = 0; f < hs.overrides.length; f++) { var c = hs.overrides[f]; this[c] = e && typeof e[c] != "undefined" ? e[c] : hs[c] }if (!this.src) { this.src = j.href } var d = (e && e.thumbnailId) ? hs.$(e.thumbnailId) : j; d = this.thumb = d.getElementsByTagName("img")[0] || d; this.thumbsUserSetId = d.id || j.id; for (var f = 0; f < hs.expanders.length; f++) { if (hs.expanders[f] && hs.expanders[f].a == j) { hs.expanders[f].focus(); return false } } if (!hs.allowSimultaneousLoading) { for (var f = 0; f < hs.expanders.length; f++) { if (hs.expanders[f] && hs.expanders[f].thumb != d && !hs.expanders[f].onLoadStarted) { hs.expanders[f].cancelLoading() } } } hs.expanders[l] = this; if (!hs.allowMultipleInstances && !hs.upcoming) { if (hs.expanders[l - 1]) { hs.expanders[l - 1].close() } if (typeof hs.focusKey != "undefined" && hs.expanders[hs.focusKey]) { hs.expanders[hs.focusKey].close() } } this.el = d; this.tpos = hs.getPosition(d); hs.getPageSize(); var h = this.x = new hs.Dimension(this, "x"); h.calcThumb(); var g = this.y = new hs.Dimension(this, "y"); g.calcThumb(); this.wrapper = hs.createElement("div", { id: "highslide-wrapper-" + this.key, className: "highslide-wrapper " + this.wrapperClassName }, { visibility: "hidden", position: "absolute", zIndex: hs.zIndexCounter += 2 }, null, true); this.wrapper.onmouseover = this.wrapper.onmouseout = hs.wrapperMouseHandler;this[this.contentType + "Create"](); return true}; hs.Expander.prototype = { error: function (a) { window.location.href = this.src }, showLoading: function () { if (this.onLoadStarted || this.loading) { return } this.loading = hs.loading; var c = this; this.loading.onclick = function () { c.cancelLoading() }; var c = this, a = this.x.get("loadingPos") + "px", b = this.y.get("loadingPos") + "px"; setTimeout(function () { if (c.loading) { hs.setStyles(c.loading, { left: a, top: b, zIndex: hs.zIndexCounter++ }) } }, 100) }, imageCreate: function () { var b = this; var a = document.createElement("img"); this.content = a; a.onload = function () { if (hs.expanders[b.key]) { b.contentLoaded() } }; if (hs.blockRightClick) { a.oncontextmenu = function () { return false } } a.className = "highslide-image"; hs.setStyles(a, { visibility: "hidden", display: "block", position: "absolute", maxWidth: "9999px", zIndex: 3 }); a.title = hs.lang.restoreTitle; if (hs.safari) { hs.container.appendChild(a) } if (hs.ie && hs.flushImgSize) { a.src = null } a.src = this.src; this.showLoading() }, htmlCreate: function () {this.content = hs.getCacheBinding(this.a); if (!this.content) { this.content = hs.getNode(this.contentId) } if (!this.content) { this.content = hs.getSelfRendered() } var c = this.innerContent = this.content; hs.container.appendChild(this.wrapper); hs.setStyles(this.wrapper, { position: "static", padding: "0 " + hs.marginRight + "px 0 " + hs.marginLeft + "px" }); this.content = hs.createElement("div", { className: "highslide-html" }, { position: "relative", zIndex: 3, overflow: "hidden" }, this.wrapper); this.mediumContent = hs.createElement("div", null, null, this.content, 1); this.mediumContent.appendChild(c); hs.setStyles(c, { position: "relative", display: "block", direction: hs.lang.cssDirection || "" }); if (this.width) { c.style.width = this.width + "px" } if (this.height) { hs.setStyles(c, { height: this.height + "px", overflow: "hidden" }) } if (c.offsetWidth < this.minWidth) { c.style.width = this.minWidth + "px" } if (this.objectType == "ajax" && !hs.getCacheBinding(this.a)) {this.showLoading(); var a = new hs.Ajax(this.a, c); var b = this; a.onLoad = function () { if (hs.expanders[b.key]) { b.contentLoaded() } }; a.onError = function () { location.href = b.src };a.run(this.src)}else{this.contentLoaded()}},contentLoaded:function(){try{if(!this.content){return}this.content.onload=null;if(this.onLoadStarted){return}else{this.onLoadStarted=true}var a=this.x,d=this.y;if(this.loading){hs.setStyles(this.loading,{top:"-9999px"});this.loading=null}if(this.isImage){a.full=this.content.width;d.full=this.content.height;hs.setStyles(this.content,{width:a.t+"px",height:d.t+"px"});this.wrapper.appendChild(this.content);hs.container.appendChild(this.wrapper)}else{if(this.htmlGetSize){this.htmlGetSize()}}a.calcBorders();d.calcBorders();hs.setStyles(this.wrapper,{left:(a.tpos+a.tb-a.cb)+"px",top:(d.tpos+a.tb-d.cb)+"px"});this.getOverlays();var b=a.full/d.full;a.calcExpanded();this.justify(a);d.calcExpanded();this.justify(d);if(this.isHtml){this.htmlSizeOperations()}if(this.overlayBox){this.sizeOverlayBox(0,1)}if(this.allowSizeReduction){if(this.isImage){this.correctRatio(b)}else{this.fitOverlayBox()}if(this.isImage&&this.x.full>(this.x.imgSize||this.x.size)){this.createFullExpand();if(this.overlays.length==1){this.sizeOverlayBox()}}}this.show()}catch(c){this.error(c)}},htmlGetSize:function(){this.innerContent.appendChild(hs.clearing);if(!this.x.full){this.x.full=this.innerContent.offsetWidth}this.y.full=this.innerContent.offsetHeight;this.innerContent.removeChild(hs.clearing);if(hs.ie&&this.newHeight>parseInt(this.innerContent.currentStyle.height)){this.newHeight=parseInt(this.innerContent.currentStyle.height)}hs.setStyles(this.wrapper,{position:"absolute",padding:"0"});hs.setStyles(this.content,{width:this.x.t+"px",height:this.y.t+"px"})},htmlSizeOperations:function(){if(this.x.size<this.x.full&&!this.allowWidthReduction){this.x.size=this.x.full}if(this.y.size<this.y.full&&!this.allowHeightReduction){this.y.size=this.y.full}this.scrollerDiv=this.innerContent;hs.setStyles(this.mediumContent,{position:"relative",width:this.x.size+"px"});hs.setStyles(this.innerContent,{border:"none",width:"auto",height:"auto"});var e=hs.getElementByClass(this.innerContent,"DIV","highslide-block");if(e){var b=e;e=hs.createElement(b.nodeName,null,{overflow:"hidden"},null,true);b.parentNode.insertBefore(e,b);e.appendChild(hs.clearing);e.appendChild(b);var c=this.innerContent.offsetWidth-e.offsetWidth;var a=this.innerContent.offsetHeight-e.offsetHeight;e.removeChild(hs.clearing);var d=hs.safari||navigator.vendor=="KDE"?1:0;hs.setStyles(e,{width:(this.x.size-c-d)+"px",height:(this.y.size-a)+"px",overflow:"auto",position:"relative"});if(d&&b.offsetHeight>e.offsetHeight){e.style.width=(parseInt(e.style.width)+d)+"px"}this.scrollingContent=e;this.scrollerDiv=this.scrollingContent}if(!this.scrollingContent&&this.y.size<this.mediumContent.offsetHeight){this.scrollerDiv=this.content}if(this.scrollerDiv==this.content&&!this.allowWidthReduction&&!/(iframe|swf)/.test(this.objectType)){this.x.size+=17}if(this.scrollerDiv&&this.scrollerDiv.offsetHeight>this.scrollerDiv.parentNode.offsetHeight){setTimeout("try { hs.expanders["+this.key+"].scrollerDiv.style.overflow = 'auto'; } catch(e) {}",hs.expandDuration)}},justify:function(f,b){var g,h=f.target,e=f==this.x?"x":"y";var d=false;var a=f.exp.allowSizeReduction;f.pos=Math.round(f.pos-((f.get("wsize")-f.t)/2));if(f.pos<f.scroll+f.marginMin){f.pos=f.scroll+f.marginMin;d=true}if(!b&&f.size<f.minSize){f.size=f.minSize;a=false}if(f.pos+f.get("wsize")>f.scroll+f.clientSize-f.marginMax){if(!b&&d&&a){f.size=f.get(e=="y"?"fitsize":"maxsize")}else{if(f.get("wsize")<f.get("fitsize")){f.pos=f.scroll+f.clientSize-f.marginMax-f.get("wsize")}else{f.pos=f.scroll+f.marginMin;if(!b&&a){f.size=f.get(e=="y"?"fitsize":"maxsize")}}}}if(!b&&f.size<f.minSize){f.size=f.minSize;a=false}if(f.pos<f.marginMin){var c=f.pos;f.pos=f.marginMin;if(a&&!b){f.size=f.size-(f.pos-c)}}},correctRatio:function(c){var a=this.x,g=this.y,e=false,d=Math.min(a.full,a.size),b=Math.min(g.full,g.size),f=(this.useBox||hs.padToMinWidth);if(d/b>c){d=b*c;if(d<a.minSize){d=a.minSize;b=d/c}e=true}else{if(d/b<c){b=d/c;e=true}}if(hs.padToMinWidth&&a.full<a.minSize){a.imgSize=a.full;g.size=g.imgSize=g.full}else{if(this.useBox){a.imgSize=d;g.imgSize=b}else{a.size=d;g.size=b}}this.fitOverlayBox(f?null:c);if(f&&g.size<g.imgSize){g.imgSize=g.size;a.imgSize=g.size*c}if(e||f){a.pos=a.tpos-a.cb+a.tb;a.minSize=a.size;this.justify(a,true);g.pos=g.tpos-g.cb+g.tb;g.minSize=g.size;this.justify(g,true);if(this.overlayBox){this.sizeOverlayBox()}}},fitOverlayBox:function(b){var a=this.x,c=this.y;if(this.overlayBox){while(c.size>this.minHeight&&a.size>this.minWidth&&c.get("wsize")>c.get("fitsize")){c.size-=10;if(b){a.size=c.size*b}this.sizeOverlayBox(0,1)}}},show:function(){var a=this.x,b=this.y;this.changeSize(1,{wrapper:{width:a.get("wsize"),height:b.get("wsize"),left:a.pos,top:b.pos},content:{left:a.p1+a.get("imgPad"),top:b.p1+b.get("imgPad"),width:a.imgSize||a.size,height:b.imgSize||b.size}},hs.expandDuration)},changeSize:function(b,h,c){if(!b){this.destroyOverlays()}var e=this,a=e.x,g=e.y,f=this.easing;if(!b){f=this.easingClose||f}var d=b?function(){setTimeout(function(){e.afterExpand()},50)}:function(){e.afterClose()};if(b){hs.setStyles(this.wrapper,{width:a.t+"px",height:g.t+"px"})}if(b&&this.isHtml){hs.setStyles(this.wrapper,{left:(a.tpos-a.cb+a.tb)+"px",top:(g.tpos-g.cb+g.tb)+"px"})}if(this.fadeInOut){hs.setStyles(this.wrapper,{opacity:b?0:1});hs.extend(h.wrapper,{opacity:b})}hs.animate(this.wrapper,h.wrapper,{duration:c,easing:f,step:function(j,i){if(e.isHtml){if(i.prop=="left"){e.mediumContent.style.left=(a.pos-j)+"px"}if(i.prop=="top"){e.mediumContent.style.top=(g.pos-j)+"px"}}}});hs.animate(this.content,h.content,c,f,d);if(b){this.wrapper.style.visibility="visible";this.content.style.visibility="visible";if(this.isHtml){this.innerContent.style.visibility="visible"}this.a.className+=" highslide-active-anchor"}},afterExpand:function(){this.isExpanded=true;this.focus();var c=hs.page,b=hs.mouse.x+c.scrollLeft,a=hs.mouse.y+c.scrollTop;this.mouseIsOver=this.x.pos<b&&b<this.x.pos+this.x.get("wsize")&&this.y.pos<a&&a<this.y.pos+this.y.get("wsize");if(this.overlayBox){this.showOverlays()}},cancelLoading:function(){hs.discardElement(this.wrapper);hs.expanders[this.key]=null;if(this.loading){hs.loading.style.left="-9999px"}},writeCredits:function(){this.credits=hs.createElement("a",{href:hs.creditsHref,target:hs.creditsTarget,className:"highslide-credits",innerHTML:hs.lang.creditsText,title:hs.lang.creditsTitle});this.createOverlay({overlayId:this.credits,position:this.creditsPosition||"top left"})},getInline:function(types,addOverlay){for(var i=0;i<types.length;i++){var type=types[i],s=null;if(!this[type+"Id"]&&this.thumbsUserSetId){this[type+"Id"]=type+"-for-"+this.thumbsUserSetId}if(this[type+"Id"]){this[type]=hs.getNode(this[type+"Id"])}if(!this[type]&&!this[type+"Text"]&&this[type+"Eval"]){try{s=eval(this[type+"Eval"])}catch(e){}}if(!this[type]&&this[type+"Text"]){s=this[type+"Text"]}if(!this[type]&&!s){var next=this.a.nextSibling;while(next&&!hs.isHsAnchor(next)){if((new RegExp("highslide-"+type)).test(next.className||null)){this[type]=next.cloneNode(1);break}next=next.nextSibling}}if(!this[type]&&s){this[type]=hs.createElement("div",{className:"highslide-"+type,innerHTML:s})}if(addOverlay&&this[type]){var o={position:(type=="heading")?"above":"below"};for(var x in this[type+"Overlay"]){o[x]=this[type+"Overlay"][x]}o.overlayId=this[type];this.createOverlay(o)}}},focus:function(){this.wrapper.style.zIndex=hs.zIndexCounter+=2;for(var a=0;a<hs.expanders.length;a++){if(hs.expanders[a]&&a==hs.focusKey){var b=hs.expanders[a];b.content.className+=" highslide-"+b.contentType+"-blur";if(b.isImage){b.content.style.cursor=hs.ie?"hand":"pointer";b.content.title=hs.lang.focusTitle}}}this.content.className="highslide-"+this.contentType;if(this.isImage){this.content.title=hs.lang.restoreTitle;if(hs.restoreCursor){hs.styleRestoreCursor=window.opera?"pointer":"url("+hs.graphicsDir+hs.restoreCursor+"), pointer";if(hs.ie&&hs.uaVersion<6){hs.styleRestoreCursor="hand"}this.content.style.cursor=hs.styleRestoreCursor}}hs.focusKey=this.key},moveTo:function(a,b){this.x.setPos(a);this.y.setPos(b)},resize:function(d){var a,b,c=d.width/d.height;a=Math.max(d.width+d.dX,Math.min(this.minWidth,this.x.full));if(this.isImage&&Math.abs(a-this.x.full)<12){a=this.x.full}b=this.isHtml?d.height+d.dY:a/c;if(b<Math.min(this.minHeight,this.y.full)){b=Math.min(this.minHeight,this.y.full);if(this.isImage){a=b*c}}this.resizeTo(a,b)},resizeTo:function(a,b){this.y.setSize(b);this.x.setSize(a)},close:function(){if(this.isClosing||!this.isExpanded){return}this.isClosing=true;try{if(this.isHtml){this.htmlPrepareClose()}this.content.style.cursor="default";this.changeSize(0,{wrapper:{width:this.x.t,height:this.y.t,left:this.x.tpos-this.x.cb+this.x.tb,top:this.y.tpos-this.y.cb+this.y.tb},content:{left:0,top:0,width:this.x.t,height:this.y.t}},hs.restoreDuration)}catch(a){this.afterClose()}},htmlPrepareClose:function(){if(hs.geckoMac){if(!hs.mask){hs.mask=hs.createElement("div",null,{position:"absolute"},hs.container)}hs.setStyles(hs.mask,{width:this.x.size+"px",height:this.y.size+"px",left:this.x.pos+"px",top:this.y.pos+"px",display:"block"})}if(this.objectLoadTime=="after"&&!this.preserveContent){this.destroyObject()}if(this.scrollerDiv&&this.scrollerDiv!=this.scrollingContent){this.scrollerDiv.style.overflow="hidden"}},destroyObject:function(){this.body.innerHTML=""},sleep:function(){this.wrapper.style.display="none";hs.push(hs.sleeping,this)},awake:function(){try{hs.expanders[this.key]=this;if(!hs.allowMultipleInstances&&hs.focusKey!=this.key){try{hs.expanders[hs.focusKey].close()}catch(b){}}var c=hs.zIndexCounter++,a={display:"",zIndex:c};hs.setStyles(this.wrapper,a);this.isClosing=false;this.show()}catch(b){}},createOverlay:function(d){var c=d.overlayId;if(typeof c=="string"){c=hs.getNode(c)}if(d.html){c=hs.createElement("div",{innerHTML:d.html})}if(!c||typeof c=="string"){return}c.style.display="block";this.genOverlayBox();var b=d.width&&/^[0-9]+(px|%)$/.test(d.width)?d.width:"auto";if(/^(left|right)panel$/.test(d.position)&&!/^[0-9]+px$/.test(d.width)){b="200px"}var a=hs.createElement("div",{id:"hsId"+hs.idCounter++,hsId:d.hsId},{position:"absolute",visibility:"hidden",width:b,direction:hs.lang.cssDirection||"",opacity:0},this.overlayBox,true);a.appendChild(c);hs.extend(a,{opacity:1,offsetX:0,offsetY:0,dur:(d.fade===0||d.fade===false||(d.fade==2&&hs.ie))?0:250});hs.extend(a,d);if(this.gotOverlays){this.positionOverlay(a);if(!a.hideOnMouseOut||this.mouseIsOver){hs.animate(a,{opacity:a.opacity},a.dur)}}hs.push(this.overlays,hs.idCounter-1)},positionOverlay:function(c){var d=c.position||"middle center",b=c.offsetX,a=c.offsetY;if(c.parentNode!=this.overlayBox){this.overlayBox.appendChild(c)}if(/left$/.test(d)){c.style.left=b+"px"}if(/center$/.test(d)){hs.setStyles(c,{left:"50%",marginLeft:(b-Math.round(c.offsetWidth/2))+"px"})}if(/right$/.test(d)){c.style.right=-b+"px"}if(/^leftpanel$/.test(d)){hs.setStyles(c,{right:"100%",marginRight:this.x.cb+"px",top:-this.y.cb+"px",bottom:-this.y.cb+"px",overflow:"auto"});this.x.p1=c.offsetWidth}else{if(/^rightpanel$/.test(d)){hs.setStyles(c,{left:"100%",marginLeft:this.x.cb+"px",top:-this.y.cb+"px",bottom:-this.y.cb+"px",overflow:"auto"});this.x.p2=c.offsetWidth}}if(/^top/.test(d)){c.style.top=a+"px"}if(/^middle/.test(d)){hs.setStyles(c,{top:"50%",marginTop:(a-Math.round(c.offsetHeight/2))+"px"})}if(/^bottom/.test(d)){c.style.bottom=-a+"px"}if(/^above$/.test(d)){hs.setStyles(c,{left:(-this.x.p1-this.x.cb)+"px",right:(-this.x.p2-this.x.cb)+"px",bottom:"100%",marginBottom:this.y.cb+"px",width:"auto"});this.y.p1=c.offsetHeight}else{if(/^below$/.test(d)){hs.setStyles(c,{position:"relative",left:(-this.x.p1-this.x.cb)+"px",right:(-this.x.p2-this.x.cb)+"px",top:"100%",marginTop:this.y.cb+"px",width:"auto"});this.y.p2=c.offsetHeight;c.style.position="absolute"}}},getOverlays:function(){this.getInline(["heading","caption"],true);if(this.heading&&this.dragByHeading){this.heading.className+=" highslide-move"}if(hs.showCredits){this.writeCredits()}for(var a=0;a<hs.overlays.length;a++){var d=hs.overlays[a],e=d.thumbnailId,b=d.slideshowGroup;if((!e&&!b)||(e&&e==this.thumbsUserSetId)||(b&&b===this.slideshowGroup)){if(this.isImage||(this.isHtml&&d.useOnHtml)){this.createOverlay(d)}}}var c=[];for(var a=0;a<this.overlays.length;a++){var d=hs.$("hsId"+this.overlays[a]);if(/panel$/.test(d.position)){this.positionOverlay(d)}else{hs.push(c,d)}}for(var a=0;a<c.length;a++){this.positionOverlay(c[a])}this.gotOverlays=true},genOverlayBox:function(){if(!this.overlayBox){this.overlayBox=hs.createElement("div",{className:this.wrapperClassName},{position:"absolute",width:(this.x.size||(this.useBox?this.width:null)||this.x.full)+"px",height:(this.y.size||this.y.full)+"px",visibility:"hidden",overflow:"hidden",zIndex:hs.ie?4:null},hs.container,true)}},sizeOverlayBox:function(f,d){var c=this.overlayBox,a=this.x,h=this.y;hs.setStyles(c,{width:a.size+"px",height:h.size+"px"});if(f||d){for(var e=0;e<this.overlays.length;e++){var g=hs.$("hsId"+this.overlays[e]);var b=(hs.ieLt7||document.compatMode=="BackCompat");if(g&&/^(above|below)$/.test(g.position)){if(b){g.style.width=(c.offsetWidth+2*a.cb+a.p1+a.p2)+"px"}h[g.position=="above"?"p1":"p2"]=g.offsetHeight}if(g&&b&&/^(left|right)panel$/.test(g.position)){g.style.height=(c.offsetHeight+2*h.cb)+"px"}}}if(f){hs.setStyles(this.content,{top:h.p1+"px"});hs.setStyles(c,{top:(h.p1+h.cb)+"px"})}},showOverlays:function(){var a=this.overlayBox;a.className="";hs.setStyles(a,{top:(this.y.p1+this.y.cb)+"px",left:(this.x.p1+this.x.cb)+"px",overflow:"visible"});if(hs.safari){a.style.visibility="visible"}this.wrapper.appendChild(a);for(var c=0;c<this.overlays.length;c++){var d=hs.$("hsId"+this.overlays[c]);d.style.zIndex=4;if(!d.hideOnMouseOut||this.mouseIsOver){d.style.visibility="visible";hs.setStyles(d,{visibility:"visible",display:""});hs.animate(d,{opacity:d.opacity},d.dur)}}},destroyOverlays:function(){if(!this.overlays.length){return}if(this.isHtml&&this.preserveContent){this.overlayBox.style.top="-9999px";hs.container.appendChild(this.overlayBox)}else{hs.discardElement(this.overlayBox)}},createFullExpand:function(){this.fullExpandLabel=hs.createElement("a",{href:"javascript:hs.expanders["+this.key+"].doFullExpand();",title:hs.lang.fullExpandTitle,className:"highslide-full-expand"});this.createOverlay({overlayId:this.fullExpandLabel,position:hs.fullExpandPosition,hideOnMouseOut:true,opacity:hs.fullExpandOpacity})},doFullExpand:function(){try{if(this.fullExpandLabel){hs.discardElement(this.fullExpandLabel)}this.focus();var b=this.x.size;this.resizeTo(this.x.full,this.y.full);var a=this.x.pos-(this.x.size-b)/2;if(a<hs.marginLeft){a=hs.marginLeft}this.moveTo(a,this.y.pos)}catch(c){this.error(c)}},afterClose:function(){this.a.className=this.a.className.replace("highslide-active-anchor","");if(this.isHtml&&this.preserveContent){this.sleep()}else{hs.discardElement(this.wrapper)}if(hs.mask){hs.mask.style.display="none"}hs.expanders[this.key]=null;hs.reOrder()}};hs.Ajax=function(b,c,d){this.a=b;this.content=c;this.pre=d};hs.Ajax.prototype={run:function(src){if(src)this.src=src;if(!this.src){this.src=hs.getSrc(this.a)}if(this.src.match("#")){var a=this.src.split("#");this.src=a[0];this.id=a[1]}if(hs.cachedGets[this.src]){this.cachedGet=hs.cachedGets[this.src];if(this.id){this.getElementContent()}else{this.loadHTML()}return}try{this.xmlHttp=new XMLHttpRequest()}catch(b){try{this.xmlHttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(b){try{this.xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(b){this.onError()}}}var d=this;this.xmlHttp.onreadystatechange=function(){if(d.xmlHttp.readyState==4){if(d.id){d.getElementContent()}else{d.loadHTML()}}};var c=this.src;if(hs.forceAjaxReload){c=c.replace(/$/,(/\?/.test(c)?"&":"?")+"dummy="+(new Date()).getTime())}this.xmlHttp.open("GET",c,true);this.xmlHttp.setRequestHeader("X-Requested-With","XMLHttpRequest");this.xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");this.xmlHttp.send(null)},getElementContent:function(){hs.init();var a=window.opera||hs.ie6SSL?{src:"about:blank"}:null;this.iframe=hs.createElement("iframe",a,{position:"absolute",top:"-9999px"},hs.container);this.loadHTML()},loadHTML:function(){var b=this.cachedGet||this.xmlHttp.responseText;if(this.pre){hs.cachedGets[this.src]=b}if(!hs.ie||hs.uaVersion>=5.5){b=b.replace(/\s/g," ").replace(new RegExp("<link[^>]*>","gi"),"").replace(new RegExp("<script[^>]*>.*?<\/script>","gi"),"");if(this.iframe){var d=this.iframe.contentDocument;if(!d&&this.iframe.contentWindow){d=this.iframe.contentWindow.document}if(!d){var f=this;setTimeout(function(){f.loadHTML()},25);return}d.open();d.write(b);d.close();try{b=d.getElementById(this.id).innerHTML}catch(c){try{b=this.iframe.document.getElementById(this.id).innerHTML}catch(c){}}hs.discardElement(this.iframe)}else{b=b.replace(new RegExp("^.*?<body[^>]*>(.*?)</body>.*?$","i"),"$1")}}hs.getElementByClass(this.content,"DIV","highslide-body").innerHTML=b;this.onLoad();for(var a in this){this[a]=null}}};if(hs.ie){(function(){try{document.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,50);return}hs.ready()})()}hs.addEventListener(document,"DOMContentLoaded",hs.ready);hs.addEventListener(window,"load",hs.ready);hs.langDefaults=hs.lang;var HsExpander=hs.Expander;hs.addEventListener(window,"load",function(){if(hs.expandCursor){var c=".highslide img",d="cursor: url("+hs.graphicsDir+hs.expandCursor+"), pointer !important;";var a=hs.createElement("style",{type:"text/css"},null,document.getElementsByTagName("HEAD")[0]);if(!hs.ie){a.appendChild(document.createTextNode(c+" {"+d+"}"))}else{var b=document.styleSheets[document.styleSheets.length-1];if(typeof(b.addRule)=="object"){b.addRule(c,d)}}}});hs.addEventListener(window,"resize",function(){hs.getPageSize()});hs.addEventListener(document,"mousemove",function(a){hs.mouse={x:a.clientX,y:a.clientY}});hs.addEventListener(document,"mousedown",hs.mouseClickHandler);hs.addEventListener(document,"mouseup",hs.mouseClickHandler);hs.addEventListener(document,"ready",hs.getAnchors);hs.addEventListener(window,"load",hs.preloadAjax);
