var Class={create:function(){return function(){this.initialize.apply(this,arguments);}}}
Object.extend=function(destination,source){for(property in source)destination[property]=source[property];return destination;}
Function.prototype.bind=function(object){var __method=this;return function(){return __method.apply(object,arguments);}}
Function.prototype.bindAsEventListener=function(object){var __method=this;return function(event){__method.call(object,event||window.event);}}
function $(){if(arguments.length==1)return get$(arguments[0]);var elements=[];$c(arguments).each(function(el){elements.push(get$(el));});return elements;function get$(el){if(typeof el=='string')el=document.getElementById(el);return el;}}
if(!window.Element)var Element=new Object();Object.extend(Element,{remove:function(element){element=$(element);element.parentNode.removeChild(element);},hasClassName:function(element,className){element=$(element);if(!element)return;var hasClass=false;element.className.split(' ').each(function(cn){if(cn==className)hasClass=true;});return hasClass;},addClassName:function(element,className){element=$(element);Element.removeClassName(element,className);element.className+=' '+className;},removeClassName:function(element,className){element=$(element);if(!element)return;var newClassName='';element.className.split(' ').each(function(cn,i){if(cn!=className){if(i>0)newClassName+=' ';newClassName+=cn;}});element.className=newClassName;},cleanWhitespace:function(element){element=$(element);$c(element.childNodes).each(function(node){if(node.nodeType==3&&!/\S/.test(node.nodeValue))Element.remove(node);});},find:function(element,what){element=$(element)[what];while(element.nodeType!=1)element=element[what];return element;}});var Position={cumulativeOffset:function(element){var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;element=element.offsetParent;}while(element);return[valueL,valueT];}};document.getElementsByClassName=function(className){var children=document.getElementsByTagName('*')||document.all;var elements=[];$c(children).each(function(child){if(Element.hasClassName(child,className))elements.push(child);});return elements;}
Array.prototype.each=function(func){for(var i=0;ob=this[i];i++)func(ob,i);}
function $c(array){var nArray=[];for(i=0;el=array[i];i++)nArray.push(el);return nArray;}
var fx=new Object();fx.Base=function(){};fx.Base.prototype={setOptions:function(options){this.options={duration:500,onComplete:'',transition:fx.sinoidal}
Object.extend(this.options,options||{});},step:function(){var time=(new Date).getTime();if(time>=this.options.duration+this.startTime){this.now=this.to;clearInterval(this.timer);this.timer=null;if(this.options.onComplete)setTimeout(this.options.onComplete.bind(this),10);}
else{var Tpos=(time-this.startTime)/(this.options.duration);this.now=this.options.transition(Tpos)*(this.to-this.from)+this.from;}
this.increase();},custom:function(from,to){if(this.timer!=null)return;this.from=from;this.to=to;this.startTime=(new Date).getTime();this.timer=setInterval(this.step.bind(this),13);},hide:function(){this.now=0;this.increase();},clearTimer:function(){clearInterval(this.timer);this.timer=null;}}
fx.Layout=Class.create();fx.Layout.prototype=Object.extend(new fx.Base(),{initialize:function(el,options){this.el=$(el);this.el.style.overflow="hidden";this.iniWidth=this.el.offsetWidth;this.iniHeight=this.el.offsetHeight;this.setOptions(options);}});fx.Height=Class.create();Object.extend(Object.extend(fx.Height.prototype,fx.Layout.prototype),{increase:function(){this.el.style.height=this.now+"px";},toggle:function(){if(this.el.offsetHeight>0)this.custom(this.el.offsetHeight,0);else this.custom(0,this.el.scrollHeight);}});fx.Width=Class.create();Object.extend(Object.extend(fx.Width.prototype,fx.Layout.prototype),{increase:function(){this.el.style.width=this.now+"px";},toggle:function(){if(this.el.offsetWidth>0)this.custom(this.el.offsetWidth,0);else this.custom(0,this.iniWidth);}});fx.Opacity=Class.create();fx.Opacity.prototype=Object.extend(new fx.Base(),{initialize:function(el,options){this.el=$(el);this.now=1;this.increase();this.setOptions(options);},increase:function(){if(this.now==1&&(/Firefox/.test(navigator.userAgent)))this.now=0.9999;this.setOpacity(this.now);},setOpacity:function(opacity){if(opacity==0&&this.el.style.visibility!="hidden")this.el.style.visibility="hidden";else if(this.el.style.visibility!="visible")this.el.style.visibility="visible";if(window.ActiveXObject)this.el.style.filter="alpha(opacity="+opacity*100+")";this.el.style.opacity=opacity;},toggle:function(){if(this.now>0)this.custom(1,0);else this.custom(0,1);}});fx.sinoidal=function(pos){return((-Math.cos(pos*Math.PI)/2)+0.5);}
fx.linear=function(pos){return pos;}
fx.cubic=function(pos){return Math.pow(pos,3);}
fx.circ=function(pos){return Math.sqrt(pos);}
fx.Scroll=Class.create();fx.Scroll.prototype=Object.extend(new fx.Base(),{initialize:function(options){this.setOptions(options);},scrollTo:function(el){var dest=Position.cumulativeOffset($(el))[1];var client=window.innerHeight||document.documentElement.clientHeight;var full=document.documentElement.scrollHeight;var top=window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop;if(dest+client>full)this.custom(top,dest-client+(full-dest));else this.custom(top,dest);},increase:function(){window.scrollTo(0,this.now);}});fx.Text=Class.create();fx.Text.prototype=Object.extend(new fx.Base(),{initialize:function(el,options){this.el=$(el);this.setOptions(options);if(!this.options.unit)this.options.unit="em";},increase:function(){this.el.style.fontSize=this.now+this.options.unit;}});fx.Combo=Class.create();fx.Combo.prototype={setOptions:function(options){this.options={opacity:true,height:true,width:false}
Object.extend(this.options,options||{});},initialize:function(el,options){this.el=$(el);this.setOptions(options);if(this.options.opacity){this.o=new fx.Opacity(el,options);options.onComplete=null;}
if(this.options.height){this.h=new fx.Height(el,options);options.onComplete=null;}
if(this.options.width)this.w=new fx.Width(el,options);},toggle:function(){this.checkExec('toggle');},hide:function(){this.checkExec('hide');},clearTimer:function(){this.checkExec('clearTimer');},checkExec:function(func){if(this.o)this.o[func]();if(this.h)this.h[func]();if(this.w)this.w[func]();},resizeTo:function(hto,wto){if(this.h&&this.w){this.h.custom(this.el.offsetHeight,this.el.offsetHeight+hto);this.w.custom(this.el.offsetWidth,this.el.offsetWidth+wto);}},customSize:function(hto,wto){if(this.h&&this.w){this.h.custom(this.el.offsetHeight,hto);this.w.custom(this.el.offsetWidth,wto);}}}
fx.Accordion=Class.create();fx.Accordion.prototype={setOptions:function(options){this.options={delay:100,opacity:false}
Object.extend(this.options,options||{});},initialize:function(togglers,elements,options){this.elements=elements;this.setOptions(options);var options=options||'';elements.each(function(el,i){options.onComplete=function(){if(el.offsetHeight>0)el.style.height='1%';}
el.fx=new fx.Combo(el,options);el.fx.hide();});togglers.each(function(tog,i){tog.onclick=function(){this.showThisHideOpen(elements[i]);}.bind(this);}.bind(this));},showThisHideOpen:function(toShow){this.elements.each(function(el,i){if(el.offsetHeight>0&&el!=toShow)this.clearAndToggle(el);}.bind(this));if(toShow.offsetHeight==0)setTimeout(function(){this.clearAndToggle(toShow);}.bind(this),this.options.delay);},clearAndToggle:function(el){el.fx.clearTimer();el.fx.toggle();}}
var Remember=new Object();Remember=function(){};Remember.prototype={initialize:function(el,options){this.el=$(el);this.days=365;this.options=options;this.effect();var cookie=this.readCookie();if(cookie){this.fx.now=cookie;this.fx.increase();}},setCookie:function(value){var date=new Date();date.setTime(date.getTime()+(this.days*24*60*60*1000));var expires="; expires="+date.toGMTString();document.cookie=this.el+this.el.id+this.prefix+"="+value+expires+"; path=/";},readCookie:function(){var nameEQ=this.el+this.el.id+this.prefix+"=";var ca=document.cookie.split(';');for(var i=0;c=ca[i];i++){while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
return false;},custom:function(from,to){if(this.fx.now!=to){this.setCookie(to);this.fx.custom(from,to);}}}
fx.RememberHeight=Class.create();fx.RememberHeight.prototype=Object.extend(new Remember(),{effect:function(){this.fx=new fx.Height(this.el,this.options);this.prefix='height';},toggle:function(){if(this.el.offsetHeight==0)this.setCookie(this.el.scrollHeight);else this.setCookie(0);this.fx.toggle();},resize:function(to){this.setCookie(this.el.offsetHeight+to);this.fx.custom(this.el.offsetHeight,this.el.offsetHeight+to);},hide:function(){if(!this.readCookie()){this.fx.hide();}}});fx.RememberText=Class.create();fx.RememberText.prototype=Object.extend(new Remember(),{effect:function(){this.fx=new fx.Text(this.el,this.options);this.prefix='text';}});Array.prototype.each=function(func){for(var i=0;ob=this[i];i++)func(ob,i);}
fx.expoIn=function(pos){return Math.pow(2,10*(pos-1));}
fx.expoOut=function(pos){return(-Math.pow(2,-10*pos)+1);}
fx.quadIn=function(pos){return Math.pow(pos,2);}
fx.quadOut=function(pos){return-(pos)*(pos-2);}
fx.circOut=function(pos){return Math.sqrt(1-Math.pow(pos-1,2));}
fx.circIn=function(pos){return-(Math.sqrt(1-Math.pow(pos,2))-1);}
fx.backIn=function(pos){return(pos)*pos*((2.7)*pos-1.7);}
fx.backOut=function(pos){return((pos-1)*(pos-1)*((2.7)*(pos-1)+1.7)+1);}
fx.sineOut=function(pos){return Math.sin(pos*(Math.PI/2));}
fx.sineIn=function(pos){return-Math.cos(pos*(Math.PI/2))+1;}
fx.sineInOut=function(pos){return-(Math.cos(Math.PI*pos)-1)/2;}
var ScrollLinks={currentHash:false,start:function(){this.scroll=new fx.Scroll({duration:1500,transition:fx.sineOut,onComplete:function(){this.end();}.bind(this)});this.allinks=$c(document.getElementsByTagName('a'));this.allinks.each(function(lnk){if((lnk.href&&lnk.href.indexOf('#')!=-1)&&((lnk.pathname==location.pathname)||('/'+lnk.pathname==location.pathname))&&(lnk.search==location.search)){lnk.onclick=function(){ScrollLinks.scroll.clearTimer();this.initialHref=this.href;this.initialHash=this.hash;this.href="javascript:void(0)";setTimeout(function(){this.href=this.initialHref;}.bind(this),200);ScrollLinks.go(this);}}});},go:function(link){this.currentHash=link.initialHash.slice(1);if(this.currentHash){this.allinks.each(function(lnk){if(lnk.id==ScrollLinks.currentHash){if(window.opera)lnk=[lnk].find('parentNode');ScrollLinks.scroll.scrollTo(lnk);return;}});}},end:function(){if(!/Konqueror|Safari|KHTML/.test(navigator.userAgent))window.location.hash="#"+this.currentHash;this.currentHash=false;}}
fx.Color=Class.create();fx.Color.prototype=Object.extend(new fx.Base(),{initialize:function(el,options){this.el=$(el);this.setOptions(options);this.now=0;this.regex=new RegExp("#?(..)(..)(..)");if(!this.options.fromColor)this.options.fromColor="#FFFFFF";if(!this.options.toColor)this.options.toColor="#FFFFFF";if(!this.options.property)this.props=new Array("backgroundColor");else this.props=this.options.property.split(",");},increase:function(){var hex="rgb("+(Math.round(this.cs[0]+(this.ce[0]-this.cs[0])*this.now))+","+(Math.round(this.cs[1]+(this.ce[1]-this.cs[1])*this.now))+","+(Math.round(this.cs[2]+(this.ce[2]-this.cs[2])*this.now))+")";for(i=0;i<this.props.length;i++){if(this.props[i]=="backgroundColor")this.el.style.backgroundColor=hex;else if(this.props[i]=="color")this.el.style.color=hex;else if(this.props[i]=="borderColor")this.el.style.borderColor=hex;}},toggle:function(){this.cs=this.regex.exec(this.options.fromColor);this.ce=this.regex.exec(this.options.toColor);for(i=1;i<this.cs.length;i++){this.cs[i-1]=parseInt(this.cs[i],16);this.ce[i-1]=parseInt(this.ce[i],16);}
if(this.now>0)this.custom(1,0);else this.custom(0,1);},cycle:function(){this.toggle();setTimeout(this.toggle.bind(this),this.options.duration+10);},customColor:function(from,to){this.cs=this.regex.exec(from);this.ce=this.regex.exec(to);for(i=1;i<this.cs.length;i++){this.cs[i-1]=parseInt(this.cs[i],16);this.ce[i-1]=parseInt(this.ce[i],16);}
this.custom(0,1);}});function is_loaded(){if(document.getElementById){document.getElementById('preloader').style.visibility='hidden';}else{if(document.layers){document.preloader.visibility='hidden';}
else{document.all.preloader.style.visibility='hidden';}}}
var newwindow;function poptastic(url)
{newwindow=window.open(url,'name','height=275,width=250,scrollbars=yes');if(window.focus){newwindow.focus()}}
var hs={graphicsDir:'../img/highslide/',restoreCursor:"zoomout.cur",fullExpandIcon:'fullexpand.gif',expandSteps:10,expandDuration:250,restoreSteps:10,restoreDuration:250,numberOfImagesToPreload:5,marginLeft:10,marginRight:35,marginTop:10,marginBottom:35,zIndexCounter:1001,fullExpandDelay:500,fullExpandTitle:'Expandir a tamaņo original',restoreTitle:'Pulsa para cerrar la imagen o arrastra para desplazarla',focusTitle:'Pulsa para cerrar',loadingText:':::',loadingTitle:'Pulsa para cancelar',showCredits:false,creditsText:'afabricadevilanova.com',creditsHref:'http://vikjavev.no/highslide',creditsTitle:'Go to the Highslide JS homepage',anchor:'auto',spaceForCaption:30,outlineType:'drop-shadow',wrapperClassName:null,preloadTheseImages:new Array(),continuePreloading:true,expandedImagesCounter:0,expanders:new Array(),mouseIsOverFullExpand:false,isBusy:false,container:null,defaultRestoreCursor:null,leftBeforeDrag:null,topBeforeDrag:null,ie:(document.all&&!window.opera),nn6:document.getElementById&&!document.all,hasFocused:false,isDrag:false,dragX:null,dragY:null,dragObj:null,ieVersion:function(){arr=navigator.appVersion.split("MSIE");return parseFloat(arr[1]);},clientInfo:function(){var iebody=(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;this.width=document.all?iebody.clientWidth:self.innerWidth;this.height=document.all?iebody.clientHeight:self.innerHeight;this.scrollLeft=document.all?iebody.scrollLeft:pageXOffset;this.scrollTop=document.all?iebody.scrollTop:pageYOffset;},position:function(el){var parent=el;this.x=parent.offsetLeft;this.y=parent.offsetTop;while(parent.offsetParent){parent=parent.offsetParent;this.x+=parent.offsetLeft;this.y+=parent.offsetTop;}
return this;},expander:function(){},expand:function(a,params){hs.isBusy=true;try{hs.continuePreloading=false;hs.container=document.getElementById('highslide-container');if(params&&params.thumbnailId){var el=document.getElementById(params.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;}}}
for(i=0;i<hs.expanders.length;i++){if(hs.expanders[i]&&hs.expanders[i].thumb!=el&&!hs.expanders[i].showFullImageStarted){hs.cancelLoading(i);}}
for(i=0;i<hs.expanders.length;i++){if(hs.expanders[i]&&hs.expanders[i].thumb==el){hs.isBusy=false;return false;}}
var key=hs.expandedImagesCounter++;hs.expanders[key]=new hs.expander();var exp=hs.expanders[key];exp.a=a;var legalParams=new Array('anchor','outlineType','spaceForCaption','wrapperClassName');for(i=0;i<legalParams.length;i++){var name=legalParams[i];if(params&&params[name])exp[name]=params[name];else exp[name]=hs[name];}
var imgId='expanded-'+hs.expandedImagesCounter;exp.thumbsUserSetId=el.id;if(!el.id)el.id='hs-thumb-'+hs.expandedImagesCounter;exp.thumb=el;exp.originalCursor=el.style.cursor;el.style.cursor='wait';var pos=hs.position(el);var wrapper=document.createElement('div');wrapper.style.visibility='hidden';wrapper.style.position='absolute';if(exp.wrapperClassName)wrapper.className=exp.wrapperClassName;wrapper.style.zIndex=hs.zIndexCounter++;exp.wrapper=wrapper;exp.thumbWidth=el.width;exp.thumbHeight=el.height;exp.thumbLeft=pos.x;exp.thumbTop=pos.y;exp.thumbOffsetBorderW=(exp.thumb.offsetWidth-exp.thumbWidth)/2;exp.thumbOffsetBorderH=(exp.thumb.offsetHeight-exp.thumbHeight)/2;var loading=document.createElement('a');loading.style.position='absolute';loading.style.visibility='hidden';loading.className='highslide-loading';loading.title=hs.loadingTitle;loading.href='javascript:hs.cancelLoading('+key+')'
hs.container.appendChild(loading);if(hs.loadingText)loading.innerHTML=hs.loadingText;loading.style.left=(exp.thumbLeft+exp.thumbOffsetBorderW+(exp.thumbWidth-loading.offsetWidth)/2)+'px';loading.style.top=(exp.thumbTop+(exp.thumbHeight-loading.offsetHeight)/2)+'px';exp.loading=loading;setTimeout("if (hs.expanders["+key+"].loading) hs.expanders["+key+"].loading.style.visibility = 'visible';",100);var img=document.createElement('img');exp.fullImage=img;if(navigator.userAgent.indexOf("Safari")!=-1){img.onload=function(){var safImg=new Image;safImg.src=this.src;exp.fullImage.width=safImg.width;exp.fullImage.height=safImg.height;hs.showFullImage(key);}}else{img.onload=function(){hs.showFullImage(key);}}
img.src=a.href;img.className='highslide-image '+el.className;img.style.visibility='hidden'
img.style.display='block';img.style.position='relative';img.style.zIndex=3;img.id=imgId;img.title=hs.restoreTitle;img.onmouseover=function(){setTimeout("hs.showFullExpand('"+key+"')",hs.fullExpandDelay);}
img.onmouseout=function(){setTimeout("hs.hideFullExpand('"+key+"')",50);}
img.setAttribute('key',key);return false;}catch(e){return true;}},showFullImage:function(key){try{var exp=hs.expanders[key];if(exp.showFullImageStarted)return;else exp.showFullImageStarted=true;if(exp.loading){hs.container.removeChild(exp.loading);exp.loading=null;}
exp.thumb.style.cursor=exp.originalCursor;var newWidth=exp.fullImage.width;var newHeight=exp.fullImage.height;exp.fullExpandWidth=newWidth;exp.fullExpandHeight=newHeight;exp.fullImage.width=exp.thumb.width;exp.fullImage.height=exp.thumb.height;var modMarginBottom=hs.marginBottom;var thumbsUserSetId=exp.thumbsUserSetId;if(thumbsUserSetId&&document.getElementById('caption-for-'+thumbsUserSetId)){var captionClone=document.getElementById('caption-for-'+exp.thumb.id).cloneNode(true);exp.caption=captionClone;modMarginBottom+=exp.spaceForCaption;}
exp.wrapper.appendChild(exp.fullImage)
exp.wrapper.style.left=exp.thumbLeft;exp.wrapper.style.top=exp.thumbTop;hs.container.appendChild(exp.wrapper);exp.offsetBorderW=(exp.wrapper.offsetWidth-exp.thumb.width)/2;exp.offsetBorderH=(exp.wrapper.offsetHeight-exp.thumb.height)/2;var modMarginRight=hs.marginRight+2*exp.offsetBorderW;modMarginBottom+=2*exp.offsetBorderH;var ratio=newWidth/newHeight;var newLeft=parseInt(exp.thumbLeft)-exp.offsetBorderW+exp.thumbOffsetBorderW;var newTop=parseInt(exp.thumbTop)-exp.offsetBorderH+exp.thumbOffsetBorderH;var oldRight=newLeft+parseInt(exp.thumb.width);var oldBottom=newTop+parseInt(exp.thumb.height);var justifyX;var justifyY;switch(exp.anchor){case'auto':justifyX='auto';justifyY='auto';break;case'top':justifyX='auto';break;case'top-right':justifyX='right';break;case'right':justifyX='right';justifyY='auto';break;case'bottom-right':justifyX='right';justifyY='bottom';break;case'bottom':justifyX='auto';justifyY='bottom';break;case'bottom-left':justifyY='bottom';break;case'left':justifyY='auto';break;case'top-left':break;default:justifyX='auto';justifyY='auto';}
var client=new hs.clientInfo();if(justifyX=='auto'){var hasMovedNewLeft=false;newLeft=Math.round(newLeft-((newWidth-exp.thumb.width)/2));if(newLeft<client.scrollLeft+hs.marginLeft){newLeft=client.scrollLeft+hs.marginLeft;hasMovedNewLeft=true;}
if(newLeft+newWidth>client.scrollLeft+client.width-hs.marginLeft){if(hasMovedNewLeft)newWidth=client.width-hs.marginLeft-modMarginRight;else if(newWidth<client.width-hs.marginLeft-modMarginRight){newLeft=client.scrollLeft+client.width-newWidth-hs.marginLeft-modMarginRight;}else{newLeft=client.scrollLeft+hs.marginLeft;newWidth=client.width-hs.marginLeft-modMarginRight;}}}else if(justifyX=='right'){newLeft=Math.floor(newLeft-newWidth+exp.thumb.width);}
if(justifyY=='auto'){var hasMovedNewTop=false;newTop=Math.round(newTop-((newHeight-exp.thumb.height)/2));if(newTop<client.scrollTop+hs.marginTop){newTop=client.scrollTop+hs.marginTop;hasMovedNewTop=true;}
if(newTop+newHeight>client.scrollTop+client.height-hs.marginTop-modMarginBottom){if(hasMovedNewTop)newHeight=client.height-hs.marginTop-modMarginBottom;else if(newHeight<client.height-hs.marginTop-modMarginBottom){newTop=client.scrollTop+client.height-newHeight-hs.marginTop-modMarginBottom;}else{newTop=client.scrollTop+hs.marginTop;newHeight=client.height-hs.marginTop-modMarginBottom;}}}else if(justifyY=='bottom'){newTop=Math.floor(newTop-newHeight+exp.thumb.height);}
if(newLeft<hs.marginLeft){tmpLeft=newLeft;newLeft=hs.marginLeft;newWidth=newWidth-(newLeft-tmpLeft);}
if(newTop<hs.marginTop){tmpTop=newTop;newTop=hs.marginTop;newHeight=newHeight-(newTop-tmpTop);}
if(newWidth/newHeight>ratio){var tmpWidth=newWidth;newWidth=newHeight*ratio;if(justifyX=='center'||justifyX=='auto'){newLeft=Math.round(parseInt(exp.thumbLeft)-((newWidth-exp.thumb.width)/2));if(newLeft<client.scrollLeft+hs.marginLeft){newLeft=client.scrollLeft+hs.marginLeft;}else if(newLeft+newWidth>client.scrollLeft+client.width-modMarginRight){newLeft=client.scrollLeft+client.width-newWidth-modMarginRight;}}
if(justifyX=='right')newLeft=newLeft+(tmpWidth-newWidth);}else if(newWidth/newHeight<ratio){var tmpHeight=newHeight;newHeight=newWidth/ratio;if(justifyY=='center'||justifyY=='auto'){newTop=Math.round(parseInt(exp.thumbTop)-((newHeight-exp.thumb.height)/2));if(newTop<client.scrollTop+hs.marginTop){newTop=client.scrollTop+hs.marginTop;}else if(newTop+newHeight>client.scrollTop+client.height-modMarginBottom){newTop=client.scrollTop+client.height-newHeight-modMarginBottom;}}
if(justifyY=='bottom')newTop=newTop+(tmpHeight-newHeight);}
var imgPos={x:newLeft-20,y:newTop-20,w:newWidth+40,h:newHeight+40+exp.spaceForCaption}
if(hs.ie)hs.showHideElements('SELECT','hidden',imgPos);hs.hideIframes=(window.opera||navigator.vendor=='KDE'||(hs.ie&&hs.ieVersion()<5.5));if(hs.hideIframes)hs.showHideElements('IFRAME','hidden',imgPos);var width=exp.thumb.width;var height=exp.thumb.height;var left=exp.thumbLeft+exp.thumbOffsetBorderW-exp.offsetBorderW;var top=exp.thumbTop+exp.thumbOffsetBorderH-exp.offsetBorderH;intervalWidth=(newWidth-width)/hs.expandSteps;intervalHeight=(newHeight-height)/hs.expandSteps;intervalLeft=(newLeft-left)/hs.expandSteps;intervalTop=(newTop-top)/hs.expandSteps;for(i=1;i<hs.expandSteps;i++){width+=intervalWidth;height+=intervalHeight;left+=intervalLeft;top+=intervalTop;if(justifyX=='right'){width=Math.round(width);left=oldRight-width;}
if(justifyY=='bottom'){height=Math.round(height);top=oldBottom-height;}
setTimeout("hs.changeSize("+key+", "+width+", "+height+", "+left+", "+top+")",Math.round(i*(hs.expandDuration/hs.expandSteps)));}
setTimeout("hs.changeSize("+key+", "+newWidth+", "+newHeight+", "+newLeft+", "+newTop+")",hs.expandDuration);setTimeout("hs.focus("+key+")",hs.expandDuration);if(hs.showCredits)setTimeout("hs.writeCredits("+key+")",hs.expandDuration+25);if(exp.caption){setTimeout("hs.writeCaption("+key+")",hs.expandDuration+50);}else{setTimeout("hs.writeOutline("+key+")",hs.expandDuration+50);}
if(exp.fullExpandWidth>newWidth){setTimeout("hs.putFullExpand("+key+")",hs.expandDuration+hs.fullExpandDelay);}}catch(e){if(hs.expanders[key]&&hs.expanders[key].a)window.location.href=hs.expanders[key].a.href;}},cancelLoading:function(key){var exp=hs.expanders[key];exp.thumb.style.cursor=exp.originalCursor;if(exp.loading){hs.container.removeChild(exp.loading);exp.loading=null;}
hs.expanders[key]=null;},showHideElements:function(tagName,visibility,imgPos){var els=document.getElementsByTagName(tagName);if(els){for(i=0;i<els.length;i++){if(els[i].nodeName==tagName){if(visibility=='visible'){els[i].style.visibility=visibility;}else{var elPos=hs.position(els[i]);elPos.w=els[i].offsetWidth;elPos.h=els[i].offsetHeight;var clearsX=(elPos.x+elPos.w<imgPos.x||elPos.x>imgPos.x+imgPos.w);var clearsY=(elPos.y+elPos.h<imgPos.y||elPos.y>imgPos.y+imgPos.h);if(!clearsX&&!clearsY){els[i].style.visibility=visibility;}}}}}},writeCredits:function(key){var exp=hs.expanders[key];var credits=document.createElement('a');credits.href=hs.creditsHref;credits.className='highslide-credits';credits.innerHTML=hs.creditsText;credits.title=hs.creditsTitle;credits.style.position='absolute';credits.style.zIndex=3;if(hs.ie){exp.offsetBorderW=(exp.wrapper.offsetWidth-exp.fullImage.width)/2;exp.offsetBorderH=(exp.wrapper.offsetHeight-exp.fullImage.height)/2;}
credits.style.top=exp.offsetBorderH+'px';credits.style.left=exp.offsetBorderW+'px';exp.credits=credits;exp.wrapper.appendChild(credits);},writeCaption:function(key){var exp=hs.expanders[key];exp.wrapper.style.width=exp.wrapper.offsetWidth+'px';exp.caption.style.visibility='hidden';exp.caption.style.position='relative';if(hs.ie)exp.caption.style.zoom=1;exp.caption.className+=' highslide-display-block';exp.wrapper.appendChild(exp.caption);var capHeight=exp.caption.offsetHeight;var slideHeight=(capHeight<exp.fullImage.height)?capHeight:exp.fullImage.height;exp.caption.style.marginTop='-'+slideHeight+'px';exp.caption.style.zIndex=2;var step=1;if(slideHeight>400)step=4;else if(slideHeight>200)step=2;else if(slideHeight>100)step=1;setTimeout("hs.expanders["+key+"].caption.style.visibility = 'visible'",10);var t=0;for(marginTop=-slideHeight;marginTop<=0;marginTop+=step,t+=10){setTimeout("if (hs.expanders["+key+"] && hs.expanders["+key+"].caption) "+"hs.expanders["+key+"].caption.style.marginTop = '"+marginTop+"px'",t);}
setTimeout('hs.writeOutline('+key+')',t+10);},writeOutline:function(key){if(!hs.expanders[key])return;var exp=hs.expanders[key];exp.outline=new Array();var v=hs.ieVersion();hs.hasAlphaImageLoader=(v>=5.5)&&(v<7)&&(document.body.filters);hs.hasPngSupport=v>=7||!document.body.filters;hs.preloadOutlineElement(key,1);},preloadOutlineElement:function(key,i){if(!hs.expanders[key])return;if(!hs.hasAlphaImageLoader&&!hs.hasPngSupport)return;var exp=hs.expanders[key];if(exp.outline[i]&&exp.outline[i].onload){exp.outline[i].onload=null;return;}
var src=hs.graphicsDir+"outlines/"+exp.outlineType+"/"+i+".png";if(hs.hasAlphaImageLoader){exp.outline[i]=document.createElement('div');exp.outline[i].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader("+"enabled=true, sizingMethod=scale src='"+src+"') ";}
var img=document.createElement('img');if(hs.hasPngSupport){exp.outline[i]=img;}
exp.outline[i].style.position='absolute';var dim=(i%2==1)?'10px':'20px';exp.outline[i].style.height=dim;exp.outline[i].style.width=dim;if(i<8)img.onload=function(){hs.preloadOutlineElement(key,i+1);};else img.onload=function(){hs.displayOutline(key);};img.src=src;},displayOutline:function(key){if(!hs.expanders[key])return;var exp=hs.expanders[key];hs.repositionOutline(key,12);for(i=1;i<=8;i++){exp.wrapper.appendChild(exp.outline[i]);}
exp.hasOutline=true;exp.outline[1].style.lineHeight='10px';exp.outline[5].style.lineHeight='10px';for(i=10,t=0;i>=0;i--,t+=50){setTimeout("hs.repositionOutline("+key+", "+i+");",t);}},repositionOutline:function(key,offset){if(!hs.expanders[key])return;var exp=hs.expanders[key];if(exp.isClosing){hs.removeOutlines(key);return;}
var w=exp.wrapper.offsetWidth;var h=exp.wrapper.offsetHeight;exp.outline[1].style.width=(w-(2*offset)-20)+'px';if(navigator.vendor=='KDE')exp.outline[1].style.height=((offset%2)+10)+'px';exp.outline[1].style.left=(10+offset)+'px';exp.outline[1].style.top=(-10+offset)+'px';exp.outline[2].style.left=(w-10-offset)+'px';exp.outline[2].style.top=(-10+offset)+'px';exp.outline[3].style.left=(w-offset)+'px';exp.outline[3].style.top=(10+offset)+'px';exp.outline[3].style.height=(h-(2*offset)-20)+'px';exp.outline[4].style.left=(w-10-offset)+'px';exp.outline[4].style.top=(h-10-offset)+'px';exp.outline[5].style.width=(w-(2*offset)-20)+'px';if(navigator.vendor=='KDE')exp.outline[5].style.height=((offset%2)+10)+'px';exp.outline[5].style.left=(10+offset)+'px';exp.outline[5].style.top=(h-offset)+'px';exp.outline[6].style.left=(-10+offset)+'px';exp.outline[6].style.top=(h-10-offset)+'px';exp.outline[7].style.left=(-10+offset)+'px';exp.outline[7].style.top=(10+offset)+'px';exp.outline[7].style.height=(h-(2*offset)-20)+'px';exp.outline[8].style.left=(-10+offset)+'px';exp.outline[8].style.top=(-10+offset)+'px';},removeOutlines:function(key){try{var exp=hs.expanders[key];for(i=1;i<=8;i++){if(exp.hasOutline&&exp.outline[i]){exp.wrapper.removeChild(exp.outline[i]);}}}catch(e){}},focus:function(key){var img=hs.expanders[key].fullImage;for(i=0;i<hs.expanders.length;i++){if(hs.expanders[i]&&hs.expanders[i].fullImage.className=='highslide-image'&&i!=key){var blurKey=i;hs.expanders[i].fullImage.className+=' highslide-image-blur';hs.expanders[i].fullImage.title=hs.focusTitle;if(hs.expanders[i].caption){hs.expanders[i].caption.className+=' highslide-caption-blur';}}}
hs.expanders[key].wrapper.style.zIndex=hs.zIndexCounter++;img.className='highslide-image';if(hs.expanders[key].caption){hs.expanders[key].caption.className=hs.expanders[key].caption.className.replace(' highslide-caption-blur','');}
img.title=hs.restoreTitle;hs.isBusy=false;},focusTopmost:function(){var topZ=0;var topmostKey='';for(i=0;i<hs.expanders.length;i++){if(hs.expanders[i]&&hs.expanders[i].fullImage.className.match('highslide-image-blur')){if(hs.expanders[i].wrapper.style.zIndex&&hs.expanders[i].wrapper.style.zIndex>topZ){topZ=hs.expanders[i].wrapper.style.zIndex;topmostKey=i;}}}
if(topmostKey!='')hs.focus(topmostKey);hs.isBusy=false;},closeId:function(elId){for(i=0;i<hs.expanders.length;i++){if(hs.expanders[i]&&hs.expanders[i].thumb.id==elId){hs.restoreThumb(i);return;}}},restoreThumb:function(key){if(hs.isBusy)return;hs.isBusy=true;try{var exp=hs.expanders[key];exp.isClosing=true;if(exp.fullExpand){hs.expanders[key].fullExpand.parentNode.removeChild(exp.fullExpand);exp.fullExpand=null;}
if(exp.caption){exp.wrapper.removeChild(exp.caption);exp.caption=null;}
if(exp.credits){exp.wrapper.removeChild(exp.credits);exp.credits=null;}
hs.removeOutlines(key);hs.outlinePreloader=0;exp.wrapper.style.width=null;var width=exp.fullImage.width;var height=exp.fullImage.height;var left=parseInt(exp.wrapper.style.left);var top=parseInt(exp.wrapper.style.top);intervalWidth=(exp.thumbWidth-width)/hs.restoreSteps;intervalHeight=(exp.thumbHeight-height)/hs.restoreSteps;intervalLeft=(exp.thumbLeft+exp.thumbOffsetBorderW-exp.offsetBorderW-left)/hs.restoreSteps;intervalTop=(exp.thumbTop+exp.thumbOffsetBorderH-exp.offsetBorderH-top)/hs.restoreSteps;var oldRight=Math.round(left+width);var oldBottom=Math.round(top+height);for(i=1;i<hs.restoreSteps;i++){width+=intervalWidth;height+=intervalHeight;left+=intervalLeft;top+=intervalTop;setTimeout("hs.changeSize("+key+", "+width+", "+height+", "+left+", "+top+")",Math.round(i*(hs.restoreDuration/hs.restoreSteps)));}
setTimeout('hs.endRestore('+key+')',hs.restoreDuration);}catch(e){hs.expanders[key].thumb.style.visibility='visible';hs.expanders[key].wrapper.parentNode.removeChild(hs.expanders[key].wrapper);}},endRestore:function(key){var exp=hs.expanders[key];exp.thumb.style.visibility='visible';exp.fullImage.style.visibility='hidden';if(hs.hideIframes||hs.ie){var remaining=-1;for(i=0;i<hs.expanders.length;i++){if(hs.expanders[i])remaining++;}
if(remaining<=0){if(hs.ie)hs.showHideElements('SELECT','visible');if(hs.hideIframes)hs.showHideElements('IFRAME','visible');}}
exp.wrapper.parentNode.removeChild(exp.wrapper);hs.expanders[key]=null;if(hs.toggleImagesExpandEl){hs.expand(hs.toggleImagesExpandEl,hs.toggleImagesParams);hs.toggleImagesExpandEl=null;hs.toggleImagesParams=null;}else{hs.focusTopmost();}},toggleImages:function(closeId,expandEl,params){hs.closeId(closeId);if(hs.ie)expandEl.href=expandEl.href.replace('about:blank','');hs.toggleImagesExpandEl=expandEl;hs.toggleImagesParams=params;return false;},changeSize:function(key,newWidth,newHeight,newLeft,newTop){try{var exp=hs.expanders[key];exp.fullImage.width=newWidth;exp.fullImage.height=newHeight;exp.wrapper.style.visibility='visible';exp.wrapper.style.left=newLeft+'px';exp.wrapper.style.top=newTop+'px';exp.fullImage.style.visibility='visible';exp.thumb.style.visibility='hidden';}catch(e){window.location.href=hs.expanders[key].a.href;}},putFullExpand:function(key){if(hs.isBusy)return;if(!hs.expanders[key]){return;}
var href=hs.expanders[key].fullImage.src;var thisKey=key;var aFullExpand=document.createElement('a');aFullExpand.id='fullexpand-'+hs.expanders[key].fullImage.id;aFullExpand.style.position='absolute';aFullExpand.style.left=(hs.expanders[key].fullImage.width-55)+'px';aFullExpand.style.top=(hs.expanders[key].fullImage.height-55)+'px';aFullExpand.style.zIndex=3;aFullExpand.href='javascript:hs.fullExpand('+key+');';aFullExpand.title=hs.fullExpandTitle;aFullExpand.onmouseover=function(){hs.mouseIsOverFullExpand=true;}
aFullExpand.onmouseout=function(){hs.mouseIsOverFullExpand=false;}
var imgFullExpand=document.createElement('img');imgFullExpand.src=hs.graphicsDir+hs.fullExpandIcon;imgFullExpand.style.border='0';imgFullExpand.style.display='block';aFullExpand.appendChild(imgFullExpand);hs.expanders[key].wrapper.appendChild(aFullExpand);hs.expanders[key].fullExpand=aFullExpand;},fullExpand:function(key){try{var exp=hs.expanders[key];var newLeft=parseInt(exp.wrapper.style.left)-(exp.fullExpandWidth-exp.fullImage.width)/2;if(newLeft<hs.marginLeft)newLeft=hs.marginLeft;exp.wrapper.style.left=newLeft+'px';var borderOffset=exp.wrapper.offsetWidth-exp.fullImage.width;exp.fullImage.width=exp.fullExpandWidth;exp.fullImage.height=exp.fullExpandHeight;hs.focus(key);exp.fullExpand.className='highslide-display-none';hs.mouseIsOverFullExpand=false;exp.wrapper.style.width=(exp.fullImage.width+borderOffset)+'px';if(hs.outlineType)hs.repositionOutline(key,0);hs.onEndMove(key);}catch(e){window.location.href=hs.expanders[key].fullImage.src;}},showFullExpand:function(key){if(hs.expanders[key]&&hs.expanders[key].fullExpand){hs.expanders[key].fullExpand.style.visibility='visible';}},hideFullExpand:function(key){if(hs.expanders[key]&&hs.expanders[key].fullExpand&&!hs.mouseIsOverFullExpand){hs.expanders[key].fullExpand.style.visibility='hidden';}},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];}},mouseMoveHandler:function(e)
{if(hs.isDrag)
{var key=hs.dragObj.getAttribute('key');if(!hs.expanders[key].wrapper)return;var wrapper=hs.expanders[key].wrapper;var left=hs.nn6?tx+e.clientX-hs.dragX:tx+event.clientX-hs.dragX;wrapper.style.left=left+'px';var top=hs.nn6?ty+e.clientY-hs.dragY:ty+event.clientY-hs.dragY;wrapper.style.top=top+'px';return false;}},mouseDownHandler:function(e)
{var fobj=hs.nn6?e.target:event.srcElement;var topelement=hs.nn6?"HTML":"BODY";while(fobj.tagName!=topelement&&fobj.tagName!='HTML'&&!fobj.className.match('highslide-image'))
{fobj=hs.nn6?fobj.parentNode:fobj.parentElement;}
if(fobj.className.match('highslide-image'))
{hs.isDrag=true;hs.dragObj=fobj;var tmpCursor=hs.dragObj.style.cursor;hs.defaultRestoreCursor=tmpCursor;hs.dragObj.style.cursor='move';tx=parseInt(hs.dragObj.parentNode.style.left);ty=parseInt(hs.dragObj.parentNode.style.top);hs.leftBeforeDrag=tx;hs.topBeforeDrag=ty;hs.dragX=hs.nn6?e.clientX:event.clientX;hs.dragY=hs.nn6?e.clientY:event.clientY;document.onmousemove=hs.mouseMoveHandler;if(fobj.className.match('highslide-image-blur')){hs.focus(fobj.getAttribute('key'));hs.hasFocused=true;}
return false;}},mouseUpHandler:function(e){hs.isDrag=false;var fobj=hs.nn6?e.target:event.srcElement;var topelement=hs.nn6?"HTML":"BODY";while(fobj.tagName!=topelement&&fobj.tagName!='HTML'&&!fobj.className.match('highslide-image'))
{fobj=hs.nn6?fobj.parentNode:fobj.parentElement;}
if(fobj.className=='highslide-image'){fobj.style.cursor=hs.defaultRestoreCursor;var left=parseInt(fobj.parentNode.style.left);var top=parseInt(fobj.parentNode.style.top);if(left==hs.leftBeforeDrag&&top==hs.topBeforeDrag&&!hs.hasFocused){hs.restoreThumb(fobj.getAttribute('key'));}else if(!hs.hasFocused){hs.onEndMove(fobj.getAttribute('key'));}
hs.hasFocused=false;}else if(fobj.className.match('highslide-image-blur')){fobj.style.cursor=hs.defaultRestoreCursor;}},onEndMove:function(key){var exp=hs.expanders[key];var imgPos={x:parseInt(exp.wrapper.style.left)-20,y:parseInt(exp.wrapper.style.top)-20,w:exp.fullImage.width+40,h:exp.fullImage.height+40+exp.spaceForCaption}
if(hs.ie)hs.showHideElements('SELECT','hidden',imgPos);if(hs.hideIframes)hs.showHideElements('IFRAME','hidden',imgPos);},preloadImages:function(){var j=0;var aTags=document.getElementsByTagName('A');for(i=0;i<aTags.length;i++){a=aTags[i];if(a.className&&(a.className.match("highslide$")||a.className.match("highslide "))){if(j<this.numberOfImagesToPreload){hs.preloadTheseImages[j]=a.href;j++;}}}
hs.preloadFullImage(0);var cur=document.createElement('img');cur.src=hs.graphicsDir+hs.restoreCursor;for(i=1;i<=8;i++){var img=document.createElement('img');img.src=hs.graphicsDir+"outlines/"+hs.outlineType+"/"+i+".png";}}}
document.onmousedown=hs.mouseDownHandler;document.onmouseup=hs.mouseUpHandler;