var hs={lang:{loadingText:"Loading...",loadingTitle:"Click to cancel",focusTitle:"Click to bring to front",fullExpandTitle:"Expand to actual size",creditsText:"Powered by <i>Highslide JS</i>",creditsTitle:"Go to the Highslide JS homepage",previousText:"Previous",nextText:"Next",moveText:"Move",closeText:"Close",closeTitle:"Close (esc)",resizeTitle:"Resize",playText:"Play",playTitle:"Play slideshow (spacebar)",pauseText:"Pause",pauseTitle:"Pause slideshow (spacebar)",previousTitle:"Previous (arrow left)",nextTitle:"Next (arrow right)",moveTitle:"Move",fullExpandText:"Full size",number:"Image %1 of %2",restoreTitle:"Click to close image, click and drag to move. Use arrow keys for next and previous."},graphicsDir:"http://phocus/CMF_Web/_images/highslide/graphics/",restoreCursor:"zoomout.cur",expandSteps:10,expandDuration:250,restoreSteps:10,restoreDuration:250,marginLeft:15,marginRight:15,marginTop:15,marginBottom:15,zIndexCounter:1001,loadingOpacity:0.75,allowMultipleInstances:true,numberOfImagesToPreload:5,outlineWhileAnimating:2,outlineStartOffset:3,fullExpandPosition:"bottom right",fullExpandOpacity:1,padToMinWidth:false,showCredits:false,creditsHref:"http://vikjavev.no/highslide/",enableKeyListener:true,transitions:[],transitionDuration:500,dimmingOpacity:0.5,dimmingDuration:50,anchor:"auto",align:"auto",targetX:null,targetY:null,dragByHeading:true,minWidth:200,minHeight:200,allowSizeReduction:true,outlineType:"drop-shadow",wrapperClassName:"highslide-wrapper",skin:{controls:'<div class="highslide-controls"><ul><li class="highslide-previous"><a href="#" title="{hs.lang.previousTitle}"><span>{hs.lang.previousText}</span></a></li><li class="highslide-play"><a href="#" title="{hs.lang.playTitle}"><span>{hs.lang.playText}</span></a></li><li class="highslide-pause"><a href="#" title="{hs.lang.pauseTitle}"><span>{hs.lang.pauseText}</span></a></li><li class="highslide-next"><a href="#" title="{hs.lang.nextTitle}"><span>{hs.lang.nextText}</span></a></li><li class="highslide-move"><a href="#" title="{hs.lang.moveTitle}"><span>{hs.lang.moveText}</span></a></li><li class="highslide-full-expand"><a href="#" title="{hs.lang.fullExpandTitle}"><span>{hs.lang.fullExpandText}</span></a></li><li class="highslide-close"><a href="#" title="{hs.lang.closeTitle}" ><span>{hs.lang.closeText}</span></a></li></ul></div>'},preloadTheseImages:[],continuePreloading:true,expanders:[],overrides:["allowSizeReduction","anchor","align","targetX","targetY","outlineType","outlineWhileAnimating","captionId","captionText","captionEval","captionOverlay","headingId","headingText","headingEval","headingOverlay","dragByHeading","autoplay","numberPosition","transitions","dimmingOpacity","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"]},headingOverlay:{},captionOverlay:{},faders:[],slideshows:[],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,E,D,C){var B=document.createElement(A);if(F){hs.setAttribs(B,F)}if(C){hs.setStyles(B,{padding:0,border:"none",margin:0})}if(E){hs.setStyles(B,E)}if(D){D.appendChild(B)}return B},setAttribs:function(B,C){for(var A in C){B[A]=C[A]}},setStyles:function(B,C){for(var A in C){if(hs.ie&&A=="opacity"){if(C[A]>0.99){B.style.removeAttribute("filter")}else{B.style.filter="alpha(opacity="+(C[A]*100)+")"}}else{B.style[A]=C[A]}}},ieVersion:function(){var A=navigator.appVersion.split("MSIE");return A[1]?parseFloat(A[1]):null},getPageSize:function(){var H=document.compatMode&&document.compatMode!="BackCompat"?document.documentElement:document.body;var C=document.body;var G=(window.innerWidth&&window.scrollMaxX)?window.innerWidth+window.scrollMaxX:(C.scrollWidth>C.offsetWidth?C.scrollWidth:C.offsetWidth),B=(window.innerHeight&&window.scrollMaxY)?window.innerHeight+window.scrollMaxY:(C.scrollHeight>C.offsetHeight?C.scrollHeight:C.offsetHeight),D=hs.ie?H.scrollWidth:(document.documentElement.clientWidth||self.innerWidth),F=hs.ie?H.clientHeight:(document.documentElement.clientHeight||self.innerHeight);var E=hs.ie?H.clientWidth:(document.documentElement.clientWidth||self.innerWidth),A=hs.ie?H.clientHeight:self.innerHeight;return{pageWidth:G<D?D:G,pageHeight:B<F?F:B,width:E,height:A,scrollLeft:hs.ie?H.scrollLeft:pageXOffset,scrollTop:hs.ie?H.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,D,B){if(A.getParams){return D}try{new hs.Expander(A,D,B);return false}catch(C){return true}},getElementByClass:function(E,C,D){var B=E.getElementsByTagName(C);for(var A=0;A<B.length;A++){if((new RegExp(D)).test(B[A].className)){return B[A]}}return null},replaceLang:function(C){C=C.replace(/\s/g," ");var B=/{hs\.lang\.([^}]+)\}/g,D=C.match(B),E;for(var A=0;A<D.length;A++){E=D[A].replace(B,"$1");if(hs.lang[E]){C=C.replace(D[A],hs.lang[E])}}return C},focusTopmost:function(){var B=0,A=-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>B){B=hs.expanders[C].wrapper.style.zIndex;A=C}}}if(A==-1){hs.focusKey=-1}else{hs.expanders[A].focus()}},getParam:function(A,C){A.getParams=A.onclick;var B=A.getParams?A.getParams():null;A.getParams=null;return(B&&typeof B[C]!="undefined")?B[C]:(typeof hs[C]!="undefined"?hs[C]:null)},getSrc:function(A){var B=hs.getParam(A,"src");if(B){return B}return A.href},getNode:function(D){var B=hs.$(D),C=hs.clones[D],A={};if(!B&&!C){return null}if(!C){C=B.cloneNode(true);C.id="";hs.clones[D]=C;return B}else{return C.cloneNode(true)}},discardElement:function(A){hs.garbageBin.appendChild(A);hs.garbageBin.innerHTML=""},dim:function(A){if(!hs.dimmer){hs.dimmer=hs.createElement("div",{className:"highslide-dimming",owner:"",onclick:function(){hs.close()}},{position:"absolute",left:0},hs.container,true);hs.addEventListener(window,"resize",hs.setDimmerSize)}hs.dimmer.style.display="";hs.setDimmerSize();hs.dimmer.owner+="|"+A.key;if(hs.geckoMac&&hs.dimmingGeckoFix){hs.dimmer.style.background="url("+hs.graphicsDir+"geckodimmer.png)"}else{hs.fade(hs.dimmer,0,A.dimmingOpacity,hs.dimmingDuration)}},undim:function(A){if(!hs.dimmer){return}if(typeof A!="undefined"){hs.dimmer.owner=hs.dimmer.owner.replace("|"+A,"")}if((typeof A!="undefined"&&hs.dimmer.owner!="")||(hs.upcoming&&hs.getParam(hs.upcoming,"dimmingOpacity"))){return}if(hs.geckoMac&&hs.dimmingGeckoFix){hs.dimmer.style.background="none"}else{hs.fade(hs.dimmer,hs.dimmingOpacity,0,hs.dimmingDuration)}setTimeout(function(){hs.setStyles(hs.dimmer,{display:"none",width:0,height:0})},hs.dimmingDuration)},setDimmerSize:function(){if(!hs.dimmer){return}var A=hs.getPageSize();hs.setStyles(hs.dimmer,{width:A.pageWidth+"px",height:A.pageHeight+"px"})},previousOrNext:function(B,E){var D=hs.last=hs.getExpander(B);try{var A=hs.upcoming=D.getAdjacentAnchor(E);A.onclick()}catch(C){hs.last=hs.upcoming=null}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 C=null;switch(A.keyCode){case 32:C=2;break;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,"keydown",hs.keyHandler);if(!hs.enableKeyListener){return true}if(A.preventDefault){A.preventDefault()}else{A.returnValue=false}var B=hs.getExpander();if(B){if(C==0){B.close();return false}else{if(C==2){if(B.slideshow){B.slideshow.hitSpace()}return false}else{if(B.slideshow){B.slideshow.pause()}return hs.previousOrNext(B.key,C)}}}}return true},registerOverlay:function(A){hs.push(hs.overlays,A)},addSlideshow:function(A){hs.push(hs.slideshows,A)},getWrapperKey:function(B){var D,C=/^highslide-wrapper-([0-9]+)$/;D=B;while(D.parentNode){if(D.id&&C.test(D.id)){return D.id.replace(C,"$1")}D=D.parentNode}D=B;while(D.parentNode){if(D.tagName&&hs.isHsAnchor(D)){for(var A=0;A<hs.expanders.length;A++){var E=hs.expanders[A];if(E&&E.a==D){return A}}}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(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(D){if(!D){D=window.event}if(D.button>1){return true}if(!D.target){D.target=D.srcElement}var B=D.target;while(B.parentNode&&!(/highslide-(image|move|html|resize)/.test(B.className))){B=B.parentNode}var E=hs.getExpander(B);if(E&&(E.isClosing||!E.isExpanded)){return true}if(E&&D.type=="mousedown"){if(D.target.form){return true}var A=B.className.match(/highslide-(image|move|resize)/);if(A){hs.dragArgs={exp:E,type:A[1],left:E.x.min,width:E.x.span,top:E.y.min,height:E.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(E.content.className)){E.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 C=hs.dragArgs.hasDragged;if(!C&&!hs.hasFocused&&!/(move|resize)/.test(hs.dragArgs.type)){E.close()}else{if(C||(!C&&hs.hasHtmlexpanders)){hs.dragArgs.exp.redoShowHide()}}if(C){hs.setDimmerSize()}hs.hasFocused=false;hs.dragArgs=null}else{if(/highslide-image-blur/.test(B.className)){B.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.move(A)}}return false},wrapperMouseHandler:function(C){try{if(!C){C=window.event}var B=/mouseover/i.test(C.type);if(!C.target){C.target=C.srcElement}if(hs.ie){C.relatedTarget=B?C.fromElement:C.toElement}var E=hs.getExpander(C.target);if(!E||!C.relatedTarget||hs.getExpander(C.relatedTarget)==E||hs.dragArgs){return}for(var A=0;A<E.overlays.length;A++){var D=hs.$("hsId"+E.overlays[A]);if(D&&D.hideOnMouseOut){var G=B?0:D.opacity,F=B?D.opacity:0;hs.fade(D,G,F)}}}catch(C){}},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 A=hs.getAnchors();for(var B=0;B<A.images.length&&B<hs.numberOfImagesToPreload;B++){hs.push(hs.preloadTheseImages,hs.getSrc(A.images[B]))}if(hs.outlineType){new hs.Outline(hs.outlineType,function(){hs.preloadFullImage(0)})}else{hs.preloadFullImage(0)}var D=hs.createElement("img",{src:hs.graphicsDir+hs.restoreCursor})},init: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.lang.loadingTitle,innerHTML:hs.lang.loadingText,href:"javascript:;"},{position:"absolute",opacity:hs.loadingOpacity,left:"-9999px",zIndex:1},hs.container);hs.garbageBin=hs.createElement("div",null,{display:"none"},hs.container);Math.linearTween=function(C,B,E,D){return E*C/D+B};Math.easeInQuad=function(C,B,E,D){return E*(C/=D)*C+B};Math.easeInOutQuad=function(C,B,E,D){if((C/=D/2)<1){return E/2*C*C+B}return-E/2*((--C)*(C-2)-1)+B};for(var A in hs.langDefaults){hs.lang[A]=hs[A]||hs.lang[A]||hs.langDefaults[A]}hs.getAnchors()}},updateAnchors:function(){var D=document.getElementsByTagName("*"),F=[],B=[],A={},E;for(var C=0;C<D.length;C++){E=hs.isHsAnchor(D[C]);if(E){hs.push(F,D[C]);if(E[0]=="hs.expand"){hs.push(B,D[C])}var G=hs.getParam(D[C],"slideshowGroup")||"none";if(!A[G]){A[G]=[]}hs.push(A[G],D[C])}}hs.anchors={all:F,groups:A,images:B};return hs.anchors},getAnchors:function(){return hs.anchors||hs.updateAnchors()},fade:function(E,H,C,D,B,A){if(typeof B=="undefined"){if(typeof D!="number"){D=250}if(D<25){hs.setStyles(E,{opacity:C});return}B=hs.faders.length;A=C>H?1:-1;var G=(25/(D-D%25))*Math.abs(H-C)}H=parseFloat(H);var F=(E.fade===0||E.fade===false||(E.fade==2&&hs.ie));E.style.visibility=((F?C:H)<=0)?"hidden":"visible";if(F||H<0||(A==1&&H>C)){return}if(E.fading&&E.fading.i!=B){clearTimeout(hs.faders[E.fading.i]);H=E.fading.o}E.fading={i:B,o:H,step:(G||E.fading.step)};E.style.visibility=(H<=0)?"hidden":"visible";hs.setStyles(E,{opacity:H});hs.faders[B]=setTimeout(function(){hs.fade(E,H+E.fading.step*A,C,null,B,A)},25)},close:function(A){var B=hs.getExpander(A);if(B){B.close()}return false}};hs.Outline=function(G,E){this.onLoad=E;this.outlineType=G;var A=hs.ieVersion(),F;this.hasAlphaImageLoader=hs.ie&&A>=5.5&&A<7;if(!G){if(E){E()}return}hs.init();this.table=hs.createElement("table",{cellSpacing:0},{visibility:"hidden",position:"absolute",borderCollapse:"collapse"},hs.container,true);var B=hs.createElement("tbody",null,null,this.table,1);this.td=[];for(var C=0;C<=8;C++){if(C%3==0){F=hs.createElement("tr",null,{height:"auto"},B,true)}this.td[C]=hs.createElement("td",null,null,F,true);var D=C!=4?{lineHeight:0,fontSize:0}:{position:"relative"};hs.setStyles(this.td[C],D)}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"};hs.discardElement(this.graphic);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)}}if(hs.pendingOutlines[this.outlineType]){hs.pendingOutlines[this.outlineType].destroy()}hs.pendingOutlines[this.outlineType]=this;if(this.onLoad){this.onLoad()}},setPosition:function(B,C,A){C=C||{x:B.x.min,y:B.y.min,w:B.x.span+B.x.p1+B.x.p2,h:B.y.span+B.y.p1+B.y.p2};if(A){this.table.style.visibility=(C.h>=4*this.offset)?"visible":"hidden"}hs.setStyles(this.table,{left:(C.x-this.offset)+"px",top:(C.y-this.offset)+"px",width:(C.w+2*(B.x.cb+this.offset))+"px"});C.w+=2*(B.x.cb-this.offset);C.h+=+2*(B.y.cb-this.offset);hs.setStyles(this.td[4],{width:C.w>=0?C.w+"px":0,height:C.h>=0?C.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.Expander=function(J,E,A,K){this.a=J;this.custom=A;this.contentType=K||"image";this.isImage=!this.isHtml;hs.continuePreloading=false;this.overlays=[];this.last=hs.last;hs.last=null;hs.init();var L=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]}if(!this.src){this.src=J.href}var C=(E&&E.thumbnailId)?hs.$(E.thumbnailId):J;C=this.thumb=C.getElementsByTagName("img")[0]||C;this.thumbsUserSetId=C.id||J.id;for(var F=0;F<hs.expanders.length;F++){if(hs.expanders[F]&&hs.expanders[F].a==J&&!(this.last&&this.transitions[1]=="crossfade")){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[L-1]){hs.expanders[L-1].close()}if(typeof hs.focusKey!="undefined"&&hs.expanders[hs.focusKey]){hs.expanders[hs.focusKey].close()}}var H=hs.getPosition(C);var I=this.x={};I.t=C.width?parseInt(C.width):C.offsetWidth;I.tpos=H.x;I.tb=(C.offsetWidth-I.t)/2;var G=this.y={};G.t=C.height?parseInt(C.height):C.offsetHeight;G.tpos=H.y;G.tb=(C.offsetHeight-G.t)/2;I.p1=I.p2=G.p1=G.p2=0;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.last&&this.transitions[1]=="crossfade")){this[this.contentType+"Create"]()}else{if(hs.pendingOutlines[this.outlineType]){this.connectOutline();this[this.contentType+"Create"]()}else{this.showLoading();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=this.outline=hs.pendingOutlines[this.outlineType];B.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 C=this;this.loading.onclick=function(){C.cancelLoading()};var C=this,A=(this.x.tpos+this.x.tb+(this.x.t-this.loading.offsetWidth)/2)+"px",B=(this.y.tpos+(this.y.t-this.loading.offsetHeight)/2)+"px";if(!D&&this.last&&this.transitions[1]=="crossfade"){var D=this.last}if(D){A=(D.x.min+D.x.cb+D.x.p1+(D.x.span-this.loading.offsetWidth)/2)+"px";B=(D.y.min+D.y.cb+D.y.p1+(D.y.span-this.loading.offsetHeight)/2)+"px";this.loading.style.zIndex=hs.zIndexCounter++}setTimeout(function(){if(C.loading){hs.setStyles(C.loading,{left:A,top:B})}},100)},imageCreate:function(){var B=this;var A=document.createElement("img");this.content=A;A.onload=function(){if(hs.expanders[B.key]){B.contentLoaded()}};if(hs.blockRightClick){A.oncontextmenu=function(){return false}}A.className="highslide-image";hs.setStyles(A,{visibility:"hidden",display:"block",position:"absolute",maxWidth:"9999px",zIndex:3});A.title=hs.lang.restoreTitle;if(hs.safari){hs.container.appendChild(A)}if(hs.ie&&hs.flushImgSize){A.src=null}A.src=this.src;this.showLoading()},contentLoaded:function(){try{if(!this.content){return}this.content.onload=null;if(this.onLoadStarted){return}else{this.onLoadStarted=true}var K=this.x,J=this.y;if(this.loading){hs.setStyles(this.loading,{left:"-9999px",top:"-9999px"});this.loading=null}this.marginBottom=hs.marginBottom;K.full=this.content.width;J.full=this.content.height;hs.setStyles(this.content,{width:this.x.t+"px",height:this.y.t+"px"});this.wrapper.appendChild(this.content);this.content.style.position="relative";hs.setStyles(this.wrapper,{left:this.x.tpos+"px",top:this.y.tpos+"px"});hs.container.appendChild(this.wrapper);K.cb=(this.content.offsetWidth-this.x.t)/2;J.cb=(this.content.offsetHeight-this.y.t)/2;var B=hs.marginRight+2*K.cb;this.marginBottom+=2*J.cb;this.getOverlays();this.initSlideshow();var H=K.full/J.full;var A=this.allowSizeReduction?this.minWidth:K.full;var L=this.allowSizeReduction?this.minHeight:J.full;var C={x:"auto",y:"auto"};if(this.align=="center"){C.x="center";C.y="center"}else{if(this.anchor.match(/^top/)){C.y=null}if(this.anchor.match(/right$/)){C.x="max"}if(this.anchor.match(/^bottom/)){C.y="max"}if(this.anchor.match(/left$/)){C.x=null}}var G=hs.getPageSize();K.min=K.tpos-K.cb+K.tb;K.span=Math.min(K.full,this.maxWidth||K.full);K.minSpan=Math.min(K.full,A);K.justify=C.x;K.target=this.targetX;K.marginMin=hs.marginLeft;K.marginMax=B;K.scroll=G.scrollLeft;K.clientSpan=G.width;this.justify(K);J.min=J.tpos-J.cb+J.tb;J.span=Math.min(J.full,this.maxHeight||J.full);J.minSpan=Math.min(J.full,L);J.justify=C.y;J.target=this.targetY;J.marginMin=hs.marginTop;J.marginMax=this.marginBottom;J.scroll=G.scrollTop;J.clientSpan=G.height;this.justify(J);if(this.overlayBox){this.sizeOverlayBox(0,1)}if(this.allowSizeReduction){this.correctRatio(H);var M=this.slideshow;if(M&&this.last&&M.fixedControls&&M.useControls){var I=M.overlayOptions.position||"";for(var E in hs.oPos){for(var D=0;D<5;D++){if(I.match(hs.oPos[E][D])){this[E].min=this.last[E].min+(this.last[E].p1-this[E].p1)+(this.last[E].span-this[E].span)*[0,0,0.5,1,1][D]}}}}if(this.isImage&&this.x.full>this.x.span){this.createFullExpand()}}this.show()}catch(F){window.location.href=this.src}},justify:function(E,B){var F,D=E==this.x?"x":"y";if(E.target&&E.target.match(/ /)){F=E.target.split(" ");E.target=F[0]}if(E.target&&hs.$(E.target)){E.min=hs.getPosition(hs.$(E.target))[D];if(F&&F[1]&&F[1].match(/^[-]?[0-9]+px$/)){E.min+=parseInt(F[1])}}else{if(E.justify=="auto"||E.justify=="center"){var C=false;var A=true;if(E.justify=="center"){E.min=Math.round(E.scroll+(E.clientSpan-E.span-E.marginMax-E.p1-E.p2)/2)}else{E.min=Math.round(E.min-((E.span+E.p1+E.p2-E.t)/2))}if(E.min<E.scroll+E.marginMin){E.min=E.scroll+E.marginMin;C=true}if(!B&&E.span<E.minSpan){E.span=E.minSpan;A=false}if(E.min+E.span+E.p1+E.p2>E.scroll+E.clientSpan-E.marginMax){if(!B&&C&&A){E.span=E.clientSpan-E.marginMin-E.marginMax}else{if(E.span+E.p1+E.p2<E.clientSpan-E.marginMin-E.marginMax){E.min=E.scroll+E.clientSpan-E.span-E.marginMin-E.marginMax-E.p1-E.p2}else{E.min=E.scroll+E.marginMin;if(!B&&A){E.span=E.clientSpan-E.marginMin-E.marginMax}}}}if(!B&&E.span<E.minSpan){E.span=E.minSpan;A=false}}else{if(E.justify=="max"){E.min=Math.floor(E.min-E.span+E.t)}}}if(E.min<E.marginMin){tmpMin=E.min;E.min=E.marginMin;if(A&&!B){E.span=E.span-(E.min-tmpMin)}}},correctRatio:function(B){var A=this.x,F=this.y;var E=false;if(A.span/F.span>B){A.span=F.span*B;if(A.span<A.minSpan){A.span=A.minSpan;F.span=A.span/B}E=true}else{if(A.span/F.span<B){var C=F.span;F.span=A.span/B;E=true}}if(this.overlayBox){while(F.span>this.minHeight&&A.span>this.minWidth&&F.marginMin+F.p1+F.span+F.p2+F.marginMax>F.clientSpan){var D;F.span-=10;A.span=F.span*B;this.sizeOverlayBox(0,1)}}if(E){A.min=A.tpos-A.cb+A.tb;A.minSpan=A.span;this.justify(A,true);F.min=F.tpos-F.cb+F.tb;F.minSpan=F.span;this.justify(F,true);this.sizeOverlayBox()}},show:function(){var A={x:this.x.min-20,y:this.y.min-20,w:this.x.span+40,h:this.y.span+40};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)}this.changeSize(1,{xmin:this.x.tpos+this.x.tb-this.x.cb,ymin:this.y.tpos+this.y.tb-this.y.cb,xspan:this.x.t,yspan:this.y.t,xp1:0,xp2:0,yp1:0,yp2:0,o:hs.outlineStartOffset},{xmin:this.x.min,ymin:this.y.min,xspan:this.x.span,yspan:this.y.span,xp1:this.x.p1,yp1:this.y.p1,xp2:this.x.p2,yp2:this.y.p2,o:this.outline?this.outline.offset:0},hs.expandDuration,hs.expandSteps)},changeSize:function(D,H,I,A,G){var K=this.transitions,E=D?(this.last?this.last.a:null):hs.upcoming,J=(K[1]&&E&&hs.getParam(E,"transitions")[1]==K[1])?K[1]:K[0];if(this[J]&&J!="expand"){this[J](D,H,I);return}if(D){hs.setStyles(this.wrapper,{opacity:1})}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){H.op=D?0:1;I.op=D}var J,B=this,F=Math[this.easing]||Math.easeInQuad;if(!D){F=Math[this.easingClose]||F}for(var C=1;C<=G;C++){J=Math.round(C*(A/G));(function(){var N=C,M={};for(var L in H){M[L]=F(J,H[L],I[L]-H[L],A);if(!/^op$/.test(L)){M[L]=Math.round(M[L])}}setTimeout(function(){if(D&&N==1){B.content.style.visibility="visible";B.a.className+=" highslide-active-anchor"}B.setSize(M)},J)})()}if(D){setTimeout(function(){if(B.outline){B.outline.table.style.visibility="visible"}},J);setTimeout(function(){B.afterExpand()},J+50)}else{setTimeout(function(){B.afterClose()},J)}},setSize:function(C){try{if(C.op){hs.setStyles(this.wrapper,{opacity:C.op})}hs.setStyles(this.wrapper,{width:(C.xspan+C.xp1+C.xp2+2*this.x.cb)+"px",height:(C.yspan+C.yp1+C.yp2+2*this.y.cb)+"px",left:C.xmin+"px",top:C.ymin+"px"});hs.setStyles(this.content,{top:C.yp1+"px",left:C.xp1+"px",width:C.xspan+"px",height:C.yspan+"px"});if(this.outline&&this.outlineWhileAnimating){var B=this.outline.offset-C.o;this.outline.setPosition(this,{x:C.xmin+B,y:C.ymin+B,w:C.xspan+C.xp1+C.xp2+-2*B,h:C.yspan+C.yp1+C.yp2+-2*B},1)}this.wrapper.style.visibility="visible"}catch(A){window.location.href=this.src}},fade:function(A,G,F){this.outlineWhileAnimating=false;var E=this,D=A?250:0;if(A){hs.setStyles(this.wrapper,{opacity:0});this.setSize(F);this.content.style.visibility="visible";hs.fade(this.wrapper,0,1)}if(this.outline){this.outline.table.style.zIndex=this.wrapper.style.zIndex;var B=A||-1;for(var C=G.o;B*C<=B*F.o;C+=B,D+=25){(function(){var H=A?F.o-C:G.o-C;setTimeout(function(){E.outline.setPosition(E,{x:(E.x.min+H),y:(E.y.min+H),w:(E.x.span-2*H),h:(E.y.span-2*H)},1)},D)})()}}if(A){setTimeout(function(){E.afterExpand()},D+50)}else{setTimeout(function(){if(E.outline){E.outline.destroy(E.preserveContent)}hs.fade(E.wrapper,1,0);setTimeout(function(){E.afterClose()},250)},D)}},crossfade:function(C,I,J){if(!C){return}var A=this,G=parseInt(hs.transitionDuration/25),K=this.last;hs.removeEventListener(document,"mousemove",hs.dragHandler);hs.setStyles(this.content,{width:J.xspan+"px",height:J.yspan+"px"});this.outline=this.last.outline;this.last.outline=null;this.fadeBox=hs.createElement("div",{className:"highslide-image"},{position:"absolute",zIndex:4,overflow:"hidden",display:"none"});var F={oldImg:K,newImg:this};for(var H in F){this[H]=F[H].content.cloneNode(1);hs.setStyles(this[H],{position:"absolute",border:0,visibility:"visible"});this.fadeBox.appendChild(this[H])}this.wrapper.appendChild(this.fadeBox);I={xmin:K.x.min,xspan:K.x.span,xp1:K.x.p1,xp2:K.x.p2,ymin:K.y.min,yspan:K.y.span,yp1:K.y.p1,yp2:K.y.p2,o:1/G};J.yspan=this.y.span;J.o=1;var L,E=Math.easeInOutQuad;this.crossfadeStep(I);function D(){if(A.overlayBox){A.wrapper.appendChild(A.overlayBox);for(var N=0;N<A.last.overlays.length;N++){var M=hs.$("hsId"+A.last.overlays[N]);if(M.reuse===A.key){A.overlayBox.appendChild(M)}else{hs.fade(M,M.opacity,0)}}}A.fadeBox.style.display="";A.last.content.style.display="none"}if(/rv:1\.[0-8].+Gecko/.test(navigator.userAgent)){setTimeout(D,0)}else{D()}for(var B=1;B<=G;B++){L=Math.round(B*(hs.transitionDuration/G));(function(){var N={},O=B;for(var M in I){var P=E(L,I[M],J[M]-I[M],hs.transitionDuration);N[M]=(M!="o")?Math.round(P):P}setTimeout(function(){A.crossfadeStep(N)},L)})()}setTimeout(function(){A.crossfadeEnd()},L+100)},crossfadeStep:function(A){try{if(this.outline){this.outline.setPosition(this,{x:A.xmin,y:A.ymin,w:A.xspan+A.xp1+A.xp2,h:A.yspan+A.yp1+A.yp2},1)}this.last.wrapper.style.clip="rect("+(A.ymin-this.last.y.min)+"px, "+(A.xspan+A.xp1+A.xp2+2*this.last.x.cb+A.xmin-this.last.x.min)+"px, "+(A.yspan+A.yp1+A.yp2+2*this.last.y.cb+A.ymin-this.last.y.min)+"px, "+(A.xmin-this.last.x.min)+"px)";hs.setStyles(this.content,{top:A.yp1+"px",left:A.xp1+"px",marginTop:(this.y.min-A.ymin)+"px",marginLeft:(this.x.min-A.xmin)+"px"});hs.setStyles(this.wrapper,{top:A.ymin+"px",left:A.xmin+"px",width:(A.xp1+A.xp2+A.xspan+2*this.x.cb)+"px",height:(A.yp1+A.yp2+A.yspan+2*this.y.cb)+"px"});hs.setStyles(this.fadeBox,{width:A.xspan+"px",height:A.yspan+"px",left:A.xp1+"px",top:A.yp1+"px",visibility:"visible"});hs.setStyles(this.oldImg,{top:(this.last.y.min-A.ymin+this.last.y.p1-A.yp1)+"px",left:(this.last.x.min-A.xmin+this.last.x.p1-A.xp1)+"px"});hs.setStyles(this.newImg,{opacity:A.o,top:(this.y.min-A.ymin+this.y.p1-A.yp1)+"px",left:(this.x.min-A.xmin+this.x.p1-A.xp1)+"px"});hs.setStyles(this.overlayBox,{width:A.xspan+"px",height:A.yspan+"px",left:(A.xp1+this.x.cb)+"px",top:(A.yp1+this.y.cb)+"px"})}catch(B){}},crossfadeEnd:function(){this.wrapper.style.background=this.wrapperBG||"";this.wrapper.style.visibility=this.content.style.visibility="visible";this.fadeBox.style.display="none";this.a.className+=" highslide-active-anchor";this.afterExpand();this.last.afterClose()},reuseOverlay:function(D,C){if(!this.last){return false}for(var B=0;B<this.last.overlays.length;B++){var A=hs.$("hsId"+this.last.overlays[B]);if(A&&A.hsId==D.hsId){this.genOverlayBox();A.reuse=this.key;hs.push(this.overlays,this.last.overlays[B]);return true}}return false},afterExpand:function(){this.isExpanded=true;this.focus();if(this.dimmingOpacity){hs.dim(this)}if(hs.upcoming&&hs.upcoming==this.a){hs.upcoming=null}this.prepareNextOutline();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(C){}})},preloadNext:function(){var B=this.getAdjacentAnchor(1);if(B&&B.onclick.toString().match(/hs\.expand/)){var A=hs.createElement("img",{src:hs.getSrc(B)})}},getAdjacentAnchor:function(C){var B=this.getAnchorIndex(),A=hs.anchors.groups[this.slideshowGroup||"none"];if(!A[B+C]&&this.slideshow&&this.slideshow.repeat){if(C==1){return A[0]}else{if(C==-1){return A[A.length-1]}}}return A[B+C]||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},getNumber:function(){if(this[this.numberPosition]){var A=hs.anchors.groups[this.slideshowGroup||"none"];var B=hs.lang.number.replace("%1",this.getAnchorIndex()+1).replace("%2",A.length);this[this.numberPosition].innerHTML='<div class="highslide-number">'+B+"</div>"+this[this.numberPosition].innerHTML}},initSlideshow:function(){if(this.slideshow){return}if(!this.last){for(var B=0;B<hs.slideshows.length;B++){var A=hs.slideshows[B],C=A.slideshowGroup;if(C===this.slideshowGroup){this.slideshow=new hs.Slideshow(A)}}}else{this.slideshow=this.last.slideshow}var A=this.slideshow;if(!A){return}var E=A.exp=this;A.checkFirstAndLast();if(A.useControls){var D=A.overlayOptions||{};D.overlayId=A.controls;D.hsId="controls";this.createOverlay(D)}if(!this.last&&this.autoplay){A.play(true)}if(A.autoplay){A.autoplay=setTimeout(function(){hs.next(E.key)},(A.interval||500))}},cancelLoading:function(){hs.expanders[this.key]=null;if(hs.upcoming==this.a){hs.upcoming=null}hs.undim();if(this.loading){hs.loading.style.left="-9999px"}},writeCredits:function(){if(this.credits){return}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",hsId:"credits"})},getInline:function(types,addOverlay){for(var i=0;i<types.length;i++){var type=types[i],s=null;if(!this[type+"Id"]&&this.thumbsUserSetId){this[type+"Id"]=type+"-for-"+this.thumbsUserSetId}if(this[type+"Id"]){this[type]=hs.getNode(this[type+"Id"])}if(!this[type]&&!this[type+"Text"]&&this[type+"Eval"]){try{s=eval(this[type+"Eval"])}catch(e){}}if(!this[type]&&this[type+"Text"]){s=this[type+"Text"]}if(!this[type]&&!s){var next=this.a.nextSibling;while(next&&!hs.isHsAnchor(next)){if((new RegExp("highslide-"+type)).test(next.className||null)){this[type]=next.cloneNode(1);break}next=next.nextSibling}}if(!this[type]&&!s&&this.numberPosition==type){s=""}if(!this[type]&&s!==null){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)}}},showHideElements:function(C,B,G){var E=document.getElementsByTagName(C);var A=C=="*"?"overflow":"visibility";for(var F=0;F<E.length;F++){if(A=="visibility"||(document.defaultView.getComputedStyle(E[F],"").getPropertyValue("overflow")=="auto"||E[F].getAttribute("hidden-by")!=null)){var I=E[F].getAttribute("hidden-by");if(B=="visible"&&I){I=I.replace("["+this.key+"]","");E[F].setAttribute("hidden-by",I);if(!I){E[F].style[A]=E[F].origProp}}else{if(B=="hidden"){var K=hs.getPosition(E[F]);K.w=E[F].offsetWidth;K.h=E[F].offsetHeight;if(!this.dimmingOpacity){var J=(K.x+K.w<G.x||K.x>G.x+G.w);var H=(K.y+K.h<G.y||K.y>G.y+G.h)}var D=hs.getWrapperKey(E[F]);if(!J&&!H&&D!=this.key){if(!I){E[F].setAttribute("hidden-by","["+this.key+"]");E[F].origProp=E[F].style[A];E[F].style[A]="hidden"}else{if(!I.match("["+this.key+"]")){E[F].setAttribute("hidden-by",I+"["+this.key+"]")}}}else{if(I=="["+this.key+"]"||hs.focusKey==D){E[F].setAttribute("hidden-by","");E[F].style[A]=E[F].origProp||""}else{if(I&&I.match("["+this.key+"]")){E[F].setAttribute("hidden-by",I.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;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.outline){this.outline.setPosition(this)}},resize:function(E){var A,C,D=E.width/E.height;A=Math.max(E.width+E.dX,Math.min(this.minWidth,this.x.full));if(this.isImage&&Math.abs(A-this.x.full)<12){A=this.x.full}C=A/D;if(C<Math.min(this.minHeight,this.y.full)){C=Math.min(this.minHeight,this.y.full);if(this.isImage){A=C*D}}this.x.span=A;this.y.span=C;var B={width:this.x.span+"px",height:this.y.span+"px"};hs.setStyles(this.content,B);if(this.overlayBox){this.sizeOverlayBox(true)}hs.setStyles(this.wrapper,{width:(this.x.p1+this.x.p2+2*this.x.cb+this.x.span)+"px",height:(this.y.p1+this.y.p2+2*this.y.cb+this.y.span)+"px"});if(this.slideshow&&this.isImage){if(A==this.x.full){this.slideshow.disable("full-expand")}else{this.slideshow.enable("full-expand")}}if(this.outline){this.outline.setPosition(this)}},close:function(){if(this.isClosing||!this.isExpanded||(hs.upcoming&&this.transitions[1]=="crossfade")){return}this.isClosing=true;if(this.slideshow&&!hs.upcoming){this.slideshow.pause()}hs.removeEventListener(document,"keydown",hs.keyHandler);try{this.content.style.cursor="default";this.changeSize(0,{xmin:this.x.min,ymin:this.y.min,xspan:this.x.span,yspan:parseInt(this.content.style.height),xp1:this.x.p1,yp1:this.y.p1,xp2:this.x.p2,yp2:this.y.p2,o:this.outline?this.outline.offset:0},{xmin:this.x.tpos-this.x.cb+this.x.tb,ymin:this.y.tpos-this.y.cb+this.y.tb,xspan:this.x.t,yspan:this.y.t,xp1:0,yp1:0,xp2:0,yp2:0,o:hs.outlineStartOffset},hs.restoreDuration,hs.restoreSteps)}catch(A){this.afterClose()}},createOverlay:function(D){var C=D.overlayId;if(typeof C=="string"){C=hs.getNode(C)}if(!C||typeof C=="string"){return}C.style.display="block";D.hsId=D.hsId||D.overlayId;if(this.transitions[1]=="crossfade"&&this.reuseOverlay(D,C)){return}this.genOverlayBox();var B=D.width&&/^[0-9]+(px|%)$/.test(D.width)?D.width:"auto";if(/^(left|right)panel$/.test(D.position)&&!/^[0-9]+px$/.test(D.width)){B="200px"}var A=hs.createElement("div",{id:"hsId"+hs.idCounter++,hsId:D.hsId},{position:"absolute",width:B},this.overlayBox,true);A.appendChild(C);if(D.hideOnMouseOut){A.hideOnMouseOut=true}A.opacity=D.opacity||1;A.hsPos=D.position;A.fade=D.fade;if(this.gotOverlays){this.positionOverlay(A);if(!A.hideOnMouseOut||this.mouseIsOver){hs.fade(A,0,A.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,{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}}},getOverlays:function(){this.getInline(["heading","caption"],true);this.getNumber();if(this.heading&&this.dragByHeading){this.heading.className+=" highslide-move"}if(hs.showCredits){this.writeCredits()}for(var B=0;B<hs.overlays.length;B++){var E=hs.overlays[B],F=E.thumbnailId,C=E.slideshowGroup;if((!F&&!C)||(F&&F==this.thumbsUserSetId)||(C&&C===this.slideshowGroup)){this.createOverlay(E)}}var D=[];for(var B=0;B<this.overlays.length;B++){var E=hs.$("hsId"+this.overlays[B]);if(/panel$/.test(E.hsPos)){this.positionOverlay(E)}else{hs.push(D,E)}}var A=this.x.p1+this.x.full+this.x.p2;if(hs.padToMinWidth&&A<hs.minWidth){this.x.p1+=(hs.minWidth-A)/2;this.x.p2+=(hs.minWidth-A)/2}for(var B=0;B<D.length;B++){this.positionOverlay(D[B])}this.gotOverlays=true},genOverlayBox:function(){if(!this.overlayBox){this.overlayBox=hs.createElement("div",null,{position:"absolute",width:this.x.span?this.x.span+"px":this.x.full+"px",height:0,visibility:"hidden",overflow:"hidden",zIndex:5},hs.container,true)}},sizeOverlayBox:function(C,A){hs.setStyles(this.overlayBox,{width:this.x.span+"px",height:this.y.span+"px"});if(C||A){for(var B=0;B<this.overlays.length;B++){var D=hs.$("hsId"+this.overlays[B]);if(D&&/^(above|below)$/.test(D.hsPos)){if(hs.ie&&(hs.ieVersion()<=6||document.compatMode=="BackCompat")){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(C){hs.setStyles(this.content,{top:this.y.p1+"px"});hs.setStyles(this.overlayBox,{top:(this.y.p1+this.y.cb)+"px"})}},showOverlays:function(){hs.setStyles(this.overlayBox,{top:(this.y.p1+this.y.cb)+"px",left:(this.x.p1+this.x.cb)+"px",overflow:"visible"});this.wrapper.appendChild(this.overlayBox);if(hs.safari){var B=this.content.style;B.display="inline";setTimeout(function(){B.display="block"},50)}var D=hs.getPageSize(),E=hs.mouse.x+D.scrollLeft,C=hs.mouse.y+D.scrollTop;this.mouseIsOver=this.x.min<E&&E<this.x.min+this.x.p1+this.x.span+this.x.p2&&this.y.min<C&&C<this.y.min+this.y.p1+this.y.span+this.y.p2;for(var A=0;A<this.overlays.length;A++){var F=hs.$("hsId"+this.overlays[A]);if(!F.hideOnMouseOut||this.mouseIsOver){hs.fade(F,0,F.opacity)}}},createFullExpand:function(){if(this.slideshow){this.slideshow.enable("full-expand");return}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();this.x.min=parseInt(this.wrapper.style.left)-(this.x.full-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.x.full+"px",height:this.y.full+"px"});this.x.span=this.x.full;this.y.span=this.y.full;if(this.overlayBox){this.sizeOverlayBox(true)}hs.setStyles(this.wrapper,{width:(this.x.p1+2*this.x.cb+this.x.span+this.x.p2)+"px",height:(this.y.p1+2*this.y.cb+this.y.span+this.y.p2)+"px"});if(this.outline){this.outline.setPosition(this)}this.redoShowHide();hs.setDimmerSize()}catch(A){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};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.outline&&this.outlineWhileAnimating){this.outline.destroy()}hs.discardElement(this.wrapper);if(this.dimmingOpacity){hs.undim(this.key)}hs.expanders[this.key]=null;hs.reOrder()}};hs.Slideshow=function(B){for(var A in B){this[A]=B[A]}if(this.useControls){this.getControls()}};hs.Slideshow.prototype={getControls:function(){this.controls=hs.createElement("div",{innerHTML:hs.replaceLang(hs.skin.controls)},null,hs.container);var B=["play","pause","previous","next","move","full-expand","close"];this.btn={};var C=this;for(var A=0;A<B.length;A++){this.btn[B[A]]=hs.getElementByClass(this.controls,"li","highslide-"+B[A]);this.enable(B[A])}this.btn.pause.style.display="none";this.disable("full-expand")},checkFirstAndLast:function(){if(this.repeat){return}var B=this.exp.getAnchorIndex(),A=/disabled$/;if(B==0){this.disable("previous")}else{if(A.test(this.btn.previous.getElementsByTagName("a")[0].className)){this.enable("previous")}}if(B+1==hs.anchors.groups[this.slideshowGroup||"none"].length){this.disable("next");this.disable("play")}else{if(A.test(this.btn.next.getElementsByTagName("a")[0].className)){this.enable("next");this.enable("play")}}},enable:function(C){var B=this,A=this.btn[C].getElementsByTagName("a")[0],D=/disabled$/;A.onclick=function(){B[C]();return false};if(D.test(A.className)){A.className=A.className.replace(D,"")}},disable:function(B){var A=this.btn[B].getElementsByTagName("a")[0];A.onclick=function(){return false};if(!/disabled$/.test(A.className)){A.className+=" disabled"}},hitSpace:function(){if(this.autoplay){this.pause()}else{this.play()}},play:function(A){if(this.btn){this.btn.play.style.display="none";this.btn.pause.style.display=""}this.autoplay=true;if(!A){hs.next(this.exp.key)}},pause:function(){if(this.btn){this.btn.pause.style.display="none";this.btn.play.style.display=""}clearTimeout(this.autoplay);this.autoplay=null},previous:function(){this.pause();hs.previous(this.btn.previous)},next:function(){this.pause();hs.next(this.btn.next)},move:function(){},"full-expand":function(){hs.getExpander().doFullExpand()},close:function(){hs.close(this.btn.close)}};hs.langDefaults=hs.lang;var HsExpander=hs.Expander;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);$(document).ready(function(){hs.graphicsDir='http://images.cmfprefinish.com/images/highslide/graphics/';hs.align='center';hs.transitions=['expand','crossfade'];hs.outlineType='glossy-dark';hs.fadeInOut=false;hs.dimmingOpacity=0.50;if(hs.addSlideshow)hs.addSlideshow({interval:5000,repeat:false,useControls:true,fixedControls:true,overlayOptions:{opacity:.6,position:'bottom center',hideOnMouseOut:true}});});