var hs={graphicsDir:"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:true,creditsText:"",creditsHref:"",creditsTitle:"",anchor:"auto",align:"auto",captionId:null,slideshowGroup:"",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","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(id){
return document.getElementById(id);
},push:function(_2,_3){
_2[_2.length]=_3;
},createElement:function(_4,_5,_6,_7){
var el=document.createElement(_4);
if(_5){
hs.setAttribs(el,_5);
}
if(_6){
hs.setStyles(el,_6);
}
if(_7){
_7.appendChild(el);
}
return el;
},setAttribs:function(el,_a){
for(var x in _a){
el[x]=_a[x];
}
},setStyles:function(el,_d){
for(var x in _d){
try{
el.style[x]=_d[x];
}
catch(e){
}
}
},ieVersion:function(){
arr=navigator.appVersion.split("MSIE");
return parseFloat(arr[1]);
},clientInfo:function(){
var _f=(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;
this.width=hs.ie?_f.clientWidth:self.innerWidth;
this.height=hs.ie?_f.clientHeight:self.innerHeight;
this.scrollLeft=hs.ie?_f.scrollLeft:pageXOffset;
this.scrollTop=hs.ie?_f.scrollTop:pageYOffset;
},position:function(el){
var _11=el;
var p=Array();
p.x=_11.offsetLeft;
p.y=_11.offsetTop;
while(_11.offsetParent){
_11=_11.offsetParent;
p.x+=_11.offsetLeft;
p.y+=_11.offsetTop;
}
return p;
},expand:function(a,_14,_15){
try{
new HsExpander(a,_14,_15);
return false;
}
catch(e){
return true;
}
},focusTopmost:function(){
var _16=0;
var _17=-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>_16){
_16=hs.expanders[i].wrapper.style.zIndex;
_17=i;
}
}
}
if(_17==-1){
hs.focusKey=-1;
}else{
hs.expanders[_17].focus();
}
},closeId:function(_18){
for(i=0;i<hs.expanders.length;i++){
if(hs.expanders[i]&&(hs.expanders[i].thumb.id==_18||hs.expanders[i].a.id==_18)){
hs.expanders[i].doClose();
return;
}
}
},close:function(el){
var key=hs.getWrapperKey(el);
if(hs.expanders[key]){
hs.expanders[key].doClose();
}
return false;
},toggleImages:function(_1b,_1c){
if(_1b){
hs.closeId(_1b);
}
if(hs.ie){
_1c.href=_1c.href.replace("about:(blank)?","");
}
hs.toggleImagesExpandEl=_1c;
return false;
},getAdjacentAnchor:function(key,op){
var aAr=document.getElementsByTagName("A");
var _20=new Array;
var j=0;
for(i=0;i<aAr.length;i++){
if(hs.isHsAnchor(aAr[i])){
_20[j]=aAr[i];
j++;
}
}
var _22=-1;
for(i=0;i<_20.length;i++){
if(hs.expanders[key]&&_20[i]==hs.expanders[key].a){
_22=i;
break;
}
}
return _20[_22+op];
},getSrc:function(a){
return a.rel.replace(/_slash_/g,"/")||a.href;
},previousOrNext:function(el,op){
if(typeof el=="object"){
var _26=hs.getWrapperKey(el);
}else{
if(typeof el=="number"){
var _26=el;
}
}
if(hs.expanders[_26]){
hs.toggleImagesExpandEl=hs.getAdjacentAnchor(_26,op);
hs.toggleImagesGroup=hs.expanders[_26].slideshowGroup;
hs.expanders[_26].doClose();
}
return false;
},previous:function(el){
return hs.previousOrNext(el,-1);
},next:function(el){
return hs.previousOrNext(el,1);
},keyHandler:function(e){
if(!e){
e=window.event;
}
if(!e.target){
e.target=e.srcElement;
}
if(e.target.form){
return;
}
var op=null;
switch(e.keyCode){
case 34:
case 39:
case 40:
op=1;
break;
case 33:
case 37:
case 38:
op=-1;
break;
case 27:
case 13:
if(hs.expanders[hs.focusKey]){
hs.expanders[hs.focusKey].doClose();
}
return false;
}
if(op!=null){
hs.removeEventListener(document,"keydown",hs.keyHandler);
if(hs.expanders[hs.focusKey]&&!hs.expanders[hs.focusKey].enableKeyListener){
return true;
}
return hs.previousOrNext(hs.focusKey,op);
}else{
return true;
}
},registerOverlay:function(_2b){
hs.push(hs.overlays,_2b);
},getWrapperKey:function(el){
var key=-1;
while(el.parentNode){
el=el.parentNode;
if(el.id&&el.id.match(/^highslide-wrapper-[0-9]+$/)){
key=el.id.replace(/^highslide-wrapper-([0-9]+)$/,"$1");
break;
}
}
return key;
},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(e){
if(!e){
e=window.event;
}
if(e.button>1){
return true;
}
if(!e.target){
e.target=e.srcElement;
}
var _2f=e.target;
while(_2f.parentNode&&!(_2f.className&&_2f.className.match(/highslide-(image|move|html)/))){
_2f=_2f.parentNode;
}
if(!_2f.parentNode){
return;
}
hs.dragKey=hs.getWrapperKey(_2f);
if(_2f.className.match(/highslide-(image|move)/)){
var _30=true;
var _31=parseInt(hs.expanders[hs.dragKey].wrapper.style.left);
var _32=parseInt(hs.expanders[hs.dragKey].wrapper.style.top);
}
if(e.type=="mousedown"){
if(_30){
hs.dragObj=hs.expanders[hs.dragKey].content;
if(_2f.className.match("highslide-image")){
hs.dragObj.style.cursor="move";
}
hs.leftBeforeDrag=_31;
hs.topBeforeDrag=_32;
hs.dragX=e.clientX;
hs.dragY=e.clientY;
hs.addEventListener(document,"mousemove",hs.mouseMoveHandler);
if(e.preventDefault){
e.preventDefault();
}
if(hs.dragObj.className.match(/highslide-(image|html)-blur/)){
hs.expanders[hs.dragKey].focus();
hs.hasFocused=true;
}
return false;
}else{
if(_2f.className.match(/highslide-html/)){
hs.expanders[hs.dragKey].focus();
hs.expanders[hs.dragKey].redoShowHide();
hs.hasFocused=false;
}
}
}else{
if(e.type=="mouseup"){
hs.removeEventListener(document,"mousemove",hs.mouseMoveHandler);
if(_30&&hs.expanders[hs.dragKey]){
if(_2f.className.match("highslide-image")){
_2f.style.cursor=hs.styleRestoreCursor;
}
var _33=_31!=hs.leftBeforeDrag||_32!=hs.topBeforeDrag;
if(!_33&&!hs.hasFocused&&!_2f.className.match(/highslide-move/)){
hs.expanders[hs.dragKey].doClose();
}else{
if(_33||(!_33&&hs.hasHtmlExpanders)){
hs.expanders[hs.dragKey].redoShowHide();
}
}
hs.hasFocused=false;
}else{
if(_2f.className.match("highslide-image-blur")){
_2f.style.cursor=hs.styleRestoreCursor;
}
}
}
}
},mouseMoveHandler:function(e){
if(!hs.expanders[hs.dragKey]||!hs.expanders[hs.dragKey].wrapper){
return;
}
if(!e){
e=window.event;
}
var w=hs.expanders[hs.dragKey].wrapper;
w.style.left=hs.leftBeforeDrag+e.clientX-hs.dragX+"px";
w.style.top=hs.topBeforeDrag+e.clientY-hs.dragY+"px";
var o=hs.expanders[hs.dragKey].objOutline;
o.outer.style.left=(parseInt(w.style.left)-o.offset)+"px";
o.outer.style.top=(parseInt(w.style.top)-o.offset)+"px";
return false;
},addEventListener:function(el,_38,_39){
if(document.addEventListener){
el.addEventListener(_38,_39,false);
}else{
if(document.attachEvent){
el.attachEvent("on"+_38,_39);
}else{
el[_38]=_39;
}
}
},removeEventListener:function(el,_3b,_3c){
if(document.removeEventListener){
el.removeEventListener(_3b,_3c,false);
}else{
if(document.detachEvent){
el.detachEvent("on"+_3b,_3c);
}else{
el[_3b]=null;
}
}
},isHsAnchor:function(a){
return (a.className&&(a.className.match("highslide$")||a.className.match("highslide ")));
},preloadFullImage:function(i){
if(hs.continuePreloading&&hs.preloadTheseImages[i]&&hs.preloadTheseImages[i]!="undefined"){
var img=document.createElement("img");
img.onload=function(){
hs.preloadFullImage(i+1);
};
img.src=hs.preloadTheseImages[i];
}
},preloadImages:function(_40){
if(_40){
this.numberOfImagesToPreload=_40;
}
var j=0;
var _42=document.getElementsByTagName("A");
for(i=0;i<_42.length;i++){
a=_42[i];
if(hs.isHsAnchor(a)){
if(j<this.numberOfImagesToPreload){
hs.preloadTheseImages[j]=hs.getSrc(a);
j++;
}
}
}
new HsOutline(hs.outlineType,function(){
hs.preloadFullImage(0);
});
var cur=document.createElement("img");
cur.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(_44,_45){
if(!_44){
return;
}
if(_45){
this.onLoad=_45;
}
this.outlineType=_44;
this.outline=new Array();
var v=hs.ieVersion();
hs.genContainer();
this.hasAlphaImageLoader=hs.ie&&v>=5.5&&v<8;
this.hasPngSupport=!hs.ie||(hs.ie&&v>=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(i){
if(this.outline[i]&&this.outline[i].onload){
this.outline[i].onload=null;
return;
}
this.offset=this.hasOutline?10:0;
if(i==1||i==4||i==6){
this.tr=hs.createElement("tr",null,null,this.tbody);
}
if(i==5){
this.inner=hs.createElement("td",null,{padding:0,margin:0,border:0,position:"relative"},this.tr);
}
var _48=Array(0,8,1,2,7,3,6,5,4);
var src=hs.graphicsDir+"outlines/"+this.outlineType+"/"+_48[i]+".png";
if(this.hasAlphaImageLoader){
var _4a="filter";
var _4b="progid:DXImageTransform.Microsoft.AlphaImageLoader("+"enabled=true, sizingMethod=scale src='"+src+"') ";
}else{
if(this.hasPngSupport||this.hasIe7Bug){
var _4a="background";
var _4b="url("+src+")";
}
}
var _4c={lineHeight:0,fontSize:0,padding:0,margin:0,border:0};
if(this.hasOutline){
_4c[_4a]=_4b;
}
var td=hs.createElement("td",null,_4c);
var img=hs.createElement("img",null,{visibility:"hidden",display:"block"},td);
var dim=2*this.offset;
hs.setStyles(td,{height:dim+"px",width:dim+"px"});
var _50=this;
if(i<8){
img.onload=function(){
_50.preloadOutlineElement(i+1);
};
}else{
img.onload=function(){
hs.pendingOutlines[_50.outlineType]=_50;
if(_50.onLoad){
_50.onLoad();
}
};
}
this.tr.appendChild(td);
if(this.hasOutline){
img.src=src;
}else{
img.onload();
}
};
HsOutline.prototype.destroy=function(){
this.outer.parentNode.removeChild(this.outer);
};
HsExpander=function(a,_52,_53){
hs.continuePreloading=false;
for(i=0;i<hs.overrides.length;i++){
var _54=hs.overrides[i];
if(_52&&typeof _52[_54]!="undefined"){
this[_54]=_52[_54];
}else{
this[_54]=hs[_54];
}
}
if(_52&&_52.thumbnailId){
var el=hs.$(_52.thumbnailId);
}else{
for(i=0;i<a.childNodes.length;i++){
if(a.childNodes[i].tagName&&a.childNodes[i].tagName=="IMG"){
var el=a.childNodes[i];
break;
}
}
}
if(!el){
el=a;
}
for(i=0;i<hs.expanders.length;i++){
if(hs.expanders[i]&&hs.expanders[i].thumb!=el&&!hs.expanders[i].onLoadStarted){
hs.expanders[i].cancelLoading();
}
}
for(i=0;i<hs.expanders.length;i++){
if(hs.expanders[i]&&hs.expanders[i].thumb==el){
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(_53=="html"){
this.isHtml=true;
this.contentType="html";
}else{
this.isImage=true;
this.contentType="image";
}
this.a=a;
if(hs.toggleImagesGroup!=null&&hs.toggleImagesGroup!=this.slideshowGroup){
hs.toggleImagesGroup=null;
hs.expanders[this.key]=null;
return;
}
this.thumbsUserSetId=el.id||a.id;
this.thumb=el;
this.overlays=new Array();
var pos=hs.position(el);
this.wrapper=hs.createElement("div",{id:"highslide-wrapper-"+this.key,className:this.wrapperClassName},{visibility:"hidden",position:"absolute",zIndex:hs.zIndexCounter++});
this.thumbWidth=el.width?el.width:el.offsetWidth;
this.thumbHeight=el.height?el.height:el.offsetHeight;
this.thumbLeft=pos.x;
this.thumbTop=pos.y;
this.thumbClass=el.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 _57=this;
new HsOutline(this.outlineType,function(){
_57.connectOutline();
_57[_57.contentType+"Create"]();
});
}
}
};
HsExpander.prototype.connectOutline=function(x,y){
var w=hs.pendingOutlines[this.outlineType];
this.objOutline=w;
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 img=document.createElement("img");
var key=this.key;
var img=document.createElement("img");
this.content=img;
img.onload=function(){
if(hs.expanders[key]){
hs.expanders[key].onLoad();
}
};
img.className="highslide-image "+this.thumbClass;
img.style.visibility="hidden";
img.style.display="block";
img.style.position="absolute";
img.style.zIndex=3;
img.title=hs.restoreTitle;
img.onmouseover=function(){
if(hs.expanders[key]){
hs.expanders[key].onMouseOver();
}
};
img.onmouseout=function(e){
var rel=e?e.relatedTarget:event.toElement;
if(hs.expanders[key]){
hs.expanders[key].onMouseOut(rel);
}
};
if(hs.safari){
hs.container.appendChild(img);
}
img.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 _5f=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);
_5f+=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;
}
}
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 _60=hs.marginRight+2*this.offsetBorderW;
_5f+=2*this.offsetBorderH;
var _61=this.newWidth/this.newHeight;
var _62=this.allowSizeReduction?this.minWidth:this.newWidth;
var _63=this.allowSizeReduction?this.minHeight:this.newHeight;
var _64={x:"auto",y:"auto"};
if(this.align=="center"){
_64.x="center";
_64.y="center";
}else{
if(this.anchor.match(/^top/)){
_64.y=null;
}
if(this.anchor.match(/right$/)){
_64.x="max";
}
if(this.anchor.match(/^bottom/)){
_64.y="max";
}
if(this.anchor.match(/left$/)){
_64.x=null;
}
}
client=new hs.clientInfo();
this.x={min:parseInt(this.thumbLeft)-this.offsetBorderW+this.thumbOffsetBorderW,span:this.newWidth,minSpan:this.newWidth<_62?this.newWidth:_62,justify:_64.x,marginMin:hs.marginLeft,marginMax:_60,scroll:client.scrollLeft,clientSpan:client.width,thumbSpan:this.thumbWidth};
var _65=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<_63?this.newHeight:_63,justify:_64.y,marginMin:hs.marginTop,marginMax:_5f,scroll:client.scrollTop,clientSpan:client.height,thumbSpan:this.thumbHeight};
var _66=this.y.min+parseInt(this.thumbHeight);
this.y=this.justify(this.y);
if(this.isHtml){
this.htmlSizeOperations();
}
if(this.isImage){
this.correctRatio(_61);
}
var x=this.x;
var y=this.y;
var _69={x:x.min-20,y:y.min-20,w:x.span+40,h:y.span+40+this.spaceForCaption};
hs.hideSelects=(hs.ie&&hs.ieVersion()<7);
if(hs.hideSelects){
this.showHideElements("SELECT","hidden",_69);
}
hs.hideIframes=(window.opera||navigator.vendor=="KDE"||(hs.ie&&hs.ieVersion()<5.5));
if(hs.hideIframes){
this.showHideElements("IFRAME","hidden",_69);
}
if(this.objOutline&&!this.outlineWhileAnimating){
this.positionOutline(x.min,y.min,x.span,y.span);
}
this.changeSize(1,this.thumbLeft+this.thumbOffsetBorderW-this.offsetBorderW,this.thumbTop+this.thumbOffsetBorderH-this.offsetBorderH,this.thumbWidth,this.thumbHeight,x.min,y.min,x.span,y.span,hs.expandDuration,hs.expandSteps,hs.outlineStartOffset,10);
}
catch(e){
if(hs.expanders[this.key]&&hs.expanders[this.key].a){
window.location.href=hs.getSrc(hs.expanders[this.key].a);
}
}
};
HsExpander.prototype.changeSize=function(dir,x1,y1,w1,h1,x2,y2,w2,h2,dur,_74,oo1,oo2){
dW=(w2-w1)/_74;
dH=(h2-h1)/_74;
dX=(x2-x1)/_74;
dY=(y2-y1)/_74;
dOo=(oo2-oo1)/_74;
for(i=1;i<=_74;i++){
w1+=dW;
h1+=dH;
x1+=dX;
y1+=dY;
oo1+=dOo;
var obj="hs.expanders["+this.key+"]";
var s="if ("+obj+") {";
if(i==1){
s+=obj+".content.style.visibility = 'visible';"+"if ("+obj+".thumb.tagName == 'IMG' && hs.hideThumbOnExpand) "+obj+".thumb.style.visibility = 'hidden';";
}
if(i==_74){
w1=w2;
h1=h2;
x1=x2;
y1=y2;
oo1=oo2;
}
s+=obj+"."+this.contentType+"SetSize("+Math.round(w1)+", "+Math.round(h1)+", "+Math.round(x1)+", "+Math.round(y1)+", "+Math.round(oo1);
if(i==_74){
s+=", "+dir;
}
s+=");}";
setTimeout(s,Math.round(i*(dur/_74)));
}
};
HsExpander.prototype.imageSetSize=function(w,h,x,y,_7d,end){
try{
this.content.width=w;
this.content.height=h;
if(this.objOutline&&this.outlineWhileAnimating){
var o=this.objOutline.offset-_7d;
this.positionOutline(x+o,y+o,w-2*o,h-2*o,1);
}
hs.setStyles(this.wrapper,{"visibility":"visible","left":x+"px","top":y+"px"});
if(end==1){
this.onExpanded();
}else{
if(end==-1){
this.onEndClose();
}
}
}
catch(e){
window.location.href=hs.getSrc(this.a);
}
};
HsExpander.prototype.positionOutline=function(x,y,w,h,vis){
if(!this.objOutline){
return;
}
var o=this.objOutline;
if(vis){
o.outer.style.visibility="visible";
}
o.outer.style.left=(x-o.offset)+"px";
o.outer.style.top=(y-o.offset)+"px";
if(window.opera){
o.outer.style.width=(w+2*(this.offsetBorderW+o.offset))+"px";
}
w+=2*(this.offsetBorderW-o.offset);
h+=+2*(this.offsetBorderH-o.offset);
o.inner.style.width=w>=0?w+"px":0;
o.inner.style.height=h>=0?h+"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 key=this.key;
var _87=this.outlineType;
new HsOutline(_87,function(){
if(hs.expanders[key]){
hs.expanders[key].preloadNext();
}
});
};
HsExpander.prototype.preloadNext=function(){
var _88=hs.getAdjacentAnchor(this.key,1);
if(_88){
var img=document.createElement("img");
img.src=hs.getSrc(_88);
}
};
HsExpander.prototype.justify=function(p){
if(p.justify=="auto"||p.justify=="center"){
var _8b=false;
var _8c=true;
if(p.justify=="center"){
p.min=Math.round(p.scroll+(p.clientSpan-p.span-p.marginMax)/2);
}else{
p.min=Math.round(p.min-((p.span-p.thumbSpan)/2));
}
if(p.min<p.scroll+p.marginMin){
p.min=p.scroll+p.marginMin;
_8b=true;
}
if(p.span<p.minSpan){
p.span=p.minSpan;
_8c=false;
}
if(p.min+p.span>p.scroll+p.clientSpan-p.marginMax){
if(_8b&&_8c){
p.span=p.clientSpan-p.marginMin-p.marginMax;
}else{
if(p.span<p.clientSpan-p.marginMin-p.marginMax){
p.min=p.scroll+p.clientSpan-p.span-p.marginMin-p.marginMax;
}else{
p.min=p.scroll+p.marginMin;
if(_8c){
p.span=p.clientSpan-p.marginMin-p.marginMax;
}
}
}
}
if(p.span<p.minSpan){
p.span=p.minSpan;
_8c=false;
}
}else{
if(p.justify=="max"){
p.min=Math.floor(p.min-p.span+p.thumbSpan);
}
}
if(p.min<p.marginMin){
tmpMin=p.min;
p.min=p.marginMin;
if(_8c){
p.span=p.span-(p.min-tmpMin);
}
}
return p;
};
HsExpander.prototype.correctRatio=function(_8d){
var x=this.x;
var y=this.y;
var _90=false;
if(x.span/y.span>_8d){
var _91=x.span;
x.span=y.span*_8d;
if(x.span<x.minSpan){
x.span=x.minSpan;
y.span=x.span/_8d;
}
_90=true;
}else{
if(x.span/y.span<_8d){
var _92=y.span;
y.span=x.span/_8d;
_90=true;
}
}
if(_90){
x.min=parseInt(this.thumbLeft)-this.offsetBorderW+this.thumbOffsetBorderW;
x.minSpan=x.span;
this.x=this.justify(x);
y.min=parseInt(this.thumbTop)-this.offsetBorderH+this.thumbOffsetBorderH;
y.minSpan=y.span;
this.y=this.justify(y);
}
};
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 _93=hs.createElement("a",{href:hs.creditsHref,className:"highslide-credits",innerHTML:hs.creditsText,title:hs.creditsTitle});
this.createOverlay(_93,"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 _94=this.caption.offsetHeight;
var _95=(_94<this.content.height)?_94:this.content.height;
this.caption.style.top="-"+_95+"px";
this.caption.style.zIndex=2;
var _96=1;
if(_95>400){
_96=4;
}else{
if(_95>200){
_96=2;
}else{
if(_95>100){
_96=1;
}
}
}
if(hs.captionSlideSpeed){
_96=_96*hs.captionSlideSpeed;
}else{
_96=_95;
}
var t=0;
for(var top=-_95;top<=0;top+=_96,t+=10){
var end=(top>=0)?1:0;
var _9a="if (hs.expanders["+this.key+"]) { "+"hs.expanders["+this.key+"].placeCaption("+top+", "+end+");"+"}";
setTimeout(_9a,t);
}
}
catch(e){
}
};
HsExpander.prototype.placeCaption=function(top,end){
if(!this.caption){
return;
}
this.caption.style.top=top+"px";
this.caption.style.visibility="visible";
if(this.objOutline){
this.objOutline.inner.style.height=(this.wrapper.offsetHeight+top-2*this.objOutline.offset)+"px";
}
if(end){
this.onDisplayFinished();
}
};
HsExpander.prototype.showHideElements=function(_9d,_9e,_9f){
var els=document.getElementsByTagName(_9d);
if(els){
for(i=0;i<els.length;i++){
if(els[i].nodeName==_9d){
var _a1=els[i].getAttribute("hidden-by");
if(_9e=="visible"&&_a1){
_a1=_a1.replace("["+this.key+"]","");
els[i].setAttribute("hidden-by",_a1);
if(!_a1){
els[i].style.visibility="visible";
}
}else{
if(_9e=="hidden"){
var _a2=hs.position(els[i]);
_a2.w=els[i].offsetWidth;
_a2.h=els[i].offsetHeight;
var _a3=(_a2.x+_a2.w<_9f.x||_a2.x>_9f.x+_9f.w);
var _a4=(_a2.y+_a2.h<_9f.y||_a2.y>_9f.y+_9f.h);
var _a5=hs.getWrapperKey(els[i]);
if(!_a3&&!_a4&&_a5!=this.key){
if(!_a1){
els[i].setAttribute("hidden-by","["+this.key+"]");
}else{
if(!_a1.match("["+this.key+"]")){
els[i].setAttribute("hidden-by",_a1+"["+this.key+"]");
}
}
els[i].style.visibility="hidden";
}else{
if(_a1=="["+this.key+"]"||hs.focusKey==_a5){
els[i].setAttribute("hidden-by","");
els[i].style.visibility="visible";
}else{
if(_a1&&_a1.match("["+this.key+"]")){
els[i].setAttribute("hidden-by",_a1.replace("["+this.key+"]",""));
}
}
}
}
}
}
}
}
};
HsExpander.prototype.focus=function(){
for(i=0;i<hs.expanders.length;i++){
if(hs.expanders[i]&&i==hs.focusKey){
var _a6=hs.expanders[i];
_a6.content.className+=" highslide-"+_a6.contentType+"-blur";
if(_a6.caption){
_a6.caption.className+=" highslide-caption-blur";
}
if(_a6.isImage){
_a6.content.style.cursor=hs.ie?"hand":"pointer";
_a6.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 x=parseInt(this.wrapper.style.left);
var y=parseInt(this.wrapper.style.top);
var w=(this.isImage)?this.content.width:parseInt(this.content.style.width);
var h=(this.isImage)?this.content.height:parseInt(this.content.style.height);
if(this.objOutline&&this.outlineWhileAnimating){
this.positionOutline(x,y,w,h);
}else{
if(this.objOutline){
this.objOutline.destroy();
}
}
var n=this.wrapper.childNodes.length;
for(i=n-1;i>=0;i--){
var _ac=this.wrapper.childNodes[i];
if(_ac!=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,x,y,w,h,this.thumbLeft-this.offsetBorderW+this.thumbOffsetBorderW,this.thumbTop-this.offsetBorderH+this.thumbOffsetBorderH,this.thumbWidth,this.thumbHeight,hs.restoreDuration,hs.restoreSteps,10,hs.outlineStartOffset);
}
catch(e){
hs.expanders[this.key].onEndClose();
}
};
HsExpander.prototype.onEndClose=function(){
this.thumb.style.visibility="visible";
if(hs.hideSelects){
this.showHideElements("SELECT","visible");
}
if(hs.hideIframes){
this.showHideElements("IFRAME","visible");
}
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(el,_ae,_af,_b0){
if(typeof el=="string"&&hs.$(el)){
el=hs.$(el).cloneNode(true);
el.id=null;
}
if(!el||typeof el=="string"||!this.isImage){
return;
}
if(!_ae){
var _ae="center center";
}
var _b1=hs.createElement("div",null,{"position":"absolute","zIndex":3},this.wrapper);
if(_b0&&_b0<1){
if(hs.ie){
_b1.style.filter="alpha(opacity="+(_b0*100)+")";
}else{
_b1.style.opacity=_b0;
}
}
el.className+=" highslide-display-block";
_b1.appendChild(el);
var _b2=this.offsetBorderW;
var _b3=this.content.width-_b1.offsetWidth;
var top=this.offsetBorderH;
var _b5=this.content.height-_b1.offsetHeight;
if(_ae.match(/^bottom/)){
top+=_b5;
}
if(_ae.match(/^center/)){
top+=_b5/2;
}
if(_ae.match(/right$/)){
_b2+=_b3;
}
if(_ae.match(/center$/)){
_b2+=_b3/2;
}
_b1.style.left=_b2+"px";
_b1.style.top=top+"px";
if(_af){
_b1.setAttribute("hideOnMouseOut",true);
}
hs.push(this.overlays,_b1);
};
HsExpander.prototype.createCustomOverlays=function(){
for(i=0;i<hs.overlays.length;i++){
var o=hs.overlays[i];
if(o.thumbnailId==null||o.thumbnailId==this.thumbsUserSetId){
this.createOverlay(o.overlayId,o.position,o.hideOnMouseOut,o.opacity);
}
}
};
HsExpander.prototype.onMouseOver=function(){
for(i=0;i<this.overlays.length;i++){
this.overlays[i].style.visibility="visible";
}
};
HsExpander.prototype.onMouseOut=function(rel){
var _b8=new Array();
var j=0;
for(i=0;i<this.overlays.length;i++){
var _ba=rel;
while(_ba&&_ba.parentNode){
if(_ba==this.overlays[i]){
return;
}
_ba=_ba.parentNode;
}
if(this.overlays[i].getAttribute("hideOnMouseOut")){
_b8[j]=this.overlays[i];
j++;
}
}
for(i=0;i<_b8.length;i++){
_b8[i].style.visibility="hidden";
}
};
HsExpander.prototype.createFullExpand=function(){
var a=hs.createElement("a",{href:"javascript:hs.expanders["+this.key+"].doFullExpand();",title:hs.fullExpandTitle},{background:"url("+hs.graphicsDir+hs.fullExpandIcon+")",display:"block",margin:"0 10px 10px 0",width:"45px",height:"44px"});
this.createOverlay(a,"bottom right",true,0.75);
this.fullExpandIcon=a;
};
HsExpander.prototype.doFullExpand=function(){
try{
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 _bc=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+_bc)+"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(e){
window.location.href=hs.expanders[this.key].content.src;
}
};
HsExpander.prototype.redoShowHide=function(){
var _bd={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",_bd);
}
if(hs.hideIframes){
this.showHideElements("IFRAME","hidden",_bd);
}
};
hs.addEventListener(document,"mousedown",hs.mouseClickHandler);
hs.addEventListener(document,"mouseup",hs.mouseClickHandler);


