﻿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",restoreTitle:"Click to close image, click and drag to move. Use arrow keys for next and previous."},graphicsDir:"highslide/graphics/",expandCursor:"zoomin.cur",restoreCursor:"zoomout.cur",expandDuration:250,restoreDuration:250,marginLeft:15,marginRight:15,marginTop:15,marginBottom:15,zIndexCounter:1001,loadingOpacity:.75,allowMultipleInstances:true,numberOfImagesToPreload:5,outlineWhileAnimating:2,outlineStartOffset:3,padToMinWidth:false,fullExpandPosition:"bottom right",fullExpandOpacity:1,showCredits:true,creditsHref:"http://highslide.com/",enableKeyListener:true,openerTagNames:["a"],dragByHeading:true,minWidth:200,minHeight:200,allowSizeReduction:true,outlineType:"drop-shadow",wrapperClassName:"highslide-wrapper",preloadTheseImages:[],continuePreloading:true,expanders:[],overrides:["allowSizeReduction","useBox","outlineType","outlineWhileAnimating","captionId","captionText","captionEval","captionOverlay","headingId","headingText","headingEval","headingOverlay","creditsPosition","dragByHeading","width","height","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:[],pendingOutlines:{},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(f,b,d,c,e){var a=document.createElement(f);if(b)hs.extend(a,b);if(e)hs.setStyles(a,{padding:0,border:"none",margin:0});if(d)hs.setStyles(a,d);if(c)c.appendChild(a);return a},extend:function(b,a){for(var c in a)b[c]=a[c];return b},setStyles:function(c,b){for(var a in b)if(hs.ie&&a=="opacity")if(b[a]>.99)c.style.removeAttribute("filter");else c.style.filter="alpha(opacity="+b[a]*100+")";else c.style[a]=b[a]},animate:function(h,d,a){var e,g,f;if(typeof a!="object"||a===null){var c=arguments;a={duration:c[2],easing:c[3],complete:c[4]}}if(typeof a.duration!="number")a.duration=250;a.easing=Math[a.easing]||Math.easeInQuad;a.curAnim=hs.extend({},d);for(var b in d){var i=new hs.fx(h,a,b);e=parseFloat(hs.css(h,b))||0;g=parseFloat(d[b]);f=b!="opacity"?"px":"";i.custom(e,g,f)}},css:function(c,a){if(document.defaultView)return document.defaultView.getComputedStyle(c,null).getPropertyValue(a);else{if(a=="opacity")a="filter";var b=c.currentStyle[a.replace(/\-(\w)/g,function(b,a){return a.toUpperCase()})];if(a=="filter")b=b.replace(/alpha\(opacity=([0-9]+)\)/,function(b,a){return a/100});return b===""?1:b}},getPageSize:function(){var a=document,e=window,b=a.compatMode&&a.compatMode!="BackCompat"?a.documentElement:a.body,d=hs.ie?b.clientWidth:a.documentElement.clientWidth||self.innerWidth,c=hs.ie?b.clientHeight:self.innerHeight;return {width:d,height:c,scrollLeft:hs.ie?b.scrollLeft:pageXOffset,scrollTop:hs.ie?b.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(a,b,c){if(!a)a=hs.createElement("a",null,{display:"none"},hs.container);if(typeof a.getParams=="function")return b;try{new hs.Expander(a,b,c);return false}catch(e){return true}},focusTopmost:function(){var f=0,c=-1,d=hs.expanders,e,a;for(var b=0;b<d.length;b++){e=d[b];if(e){a=e.wrapper.style.zIndex;if(a&&a>f){f=a;c=b}}}if(c==-1)hs.focusKey=-1;else d[c].focus()},getParam:function(a,b){a.getParams=a.onclick;var c=a.getParams?a.getParams():null;a.getParams=null;return c&&typeof c[b]!="undefined"?c[b]:typeof hs[b]!="undefined"?hs[b]:null},getSrc:function(b){var a=hs.getParam(b,"src");if(a)return a;return b.href},getNode:function(c){var b=hs.$(c),a=hs.clones[c],d={};if(!b&&!a)return null;if(!a){a=b.cloneNode(true);a.id="";hs.clones[c]=a;return b}else return a.cloneNode(true)},discardElement:function(a){hs.garbageBin.appendChild(a);hs.garbageBin.innerHTML=""},transit:function(b,a){var c=a=a||hs.getExpander();if(hs.upcoming)return false;else hs.last=c;try{hs.upcoming=b;b.onclick()}catch(d){hs.last=hs.upcoming=null}try{a.close()}catch(d){}return false},previousOrNext:function(b,c){var a=hs.getExpander(b);if(a){adj=a.getAdjacentAnchor(c);return hs.transit(adj,a)}else return false},previous:function(a){return hs.previousOrNext(a,-1)},next:function(a){return hs.previousOrNext(a,1)},keyHandler:function(a){if(!a)a=window.event;if(!a.target)a.target=a.srcElement;if(typeof a.target.form!="undefined")return true;var c=hs.getExpander(),b=null;switch(a.keyCode){case 70:if(c)c.doFullExpand();return true;case 32:case 34:case 39:case 40:b=1;break;case 8:case 33:case 37:case 38:b=-1;break;case 27:case 13:b=0}if(b!==null){hs.removeEventListener(document,window.opera?"keypress":"keydown",hs.keyHandler);if(!hs.enableKeyListener)return true;if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(c){if(b==0)c.close();else hs.previousOrNext(c.key,b);return false}}return true},registerOverlay:function(a){hs.push(hs.overlays,hs.extend(a,{hsId:"hsId"+hs.idCounter++}))},getWrapperKey:function(c,f){var a,e=/^highslide-wrapper-([0-9]+)$/;a=c;while(a.parentNode){if(a.id&&e.test(a.id))return a.id.replace(e,"$1");a=a.parentNode}if(!f){a=c;while(a.parentNode){if(a.tagName&&hs.isHsAnchor(a))for(var b=0;b<hs.expanders.length;b++){var d=hs.expanders[b];if(d&&d.a==a)return b}a=a.parentNode}}return null},getExpander:function(a,b){if(typeof a=="undefined")return hs.expanders[hs.focusKey]||null;if(typeof a=="number")return hs.expanders[a]||null;if(typeof a=="string")a=hs.$(a);return hs.expanders[hs.getWrapperKey(a,b)]||null},isHsAnchor:function(a){return a.onclick&&a.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(a){if(!a)a=window.event;if(a.button>1)return true;if(!a.target)a.target=a.srcElement;var c=a.target;while(c.parentNode&&!/highslide-(image|move|html|resize)/.test(c.className))c=c.parentNode;var b=hs.getExpander(c);if(b&&(b.isClosing||!b.isExpanded))return true;if(b&&a.type=="mousedown"){if(a.target.form)return true;var e=c.className.match(/highslide-(image|move|resize)/);if(e){hs.dragArgs={exp:b,type:e[1],left:b.x.pos,width:b.x.size,top:b.y.pos,height:b.y.size,clickX:a.clientX,clickY:a.clientY};hs.addEventListener(document,"mousemove",hs.dragHandler);if(a.preventDefault)a.preventDefault();if(/highslide-(image|html)-blur/.test(b.content.className)){b.focus();hs.hasFocused=true}return false}}else if(a.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 d=hs.dragArgs.hasDragged;if(!d&&!hs.hasFocused&&!/(move|resize)/.test(hs.dragArgs.type))b.close();else if(d||!d&&hs.hasHtmlExpanders)hs.dragArgs.exp.doShowHide("hidden");hs.hasFocused=false;hs.dragArgs=null}else if(/highslide-image-blur/.test(c.className))c.style.cursor=hs.styleRestoreCursor}return false},dragHandler:function(b){if(!hs.dragArgs)return true;if(!b)b=window.event;var a=hs.dragArgs,c=a.exp;a.dX=b.clientX-a.clickX;a.dY=b.clientY-a.clickY;var d=Math.sqrt(Math.pow(a.dX,2)+Math.pow(a.dY,2));if(!a.hasDragged)a.hasDragged=a.type!="image"&&d>0||d>(hs.dragSensitivity||5);if(a.hasDragged&&b.clientX>5&&b.clientY>5)if(a.type=="resize")c.resize(a);else{c.moveTo(a.left+a.dX,a.top+a.dY);if(a.type=="image")c.content.style.cursor="move"}return false},wrapperMouseHandler:function(a){try{if(!a)a=window.event;var c=/mouseover/i.test(a.type);if(!a.target)a.target=a.srcElement;if(hs.ie)a.relatedTarget=c?a.fromElement:a.toElement;var b=hs.getExpander(a.target);if(!b.isExpanded)return;if(!b||!a.relatedTarget||hs.getExpander(a.relatedTarget,true)==b||hs.dragArgs)return;for(var d=0;d<b.overlays.length;d++)(function(){var a=hs.$("hsId"+b.overlays[d]);if(a&&a.hideOnMouseOut){if(c)hs.setStyles(a,{visibility:"visible"});hs.animate(a,{opacity:c?a.opacity:0},a.dur)}})()}catch(e){}},addEventListener:function(c,a,b){if(c==document&&a=="ready")hs.push(hs.onReady,b);try{c.addEventListener(a,b,false)}catch(d){try{c.detachEvent("on"+a,b);c.attachEvent("on"+a,b)}catch(e){c["on"+a]=b}}},removeEventListener:function(b,a,c){try{b.removeEventListener(a,c,false)}catch(d){try{b.detachEvent("on"+a,c)}catch(e){b["on"+a]=null}}},preloadFullImage:function(a){if(hs.continuePreloading&&hs.preloadTheseImages[a]&&hs.preloadTheseImages[a]!="undefined"){var b=document.createElement("img");b.onload=function(){b=null;hs.preloadFullImage(a+1)};b.src=hs.preloadTheseImages[a]}},preloadImages:function(b){if(b&&typeof b!="object")hs.numberOfImagesToPreload=b;var c=hs.getAnchors();for(var a=0;a<c.images.length&&a<hs.numberOfImagesToPreload;a++)hs.push(hs.preloadTheseImages,hs.getSrc(c.images[a]));if(hs.outlineType)new hs.Outline(hs.outlineType,function(){hs.preloadFullImage(0)});else hs.preloadFullImage(0);if(hs.restoreCursor)var d=hs.createElement("img",{src:hs.graphicsDir+hs.restoreCursor})},init:function(){if(!hs.container){hs.page=hs.getPageSize();hs.ieLt7=hs.ie&&hs.uaVersion<7;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);Math.linearTween=function(d,a,b,c){return b*d/c+a};Math.easeInQuad=function(a,b,c,d){return c*(a/=d)*a+b};hs.hideSelects=hs.ieLt7;hs.hideIframes=window.opera&&hs.uaVersion<9||navigator.vendor=="KDE"||hs.ie&&hs.uaVersion<5.5}},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,c,i=[],h=[],b={},d;for(var f=0;f<hs.openerTagNames.length;f++){c=document.getElementsByTagName(hs.openerTagNames[f]);for(var g=0;g<c.length;g++){a=c[g];d=hs.isHsAnchor(a);if(d){hs.push(i,a);if(d[0]=="hs.expand")hs.push(h,a);var e=hs.getParam(a,"slideshowGroup")||"none";if(!b[e])b[e]=[];hs.push(b[e],a)}}}hs.anchors={all:i,groups:b,images:h};return hs.anchors},getAnchors:function(){return hs.anchors||hs.updateAnchors()},close:function(b){var a=hs.getExpander(b);if(a)a.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(b,e,d){this.startTime=(new Date).getTime();this.start=b;this.end=e;this.unit=d;this.now=this.start;this.pos=this.state=0;var c=this;function a(a){return c.step(a)}a.elem=this.elem;if(a()&&hs.timers.push(a)==1)hs.timerId=setInterval(function(){var a=hs.timers;for(var b=0;b<a.length;b++)if(!a[b]())a.splice(b--,1);if(!a.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 e in this.options.curAnim)if(this.options.curAnim[e]!==true)a=false;if(a)if(this.options.complete)this.options.complete.call(this.elem);return false}else{var b=c-this.startTime;this.state=b/this.options.duration;this.pos=this.options.easing(b,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.Outline=function(b,c){this.onLoad=c;this.outlineType=b;var e=hs.uaVersion,d;this.hasAlphaImageLoader=hs.ie&&e>=5.5&&e<7;if(!b){if(c)c();return}hs.init();this.table=hs.createElement("table",{cellSpacing:0},{visibility:"hidden",position:"absolute",borderCollapse:"collapse",width:0},hs.container,true);var g=hs.createElement("tbody",null,null,this.table,1);this.td=[];for(var a=0;a<=8;a++){if(a%3==0)d=hs.createElement("tr",null,{height:"auto"},g,true);this.td[a]=hs.createElement("td",null,null,d,true);var f=a!=4?{lineHeight:0,fontSize:0}:{position:"relative"};hs.setStyles(this.td[a],f)}this.td[4].className=b+" highslide-outline";this.preloadGraphic()};hs.Outline.prototype={preloadGraphic:function(){var c=hs.graphicsDir+(hs.outlinesDir||"outlines/")+this.outlineType+".png",a=hs.safari?hs.container:null;this.graphic=hs.createElement("img",null,{position:"absolute",top:"-9999px"},a,true);var b=this;this.graphic.onload=function(){b.onGraphicLoad()};this.graphic.src=c},onGraphicLoad:function(){var b=this.offset=this.graphic.width/4,c=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],d={height:2*b+"px",width:2*b+"px"};for(var a=0;a<=8;a++)if(c[a]){if(this.hasAlphaImageLoader){var f=a==1||a==7?"100%":this.graphic.width+"px",e=hs.createElement("div",null,{width:"100%",height:"100%",position:"relative",overflow:"hidden"},this.td[a],true);hs.createElement("div",null,{filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='"+this.graphic.src+"')",position:"absolute",width:f,height:this.graphic.height+"px",left:c[a][0]*b+"px",top:c[a][1]*b+"px"},e,true)}else hs.setStyles(this.td[a],{background:"url("+this.graphic.src+") "+c[a][0]*b+"px "+c[a][1]*b+"px"});if(window.opera&&(a==3||a==5))hs.createElement("div",null,d,this.td[a],true);hs.setStyles(this.td[a],d)}this.graphic=null;if(hs.pendingOutlines[this.outlineType])hs.pendingOutlines[this.outlineType].destroy();hs.pendingOutlines[this.outlineType]=this;if(this.onLoad)this.onLoad()},setPosition:function(a,b,d){var c=this.exp,g=c.wrapper.style,b=b||0,a=a||{x:c.x.pos+b,y:c.y.pos+b,w:c.x.get("wsize")-2*b,h:c.y.get("wsize")-2*b};if(d)this.table.style.visibility=a.h>=4*this.offset?"visible":"hidden";hs.setStyles(this.table,{left:a.x-this.offset+"px",top:a.y-this.offset+"px",width:a.w+2*this.offset+"px"});a.w-=2*this.offset;a.h-=2*this.offset;hs.setStyles(this.td[4],{width:a.w>=0?a.w+"px":0,height:a.h>=0?a.h+"px":0});if(this.hasAlphaImageLoader)this.td[3].style.height=this.td[5].style.height=this.td[4].style.height},destroy:function(a){if(a)this.table.style.visibility="hidden";else hs.discardElement(this.table)}};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-(this.exp.outline?this.exp.outline.offset:0);case "osize":return this.get("wsize")+(this.exp.outline?2*this.exp.outline.offset:0);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]+2*this.cb},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==0)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(b){var a=this.exp;if(a.isImage&&(a.useBox||hs.padToMinWidth)){this.imgSize=b;this.size=Math.max(this.size,this.imgSize);a.content.style[this.lt]=this.get("imgPad")+"px"}else this.size=b;a.content.style[this.wh]=b+"px";a.wrapper.style[this.wh]=this.get("wsize")+"px";if(a.outline)a.outline.setPosition();if(this.dim=="x"&&a.overlayBox)a.sizeOverlayBox(true)},setPos:function(a){this.pos=a;this.exp.wrapper.style[this.lt]=a+"px";if(this.exp.outline)this.exp.outline.setPosition()}};hs.Expander=function(d,b,h,g){if(document.readyState&&hs.ie&&!hs.isReady){hs.addEventListener(document,"ready",function(){new hs.Expander(d,b,h,g)});return}this.a=d;this.custom=h;this.contentType=g||"image";this.isImage=!this.isHtml;hs.continuePreloading=false;this.overlays=[];hs.init();var i=this.key=hs.expanders.length;for(var a=0;a<hs.overrides.length;a++){var e=hs.overrides[a];this[e]=b&&typeof b[e]!="undefined"?b[e]:hs[e]}if(!this.src)this.src=d.href;var c=b&&b.thumbnailId?hs.$(b.thumbnailId):d;c=this.thumb=c.getElementsByTagName("img")[0]||c;this.thumbsUserSetId=c.id||d.id;for(var a=0;a<hs.expanders.length;a++)if(hs.expanders[a]&&hs.expanders[a].a==d){hs.expanders[a].focus();return false}for(var a=0;a<hs.expanders.length;a++)if(hs.expanders[a]&&hs.expanders[a].thumb!=c&&!hs.expanders[a].onLoadStarted)hs.expanders[a].cancelLoading();hs.expanders[this.key]=this;if(!hs.allowMultipleInstances&&!hs.upcoming){if(hs.expanders[i-1])hs.expanders[i-1].close();if(typeof hs.focusKey!="undefined"&&hs.expanders[hs.focusKey])hs.expanders[hs.focusKey].close()}this.el=c;this.tpos=hs.getPosition(c);hs.page=hs.getPageSize();var j=this.x=new hs.Dimension(this,"x");j.calcThumb();var k=this.y=new hs.Dimension(this,"y");k.calcThumb();this.wrapper=hs.createElement("div",{id:"highslide-wrapper-"+this.key,className:this.wrapperClassName},{visibility:"hidden",position:"absolute",zIndex:hs.zIndexCounter++},null,true);this.wrapper.onmouseover=this.wrapper.onmouseout=hs.wrapperMouseHandler;if(this.contentType=="image"&&this.outlineWhileAnimating==2)this.outlineWhileAnimating=0;if(!this.outlineType)this[this.contentType+"Create"]();else if(hs.pendingOutlines[this.outlineType]){this.connectOutline();this[this.contentType+"Create"]()}else{this.showLoading();var f=this;new hs.Outline(this.outlineType,function(){f.connectOutline();f[f.contentType+"Create"]()})}return true};hs.Expander.prototype={error:function(){window.location.href=this.src},connectOutline:function(){var a=this.outline=hs.pendingOutlines[this.outlineType];a.exp=this;a.table.style.zIndex=this.wrapper.style.zIndex;hs.pendingOutlines[this.outlineType]=null},showLoading:function(){if(this.onLoadStarted||this.loading)return;this.loading=hs.loading;var a=this;this.loading.onclick=function(){a.cancelLoading()};var a=this,b=this.x.get("loadingPos")+"px",c=this.y.get("loadingPos")+"px";setTimeout(function(){if(a.loading)hs.setStyles(a.loading,{left:b,top:c,zIndex:hs.zIndexCounter++})},100)},imageCreate:function(){var b=this,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)a.src="res://";a.src=this.src;this.showLoading()},contentLoaded:function(){try{if(!this.content)return;this.content.onload=null;if(this.onLoadStarted)return;else this.onLoadStarted=true;var a=this.x,b=this.y;if(this.loading){hs.setStyles(this.loading,{top:"-9999px"});this.loading=null}a.full=this.content.width;b.full=this.content.height;hs.setStyles(this.content,{width:a.t+"px",height:b.t+"px"});this.wrapper.appendChild(this.content);hs.container.appendChild(this.wrapper);a.calcBorders();b.calcBorders();hs.setStyles(this.wrapper,{left:a.tpos+a.tb-a.cb+"px",top:b.tpos+a.tb-b.cb+"px"});this.getOverlays();var c=a.full/b.full;a.calcExpanded();this.justify(a);b.calcExpanded();this.justify(b);if(this.overlayBox)this.sizeOverlayBox(0,1);if(this.allowSizeReduction){this.correctRatio(c);if(this.isImage&&this.x.full>(this.x.imgSize||this.x.size)){this.createFullExpand();if(this.overlays.length==1)this.sizeOverlayBox()}}this.show()}catch(d){this.error(d)}},justify:function(a,c){var g,h=a.target,e=a==this.x?"x":"y",d=false,b=a.exp.allowSizeReduction;a.pos=Math.round(a.pos-(a.get("wsize")-a.t)/2);if(a.pos<a.scroll+a.marginMin){a.pos=a.scroll+a.marginMin;d=true}if(!c&&a.size<a.minSize){a.size=a.minSize;b=false}if(a.pos+a.get("wsize")>a.scroll+a.clientSize-a.marginMax)if(!c&&d&&b)a.size=a.get(e=="y"?"fitsize":"maxsize");else if(a.get("wsize")<a.get("fitsize"))a.pos=a.scroll+a.clientSize-a.marginMax-a.get("wsize");else{a.pos=a.scroll+a.marginMin;if(!c&&b)a.size=a.get(e=="y"?"fitsize":"maxsize")}if(!c&&a.size<a.minSize){a.size=a.minSize;b=false}if(a.pos<a.marginMin){var f=a.pos;a.pos=a.marginMin;if(b&&!c)a.size=a.size-(a.pos-f)}},correctRatio:function(d){var b=this.x,a=this.y,f=false,c=Math.min(b.full,b.size),e=Math.min(a.full,a.size),g=this.useBox||hs.padToMinWidth;if(c/e>d){c=e*d;if(c<b.minSize){c=b.minSize;e=c/d}f=true}else if(c/e<d){e=c/d;f=true}if(hs.padToMinWidth&&b.full<b.minSize){b.imgSize=b.full;a.size=a.imgSize=a.full}else if(this.useBox){b.imgSize=c;a.imgSize=e}else{b.size=c;a.size=e}this.fitOverlayBox(g?null:d);if(g&&a.size<a.imgSize){a.imgSize=a.size;b.imgSize=a.size*d}if(f||g){b.pos=b.tpos-b.cb+b.tb;b.minSize=b.size;this.justify(b,true);a.pos=a.tpos-a.cb+a.tb;a.minSize=a.size;this.justify(a,true);if(this.overlayBox)this.sizeOverlayBox()}},fitOverlayBox:function(b){var c=this.x,a=this.y;if(this.overlayBox)while(a.size>this.minHeight&&c.size>this.minWidth&&a.get("wsize")>a.get("fitsize")){a.size-=10;if(b)c.size=a.size*b;this.sizeOverlayBox(0,1)}},show:function(){var a=this.x,b=this.y;this.doShowHide("hidden");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,f,g){if(this.outline&&!this.outlineWhileAnimating)if(b)this.outline.setPosition();else this.outline.destroy();if(!b)this.destroyOverlays();var a=this,c=a.x,d=a.y,e=this.easing;if(!b)e=this.easingClose||e;var h=b?function(){if(a.outline)a.outline.table.style.visibility="visible";setTimeout(function(){a.afterExpand()},50)}:function(){a.afterClose()};if(b)hs.setStyles(this.wrapper,{width:c.t+"px",height:d.t+"px"});if(this.fadeInOut){hs.setStyles(this.wrapper,{opacity:b?0:1});hs.extend(f.wrapper,{opacity:b})}hs.animate(this.wrapper,f.wrapper,{duration:g,easing:e,step:function(h,f){if(a.outline&&a.outlineWhileAnimating&&f.prop=="top"){var e=b?f.pos:1-f.pos,g={w:c.t+(c.get("wsize")-c.t)*e,h:d.t+(d.get("wsize")-d.t)*e,x:c.tpos+(c.pos-c.tpos)*e,y:d.tpos+(d.pos-d.tpos)*e};a.outline.setPosition(g,0,1)}}});hs.animate(this.content,f.content,g,e,h);if(b){this.wrapper.style.visibility="visible";this.content.style.visibility="visible";this.a.className+=" highslide-active-anchor"}},afterExpand:function(){this.isExpanded=true;this.focus();if(hs.upcoming&&hs.upcoming==this.a)hs.upcoming=null;this.prepareNextOutline();var c=hs.page,a=hs.mouse.x+c.scrollLeft,b=hs.mouse.y+c.scrollTop;this.mouseIsOver=this.x.pos<a&&a<this.x.pos+this.x.get("wsize")&&this.y.pos<b&&b<this.y.pos+this.y.get("wsize");if(this.overlayBox)this.showOverlays()},prepareNextOutline:function(){var b=this.key,a=this.outlineType;new hs.Outline(a,function(){try{hs.expanders[b].preloadNext()}catch(a){}})},preloadNext:function(){var a=this.getAdjacentAnchor(1);if(a&&a.onclick.toString().match(/hs\.expand/))var b=hs.createElement("img",{src:hs.getSrc(a)})},getAdjacentAnchor:function(b){var c=this.getAnchorIndex(),a=hs.anchors.groups[this.slideshowGroup||"none"];if(!a[c+b]&&this.slideshow&&this.slideshow.repeat)if(b==1)return a[0];else if(b==-1)return a[a.length-1];return a[c+b]||null},getAnchorIndex:function(){var b=hs.getAnchors().groups[this.slideshowGroup||"none"];if(b)for(var a=0;a<b.length;a++)if(b[a]==this.a)return a;return null},cancelLoading:function(){hs.expanders[this.key]=null;if(this.loading)hs.loading.style.left="-9999px"},writeCredits:function(){this.credits=hs.createElement("a",{href:hs.creditsHref,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(a){}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)}}},doShowHide:function(a){if(hs.hideSelects)this.showHideElements("SELECT",a);if(hs.hideIframes)this.showHideElements("IFRAME",a);if(hs.geckoMac)this.showHideElements("*",a)},showHideElements:function(h,g){var b=document.getElementsByTagName(h),e=h=="*"?"overflow":"visibility";for(var a=0;a<b.length;a++)if(e=="visibility"||(document.defaultView.getComputedStyle(b[a],"").getPropertyValue("overflow")=="auto"||b[a].getAttribute("hidden-by")!=null)){var c=b[a].getAttribute("hidden-by");if(g=="visible"&&c){c=c.replace("["+this.key+"]","");b[a].setAttribute("hidden-by",c);if(!c)b[a].style[e]=b[a].origProp}else if(g=="hidden"){var d=hs.getPosition(b[a]);d.w=b[a].offsetWidth;d.h=b[a].offsetHeight;var i=d.x+d.w<this.x.get("opos")||d.x>this.x.get("opos")+this.x.get("osize"),j=d.y+d.h<this.y.get("opos")||d.y>this.y.get("opos")+this.y.get("osize"),f=hs.getWrapperKey(b[a]);if(!i&&!j&&f!=this.key){if(!c){b[a].setAttribute("hidden-by","["+this.key+"]");b[a].origProp=b[a].style[e];b[a].style[e]="hidden"}else if(c.indexOf("["+this.key+"]")==-1)b[a].setAttribute("hidden-by",c+"["+this.key+"]")}else if((c=="["+this.key+"]"||hs.focusKey==f)&&f!=this.key){b[a].setAttribute("hidden-by","");b[a].style[e]=b[a].origProp||""}else if(c&&c.indexOf("["+this.key+"]")>-1)b[a].setAttribute("hidden-by",c.replace("["+this.key+"]",""))}}},focus:function(){this.wrapper.style.zIndex=hs.zIndexCounter++;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";b.content.style.cursor=hs.ie?"hand":"pointer";b.content.title=hs.lang.focusTitle}if(this.outline)this.outline.table.style.zIndex=this.wrapper.style.zIndex;this.content.className="highslide-"+this.contentType;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;hs.addEventListener(document,window.opera?"keypress":"keydown",hs.keyHandler)},moveTo:function(a,b){this.x.setPos(a);this.y.setPos(b)},resize:function(c){var a,b,d=c.width/c.height;a=Math.max(c.width+c.dX,Math.min(this.minWidth,this.x.full));if(this.isImage&&Math.abs(a-this.x.full)<12)a=this.x.full;b=a/d;if(b<Math.min(this.minHeight,this.y.full)){b=Math.min(this.minHeight,this.y.full);if(this.isImage)a=b*d}this.resizeTo(a,b)},resizeTo:function(b,a){this.y.setSize(a);this.x.setSize(b)},close:function(){if(this.isClosing||!this.isExpanded)return;this.isClosing=true;hs.removeEventListener(document,window.opera?"keypress":"keydown",hs.keyHandler);try{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()}},createOverlay:function(a){var c=a.overlayId;if(typeof c=="string")c=hs.getNode(c);if(a.html)c=hs.createElement("div",{innerHTML:a.html});if(!c||typeof c=="string")return;c.style.display="block";this.genOverlayBox();var d=a.width&&/^[0-9]+(px|%)$/.test(a.width)?a.width:"auto";if(/^(left|right)panel$/.test(a.position)&&!/^[0-9]+px$/.test(a.width))d="200px";var b=hs.createElement("div",{id:"hsId"+hs.idCounter++,hsId:a.hsId},{position:"absolute",visibility:"hidden",width:d,direction:hs.lang.cssDirection||"",opacity:0},this.overlayBox,true);b.appendChild(c);hs.extend(b,{opacity:1,offsetX:0,offsetY:0,dur:a.fade===0||a.fade===false||a.fade==2&&hs.ie?0:250});hs.extend(b,a);if(this.gotOverlays){this.positionOverlay(b);if(!b.hideOnMouseOut||this.mouseIsOver)hs.animate(b,{opacity:b.opacity},b.dur)}hs.push(this.overlays,hs.idCounter-1)},positionOverlay:function(a){var b=a.position||"middle center",c=a.offsetX,d=a.offsetY;if(a.parentNode!=this.overlayBox)this.overlayBox.appendChild(a);if(/left$/.test(b))a.style.left=c+"px";if(/center$/.test(b))hs.setStyles(a,{left:"50%",marginLeft:c-Math.round(a.offsetWidth/2)+"px"});if(/right$/.test(b))a.style.right=-c+"px";if(/^leftpanel$/.test(b)){hs.setStyles(a,{right:"100%",marginRight:this.x.cb+"px",top:-this.y.cb+"px",bottom:-this.y.cb+"px",overflow:"auto"});this.x.p1=a.offsetWidth}else if(/^rightpanel$/.test(b)){hs.setStyles(a,{left:"100%",marginLeft:this.x.cb+"px",top:-this.y.cb+"px",bottom:-this.y.cb+"px",overflow:"auto"});this.x.p2=a.offsetWidth}if(/^top/.test(b))a.style.top=d+"px";if(/^middle/.test(b))hs.setStyles(a,{top:"50%",marginTop:d-Math.round(a.offsetHeight/2)+"px"});if(/^bottom/.test(b))a.style.bottom=-d+"px";if(/^above$/.test(b)){hs.setStyles(a,{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=a.offsetHeight}else if(/^below$/.test(b)){hs.setStyles(a,{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=a.offsetHeight;a.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 b=hs.overlays[a],c=b.thumbnailId,e=b.slideshowGroup;if(!c&&!e||c&&c==this.thumbsUserSetId||e&&e===this.slideshowGroup)this.createOverlay(b)}var d=[];for(var a=0;a<this.overlays.length;a++){var b=hs.$("hsId"+this.overlays[a]);if(/panel$/.test(b.position))this.positionOverlay(b);else hs.push(d,b)}for(var a=0;a<d.length;a++)this.positionOverlay(d[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,h){var c=this.overlayBox,d=this.x,b=this.y;hs.setStyles(c,{width:d.size+"px",height:b.size+"px"});if(f||h)for(var e=0;e<this.overlays.length;e++){var a=hs.$("hsId"+this.overlays[e]),g=hs.ieLt7||document.compatMode=="BackCompat";if(a&&/^(above|below)$/.test(a.position)){if(g)a.style.width=c.offsetWidth+2*d.cb+d.p1+d.p2+"px";b[a.position=="above"?"p1":"p2"]=a.offsetHeight}if(a&&g&&/^(left|right)panel$/.test(a.position))a.style.height=c.offsetHeight+2*b.cb+"px"}if(f){hs.setStyles(this.content,{top:b.p1+"px"});hs.setStyles(c,{top:b.p1+b.cb+"px"})}},showOverlays:function(){var b=this.overlayBox;b.className="";hs.setStyles(b,{top:this.y.p1+this.y.cb+"px",left:this.x.p1+this.x.cb+"px",overflow:"visible"});if(hs.safari)b.style.visibility="visible";this.wrapper.appendChild(b);for(var c=0;c<this.overlays.length;c++){var a=hs.$("hsId"+this.overlays[c]);a.style.zIndex=4;if(!a.hideOnMouseOut||this.mouseIsOver){a.style.visibility="visible";hs.setStyles(a,{visibility:"visible",display:""});hs.animate(a,{opacity:a.opacity},a.dur)}}},destroyOverlays:function(){if(!this.overlays.length)return;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);this.doShowHide("hidden")}catch(c){this.error(c)}},afterClose:function(){this.a.className=this.a.className.replace("highslide-active-anchor","");this.doShowHide("visible");if(this.outline&&this.outlineWhileAnimating)this.outline.destroy();hs.discardElement(this.wrapper);hs.expanders[this.key]=null;hs.reOrder()}};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",b="cursor: url("+hs.graphicsDir+hs.expandCursor+"), pointer !important;",d=hs.createElement("style",{type:"text/css"},null,document.getElementsByTagName("HEAD")[0]);if(!hs.ie)d.appendChild(document.createTextNode(c+" {"+b+"}"));else{var a=document.styleSheets[document.styleSheets.length-1];if(typeof a.addRule=="object")a.addRule(c,b)}}});hs.addEventListener(window,"resize",function(){hs.page=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.preloadImages)
