var hs={graphicsDir:"",restoreCursor:"zoomout.cur",fullExpandIcon:"fullexpand.gif",expandSteps:10,expandDuration:250,restoreSteps:10,restoreDuration:250,captionSlideSpeed:1,numberOfImagesToPreload:5,marginLeft:10,marginRight:35,marginTop:10,marginBottom:35,zIndexCounter:1001,slideInOutline:true,fullExpandTitle:"",restoreTitle:"",focusTitle:"",loadingText:"Loading...",loadingTitle:"",loadingOpacity:0.75,showCredits:true,creditsText:"",creditsHref:"",creditsTitle:"",anchor:"auto",align:"auto",captionId:null,slideshowGroup:"",enableKeyListener:true,spaceForCaption:30,minWidth:500,minHeight:375,allowSizeReduction:true,outlineType:"drop-shadow",wrapperClassName:null,preloadTheseImages:new Array(),continuePreloading:true,expandedImagesCounter:0,expanders:new Array(),overrides:new Array("anchor","align","outlineType","spaceForCaption","wrapperClassName","minWidth","minHeight","captionId","allowSizeReduction","slideshowGroup","enableKeyListener"),overlays:new Array(),toggleImagesGroup:null,ie:(document.all&&!window.opera),nn6:document.getElementById&&!document.all,safari:navigator.userAgent.indexOf("Safari")!=-1,hasFocused:false,isDrag:false,$:function(id){
return document.getElementById(id);
},createElement:function(_2,_3,_4,_5){
var el=document.createElement(_2);
if(_3){
hs.setAttribs(el,_3);
}
if(_4){
hs.setStyles(el,_4);
}
if(_5){
_5.appendChild(el);
}
return el;
},setAttribs:function(el,_8){
for(var x in _8){
el[x]=_8[x];
}
},setStyles:function(el,_b){
for(var x in _b){
el.style[x]=_b[x];
}
},ieVersion:function(){
arr=navigator.appVersion.split("MSIE");
return parseFloat(arr[1]);
},clientInfo:function(){
var _d=(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;
this.width=hs.ie?_d.clientWidth:self.innerWidth;
this.height=hs.ie?_d.clientHeight:self.innerHeight;
this.scrollLeft=hs.ie?_d.scrollLeft:pageXOffset;
this.scrollTop=hs.ie?_d.scrollTop:pageYOffset;
},position:function(el){
var _f=el;
var p=Array();
p.x=_f.offsetLeft;
p.y=_f.offsetTop;
while(_f.offsetParent){
_f=_f.offsetParent;
p.x+=_f.offsetLeft;
p.y+=_f.offsetTop;
}
return p;
},expand:function(a,_12,_13){
try{
new HsExpander(a,_12,_13);
return false;
}
catch(e){
return true;
}
},focusTopmost:function(){
var _14=0;
var _15=-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>_14){
_14=hs.expanders[i].wrapper.style.zIndex;
_15=i;
}
}
}
if(_15==-1){
hs.focusKey=-1;
}else{
hs.expanders[_15].focus();
}
},closeId:function(_16){
for(i=0;i<hs.expanders.length;i++){
if(hs.expanders[i]&&(hs.expanders[i].thumb.id==_16||hs.expanders[i].a.id==_16)){
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(_19,_1a){
if(_19){
hs.closeId(_19);
}
if(hs.ie){
_1a.href=_1a.href.replace("about:(blank)?","");
}
hs.toggleImagesExpandEl=_1a;
return false;
},getAdjacentAnchor:function(key,op){
var aAr=document.getElementsByTagName("A");
var _1e=new Array;
for(i=0;i<aAr.length;i++){
if(hs.isHsAnchor(aAr[i])){
_1e.push(aAr[i]);
}
}
var _1f=-1;
for(i=0;i<_1e.length;i++){
if(hs.expanders[key]&&_1e[i]==hs.expanders[key].a){
_1f=i;
break;
}
}
return _1e[_1f+op];
},getSrc:function(a){
return a.rel.replace(/_slash_/g,"/")||a.href;
},previousOrNext:function(el,op){
if(typeof el=="object"){
var _23=hs.getWrapperKey(el);
}else{
if(typeof el=="number"){
var _23=el;
}
}
if(hs.expanders[_23]){
hs.toggleImagesExpandEl=hs.getAdjacentAnchor(_23,op);
hs.toggleImagesGroup=hs.expanders[_23].slideshowGroup;
hs.expanders[_23].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==false){
return true;
}
return hs.previousOrNext(hs.focusKey,op);
}else{
return true;
}
},registerOverlay:function(_28){
hs.overlays.push(_28);
},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();
}
}
}
},mouseDownHandler:function(e){
if(!e){
e=window.event;
}
if(e.button>1){
return true;
}
if(!e.target){
e.target=e.srcElement;
}
var _2c=e.target;
while(!_2c.tagName.match(/(HTML|BODY)/)&&!_2c.className.match(/highslide-(image|move|html)/)){
_2c=hs.nn6?_2c.parentNode:_2c.parentElement;
}
if(_2c.tagName.match(/(HTML|BODY)/)){
return;
}
hs.dragKey=hs.getWrapperKey(_2c);
if(_2c.className.match(/highslide-(image|move)/)){
hs.isDrag=true;
hs.dragObj=hs.expanders[hs.dragKey].content;
if(_2c.className.match("highslide-image")){
hs.dragObj.style.cursor="move";
}
tx=parseInt(hs.expanders[hs.dragKey].wrapper.style.left);
ty=parseInt(hs.expanders[hs.dragKey].wrapper.style.top);
hs.leftBeforeDrag=tx;
hs.topBeforeDrag=ty;
hs.dragX=hs.nn6?e.clientX:event.clientX;
hs.dragY=hs.nn6?e.clientY:event.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(_2c.className.match(/highslide-html/)){
hs.expanders[hs.dragKey].focus();
hs.expanders[hs.dragKey].redoShowHide();
hs.hasFocused=false;
}
}
},mouseMoveHandler:function(e){
if(hs.isDrag){
if(!hs.expanders[hs.dragKey]||!hs.expanders[hs.dragKey].wrapper){
return;
}
var _2e=hs.expanders[hs.dragKey].wrapper;
var _2f=hs.nn6?tx+e.clientX-hs.dragX:tx+event.clientX-hs.dragX;
_2e.style.left=_2f+"px";
var top=hs.nn6?ty+e.clientY-hs.dragY:ty+event.clientY-hs.dragY;
_2e.style.top=top+"px";
return false;
}
},mouseUpHandler:function(e){
if(!e){
e=window.event;
}
if(e.button>1){
return true;
}
if(!e.target){
e.target=e.srcElement;
}
hs.isDrag=false;
var _32=e.target;
while(!_32.tagName.match(/(HTML|BODY)/)&&!_32.className.match(/highslide-(image|move)/)){
_32=_32.parentNode;
}
if(_32.className.match(/highslide-(image|move)/)&&hs.expanders[hs.dragKey]){
if(_32.className.match("highslide-image")){
_32.style.cursor=hs.styleRestoreCursor;
hs.removeEventListener(document,"mousemove",hs.mouseMoveHandler);
}
var _33=parseInt(hs.expanders[hs.dragKey].wrapper.style.left);
var top=parseInt(hs.expanders[hs.dragKey].wrapper.style.top);
var _35=_33!=hs.leftBeforeDrag||top!=hs.topBeforeDrag;
if(!_35&&!hs.hasFocused){
hs.expanders[hs.dragKey].doClose();
}else{
if(_35||(!_35&&hs.hasHtmlExpanders)){
hs.expanders[hs.dragKey].redoShowHide();
}
}
hs.hasFocused=false;
}else{
if(_32.className.match("highslide-image-blur")){
_32.style.cursor=hs.styleRestoreCursor;
}
}
},addEventListener:function(el,_37,_38){
if(document.addEventListener){
el.addEventListener(_37,_38,false);
}else{
if(document.attachEvent){
el.attachEvent("on"+_37,_38);
}else{
el["on"+_37]=_38;
}
}
},removeEventListener:function(el,_3a,_3b){
if(document.removeEventListener){
el.removeEventListener(_3a,_3b,false);
}else{
if(document.detachEvent){
el.detachEvent("on"+_3a,_3b);
}else{
el["on"+_3a]=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(_3f){
if(_3f){
this.numberOfImagesToPreload=_3f;
}
var j=0;
var _41=document.getElementsByTagName("A");
for(i=0;i<_41.length;i++){
a=_41[i];
if(hs.isHsAnchor(a)){
if(j<this.numberOfImagesToPreload){
hs.preloadTheseImages[j]=hs.getSrc(a);
j++;
}
}
}
hs.preloadFullImage(0);
var cur=document.createElement("img");
cur.src=hs.graphicsDir+hs.restoreCursor;
if(hs.outlineType){
for(i=1;i<=8;i++){
var img=document.createElement("img");
img.src=hs.graphicsDir+"outlines/"+hs.outlineType+"/"+i+".png";
}
}
}};
HsExpander=function(a,_45,_46){
try{
hs.continuePreloading=false;
hs.container=hs.$("highslide-container");
if(_45&&_45.thumbnailId){
var el=hs.$(_45.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;
}
}
this.key=hs.expandedImagesCounter++;
hs.expanders[this.key]=this;
if(_46=="html"){
this.isHtml=true;
this.contentType="html";
}else{
this.isImage=true;
this.contentType="image";
}
this.a=a;
for(i=0;i<hs.overrides.length;i++){
var _48=hs.overrides[i];
if(_45&&_45[_48]!=undefined){
this[_48]=_45[_48];
}else{
this[_48]=hs[_48];
}
}
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(this.isImage){
this.imageCreate();
}
return false;
}
catch(e){
return true;
}
};
HsExpander.prototype.displayLoading=function(){
if(this.onLoadStarted){
return;
}
this.originalCursor=this.a.style.cursor;
this.a.style.cursor="wait";
this.loading=hs.createElement("a",{className:"highslide-loading",title:hs.loadingTitle,href:"javascript:hs.expanders["+this.key+"].cancelLoading()",innerHTML:hs.loadingText},{position:"absolute",visibility:"hidden"},hs.container);
if(hs.ie){
this.loading.style.filter="alpha(opacity="+(100*hs.loadingOpacity)+")";
}else{
this.loading.style.opacity=hs.loadingOpacity;
}
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){
hs.container.removeChild(this.loading);
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 _4e=hs.marginBottom;
if(this.captionId&&hs.$(this.captionId)){
this.caption=hs.$(this.captionId).cloneNode(true);
}else{
if(this.thumbsUserSetId&&hs.$("caption-for-"+this.thumbsUserSetId)){
this.caption=hs.$("caption-for-"+this.thumbsUserSetId).cloneNode(true);
}
}
if(this.caption){
_4e+=this.spaceForCaption;
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);
if(this.swfObject){
this.swfObject.write(this.flashContainerId);
}
this.offsetBorderW=(this.wrapper.offsetWidth-this.thumbWidth)/2;
this.offsetBorderH=(this.wrapper.offsetHeight-this.thumbHeight)/2;
var _4f=hs.marginRight+2*this.offsetBorderW;
_4e+=2*this.offsetBorderH;
var _50=this.newWidth/this.newHeight;
var _51=this.allowSizeReduction?this.minWidth:this.newWidth;
var _52=this.allowSizeReduction?this.minHeight:this.newHeight;
var _53={x:"auto",y:"auto"};
if(this.align=="center"){
_53.x="center";
_53.y="center";
}else{
if(this.anchor.match(/^top/)){
_53.y=null;
}
if(this.anchor.match(/right$/)){
_53.x="max";
}
if(this.anchor.match(/^bottom/)){
_53.y="max";
}
if(this.anchor.match(/left$/)){
_53.x=null;
}
}
client=new hs.clientInfo();
this.x={min:parseInt(this.thumbLeft)-this.offsetBorderW+this.thumbOffsetBorderW,span:this.newWidth,minSpan:this.newWidth<_51?this.newWidth:_51,justify:_53.x,marginMin:hs.marginLeft,marginMax:_4f,scroll:client.scrollLeft,clientSpan:client.width,thumbSpan:this.thumbWidth};
var _54=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<_52?this.newHeight:_52,justify:_53.y,marginMin:hs.marginTop,marginMax:_4e,scroll:client.scrollTop,clientSpan:client.height,thumbSpan:this.thumbHeight};
var _55=this.y.min+parseInt(this.thumbHeight);
this.y=this.justify(this.y);
if(this.isHtml){
this.htmlSizeOperations();
}
if(this.isImage){
this.correctRatio(_50);
}
var x=this.x;
var y=this.y;
var _58={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",_58);
}
hs.hideIframes=(window.opera||navigator.vendor=="KDE"||(hs.ie&&hs.ieVersion()<5.5));
if(hs.hideIframes){
this.showHideElements("IFRAME","hidden",_58);
}
this.changeSize(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);
setTimeout("if (hs.expanders["+this.key+"])"+"hs.expanders["+this.key+"].onExpanded()",hs.expandDuration);
}
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(x1,y1,w1,h1,x2,y2,w2,h2,dur,_62){
dW=(w2-w1)/_62;
dH=(h2-h1)/_62;
dX=(x2-x1)/_62;
dY=(y2-y1)/_62;
for(i=1;i<hs.expandSteps;i++){
w1+=dW;
h1+=dH;
x1+=dX;
y1+=dY;
setTimeout("if (hs.expanders["+this.key+"]) "+"hs.expanders["+this.key+"]."+this.contentType+"SetSize("+w1+", "+h1+", "+x1+", "+y1+")",Math.round(i*(dur/_62)));
}
};
HsExpander.prototype.imageSetSize=function(_63,_64,_65,top){
try{
this.content.width=_63;
this.content.height=_64;
hs.setStyles(this.wrapper,{"visibility":"visible","left":_65+"px","top":top+"px"});
this.content.style.visibility="visible";
if(this.thumb.tagName=="IMG"){
this.thumb.style.visibility="hidden";
}
}
catch(e){
window.location.href=hs.getSrc(hs.expanders[this.key].a);
}
};
HsExpander.prototype.onExpanded=function(){
this[this.contentType+"SetSize"](this.x.span,this.y.span,this.x.min,this.y.min);
this.isExpanded=true;
this.focus();
this.createCustomOverlays();
if(hs.showCredits){
this.writeCredits();
}
if(this.caption){
this.writeCaption();
}
if(!this.caption||!hs.slideInOutline&&this.outlineType){
this.writeOutline();
}
if(this.fullExpandWidth>this.x.span){
this.createFullExpand();
}
if(!this.caption&&!this.outlineType){
this.onDisplayFinished();
}
};
HsExpander.prototype.onDisplayFinished=function(){
var _67=hs.getAdjacentAnchor(this.key,1);
if(_67){
var img=document.createElement("img");
img.src=hs.getSrc(_67);
}
};
HsExpander.prototype.justify=function(p){
if(p.justify=="auto"||p.justify=="center"){
var _6a=false;
var _6b=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;
_6a=true;
}
if(p.span<p.minSpan){
p.span=p.minSpan;
_6b=false;
}
if(p.min+p.span>p.scroll+p.clientSpan-p.marginMax){
if(_6a&&_6b){
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(_6b){
p.span=p.clientSpan-p.marginMin-p.marginMax;
}
}
}
}
if(p.span<p.minSpan){
p.span=p.minSpan;
_6b=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(_6b){
p.span=p.span-(p.min-tmpMin);
}
}
return p;
};
HsExpander.prototype.correctRatio=function(_6c){
var x=this.x;
var y=this.y;
var _6f=false;
if(x.span/y.span>_6c){
var _70=x.span;
x.span=y.span*_6c;
if(x.span<x.minSpan){
x.span=x.minSpan;
y.span=x.span/_6c;
}
_6f=true;
}else{
if(x.span/y.span<_6c){
var _71=y.span;
y.span=x.span/_6c;
_6f=true;
}
}
if(_6f){
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.container.removeChild(this.loading);
this.loading=null;
}
hs.expanders[this.key]=null;
};
HsExpander.prototype.writeCredits=function(){
var _72=hs.createElement("a",{href:hs.creditsHref,className:"highslide-credits",innerHTML:hs.creditsText,title:hs.creditsTitle});
this.createOverlay(_72,"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 _73=this.caption.offsetHeight;
var _74=(_73<this.content.height)?_73:this.content.height;
this.caption.style.marginTop="-"+_74+"px";
this.caption.style.zIndex=2;
var _75=1;
if(_74>400){
_75=4;
}else{
if(_74>200){
_75=2;
}else{
if(_74>100){
_75=1;
}
}
}
if(hs.captionSlideSpeed){
_75=_75*hs.captionSlideSpeed;
}else{
_75=_74;
}
setTimeout("if (hs.expanders["+this.key+"] && hs.expanders["+this.key+"].caption) "+"hs.expanders["+this.key+"].caption.style.visibility = 'visible'",10);
var t=0;
for(marginTop=-_74;marginTop<=0;marginTop+=_75,t+=10){
var _77="if (hs.expanders["+this.key+"] && hs.expanders["+this.key+"].caption) { "+"hs.expanders["+this.key+"].caption.style.marginTop = '"+marginTop+"px';";
if(hs.slideInOutline&&marginTop>=0){
_77+="hs.expanders["+this.key+"].writeOutline();";
}else{
if(!hs.slideInOutline){
_77+="hs.expanders["+this.key+"].repositionOutline(0);";
}
}
_77+="}";
setTimeout(_77,t);
}
}
catch(e){
}
};
HsExpander.prototype.writeOutline=function(){
if(!this.outlineType){
this.onDisplayFinished();
return;
}
this.outline=new Array();
var v=hs.ieVersion();
hs.hasAlphaImageLoader=hs.ie&&v>=5.5&&v<7;
hs.hasIe7Bug=hs.ie&&v==7;
hs.hasPngSupport=!hs.ie;
this.preloadOutlineElement(1);
};
HsExpander.prototype.preloadOutlineElement=function(i){
if(!hs.hasAlphaImageLoader&&!hs.hasPngSupport&&!hs.hasIe7Bug){
return;
}
if(this.outline[i]&&this.outline[i].onload){
this.outline[i].onload=null;
return;
}
var src=hs.graphicsDir+"outlines/"+this.outlineType+"/"+i+".png";
if(hs.hasAlphaImageLoader){
this.outline[i]=hs.createElement("div",null,{filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader("+"enabled=true, sizingMethod=scale src='"+src+"') "});
}else{
if(hs.hasIe7Bug){
this.outline[i]=hs.createElement("div",null,{background:"url("+src+")"});
}
}
var img=document.createElement("img");
if(hs.hasPngSupport){
this.outline[i]=img;
}
this.outline[i].style.position="absolute";
var dim=(i%2==1)?10:20;
this.outline[i].style.height=dim+"px";
this.outline[i].style.width=dim+"px";
if(hs.ie){
this.outline[i].style.lineHeight=dim+"px";
this.outline[i].style.fontSize=0;
}
if(hs.slideInOutline){
var _7d=this;
if(i<8){
img.onload=function(){
_7d.preloadOutlineElement(i+1);
};
}else{
img.onload=function(){
_7d.displayOutline();
};
}
}else{
this.wrapper.appendChild(this.outline[i]);
if(i<8){
this.preloadOutlineElement(i+1);
}else{
this.repositionOutline(0);
}
}
if(hs.safari){
this.outline[i].style.left="10px";
this.outline[i].style.top="10px";
hs.container.appendChild(img);
}
img.src=src;
};
HsExpander.prototype.displayOutline=function(){
this.repositionOutline(12);
for(i=1;i<=8;i++){
this.wrapper.appendChild(this.outline[i]);
}
this.hasOutline=true;
for(i=10,t=0;i>=0;i--,t+=50){
setTimeout("if (hs.expanders["+this.key+"]) hs.expanders["+this.key+"].repositionOutline("+i+")",t);
}
};
HsExpander.prototype.repositionOutline=function(_7e){
if(this.isClosing){
return;
}
var w=this.wrapper.offsetWidth;
var h=this.wrapper.offsetHeight;
var fix=Array(Array(Array(1,5),"width",w-(2*_7e)-20),Array(Array(1,5),"left",10+_7e),Array(Array(1,2,8),"top",-10+_7e),Array(Array(2,4),"left",w-10-_7e),Array(Array(3,3),"left",w-_7e),Array(Array(3,7),"top",10+_7e),Array(Array(3,7),"height",h-(2*_7e)-20),Array(Array(4,6),"top",h-10-_7e),Array(Array(5,5),"top",h-_7e),Array(Array(6,7,8),"left",-10+_7e));
if(navigator.vendor=="KDE"){
fix.push(Array(1,5),"height",(_7e%2)+10);
}
for(i=0;i<fix.length;i++){
for(j=0;j<fix[i][0].length;j++){
this.outline[fix[i][0][j]].style[fix[i][1]]=fix[i][2]+"px";
}
}
if(_7e==0){
this.onDisplayFinished();
}
};
HsExpander.prototype.showHideElements=function(_82,_83,_84){
var els=document.getElementsByTagName(_82);
if(els){
for(i=0;i<els.length;i++){
if(els[i].nodeName==_82){
var _86=els[i].getAttribute("hidden-by");
if(_83=="visible"&&_86){
_86=_86.replace("["+this.key+"]","");
els[i].setAttribute("hidden-by",_86);
if(!_86){
els[i].style.visibility="visible";
}
}else{
if(_83=="hidden"){
var _87=hs.position(els[i]);
_87.w=els[i].offsetWidth;
_87.h=els[i].offsetHeight;
var _88=(_87.x+_87.w<_84.x||_87.x>_84.x+_84.w);
var _89=(_87.y+_87.h<_84.y||_87.y>_84.y+_84.h);
var _8a=hs.getWrapperKey(els[i]);
if(!_88&&!_89&&_8a!=this.key){
if(!_86){
els[i].setAttribute("hidden-by","["+this.key+"]");
}else{
if(!_86.match("["+this.key+"]")){
els[i].setAttribute("hidden-by",_86+"["+this.key+"]");
}
}
els[i].style.visibility="hidden";
}else{
if(_86=="["+this.key+"]"||hs.focusKey==_8a){
els[i].setAttribute("hidden-by","");
els[i].style.visibility="visible";
}else{
if(_86&&_86.match("["+this.key+"]")){
els[i].setAttribute("hidden-by",_86.replace("["+this.key+"]",""));
}
}
}
}
}
}
}
}
};
HsExpander.prototype.focus=function(){
for(i=0;i<hs.expanders.length;i++){
if(hs.expanders[i]&&i==hs.focusKey){
var _8b=hs.expanders[i];
_8b.content.className+=" highslide-"+_8b.contentType+"-blur";
if(_8b.caption){
_8b.caption.className+=" highslide-caption-blur";
}
if(_8b.isImage){
_8b.content.style.cursor=hs.ie?"hand":"pointer";
_8b.content.title=hs.focusTitle;
}
}
}
this.wrapper.style.zIndex=hs.zIndexCounter++;
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;
}
var exp=hs.expanders[this.key];
this.isClosing=true;
var n=this.wrapper.childNodes.length;
for(i=n-1;i>0;i--){
var _8e=this.wrapper.childNodes[i];
if(_8e!=this.content){
this.wrapper.removeChild(this.wrapper.childNodes[i]);
}
}
if(this.scrollerDiv&&this.scrollerDiv!="scrollingContent"){
exp[this.scrollerDiv].style.overflow="hidden";
}
hs.outlinePreloader=0;
this.wrapper.style.width=null;
var _8f=(this.isImage)?this.content.width:parseInt(this.content.style.width);
var _90=(this.isImage)?this.content.height:parseInt(this.content.style.height);
this.changeSize(parseInt(this.wrapper.style.left),parseInt(this.wrapper.style.top),_8f,_90,this.thumbLeft-this.offsetBorderW+this.thumbOffsetBorderW,this.thumbTop-this.offsetBorderH+this.thumbOffsetBorderH,this.thumbWidth,this.thumbHeight,hs.restoreDuration,hs.restoreSteps);
setTimeout("if (hs.expanders["+this.key+"]) hs.expanders["+this.key+"].onEndClose()",hs.restoreDuration);
}
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);
hs.expanders[this.key]=null;
hs.cleanUp();
};
HsExpander.prototype.createOverlay=function(el,_92,_93,_94){
if(typeof el=="string"&&hs.$(el)){
el=hs.$(el).cloneNode(true);
el.id=null;
}
if(!el||typeof el=="string"||!this.isImage){
return;
}
if(!_92){
var _92="center center";
}
var _95=hs.createElement("div",null,{"position":"absolute","zIndex":3,"visibility":"hidden"},this.wrapper);
if(_94&&_94<1){
if(hs.ie){
_95.style.filter="alpha(opacity="+(_94*100)+")";
}else{
_95.style.opacity=_94;
}
}
el.className+=" highslide-display-block";
_95.appendChild(el);
var _96=this.offsetBorderW;
var top=this.offsetBorderH;
if(_92.match(/^bottom/)){
top+=this.content.height-_95.offsetHeight;
}
if(_92.match(/^center/)){
top+=(this.content.height-_95.offsetHeight)/2;
}
if(_92.match(/right$/)){
_96+=this.content.width-_95.offsetWidth;
}
if(_92.match(/center$/)){
_96+=(this.content.width-_95.offsetWidth)/2;
}
_95.style.left=_96+"px";
_95.style.top=top+"px";
if(this.mouseIsOver||!_93){
_95.style.visibility="visible";
}
if(_93){
_95.setAttribute("hideOnMouseOut",true);
}
this.overlays.push(_95);
};
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(){
this.mouseIsOver=true;
for(i=0;i<this.overlays.length;i++){
this.overlays[i].style.visibility="visible";
}
};
HsExpander.prototype.onMouseOut=function(rel){
this.mouseIsOver=false;
var _9a=new Array();
for(i=0;i<this.overlays.length;i++){
var _9b=rel;
while(_9b&&_9b.parentNode){
if(_9b==this.overlays[i]){
return;
}
_9b=_9b.parentNode;
}
if(this.overlays[i].getAttribute("hideOnMouseOut")){
_9a.push(this.overlays[i]);
}
}
for(i=0;i<_9a.length;i++){
_9a[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{
var _9d=parseInt(this.wrapper.style.left)-(this.fullExpandWidth-this.content.width)/2;
if(_9d<hs.marginLeft){
_9d=hs.marginLeft;
}
this.wrapper.style.left=_9d+"px";
var _9e=this.wrapper.offsetWidth-this.content.width;
this.content.width=this.fullExpandWidth;
this.content.height=this.fullExpandHeight;
this.focus();
this.fullExpandIcon.parentNode.removeChild(this.fullExpandIcon);
this.wrapper.style.width=(this.content.width+_9e)+"px";
if(this.outlineType){
this.repositionOutline(0);
}
for(x in this.overlays){
this.wrapper.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 _9f={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",_9f);
}
if(hs.hideIframes){
this.showHideElements("IFRAME","hidden",_9f);
}
};
hs.addEventListener(document,"mousedown",hs.mouseDownHandler);
hs.addEventListener(document,"mouseup",hs.mouseUpHandler);
hs.graphicsDir="";
window.onload=function(){
hs.preloadImages(5);
};

