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:0.75,allowMultipleInstances:true,numberOfImagesToPreload:5,outlineWhileAnimating:2,outlineStartOffset:3,padToMinWidth:false,fullExpandPosition:'bottom right',fullExpandOpacity:1,showCredits:false,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','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:{},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,b,c,d,f){var g=document.createElement(a);if(b)hs.setAttribs(g,b);if(f)hs.setStyles(g,{padding:0,border:'none',margin:0});if(c)hs.setStyles(g,c);if(d)d.appendChild(g);return g},setAttribs:function(a,b){for(var c in b)a[c]=b[c]},setStyles:function(a,b){for(var c in b){if(hs.ie&&c=='opacity'){if(b[c]>0.99)a.style.removeAttribute('filter');else a.style.filter='alpha(opacity='+(b[c]*100)+')'}else a.style[c]=b[c]}},ieVersion:function(){var a=navigator.appVersion.split("MSIE");return a[1]?parseFloat(a[1]):null},getPageSize:function(){var a=document,b=window,c=a.compatMode&&a.compatMode!='BackCompat'?a.documentElement:a.body;var d=hs.ie?c.clientWidth:(a.documentElement.clientWidth||self.innerWidth),f=hs.ie?c.clientHeight:self.innerHeight;return{width:d,height:f,scrollLeft:hs.ie?c.scrollLeft:pageXOffset,scrollTop:hs.ie?c.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,d){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 a=0,b=-1;for(var c=0;c<hs.expanders.length;c++){if(hs.expanders[c]){if(hs.expanders[c].wrapper.style.zIndex&&hs.expanders[c].wrapper.style.zIndex>a){a=hs.expanders[c].wrapper.style.zIndex;b=c}}}if(b==-1)hs.focusKey=-1;else hs.expanders[b].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(a){var b=hs.getParam(a,'src');if(b)return b;return a.href},getNode:function(a){var b=hs.$(a),c=hs.clones[a],d={};if(!b&&!c)return null;if(!c){c=b.cloneNode(true);c.id='';hs.clones[a]=c;return b}else{return c.cloneNode(true)}},discardElement:function(a){hs.garbageBin.appendChild(a);hs.garbageBin.innerHTML=''},transit:function(a,b){hs.last=b=b||hs.getExpander();try{hs.upcoming=a;a.onclick()}catch(e){hs.last=hs.upcoming=null}try{b.close()}catch(e){}return false},previousOrNext:function(a,b){var c=hs.getExpander(a),d=c.getAdjacentAnchor(b);return hs.transit(d,c)},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 b=hs.getExpander();var c=null;switch(a.keyCode){case 70:if(b)b.doFullExpand();return true;case 32:case 34:case 39:case 40:c=1;break;case 8:case 33:case 37:case 38:c=-1;break;case 27:case 13:c=0}if(c!==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(b){if(c==0){b.close()}else{hs.previousOrNext(b.key,c)}return false}}return true},registerOverlay:function(a){hs.push(hs.overlays,a)},getWrapperKey:function(a,b){var c,d=/^highslide-wrapper-([0-9]+)$/;c=a;while(c.parentNode){if(c.id&&d.test(c.id))return c.id.replace(d,"$1");c=c.parentNode}if(!b){c=a;while(c.parentNode){if(c.tagName&&hs.isHsAnchor(c)){for(var f=0;f<hs.expanders.length;f++){var g=hs.expanders[f];if(g&&g.a==c)return f}}c=c.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 b=a.target;while(b.parentNode&&!(/highslide-(image|move|html|resize)/.test(b.className))){b=b.parentNode}var c=hs.getExpander(b);if(c&&(c.isClosing||!c.isExpanded))return true;if(c&&a.type=='mousedown'){if(a.target.form)return true;var d=b.className.match(/highslide-(image|move|resize)/);if(d){hs.dragArgs={exp:c,type:d[1],left:c.x.pos,width:c.x.size,top:c.y.pos,height:c.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(c.content.className)){c.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 f=hs.dragArgs.hasDragged;if(!f&&!hs.hasFocused&&!/(move|resize)/.test(hs.dragArgs.type)){c.close()}else if(f||(!f&&hs.hasHtmlExpanders)){hs.dragArgs.exp.doShowHide('hidden')}hs.hasFocused=false;hs.dragArgs=null}else if(/highslide-image-blur/.test(b.className)){b.style.cursor=hs.styleRestoreCursor}}return false},dragHandler:function(a){if(!hs.dragArgs)return true;if(!a)a=window.event;var b=hs.dragArgs,c=b.exp;b.dX=a.clientX-b.clickX;b.dY=a.clientY-b.clickY;var d=Math.sqrt(Math.pow(b.dX,2)+Math.pow(b.dY,2));if(!b.hasDragged)b.hasDragged=(b.type!='image'&&d>0)||(d>(hs.dragSensitivity||5));if(b.hasDragged&&a.clientX>5&&a.clientY>5){if(b.type=='resize')c.resize(b);else{c.moveTo(b.left+b.dX,b.top+b.dY);if(b.type=='image')c.content.style.cursor='move'}}return false},wrapperMouseHandler:function(a){try{if(!a)a=window.event;var b=/mouseover/i.test(a.type);if(!a.target)a.target=a.srcElement;if(hs.ie)a.relatedTarget=b?a.fromElement:a.toElement;var c=hs.getExpander(a.target);if(!c.isExpanded)return;if(!c||!a.relatedTarget||hs.getExpander(a.relatedTarget,true)==c||hs.dragArgs)return;for(var d=0;d<c.overlays.length;d++){var f=hs.$('hsId'+c.overlays[d]);if(f&&f.hideOnMouseOut){var g=b?0:f.opacity,h=b?f.opacity:0;hs.fade(f,g,h)}}}catch(a){}},addEventListener:function(a,b,c){try{a.addEventListener(b,c,false)}catch(e){try{a.detachEvent('on'+b,c);a.attachEvent('on'+b,c)}catch(e){a['on'+b]=c}}},removeEventListener:function(a,b,c){try{a.removeEventListener(b,c,false)}catch(e){try{a.detachEvent('on'+b,c)}catch(e){a['on'+b]=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(a){if(a&&typeof a!='object')hs.numberOfImagesToPreload=a;var b=hs.getAnchors();for(var c=0;c<b.images.length&&c<hs.numberOfImagesToPreload;c++){hs.push(hs.preloadTheseImages,hs.getSrc(b.images[c]))}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.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(a,b,c,d){return c*a/d+b};Math.easeInQuad=function(a,b,c,d){return c*(a/=d)*a+b};for(var f in hs.langDefaults){if(typeof hs[f]!='undefined')hs.lang[f]=hs[f];else if(typeof hs.lang[f]=='undefined'&&typeof hs.langDefaults[f]!='undefined')hs.lang[f]=hs.langDefaults[f]}hs.hideSelects=(hs.ie&&hs.ieVersion()<7);hs.hideIframes=((window.opera&&navigator.appVersion<9)||navigator.vendor=='KDE'||(hs.ie&&hs.ieVersion()<5.5))}},domReady:function(){hs.isDomReady=true;if(hs.onDomReady)hs.onDomReady()},updateAnchors:function(){var a,b,c=[],d=[],f={},g;for(var h=0;h<hs.openerTagNames.length;h++){b=document.getElementsByTagName(hs.openerTagNames[h]);for(var i=0;i<b.length;i++){a=b[i];g=hs.isHsAnchor(a);if(g){hs.push(c,a);if(g[0]=='hs.expand')hs.push(d,a);var j=hs.getParam(a,'slideshowGroup')||'none';if(!f[j])f[j]=[];hs.push(f[j],a)}}}hs.anchors={all:c,groups:f,images:d};return hs.anchors},getAnchors:function(){return hs.anchors||hs.updateAnchors()},fade:function(a,b,c,d,f,g,h){if(typeof g=='undefined'){if(typeof d!='number')d=250;if(d<25){hs.setStyles(a,{opacity:c});if(f)f();return}g=hs.faders.length;h=c>b?1:-1;var i=(25/(d-d%25))*Math.abs(b-c)}b=parseFloat(b);var j=(a.fade===0||a.fade===false||(a.fade==2&&hs.ie));a.style.visibility=((j?c:b)<=0)?'hidden':'visible';if(j||b<0||(h==1&&b>c)){if(f)f();return}if(a.fading&&a.fading.i!=g){clearTimeout(hs.faders[a.fading.i]);b=a.fading.o}a.fading={i:g,o:b,step:(i||a.fading.step)};a.style.visibility=(b<=0)?'hidden':'visible';hs.setStyles(a,{opacity:b});hs.faders[g]=setTimeout(function(){hs.fade(a,b+a.fading.step*h,c,null,f,g,h)},25)},close:function(a){var b=hs.getExpander(a);if(b)b.close();return false}};hs.Outline=function(a,b){this.onLoad=b;this.outlineType=a;var c=hs.ieVersion(),d;this.hasAlphaImageLoader=hs.ie&&c>=5.5&&c<7;if(!a){if(b)b();return}hs.init();this.table=hs.createElement('table',{cellSpacing:0},{visibility:'hidden',position:'absolute',borderCollapse:'collapse',width:0},hs.container,true);var f=hs.createElement('tbody',null,null,this.table,1);this.td=[];for(var g=0;g<=8;g++){if(g%3==0)d=hs.createElement('tr',null,{height:'auto'},f,true);this.td[g]=hs.createElement('td',null,null,d,true);var h=g!=4?{lineHeight:0,fontSize:0}:{position:'relative'};hs.setStyles(this.td[g],h)}this.td[4].className=a+' highslide-outline';this.preloadGraphic()};hs.Outline.prototype={preloadGraphic:function(){var a=hs.graphicsDir+(hs.outlinesDir||"outlines/")+this.outlineType+".png";var b=hs.safari?hs.container:null;this.graphic=hs.createElement('img',null,{position:'absolute',top:'-9999px'},b,true);var c=this;this.graphic.onload=function(){c.onGraphicLoad()};this.graphic.src=a},onGraphicLoad:function(){var a=this.offset=this.graphic.width/4,b=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],c={height:(2*a)+'px',width:(2*a)+'px'};for(var d=0;d<=8;d++){if(b[d]){if(this.hasAlphaImageLoader){var f=(d==1||d==7)?'100%':this.graphic.width+'px';var g=hs.createElement('div',null,{width:'100%',height:'100%',position:'relative',overflow:'hidden'},this.td[d],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:(b[d][0]*a)+'px',top:(b[d][1]*a)+'px'},g,true)}else{hs.setStyles(this.td[d],{background:'url('+this.graphic.src+') '+(b[d][0]*a)+'px '+(b[d][1]*a)+'px'})}if(window.opera&&(d==3||d==5))hs.createElement('div',null,c,this.td[d],true);hs.setStyles(this.td[d],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(a,b,c){b=b||{x:a.x.pos,y:a.y.pos,w:a.x.size+a.x.p1+a.x.p2,h:a.y.size+a.y.p1+a.y.p2};if(c)this.table.style.visibility=(b.h>=4*this.offset)?'visible':'hidden';hs.setStyles(this.table,{left:(b.x-this.offset)+'px',top:(b.y-this.offset)+'px',width:(b.w+2*(a.x.cb+this.offset))+'px'});b.w+=2*(a.x.cb-this.offset);b.h+=+2*(a.y.cb-this.offset);hs.setStyles(this.td[4],{width:b.w>=0?b.w+'px':0,height:b.h>=0?b.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(a,b){this.exp=a;this.dim=b;this.ucwh=b=='x'?'Width':'Height';this.wh=this.ucwh.toLowerCase();this.uclt=b=='x'?'Left':'Top';this.lt=this.uclt.toLowerCase();this.ucrb=b=='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'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.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 b=this.exp;if(b.isImage&&(b.useBox||hs.padToMinWidth)){this.imgSize=a;this.size=Math.max(this.size,this.imgSize);b.content.style[this.lt]=this.get('imgPad')+'px'}else this.size=a;b.content.style[this.wh]=a+'px';b.wrapper.style[this.wh]=this.get('wsize')+'px';if(b.outline)b.outline.setPosition(b);if(this.dim=='x'&&b.overlayBox)b.sizeOverlayBox(true)},setPos:function(a){this.pos=a;this.exp.wrapper.style[this.lt]=a+'px';if(this.exp.outline)this.exp.outline.setPosition(this.exp)}};hs.Expander=function(a,b,c,d){if(document.readyState&&hs.ie&&!hs.isDomReady){hs.onDomReady=function(){new hs.Expander(a,b,c,d)};return}this.a=a;this.custom=c;this.contentType=d||'image';this.isImage=!this.isHtml;hs.continuePreloading=false;this.overlays=[];hs.init();var f=this.key=hs.expanders.length;for(var g=0;g<hs.overrides.length;g++){var h=hs.overrides[g];this[h]=b&&typeof b[h]!='undefined'?b[h]:hs[h]}if(!this.src)this.src=a.href;var i=(b&&b.thumbnailId)?hs.$(b.thumbnailId):a;i=this.thumb=i.getElementsByTagName('img')[0]||i;this.thumbsUserSetId=i.id||a.id;for(var g=0;g<hs.expanders.length;g++){if(hs.expanders[g]&&hs.expanders[g].a==a){hs.expanders[g].focus();return false}}for(var g=0;g<hs.expanders.length;g++){if(hs.expanders[g]&&hs.expanders[g].thumb!=i&&!hs.expanders[g].onLoadStarted){hs.expanders[g].cancelLoading()}}hs.expanders[this.key]=this;if(!hs.allowMultipleInstances&&!hs.upcoming){if(hs.expanders[f-1])hs.expanders[f-1].close();if(typeof hs.focusKey!='undefined'&&hs.expanders[hs.focusKey])hs.expanders[hs.focusKey].close()}this.el=i;this.tpos=hs.getPosition(i);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 l=this;new hs.Outline(this.outlineType,function(){l.connectOutline();l[l.contentType+'Create']()})}return true};hs.Expander.prototype={connectOutline:function(){var a=this.outline=hs.pendingOutlines[this.outlineType];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 a=this;var b=document.createElement('img');this.content=b;b.onload=function(){if(hs.expanders[a.key])a.contentLoaded()};if(hs.blockRightClick)b.oncontextmenu=function(){return false};b.className='highslide-image';hs.setStyles(b,{visibility:'hidden',display:'block',position:'absolute',maxWidth:'9999px',zIndex:3});b.title=hs.lang.restoreTitle;if(hs.safari)hs.container.appendChild(b);if(hs.ie&&hs.flushImgSize)b.src=null;b.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}hs.setStyles(this.wrapper,{left:a.tpos+'px',top:b.tpos+'px'});a.full=this.content.width;b.full=this.content.height;hs.setStyles(this.content,{width:this.x.t+'px',height:this.y.t+'px'});this.wrapper.appendChild(this.content);hs.container.appendChild(this.wrapper);a.calcBorders();b.calcBorders();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(e){window.location.href=this.src}},justify:function(a,b){var c,d=a.target,f=a==this.x?'x':'y';var g=false;var h=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;g=true}if(!b&&a.size<a.minSize){a.size=a.minSize;h=false}if(a.pos+a.get('wsize')>a.scroll+a.clientSize-a.marginMax){if(!b&&g&&h){a.size=a.get('fitsize')-2*a.cb-a.p1-a.p2}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(!b&&h)a.size=a.get('fitsize')-2*a.cb-a.p1-a.p2}}if(!b&&a.size<a.minSize){a.size=a.minSize;h=false}if(a.pos<a.marginMin){var i=a.pos;a.pos=a.marginMin;if(h&&!b)a.size=a.size-(a.pos-i)}},correctRatio:function(a){var b=this.x,c=this.y,d=false,f=Math.min(b.full,b.size),g=Math.min(c.full,c.size),h=(this.useBox||hs.padToMinWidth);if(f/g>a){f=g*a;if(f<b.minSize){f=b.minSize;g=f/a}d=true}else if(f/g<a){g=f/a;d=true}if(hs.padToMinWidth&&b.full<b.minSize){b.imgSize=b.full;c.size=c.imgSize=c.full}else if(this.useBox){b.imgSize=f;c.imgSize=g}else{b.size=f;c.size=g}this.fitOverlayBox(h?null:a);if(h&&c.size<c.imgSize){c.imgSize=c.size;b.imgSize=c.size*a}if(d||h){b.pos=b.tpos-b.cb+b.tb;b.minSize=b.size;this.justify(b,true);c.pos=c.tpos-c.cb+c.tb;c.minSize=c.size;this.justify(c,true);if(this.overlayBox)this.sizeOverlayBox()}},fitOverlayBox:function(a){var b=this.x,c=this.y;if(this.overlayBox){while(c.size>this.minHeight&&b.size>this.minWidth&&c.get('wsize')>c.get('fitsize')){c.size-=10;if(a)b.size=c.size*a;this.sizeOverlayBox(0,1)}}},show:function(){this.doShowHide('hidden');this.changeSize(1,{xpos:this.x.tpos+this.x.tb-this.x.cb,ypos:this.y.tpos+this.y.tb-this.y.cb,xsize:this.x.t,ysize:this.y.t,xp1:0,xp2:0,yp1:0,yp2:0,ximgSize:this.x.t,ximgPad:0,yimgSize:this.y.t,yimgPad:0,o:hs.outlineStartOffset},{xpos:this.x.pos,ypos:this.y.pos,xsize:this.x.size,ysize:this.y.size,xp1:this.x.p1,yp1:this.y.p1,xp2:this.x.p2,yp2:this.y.p2,ximgSize:this.x.imgSize,ximgPad:this.x.get('imgPad'),yimgSize:this.y.imgSize,yimgPad:this.y.get('imgPad'),o:this.outline?this.outline.offset:0},hs.expandDuration)},changeSize:function(d,f,g,h){if(this.outline&&!this.outlineWhileAnimating){if(d)this.outline.setPosition(this);else this.outline.destroy()}if(!d&&this.overlayBox){hs.discardElement(this.overlayBox)}if(this.fadeInOut){f.op=d?0:1;g.op=d}var i,j=this,k=Math[this.easing]||Math.easeInQuad,l=(d?hs.expandSteps:hs.restoreSteps)||parseInt(h/25)||1;if(!d)k=Math[this.easingClose]||k;for(var m=1;m<=l;m++){i=Math.round(m*(h/l));(function(){var a=m,b={};for(var c in f){b[c]=k(i,f[c],g[c]-f[c],h);if(isNaN(b[c]))b[c]=g[c];if(!/^op$/.test(c))b[c]=Math.round(b[c])}setTimeout(function(){if(d&&a==1){j.content.style.visibility='visible';j.a.className+=' highslide-active-anchor'}j.setSize(b)},i)})()}if(d){setTimeout(function(){if(j.outline)j.outline.table.style.visibility="visible"},i);setTimeout(function(){j.afterExpand()},i+50)}else setTimeout(function(){j.afterClose()},i)},setSize:function(a){try{if(a.op)hs.setStyles(this.wrapper,{opacity:a.op});hs.setStyles(this.wrapper,{width:(a.xsize+a.xp1+a.xp2+2*this.x.cb)+'px',height:(a.ysize+a.yp1+a.yp2+2*this.y.cb)+'px',left:a.xpos+'px',top:a.ypos+'px'});hs.setStyles(this.content,{left:(a.xp1+a.ximgPad)+'px',top:(a.yp1+a.yimgPad)+'px',width:(a.ximgSize||a.xsize)+'px',height:(a.yimgSize||a.ysize)+'px'});if(this.outline&&this.outlineWhileAnimating){var b=this.outline.offset-a.o;this.outline.setPosition(this,{x:a.xpos+b,y:a.ypos+b,w:a.xsize+a.xp1+a.xp2+ -2*b,h:a.ysize+a.yp1+a.yp2+ -2*b},1)}this.wrapper.style.visibility='visible'}catch(e){window.location.href=this.src}},afterExpand:function(){this.isExpanded=true;this.focus();this.prepareNextOutline();var a=hs.page,b=hs.mouse.x+a.scrollLeft,c=hs.mouse.y+a.scrollTop;this.mouseIsOver=this.x.pos<b&&b<this.x.pos+this.x.get('wsize')&&this.y.pos<c&&c<this.y.pos+this.y.get('wsize');if(this.overlayBox)this.showOverlays()},prepareNextOutline:function(){var a=this.key;var b=this.outlineType;new hs.Outline(b,function(){try{hs.expanders[a].preloadNext()}catch(e){}})},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(a){var b=this.getAnchorIndex(),c=hs.anchors.groups[this.slideshowGroup||'none'];if(!c[b+a]&&this.slideshow&&this.slideshow.repeat){if(a==1)return c[0];else if(a==-1)return c[c.length-1]}return c[b+a]||null},getAnchorIndex:function(){var a=hs.anchors.groups[this.slideshowGroup||'none'];for(var b=0;b<a.length;b++){if(a[b]==this.a)return b}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:'top left'})},getInline:function(a,b){for(var c=0;c<a.length;c++){var d=a[c],f=null;if(!this[d+'Id']&&this.thumbsUserSetId)this[d+'Id']=d+'-for-'+this.thumbsUserSetId;if(this[d+'Id'])this[d]=hs.getNode(this[d+'Id']);if(!this[d]&&!this[d+'Text']&&this[d+'Eval'])try{f=eval(this[d+'Eval'])}catch(e){}if(!this[d]&&this[d+'Text']){f=this[d+'Text']}if(!this[d]&&!f){var g=this.a.nextSibling;while(g&&!hs.isHsAnchor(g)){if((new RegExp('highslide-'+d)).test(g.className||null)){this[d]=g.cloneNode(1);break}g=g.nextSibling}}if(!this[d]&&f)this[d]=hs.createElement('div',{className:'highslide-'+d,innerHTML:f});if(b&&this[d]){var h={position:(d=='heading')?'above':'below'};for(var i in this[d+'Overlay'])h[i]=this[d+'Overlay'][i];h.overlayId=this[d];this.createOverlay(h)}}},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(a,b){var c=document.getElementsByTagName(a);var d=a=='*'?'overflow':'visibility';for(var f=0;f<c.length;f++){if(d=='visibility'||(document.defaultView.getComputedStyle(c[f],"").getPropertyValue('overflow')=='auto'||c[f].getAttribute('hidden-by')!=null)){var g=c[f].getAttribute('hidden-by');if(b=='visible'&&g){g=g.replace('['+this.key+']','');c[f].setAttribute('hidden-by',g);if(!g)c[f].style[d]=c[f].origProp}else if(b=='hidden'){var h=hs.getPosition(c[f]);h.w=c[f].offsetWidth;h.h=c[f].offsetHeight;var i=(h.x+h.w<this.x.get('opos')||h.x>this.x.get('opos')+this.x.get('osize'));var j=(h.y+h.h<this.y.get('opos')||h.y>this.y.get('opos')+this.y.get('osize'));var k=hs.getWrapperKey(c[f]);if(!i&&!j&&k!=this.key){if(!g){c[f].setAttribute('hidden-by','['+this.key+']');c[f].origProp=c[f].style[d];c[f].style[d]='hidden'}else if(g.indexOf('['+this.key+']')==-1){c[f].setAttribute('hidden-by',g+'['+this.key+']')}}else if((g=='['+this.key+']'||hs.focusKey==k)&&k!=this.key){c[f].setAttribute('hidden-by','');c[f].style[d]=c[f].origProp||''}else if(g&&g.indexOf('['+this.key+']')>-1){c[f].setAttribute('hidden-by',g.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.ieVersion()<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(a){var b,c,d=a.width/a.height;b=Math.max(a.width+a.dX,Math.min(this.minWidth,this.x.full));if(this.isImage&&Math.abs(b-this.x.full)<12)b=this.x.full;c=b/d;if(c<Math.min(this.minHeight,this.y.full)){c=Math.min(this.minHeight,this.y.full);if(this.isImage)b=c*d}this.resizeTo(b,c)},resizeTo:function(a,b){this.y.setSize(b);this.x.setSize(a)},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,{xpos:this.x.pos,ypos:this.y.pos,xsize:this.x.size,ysize:this.y.size,xp1:this.x.p1,yp1:this.y.p1,xp2:this.x.p2,yp2:this.y.p2,ximgSize:this.x.imgSize,ximgPad:this.x.get('imgPad'),yimgSize:this.y.imgSize,yimgPad:this.y.get('imgPad'),o:this.outline?this.outline.offset:0},{xpos:this.x.tpos-this.x.cb+this.x.tb,ypos:this.y.tpos-this.y.cb+this.y.tb,xsize:this.x.t,ysize:this.y.t,xp1:0,yp1:0,xp2:0,yp2:0,ximgSize:this.x.imgSize?this.x.t:null,ximgPad:0,yimgSize:this.y.imgSize?this.y.t:null,yimgPad:0,o:hs.outlineStartOffset},hs.restoreDuration)}catch(e){this.afterClose()}},createOverlay:function(a){var b=a.overlayId;if(typeof b=='string')b=hs.getNode(b);if(!b||typeof b=='string')return;b.style.display='block';this.genOverlayBox();var c=a.width&&/^[0-9]+(px|%)$/.test(a.width)?a.width:'auto';if(/^(left|right)panel$/.test(a.position)&&!/^[0-9]+px$/.test(a.width))c='200px';var d=hs.createElement('div',{id:'hsId'+hs.idCounter++,hsId:a.hsId},{position:'absolute',visibility:'hidden',width:c,direction:hs.lang.cssDirection||''},this.overlayBox,true);d.appendChild(b);hs.setAttribs(d,{hideOnMouseOut:a.hideOnMouseOut,opacity:a.opacity||1,hsPos:a.position,fade:a.fade});if(this.gotOverlays){this.positionOverlay(d);if(!d.hideOnMouseOut||this.mouseIsOver)hs.fade(d,0,d.opacity)}hs.push(this.overlays,hs.idCounter-1)},positionOverlay:function(a){var b=a.hsPos||'middle center';if(/left$/.test(b))a.style.left=0;if(/center$/.test(b))hs.setStyles(a,{left:'50%',marginLeft:'-'+Math.round(a.offsetWidth/2)+'px'});if(/right$/.test(b))a.style.right=0;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=0;if(/^middle/.test(b))hs.setStyles(a,{top:'50%',marginTop:'-'+Math.round(a.offsetHeight/2)+'px'});if(/^bottom/.test(b))a.style.bottom=0;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,d=b.slideshowGroup;if((!c&&!d)||(c&&c==this.thumbsUserSetId)||(d&&d===this.slideshowGroup)){this.createOverlay(b)}}var f=[];for(var a=0;a<this.overlays.length;a++){var b=hs.$('hsId'+this.overlays[a]);if(/panel$/.test(b.hsPos))this.positionOverlay(b);else hs.push(f,b)}for(var a=0;a<f.length;a++)this.positionOverlay(f[a]);this.gotOverlays=true},genOverlayBox:function(){if(!this.overlayBox)this.overlayBox=hs.createElement('div',{className:this.wrapperClassName},{position:'absolute',width:this.x.size?this.x.size+'px':this.x.full+'px',height:0,visibility:'hidden',overflow:'hidden',zIndex:hs.ie?4:null},hs.container,true)},sizeOverlayBox:function(a,b){hs.setStyles(this.overlayBox,{width:this.x.size+'px',height:this.y.size+'px'});if(a||b){for(var c=0;c<this.overlays.length;c++){var d=hs.$('hsId'+this.overlays[c]);var f=(hs.ie&&(hs.ieVersion()<=6||document.compatMode=='BackCompat'));if(d&&/^(above|below)$/.test(d.hsPos)){if(f){d.style.width=(this.overlayBox.offsetWidth+2*this.x.cb+this.x.p1+this.x.p2)+'px'}this.y[d.hsPos=='above'?'p1':'p2']=d.offsetHeight}if(d&&f&&/^(left|right)panel$/.test(d.hsPos)){d.style.height=(this.overlayBox.offsetHeight+2*this.y.cb+this.y.p1+this.y.p2)+'px'}}}if(a){hs.setStyles(this.content,{top:this.y.p1+'px'});hs.setStyles(this.overlayBox,{top:(this.y.p1+this.y.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 b=0;b<this.overlays.length;b++){var c=hs.$('hsId'+this.overlays[b]);c.style.zIndex=4;if(!c.hideOnMouseOut||this.mouseIsOver)hs.fade(c,0,c.opacity)}},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 a=this.x.size;this.resizeTo(this.x.full,this.y.full);var b=this.x.pos-(this.x.size-a)/2;if(b<hs.marginLeft)b=hs.marginLeft;this.moveTo(b,this.y.pos);this.doShowHide('hidden')}catch(e){window.location.href=this.content.src}},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(document.readyState&&hs.ie){(function(){try{document.documentElement.doScroll('left')}catch(e){setTimeout(arguments.callee,50);return}hs.domReady()})()}hs.langDefaults=hs.lang;var HsExpander=hs.Expander;hs.addEventListener(window,'load',function(){if(hs.expandCursor){var a='.highslide img',b='cursor: url('+hs.graphicsDir+hs.expandCursor+'), pointer !important;';var c=hs.createElement('style',{type:'text/css'},null,document.getElementsByTagName('HEAD')[0]);if(!hs.ie){c.appendChild(document.createTextNode(a+" {"+b+"}"))}else{var d=document.styleSheets[document.styleSheets.length-1];if(typeof(d.addRule)=="object")d.addRule(a,b)}}});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(window,'load',hs.preloadImages);
