var hs={graphicsDir:"/graphics/",restoreCursor:"zoomout.cur",expandSteps:15,expandDuration:300,restoreSteps:15,restoreDuration:300,allowMultipleInstances:true,hideThumbOnExpand:true,captionSlideSpeed:2,outlineWhileAnimating:false,outlineStartOffset:3,marginLeft:10,marginRight:35,marginTop:10,marginBottom:35,numberOfImagesToPreload:5,zIndexCounter:1001,fullExpandIcon:"fullexpand.gif",fullExpandTitle:"Expand to actual size",restoreTitle:"Click to close image, click and drag to move. Use arrow keys for next and previous.",focusTitle:"Click to bring to front",loadingText:"Loading...",loadingTitle:"Click to cancel",loadingOpacity:0.75,showCredits:false,creditsText:"Powered by <i>Highslide JS</i>",creditsHref:"http://vikjavev.no/highslide/",creditsTitle:"Go to the Highslide JS homepage",enableKeyListener:true,anchor:"auto",align:"center",targetX:null,targetY:null,captionId:null,captionTemplateId:null,slideshowGroup:null,spaceForCaption:30,minWidth:250,minHeight:250,allowSizeReduction:true,outlineType:"drop-shadow",wrapperClassName:null,preloadTheseImages:[],continuePreloading:true,expandedImagesCounter:0,expanders:[],overrides:["anchor","align","targetX","targetY","outlineType","outlineWhileAnimating","spaceForCaption","wrapperClassName","minWidth","minHeight","captionId","captionTemplateId","allowSizeReduction","slideshowGroup"],overlays:[],pendingOutlines:{},clones:{},faders:[],ie:(document.all&&!window.opera),safari:navigator.userAgent.indexOf("Safari")!=-1,hasFocused:false,$: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){try{if(hs.ie&&A=="opacity"){B.style.filter="alpha(opacity="+(C[A]*100)+")"}else{B.style[A]=C[A]}}catch(D){}}},ieVersion:function(){arr=navigator.appVersion.split("MSIE");return parseFloat(arr[1])},clientInfo:function(){var A=document.compatMode&&document.compatMode!="BackCompat"?document.documentElement:document.body;this.width=hs.ie?A.clientWidth:self.innerWidth;this.height=hs.ie?A.clientHeight:self.innerHeight;this.scrollLeft=hs.ie?A.scrollLeft:pageXOffset;this.scrollTop=hs.ie?A.scrollTop:pageYOffset},position:function(B){var A=B;var C={x:A.offsetLeft,y:A.offsetTop};while(A.offsetParent){A=A.offsetParent;C.x+=A.offsetLeft;C.y+=A.offsetTop;if(A!=document.body&&A!=document.documentElement){C.x-=A.scrollLeft;C.y-=A.scrollTop}}return C},expand:function(A,D,B){try{new HsExpander(A,D,B);return false}catch(C){return true}},focusTopmost:function(){var B=0,A=-1;for(i=0;i<hs.expanders.length;i++){if(hs.expanders[i]){if(hs.expanders[i].wrapper.style.zIndex&&hs.expanders[i].wrapper.style.zIndex>B){B=hs.expanders[i].wrapper.style.zIndex;A=i}}}if(A==-1){hs.focusKey=-1}else{hs.expanders[A].focus()}},closeId:function(A){return hs.close(A)},close:function(A){try{hs.getExpander(A).doClose()}catch(B){}return false},getAdjacentAnchor:function(D,F){var A=document.getElementsByTagName("A"),B={},E=-1,C=0;for(i=0;i<A.length;i++){if(hs.isHsAnchor(A[i])&&((hs.expanders[D].slideshowGroup==hs.getParam(A[i],"slideshowGroup")))){B[C]=A[i];if(hs.expanders[D]&&A[i]==hs.expanders[D].a){E=C}C++}}return B[E+F]},getParam:function(a,param){try{var s=a.onclick.toString().replace(/\s/g," ").split("{")[2].split("}")[0];if(hs.safari){for(var i=0;i<hs.overrides.length;i++){s=s.replace(hs.overrides[i]+":",","+hs.overrides[i]+":").replace(new RegExp("^\\s*?,"),"")}}eval("var arr = {"+s+"};");if(arr[param]){return arr[param]}else{return hs[param]}}catch(e){return hs[param]}},getSrc:function(A){var B=hs.getParam(A,"src");if(B){return B}return A.rel.replace(/_slash_/g,"/")||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)}},purge:function(D){if(!hs.ie){return }var B=D.attributes,C,A,E;if(B){A=B.length;for(C=0;C<A;C+=1){E=B[C].name;if(typeof D[E]==="function"){D[E]=null}}}if(hs.geckoBug&&hs.geckoBug(D)){return }B=D.childNodes;if(B){A=B.length;for(C=0;C<A;C+=1){hs.purge(D.childNodes[C])}}},previousOrNext:function(A,D){var C=hs.getExpander(A);try{hs.getAdjacentAnchor(C.key,D).onclick()}catch(B){}try{C.doClose()}catch(B){}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 }var B=null;switch(A.keyCode){case 34:case 39:case 40:B=1;break;case 33:case 37:case 38:B=-1;break;case 27:case 13:B=0}if(B!==null){hs.removeEventListener(document,"keydown",hs.keyHandler);try{if(!hs.enableKeyListener){return true}}catch(A){}if(A.preventDefault){A.preventDefault()}else{A.returnValue=false}if(B==0){try{hs.getExpander().doClose()}catch(A){}return false}else{return hs.previousOrNext(hs.focusKey,B)}}else{return true}},registerOverlay:function(A){hs.push(hs.overlays,A)},getWrapperKey:function(A){var C,B=/^highslide-wrapper-([0-9]+)$/;C=A;while(C.parentNode){C=C.parentNode;if(C.id&&C.id.match(B)){return C.id.replace(B,"$1")}}C=A;while(C.parentNode){if(C.tagName&&hs.isHsAnchor(C)){for(key=0;key<hs.expanders.length;key++){exp=hs.expanders[key];if(exp&&exp.a==C){return key}}}C=C.parentNode}},getExpander:function(A){try{if(!A){return hs.expanders[hs.focusKey]}if(typeof A=="number"){return hs.expanders[A]}if(typeof A=="string"){A=hs.$(A)}return hs.expanders[hs.getWrapperKey(A)]}catch(B){}},cleanUp:function(){for(i=0;i<hs.expanders.length;i++){if(hs.expanders[i]&&hs.expanders[i].isExpanded){hs.focusTopmost()}}},mouseClickHandler:function(D){if(!D){D=window.event}if(D.button>1){return true}if(!D.target){D.target=D.srcElement}if(D.target.form){return }var F=D.target;while(F.parentNode&&!(F.className&&F.className.match(/highslide-(image|move|html)/))){F=F.parentNode}if(!F.parentNode){return }hs.dragExp=hs.getExpander(F);if(F.className.match(/highslide-(image|move)/)){var C=true;var B=parseInt(hs.dragExp.wrapper.style.left);var E=parseInt(hs.dragExp.wrapper.style.top)}if(D.type=="mousedown"){if(C){if(F.className.match("highslide-image")){hs.dragExp.content.style.cursor="move"}hs.wLeft=B;hs.wTop=E;hs.dragX=D.clientX;hs.dragY=D.clientY;hs.addEventListener(document,"mousemove",hs.mouseMoveHandler);if(D.preventDefault){D.preventDefault()}if(hs.dragExp.content.className.match(/highslide-(image|html)-blur/)){hs.dragExp.focus();hs.hasFocused=true}return false}else{if(F.className.match(/highslide-html/)){hs.dragExp.focus();hs.dragExp.redoShowHide();hs.hasFocused=false}}}else{if(D.type=="mouseup"){hs.removeEventListener(document,"mousemove",hs.mouseMoveHandler);if(C&&hs.dragExp){if(F.className.match("highslide-image")){F.style.cursor=hs.styleRestoreCursor}var A=B!=hs.wLeft||E!=hs.wTop;if(!A&&!hs.hasFocused&&!F.className.match(/highslide-move/)){hs.dragExp.onClick()}else{if(A||(!A&&hs.hasHtmlexpanders)){hs.dragExp.redoShowHide()}}hs.hasFocused=false}else{if(F.className.match("highslide-image-blur")){F.style.cursor=hs.styleRestoreCursor}}}}},mouseMoveHandler:function(B){if(!hs.dragExp||!hs.dragExp.wrapper){return }if(!B){B=window.event}hs.dragExp.x.min=hs.wLeft+B.clientX-hs.dragX;hs.dragExp.y.min=hs.wTop+B.clientY-hs.dragY;var A=hs.dragExp.wrapper;A.style.left=hs.dragExp.x.min+"px";A.style.top=hs.dragExp.y.min+"px";if(hs.dragExp.objOutline){var C=hs.dragExp.objOutline;C.table.style.left=(hs.dragExp.x.min-C.offset)+"px";C.table.style.top=(hs.dragExp.y.min-C.offset)+"px"}return false},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}}},isHsAnchor:function(A){return(A.onclick&&A.onclick.toString().replace(/\s/g," ").match(/hs.(htmlE|e)xpand/))},preloadFullImage:function(B){if(hs.continuePreloading&&hs.preloadTheseImages[B]&&hs.preloadTheseImages[B]!="undefined"){var A=document.createElement("img");A.onload=function(){hs.preloadFullImage(B+1)};A.src=hs.preloadTheseImages[B]}},preloadImages:function(C){if(C&&typeof C!="object"){hs.numberOfImagesToPreload=C}var B,A=0;var E=document.getElementsByTagName("A");for(i=0;i<E.length;i++){a=E[i];B=hs.isHsAnchor(a);if(B&&B[0]=="hs.expand"){if(A<hs.numberOfImagesToPreload){hs.preloadTheseImages[A]=hs.getSrc(a);A++}}}new HsOutline(hs.outlineType,function(){hs.preloadFullImage(0)});var D=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)}},fade:function(D,E,C,A,B){E=parseFloat(E);D.style.visibility=(E<=0)?"hidden":"visible";if(E<0||(A==1&&E>C)){return }if(B==null){B=hs.faders.length}if(typeof (D.i)!="undefined"&&D.i!=B){clearTimeout(hs.faders[D.i]);E=D.tempOpacity}D.i=B;D.tempOpacity=E;D.style.visibility=(E<=0)?"hidden":"visible";hs.setStyles(D,{opacity:E});hs.faders[B]=setTimeout(function(){hs.fade(D,Math.round((E+0.1*A)*100)/100,C,A,B)},25)}};HsOutline=function(F,D){if(!F){if(D){D()}return }this.onLoad=D;this.outlineType=F;var A=hs.ieVersion(),E;hs.genContainer();this.hasAlphaImageLoader=hs.ie&&A>=5.5&&A<7;this.hasPngSupport=!hs.ie||(hs.ie&&A>=7);this.hasOutline=this.outlineType&&(this.hasAlphaImageLoader||this.hasPngSupport);this.table=hs.createElement("table",{cellSpacing:0},{visibility:"hidden",position:"absolute",zIndex:hs.zIndexCounter++,borderCollapse:"collapse"},hs.container,true);this.tbody=hs.createElement("tbody",null,null,this.table);this.td=Array();for(var B=0;B<=8;B++){if(B%3==0){E=hs.createElement("tr",null,null,this.tbody,true)}this.td[B]=hs.createElement("td",null,null,E,true);var C=B!=4?{lineHeight:0,fontSize:0}:{position:"relative"};hs.setStyles(this.td[B],C)}this.td[4].className=F;this.preloadGraphic()};HsOutline.prototype.preloadGraphic=function(){var B=hs.graphicsDir+"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};HsOutline.prototype.onGraphicLoad=function(){var D=this.offset=this.graphic.width/4;var F=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]];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"})}var C=2*D;hs.setStyles(this.td[B],{height:C+"px",width:C+"px"})}}hs.pendingOutlines[this.outlineType]=this;if(this.onLoad){this.onLoad()}};HsOutline.prototype.destroy=function(){hs.purge(this.table);try{this.table.parentNode.removeChild(this.table)}catch(A){}};HsExpander=function(H,D,A,I){hs.continuePreloading=false;this.custom=A;for(i=0;i<hs.overrides.length;i++){var B=hs.overrides[i];if(D&&typeof D[B]!="undefined"){this[B]=D[B]}else{this[B]=hs[B]}}var C;if(D&&D.thumbnailId){C=hs.$(D.thumbnailId)}else{C=H.getElementsByTagName("IMG")[0]}if(!C){C=H}for(i=0;i<hs.expanders.length;i++){if(hs.expanders[i]&&hs.expanders[i].thumb!=C&&!hs.expanders[i].onLoadStarted){hs.expanders[i].cancelLoading()}}for(i=0;i<hs.expanders.length;i++){if(hs.expanders[i]&&hs.expanders[i].a==H){hs.expanders[i].focus();return false}}if(!hs.allowMultipleInstances){try{hs.expanders[hs.expandedImagesCounter-1].doClose()}catch(F){}}var J=this.key=hs.expandedImagesCounter++;hs.expanders[this.key]=this;if(I=="html"){this.isHtml=true;this.contentType="html"}else{this.isImage=true;this.contentType="image"}this.a=H;this.thumbsUserSetId=C.id||H.id;this.thumb=C;this.overlays=[];var G=hs.position(C);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=function(K){try{hs.expanders[J].onMouseOver()}catch(K){}};this.wrapper.onmouseout=function(K){try{hs.expanders[J].onMouseOut()}catch(K){}};this.thumbWidth=C.width?C.width:C.offsetWidth;this.thumbHeight=C.height?C.height:C.offsetHeight;this.thumbLeft=G.x;this.thumbTop=G.y;this.thumbOffsetBorderW=(this.thumb.offsetWidth-this.thumbWidth)/2;this.thumbOffsetBorderH=(this.thumb.offsetHeight-this.thumbHeight)/2;hs.genContainer();if(hs.pendingOutlines[this.outlineType]){this.connectOutline();this[this.contentType+"Create"]()}else{if(!this.outlineType){this[this.contentType+"Create"]()}else{this.displayLoading();var E=this;new HsOutline(this.outlineType,function(){E.connectOutline();E[E.contentType+"Create"]()})}}};HsExpander.prototype.connectOutline=function(A,C){var B=hs.pendingOutlines[this.outlineType];this.objOutline=B;hs.pendingOutlines[this.outlineType]=null};HsExpander.prototype.displayLoading=function(){if(this.onLoadStarted||this.loading){return }this.originalCursor=this.a.style.cursor;this.a.style.cursor="wait";if(!hs.loading){hs.loading=hs.createElement("a",{className:"highslide-loading",title:hs.loadingTitle,innerHTML:hs.loadingText},{position:"absolute",opacity:hs.loadingOpacity},hs.container)}this.loading=hs.loading;this.loading.href="javascript:hs.expanders["+this.key+"].cancelLoading()";this.loading.visibility="visible";this.loading.style.left=(this.thumbLeft+this.thumbOffsetBorderW+(this.thumbWidth-this.loading.offsetWidth)/2)+"px";this.loading.style.top=(this.thumbTop+(this.thumbHeight-this.loading.offsetHeight)/2)+"px";setTimeout("if (hs.expanders["+this.key+"] && hs.expanders["+this.key+"].loading) hs.expanders["+this.key+"].loading.style.visibility = 'visible';",100)};HsExpander.prototype.imageCreate=function(){var B=this.key;var A=document.createElement("img");this.content=A;A.onload=function(){try{hs.expanders[B].onLoad()}catch(C){}};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)}A.src=hs.getSrc(this.a);this.displayLoading()};HsExpander.prototype.onLoad=function(){try{if(!this.content){return }if(this.onLoadStarted){return }else{this.onLoadStarted=true}if(this.loading){this.loading.style.visibility="hidden";this.loading=null;this.a.style.cursor=this.originalCursor||""}if(this.isImage){this.newWidth=this.content.width;this.newHeight=this.content.height;this.fullExpandWidth=this.newWidth;this.fullExpandHeight=this.newHeight;this.content.width=this.thumbWidth;this.content.height=this.thumbHeight}else{if(this.htmlGetSize){this.htmlGetSize()}}this.marginBottom=hs.marginBottom;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 D=hs.marginRight+2*this.offsetBorderW;this.marginBottom+=2*this.offsetBorderH;var G=this.newWidth/this.newHeight;var B=this.allowSizeReduction?this.minWidth:this.newWidth;var J=this.allowSizeReduction?this.minHeight:this.newHeight;var E={x:"auto",y:"auto"};if(this.align=="center"){E.x="center";E.y="center"}else{if(this.anchor.match(/^top/)){E.y=null}if(this.anchor.match(/right$/)){E.x="max"}if(this.anchor.match(/^bottom/)){E.y="max"}if(this.anchor.match(/left$/)){E.x=null}}client=new hs.clientInfo();this.x={min:parseInt(this.thumbLeft)-this.offsetBorderW+this.thumbOffsetBorderW,span:this.newWidth,minSpan:this.newWidth<B?this.newWidth:B,justify:E.x,target:this.targetX,marginMin:hs.marginLeft,marginMax:D,scroll:client.scrollLeft,clientSpan:client.width,thumbSpan:this.thumbWidth};var C=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<J?this.newHeight:J,justify:E.y,target:this.targetY,marginMin:hs.marginTop,marginMax:this.marginBottom,scroll:client.scrollTop,clientSpan:client.height,thumbSpan:this.thumbHeight};var A=this.y.min+parseInt(this.thumbHeight);this.y=this.justify(this.y);if(this.isHtml){this.htmlSizeOperations()}if(this.isImage){this.correctRatio(G)}var I=this.x;var H=this.y;this.show()}catch(F){if(hs.expanders[this.key]&&hs.expanders[this.key].a){window.location.href=hs.getSrc(hs.expanders[this.key].a)}}};HsExpander.prototype.show=function(){var B={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",B)}hs.hideIframes=(window.opera||navigator.vendor=="KDE"||(hs.ie&&hs.ieVersion()<5.5));if(hs.hideIframes){this.showHideElements("IFRAME","hidden",B)}if(this.objOutline&&!this.outlineWhileAnimating){this.positionOutline(this.x.min,this.y.min,this.x.span,this.y.span)}var A=this.objOutline?this.objOutline.offset:0;this.changeSize(1,this.thumbLeft+this.thumbOffsetBorderW-this.offsetBorderW,this.thumbTop+this.thumbOffsetBorderH-this.offsetBorderH,this.thumbWidth,this.thumbHeight,this.x.min,this.y.min,this.x.span,this.y.span,hs.expandDuration,hs.expandSteps,hs.outlineStartOffset,A)};HsExpander.prototype.justify=function(D){var E,C=D==this.x?"x":"y";if(D.target&&D.target.match(/ /)){E=D.target.split(" ");D.target=E[0]}if(D.target&&hs.$(D.target)){D.min=hs.position(hs.$(D.target))[C];if(E&&E[1]&&E[1].match(/^[-]?[0-9]+px$/)){D.min+=parseInt(E[1])}}else{if(D.justify=="auto"||D.justify=="center"){var B=false;var A=true;if(D.justify=="center"){D.min=Math.round(D.scroll+(D.clientSpan-D.span-D.marginMax)/2)}else{D.min=Math.round(D.min-((D.span-D.thumbSpan)/2))}if(D.min<D.scroll+D.marginMin){D.min=D.scroll+D.marginMin;B=true}if(D.span<D.minSpan){D.span=D.minSpan;A=false}if(D.min+D.span>D.scroll+D.clientSpan-D.marginMax){if(B&&A){D.span=D.clientSpan-D.marginMin-D.marginMax}else{if(D.span<D.clientSpan-D.marginMin-D.marginMax){D.min=D.scroll+D.clientSpan-D.span-D.marginMin-D.marginMax}else{D.min=D.scroll+D.marginMin;if(A){D.span=D.clientSpan-D.marginMin-D.marginMax}}}}if(D.span<D.minSpan){D.span=D.minSpan;A=false}}else{if(D.justify=="max"){D.min=Math.floor(D.min-D.span+D.thumbSpan)}}}if(D.min<D.marginMin){tmpMin=D.min;D.min=D.marginMin;if(A){D.span=D.span-(D.min-tmpMin)}}return D};HsExpander.prototype.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){B.span=B.minSpan;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)}};HsExpander.prototype.changeSize=function(P,T,C,L,J,S,A,K,I,Q,R,D,B){var G=(K-L)/R,M=(I-J)/R,F=(S-T)/R,E=(A-C)/R,U=(B-D)/R,N,H="hs.expanders["+this.key+"]";for(i=1;i<=R;i++){L+=G;J+=M;T+=F;C+=E;D+=U;N=Math.round(i*(Q/R));var O="try {";if(i==1){O+=H+".content.style.visibility = 'visible';if ("+H+".thumb.tagName == 'IMG' && hs.hideThumbOnExpand) "+H+".thumb.style.visibility = 'hidden';"}if(i==R){L=K;J=I;T=S;C=A;D=B}O+=H+"."+this.contentType+"SetSize("+Math.round(L)+", "+Math.round(J)+", "+Math.round(T)+", "+Math.round(C)+", "+Math.round(D);O+=");} catch (e) {}";setTimeout(O,N)}if(P==1){setTimeout("try { "+H+'.objOutline.table.style.visibility = "visible"; } catch (e){}',N);setTimeout("try { "+H+".onExpanded(); } catch(e){}",N+50)}else{setTimeout("try { "+H+".onEndClose(); } catch(e){}",N)}};HsExpander.prototype.imageSetSize=function(B,C,A,G,F){try{this.content.width=B;this.content.height=C;if(this.objOutline&&this.outlineWhileAnimating){var E=this.objOutline.offset-F;this.positionOutline(A+E,G+E,B-2*E,C-2*E,1)}hs.setStyles(this.wrapper,{visibility:"visible",left:A+"px",top:G+"px"})}catch(D){window.location.href=hs.getSrc(this.a)}};HsExpander.prototype.positionOutline=function(A,F,B,C,D){if(!this.objOutline){return }var E=this.objOutline;if(D){E.table.style.visibility="visible"}E.table.style.left=(A-E.offset)+"px";E.table.style.top=(F-E.offset)+"px";E.table.style.width=(B+2*(this.offsetBorderW+E.offset))+"px";B+=2*(this.offsetBorderW-E.offset);C+=+2*(this.offsetBorderH-E.offset);E.td[4].style.width=B>=0?B+"px":0;E.td[4].style.height=C>=0?C+"px":0;if(E.hasAlphaImageLoader){E.td[3].style.height=E.td[5].style.height=E.td[4].style.height}};HsExpander.prototype.onExpanded=function(){this.isExpanded=true;this.focus();if(this.isHtml&&this.objectLoadTime=="after"){this.writeExtendedContent()}this.createCustomOverlays();if(hs.showCredits){this.writeCredits()}if(this.caption){this.writeCaption()}if(this.fullExpandWidth>this.x.span){this.createFullExpand()}if(!this.caption){this.onDisplayFinished()}};HsExpander.prototype.onDisplayFinished=function(){var A=this.key;var B=this.outlineType;new HsOutline(B,function(){try{hs.expanders[A].preloadNext()}catch(C){}})};HsExpander.prototype.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)})}};HsExpander.prototype.cancelLoading=function(){this.a.style.cursor=this.originalCursor;if(this.loading){hs.loading.style.visibility="hidden"}hs.expanders[this.key]=null};HsExpander.prototype.writeCredits=function(){var A=hs.createElement("a",{href:hs.creditsHref,className:"highslide-credits",innerHTML:hs.creditsText,title:hs.creditsTitle});this.createOverlay(A,"top left")};HsExpander.prototype.getCaption=function(){if(!this.captionId&&this.thumbsUserSetId){this.captionId="caption-for-"+this.thumbsUserSetId}if(this.captionId){this.caption=hs.getNode(this.captionId)}if(this.captionTemplateId){var A=(this.caption)?this.caption.innerHTML:"";this.caption=hs.getNode(this.captionTemplateId);if(this.caption){this.caption.innerHTML=this.caption.innerHTML.replace(/\s/g," ").replace("{caption}",A)}}if(this.caption){this.marginBottom+=this.spaceForCaption}};HsExpander.prototype.writeCaption=function(){try{this.wrapper.style.width=this.wrapper.offsetWidth+"px";this.caption.style.visibility="hidden";this.caption.className+=" highslide-display-block";var height;if(hs.ie&&(hs.ieVersion()<6||document.compatMode=="BackCompat")){height=this.caption.offsetHeight}else{var temp=hs.createElement("div",{innerHTML:this.caption.innerHTML},null,null,true);this.caption.innerHTML="";this.caption.appendChild(temp);height=this.caption.childNodes[0].offsetHeight;this.caption.innerHTML=this.caption.childNodes[0].innerHTML}hs.setStyles(this.caption,{overflow:"hidden",height:0,zIndex:2});if(hs.captionSlideSpeed){step=Math.round(height/50);if(step==0){step=1}step=step*hs.captionSlideSpeed}else{this.placeCaption(height,1);return }var t=0;for(var h=height%step;h<=height;h+=step,t+=10){var end=(h==height)?1:0;var eval="try { hs.expanders["+this.key+"].placeCaption("+h+", "+end+");} catch (e) {}";setTimeout(eval,t)}}catch(e){}};HsExpander.prototype.placeCaption=function(A,B){if(!this.caption){return }this.caption.style.height=A+"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(B){this.onDisplayFinished()}};HsExpander.prototype.showHideElements=function(B,A,E){var D=document.getElementsByTagName(B);if(D){for(i=0;i<D.length;i++){if(D[i].nodeName==B){var G=D[i].getAttribute("hidden-by");if(A=="visible"&&G){G=G.replace("["+this.key+"]","");D[i].setAttribute("hidden-by",G);if(!G){D[i].style.visibility="visible"}}else{if(A=="hidden"){var I=hs.position(D[i]);I.w=D[i].offsetWidth;I.h=D[i].offsetHeight;var H=(I.x+I.w<E.x||I.x>E.x+E.w);var F=(I.y+I.h<E.y||I.y>E.y+E.h);var C=hs.getWrapperKey(D[i]);if(!H&&!F&&C!=this.key){if(!D[i].currentStyle||(D[i].currentStyle&&D[i].currentStyle.visibility!="hidden")){if(!G){D[i].setAttribute("hidden-by","["+this.key+"]")}else{if(!G.match("["+this.key+"]")){D[i].setAttribute("hidden-by",G+"["+this.key+"]")}}D[i].style.visibility="hidden"}}else{if(G=="["+this.key+"]"||hs.focusKey==C){D[i].setAttribute("hidden-by","");D[i].style.visibility="visible"}else{if(G&&G.match("["+this.key+"]")){D[i].setAttribute("hidden-by",G.replace("["+this.key+"]",""))}}}}}}}}};HsExpander.prototype.focus=function(){for(i=0;i<hs.expanders.length;i++){if(hs.expanders[i]&&i==hs.focusKey){var A=hs.expanders[i];A.content.className+=" highslide-"+A.contentType+"-blur";if(A.caption){A.caption.className+=" highslide-caption-blur"}if(A.isImage){A.content.style.cursor=hs.ie?"hand":"pointer";A.content.title=hs.focusTitle}}}this.wrapper.style.zIndex=hs.zIndexCounter++;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","")}if(this.isImage){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)};HsExpander.prototype.onClick=function(){this.doClose()};HsExpander.prototype.doClose=function(){hs.removeEventListener(document,"keydown",hs.keyHandler);try{this.isClosing=true;var A=parseInt(this.wrapper.style.left);var H=parseInt(this.wrapper.style.top);var B=(this.isImage)?this.content.width:parseInt(this.content.style.width);var C=(this.isImage)?this.content.height:parseInt(this.content.style.height);if(this.objOutline){if(this.outlineWhileAnimating){this.positionOutline(A,H,B,C)}else{if(this.preserveContent){this.objOutline.table.style.visibility="hidden"}else{this.objOutline.destroy()}}}var G=this.wrapper.childNodes.length;for(i=G-1;i>=0;i--){var F=this.wrapper.childNodes[i];if(F!=this.content){hs.purge(this.wrapper.childNodes[i]);this.wrapper.removeChild(this.wrapper.childNodes[i])}}if(this.isHtml){this.htmlOnClose()}this.wrapper.style.width="auto";this.content.style.cursor="default";var D=this.objOutline?this.objOutline.offset:0;this.changeSize(-1,A,H,B,C,this.thumbLeft-this.offsetBorderW+this.thumbOffsetBorderW,this.thumbTop-this.offsetBorderH+this.thumbOffsetBorderH,this.thumbWidth,this.thumbHeight,hs.restoreDuration,hs.restoreSteps,D,hs.outlineStartOffset)}catch(E){this.onEndClose()}};HsExpander.prototype.onEndClose=function(){this.thumb.style.visibility="visible";if(hs.hideSelects){this.showHideElements("SELECT","visible")}if(hs.hideIframes){this.showHideElements("IFRAME","visible")}if(this.preserveContent){this.sleep()}else{if(this.objOutline&&this.outlineWhileAnimating){this.objOutline.destroy()}hs.purge(this.wrapper);this.wrapper.parentNode.removeChild(this.wrapper)}hs.expanders[this.key]=null;hs.cleanUp()};HsExpander.prototype.createOverlay=function(A,D,H,E){if(typeof A=="string"){A=hs.getNode(A)}if(!A||typeof A=="string"||!this.isImage){return }var C=hs.createElement("div",null,{left:0,top:0,position:"absolute",zIndex:3,visibility:"hidden"},this.wrapper,true);if(E){hs.setStyles(A,{opacity:E})}A.className+=" highslide-display-block";C.appendChild(A);var B=this.offsetBorderW;var I=this.content.width-C.offsetWidth;var G=this.offsetBorderH;var F=this.content.height-C.offsetHeight;if(!D){D="center center"}if(D.match(/^bottom/)){G+=F}if(D.match(/^center/)){G+=F/2}if(D.match(/right$/)){B+=I}if(D.match(/center$/)){B+=I/2}C.style.left=B+"px";C.style.top=G+"px";if(H){C.setAttribute("hideOnMouseOut",true)}if(!E){E=1}C.setAttribute("opacity",E);hs.fade(C,0,E,1);hs.push(this.overlays,C)};HsExpander.prototype.createCustomOverlays=function(){for(i=0;i<hs.overlays.length;i++){var A=hs.overlays[i];if(A.thumbnailId==null||A.thumbnailId==this.thumbsUserSetId){this.createOverlay(A.overlayId,A.position,A.hideOnMouseOut,A.opacity)}}};HsExpander.prototype.onMouseOver=function(){for(i=0;i<this.overlays.length;i++){var A=this.overlays[i];if(A.getAttribute("hideOnMouseOut")){hs.fade(A,0,A.getAttribute("opacity"),1)}}};HsExpander.prototype.onMouseOut=function(){for(i=0;i<this.overlays.length;i++){var A=this.overlays[i];if(A.getAttribute("hideOnMouseOut")){hs.fade(A,A.getAttribute("opacity"),0,-1)}}};HsExpander.prototype.createFullExpand=function(){var A=hs.createElement("a",{href:"javascript:hs.expanders["+this.key+"].doFullExpand();",title:hs.fullExpandTitle},{background:"url("+hs.graphicsDir+hs.fullExpandIcon+")",display:"block",margin:"0 10px 10px 0",width:"45px",height:"44px"},null,true);this.createOverlay(A,"bottom right",true,0.75);this.fullExpandIcon=A};HsExpander.prototype.doFullExpand=function(){try{hs.purge(this.fullExpandIcon);this.fullExpandIcon.parentNode.removeChild(this.fullExpandIcon);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";var A=this.wrapper.offsetWidth-this.content.width;this.content.width=this.fullExpandWidth;this.content.height=this.fullExpandHeight;this.x.span=this.content.width;this.wrapper.style.width=(this.x.span+A)+"px";this.y.span=this.wrapper.offsetHeight-2*this.offsetBorderH;this.positionOutline(this.x.min,this.y.min,this.x.span,this.y.span);for(var B=0;B<this.overlays.length;B++){hs.purge(this.overlays[B]);this.overlays[B].parentNode.removeChild(this.overlays[B])}if(hs.showCredits){this.writeCredits()}this.createCustomOverlays();this.redoShowHide()}catch(C){window.location.href=this.content.src}};HsExpander.prototype.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)}};hs.addEventListener(document,"mousedown",hs.mouseClickHandler);hs.addEventListener(document,"mouseup",hs.mouseClickHandler);hs.addEventListener(window,"load",hs.preloadImages);
