var hs={graphicsDir:"highslide/graphics/",restoreCursor:"zoomout.cur",expandSteps:10,expandDuration:250,restoreSteps:10,restoreDuration:250,marginLeft:15,marginRight:15,marginTop:15,marginBottom:15,zIndexCounter:1001,restoreTitle:"Click to close image, click and drag to move. Use arrow keys for next and previous.",loadingText:"Loading...",loadingTitle:"Click to cancel",loadingOpacity:0.75,focusTitle:"Click to bring to front",allowMultipleInstances:true,numberOfImagesToPreload:5,captionSlideSpeed:1,padToMinWidth:false,outlineWhileAnimating:2,outlineStartOffset:3,fullExpandTitle:"Expand to actual size",fullExpandPosition:"bottom right",fullExpandOpacity:1,showCredits:false,creditsText:"",creditsHref:"",creditsTitle:"",enableKeyListener:true,captionId:null,spaceForCaption:30,slideshowGroup:null,minWidth:200,minHeight:200,allowSizeReduction:true,outlineType:"rounded-white",wrapperClassName:"highslide-wrapper",preloadTheseImages:[],continuePreloading:true,expanders:[],overrides:["allowSizeReduction","outlineType","outlineWhileAnimating","spaceForCaption","captionId","captionText","captionEval","wrapperClassName","minWidth","minHeight","slideshowGroup","easing","easingClose","fadeInOut"],overlays:[],idCounter:0,faders:[],pendingOutlines:{},clones:{},ie:(document.all&&!window.opera),safari:/Safari/.test(navigator.userAgent),geckoMac:/Macintosh.+rv:1\.[0-8].+Gecko/.test(navigator.userAgent),$:function(a){return document.getElementById(a)},push:function(a,b){a[a.length]=b},createElement:function(a,f,b,c,e){var d=document.createElement(a);if(f){hs.setAttribs(d,f)}if(e){hs.setStyles(d,{padding:0,border:"none",margin:0})}if(b){hs.setStyles(d,b)}if(c){c.appendChild(d)}return d},setAttribs:function(b,c){for(var a in c){b[a]=c[a]}},setStyles:function(c,b){for(var a in b){try{if(hs.ie&&a=="opacity"){if(b[a]>0.99){c.style.removeAttribute("filter")}else{c.style.filter="alpha(opacity="+(b[a]*100)+")"}}else{c.style[a]=b[a]}}catch(d){}}},ieVersion:function(){var a=navigator.appVersion.split("MSIE");return a[1]?parseFloat(a[1]):null},getPageSize:function(){var c=document.compatMode&&document.compatMode!="BackCompat"?document.documentElement:document.body;var a=hs.ie?c.clientWidth:(document.documentElement.clientWidth||self.innerWidth),b=hs.ie?c.clientHeight:self.innerHeight;return{width:a,height:b,scrollLeft:hs.ie?c.scrollLeft:pageXOffset,scrollTop:hs.ie?c.scrollTop:pageYOffset}},position: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(c,f,b){if(c.getParams){return f}try{new hs.Expander(c,f,b);return false}catch(d){return true}},focusTopmost:function(){var a=0,c=-1;for(var b=0;b<hs.expanders.length;b++){if(hs.expanders[b]){if(hs.expanders[b].wrapper.style.zIndex&&hs.expanders[b].wrapper.style.zIndex>a){a=hs.expanders[b].wrapper.style.zIndex;c=b}}}if(c==-1){hs.focusKey=-1}else{hs.expanders[c].focus()}},getAdjacentAnchor:function(f,g){var a=document.getElementsByTagName("A"),c={},b=-1,d=0;for(var e=0;e<a.length;e++){if(hs.isHsAnchor(a[e])&&((hs.expanders[f].slideshowGroup==hs.getParam(a[e],"slideshowGroup")))){c[d]=a[e];if(hs.expanders[f]&&a[e]==hs.expanders[f].a){b=d}d++}}return c[b+g]||null},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)}},purge:function(f){var c=f.attributes,e,b,g;if(c){b=c.length;for(var e=0;e<b;e+=1){g=c[e].name;if(typeof f[g]==="function"){f[g]=null}}}c=f.childNodes;if(c){b=c.length;for(var e=0;e<b;e+=1){hs.purge(f.childNodes[e])}}},discardElement:function(a){if(hs.ie){hs.purge(a)}hs.garbageBin.appendChild(a);hs.garbageBin.innerHTML=""},previousOrNext:function(b,f){var d=hs.last=hs.getExpander(b);try{var a=hs.upcoming=hs.getAdjacentAnchor(d.key,f);a.onclick()}catch(c){}try{d.close()}catch(c){}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(a.target.form){return true}var b=null;switch(a.keyCode){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,"keydown",hs.keyHandler);if(!hs.enableKeyListener){return true}if(a.preventDefault){a.preventDefault()}else{a.returnValue=false}if(b==0){try{hs.getExpander().close()}catch(a){}return false}else{return hs.previousOrNext(hs.focusKey,b)}}return true},registerOverlay:function(a){hs.push(hs.overlays,a)},getWrapperKey:function(a){var d,c=/^highslide-wrapper-([0-9]+)$/;d=a;while(d.parentNode){if(d.id&&c.test(d.id)){return d.id.replace(c,"$1")}d=d.parentNode}d=a;while(d.parentNode){if(d.tagName&&hs.isHsAnchor(d)){for(var b=0;b<hs.expanders.length;b++){var e=hs.expanders[b];if(e&&e.a==d){return b}}}d=d.parentNode}return null},getExpander:function(a){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)]||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 c=d.target;while(c.parentNode&&!(/highslide-(image|move|html|resize)/.test(c.className))){c=c.parentNode}var f=hs.getExpander(c);if(f&&(f.isClosing||!f.isExpanded)){return true}if(f&&d.type=="mousedown"){if(d.target.form){return true}var b=c.className.match(/highslide-(image|move|resize)/);if(b){hs.dragArgs={exp:f,type:b[1],left:f.x.min,width:f.x.span,top:f.y.min,height:f.y.span,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(d.type=="mouseup"){hs.removeEventListener(document,"mousemove",hs.dragHandler);if(hs.dragArgs){if(hs.dragArgs.type=="image"){hs.dragArgs.exp.content.style.cursor=hs.styleRestoreCursor}var a=hs.dragArgs.hasDragged;if(!a&&!hs.hasFocused&&!/(move|resize)/.test(hs.dragArgs.type)){f.close()}else{if(a||(!a&&hs.hasHtmlexpanders)){hs.dragArgs.exp.redoShowHide()}}hs.hasFocused=false;hs.dragArgs=null}else{if(/highslide-image-blur/.test(c.className)){c.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){d.move(b)}return false},wrapperMouseHandler:function(c){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 f=hs.getExpander(c.target);if(!f||!c.relatedTarget||hs.getExpander(c.relatedTarget)==f||hs.dragArgs){return}for(var a=0;a<f.overlays.length;a++){var d=hs.$("hsId"+f.overlays[a]);if(d&&d.getAttribute("hideOnMouseOut")){var h=b?0:d.getAttribute("opacity"),g=b?d.getAttribute("opacity"):0;hs.fade(d,h,g)}}},addEventListener:function(a,c,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}}},preloadFullImage:function(b){if(hs.continuePreloading&&hs.preloadTheseImages[b]&&hs.preloadTheseImages[b]!="undefined"){var a=document.createElement("img");a.onload=function(){a=null;hs.preloadFullImage(b+1)};a.src=hs.preloadTheseImages[b]}},preloadImages:function(c){if(c&&typeof c!="object"){hs.numberOfImagesToPreload=c}var b,f,d=0;var h=document.getElementsByTagName("A");for(var e=0;e<h.length;e++){b=h[e];f=hs.isHsAnchor(b);if(f&&f[0]=="hs.expand"){if(d<hs.numberOfImagesToPreload){hs.preloadTheseImages[d]=hs.getSrc(b);d++}}}new hs.Outline(hs.outlineType,function(){hs.preloadFullImage(0)});var g=hs.createElement("img",{src:hs.graphicsDir+hs.restoreCursor})},genContainer:function(){if(!hs.container){hs.container=hs.createElement("div",null,{position:"absolute",left:0,top:0,width:"100%",zIndex:hs.zIndexCounter},document.body,true);hs.loading=hs.createElement("a",{className:"highslide-loading",title:hs.loadingTitle,innerHTML:hs.loadingText,href:"javascript:void(0)"},{position:"absolute",opacity:hs.loadingOpacity,left:"-9999px",zIndex:1},hs.container);hs.garbageBin=hs.createElement("div",null,{display:"none"},hs.container);Math.linearTween=function(e,a,g,f){return g*e/f+a};Math.easeInQuad=function(e,a,g,f){return g*(e/=f)*e+a}}},fade:function(e,g,b,d,c,a){if(typeof c=="undefined"){if(typeof d!="number"){d=250}if(d<25){hs.setStyles(e,{opacity:b});return}c=hs.faders.length;a=b>g?1:-1;var f=(25/(d-d%25))*Math.abs(g-b)}g=parseFloat(g);e.style.visibility=(g<=0)?"hidden":"visible";if(g<0||(a==1&&g>b)){return}if(e.fading&&e.fading.i!=c){clearTimeout(hs.faders[e.fading.i]);g=e.fading.o}e.fading={i:c,o:g,step:(f||e.fading.step)};e.style.visibility=(g<=0)?"hidden":"visible";hs.setStyles(e,{opacity:g});hs.faders[c]=setTimeout(function(){hs.fade(e,g+e.fading.step*a,b,null,c,a)},25)},close:function(a){try{hs.getExpander(a).close()}catch(b){}return false}};hs.Outline=function(g,b){this.onLoad=b;this.outlineType=g;var a=hs.ieVersion(),f;this.hasAlphaImageLoader=hs.ie&&a>=5.5&&a<7;if(!g){if(b){b()}return}hs.genContainer();this.table=hs.createElement("table",{cellSpacing:0},{visibility:"hidden",position:"absolute",borderCollapse:"collapse"},hs.container,true);var c=hs.createElement("tbody",null,null,this.table,1);this.td=[];for(var d=0;d<=8;d++){if(d%3==0){f=hs.createElement("tr",null,{height:"auto"},c,true)}this.td[d]=hs.createElement("td",null,null,f,true);var e=d!=4?{lineHeight:0,fontSize:0}:{position:"relative"};hs.setStyles(this.td[d],e)}this.td[4].className=g;this.preloadGraphic()};hs.Outline.prototype={preloadGraphic:function(){var b=hs.graphicsDir+(hs.outlinesDir||"outlines/")+this.outlineType+".png";var a=hs.safari?hs.container:null;this.graphic=hs.createElement("img",null,{position:"absolute",left:"-9999px",top:"-9999px"},a,true);var c=this;this.graphic.onload=function(){c.onGraphicLoad()};this.graphic.src=b},onGraphicLoad:function(){var d=this.offset=this.graphic.width/4,f=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],c={height:(2*d)+"px",width:(2*d)+"px"};for(var b=0;b<=8;b++){if(f[b]){if(this.hasAlphaImageLoader){var a=(b==1||b==7)?"100%":this.graphic.width+"px";var e=hs.createElement("div",null,{width:"100%",height:"100%",position:"relative",overflow:"hidden"},this.td[b],true);hs.createElement("div",null,{filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='"+this.graphic.src+"')",position:"absolute",width:a,height:this.graphic.height+"px",left:(f[b][0]*d)+"px",top:(f[b][1]*d)+"px"},e,true)}else{hs.setStyles(this.td[b],{background:"url("+this.graphic.src+") "+(f[b][0]*d)+"px "+(f[b][1]*d)+"px"})}if(window.opera&&(b==3||b==5)){hs.createElement("div",null,c,this.td[b],true)}hs.setStyles(this.td[b],c)}}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(e,a,f,b,c,d){if(d){this.table.style.visibility=(c>=4*this.offset)?"visible":"hidden"}this.table.style.left=(a-this.offset)+"px";this.table.style.top=(f-this.offset)+"px";this.table.style.width=(b+2*(e.offsetBorderW+this.offset))+"px";b+=2*(e.offsetBorderW-this.offset);c+=+2*(e.offsetBorderH-this.offset);this.td[4].style.width=b>=0?b+"px":0;this.td[4].style.height=c>=0?c+"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.Expander=function(j,e,g,l){this.a=j;this.custom=g;this.contentType=l||"image";this.isImage=!this.isHtml;hs.continuePreloading=false;hs.genContainer();var k=this.key=hs.expanders.length;for(var f=0;f<hs.overrides.length;f++){var b=hs.overrides[f];this[b]=e&&typeof e[b]!="undefined"?e[b]:hs[b]}var c=this.thumb=((e&&e.thumbnailId)?hs.$(e.thumbnailId):null)||j.getElementsByTagName("img")[0]||j;this.thumbsUserSetId=c.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}}for(var f=0;f<hs.expanders.length;f++){if(hs.expanders[f]&&hs.expanders[f].thumb!=c&&!hs.expanders[f].onLoadStarted){hs.expanders[f].cancelLoading()}}hs.expanders[this.key]=this;if(!hs.allowMultipleInstances){if(hs.expanders[k-1]){hs.expanders[k-1].close()}if(typeof hs.focusKey!="undefined"&&hs.expanders[hs.focusKey]){hs.expanders[hs.focusKey].close()}}var h=hs.position(c);this.thumbWidth=c.width?c.width:c.offsetWidth;this.thumbHeight=c.height?c.height:c.offsetHeight;this.thumbLeft=h.x;this.thumbTop=h.y;this.thumbOffsetBorderW=(this.thumb.offsetWidth-this.thumbWidth)/2;this.thumbOffsetBorderH=(this.thumb.offsetHeight-this.thumbHeight)/2;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(hs.pendingOutlines[this.outlineType]){this.connectOutline();this[this.contentType+"Create"]()}else{if(!this.outlineType){this[this.contentType+"Create"]()}else{this.displayLoading();var d=this;new hs.Outline(this.outlineType,function(){d.connectOutline();d[d.contentType+"Create"]()})}}return true};hs.Expander.prototype={connectOutline:function(a,c){var b=hs.pendingOutlines[this.outlineType];this.objOutline=b;b.table.style.zIndex=this.wrapper.style.zIndex;hs.pendingOutlines[this.outlineType]=null},displayLoading:function(){if(this.onLoadStarted||this.loading){return}this.originalCursor=this.a.style.cursor;this.a.style.cursor="wait";this.loading=hs.loading;var b=this;this.loading.onclick=function(){b.cancelLoading()};this.loading.style.top=(this.thumbTop+(this.thumbHeight-this.loading.offsetHeight)/2)+"px";var b=this,a=(this.thumbLeft+this.thumbOffsetBorderW+(this.thumbWidth-this.loading.offsetWidth)/2)+"px";setTimeout(function(){if(b.loading){b.loading.style.left=a}},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";a.style.visibility="hidden";a.style.display="block";a.style.position="absolute";a.style.maxWidth="none";a.style.zIndex=3;a.title=hs.restoreTitle;if(hs.safari){hs.container.appendChild(a)}if(hs.ie&&hs.flushImgSize){a.src=null}a.src=hs.getSrc(this.a);this.displayLoading()},contentLoaded:function(){try{if(!this.content){return}this.content.onload=null;if(this.onLoadStarted){return}else{this.onLoadStarted=true}if(this.loading){hs.setStyles(this.loading,{left:"-9999px",top:"-9999px"});this.loading=null;this.a.style.cursor=this.originalCursor||""}this.marginBottom=hs.marginBottom;this.newWidth=this.content.width;this.newHeight=this.content.height;this.fullExpandWidth=this.newWidth;this.fullExpandHeight=this.newHeight;this.content.style.width=this.thumbWidth+"px";this.content.style.height=this.thumbHeight+"px";this.getCaption();this.wrapper.appendChild(this.content);this.content.style.position="relative";if(this.caption){this.wrapper.appendChild(this.caption)}this.wrapper.style.left=this.thumbLeft+"px";this.wrapper.style.top=this.thumbTop+"px";hs.container.appendChild(this.wrapper);this.offsetBorderW=(this.content.offsetWidth-this.thumbWidth)/2;this.offsetBorderH=(this.content.offsetHeight-this.thumbHeight)/2;var c=hs.marginRight+2*this.offsetBorderW;this.marginBottom+=2*this.offsetBorderH;var h=this.newWidth/this.newHeight;var g=this.allowSizeReduction?this.minWidth:this.newWidth;var l=this.allowSizeReduction?this.minHeight:this.newHeight;var d={x:"auto",y:"auto"};var i=hs.getPageSize();this.x={min:parseInt(this.thumbLeft)-this.offsetBorderW+this.thumbOffsetBorderW,span:this.newWidth,minSpan:(this.newWidth<g&&!hs.padToMinWidth)?this.newWidth:g,marginMin:hs.marginLeft,marginMax:c,scroll:i.scrollLeft,clientSpan:i.width,thumbSpan:this.thumbWidth};var b=this.x.min+parseInt(this.thumbWidth);this.x=this.justify(this.x);this.y={min:parseInt(this.thumbTop)-this.offsetBorderH+this.thumbOffsetBorderH,span:this.newHeight,minSpan:this.newHeight<l?this.newHeight:l,marginMin:hs.marginTop,marginMax:this.marginBottom,scroll:i.scrollTop,clientSpan:i.height,thumbSpan:this.thumbHeight};var a=this.y.min+parseInt(this.thumbHeight);this.y=this.justify(this.y);this.correctRatio(h);var k=this.x;var j=this.y;this.show()}catch(f){window.location.href=hs.getSrc(this.a)}},justify:function(c){var e,b=c==this.x?"x":"y";var d=false;var a=true;c.min=Math.round(c.min-((c.span-c.thumbSpan)/2));if(c.min<c.scroll+c.marginMin){c.min=c.scroll+c.marginMin;d=true}if(c.span<c.minSpan){c.span=c.minSpan;a=false}if(c.min+c.span>c.scroll+c.clientSpan-c.marginMax){if(d&&a){c.span=c.clientSpan-c.marginMin-c.marginMax}else{if(c.span<c.clientSpan-c.marginMin-c.marginMax){c.min=c.scroll+c.clientSpan-c.span-c.marginMin-c.marginMax}else{c.min=c.scroll+c.marginMin;if(a){c.span=c.clientSpan-c.marginMin-c.marginMax}}}}if(c.span<c.minSpan){c.span=c.minSpan;a=false}if(c.min<c.marginMin){tmpMin=c.min;c.min=c.marginMin;if(a){c.span=c.span-(c.min-tmpMin)}}return c},correctRatio:function(c){var b=this.x;var f=this.y;var e=false;if(b.span/f.span>c){var a=b.span;b.span=f.span*c;if(b.span<b.minSpan){if(hs.padToMinWidth){b.imgSpan=b.span}b.span=b.minSpan;if(!b.imgSpan){f.span=b.span/c}}e=true}else{if(b.span/f.span<c){var d=f.span;f.span=b.span/c;e=true}}if(e){b.min=parseInt(this.thumbLeft)-this.offsetBorderW+this.thumbOffsetBorderW;b.minSpan=b.span;this.x=this.justify(b);f.min=parseInt(this.thumbTop)-this.offsetBorderH+this.thumbOffsetBorderH;f.minSpan=f.span;this.y=this.justify(f)}},show:function(){var a={x:this.x.min-20,y:this.y.min-20,w:this.x.span+40,h:this.y.span+40+this.spaceForCaption};hs.hideSelects=(hs.ie&&hs.ieVersion()<7);if(hs.hideSelects){this.showHideElements("SELECT","hidden",a)}hs.hideIframes=((window.opera&&navigator.appVersion<9)||navigator.vendor=="KDE"||(hs.ie&&hs.ieVersion()<5.5));if(hs.hideIframes){this.showHideElements("IFRAME","hidden",a)}if(hs.geckoMac){this.showHideElements("*","hidden",a)}if(this.x.imgSpan){this.content.style.margin="0 auto"}this.overlays=[];this.changeSize(1,{x:this.thumbLeft+this.thumbOffsetBorderW-this.offsetBorderW,y:this.thumbTop+this.thumbOffsetBorderH-this.offsetBorderH,w:this.thumbWidth,h:this.thumbHeight,imgW:this.thumbWidth,o:hs.outlineStartOffset},{x:this.x.min,y:this.y.min,w:this.x.span,h:this.y.span,imgW:this.x.imgSpan,o:this.objOutline?this.objOutline.offset:0},hs.expandDuration,hs.expandSteps)},changeSize:function(f,k,j,b,h){if(f&&this.objOutline&&!this.outlineWhileAnimating){this.objOutline.setPosition(this,this.x.min,this.y.min,this.x.span,this.y.span)}else{if(!f&&this.objOutline){if(this.outlineWhileAnimating){this.objOutline.setPosition(this,k.x,k.y,k.w,k.h)}else{this.objOutline.destroy()}}}if(!f){var d=this.wrapper.childNodes.length;for(var g=d-1;g>=0;g--){var c=this.wrapper.childNodes[g];if(c!=this.content){hs.discardElement(c)}}}if(this.fadeInOut){k.op=f?0:1;j.op=f}var l,e=this,a=Math[this.easing]||Math.easeInQuad;if(!f){a=Math[this.easingClose]||a}for(var g=1;g<=h;g++){l=Math.round(g*(b/h));(function(){var n=g,m={};for(var i in k){m[i]=a(l,k[i],j[i]-k[i],b);if(/[xywh]/.test(i)){m[i]=Math.round(m[i])}}setTimeout(function(){if(f&&n==1){e.content.style.visibility="visible";e.a.className+=" highslide-active-anchor"}e.setSize(m)},l)})()}if(f){setTimeout(function(){if(e.objOutline){e.objOutline.table.style.visibility="visible"}},l);setTimeout(function(){if(e.caption){e.writeCaption()}e.afterExpand()},l+50)}else{setTimeout(function(){e.afterClose()},l)}},setSize:function(c){try{this.wrapper.style.width=(c.w+2*this.offsetBorderW)+"px";this.content.style.width=((c.imgW&&!isNaN(c.imgW))?c.imgW:c.w)+"px";if(hs.safari){this.content.style.maxWidth=this.content.style.width}this.content.style.height=c.h+"px";if(c.op){hs.setStyles(this.wrapper,{opacity:c.op})}if(this.objOutline&&this.outlineWhileAnimating){var b=this.objOutline.offset-c.o;this.objOutline.setPosition(this,c.x+b,c.y+b,c.w-2*b,c.h-2*b,1)}hs.setStyles(this.wrapper,{visibility:"visible",left:c.x+"px",top:c.y+"px"})}catch(a){window.location.href=hs.getSrc(this.a)}},afterExpand:function(){this.isExpanded=true;this.focus();this.createOverlays();if(hs.showCredits){this.writeCredits()}if(this.isImage&&this.fullExpandWidth>this.x.span){this.createFullExpand()}if(!this.caption){this.prepareNextOutline()}},prepareNextOutline:function(){var a=this.key;var b=this.outlineType;new hs.Outline(b,function(){try{hs.expanders[a].preloadNext()}catch(c){}})},preloadNext:function(){var b=hs.getAdjacentAnchor(this.key,1);if(b.onclick.toString().match(/hs\.expand/)){var a=hs.createElement("img",{src:hs.getSrc(b)})}},cancelLoading:function(){hs.expanders[this.key]=null;this.a.style.cursor=this.originalCursor;if(this.loading){hs.loading.style.left="-9999px"}},writeCredits:function(){this.credits=hs.createElement("a",{href:hs.creditsHref,className:"highslide-credits",innerHTML:hs.creditsText,title:hs.creditsTitle});this.createOverlay({overlayId:this.credits,position:"top left"})},getCaption:function(){if(!this.captionId&&this.thumbsUserSetId){this.captionId="caption-for-"+this.thumbsUserSetId}if(this.captionId){this.caption=hs.getNode(this.captionId)}if(!this.caption&&!this.captionText&&this.captionEval){try{this.captionText=eval(this.captionEval)}catch(e){}}if(!this.caption&&this.captionText){this.caption=hs.createElement("div",{className:"highslide-caption",innerHTML:this.captionText})}if(!this.caption){var next=this.a.nextSibling;while(next&&!hs.isHsAnchor(next)){if(/highslide-caption/.test(next.className||null)){this.caption=next.cloneNode(1);break}next=next.nextSibling}}if(this.caption){this.marginBottom+=this.spaceForCaption}},writeCaption:function(){try{hs.setStyles(this.wrapper,{width:this.wrapper.offsetWidth+"px",height:this.wrapper.offsetHeight+"px"});hs.setStyles(this.caption,{visibility:"hidden",marginTop:hs.safari?0:"-"+this.y.span+"px"});this.caption.className+=" highslide-display-block";var f,i=this;if(hs.ie&&(hs.ieVersion()<6||document.compatMode=="BackCompat")){f=this.caption.offsetHeight}else{var a=hs.createElement("div",{innerHTML:this.caption.innerHTML},null,null,true);this.caption.innerHTML="";this.caption.appendChild(a);f=this.caption.childNodes[0].offsetHeight;this.caption.innerHTML=this.caption.childNodes[0].innerHTML}hs.setStyles(this.caption,{overflow:"hidden",height:0,zIndex:2,marginTop:0});this.wrapper.style.height="auto";if(hs.captionSlideSpeed){var d=(Math.round(f/50)||1)*hs.captionSlideSpeed}else{this.placeCaption(f,1);return}for(var c=f%d,b=0;c<=f;c+=d,b+=10){(function(){var h=c,e=(c==f)?1:0;setTimeout(function(){i.placeCaption(h,e)},b)})()}}catch(g){}},placeCaption:function(b,a){if(!this.caption){return}this.caption.style.height=b+"px";this.caption.style.visibility="visible";this.y.span=this.wrapper.offsetHeight-2*this.offsetBorderH;var c=this.objOutline;if(c){c.td[4].style.height=(this.wrapper.offsetHeight-2*this.objOutline.offset)+"px";if(c.hasAlphaImageLoader){c.td[3].style.height=c.td[5].style.height=c.td[4].style.height}}if(a){this.prepareNextOutline()}},showHideElements:function(h,c,b){var e=document.getElementsByTagName(h);var d=h=="*"?"overflow":"visibility";for(var f=0;f<e.length;f++){if(d=="visibility"||(document.defaultView.getComputedStyle(e[f],"").getPropertyValue("overflow")=="auto"||e[f].getAttribute("hidden-by")!=null)){var a=e[f].getAttribute("hidden-by");if(c=="visible"&&a){a=a.replace("["+this.key+"]","");e[f].setAttribute("hidden-by",a);if(!a){e[f].style[d]=e[f].origProp}}else{if(c=="hidden"){var l=hs.position(e[f]);l.w=e[f].offsetWidth;l.h=e[f].offsetHeight;var k=(l.x+l.w<b.x||l.x>b.x+b.w);var j=(l.y+l.h<b.y||l.y>b.y+b.h);var g=hs.getWrapperKey(e[f]);if(!k&&!j&&g!=this.key){if(!a){e[f].setAttribute("hidden-by","["+this.key+"]");e[f].origProp=e[f].style[d];e[f].style[d]="hidden"}else{if(!a.match("["+this.key+"]")){e[f].setAttribute("hidden-by",a+"["+this.key+"]")}}}else{if(a=="["+this.key+"]"||hs.focusKey==g){e[f].setAttribute("hidden-by","");e[f].style[d]=e[f].origProp||""}else{if(a&&a.match("["+this.key+"]")){e[f].setAttribute("hidden-by",a.replace("["+this.key+"]",""))}}}}}}}},focus:function(){this.wrapper.style.zIndex=hs.zIndexCounter++;for(var b=0;b<hs.expanders.length;b++){if(hs.expanders[b]&&b==hs.focusKey){var a=hs.expanders[b];a.content.className+=" highslide-"+a.contentType+"-blur";if(a.caption){a.caption.className+=" highslide-caption-blur"}a.content.style.cursor=hs.ie?"hand":"pointer";a.content.title=hs.focusTitle}}if(this.objOutline){this.objOutline.table.style.zIndex=this.wrapper.style.zIndex}this.content.className="highslide-"+this.contentType;if(this.caption){this.caption.className=this.caption.className.replace(" highslide-caption-blur","")}this.content.title=hs.restoreTitle;hs.styleRestoreCursor=window.opera?"pointer":"url("+hs.graphicsDir+hs.restoreCursor+"), pointer";if(hs.ie&&hs.ieVersion()<6){hs.styleRestoreCursor="hand"}this.content.style.cursor=hs.styleRestoreCursor;hs.focusKey=this.key;hs.addEventListener(document,"keydown",hs.keyHandler)},move:function(a){this.x.min=a.left+a.dX;this.y.min=a.top+a.dY;if(a.type=="image"){this.content.style.cursor="move"}hs.setStyles(this.wrapper,{left:this.x.min+"px",top:this.y.min+"px"});if(this.objOutline){this.objOutline.setPosition(this,this.x.min,this.y.min,this.x.span,this.y.span)}},close:function(){if(this.isClosing||!this.isExpanded){return}this.isClosing=true;hs.removeEventListener(document,"keydown",hs.keyHandler);try{this.content.style.cursor="default";this.changeSize(0,{x:this.x.min,y:this.y.min,w:this.x.span,h:parseInt(this.content.style.height),imgW:this.x.imgSpan,o:this.objOutline?this.objOutline.offset:0},{x:this.thumbLeft-this.offsetBorderW+this.thumbOffsetBorderW,y:this.thumbTop-this.offsetBorderH+this.thumbOffsetBorderH,w:this.thumbWidth,h:this.thumbHeight,imgW:this.thumbWidth,o:hs.outlineStartOffset},hs.restoreDuration,hs.restoreSteps)}catch(a){this.afterClose()}},createOverlay:function(c){var b=c.overlayId;if(typeof b=="string"){b=hs.getNode(b)}if(!b||typeof b=="string"){return}var a=hs.createElement("div",{id:"hsId"+hs.idCounter++},{left:0,top:0,position:"absolute",zIndex:3,visibility:"hidden"},this.wrapper,true);if(c.opacity){hs.setStyles(b,{opacity:c.opacity})}b.style.styleFloat="none";b.className+=" highslide-display-block";a.appendChild(b);a.hsPos=c.position;this.positionOverlay(a);if(c.hideOnMouseOut){a.setAttribute("hideOnMouseOut",true)}if(!c.opacity){c.opacity=1}a.setAttribute("opacity",c.opacity);hs.fade(a,0,c.opacity);hs.push(this.overlays,hs.idCounter-1)},positionOverlay:function(d,b){var g=this.offsetBorderW,a=this.x.span-d.offsetWidth,f=this.offsetBorderH,c=(b||parseInt(this.content.style.height))-d.offsetHeight,e=d.hsPos||"center center";if(/^bottom/.test(e)){f+=c}if(/^center/.test(e)){f+=c/2}if(/right$/.test(e)){g+=a}if(/center$/.test(e)){g+=a/2}d.style.left=g+"px";d.style.top=f+"px"},createOverlays:function(){for(var a=0;a<hs.overlays.length;a++){var c=hs.overlays[a],d=c.thumbnailId,b=c.slideshowGroup;if((!d&&!b)||d==this.thumbsUserSetId||b===this.slideshowGroup){this.createOverlay(c)}}},createFullExpand:function(){var b=hs.createElement("a",{href:"javascript:hs.expanders["+this.key+"].doFullExpand();",title:hs.fullExpandTitle,className:"highslide-full-expand"});this.fullExpandLabel=b;this.createOverlay({overlayId:b,position:hs.fullExpandPosition,hideOnMouseOut:true,opacity:hs.fullExpandOpacity})},doFullExpand:function(){try{hs.discardElement(this.fullExpandLabel);this.focus();this.x.min=parseInt(this.wrapper.style.left)-(this.fullExpandWidth-this.content.width)/2;if(this.x.min<hs.marginLeft){this.x.min=hs.marginLeft}this.wrapper.style.left=this.x.min+"px";hs.setStyles(this.content,{width:this.fullExpandWidth+"px",maxWidth:this.fullExpandWidth+"px",height:this.fullExpandHeight+"px"});this.x.span=this.fullExpandWidth;this.wrapper.style.width=(this.x.span+2*this.offsetBorderW)+"px";this.y.span=this.wrapper.offsetHeight-2*this.offsetBorderH;if(this.objOutline){this.objOutline.setPosition(this,this.x.min,this.y.min,this.x.span,this.y.span)}for(var a=0;a<this.overlays.length;a++){this.positionOverlay(hs.$("hsId"+this.overlays[a]))}this.redoShowHide()}catch(b){window.location.href=this.content.src}},redoShowHide:function(){var a={x:parseInt(this.wrapper.style.left)-20,y:parseInt(this.wrapper.style.top)-20,w:this.content.offsetWidth+40,h:this.content.offsetHeight+40+this.spaceForCaption};if(hs.hideSelects){this.showHideElements("SELECT","hidden",a)}if(hs.hideIframes){this.showHideElements("IFRAME","hidden",a)}if(hs.geckoMac){this.showHideElements("*","hidden",a)}},afterClose:function(){this.a.className=this.a.className.replace("highslide-active-anchor","");if(hs.hideSelects){this.showHideElements("SELECT","visible")}if(hs.hideIframes){this.showHideElements("IFRAME","visible")}if(hs.geckoMac){this.showHideElements("*","visible")}if(this.objOutline&&this.outlineWhileAnimating){this.objOutline.destroy()}hs.discardElement(this.wrapper);hs.expanders[this.key]=null;hs.reOrder()}};var HsExpander=hs.Expander;hs.addEventListener(document,"mousedown",hs.mouseClickHandler);hs.addEventListener(document,"mouseup",hs.mouseClickHandler);hs.addEventListener(window,"load",hs.preloadImages);
