var hs={graphicsDir:"/includes/hs/highslide/graphics/",restoreCursor:"zoomout.cur",fullExpandIcon:"fullexpand.gif",expandSteps:10,expandDuration:250,restoreSteps:10,restoreDuration:250,allowMultipleInstances:true,hideThumbOnExpand:true,captionSlideSpeed:1,outlineWhileAnimating:0,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:"Powered by <i>Highslide JS</i>",creditsHref:"http://vikjavev.no/highslide/?user=1",creditsTitle:"Go to the Highslide JS homepage",anchor:"auto",align:"auto",captionId:null,captionTemplateId:null,slideshowGroup:null,spaceForCaption:30,minWidth:200,minHeight:200,allowSizeReduction:true,outlineType:"drop-shadow",wrapperClassName:null,enableKeyListener:true,preloadTheseImages:new Array(),continuePreloading:true,expandedImagesCounter:0,expanders:new Array(),overrides:new Array("anchor","align","outlineType","outlineWhileAnimating","spaceForCaption","wrapperClassName","minWidth","minHeight","captionId","captionTemplateId","allowSizeReduction","slideshowGroup","enableKeyListener"),overlays:new Array(),toggleImagesGroup:null,pendingOutlines:new Array(),ie:(document.all&&!window.opera),safari:navigator.userAgent.indexOf("Safari")!=-1,hasFocused:false,$:function(b){return document.getElementById(b)},push:function(b,c){b[b.length]=c},createElement:function(c,f,d,e){var b=document.createElement(c);if(f){hs.setAttribs(b,f)}if(d){hs.setStyles(b,d)}if(e){e.appendChild(b)}return b},setAttribs:function(c,d){for(var b in d){c[b]=d[b]}},setStyles:function(d,c){for(var b in c){try{d.style[b]=c[b]}catch(f){}}},ieVersion:function(){arr=navigator.appVersion.split("MSIE");return parseFloat(arr[1])},clientInfo:function(){var b=(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;this.width=hs.ie?b.clientWidth:self.innerWidth;this.height=hs.ie?b.clientHeight:self.innerHeight;this.scrollLeft=hs.ie?b.scrollLeft:pageXOffset;this.scrollTop=hs.ie?b.scrollTop:pageYOffset},position:function(b){var c=b;var d=Array();d.x=c.offsetLeft;d.y=c.offsetTop;while(c.offsetParent){c=c.offsetParent;d.x+=c.offsetLeft;d.y+=c.offsetTop}return d},expand:function(d,b,c){try{new HsExpander(d,b,c);return false}catch(f){return true}},focusTopmost:function(){var c=0;var b=-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>c){c=hs.expanders[i].wrapper.style.zIndex;b=i}}}if(b==-1){hs.focusKey=-1}else{hs.expanders[b].focus()}},closeId:function(b){for(i=0;i<hs.expanders.length;i++){if(hs.expanders[i]&&(hs.expanders[i].thumb.id==b||hs.expanders[i].a.id==b)){hs.expanders[i].doClose();return}}},close:function(c){var b=hs.getWrapperKey(c);if(hs.expanders[b]){hs.expanders[b].doClose()}return false},toggleImages:function(b,c){if(b){hs.closeId(b)}if(hs.ie){c.href=c.href.replace("about:(blank)?","")}hs.toggleImagesExpandEl=c;return false},getAdjacentAnchor:function(b,g){var c=document.getElementsByTagName("A");var f=new Array;var d=-1;var e=0;for(i=0;i<c.length;i++){if(hs.isHsAnchor(c[i])&&((hs.expanders[b].slideshowGroup==hs.getParam(c[i],"slideshowGroup")))){f[e]=c[i];if(hs.expanders[b]&&c[i]==hs.expanders[b].a){d=e}e++}}return f[d+g]},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(b){var c=hs.getParam(b,"src");if(c){return c}return b.rel.replace(/_slash_/g,"/")||b.href},previousOrNext:function(b,d){if(typeof b=="object"){var c=hs.getWrapperKey(b)}else{if(typeof b=="number"){var c=b}}if(hs.expanders[c]){hs.toggleImagesExpandEl=hs.getAdjacentAnchor(c,d);hs.expanders[c].doClose()}return false},previous:function(b){return hs.previousOrNext(b,-1)},next:function(b){return hs.previousOrNext(b,1)},keyHandler:function(b){if(!b){b=window.event}if(!b.target){b.target=b.srcElement}if(b.target.form){return}var c=null;switch(b.keyCode){case 34:case 39:case 40:c=1;break;case 33:case 37:case 38:c=-1;break;case 27:case 13:if(hs.expanders[hs.focusKey]){hs.expanders[hs.focusKey].doClose()}return false}if(c!=null){hs.removeEventListener(document,"keydown",hs.keyHandler);if(hs.expanders[hs.focusKey]&&!hs.expanders[hs.focusKey].enableKeyListener){return true}return hs.previousOrNext(hs.focusKey,c)}else{return true}},registerOverlay:function(b){hs.push(hs.overlays,b)},getWrapperKey:function(c){var b=-1;while(c.parentNode){c=c.parentNode;if(c.id&&c.id.match(/^highslide-wrapper-[0-9]+$/)){b=c.id.replace(/^highslide-wrapper-([0-9]+)$/,"$1");break}}return b},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(g){if(!g){g=window.event}if(g.button>1){return true}if(!g.target){g.target=g.srcElement}var f=g.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 d=true;var c=parseInt(hs.expanders[hs.dragKey].wrapper.style.left);var b=parseInt(hs.expanders[hs.dragKey].wrapper.style.top)}if(g.type=="mousedown"){if(d){hs.dragObj=hs.expanders[hs.dragKey].content;if(f.className.match("highslide-image")){hs.dragObj.style.cursor="move"}hs.leftBeforeDrag=c;hs.topBeforeDrag=b;hs.dragX=g.clientX;hs.dragY=g.clientY;hs.addEventListener(document,"mousemove",hs.mouseMoveHandler);if(g.preventDefault){g.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(g.type=="mouseup"){hs.removeEventListener(document,"mousemove",hs.mouseMoveHandler);if(d&&hs.expanders[hs.dragKey]){if(f.className.match("highslide-image")){f.style.cursor=hs.styleRestoreCursor}var h=c!=hs.leftBeforeDrag||b!=hs.topBeforeDrag;if(!h&&!hs.hasFocused&&!f.className.match(/highslide-move/)){hs.expanders[hs.dragKey].doClose()}else{if(h||(!h&&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(f){if(!hs.expanders[hs.dragKey]||!hs.expanders[hs.dragKey].wrapper){return}if(!f){f=window.event}var b=hs.expanders[hs.dragKey];var d=b.wrapper;d.style.left=hs.leftBeforeDrag+f.clientX-hs.dragX+"px";d.style.top=hs.topBeforeDrag+f.clientY-hs.dragY+"px";if(b.objOutline){var c=b.objOutline;c.outer.style.left=(parseInt(d.style.left)-c.offset)+"px";c.outer.style.top=(parseInt(d.style.top)-c.offset)+"px"}return false},addEventListener:function(b,c,d){if(document.addEventListener){b.addEventListener(c,d,false)}else{if(document.attachEvent){b.attachEvent("on"+c,d)}else{b[c]=d}}},removeEventListener:function(b,c,d){if(document.removeEventListener){b.removeEventListener(c,d,false)}else{if(document.detachEvent){b.detachEvent("on"+c,d)}else{b[c]=null}}},isHsAnchor:function(b){return(b.className&&(b.className.match("highslide$")||b.className.match("highslide ")))},preloadFullImage:function(c){if(hs.continuePreloading&&hs.preloadTheseImages[c]&&hs.preloadTheseImages[c]!="undefined"){var b=document.createElement("img");b.onload=function(){hs.preloadFullImage(c+1)};b.src=hs.preloadTheseImages[c]}},preloadImages:function(c){if(c){this.numberOfImagesToPreload=c}var d=0;var b=document.getElementsByTagName("A");for(i=0;i<b.length;i++){a=b[i];if(hs.isHsAnchor(a)){if(d<this.numberOfImagesToPreload){hs.preloadTheseImages[d]=hs.getSrc(a);d++}}}new HsOutline(hs.outlineType,function(){hs.preloadFullImage(0)});var e=document.createElement("img");e.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(d,b){if(!d){return}if(b){this.onLoad=b}this.outlineType=d;this.outline=new Array();var c=hs.ieVersion();hs.genContainer();this.hasAlphaImageLoader=hs.ie&&c>=5.5&&c<8;this.hasPngSupport=!hs.ie||(hs.ie&&c>=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(b){if(this.outline[b]&&this.outline[b].onload){this.outline[b].onload=null;return}this.offset=this.hasOutline?10:0;if(b==1||b==4||b==6){this.tr=hs.createElement("tr",null,null,this.tbody)}if(b==5){this.inner=hs.createElement("td",null,{padding:0,margin:0,border:0,position:"relative"},this.tr)}var e=Array(0,8,1,2,7,3,6,5,4);var k=hs.graphicsDir+"outlines/"+this.outlineType+"/"+e[b]+".png";if(this.hasAlphaImageLoader){var h="filter";var j="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale src='"+k+"') "}else{if(this.hasPngSupport||this.hasIe7Bug){var h="background";var j="url("+k+")"}}var f={lineHeight:0,fontSize:0,padding:0,margin:0,border:0};if(this.hasOutline){f[h]=j}var c=hs.createElement("td",null,f);var d=hs.createElement("img",null,{visibility:"hidden",display:"block"},c);var g=2*this.offset;hs.setStyles(c,{height:g+"px",width:g+"px"});var l=this;if(b<8){d.onload=function(){l.preloadOutlineElement(b+1)}}else{d.onload=function(){hs.pendingOutlines[l.outlineType]=l;if(l.onLoad){l.onLoad()}}}this.tr.appendChild(c);if(this.hasOutline){d.src=k}else{d.onload()}};HsOutline.prototype.destroy=function(){this.outer.parentNode.removeChild(this.outer)};HsExpander=function(f,b,c){hs.continuePreloading=false;for(i=0;i<hs.overrides.length;i++){var h=hs.overrides[i];if(b&&typeof b[h]!="undefined"){this[h]=b[h]}else{this[h]=hs[h]}}if(b&&b.thumbnailId){var e=hs.$(b.thumbnailId)}else{for(i=0;i<f.childNodes.length;i++){if(f.childNodes[i].tagName&&f.childNodes[i].tagName=="IMG"){var e=f.childNodes[i];break}}}if(!e){e=f}for(i=0;i<hs.expanders.length;i++){if(hs.expanders[i]&&hs.expanders[i].thumb!=e&&!hs.expanders[i].onLoadStarted){hs.expanders[i].cancelLoading()}}for(i=0;i<hs.expanders.length;i++){if(hs.expanders[i]&&hs.expanders[i].thumb==e){hs.expanders[i].focus();return false}else{if(hs.expanders[i]&&!hs.allowMultipleInstances){hs.expanders[i].doClose()}}}this.key=hs.expandedImagesCounter++;hs.expanders[this.key]=this;if(c=="html"){this.isHtml=true;this.contentType="html"}else{this.isImage=true;this.contentType="image"}this.a=f;this.thumbsUserSetId=e.id||f.id;this.thumb=e;this.overlays=new Array();var g=hs.position(e);this.wrapper=hs.createElement("div",{id:"highslide-wrapper-"+this.key,className:this.wrapperClassName},{visibility:"hidden",position:"absolute",zIndex:hs.zIndexCounter++});this.thumbWidth=e.width?e.width:e.offsetWidth;this.thumbHeight=e.height?e.height:e.offsetHeight;this.thumbLeft=g.x;this.thumbTop=g.y;this.thumbClass=e.className;this.thumbOffsetBorderW=(this.thumb.offsetWidth-this.thumbWidth)/2;this.thumbOffsetBorderH=(this.thumb.offsetHeight-this.thumbHeight)/2;if(hs.pendingOutlines[this.outlineType]){this.connectOutline();this[this.contentType+"Create"]()}else{if(!this.outlineType){hs.genContainer();this[this.contentType+"Create"]()}else{this.displayLoading();var d=this;new HsOutline(this.outlineType,function(){d.connectOutline();d[d.contentType+"Create"]()})}}};HsExpander.prototype.connectOutline=function(b,c){var d=hs.pendingOutlines[this.outlineType];this.objOutline=d;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 c=document.createElement("img");var b=this.key;var c=document.createElement("img");this.content=c;c.onload=function(){if(hs.expanders[b]){hs.expanders[b].onLoad()}};c.className="highslide-image "+this.thumbClass;c.style.visibility="hidden";c.style.display="block";c.style.position="absolute";c.style.zIndex=3;c.title=hs.restoreTitle;c.onmouseover=function(){if(hs.expanders[b]){hs.expanders[b].onMouseOver()}};c.onmouseout=function(f){var d=f?f.relatedTarget:event.toElement;if(hs.expanders[b]){hs.expanders[b].onMouseOut(d)}};if(hs.safari){hs.container.appendChild(c)}c.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}var g=hs.marginBottom;if(!this.captionId&&this.thumbsUserSetId){this.captionId="caption-for-"+this.thumbsUserSetId}if(this.captionId&&(hs.$(this.captionId)||hs.$(this.captionId+"-taken"))){this.origCaption=hs.$(this.captionId+"-taken")?hs.$(this.captionId+"-taken"):hs.$(this.captionId);this.caption=this.origCaption.cloneNode(1);g+=this.spaceForCaption;if(!hs.$(this.captionId+"-taken")){this.origCaption.id=this.captionId+"-taken"}if(!hs.$(this.captionId)){this.caption.id=this.captionId}else{this.caption.id=null}if(this.captionTemplateId&&hs.$(this.captionTemplateId)){this.origCapTpl=hs.$(this.captionTemplateId);this.capTpl=this.origCapTpl.cloneNode(1);this.capTpl.innerHTML=this.capTpl.innerHTML.replace(/\s/g," ").replace("{caption}",this.caption.innerHTML);this.caption=this.capTpl}}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 o=hs.marginRight+2*this.offsetBorderW;g+=2*this.offsetBorderH;var m=this.newWidth/this.newHeight;var j=this.allowSizeReduction?this.minWidth:this.newWidth;var c=this.allowSizeReduction?this.minHeight:this.newHeight;var n={x:"auto",y:"auto"};if(this.align=="center"){n.x="center";n.y="center"}else{if(this.anchor.match(/^top/)){n.y=null}if(this.anchor.match(/right$/)){n.x="max"}if(this.anchor.match(/^bottom/)){n.y="max"}if(this.anchor.match(/left$/)){n.x=null}}client=new hs.clientInfo();this.x={min:parseInt(this.thumbLeft)-this.offsetBorderW+this.thumbOffsetBorderW,span:this.newWidth,minSpan:this.newWidth<j?this.newWidth:j,justify:n.x,marginMin:hs.marginLeft,marginMax:o,scroll:client.scrollLeft,clientSpan:client.width,thumbSpan:this.thumbWidth};var b=this.x.min+parseInt(this.thumbWidth);this.x=this.justify(this.x);this.y={min:parseInt(this.thumbTop)-this.offsetBorderH+this.thumbOffsetBorderH,span:this.newHeight,minSpan:this.newHeight<c?this.newHeight:c,justify:n.y,marginMin:hs.marginTop,marginMax:g,scroll:client.scrollTop,clientSpan:client.height,thumbSpan:this.thumbHeight};var k=this.y.min+parseInt(this.thumbHeight);this.y=this.justify(this.y);if(this.isHtml){this.htmlSizeOperations()}if(this.isImage){this.correctRatio(m)}var d=this.x;var f=this.y;var l={x:d.min-20,y:f.min-20,w:d.span+40,h:f.span+40+this.spaceForCaption};hs.hideSelects=(hs.ie&&hs.ieVersion()<7);if(hs.hideSelects){this.showHideElements("SELECT","hidden",l)}hs.hideIframes=(window.opera||navigator.vendor=="KDE"||(hs.ie&&hs.ieVersion()<5.5));if(hs.hideIframes){this.showHideElements("IFRAME","hidden",l)}if(this.objOutline&&!this.outlineWhileAnimating){this.positionOutline(d.min,f.min,d.span,f.span)}this.changeSize(1,this.thumbLeft+this.thumbOffsetBorderW-this.offsetBorderW,this.thumbTop+this.thumbOffsetBorderH-this.offsetBorderH,this.thumbWidth,this.thumbHeight,d.min,f.min,d.span,f.span,hs.expandDuration,hs.expandSteps,hs.outlineStartOffset,10)}catch(h){if(hs.expanders[this.key]&&hs.expanders[this.key].a){window.location.href=hs.getSrc(hs.expanders[this.key].a)}}};HsExpander.prototype.changeSize=function(d,p,q,k,l,e,f,n,b,m,o,c,g){dW=(n-k)/o;dH=(b-l)/o;dX=(e-p)/o;dY=(f-q)/o;dOo=(g-c)/o;for(i=1;i<=o;i++){k+=dW;l+=dH;p+=dX;q+=dY;c+=dOo;var j="hs.expanders["+this.key+"]";var h="if ("+j+") {";if(i==1){h+=j+".content.style.visibility = 'visible';if ("+j+".thumb.tagName == 'IMG' && hs.hideThumbOnExpand) "+j+".thumb.style.visibility = 'hidden';"}if(i==o){k=n;l=b;p=e;q=f;c=g}h+=j+"."+this.contentType+"SetSize("+Math.round(k)+", "+Math.round(l)+", "+Math.round(p)+", "+Math.round(q)+", "+Math.round(c);if(i==o){h+=", "+d}h+=");}";setTimeout(h,Math.round(i*(m/o)))}};HsExpander.prototype.imageSetSize=function(k,j,b,f,l,c){try{this.content.width=k;this.content.height=j;if(this.objOutline&&this.outlineWhileAnimating){var d=this.objOutline.offset-l;this.positionOutline(b+d,f+d,k-2*d,j-2*d,1)}hs.setStyles(this.wrapper,{visibility:"visible",left:b+"px",top:f+"px"});if(c==1){this.onExpanded()}else{if(c==-1){this.onEndClose()}}}catch(g){window.location.href=hs.getSrc(this.a)}};HsExpander.prototype.positionOutline=function(b,c,d,e,g){if(!this.objOutline){return}var f=this.objOutline;if(g){f.outer.style.visibility="visible"}f.outer.style.left=(b-f.offset)+"px";f.outer.style.top=(c-f.offset)+"px";if(window.opera){f.outer.style.width=(d+2*(this.offsetBorderW+f.offset))+"px"}d+=2*(this.offsetBorderW-f.offset);e+=+2*(this.offsetBorderH-f.offset);f.inner.style.width=d>=0?d+"px":0;f.inner.style.height=e>=0?e+"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 b=this.key;var c=this.outlineType;new HsOutline(c,function(){if(hs.expanders[b]){hs.expanders[b].preloadNext()}})};HsExpander.prototype.preloadNext=function(){var c=hs.getAdjacentAnchor(this.key,1);if(c){var b=document.createElement("img");b.src=hs.getSrc(c)}};HsExpander.prototype.justify=function(c){if(c.justify=="auto"||c.justify=="center"){var d=false;var b=true;if(c.justify=="center"){c.min=Math.round(c.scroll+(c.clientSpan-c.span-c.marginMax)/2)}else{c.min=Math.round(c.min-((c.span-c.thumbSpan)/2))}if(c.min<c.scroll+c.marginMin){c.min=c.scroll+c.marginMin;d=true}if(c.span<c.minSpan){c.span=c.minSpan;b=false}if(c.min+c.span>c.scroll+c.clientSpan-c.marginMax){if(d&&b){c.span=c.clientSpan-c.marginMin-c.marginMax}else{if(c.span<c.clientSpan-c.marginMin-c.marginMax){c.min=c.scroll+c.clientSpan-c.span-c.marginMin-c.marginMax}else{c.min=c.scroll+c.marginMin;if(b){c.span=c.clientSpan-c.marginMin-c.marginMax}}}}if(c.span<c.minSpan){c.span=c.minSpan;b=false}}else{if(c.justify=="max"){c.min=Math.floor(c.min-c.span+c.thumbSpan)}}if(c.min<c.marginMin){tmpMin=c.min;c.min=c.marginMin;if(b){c.span=c.span-(c.min-tmpMin)}}return c};HsExpander.prototype.correctRatio=function(b){var c=this.x;var d=this.y;var g=false;if(c.span/d.span>b){var f=c.span;c.span=d.span*b;if(c.span<c.minSpan){c.span=c.minSpan;d.span=c.span/b}g=true}else{if(c.span/d.span<b){var e=d.span;d.span=c.span/b;g=true}}if(g){c.min=parseInt(this.thumbLeft)-this.offsetBorderW+this.thumbOffsetBorderW;c.minSpan=c.span;this.x=this.justify(c);d.min=parseInt(this.thumbTop)-this.offsetBorderH+this.thumbOffsetBorderH;d.minSpan=d.span;this.y=this.justify(d)}};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 b=hs.createElement("a",{href:hs.creditsHref,className:"highslide-credits",innerHTML:hs.creditsText,title:hs.creditsTitle});this.createOverlay(b,"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,c){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(c){this.onDisplayFinished()}};HsExpander.prototype.showHideElements=function(d,j,k){var f=document.getElementsByTagName(d);if(f){for(i=0;i<f.length;i++){if(f[i].nodeName==d){var c=f[i].getAttribute("hidden-by");if(j=="visible"&&c){c=c.replace("["+this.key+"]","");f[i].setAttribute("hidden-by",c);if(!c){f[i].style.visibility="visible"}}else{if(j=="hidden"){var e=hs.position(f[i]);e.w=f[i].offsetWidth;e.h=f[i].offsetHeight;var g=(e.x+e.w<k.x||e.x>k.x+k.w);var h=(e.y+e.h<k.y||e.y>k.y+k.h);var b=hs.getWrapperKey(f[i]);if(!g&&!h&&b!=this.key){if(!c){f[i].setAttribute("hidden-by","["+this.key+"]")}else{if(!c.match("["+this.key+"]")){f[i].setAttribute("hidden-by",c+"["+this.key+"]")}}f[i].style.visibility="hidden"}else{if(c=="["+this.key+"]"||hs.focusKey==b){f[i].setAttribute("hidden-by","");f[i].style.visibility="visible"}else{if(c&&c.match("["+this.key+"]")){f[i].setAttribute("hidden-by",c.replace("["+this.key+"]",""))}}}}}}}}};HsExpander.prototype.focus=function(){for(i=0;i<hs.expanders.length;i++){if(hs.expanders[i]&&i==hs.focusKey){var b=hs.expanders[i];b.content.className+=" highslide-"+b.contentType+"-blur";if(b.caption){b.caption.className+=" highslide-caption-blur"}if(b.isImage){b.content.style.cursor=hs.ie?"hand":"pointer";b.content.title=hs.focusTitle}}}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){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.doClose=function(){hs.removeEventListener(document,"keydown",hs.keyHandler);try{if(!hs.expanders[this.key]){return}this.isClosing=true;var b=parseInt(this.wrapper.style.left);var c=parseInt(this.wrapper.style.top);var f=(this.isImage)?this.content.width:parseInt(this.content.style.width);var g=(this.isImage)?this.content.height:parseInt(this.content.style.height);if(this.objOutline&&this.outlineWhileAnimating){this.positionOutline(b,c,f,g)}else{if(this.objOutline){this.objOutline.destroy()}}var j=this.wrapper.childNodes.length;for(i=j-1;i>=0;i--){var d=this.wrapper.childNodes[i];if(d!=this.content){this.wrapper.removeChild(this.wrapper.childNodes[i])}}if(this.objectLoadTime=="after"){this.destroyObject()}if(this.scrollerDiv&&this.scrollerDiv!="scrollingContent"){this[this.scrollerDiv].style.overflow="hidden"}this.wrapper.style.width="auto";this.content.style.cursor="default";this.changeSize(-1,b,c,f,g,this.thumbLeft-this.offsetBorderW+this.thumbOffsetBorderW,this.thumbTop-this.offsetBorderH+this.thumbOffsetBorderH,this.thumbWidth,this.thumbHeight,hs.restoreDuration,hs.restoreSteps,10,hs.outlineStartOffset)}catch(k){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")}this.wrapper.parentNode.removeChild(this.wrapper);if(this.objOutline&&this.outlineWhileAnimating){this.objOutline.destroy()}hs.expanders[this.key]=null;hs.cleanUp()};HsExpander.prototype.createOverlay=function(g,d,j,h){if(typeof g=="string"&&hs.$(g)){g=hs.$(g).cloneNode(true);g.id=null}if(!g||typeof g=="string"||!this.isImage){return}if(!d){var d="center center"}var k=hs.createElement("div",null,{position:"absolute",zIndex:3},this.wrapper);if(h&&h<1){if(hs.ie){k.style.filter="alpha(opacity="+(h*100)+")"}else{k.style.opacity=h}}g.className+=" highslide-display-block";k.appendChild(g);var e=this.offsetBorderW;var b=this.content.width-k.offsetWidth;var c=this.offsetBorderH;var f=this.content.height-k.offsetHeight;if(d.match(/^bottom/)){c+=f}if(d.match(/^center/)){c+=f/2}if(d.match(/right$/)){e+=b}if(d.match(/center$/)){e+=b/2}k.style.left=e+"px";k.style.top=c+"px";if(j){k.setAttribute("hideOnMouseOut",true)}hs.push(this.overlays,k)};HsExpander.prototype.createCustomOverlays=function(){for(i=0;i<hs.overlays.length;i++){var b=hs.overlays[i];if(b.thumbnailId==null||b.thumbnailId==this.thumbsUserSetId){this.createOverlay(b.overlayId,b.position,b.hideOnMouseOut,b.opacity)}}};HsExpander.prototype.onMouseOver=function(){for(i=0;i<this.overlays.length;i++){this.overlays[i].style.visibility="visible"}};HsExpander.prototype.onMouseOut=function(d){var c=new Array();var b=0;for(i=0;i<this.overlays.length;i++){var e=d;while(e&&e.parentNode){if(e==this.overlays[i]){return}e=e.parentNode}if(this.overlays[i].getAttribute("hideOnMouseOut")){c[b]=this.overlays[i];b++}}for(i=0;i<c.length;i++){c[i].style.visibility="hidden"}};HsExpander.prototype.createFullExpand=function(){var b=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(b,"bottom right",true,0.75);this.fullExpandIcon=b};HsExpander.prototype.doFullExpand=function(){try{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 b=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+b)+"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){this.overlays[x].parentNode.removeChild(this.overlays[x])}if(hs.showCredits){this.writeCredits()}this.createCustomOverlays();this.redoShowHide()}catch(c){window.location.href=hs.expanders[this.key].content.src}};HsExpander.prototype.redoShowHide=function(){var b={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",b)}if(hs.hideIframes){this.showHideElements("IFRAME","hidden",b)}};hs.addEventListener(document,"mousedown",hs.mouseClickHandler);hs.addEventListener(document,"mouseup",hs.mouseClickHandler);hs.push(hs.overrides,"contentId");hs.push(hs.overrides,"allowWidthReduction");hs.push(hs.overrides,"allowHeightReduction");hs.push(hs.overrides,"objectType");hs.push(hs.overrides,"objectWidth");hs.push(hs.overrides,"objectHeight");hs.push(hs.overrides,"objectLoadTime");hs.push(hs.overrides,"swfObject");hs.allowWidthReduction=false;hs.allowHeightReduction=true;hs.objectLoadTime="before";hs.htmlExpand=function(c,b){if(!hs.$(b.contentId)){return true}try{hs.hasHtmlExpanders=true;new HsExpander(c,b,"html");return false}catch(d){return true}};hs.identifyContainer=function(b,c){for(i=0;i<b.childNodes.length;i++){if(b.childNodes[i].className==c){return b.childNodes[i]}}};HsExpander.prototype.htmlCreate=function(){this.origContent=hs.$(this.contentId);this.origContent.style.position="relative";var b=hs.createElement("div",null,{padding:"0 "+hs.marginRight+"px 0 "+hs.marginLeft+"px",position:"absolute",left:0,top:0},document.body);this.origContent.style.visibility="hidden";this.origContent.className+=" highslide-display-block";this.innerContent=this.origContent.cloneNode(true);hs.setStyles(this.innerContent,{border:"none",width:"auto",height:"auto"});this.setObjContainerSize(this.origContent);this.setObjContainerSize(this.innerContent,1);b.appendChild(this.origContent);this.content=hs.createElement("div",{className:"highslide-html"},{position:"relative",zIndex:3,overflow:"hidden",width:this.thumbWidth+"px",height:this.thumbHeight+"px"});this.content.appendChild(this.innerContent);this.newWidth=this.origContent.offsetWidth;this.newHeight=this.origContent.offsetHeight;if(hs.ie&&this.newHeight>parseInt(this.origContent.currentStyle.height)){this.newHeight=parseInt(this.origContent.currentStyle.height)}this.origContent.className=this.origContent.className.replace(" highslide-display-block","");this.onLoad()};HsExpander.prototype.setObjContainerSize=function(b,e){if(this.swfObject||this.objectType=="iframe"){var d=hs.identifyContainer(b,"highslide-body");if(e){d.style.width="auto";d.style.height="auto"}else{d.style.width=this.swfObject?this.swfObject.attributes.width+"px":this.objectWidth+"px";d.style.height=this.swfObject?this.swfObject.attributes.height+"px":this.objectHeight+"px"}}};HsExpander.prototype.writeExtendedContent=function(){if(this.objectType=="iframe"){this.objContainer=hs.identifyContainer(this.innerContent,"highslide-body");var b=this.key;this.iframe=hs.createElement("iframe",{frameBorder:0,src:hs.getSrc(this.a)},{width:this.objectWidth+"px",height:this.objectHeight+"px"},this.objContainer);if(this.objectLoadTime=="after"){this.correctIframeSize()}}else{if(this.swfObject){this.objContainer=hs.identifyContainer(this.innerContent,"highslide-body");this.objContainer.id=this.objContainer.id||"hs-flash-id-"+this.key;this.swfObject.write(this.objContainer.id)}}};HsExpander.prototype.correctIframeSize=function(){var c=this.innerContent.offsetWidth-this.objContainer.offsetWidth;var b=this.innerContent.offsetHeight-this.objContainer.offsetHeight;hs.setStyles(this.iframe,{width:(this.x.span-c)+"px",height:(this.y.span-b)+"px"});hs.setStyles(this.objContainer,{width:this.iframe.style.width,height:this.iframe.style.height});this.scrollingContent=this.iframe;this.scrollerDiv="scrollingContent"};HsExpander.prototype.htmlSizeOperations=function(){this.setObjContainerSize(this.innerContent);if(this.objectLoadTime=="before"){this.writeExtendedContent()}this.finalLeft=this.x.min;this.finalTop=this.y.min;if(this.x.span<this.newWidth&&!this.allowWidthReduction){this.x.span=this.newWidth}if(this.y.span<this.newHeight&&!this.allowHeightReduction){this.y.span=this.newHeight}this.scrollerDiv="innerContent";this.mediumContent=hs.createElement("div",null,{width:this.x.span+"px",position:"relative",left:(this.finalLeft-this.thumbLeft)+"px",top:(this.finalTop-this.thumbTop)+"px"},this.content);this.mediumContent.appendChild(this.innerContent);var f=hs.identifyContainer(this.innerContent,"highslide-body");if(f&&!this.swfObject&&this.objectType!="iframe"){var e=f.cloneNode(true);f.innerHTML="";hs.setStyles(f,{margin:0,border:"none",padding:0,overflow:"hidden"});f.appendChild(e);var d=this.innerContent.offsetWidth-f.offsetWidth;var c=this.innerContent.offsetHeight-f.offsetHeight;var b=hs.safari||navigator.vendor=="KDE"?1:0;f.style.width=(this.x.span-d-b)+"px";f.style.height=(this.y.span-c)+"px";if(e.offsetHeight>f.offsetHeight){f.style.overflow="auto";if(b){f.style.width=(parseInt(f.style.width)+b)+"px"}}this.scrollingContent=f;this.scrollerDiv="scrollingContent"}if(this.iframe&&this.objectLoadTime=="before"){this.correctIframeSize()}if(!this.scrollingContent&&this.y.span<this.mediumContent.offsetHeight){this.scrollerDiv="content"}if(this.scrollerDiv=="content"&&!this.allowWidthReduction&&this.objectType!="iframe"){this.x.span+=17}if(this.scrollerDiv&&this[this.scrollerDiv].offsetHeight>this[this.scrollerDiv].parentNode.offsetHeight){setTimeout("hs.expanders["+this.key+"]."+this.scrollerDiv+".style.overflow = 'auto'",hs.expandDuration)}};HsExpander.prototype.htmlSetSize=function(k,j,b,f,l,c){try{hs.setStyles(this.content,{width:k+"px",height:j+"px"});hs.setStyles(this.wrapper,{visibility:"visible",left:b+"px",top:f+"px"});hs.setStyles(this.mediumContent,{left:(this.finalLeft-b)+"px",top:(this.finalTop-f)+"px"});this.innerContent.style.visibility="visible";if(this.objOutline&&this.outlineWhileAnimating){var d=this.objOutline.offset-l;this.positionOutline(b+d,f+d,k-2*d,j-2*d,1)}if(c==1){this.onExpanded()}else{if(c==-1){this.onEndClose()}}}catch(g){window.location.href=hs.expanders[key].a.href}};HsExpander.prototype.destroyObject=function(){this.objContainer.innerHTML=""};
