var a,hs={graphicsDir:"highslide/graphics/",restoreCursor:"zoomout.cur",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,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:true,creditsText:"Powered by <i>Highslide JS</i>",creditsHref:"http://vikjavev.no/highslide/",creditsTitle:"Go to the Highslide JS homepage",enableKeyListener:true,yswCallFrom:"",anchor:"auto",align:"auto",targetX:null,targetY:null,captionId:null,captionTemplateId:null,slideshowGroup:null,spaceForCaption:30,minWidth:200,minHeight:200,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(b){return document.getElementById(b)}, push:function(b,c){b[b.length]=c},createElement:function(b,c,d,e,f){b=document.createElement(b);c&&hs.setAttribs(b,c);f&&hs.setStyles(b,{padding:0,border:"none",margin:0});d&&hs.setStyles(b,d);e&&e.appendChild(b);return b},setAttribs:function(b,c){for(var d in c)b[d]=c[d]},setStyles:function(b,c){for(var d in c)try{if(hs.ie&&d=="opacity")b.style.filter=c[d]==1?"none":"alpha(opacity="+c[d]*100+")";else b.style[d]=c[d]}catch(e){}},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){for(var c={x:b.offsetLeft,y:b.offsetTop};b.offsetParent;){b=b.offsetParent;c.x+=b.offsetLeft;c.y+=b.offsetTop;if(b!=document.body&&b!=document.documentElement){c.x-=b.scrollLeft; c.y-=b.scrollTop}}return c},expand:function(b,c,d){try{new HsExpander(b,c,d);return false}catch(e){return true}},focusTopmost:function(){var b=0,c=-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;c=i}if(c==-1)hs.focusKey=-1;else hs.expanders[c].focus()},closeId:function(b){return hs.close(b)},close:function(b){try{hs.getExpander(b).doClose()}catch(c){}return false},getAdjacentAnchor:function(b, c){var d=document.getElementsByTagName("A"),e={},f=-1,g=0;for(i=0;i<d.length;i++)if(hs.isHsAnchor(d[i])&&hs.expanders[b].slideshowGroup==hs.getParam(d[i],"slideshowGroup")){e[g]=d[i];if(hs.expanders[b]&&d[i]==hs.expanders[b].a)f=g;g++}return e[f+c]},getParam:function(b,c){try{var d=b.onclick.toString().replace(/\s/g," ").split("{")[2].split("}")[0];if(hs.safari)for(b=0;b<hs.overrides.length;b++)d=d.replace(hs.overrides[b]+":",","+hs.overrides[b]+":").replace(/^\s*?,/,"");eval("var arr = {"+d+"};"); return arr[c]?arr[c]:hs[c]}catch(e){return hs[c]}},getSrc:function(b){var c=hs.getParam(b,"src");if(c)return c;return b.rel.replace(/_slash_/g,"/")||b.href},getNode:function(b){var c=hs.$(b),d=hs.clones[b];if(!c&&!d)return null;if(d)return d.cloneNode(true);else{d=c.cloneNode(true);d.id="";hs.clones[b]=d;return c}},purge:function(b){if(hs.ie){var c=b.attributes,d,e,f;if(c){e=c.length;for(d=0;d<e;d+=1){f=c[d].name;if(typeof b[f]==="function")b[f]=null}}if(!(hs.geckoBug&&hs.geckoBug(b)))if(c=b.childNodes){e= c.length;for(d=0;d<e;d+=1)hs.purge(b.childNodes[d])}}},previousOrNext:function(b,c){b=hs.getExpander(b);try{hs.getAdjacentAnchor(b.key,c).onclick()}catch(d){}try{b.doClose()}catch(e){}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){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:c= 0}if(c!==null){hs.removeEventListener(document,"keydown",hs.keyHandler);try{if(!hs.enableKeyListener)return true}catch(d){}if(b.preventDefault)b.preventDefault();else b.returnValue=false;if(c==0){try{hs.getExpander().doClose()}catch(e){}return false}else return hs.previousOrNext(hs.focusKey,c)}else return true}},registerOverlay:function(b){hs.push(hs.overlays,b)},getWrapperKey:function(b){var c,d=/^highslide-wrapper-([0-9]+)$/;for(c=b;c.parentNode;){c=c.parentNode;if(d.test(c.id))return c.id.replace(d, "$1")}for(c=b;c.parentNode;){if(c.tagName&&hs.isHsAnchor(c))for(key=0;key<hs.expanders.length;key++)if((exp=hs.expanders[key])&&exp.a==c)return key;c=c.parentNode}},getExpander:function(b){try{if(typeof b=="undefined")return hs.expanders[hs.focusKey];if(typeof b=="number")return hs.expanders[b];if(typeof b=="string")b=hs.$(b);return hs.expanders[hs.getWrapperKey(b)]}catch(c){}},cleanUp:function(){for(i=0;i<hs.expanders.length;i++)hs.expanders[i]&&hs.expanders[i].isExpanded&&hs.focusTopmost()},mouseClickHandler:function(b){if(!b)b= window.event;if(b.button>1)return true;if(!b.target)b.target=b.srcElement;if(!b.target.form){for(var c=b.target;c.parentNode&&!(c.className&&c.className.match(/highslide-(image|move|html)/));)c=c.parentNode;if(c.parentNode){hs.dragExp=hs.getExpander(c);if(c.className.match(/highslide-(image|move)/))var d=true,e=parseInt(hs.dragExp.wrapper.style.left),f=parseInt(hs.dragExp.wrapper.style.top);if(b.type=="mousedown")if(d){if(c.className.match("highslide-image"))hs.dragExp.content.style.cursor="move"; hs.wLeft=e;hs.wTop=f;hs.dragX=b.clientX;hs.dragY=b.clientY;hs.addEventListener(document,"mousemove",hs.mouseMoveHandler);b.preventDefault&&b.preventDefault();if(hs.dragExp.content.className.match(/highslide-(image|html)-blur/)){hs.dragExp.focus();hs.hasFocused=true}return false}else{if(c.className.match(/highslide-html/)){hs.dragExp.focus();hs.dragExp.redoShowHide();hs.hasFocused=false}}else if(b.type=="mouseup"){hs.removeEventListener(document,"mousemove",hs.mouseMoveHandler);if(d&&hs.dragExp){if(c.className.match("highslide-image"))c.style.cursor= hs.styleRestoreCursor;b=e!=hs.wLeft||f!=hs.wTop;if(!b&&!hs.hasFocused&&!c.className.match(/highslide-move/))hs.dragExp.onClick();else if(b||!b&&hs.hasHtmlexpanders)hs.dragExp.redoShowHide();hs.hasFocused=false}else if(c.className.match("highslide-image-blur"))c.style.cursor=hs.styleRestoreCursor}}}},mouseMoveHandler:function(b){if(hs.dragExp&&hs.dragExp.wrapper){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;b=hs.dragExp.wrapper;b.style.left= hs.dragExp.x.min+"px";b.style.top=hs.dragExp.y.min+"px";if(hs.dragExp.objOutline){b=hs.dragExp.objOutline;b.table.style.left=hs.dragExp.x.min-b.offset+"px";b.table.style.top=hs.dragExp.y.min-b.offset+"px"}return false}},addEventListener:function(b,c,d){try{b.addEventListener(c,d,false)}catch(e){try{b.detachEvent("on"+c,d);b.attachEvent("on"+c,d)}catch(f){b["on"+c]=d}}},removeEventListener:function(b,c,d){try{b.removeEventListener(c,d,false)}catch(e){try{b.detachEvent("on"+c,d)}catch(f){b["on"+c]= null}}},isHsAnchor:function(b){return b.onclick&&b.onclick.toString().replace(/\s/g," ").match(/hs.(htmlE|e)xpand/)},preloadFullImage:function(b){if(hs.continuePreloading&&hs.preloadTheseImages[b]&&hs.preloadTheseImages[b]!="undefined"){var c=document.createElement("img");c.onload=function(){hs.preloadFullImage(b+1)};c.src=hs.preloadTheseImages[b]}},preloadImages:function(b){if(b&&typeof b!="object")hs.numberOfImagesToPreload=b;var c,d=0,e=document.getElementsByTagName("A");for(i=0;i<e.length;i++){b= e[i];if((c=hs.isHsAnchor(b))&&c[0]=="hs.expand")if(d<hs.numberOfImagesToPreload){hs.preloadTheseImages[d]=hs.getSrc(b);d++}}new HsOutline(hs.outlineType,function(){hs.preloadFullImage(0)});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(b,c,d,e,f){c=parseFloat(c);b.style.visibility=c<=0?"hidden": "visible";if(!(c<0||e==1&&c>d)){if(f==null)f=hs.faders.length;if(typeof b.i!="undefined"&&b.i!=f){clearTimeout(hs.faders[b.i]);c=b.tempOpacity}b.i=f;b.tempOpacity=c;b.style.visibility=c<=0?"hidden":"visible";hs.setStyles(b,{opacity:c});hs.faders[f]=setTimeout(function(){hs.fade(b,Math.round((c+0.1*e)*100)/100,d,e,f)},25)}}}; HsOutline=function(b,c){this.onLoad=c;this.outlineType=b;var d=hs.ieVersion(),e;this.hasAlphaImageLoader=hs.ie&&d>=5.5&&d<7;this.hasPngSupport=!hs.ie||hs.ie&&d>=7;if(!b||!this.hasAlphaImageLoader&&!this.hasPngSupport)c&&c();else{hs.genContainer();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,1);this.td=[];for(c=0;c<=8;c++){if(c% 3==0)e=hs.createElement("tr",null,{height:"auto"},this.tbody,true);this.td[c]=hs.createElement("td",null,null,e,true);d=c!=4?{lineHeight:0,fontSize:0}:{position:"relative"};hs.setStyles(this.td[c],d)}this.td[4].className=b;this.preloadGraphic()}}; HsOutline.prototype.preloadGraphic=function(){var b=hs.graphicsDir+"ysw-"+this.outlineType+".png",c=hs.safari?hs.container:null;this.graphic=hs.createElement("img",null,{position:"absolute",left:"-9999px",top:"-9999px"},c,true);var d=this;this.graphic.onload=function(){d.onGraphicLoad()};this.graphic.src=b}; HsOutline.prototype.onGraphicLoad=function(){for(var b=this.offset=this.graphic.width/4,c=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],d={height:2*b+"px",width:2*b+"px"},e=0;e<=8;e++)if(c[e]){if(this.hasAlphaImageLoader){var f=e==1||e==7?"100%":this.graphic.width+"px",g=hs.createElement("div",null,{width:"100%",height:"100%",position:"relative",overflow:"hidden"},this.td[e],true);hs.createElement("div",null,{filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='"+ this.graphic.src+"')",position:"absolute",width:f,height:this.graphic.height+"px",left:c[e][0]*b+"px",top:c[e][1]*b+"px"},g,true)}else hs.setStyles(this.td[e],{background:"url("+this.graphic.src+") "+c[e][0]*b+"px "+c[e][1]*b+"px"});hs.setStyles(this.td[e],d)}hs.pendingOutlines[this.outlineType]=this;this.onLoad&&this.onLoad()};HsOutline.prototype.destroy=function(){hs.purge(this.table);try{this.table.parentNode.removeChild(this.table)}catch(b){}}; HsExpander=function(b,c,d,e){hs.continuePreloading=false;this.custom=d;for(i=0;i<hs.overrides.length;i++){d=hs.overrides[i];this[d]=c&&typeof c[d]!="undefined"?c[d]:hs[d]}(c=c&&c.thumbnailId?hs.$(c.thumbnailId):b.getElementsByTagName("IMG")[0])||(c=b);for(i=0;i<hs.expanders.length;i++)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==b){hs.expanders[i].focus();return false}if(!hs.allowMultipleInstances)try{hs.expanders[hs.expandedImagesCounter- 1].doClose()}catch(f){}var g=this.key=hs.expandedImagesCounter++;hs.expanders[this.key]=this;if(e=="html"){this.isHtml=true;this.contentType="html"}else{this.isImage=true;this.contentType="image"}this.a=b;this.thumbsUserSetId=c.id||b.id;this.thumb=c;this.overlays=[];b=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(j){try{hs.expanders[g].onMouseOver(j)}catch(n){}}; this.wrapper.onmouseout=function(j){try{hs.expanders[g].onMouseOut(j)}catch(n){}};this.thumbWidth=c.width?c.width:c.offsetWidth;this.thumbHeight=c.height?c.height:c.offsetHeight;this.thumbLeft=b.x;this.thumbTop=b.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.displayLoading(); var h=this;new HsOutline(this.outlineType,function(){h.connectOutline();h[h.contentType+"Create"]()})}else this[this.contentType+"Create"]()};a=HsExpander.prototype;a.connectOutline=function(){var b=hs.pendingOutlines[this.outlineType];this.objOutline=b;hs.pendingOutlines[this.outlineType]=null}; a.displayLoading=function(){if(!(this.onLoadStarted||this.loading)){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)}}; a.imageCreate=function(){var b=this.key,c=document.createElement("img");this.content=c;c.onload=function(){try{hs.expanders[b].onLoad()}catch(d){}};c.className="highslide-image";c.style.visibility="hidden";c.style.display="block";c.style.position="absolute";c.style.maxWidth="none";c.style.zIndex=3;c.title=hs.restoreTitle;hs.safari&&hs.container.appendChild(c);c.src=hs.getSrc(this.a);this.displayLoading()}; a.onLoad=function(){try{if(this.content)if(!this.onLoadStarted){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 this.htmlGetSize&&this.htmlGetSize();this.marginBottom=hs.marginBottom; this.getCaption();this.wrapper.appendChild(this.content);this.content.style.position="relative";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 b=hs.marginRight+2*this.offsetBorderW;this.marginBottom+=2*this.offsetBorderH;var c=this.newWidth/ this.newHeight,d=this.allowSizeReduction?this.minWidth:this.newWidth,e=this.allowSizeReduction?this.minHeight:this.newHeight,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< d?this.newWidth:d,justify:f.x,target:this.targetX,marginMin:hs.marginLeft,marginMax:b,scroll:client.scrollLeft,clientSpan:client.width,thumbSpan:this.thumbWidth};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<e?this.newHeight:e,justify:f.y,target:this.targetY,marginMin:hs.marginTop,marginMax:this.marginBottom,scroll:client.scrollTop,clientSpan:client.height,thumbSpan:this.thumbHeight}; parseInt(this.thumbHeight);this.y=this.justify(this.y);this.isHtml&&this.htmlSizeOperations();this.isImage&&this.correctRatio(c);this.show()}}catch(g){if(hs.expanders[this.key]&&hs.expanders[this.key].a)window.location.href=hs.getSrc(hs.expanders[this.key].a)}}; a.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;hs.hideSelects&&this.showHideElements("SELECT","hidden",b);hs.hideIframes=window.opera||navigator.vendor=="KDE"||hs.ie&&hs.ieVersion()<5.5;hs.hideIframes&&this.showHideElements("IFRAME","hidden",b);this.objOutline&&!this.outlineWhileAnimating&&this.positionOutline(this.x.min,this.y.min,this.x.span,this.y.span);b=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,b)}; a.justify=function(b){var c,d=b==this.x?"x":"y";if(b.target&&b.target.match(/ /)){c=b.target.split(" ");b.target=c[0]}if(b.target&&hs.$(b.target)){b.min=hs.position(hs.$(b.target))[d];if(c&&c[1]&&c[1].match(/^[-]?[0-9]+px$/))b.min+=parseInt(c[1])}else if(b.justify=="auto"||b.justify=="center"){c=false;var e=true;b.min=b.justify=="center"?Math.round(b.scroll+(b.clientSpan-b.span-b.marginMax)/2):Math.round(b.min-(b.span-b.thumbSpan)/2);if(b.min<b.scroll+b.marginMin){b.min=b.scroll+b.marginMin;c=true}if(b.span< b.minSpan){b.span=b.minSpan;e=false}if(b.min+b.span>b.scroll+b.clientSpan-b.marginMax)if(c&&e)b.span=b.clientSpan-b.marginMin-b.marginMax;else if(b.span<b.clientSpan-b.marginMin-b.marginMax)b.min=b.scroll+b.clientSpan-b.span-b.marginMin-b.marginMax;else{b.min=b.scroll+b.marginMin;if(e)b.span=b.clientSpan-b.marginMin-b.marginMax}if(b.span<b.minSpan){b.span=b.minSpan;e=false}}else if(b.justify=="max")b.min=Math.floor(b.min-b.span+b.thumbSpan);if(b.min<b.marginMin){tmpMin=b.min;b.min=b.marginMin;if(e)b.span-= b.min-tmpMin}return b};a.correctRatio=function(b){var c=this.x,d=this.y,e=false;if(c.span/d.span>b){c.span=d.span*b;if(c.span<c.minSpan){c.span=c.minSpan;d.span=c.span/b}e=true}else if(c.span/d.span<b){d.span=c.span/b;e=true}if(e){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)}}; a.changeSize=function(b,c,d,e,f,g,h,j,n,r,k,o,q){var s=(j-e)/k,t=(n-f)/k,u=(g-c)/k,v=(h-d)/k,w=(q-o)/k,m,l="hs.expanders["+this.key+"]";for(i=1;i<=k;i++){e+=s;f+=t;c+=u;d+=v;o+=w;m=Math.round(i*(r/k));var p="try {";if(i==1)p+=l+".content.style.visibility = 'visible';if ("+l+".thumb.tagName == 'IMG' && hs.hideThumbOnExpand) "+l+".thumb.style.visibility = 'visible';";if(i==k){e=j;f=n;c=g;d=h;o=q}p+=l+"."+this.contentType+"SetSize("+Math.round(e)+", "+Math.round(f)+", "+Math.round(c)+", "+Math.round(d)+ ", "+Math.round(o);p+=");} catch (e) {}";setTimeout(p,m)}if(b==1){setTimeout("try { "+l+'.objOutline.table.style.visibility = "visible"; } catch (e){}',m);setTimeout("try { "+l+".onExpanded(); } catch(e){}",m+50)}else setTimeout("try { "+l+".onEndClose(); } catch(e){}",m)}; a.imageSetSize=function(b,c,d,e,f){try{this.content.width=b;this.content.height=c;if(this.objOutline&&this.outlineWhileAnimating){var g=this.objOutline.offset-f;this.positionOutline(d+g,e+g,b-2*g,c-2*g,1)}hs.setStyles(this.wrapper,{visibility:"visible",left:d+"px",top:e+"px"})}catch(h){window.location.href=hs.getSrc(this.a)}}; a.positionOutline=function(b,c,d,e,f){if(this.objOutline){var g=this.objOutline;if(f)g.table.style.visibility="visible";g.table.style.left=b-g.offset+"px";g.table.style.top=c-g.offset+"px";g.table.style.width=d+2*(this.offsetBorderW+g.offset)+"px";d+=2*(this.offsetBorderW-g.offset);e+=+2*(this.offsetBorderH-g.offset);g.td[4].style.width=d>=0?d+"px":0;g.td[4].style.height=e>=0?e+"px":0;if(g.hasAlphaImageLoader)g.td[3].style.height=g.td[5].style.height=g.td[4].style.height}}; a.onExpanded=function(){this.isExpanded=true;this.focus();this.isHtml&&this.objectLoadTime=="after"&&this.writeExtendedContent();this.createCustomOverlays();hs.showCredits&&this.writeCredits();this.caption&&this.writeCaption();this.fullExpandWidth>this.x.span&&this.createFullExpand();this.caption||this.onDisplayFinished()};a.onDisplayFinished=function(){var b=this.key,c=this.outlineType;new HsOutline(c,function(){try{hs.expanders[b].preloadNext()}catch(d){}})}; a.preloadNext=function(){var b=hs.getAdjacentAnchor(this.key,1);b.onclick.toString().match(/hs\.expand/)&&hs.createElement("img",{src:hs.getSrc(b)})};a.cancelLoading=function(){this.a.style.cursor=this.originalCursor;if(this.loading)hs.loading.style.visibility="hidden";hs.expanders[this.key]=null};a.writeCredits=function(){var b=hs.createElement("a",{href:hs.creditsHref,className:"highslide-credits",innerHTML:hs.creditsText,title:hs.creditsTitle});this.createOverlay(b,"top left")}; a.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 b=this.caption?this.caption.innerHTML:"";if(this.caption=hs.getNode(this.captionTemplateId))this.caption.innerHTML=this.caption.innerHTML.replace(/\s/g," ").replace("{caption}",b)}if(this.caption)this.marginBottom+=this.spaceForCaption}; a.writeCaption=function(){try{this.wrapper.style.width=this.wrapper.offsetWidth+"px";this.caption.style.visibility="hidden";this.caption.className+=" highslide-display-block";var b;if(hs.ie&&(hs.ieVersion()<6||document.compatMode=="BackCompat"))b=this.caption.offsetHeight;else{var c=hs.createElement("div",{innerHTML:this.caption.innerHTML},null,null,true);this.caption.innerHTML="";this.caption.appendChild(c);b=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(b/50);if(step==0)step=1;step*=hs.captionSlideSpeed;c=0;for(var d=b%step;d<=b;d+=step,c+=10){var e=d==b?1:0,f="try { hs.expanders["+this.key+"].placeCaption("+d+", "+e+");} catch (e) {}";setTimeout(f,c)}}else this.placeCaption(b,1)}catch(g){}}; a.placeCaption=function(b,c){if(this.caption){this.caption.style.height=b+"px";this.caption.style.visibility="visible";this.y.span=this.wrapper.offsetHeight-2*this.offsetBorderH;if(b=this.objOutline){b.td[4].style.height=this.wrapper.offsetHeight-2*this.objOutline.offset+"px";if(b.hasAlphaImageLoader)b.td[3].style.height=b.td[5].style.height=b.td[4].style.height}c&&this.onDisplayFinished()}}; a.showHideElements=function(b,c,d){var e=document.getElementsByTagName(b);if(e)for(i=0;i<e.length;i++)if(e[i].nodeName==b){var f=e[i].getAttribute("hidden-by");if(c=="visible"&&f){f=f.replace("["+this.key+"]","");e[i].setAttribute("hidden-by",f);if(!f)e[i].style.visibility="visible"}else if(c=="hidden"){var g=hs.position(e[i]);g.w=e[i].offsetWidth;g.h=e[i].offsetHeight;var h=g.x+g.w<d.x||g.x>d.x+d.w;g=g.y+g.h<d.y||g.y>d.y+d.h;var j=hs.getWrapperKey(e[i]);if(!h&&!g&&j!=this.key){if(!e[i].currentStyle|| e[i].currentStyle&&e[i].currentStyle.visibility!="hidden"){if(f)f.match("["+this.key+"]")||e[i].setAttribute("hidden-by",f+"["+this.key+"]");else e[i].setAttribute("hidden-by","["+this.key+"]");e[i].style.visibility="hidden"}}else if(f=="["+this.key+"]"||hs.focusKey==j){e[i].setAttribute("hidden-by","");e[i].style.visibility="visible"}else f&&f.match("["+this.key+"]")&&e[i].setAttribute("hidden-by",f.replace("["+this.key+"]",""))}}}; a.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.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)};a.onClick=function(){this.doClose()}; a.doClose=function(){hs.removeEventListener(document,"keydown",hs.keyHandler);try{this.isClosing=true;var b=parseInt(this.wrapper.style.left),c=parseInt(this.wrapper.style.top),d=this.isImage?this.content.width:parseInt(this.content.style.width),e=this.isImage?this.content.height:parseInt(this.content.style.height);if(this.objOutline)if(this.outlineWhileAnimating)this.positionOutline(b,c,d,e);else if(this.preserveContent)this.objOutline.table.style.visibility="hidden";else this.objOutline.destroy(); var f=this.wrapper.childNodes.length;for(i=f-1;i>=0;i--){var g=this.wrapper.childNodes[i];if(g!=this.content){hs.purge(this.wrapper.childNodes[i]);this.wrapper.removeChild(this.wrapper.childNodes[i])}}this.isHtml&&this.htmlOnClose();this.wrapper.style.width="auto";this.content.style.cursor="default";var h=this.objOutline?this.objOutline.offset:0;this.changeSize(-1,b,c,d,e,this.thumbLeft-this.offsetBorderW+this.thumbOffsetBorderW,this.thumbTop-this.offsetBorderH+this.thumbOffsetBorderH,this.thumbWidth, this.thumbHeight,hs.restoreDuration,hs.restoreSteps,h,hs.outlineStartOffset)}catch(j){this.onEndClose()}}; a.onEndClose=function(){this.thumb.style.visibility=hs.yswCallFrom=="quickshop"?"hidden":"visible";hs.hideSelects&&this.showHideElements("SELECT","visible");hs.hideIframes&&this.showHideElements("IFRAME","visible");if(this.isHtml&&this.preserveContent)this.sleep();else{this.objOutline&&this.outlineWhileAnimating&&this.objOutline.destroy();hs.purge(this.wrapper);if(hs.ie&&hs.ieVersion()<5.5)this.wrapper.innerHTML="";else this.wrapper.parentNode.removeChild(this.wrapper)}if(hs.mask)hs.mask.style.display= "none";hs.expanders[this.key]=null;hs.cleanUp()}; a.createOverlay=function(b,c,d,e){if(typeof b=="string")b=hs.getNode(b);if(!(!b||typeof b=="string"||!this.isImage)){var f=hs.createElement("div",null,{left:0,top:0,position:"absolute",zIndex:3,visibility:"hidden"},this.wrapper,true);e&&hs.setStyles(b,{opacity:e});b.className+=" highslide-display-block";f.appendChild(b);b=this.offsetBorderW;var g=this.content.width-f.offsetWidth,h=this.offsetBorderH,j=this.content.height-f.offsetHeight;c||(c="center center");if(c.match(/^bottom/))h+=j;if(c.match(/^center/))h+= j/2;if(c.match(/right$/))b+=g;if(c.match(/center$/))b+=g/2;f.style.left=b+"px";f.style.top=h+"px";d&&f.setAttribute("hideOnMouseOut",true);e||(e=1);f.setAttribute("opacity",e);hs.fade(f,0,e,1);hs.push(this.overlays,f)}};a.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)}}; a.onMouseOver=function(){for(i=0;i<this.overlays.length;i++){var b=this.overlays[i];b.getAttribute("hideOnMouseOut")&&hs.fade(b,0,b.getAttribute("opacity"),1)}};a.onMouseOut=function(){for(i=0;i<this.overlays.length;i++){var b=this.overlays[i];b.getAttribute("hideOnMouseOut")&&hs.fade(b,b.getAttribute("opacity"),0,-1)}}; a.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"},null,true);this.createOverlay(b,"bottom right",true,0.75);this.fullExpandIcon=b}; a.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 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(b=0;b<this.overlays.length;b++){hs.purge(this.overlays[b]);this.overlays[b].parentNode.removeChild(this.overlays[b])}hs.showCredits&&this.writeCredits();this.createCustomOverlays();this.redoShowHide()}catch(c){window.location.href=this.content.src}}; a.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};hs.hideSelects&&this.showHideElements("SELECT","hidden",b);hs.hideIframes&&this.showHideElements("IFRAME","hidden",b)};hs.addEventListener(document,"mousedown",hs.mouseClickHandler);hs.addEventListener(document,"mouseup",hs.mouseClickHandler);hs.addEventListener(window,"load",hs.preloadImages);
