var hs={graphicsDir:"js/graphics/",restoreCursor:"zoomout.cur",fullExpandIcon:"fullexpand.gif",expandSteps:10,expandDuration:250,restoreSteps:10,restoreDuration:250,allowMultipleInstances:true,hideThumbOnExpand:true,captionSlideSpeed:1,outlineWhileAnimating:false,outlineStartOffset:3,marginLeft:10,marginRight:35,marginTop:10,marginBottom:35,zIndexCounter:1001,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:"",creditsHref:"",creditsTitle:"",anchor:"auto",align:"center",targetX:null,targetY:null,captionId:null,captionTemplateId:null,slideshowGroup:null,spaceForCaption:100,minWidth:200,minHeight:200,allowSizeReduction:true,outlineType:"null",wrapperClassName:null,enableKeyListener:true,preloadTheseImages:new Array(),continuePreloading:true,expandedImagesCounter:0,expanders:new Array(),overrides:new Array("anchor","align","targetX","targetY","outlineType","outlineWhileAnimating","spaceForCaption","wrapperClassName","minWidth","minHeight","captionId","captionTemplateId","allowSizeReduction","slideshowGroup","enableKeyListener"),overlays:new Array(),pendingOutlines:new Array(),origNodes:new Array(),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,E,D,C){var B=document.createElement(A);if(E){hs.setAttribs(B,E)}if(D){hs.setStyles(B,D)}if(C){C.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{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,C,D){try{new HsExpander(A,C,D);return false}catch(B){return true}},focusTopmost:function(){var B=0;var 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){for(i=0;i<hs.expanders.length;i++){if(hs.expanders[i]&&(hs.expanders[i].thumb.id==A||hs.expanders[i].a.id==A)){hs.expanders[i].doClose();return }}},close:function(B){var A=hs.getWrapperKey(B);if(hs.expanders[A]){hs.expanders[A].doClose()}return false},toggleImages:function(A,B){if(A){hs.closeId(A)}if(hs.ie){B.href=B.href.replace("about:(blank)?","")}hs.toggleImagesExpandEl=B;return false},getAdjacentAnchor:function(D,F){var A=document.getElementsByTagName("A");var B=new Array;var E=-1;var 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();var oneLine=s.replace(/\s/g," ");var sParams=oneLine.replace(/.*?hs.(htmlE|e)xpand\s*?\(\s*?this\s*?,\s*?\{(.*?)\}.*?$/,"$2");if(hs.safari){for(var i=0;i<hs.overrides.length;i++){sParams=sParams.replace(hs.overrides[i]+":",","+hs.overrides[i]+":").replace(/^\s*?,/,"")}}if(oneLine==sParams){return null}eval("var arr = {"+sParams+"};");for(var x in arr){if(x==param){return arr[x]}}}catch(e){return null}},getSrc:function(A){var B=hs.getParam(A,"src");if(B){return B}return A.rel.replace(/_slash_/g,"/")||A.href},cloneNode:function(B){if(!hs.$(B)&&!hs.origNodes[B]){return null}var A;if(hs.origNodes[B]){A=hs.origNodes[B].cloneNode(1);hs.setId(A,/-hsOrig$/,1)}else{A=hs.$(B).cloneNode(1);hs.origNodes[B]=hs.$(B);hs.setId(hs.$(B),"-hsOrig")}return A},setId:function(E,C,A){if(E.id){E.id=A?E.id.replace(C,""):E.id+C}if(E.name){E.name=A?E.name.replace(C,""):E.name+C}if(hs.geckoBug&&hs.geckoBug(E)){return }var B=E.childNodes;for(var D=0;D<B.length;D++){if(B[D]){hs.setId(B[D],C,A)}}},purge:function(D){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){if(typeof A=="object"){var C=hs.getWrapperKey(A)}else{if(typeof A=="number"){var C=A}}if(hs.expanders[C]){try{hs.getAdjacentAnchor(C,D).onclick()}catch(B){}hs.expanders[C].doClose()}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:if(hs.expanders[hs.focusKey]){hs.expanders[hs.focusKey].doClose()}return false}if(B!=null){hs.removeEventListener(document,"keydown",hs.keyHandler);if(hs.expanders[hs.focusKey]&&!hs.expanders[hs.focusKey].enableKeyListener){return true}return hs.previousOrNext(hs.focusKey,B)}else{return true}},registerOverlay:function(A){hs.push(hs.overlays,A)},getWrapperKey:function(B){var A=-1;while(B.parentNode){B=B.parentNode;if(B.id&&B.id.match(/^highslide-wrapper-[0-9]+$/)){A=B.id.replace(/^highslide-wrapper-([0-9]+)$/,"$1");break}}return A},cleanUp:function(){if(hs.toggleImagesExpandEl){hs.toggleImagesExpandEl.onclick();hs.toggleImagesExpandEl=null}else{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}var F=D.target;while(F.parentNode&&!(F.className&&F.className.match(/highslide-(image|move|html)/))){F=F.parentNode}if(!F.parentNode){return }hs.dragKey=hs.getWrapperKey(F);if(F.className.match(/highslide-(image|move)/)){var C=true;var B=parseInt(hs.expanders[hs.dragKey].wrapper.style.left);var E=parseInt(hs.expanders[hs.dragKey].wrapper.style.top)}if(D.type=="mousedown"){if(C){hs.dragObj=hs.expanders[hs.dragKey].content;if(F.className.match("highslide-image")){hs.dragObj.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.dragObj.className.match(/highslide-(image|html)-blur/)){hs.expanders[hs.dragKey].focus();hs.hasFocused=true}return false}else{if(F.className.match(/highslide-html/)){hs.expanders[hs.dragKey].focus();hs.expanders[hs.dragKey].redoShowHide();hs.hasFocused=false}}}else{if(D.type=="mouseup"){hs.removeEventListener(document,"mousemove",hs.mouseMoveHandler);if(C&&hs.expanders[hs.dragKey]){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.expanders[hs.dragKey].doClose()}else{if(A||(!A&&hs.hasHtmlExpanders)){hs.expanders[hs.dragKey].redoShowHide()}}hs.hasFocused=false}else{if(F.className.match("highslide-image-blur")){F.style.cursor=hs.styleRestoreCursor}}}}},mouseMoveHandler:function(B){if(!hs.expanders[hs.dragKey]||!hs.expanders[hs.dragKey].wrapper){return }if(!B){B=window.event}var D=hs.expanders[hs.dragKey];var A=D.wrapper;A.style.left=hs.wLeft+B.clientX-hs.dragX+"px";A.style.top=hs.wTop+B.clientY-hs.dragY+"px";if(D.objOutline){var C=D.objOutline;C.outer.style.left=(parseInt(A.style.left)-C.offset)+"px";C.outer.style.top=(parseInt(A.style.top)-C.offset)+"px"}return false},addEventListener:function(A,C,B){if(document.addEventListener){A.addEventListener(C,B,false)}else{if(document.attachEvent){A.attachEvent("on"+C,B)}else{A["on"+C]=B}}},removeEventListener:function(A,C,B){if(document.removeEventListener){A.removeEventListener(C,B,false)}else{if(document.detachEvent){A.detachEvent("on"+C,B)}else{A[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=document.createElement("img");D.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)}}};HsOutline=function(C,B){if(!C){return }if(B){this.onLoad=B}this.outlineType=C;this.outline=new Array();var A=hs.ieVersion();hs.genContainer();this.hasAlphaImageLoader=hs.ie&&A>=5.5&&A<8;this.hasPngSupport=!hs.ie||(hs.ie&&A>=8);this.hasOutline=this.outlineType&&(this.hasAlphaImageLoader||this.hasPngSupport);this.outer=hs.createElement("table",{cellSpacing:0},{visibility:"hidden",position:"absolute",zIndex:hs.zIndexCounter++,borderCollapse:"collapse"},hs.container);this.tbody=hs.createElement("tbody",null,null,this.outer);this.preloadOutlineElement(1)};HsOutline.prototype.preloadOutlineElement=function(F){if(this.outline[F]&&this.outline[F].onload){this.outline[F].onload=null;return }this.offset=this.hasOutline?10:0;if(F==1||F==4||F==6){this.tr=hs.createElement("tr",null,null,this.tbody)}if(F==5){this.inner=hs.createElement("td",null,{padding:0,margin:0,border:0,position:"relative"},this.tr)}var B=Array(0,8,1,2,7,3,6,5,4);var A=hs.graphicsDir+"outlines/"+this.outlineType+"/"+B[F]+".png";if(this.hasAlphaImageLoader){var I="filter";var C="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale src='"+A+"') "}else{if(this.hasPngSupport||this.hasIe7Bug){var I="background";var C="url("+A+")"}}var J={lineHeight:0,fontSize:0,padding:0,margin:0,border:0};if(this.hasOutline){J[I]=C}var D=hs.createElement("td",null,J);var G=hs.createElement("img",null,{visibility:"hidden",display:"block",padding:0,margin:0,border:0},D);var H=2*this.offset;hs.setStyles(D,{height:H+"px",width:H+"px"});var E=this;if(F<8){G.onload=function(){E.preloadOutlineElement(F+1)}}else{G.onload=function(){hs.pendingOutlines[E.outlineType]=E;if(E.onLoad){E.onLoad()}}}this.tr.appendChild(D);if(this.hasOutline){G.src=A}else{G.onload()}};HsOutline.prototype.destroy=function(){hs.purge(this.outer);try{this.outer.parentNode.removeChild(this.outer)}catch(A){}};HsExpander=function(A,E,H){hs.continuePreloading=false;for(i=0;i<hs.overrides.length;i++){var B=hs.overrides[i];if(E&&typeof E[B]!="undefined"){this[B]=E[B]}else{this[B]=hs[B]}}if(E&&E.thumbnailId){var C=hs.$(E.thumbnailId)}else{for(i=0;i<A.childNodes.length;i++){if(A.childNodes[i].tagName&&A.childNodes[i].tagName=="IMG"){var C=A.childNodes[i];break}}}if(!C){C=A}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].thumb==C){hs.expanders[i].focus();return false}}if(!hs.allowMultipleInstances){var D=hs.expandedImagesCounter-1;if(hs.expanders[D]){hs.expanders[D].doClose()}}this.key=hs.expandedImagesCounter++;hs.expanders[this.key]=this;if(H=="html"){this.isHtml=true;this.contentType="html"}else{this.isImage=true;this.contentType="image"}this.a=A;this.thumbsUserSetId=C.id||A.id;this.thumb=C;this.overlays=new Array();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++});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.thumbClass=C.className;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 F=this;new HsOutline(this.outlineType,function(){F.connectOutline();F[F.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"},hs.container);if(hs.ie){hs.loading.style.filter="alpha(opacity="+(100*hs.loadingOpacity)+")"}else{hs.loading.style.opacity=hs.loadingOpacity}}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 A=document.createElement("img");var B=this.key;var A=document.createElement("img");this.content=A;A.onload=function(){if(hs.expanders[B]){hs.expanders[B].onLoad()}};A.className="highslide-image "+this.thumbClass;A.style.visibility="hidden";A.style.display="block";A.style.position="absolute";A.style.zIndex=3;A.title=hs.restoreTitle;A.onmouseover=function(){if(hs.expanders[B]){hs.expanders[B].onMouseOver()}};A.onmouseout=function(D){var C=D?D.relatedTarget:event.toElement;if(hs.expanders[B]){hs.expanders[B].onMouseOut(C)}};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()}}var G=hs.marginBottom;if(!this.captionId&&this.thumbsUserSetId){this.captionId="caption-for-"+this.thumbsUserSetId}if(this.captionId){this.caption=hs.cloneNode(this.captionId)}if(this.captionTemplateId){var N=(this.caption)?this.caption.innerHTML:"";this.caption=hs.cloneNode(this.captionTemplateId);if(this.caption){this.caption.innerHTML=this.caption.innerHTML.replace(/\s/g," ").replace("{caption}",N)}}var G=hs.marginBottom;if(this.caption){G+=this.spaceForCaption}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;G+=2*this.offsetBorderH;var J=this.newWidth/this.newHeight;var B=this.allowSizeReduction?this.minWidth:this.newWidth;var M=this.allowSizeReduction?this.minHeight:this.newHeight;var F={x:"auto",y:"auto"};if(this.align=="center"){F.x="center";F.y="center"}else{if(this.anchor.match(/^top/)){F.y=null}if(this.anchor.match(/right$/)){F.x="max"}if(this.anchor.match(/^bottom/)){F.y="max"}if(this.anchor.match(/left$/)){F.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:F.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<M?this.newHeight:M,justify:F.y,target:this.targetY,marginMin:hs.marginTop,marginMax:G,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(J)}var L=this.x;var K=this.y;var I={x:L.min-20,y:K.min-20,w:L.span+40,h:K.span+40+this.spaceForCaption};hs.hideSelects=(hs.ie&&hs.ieVersion()<7);if(hs.hideSelects){this.showHideElements("SELECT","hidden",I)}hs.hideIframes=(window.opera||navigator.vendor=="KDE"||(hs.ie&&hs.ieVersion()<5.5));if(hs.hideIframes){this.showHideElements("IFRAME","hidden",I)}if(this.objOutline&&!this.outlineWhileAnimating){this.positionOutline(L.min,K.min,L.span,K.span)}var E=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,L.min,K.min,L.span,K.span,hs.expandDuration,hs.expandSteps,hs.outlineStartOffset,E)}catch(H){if(hs.expanders[this.key]&&hs.expanders[this.key].a){window.location.href=hs.getSrc(hs.expanders[this.key].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(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&&!hs.$(D.target)){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(D,C,N,I,K,B,M,H,J,A,L,F,E){dW=(H-I)/L;dH=(J-K)/L;dX=(B-C)/L;dY=(M-N)/L;dOo=(E-F)/L;for(i=1;i<=L;i++){I+=dW;K+=dH;C+=dX;N+=dY;F+=dOo;var G="hs.expanders["+this.key+"]";var O="if ("+G+") {";if(i==1){O+=G+".content.style.visibility = 'visible';if ("+G+".thumb.tagName == 'IMG' && hs.hideThumbOnExpand) "+G+".thumb.style.visibility = 'hidden';"}if(i==L){I=H;K=J;C=B;N=M;F=E}O+=G+"."+this.contentType+"SetSize("+Math.round(I)+", "+Math.round(K)+", "+Math.round(C)+", "+Math.round(N)+", "+Math.round(F);if(i==L){O+=", "+D}O+=");}";setTimeout(O,Math.round(i*(A/L)))}};HsExpander.prototype.imageSetSize=function(I,E,H,G,D,C){try{this.content.width=I;this.content.height=E;if(this.objOutline&&this.outlineWhileAnimating){var A=this.objOutline.offset-D;this.positionOutline(H+A,G+A,I-2*A,E-2*A,1)}hs.setStyles(this.wrapper,{"visibility":"visible","left":H+"px","top":G+"px"});var B="hs.expanders["+this.key+"]";if(C==1){setTimeout("if ("+B+")"+B+".onExpanded()",0)}else{if(C==-1){setTimeout("if ("+B+")"+B+".onEndClose()",0)}}}catch(F){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.outer.style.visibility="visible"}E.outer.style.left=(A-E.offset)+"px";E.outer.style.top=(F-E.offset)+"px";E.outer.style.width=(B+2*(this.offsetBorderW+E.offset))+"px";B+=2*(this.offsetBorderW-E.offset);C+=+2*(this.offsetBorderH-E.offset);E.inner.style.width=B>=0?B+"px":0;E.inner.style.height=C>=0?C+"px":0};HsExpander.prototype.onExpanded=function(){if(this.objOutline){this.objOutline.outer.style.visibility="visible"}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(){if(hs.expanders[A]){hs.expanders[A].preloadNext()}})};HsExpander.prototype.preloadNext=function(){var B=hs.getAdjacentAnchor(this.key,1);if(B){var A=document.createElement("img");A.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.writeCaption=function(){try{this.wrapper.style.width=this.wrapper.offsetWidth+"px";this.caption.style.visibility="hidden";this.caption.style.position="relative";if(hs.ie){this.caption.style.zoom=1}this.caption.className+=" highslide-display-block";var capHeight=this.caption.offsetHeight;var slideHeight=(capHeight<this.content.height)?capHeight:this.content.height;this.caption.style.top="-"+slideHeight+"px";this.caption.style.zIndex=2;var step=1;if(slideHeight>400){step=4}else{if(slideHeight>200){step=2}else{if(slideHeight>100){step=1}}}if(hs.captionSlideSpeed){step=step*hs.captionSlideSpeed}else{step=slideHeight}var t=0;for(var top=-slideHeight;top<=0;top+=step,t+=10){var end=(top>=0)?1:0;var eval="if (hs.expanders["+this.key+"]) { hs.expanders["+this.key+"].placeCaption("+top+", "+end+");}";setTimeout(eval,t)}}catch(e){}};HsExpander.prototype.placeCaption=function(B,A){if(!this.caption){return }this.caption.style.top=B+"px";this.caption.style.visibility="visible";if(this.objOutline){this.objOutline.inner.style.height=(this.wrapper.offsetHeight+B-2*this.objOutline.offset)+"px"}if(A){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){hs.setId(A.caption,"-hsBlur"+i);A.caption.className+=" highslide-caption-blur"}if(A.isImage){A.content.style.cursor=hs.ie?"hand":"pointer";A.content.title=hs.focusTitle}else{hs.setId(A.innerContent,"-hsBlur"+i)}}}this.wrapper.style.zIndex=hs.zIndexCounter++;if(this.objOutline){this.objOutline.outer.style.zIndex=this.wrapper.style.zIndex}this.content.className="highslide-"+this.contentType;if(this.caption){hs.setId(this.caption,"-hsBlur"+this.key,1);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}else{hs.setId(this.innerContent,"-hsBlur"+this.key,1)}hs.focusKey=this.key;hs.addEventListener(document,"keydown",hs.keyHandler)};HsExpander.prototype.doClose=function(){hs.removeEventListener(document,"keydown",hs.keyHandler);try{if(!hs.expanders[this.key]){return }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&&this.outlineWhileAnimating){this.positionOutline(A,H,B,C)}else{if(this.objOutline){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){hs.expanders[this.key].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.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.cloneNode(A)}if(!A||typeof A=="string"||!this.isImage){return }if(!D){var D="center center"}var C=hs.createElement("div",null,{"position":"absolute","zIndex":3},this.wrapper);if(E&&E<1){if(hs.ie){C.style.filter="alpha(opacity="+(E*100)+")"}else{C.style.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.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)}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++){this.overlays[i].style.visibility="visible"}};HsExpander.prototype.onMouseOut=function(B){var A=new Array();var C=0;for(i=0;i<this.overlays.length;i++){var D=B;while(D&&D.parentNode){if(D==this.overlays[i]){return }D=D.parentNode}if(this.overlays[i].getAttribute("hideOnMouseOut")){A[C]=this.overlays[i];C++}}for(i=0;i<A.length;i++){A[i].style.visibility="hidden"}};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"});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(x in this.overlays){hs.purge(this.overlays[x]);this.overlays[x].parentNode.removeChild(this.overlays[x])}if(hs.showCredits){this.writeCredits()}this.createCustomOverlays();this.redoShowHide()}catch(B){window.location.href=hs.expanders[this.key].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)