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