/*Script: Core.js
	Mootools - My Object Oriented javascript.*/
function $HSB(a,b,c){return new Color([a,b,c],"hsb")}function $RGB(a,b,c){return new Color([a,b,c],"rgb")}function $H(a){return new Hash(a)}function $ES(a,b){return($(b)||document).getElementsBySelector(a)}function $E(a,b){return($(b)||document).getElement(a)}function $$(){var a=[];for(var b=0,c=arguments.length;b<c;b++){var d=arguments[b];switch($type(d)){case"element":a.push(d);case"boolean":break;case false:break;case"string":d=document.getElementsBySelector(d,true);default:a.extend(d)}}return $$.unique(a)}function $(a){if(!a)return null;if(a.htmlElement)return Garbage.collect(a);if([window,document].contains(a))return a;var b=$type(a);if(b=="string"){a=document.getElementById(a);b=a?"element":false}if(b!="element")return null;if(a.htmlElement)return Garbage.collect(a);if(["object","embed"].contains(a.tagName.toLowerCase()))return a;$extend(a,Element.prototype);a.htmlElement=function(){};return Garbage.collect(a)}function $each(a,b,c){if(a&&typeof a.length=="number"&&$type(a)!="object"){Array.forEach(a,b,c)}else{for(var d in a)b.call(c||a,a[d],d)}}function $A(a){return Array.copy(a)}function $clear(a){clearTimeout(a);clearInterval(a);return null}function $time(){return(new Date).getTime()}function $random(a,b){return Math.floor(Math.random()*(b-a+1)+a)}function $pick(a,b){return $defined(a)?a:b}function $chk(a){return!!(a||a===0)}function $merge(){var a={};for(var b=0;b<arguments.length;b++){for(var c in arguments[b]){var d=arguments[b][c];var e=a[c];if(e&&$type(d)=="object"&&$type(e)=="object")a[c]=$merge(e,d);else a[c]=d}}return a}function $type(a){if(!$defined(a))return false;if(a.htmlElement)return"element";var b=typeof a;if(b=="object"&&a.nodeName){switch(a.nodeType){case 1:return"element";case 3:return/\S/.test(a.nodeValue)?"textnode":"whitespace"}}if(b=="object"||b=="function"){switch(a.constructor){case Array:return"array";case RegExp:return"regexp";case Class:return"class"}if(typeof a.length=="number"){if(a.item)return"collection";if(a.callee)return"arguments"}}return b}function $defined(a){return a!=undefined}var MooTools={version:"1.11"};var $extend=function(){var a=arguments;if(!a[1])a=[this,a[0]];for(var b in a[1])a[0][b]=a[1][b];return a[0]};var $native=function(){for(var a=0,b=arguments.length;a<b;a++){arguments[a].extend=function(a){for(var b in a){if(!this.prototype[b])this.prototype[b]=a[b];if(!this[b])this[b]=$native.generic(b)}}}};$native.generic=function(a){return function(b){return this.prototype[a].apply(b,Array.prototype.slice.call(arguments,1))}};$native(Function,Array,String,Number);var Abstract=function(a){a=a||{};a.extend=$extend;return a};var Window=new Abstract(window);var Document=new Abstract(document);document.head=document.getElementsByTagName("head")[0];window.xpath=!!document.evaluate;if(window.ActiveXObject)window.ie=window[window.XMLHttpRequest?"ie7":"ie6"]=true;else if(document.childNodes&&!document.all&&!navigator.taintEnabled)window.webkit=window[window.xpath?"webkit420":"webkit419"]=true;else if(document.getBoxObjectFor!=null)window.gecko=true;window.khtml=window.webkit;Object.extend=$extend;if(typeof HTMLElement=="undefined"){var HTMLElement=function(){};if(window.webkit)document.createElement("iframe");HTMLElement.prototype=window.webkit?window["[[DOMElement.prototype]]"]:{}}HTMLElement.prototype.htmlElement=function(){};if(window.ie6)try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}var Class=function(a){var b=function(){return arguments[0]!==null&&this.initialize&&$type(this.initialize)=="function"?this.initialize.apply(this,arguments):this};$extend(b,this);b.prototype=a;b.constructor=Class;return b};Class.empty=function(){};Class.prototype={extend:function(a){var b=new this(null);for(var c in a){var d=b[c];b[c]=Class.Merge(d,a[c])}return new Class(b)},implement:function(){for(var a=0,b=arguments.length;a<b;a++)$extend(this.prototype,arguments[a])}};Class.Merge=function(a,b){if(a&&a!=b){var c=$type(b);if(c!=$type(a))return b;switch(c){case"function":var d=function(){this.parent=arguments.callee.parent;return b.apply(this,arguments)};d.parent=a;return d;case"object":return $merge(a,b)}}return b};var Chain=new Class({chain:function(a){this.chains=this.chains||[];this.chains.push(a);return this},callChain:function(){if(this.chains&&this.chains.length)this.chains.shift().delay(10,this)},clearChain:function(){this.chains=[]}});var Events=new Class({addEvent:function(a,b){if(b!=Class.empty){this.$events=this.$events||{};this.$events[a]=this.$events[a]||[];this.$events[a].include(b)}return this},fireEvent:function(a,b,c){if(this.$events&&this.$events[a]){this.$events[a].each(function(a){a.create({bind:this,delay:c,arguments:b})()},this)}return this},removeEvent:function(a,b){if(this.$events&&this.$events[a])this.$events[a].remove(b);return this}});var Options=new Class({setOptions:function(){this.options=$merge.apply(null,[this.options].extend(arguments));if(this.addEvent){for(var a in this.options){if($type(this.options[a]=="function")&&/^on[A-Z]/.test(a))this.addEvent(a,this.options[a])}}return this}});Array.extend({forEach:function(a,b){for(var c=0,d=this.length;c<d;c++)a.call(b,this[c],c,this)},filter:function(a,b){var c=[];for(var d=0,e=this.length;d<e;d++){if(a.call(b,this[d],d,this))c.push(this[d])}return c},map:function(a,b){var c=[];for(var d=0,e=this.length;d<e;d++)c[d]=a.call(b,this[d],d,this);return c},every:function(a,b){for(var c=0,d=this.length;c<d;c++){if(!a.call(b,this[c],c,this))return false}return true},some:function(a,b){for(var c=0,d=this.length;c<d;c++){if(a.call(b,this[c],c,this))return true}return false},indexOf:function(a,b){var c=this.length;for(var d=b<0?Math.max(0,c+b):b||0;d<c;d++){if(this[d]===a)return d}return-1},copy:function(a,b){a=a||0;if(a<0)a=this.length+a;b=b||this.length-a;var c=[];for(var d=0;d<b;d++)c[d]=this[a++];return c},remove:function(a){var b=0;var c=this.length;while(b<c){if(this[b]===a){this.splice(b,1);c--}else{b++}}return this},contains:function(a,b){return this.indexOf(a,b)!=-1},associate:function(a){var b={},c=Math.min(this.length,a.length);for(var d=0;d<c;d++)b[a[d]]=this[d];return b},extend:function(a){for(var b=0,c=a.length;b<c;b++)this.push(a[b]);return this},merge:function(a){for(var b=0,c=a.length;b<c;b++)this.include(a[b]);return this},include:function(a){if(!this.contains(a))this.push(a);return this},getRandom:function(){return this[$random(0,this.length-1)]||null},getLast:function(){return this[this.length-1]||null}});Array.prototype.each=Array.prototype.forEach;Array.each=Array.forEach;Array.prototype.test=Array.prototype.contains;String.extend({test:function(a,b){return($type(a)=="string"?new RegExp(a,b):a).test(this)},toInt:function(){return parseInt(this,10)},toFloat:function(){return parseFloat(this)},camelCase:function(){return this.replace(/-\D/g,function(a){return a.charAt(1).toUpperCase()})},hyphenate:function(){return this.replace(/\w[A-Z]/g,function(a){return a.charAt(0)+"-"+a.charAt(1).toLowerCase()})},capitalize:function(){return this.replace(/\b[a-z]/g,function(a){return a.toUpperCase()})},trim:function(){return this.replace(/^\s+|\s+$/g,"")},clean:function(){return this.replace(/\s{2,}/g," ").trim()},rgbToHex:function(a){var b=this.match(/\d{1,3}/g);return b?b.rgbToHex(a):false},hexToRgb:function(a){var b=this.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);return b?b.slice(1).hexToRgb(a):false},contains:function(a,b){return b?(b+this+b).indexOf(b+a+b)>-1:this.indexOf(a)>-1},escapeRegExp:function(){return this.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")}});Array.extend({rgbToHex:function(a){if(this.length<3)return false;if(this.length==4&&this[3]==0&&!a)return"transparent";var b=[];for(var c=0;c<3;c++){var d=(this[c]-0).toString(16);b.push(d.length==1?"0"+d:d)}return a?b:"#"+b.join("")},hexToRgb:function(a){if(this.length!=3)return false;var b=[];for(var c=0;c<3;c++){b.push(parseInt(this[c].length==1?this[c]+this[c]:this[c],16))}return a?b:"rgb("+b.join(",")+")"}});Function.extend({create:function(a){var b=this;a=$merge({bind:b,event:false,arguments:null,delay:false,periodical:false,attempt:false},a);if($chk(a.arguments)&&$type(a.arguments)!="array")a.arguments=[a.arguments];return function(c){var d;if(a.event){c=c||window.event;d=[a.event===true?c:new a.event(c)];if(a.arguments)d.extend(a.arguments)}else d=a.arguments||arguments;var e=function(){return b.apply($pick(a.bind,b),d)};if(a.delay)return setTimeout(e,a.delay);if(a.periodical)return setInterval(e,a.periodical);if(a.attempt)try{return e()}catch(f){return false}return e()}},pass:function(a,b){return this.create({arguments:a,bind:b})},attempt:function(a,b){return this.create({arguments:a,bind:b,attempt:true})()},bind:function(a,b){return this.create({bind:a,arguments:b})},bindAsEventListener:function(a,b){return this.create({bind:a,event:true,arguments:b})},delay:function(a,b,c){return this.create({delay:a,bind:b,arguments:c})()},periodical:function(a,b,c){return this.create({periodical:a,bind:b,arguments:c})()}});Number.extend({toInt:function(){return parseInt(this)},toFloat:function(){return parseFloat(this)},limit:function(a,b){return Math.min(b,Math.max(a,this))},round:function(a){a=Math.pow(10,a||0);return Math.round(this*a)/a},times:function(a){for(var b=0;b<this;b++)a(b)}});var Element=new Class({initialize:function(a,b){if($type(a)=="string"){if(window.ie&&b&&(b.name||b.type)){var c=b.name?' name="'+b.name+'"':"";var d=b.type?' type="'+b.type+'"':"";delete b.name;delete b.type;a="<"+a+c+d+">"}a=document.createElement(a)}a=$(a);return!b||!a?a:a.set(b)}});var Elements=new Class({initialize:function(a){return a?$extend(a,this):this}});Elements.extend=function(a){for(var b in a){this.prototype[b]=a[b];this[b]=$native.generic(b)}};document.getElementsBySelector=document.getElementsByTagName;$$.unique=function(a){var b=[];for(var c=0,d=a.length;c<d;c++){if(a[c].$included)continue;var e=$(a[c]);if(e&&!e.$included){e.$included=true;b.push(e)}}for(var f=0,g=b.length;f<g;f++)b[f].$included=null;return new Elements(b)};Elements.Multi=function(a){return function(){var b=arguments;var c=[];var d=true;for(var e=0,f=this.length,g;e<f;e++){g=this[e][a].apply(this[e],b);if($type(g)!="element")d=false;c.push(g)}return d?$$.unique(c):c}};Element.extend=function(a){for(var b in a){HTMLElement.prototype[b]=a[b];Element.prototype[b]=a[b];Element[b]=$native.generic(b);var c=Array.prototype[b]?b+"Elements":b;Elements.prototype[c]=Elements.Multi(b)}};Element.extend({set:function(a){for(var b in a){var c=a[b];switch(b){case"styles":this.setStyles(c);break;case"events":if(this.addEvents)this.addEvents(c);break;case"properties":this.setProperties(c);break;default:this.setProperty(b,c)}}return this},inject:function(a,b){a=$(a);switch(b){case"before":a.parentNode.insertBefore(this,a);break;case"after":var c=a.getNext();if(!c)a.parentNode.appendChild(this);else a.parentNode.insertBefore(this,c);break;case"top":var d=a.firstChild;if(d){a.insertBefore(this,d);break};default:a.appendChild(this)}return this},injectBefore:function(a){return this.inject(a,"before")},injectAfter:function(a){return this.inject(a,"after")},injectInside:function(a){return this.inject(a,"bottom")},injectTop:function(a){return this.inject(a,"top")},adopt:function(){var a=[];$each(arguments,function(b){a=a.concat(b)});$$(a).inject(this);return this},remove:function(){return this.parentNode.removeChild(this)},clone:function(a){var b=$(this.cloneNode(a!==false));if(!b.$events)return b;b.$events={};for(var c in this.$events)b.$events[c]={keys:$A(this.$events[c].keys),values:$A(this.$events[c].values)};return b.removeEvents()},replaceWith:function(a){a=$(a);this.parentNode.replaceChild(a,this);return a},appendText:function(a){this.appendChild(document.createTextNode(a));return this},hasClass:function(a){return this.className.contains(a," ")},addClass:function(a){if(!this.hasClass(a))this.className=(this.className+" "+a).clean();return this},removeClass:function(a){this.className=this.className.replace(new RegExp("(^|\\s)"+a+"(?:\\s|$)"),"$1").clean();return this},toggleClass:function(a){return this.hasClass(a)?this.removeClass(a):this.addClass(a)},setStyle:function(a,b){switch(a){case"opacity":return this.setOpacity(parseFloat(b));case"float":a=window.ie?"styleFloat":"cssFloat"}a=a.camelCase();switch($type(b)){case"number":if(!["zIndex","zoom"].contains(a))b+="px";break;case"array":b="rgb("+b.join(",")+")"}this.style[a]=b;return this},setStyles:function(a){switch($type(a)){case"object":Element.setMany(this,"setStyle",a);break;case"string":this.style.cssText=a}return this},setOpacity:function(a){if(a==0){if(this.style.visibility!="hidden")this.style.visibility="hidden"}else{if(this.style.visibility!="visible")this.style.visibility="visible"}if(!this.currentStyle||!this.currentStyle.hasLayout)this.style.zoom=1;if(window.ie)this.style.filter=a==1?"":"alpha(opacity="+a*100+")";this.style.opacity=this.$tmp.opacity=a;return this},getStyle:function(a){a=a.camelCase();var b=this.style[a];if(!$chk(b)){if(a=="opacity")return this.$tmp.opacity;b=[];for(var c in Element.Styles){if(a==c){Element.Styles[c].each(function(a){var c=this.getStyle(a);b.push(parseInt(c)?c:"0px")},this);if(a=="border"){var d=b.every(function(a){return a==b[0]});return d?b[0]:false}return b.join(" ")}}if(a.contains("border")){if(Element.Styles.border.contains(a)){return["Width","Style","Color"].map(function(b){return this.getStyle(a+b)},this).join(" ")}else if(Element.borderShort.contains(a)){return["Top","Right","Bottom","Left"].map(function(b){return this.getStyle("border"+b+a.replace("border",""))},this).join(" ")}}if(document.defaultView)b=document.defaultView.getComputedStyle(this,null).getPropertyValue(a.hyphenate());else if(this.currentStyle)b=this.currentStyle[a]}if(window.ie)b=Element.fixStyle(a,b,this);if(b&&a.test(/color/i)&&b.contains("rgb")){return b.split("rgb").splice(1,4).map(function(a){return a.rgbToHex()}).join(" ")}return b},getStyles:function(){return Element.getMany(this,"getStyle",arguments)},walk:function(a,b){a+="Sibling";var c=b?this[b]:this[a];while(c&&$type(c)!="element")c=c[a];return $(c)},getPrevious:function(){return this.walk("previous")},getNext:function(){return this.walk("next")},getFirst:function(){return this.walk("next","firstChild")},getLast:function(){return this.walk("previous","lastChild")},getParent:function(){return $(this.parentNode)},getChildren:function(){return $$(this.childNodes)},hasChild:function(a){return!!$A(this.getElementsByTagName("*")).contains(a)},getProperty:function(a){var b=Element.Properties[a];if(b)return this[b];var c=Element.PropertiesIFlag[a]||0;if(!window.ie||c)return this.getAttribute(a,c);var d=this.attributes[a];return d?d.nodeValue:null},removeProperty:function(a){var b=Element.Properties[a];if(b)this[b]="";else this.removeAttribute(a);return this},getProperties:function(){return Element.getMany(this,"getProperty",arguments)},setProperty:function(a,b){var c=Element.Properties[a];if(c)this[c]=b;else this.setAttribute(a,b);return this},setProperties:function(a){return Element.setMany(this,"setProperty",a)},setHTML:function(){this.innerHTML=$A(arguments).join("");return this},setText:function(a){var b=this.getTag();if(["style","script"].contains(b)){if(window.ie){if(b=="style")this.styleSheet.cssText=a;else if(b=="script")this.setProperty("text",a);return this}else{this.removeChild(this.firstChild);return this.appendText(a)}}this[$defined(this.innerText)?"innerText":"textContent"]=a;return this},getText:function(){var a=this.getTag();if(["style","script"].contains(a)){if(window.ie){if(a=="style")return this.styleSheet.cssText;else if(a=="script")return this.getProperty("text")}else{return this.innerHTML}}return $pick(this.innerText,this.textContent)},getTag:function(){return this.tagName.toLowerCase()},empty:function(){Garbage.trash(this.getElementsByTagName("*"));return this.setHTML("")}});Element.fixStyle=function(a,b,c){if($chk(parseInt(b)))return b;if(["height","width"].contains(a)){var d=a=="width"?["left","right"]:["top","bottom"];var e=0;d.each(function(a){e+=c.getStyle("border-"+a+"-width").toInt()+c.getStyle("padding-"+a).toInt()});return c["offset"+a.capitalize()]-e+"px"}else if(a.test(/border(.+)Width|margin|padding/)){return"0px"}return b};Element.Styles={border:[],padding:[],margin:[]};["Top","Right","Bottom","Left"].each(function(a){for(var b in Element.Styles)Element.Styles[b].push(b+a)});Element.borderShort=["borderWidth","borderStyle","borderColor"];Element.getMany=function(a,b,c){var d={};$each(c,function(c){d[c]=a[b](c)});return d};Element.setMany=function(a,b,c){for(var d in c)a[b](d,c[d]);return a};Element.Properties=new Abstract({"class":"className","for":"htmlFor",colspan:"colSpan",rowspan:"rowSpan",accesskey:"accessKey",tabindex:"tabIndex",maxlength:"maxLength",readonly:"readOnly",frameborder:"frameBorder",value:"value",disabled:"disabled",checked:"checked",multiple:"multiple",selected:"selected"});Element.PropertiesIFlag={href:2,src:2};Element.Methods={Listeners:{addListener:function(a,b){if(this.addEventListener)this.addEventListener(a,b,false);else this.attachEvent("on"+a,b);return this},removeListener:function(a,b){if(this.removeEventListener)this.removeEventListener(a,b,false);else this.detachEvent("on"+a,b);return this}}};window.extend(Element.Methods.Listeners);document.extend(Element.Methods.Listeners);Element.extend(Element.Methods.Listeners);var Garbage={elements:[],collect:function(a){if(!a.$tmp){Garbage.elements.push(a);a.$tmp={opacity:1}}return a},trash:function(a){for(var b=0,c=a.length,d;b<c;b++){if(!(d=a[b])||!d.$tmp)continue;if(d.$events)d.fireEvent("trash").removeEvents();for(var e in d.$tmp)d.$tmp[e]=null;for(var f in Element.prototype)d[f]=null;Garbage.elements[Garbage.elements.indexOf(d)]=null;d.htmlElement=d.$tmp=d=null}Garbage.elements.remove(null)},empty:function(){Garbage.collect(window);Garbage.collect(document);Garbage.trash(Garbage.elements)}};window.addListener("beforeunload",function(){window.addListener("unload",Garbage.empty);if(window.ie)window.addListener("unload",CollectGarbage)});var Event=new Class({initialize:function(a){if(a&&a.$extended)return a;this.$extended=true;a=a||window.event;this.event=a;this.type=a.type;this.target=a.target||a.srcElement;if(this.target.nodeType==3)this.target=this.target.parentNode;this.shift=a.shiftKey;this.control=a.ctrlKey;this.alt=a.altKey;this.meta=a.metaKey;if(["DOMMouseScroll","mousewheel"].contains(this.type)){this.wheel=a.wheelDelta?a.wheelDelta/120:-(a.detail||0)/3}else if(this.type.contains("key")){this.code=a.which||a.keyCode;for(var b in Event.keys){if(Event.keys[b]==this.code){this.key=b;break}}if(this.type=="keydown"){var c=this.code-111;if(c>0&&c<13)this.key="f"+c}this.key=this.key||String.fromCharCode(this.code).toLowerCase()}else if(this.type.test(/(click|mouse|menu)/)){this.page={x:a.pageX||a.clientX+document.documentElement.scrollLeft,y:a.pageY||a.clientY+document.documentElement.scrollTop};this.client={x:a.pageX?a.pageX-window.pageXOffset:a.clientX,y:a.pageY?a.pageY-window.pageYOffset:a.clientY};this.rightClick=a.which==3||a.button==2;switch(this.type){case"mouseover":this.relatedTarget=a.relatedTarget||a.fromElement;break;case"mouseout":this.relatedTarget=a.relatedTarget||a.toElement}this.fixRelatedTarget()}return this},stop:function(){return this.stopPropagation().preventDefault()},stopPropagation:function(){if(this.event.stopPropagation)this.event.stopPropagation();else this.event.cancelBubble=true;return this},preventDefault:function(){if(this.event.preventDefault)this.event.preventDefault();else this.event.returnValue=false;return this}});Event.fix={relatedTarget:function(){if(this.relatedTarget&&this.relatedTarget.nodeType==3)this.relatedTarget=this.relatedTarget.parentNode},relatedTargetGecko:function(){try{Event.fix.relatedTarget.call(this)}catch(a){this.relatedTarget=this.target}}};Event.prototype.fixRelatedTarget=window.gecko?Event.fix.relatedTargetGecko:Event.fix.relatedTarget;Event.keys=new Abstract({enter:13,up:38,down:40,left:37,right:39,esc:27,space:32,backspace:8,tab:9,"delete":46});Element.Methods.Events={addEvent:function(a,b){this.$events=this.$events||{};this.$events[a]=this.$events[a]||{keys:[],values:[]};if(this.$events[a].keys.contains(b))return this;this.$events[a].keys.push(b);var c=a;var d=Element.Events[a];if(d){if(d.add)d.add.call(this,b);if(d.map)b=d.map;if(d.type)c=d.type}if(!this.addEventListener)b=b.create({bind:this,event:true});this.$events[a].values.push(b);return Element.NativeEvents.contains(c)?this.addListener(c,b):this},removeEvent:function(a,b){if(!this.$events||!this.$events[a])return this;var c=this.$events[a].keys.indexOf(b);if(c==-1)return this;var d=this.$events[a].keys.splice(c,1)[0];var e=this.$events[a].values.splice(c,1)[0];var f=Element.Events[a];if(f){if(f.remove)f.remove.call(this,b);if(f.type)a=f.type}return Element.NativeEvents.contains(a)?this.removeListener(a,e):this},addEvents:function(a){return Element.setMany(this,"addEvent",a)},removeEvents:function(a){if(!this.$events)return this;if(!a){for(var b in this.$events)this.removeEvents(b);this.$events=null}else if(this.$events[a]){this.$events[a].keys.each(function(b){this.removeEvent(a,b)},this);this.$events[a]=null}return this},fireEvent:function(a,b,c){if(this.$events&&this.$events[a]){this.$events[a].keys.each(function(a){a.create({bind:this,delay:c,arguments:b})()},this)}return this},cloneEvents:function(a,b){if(!a.$events)return this;if(!b){for(var c in a.$events)this.cloneEvents(a,c)}else if(a.$events[b]){a.$events[b].keys.each(function(a){this.addEvent(b,a)},this)}return this}};window.extend(Element.Methods.Events);document.extend(Element.Methods.Events);Element.extend(Element.Methods.Events);Element.Events=new Abstract({mouseenter:{type:"mouseover",map:function(a){a=new Event(a);if(a.relatedTarget!=this&&!this.hasChild(a.relatedTarget))this.fireEvent("mouseenter",a)}},mouseleave:{type:"mouseout",map:function(a){a=new Event(a);if(a.relatedTarget!=this&&!this.hasChild(a.relatedTarget))this.fireEvent("mouseleave",a)}},mousewheel:{type:window.gecko?"DOMMouseScroll":"mousewheel"}});Element.NativeEvents=["click","dblclick","mouseup","mousedown","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","keydown","keypress","keyup","load","unload","beforeunload","resize","move","focus","blur","change","submit","reset","select","error","abort","contextmenu","scroll"];Function.extend({bindWithEvent:function(a,b){return this.create({bind:a,arguments:b,event:Event})}});Elements.extend({filterByTag:function(a){return new Elements(this.filter(function(b){return Element.getTag(b)==a}))},filterByClass:function(a,b){var c=this.filter(function(b){return b.className&&b.className.contains(a," ")});return b?c:new Elements(c)},filterById:function(a,b){var c=this.filter(function(b){return b.id==a});return b?c:new Elements(c)},filterByAttribute:function(a,b,c,d){var e=this.filter(function(d){var e=Element.getProperty(d,a);if(!e)return false;if(!b)return true;switch(b){case"=":return e==c;case"*=":return e.contains(c);case"^=":return e.substr(0,c.length)==c;case"$=":return e.substr(e.length-c.length)==c;case"!=":return e!=c;case"~=":return e.contains(c," ")}return false});return d?e:new Elements(e)}});$$.shared={regexp:/^(\w*|\*)(?:#([\w-]+)|\.([\w-]+))?(?:\[(\w+)(?:([!*^$]?=)["']?([^"'\]]*)["']?)?])?$/,xpath:{getParam:function(a,b,c,d){var e=[b.namespaceURI?"xhtml:":"",c[1]];if(c[2])e.push('[@id="',c[2],'"]');if(c[3])e.push('[contains(concat(" ", @class, " "), " ',c[3],' ")]');if(c[4]){if(c[5]&&c[6]){switch(c[5]){case"*=":e.push("[contains(@",c[4],', "',c[6],'")]');break;case"^=":e.push("[starts-with(@",c[4],', "',c[6],'")]');break;case"$=":e.push("[substring(@",c[4],", string-length(@",c[4],") - ",c[6].length,' + 1) = "',c[6],'"]');break;case"=":e.push("[@",c[4],'="',c[6],'"]');break;case"!=":e.push("[@",c[4],'!="',c[6],'"]')}}else{e.push("[@",c[4],"]")}}a.push(e.join(""));return a},getItems:function(a,b,c){var d=[];var e=document.evaluate(".//"+a.join("//"),b,$$.shared.resolver,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);for(var f=0,g=e.snapshotLength;f<g;f++)d.push(e.snapshotItem(f));return c?d:new Elements(d.map($))}},normal:{getParam:function(a,b,c,d){if(d==0){if(c[2]){var e=b.getElementById(c[2]);if(!e||c[1]!="*"&&Element.getTag(e)!=c[1])return false;a=[e]}else{a=$A(b.getElementsByTagName(c[1]))}}else{a=$$.shared.getElementsByTagName(a,c[1]);if(c[2])a=Elements.filterById(a,c[2],true)}if(c[3])a=Elements.filterByClass(a,c[3],true);if(c[4])a=Elements.filterByAttribute(a,c[4],c[5],c[6],true);return a},getItems:function(a,b,c){return c?a:$$.unique(a)}},resolver:function(a){return a=="xhtml"?"http://www.w3.org/1999/xhtml":false},getElementsByTagName:function(a,b){var c=[];for(var d=0,e=a.length;d<e;d++)c.extend(a[d].getElementsByTagName(b));return c}};$$.shared.method=window.xpath?"xpath":"normal";Element.Methods.Dom={getElements:function(a,b){var c=[];a=a.trim().split(" ");for(var d=0,e=a.length;d<e;d++){var f=a[d];var g=f.match($$.shared.regexp);if(!g)break;g[1]=g[1]||"*";var h=$$.shared[$$.shared.method].getParam(c,this,g,d);if(!h)break;c=h}return $$.shared[$$.shared.method].getItems(c,this,b)},getElement:function(a){return $(this.getElements(a,true)[0]||false)},getElementsBySelector:function(a,b){var c=[];a=a.split(",");for(var d=0,e=a.length;d<e;d++)c=c.concat(this.getElements(a[d],true));return b?c:$$.unique(c)}};Element.extend({getElementById:function(a){var b=document.getElementById(a);if(!b)return false;for(var c=b.parentNode;c!=this;c=c.parentNode){if(!c)return false}return b},getElementsByClassName:function(a){return this.getElements("."+a)}});document.extend(Element.Methods.Dom);Element.extend(Element.Methods.Dom);Element.extend({getValue:function(){switch(this.getTag()){case"select":var a=[];$each(this.options,function(b){if(b.selected)a.push($pick(b.value,b.text))});return this.multiple?a:a[0];case"input":if(!(this.checked&&["checkbox","radio"].contains(this.type))&&!["hidden","text","password"].contains(this.type))break;case"textarea":return this.value}return false},getFormElements:function(){return $$(this.getElementsByTagName("input"),this.getElementsByTagName("select"),this.getElementsByTagName("textarea"))},toQueryString:function(){var a=[];this.getFormElements().each(function(b){var c=b.name;var d=b.getValue();if(d===false||!c||b.disabled)return;var e=function(b){a.push(c+"="+encodeURIComponent(b))};if($type(d)=="array")d.each(e);else e(d)});return a.join("&")}});Element.extend({scrollTo:function(a,b){this.scrollLeft=a;this.scrollTop=b},getSize:function(){return{scroll:{x:this.scrollLeft,y:this.scrollTop},size:{x:this.offsetWidth,y:this.offsetHeight},scrollSize:{x:this.scrollWidth,y:this.scrollHeight}}},getPosition:function(a){a=a||[];var b=this,c=0,d=0;do{c+=b.offsetLeft||0;d+=b.offsetTop||0;b=b.offsetParent}while(b);a.each(function(a){c-=a.scrollLeft||0;d-=a.scrollTop||0});return{x:c,y:d}},getTop:function(a){return this.getPosition(a).y},getLeft:function(a){return this.getPosition(a).x},getCoordinates:function(a){var b=this.getPosition(a);var c={width:this.offsetWidth,height:this.offsetHeight,left:b.x,top:b.y};c.right=c.left+c.width;c.bottom=c.top+c.height;return c}});Element.Events.domready={add:function(a){if(window.loaded){a.call(this);return}var b=function(){if(window.loaded)return;window.loaded=true;window.timer=$clear(window.timer);this.fireEvent("domready")}.bind(this);if(document.readyState&&window.webkit){window.timer=function(){if(["loaded","complete"].contains(document.readyState))b()}.periodical(50)}else if(document.readyState&&window.ie){if(!$("ie_ready")){var c=window.location.protocol=="https:"?"://0":"javascript:void(0)";document.write('<script id="ie_ready" defer src="'+c+'"></script>');$("ie_ready").onreadystatechange=function(){if(this.readyState=="complete")b()}}}else{window.addListener("load",b);document.addListener("DOMContentLoaded",b)}}};window.onDomReady=function(a){return this.addEvent("domready",a)};window.extend({getWidth:function(){if(this.webkit419)return this.innerWidth;if(this.opera)return document.body.clientWidth;return document.documentElement.clientWidth},getHeight:function(){if(this.webkit419)return this.innerHeight;if(this.opera)return document.body.clientHeight;return document.documentElement.clientHeight},getScrollWidth:function(){if(this.ie)return Math.max(document.documentElement.offsetWidth,document.documentElement.scrollWidth);if(this.webkit)return document.body.scrollWidth;return document.documentElement.scrollWidth},getScrollHeight:function(){if(this.ie)return Math.max(document.documentElement.offsetHeight,document.documentElement.scrollHeight);if(this.webkit)return document.body.scrollHeight;return document.documentElement.scrollHeight},getScrollLeft:function(){return this.pageXOffset||document.documentElement.scrollLeft},getScrollTop:function(){return this.pageYOffset||document.documentElement.scrollTop},getSize:function(){return{size:{x:this.getWidth(),y:this.getHeight()},scrollSize:{x:this.getScrollWidth(),y:this.getScrollHeight()},scroll:{x:this.getScrollLeft(),y:this.getScrollTop()}}},getPosition:function(){return{x:0,y:0}}});var Fx={};Fx.Base=new Class({options:{onStart:Class.empty,onComplete:Class.empty,onCancel:Class.empty,transition:function(a){return-(Math.cos(Math.PI*a)-1)/2},duration:500,unit:"px",wait:true,fps:50},initialize:function(a){this.element=this.element||null;this.setOptions(a);if(this.options.initialize)this.options.initialize.call(this)},step:function(){var a=$time();if(a<this.time+this.options.duration){this.delta=this.options.transition((a-this.time)/this.options.duration);this.setNow();this.increase()}else{this.stop(true);this.set(this.to);this.fireEvent("onComplete",this.element,10);this.callChain()}},set:function(a){this.now=a;this.increase();return this},setNow:function(){this.now=this.compute(this.from,this.to)},compute:function(a,b){return(b-a)*this.delta+a},start:function(a,b){if(!this.options.wait)this.stop();else if(this.timer)return this;this.from=a;this.to=b;this.change=this.to-this.from;this.time=$time();this.timer=this.step.periodical(Math.round(1e3/this.options.fps),this);this.fireEvent("onStart",this.element);return this},stop:function(a){if(!this.timer)return this;this.timer=$clear(this.timer);if(!a)this.fireEvent("onCancel",this.element);return this},custom:function(a,b){return this.start(a,b)},clearTimer:function(a){return this.stop(a)}});Fx.Base.implement(new Chain,new Events,new Options);Fx.CSS={select:function(a,b){if(a.test(/color/i))return this.Color;var c=$type(b);if(c=="array"||c=="string"&&b.contains(" "))return this.Multi;return this.Single},parse:function(a,b,c){if(!c.push)c=[c];var d=c[0],e=c[1];if(!$chk(e)){e=d;d=a.getStyle(b)}var f=this.select(b,e);return{from:f.parse(d),to:f.parse(e),css:f}}};Fx.CSS.Single={parse:function(a){return parseFloat(a)},getNow:function(a,b,c){return c.compute(a,b)},getValue:function(a,b,c){if(b=="px"&&c!="opacity")a=Math.round(a);return a+b}};Fx.CSS.Multi={parse:function(a){return a.push?a:a.split(" ").map(function(a){return parseFloat(a)})},getNow:function(a,b,c){var d=[];for(var e=0;e<a.length;e++)d[e]=c.compute(a[e],b[e]);return d},getValue:function(a,b,c){if(b=="px"&&c!="opacity")a=a.map(Math.round);return a.join(b+" ")+b}};Fx.CSS.Color={parse:function(a){return a.push?a:a.hexToRgb(true)},getNow:function(a,b,c){var d=[];for(var e=0;e<a.length;e++)d[e]=Math.round(c.compute(a[e],b[e]));return d},getValue:function(a){return"rgb("+a.join(",")+")"}};Fx.Style=Fx.Base.extend({initialize:function(a,b,c){this.element=$(a);this.property=b;this.parent(c)},hide:function(){return this.set(0)},setNow:function(){this.now=this.css.getNow(this.from,this.to,this)},set:function(a){this.css=Fx.CSS.select(this.property,a);return this.parent(this.css.parse(a))},start:function(a,b){if(this.timer&&this.options.wait)return this;var c=Fx.CSS.parse(this.element,this.property,[a,b]);this.css=c.css;return this.parent(c.from,c.to)},increase:function(){this.element.setStyle(this.property,this.css.getValue(this.now,this.options.unit,this.property))}});Element.extend({effect:function(a,b){return new Fx.Style(this,a,b)}});Fx.Styles=Fx.Base.extend({initialize:function(a,b){this.element=$(a);this.parent(b)},setNow:function(){for(var a in this.from)this.now[a]=this.css[a].getNow(this.from[a],this.to[a],this)},set:function(a){var b={};this.css={};for(var c in a){this.css[c]=Fx.CSS.select(c,a[c]);b[c]=this.css[c].parse(a[c])}return this.parent(b)},start:function(a){if(this.timer&&this.options.wait)return this;this.now={};this.css={};var b={},c={};for(var d in a){var e=Fx.CSS.parse(this.element,d,a[d]);b[d]=e.from;c[d]=e.to;this.css[d]=e.css}return this.parent(b,c)},increase:function(){for(var a in this.now)this.element.setStyle(a,this.css[a].getValue(this.now[a],this.options.unit,a))}});Element.extend({effects:function(a){return new Fx.Styles(this,a)}});Fx.Elements=Fx.Base.extend({initialize:function(a,b){this.elements=$$(a);this.parent(b)},setNow:function(){for(var a in this.from){var b=this.from[a],c=this.to[a],d=this.css[a],e=this.now[a]={};for(var f in b)e[f]=d[f].getNow(b[f],c[f],this)}},set:function(a){var b={};this.css={};for(var c in a){var d=a[c],e=this.css[c]={},f=b[c]={};for(var g in d){e[g]=Fx.CSS.select(g,d[g]);f[g]=e[g].parse(d[g])}}return this.parent(b)},start:function(a){if(this.timer&&this.options.wait)return this;this.now={};this.css={};var b={},c={};for(var d in a){var e=a[d],f=b[d]={},g=c[d]={},h=this.css[d]={};for(var i in e){var j=Fx.CSS.parse(this.elements[d],i,e[i]);f[i]=j.from;g[i]=j.to;h[i]=j.css}}return this.parent(b,c)},increase:function(){for(var a in this.now){var b=this.now[a],c=this.css[a];for(var d in b)this.elements[a].setStyle(d,c[d].getValue(b[d],this.options.unit,d))}}});Fx.Scroll=Fx.Base.extend({options:{overflown:[],offset:{x:0,y:0},wheelStops:true},initialize:function(a,b){this.now=[];this.element=$(a);this.bound={stop:this.stop.bind(this,false)};this.parent(b);if(this.options.wheelStops){this.addEvent("onStart",function(){document.addEvent("mousewheel",this.bound.stop)}.bind(this));this.addEvent("onComplete",function(){document.removeEvent("mousewheel",this.bound.stop)}.bind(this))}},setNow:function(){for(var a=0;a<2;a++)this.now[a]=this.compute(this.from[a],this.to[a])},scrollTo:function(a,b){if(this.timer&&this.options.wait)return this;var c=this.element.getSize();var d={x:a,y:b};for(var e in c.size){var f=c.scrollSize[e]-c.size[e];if($chk(d[e]))d[e]=$type(d[e])=="number"?d[e].limit(0,f):f;else d[e]=c.scroll[e];d[e]+=this.options.offset[e]}return this.start([c.scroll.x,c.scroll.y],[d.x,d.y])},toTop:function(){return this.scrollTo(false,0)},toBottom:function(){return this.scrollTo(false,"full")},toLeft:function(){return this.scrollTo(0,false)},toRight:function(){return this.scrollTo("full",false)},toElement:function(a){var b=this.element.getPosition(this.options.overflown);var c=$(a).getPosition(this.options.overflown);return this.scrollTo(c.x-b.x,c.y-b.y)},increase:function(){this.element.scrollTo(this.now[0],this.now[1])}});Fx.Slide=Fx.Base.extend({options:{mode:"vertical"},initialize:function(a,b){this.element=$(a);this.wrapper=(new Element("div",{styles:$extend(this.element.getStyles("margin"),{overflow:"hidden"})})).injectAfter(this.element).adopt(this.element);this.element.setStyle("margin",0);this.setOptions(b);this.now=[];this.parent(this.options);this.open=true;this.addEvent("onComplete",function(){this.open=this.now[0]===0});if(window.webkit419)this.addEvent("onComplete",function(){if(this.open)this.element.remove().inject(this.wrapper)})},setNow:function(){for(var a=0;a<2;a++)this.now[a]=this.compute(this.from[a],this.to[a])},vertical:function(){this.margin="margin-top";this.layout="height";this.offset=this.element.offsetHeight},horizontal:function(){this.margin="margin-left";this.layout="width";this.offset=this.element.offsetWidth},slideIn:function(a){this[a||this.options.mode]();return this.start([this.element.getStyle(this.margin).toInt(),this.wrapper.getStyle(this.layout).toInt()],[0,this.offset])},slideOut:function(a){this[a||this.options.mode]();return this.start([this.element.getStyle(this.margin).toInt(),this.wrapper.getStyle(this.layout).toInt()],[-this.offset,0])},hide:function(a){this[a||this.options.mode]();this.open=false;return this.set([-this.offset,0])},show:function(a){this[a||this.options.mode]();this.open=true;return this.set([0,this.offset])},toggle:function(a){if(this.wrapper.offsetHeight==0||this.wrapper.offsetWidth==0)return this.slideIn(a);return this.slideOut(a)},increase:function(){this.element.setStyle(this.margin,this.now[0]+this.options.unit);this.wrapper.setStyle(this.layout,this.now[1]+this.options.unit)}});Fx.Transition=function(a,b){b=b||[];if($type(b)!="array")b=[b];return $extend(a,{easeIn:function(c){return a(c,b)},easeOut:function(c){return 1-a(1-c,b)},easeInOut:function(c){return c<=.5?a(2*c,b)/2:(2-a(2*(1-c),b))/2}})};Fx.Transitions=new Abstract({linear:function(a){return a}});Fx.Transitions.extend=function(a){for(var b in a){Fx.Transitions[b]=new Fx.Transition(a[b]);Fx.Transitions.compat(b)}};Fx.Transitions.compat=function(a){["In","Out","InOut"].each(function(b){Fx.Transitions[a.toLowerCase()+b]=Fx.Transitions[a]["ease"+b]})};Fx.Transitions.extend({Pow:function(a,b){return Math.pow(a,b[0]||6)},Expo:function(a){return Math.pow(2,8*(a-1))},Circ:function(a){return 1-Math.sin(Math.acos(a))},Sine:function(a){return 1-Math.sin((1-a)*Math.PI/2)},Back:function(a,b){b=b[0]||1.618;return Math.pow(a,2)*((b+1)*a-b)},Bounce:function(a){var b;for(var c=0,d=1;1;c+=d,d/=2){if(a>=(7-4*c)/11){b=-Math.pow((11-6*c-11*a)/4,2)+d*d;break}}return b},Elastic:function(a,b){return Math.pow(2,10*--a)*Math.cos(20*a*Math.PI*(b[0]||1)/3)}});["Quad","Cubic","Quart","Quint"].each(function(a,b){Fx.Transitions[a]=new Fx.Transition(function(a){return Math.pow(a,[b+2])});Fx.Transitions.compat(a)});var Drag={};Drag.Base=new Class({options:{handle:false,unit:"px",onStart:Class.empty,onBeforeStart:Class.empty,onComplete:Class.empty,onSnap:Class.empty,onDrag:Class.empty,limit:false,modifiers:{x:"left",y:"top"},grid:false,snap:6},initialize:function(a,b){this.setOptions(b);this.element=$(a);this.handle=$(this.options.handle)||this.element;this.mouse={now:{},pos:{}};this.value={start:{},now:{}};this.bound={start:this.start.bindWithEvent(this),check:this.check.bindWithEvent(this),drag:this.drag.bindWithEvent(this),stop:this.stop.bind(this)};this.attach();if(this.options.initialize)this.options.initialize.call(this)},attach:function(){this.handle.addEvent("mousedown",this.bound.start);return this},detach:function(){this.handle.removeEvent("mousedown",this.bound.start);return this},start:function(a){this.fireEvent("onBeforeStart",this.element);this.mouse.start=a.page;var b=this.options.limit;this.limit={x:[],y:[]};for(var c in this.options.modifiers){if(!this.options.modifiers[c])continue;this.value.now[c]=this.element.getStyle(this.options.modifiers[c]).toInt();this.mouse.pos[c]=a.page[c]-this.value.now[c];if(b&&b[c]){for(var d=0;d<2;d++){if($chk(b[c][d]))this.limit[c][d]=$type(b[c][d])=="function"?b[c][d]():b[c][d]}}}if($type(this.options.grid)=="number")this.options.grid={x:this.options.grid,y:this.options.grid};document.addListener("mousemove",this.bound.check);document.addListener("mouseup",this.bound.stop);this.fireEvent("onStart",this.element);a.stop()},check:function(a){var b=Math.round(Math.sqrt(Math.pow(a.page.x-this.mouse.start.x,2)+Math.pow(a.page.y-this.mouse.start.y,2)));if(b>this.options.snap){document.removeListener("mousemove",this.bound.check);document.addListener("mousemove",this.bound.drag);this.drag(a);this.fireEvent("onSnap",this.element)}a.stop()},drag:function(a){this.out=false;this.mouse.now=a.page;for(var b in this.options.modifiers){if(!this.options.modifiers[b])continue;this.value.now[b]=this.mouse.now[b]-this.mouse.pos[b];if(this.limit[b]){if($chk(this.limit[b][1])&&this.value.now[b]>this.limit[b][1]){this.value.now[b]=this.limit[b][1];this.out=true}else if($chk(this.limit[b][0])&&this.value.now[b]<this.limit[b][0]){this.value.now[b]=this.limit[b][0];this.out=true}}if(this.options.grid[b])this.value.now[b]-=this.value.now[b]%this.options.grid[b];this.element.setStyle(this.options.modifiers[b],this.value.now[b]+this.options.unit)}this.fireEvent("onDrag",this.element);a.stop()},stop:function(){document.removeListener("mousemove",this.bound.check);document.removeListener("mousemove",this.bound.drag);document.removeListener("mouseup",this.bound.stop);this.fireEvent("onComplete",this.element)}});Drag.Base.implement(new Events,new Options);Element.extend({makeResizable:function(a){return new Drag.Base(this,$merge({modifiers:{x:"width",y:"height"}},a))}});Drag.Move=Drag.Base.extend({options:{droppables:[],container:false,overflown:[]},initialize:function(a,b){this.setOptions(b);this.element=$(a);this.droppables=$$(this.options.droppables);this.container=$(this.options.container);this.position={element:this.element.getStyle("position"),container:false};if(this.container)this.position.container=this.container.getStyle("position");if(!["relative","absolute","fixed"].contains(this.position.element))this.position.element="absolute";var c=this.element.getStyle("top").toInt();var d=this.element.getStyle("left").toInt();if(this.position.element=="absolute"&&!["relative","absolute","fixed"].contains(this.position.container)){c=$chk(c)?c:this.element.getTop(this.options.overflown);d=$chk(d)?d:this.element.getLeft(this.options.overflown)}else{c=$chk(c)?c:0;d=$chk(d)?d:0}this.element.setStyles({top:c,left:d,position:this.position.element});this.parent(this.element)},start:function(a){this.overed=null;if(this.container){var b=this.container.getCoordinates();var c=this.element.getCoordinates();if(this.position.element=="absolute"&&!["relative","absolute","fixed"].contains(this.position.container)){this.options.limit={x:[b.left,b.right-c.width],y:[b.top,b.bottom-c.height]}}else{this.options.limit={y:[0,b.height-c.height],x:[0,b.width-c.width]}}}this.parent(a)},drag:function(a){this.parent(a);var b=this.out?false:this.droppables.filter(this.checkAgainst,this).getLast();if(this.overed!=b){if(this.overed)this.overed.fireEvent("leave",[this.element,this]);this.overed=b?b.fireEvent("over",[this.element,this]):null}return this},checkAgainst:function(a){a=a.getCoordinates(this.options.overflown);var b=this.mouse.now;return b.x>a.left&&b.x<a.right&&b.y<a.bottom&&b.y>a.top},stop:function(){if(this.overed&&!this.out)this.overed.fireEvent("drop",[this.element,this]);else this.element.fireEvent("emptydrop",this);this.parent();return this}});Element.extend({makeDraggable:function(a){return new Drag.Move(this,a)}});var XHR=new Class({options:{method:"post",async:true,onRequest:Class.empty,onSuccess:Class.empty,onFailure:Class.empty,urlEncoded:true,encoding:"utf-8",autoCancel:false,headers:{}},setTransport:function(){this.transport=window.XMLHttpRequest?new XMLHttpRequest:window.ie?new ActiveXObject("Microsoft.XMLHTTP"):false;return this},initialize:function(a){this.setTransport().setOptions(a);this.options.isSuccess=this.options.isSuccess||this.isSuccess;this.headers={};if(this.options.urlEncoded&&this.options.method=="post"){var b=this.options.encoding?"; charset="+this.options.encoding:"";this.setHeader("Content-type","application/x-www-form-urlencoded"+b)}if(this.options.initialize)this.options.initialize.call(this)},onStateChange:function(){if(this.transport.readyState!=4||!this.running)return;this.running=false;var a=0;try{a=this.transport.status}catch(b){}if(this.options.isSuccess.call(this,a))this.onSuccess();else this.onFailure();this.transport.onreadystatechange=Class.empty},isSuccess:function(a){return a>=200&&a<300},onSuccess:function(){this.response={text:this.transport.responseText,xml:this.transport.responseXML};this.fireEvent("onSuccess",[this.response.text,this.response.xml]);this.callChain()},onFailure:function(){this.fireEvent("onFailure",this.transport)},setHeader:function(a,b){this.headers[a]=b;return this},send:function(a,b){if(this.options.autoCancel)this.cancel();else if(this.running)return this;this.running=true;if(b&&this.options.method=="get"){a=a+(a.contains("?")?"&":"?")+b;b=null}this.transport.open(this.options.method.toUpperCase(),a,this.options.async);this.transport.onreadystatechange=this.onStateChange.bind(this);if(this.options.method=="post"&&this.transport.overrideMimeType)this.setHeader("Connection","close");$extend(this.headers,this.options.headers);for(var c in this.headers)try{this.transport.setRequestHeader(c,this.headers[c])}catch(d){}this.fireEvent("onRequest");this.transport.send($pick(b,null));return this},cancel:function(){if(!this.running)return this;this.running=false;this.transport.abort();this.transport.onreadystatechange=Class.empty;this.setTransport();this.fireEvent("onCancel");return this}});XHR.implement(new Chain,new Events,new Options);var Ajax=XHR.extend({options:{data:null,update:null,onComplete:Class.empty,evalScripts:false,evalResponse:false},initialize:function(a,b){this.addEvent("onSuccess",this.onComplete);this.setOptions(b);this.options.data=this.options.data||this.options.postBody;if(!["post","get"].contains(this.options.method)){this._method="_method="+this.options.method;this.options.method="post"}this.parent();this.setHeader("X-Requested-With","XMLHttpRequest");this.setHeader("Accept","text/javascript, text/html, application/xml, text/xml, */*");this.url=a},onComplete:function(){if(this.options.update)$(this.options.update).empty().setHTML(this.response.text);if(this.options.evalScripts||this.options.evalResponse)this.evalScripts();this.fireEvent("onComplete",[this.response.text,this.response.xml],20)},request:function(a){a=a||this.options.data;switch($type(a)){case"element":a=$(a).toQueryString();break;case"object":a=Object.toQueryString(a)}if(this._method)a=a?[this._method,a].join("&"):this._method;return this.send(this.url,a)},evalScripts:function(){var a,b;if(this.options.evalResponse||/(ecma|java)script/.test(this.getHeader("Content-type")))b=this.response.text;else{b=[];var c=/<script[^>]*>([\s\S]*?)<\/script>/gi;while(a=c.exec(this.response.text))b.push(a[1]);b=b.join("\n")}if(b)window.execScript?window.execScript(b):window.setTimeout(b,0)},getHeader:function(a){try{return this.transport.getResponseHeader(a)}catch(b){}return null}});Object.toQueryString=function(a){var b=[];for(var c in a)b.push(encodeURIComponent(c)+"="+encodeURIComponent(a[c]));return b.join("&")};Element.extend({send:function(a){return(new Ajax(this.getProperty("action"),$merge({data:this.toQueryString()},a,{method:"post"}))).request()}});var Cookie=new Abstract({options:{domain:false,path:false,duration:false,secure:false},set:function(a,b,c){c=$merge(this.options,c);b=encodeURIComponent(b);if(c.domain)b+="; domain="+c.domain;if(c.path)b+="; path="+c.path;if(c.duration){var d=new Date;d.setTime(d.getTime()+c.duration*24*60*60*1e3);b+="; expires="+d.toGMTString()}if(c.secure)b+="; secure";document.cookie=a+"="+b;return $extend(c,{key:a,value:b})},get:function(a){var b=document.cookie.match("(?:^|;)\\s*"+a.escapeRegExp()+"=([^;]*)");return b?decodeURIComponent(b[1]):false},remove:function(a,b){if($type(a)=="object")this.set(a.key,"",$merge(a,{duration:-1}));else this.set(a,"",$merge(b,{duration:-1}))}});var Json={toString:function(a){switch($type(a)){case"string":return'"'+a.replace(/(["\\])/g,"\\$1")+'"';case"array":return"["+a.map(Json.toString).join(",")+"]";case"object":var b=[];for(var c in a)b.push(Json.toString(c)+":"+Json.toString(a[c]));return"{"+b.join(",")+"}";case"number":if(isFinite(a))break;case false:return"null"}return String(a)},evaluate:function(str,secure){return $type(str)!="string"||secure&&!str.test(/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/)?null:eval("("+str+")")}};Json.Remote=XHR.extend({initialize:function(a,b){this.url=a;this.addEvent("onSuccess",this.onComplete);this.parent(b);this.setHeader("X-Request","JSON")},send:function(a){return this.parent(this.url,"json="+Json.toString(a))},onComplete:function(){this.fireEvent("onComplete",[Json.evaluate(this.response.text,this.options.secure)])}});var Asset=new Abstract({javascript:function(a,b){b=$merge({onload:Class.empty},b);var c=(new Element("script",{src:a})).addEvents({load:b.onload,readystatechange:function(){if(this.readyState=="complete")this.fireEvent("load")}});delete b.onload;return c.setProperties(b).inject(document.head)},css:function(a,b){return(new Element("link",$merge({rel:"stylesheet",media:"screen",type:"text/css",href:a},b))).inject(document.head)},image:function(a,b){b=$merge({onload:Class.empty,onabort:Class.empty,onerror:Class.empty},b);var c=new Image;c.src=a;var d=new Element("img",{src:a});["load","abort","error"].each(function(a){var c=b["on"+a];delete b["on"+a];d.addEvent(a,function(){this.removeEvent(a,arguments.callee);c.call(this)})});if(c.width&&c.height)d.fireEvent("load",d,1);return d.setProperties(b)},images:function(a,b){b=$merge({onComplete:Class.empty,onProgress:Class.empty},b);if(!a.push)a=[a];var c=[];var d=0;a.each(function(e){var f=new Asset.image(e,{onload:function(){b.onProgress.call(this,d);d++;if(d==a.length)b.onComplete()}});c.push(f)});return new Elements(c)}});var Hash=new Class({length:0,initialize:function(a){this.obj=a||{};this.setLength()},get:function(a){return this.hasKey(a)?this.obj[a]:null},hasKey:function(a){return a in this.obj},set:function(a,b){if(!this.hasKey(a))this.length++;this.obj[a]=b;return this},setLength:function(){this.length=0;for(var a in this.obj)this.length++;return this},remove:function(a){if(this.hasKey(a)){delete this.obj[a];this.length--}return this},each:function(a,b){$each(this.obj,a,b)},extend:function(a){$extend(this.obj,a);return this.setLength()},merge:function(){this.obj=$merge.apply(null,[this.obj].extend(arguments));return this.setLength()},empty:function(){this.obj={};this.length=0;return this},keys:function(){var a=[];for(var b in this.obj)a.push(b);return a},values:function(){var a=[];for(var b in this.obj)a.push(this.obj[b]);return a}});Hash.Cookie=Hash.extend({initialize:function(a,b){this.name=a;this.options=$extend({autoSave:true},b||{});this.load()},save:function(){if(this.length==0){Cookie.remove(this.name,this.options);return true}var a=Json.toString(this.obj);if(a.length>4096)return false;Cookie.set(this.name,a,this.options);return true},load:function(){this.obj=Json.evaluate(Cookie.get(this.name),true)||{};this.setLength()}});Hash.Cookie.Methods={};["extend","set","merge","empty","remove"].each(function(a){Hash.Cookie.Methods[a]=function(){Hash.prototype[a].apply(this,arguments);if(this.options.autoSave)this.save();return this}});Hash.Cookie.implement(Hash.Cookie.Methods);var Color=new Class({initialize:function(a,b){b=b||(a.push?"rgb":"hex");var c,d;switch(b){case"rgb":c=a;d=c.rgbToHsb();break;case"hsb":c=a.hsbToRgb();d=a;break;default:c=a.hexToRgb(true);d=c.rgbToHsb()}c.hsb=d;c.hex=c.rgbToHex();return $extend(c,Color.prototype)},mix:function(){var a=$A(arguments);var b=$type(a[a.length-1])=="number"?a.pop():50;var c=this.copy();a.each(function(a){a=new Color(a);for(var d=0;d<3;d++)c[d]=Math.round(c[d]/100*(100-b)+a[d]/100*b)});return new Color(c,"rgb")},invert:function(){return new Color(this.map(function(a){return 255-a}))},setHue:function(a){return new Color([a,this.hsb[1],this.hsb[2]],"hsb")},setSaturation:function(a){return new Color([this.hsb[0],a,this.hsb[2]],"hsb")},setBrightness:function(a){return new Color([this.hsb[0],this.hsb[1],a],"hsb")}});Array.extend({rgbToHsb:function(){var a=this[0],b=this[1],c=this[2];var d,e,f;var g=Math.max(a,b,c),h=Math.min(a,b,c);var i=g-h;f=g/255;e=g!=0?i/g:0;if(e==0){d=0}else{var j=(g-a)/i;var k=(g-b)/i;var l=(g-c)/i;if(a==g)d=l-k;else if(b==g)d=2+j-l;else d=4+k-j;d/=6;if(d<0)d++}return[Math.round(d*360),Math.round(e*100),Math.round(f*100)]},hsbToRgb:function(){var a=Math.round(this[2]/100*255);if(this[1]==0){return[a,a,a]}else{var b=this[0]%360;var c=b%60;var d=Math.round(this[2]*(100-this[1])/1e4*255);var e=Math.round(this[2]*(6e3-this[1]*c)/6e5*255);var f=Math.round(this[2]*(6e3-this[1]*(60-c))/6e5*255);switch(Math.floor(b/60)){case 0:return[a,f,d];case 1:return[e,a,d];case 2:return[d,a,f];case 3:return[d,e,a];case 4:return[f,d,a];case 5:return[a,d,e]}}return false}});var Scroller=new Class({options:{area:20,velocity:1,onChange:function(a,b){this.element.scrollTo(a,b)}},initialize:function(a,b){this.setOptions(b);this.element=$(a);this.mousemover=[window,document].contains(a)?$(document.body):this.element},start:function(){this.coord=this.getCoords.bindWithEvent(this);this.mousemover.addListener("mousemove",this.coord)},stop:function(){this.mousemover.removeListener("mousemove",this.coord);this.timer=$clear(this.timer)},getCoords:function(a){this.page=this.element==window?a.client:a.page;if(!this.timer)this.timer=this.scroll.periodical(50,this)},scroll:function(){var a=this.element.getSize();var b=this.element.getPosition();var c={x:0,y:0};for(var d in this.page){if(this.page[d]<this.options.area+b[d]&&a.scroll[d]!=0)c[d]=(this.page[d]-this.options.area-b[d])*this.options.velocity;else if(this.page[d]+this.options.area>a.size[d]+b[d]&&a.scroll[d]+a.size[d]!=a.scrollSize[d])c[d]=(this.page[d]-a.size[d]+this.options.area-b[d])*this.options.velocity}if(c.y||c.x)this.fireEvent("onChange",[a.scroll.x+c.x,a.scroll.y+c.y])}});Scroller.implement(new Events,new Options);var Slider=new Class({options:{onChange:Class.empty,onComplete:Class.empty,onTick:function(a){this.knob.setStyle(this.p,a)},mode:"horizontal",steps:100,offset:0},initialize:function(a,b,c){this.element=$(a);this.knob=$(b);this.setOptions(c);this.previousChange=-1;this.previousEnd=-1;this.step=-1;this.element.addEvent("mousedown",this.clickedElement.bindWithEvent(this));var d,e;switch(this.options.mode){case"horizontal":this.z="x";this.p="left";d={x:"left",y:false};e="offsetWidth";break;case"vertical":this.z="y";this.p="top";d={x:false,y:"top"};e="offsetHeight"}this.max=this.element[e]-this.knob[e]+this.options.offset*2;this.half=this.knob[e]/2;this.getPos=this.element["get"+this.p.capitalize()].bind(this.element);this.knob.setStyle("position","relative").setStyle(this.p,-this.options.offset);var f={};f[this.z]=[-this.options.offset,this.max-this.options.offset];this.drag=new Drag.Base(this.knob,{limit:f,modifiers:d,snap:0,onStart:function(){this.draggedKnob()}.bind(this),onDrag:function(){this.draggedKnob()}.bind(this),onComplete:function(){this.draggedKnob();this.end()}.bind(this)});if(this.options.initialize)this.options.initialize.call(this)},set:function(a){this.step=a.limit(0,this.options.steps);this.checkStep();this.end();this.fireEvent("onTick",this.toPosition(this.step));return this},clickedElement:function(a){var b=a.page[this.z]-this.getPos()-this.half;b=b.limit(-this.options.offset,this.max-this.options.offset);this.step=this.toStep(b);this.checkStep();this.end();this.fireEvent("onTick",b)},draggedKnob:function(){this.step=this.toStep(this.drag.value.now[this.z]);this.checkStep()},checkStep:function(){if(this.previousChange!=this.step){this.previousChange=this.step;this.fireEvent("onChange",this.step)}},end:function(){if(this.previousEnd!==this.step){this.previousEnd=this.step;this.fireEvent("onComplete",this.step+"")}},toStep:function(a){return Math.round((a+this.options.offset)/this.max*this.options.steps)},toPosition:function(a){return this.max*a/this.options.steps}});Slider.implement(new Events);Slider.implement(new Options);var SmoothScroll=Fx.Scroll.extend({initialize:function(a){this.parent(window,a);this.links=this.options.links?$$(this.options.links):$$(document.links);var b=window.location.href.match(/^[^#]*/)[0]+"#";this.links.each(function(a){if(a.href.indexOf(b)!=0)return;var c=a.href.substr(b.length);if(c&&$(c))this.useLink(a,c)},this);if(!window.webkit419)this.addEvent("onComplete",function(){window.location.hash=this.anchor})},useLink:function(a,b){a.addEvent("click",function(a){this.anchor=b;this.toElement(b);a.stop()}.bindWithEvent(this))}});var Sortables=new Class({options:{handles:false,onStart:Class.empty,onComplete:Class.empty,ghost:true,snap:3,onDragStart:function(a,b){b.setStyle("opacity",.7);a.setStyle("opacity",.7)},onDragComplete:function(a,b){a.setStyle("opacity",1);b.remove();this.trash.remove()}},initialize:function(a,b){this.setOptions(b);this.list=$(a);this.elements=this.list.getChildren();this.handles=this.options.handles?$$(this.options.handles):this.elements;this.bound={start:[],moveGhost:this.moveGhost.bindWithEvent(this)};for(var c=0,d=this.handles.length;c<d;c++){this.bound.start[c]=this.start.bindWithEvent(this,this.elements[c])}this.attach();if(this.options.initialize)this.options.initialize.call(this);this.bound.move=this.move.bindWithEvent(this);this.bound.end=this.end.bind(this)},attach:function(){this.handles.each(function(a,b){a.addEvent("mousedown",this.bound.start[b])},this)},detach:function(){this.handles.each(function(a,b){a.removeEvent("mousedown",this.bound.start[b])},this)},start:function(a,b){this.active=b;this.coordinates=this.list.getCoordinates();if(this.options.ghost){var c=b.getPosition();this.offset=a.page.y-c.y;this.trash=(new Element("div")).inject(document.body);this.ghost=b.clone().inject(this.trash).setStyles({position:"absolute",left:c.x,top:a.page.y-this.offset});document.addListener("mousemove",this.bound.moveGhost);this.fireEvent("onDragStart",[b,this.ghost])}document.addListener("mousemove",this.bound.move);document.addListener("mouseup",this.bound.end);this.fireEvent("onStart",b);a.stop()},moveGhost:function(a){var b=a.page.y-this.offset;b=b.limit(this.coordinates.top,this.coordinates.bottom-this.ghost.offsetHeight);this.ghost.setStyle("top",b);a.stop()},move:function(a){var b=a.page.y;this.previous=this.previous||b;var c=this.previous-b>0;var d=this.active.getPrevious();var e=this.active.getNext();if(d&&c&&b<d.getCoordinates().bottom)this.active.injectBefore(d);if(e&&!c&&b>e.getCoordinates().top)this.active.injectAfter(e);this.previous=b},serialize:function(a){return this.list.getChildren().map(a||function(a){return this.elements.indexOf(a)},this)},end:function(){this.previous=null;document.removeListener("mousemove",this.bound.move);document.removeListener("mouseup",this.bound.end);if(this.options.ghost){document.removeListener("mousemove",this.bound.moveGhost);this.fireEvent("onDragComplete",[this.active,this.ghost])}this.fireEvent("onComplete",this.active)}});Sortables.implement(new Events,new Options);var Tips=new Class({options:{onShow:function(a){a.setStyle("visibility","visible")},onHide:function(a){a.setStyle("visibility","hidden")},maxTitleChars:30,showDelay:100,hideDelay:100,className:"tool",offsets:{x:16,y:16},fixed:false},initialize:function(a,b){this.setOptions(b);this.toolTip=(new Element("div",{"class":this.options.className+"-tip",styles:{position:"absolute",top:"0",left:"0",visibility:"hidden"}})).inject(document.body);this.wrapper=(new Element("div")).inject(this.toolTip);$$(a).each(this.build,this);if(this.options.initialize)this.options.initialize.call(this)},build:function(a){a.$tmp.myTitle=a.href&&a.getTag()=="a"?a.href.replace("http://",""):a.rel||false;if(a.title){var b=a.title.split("::");if(b.length>1){a.$tmp.myTitle=b[0].trim();a.$tmp.myText=b[1].trim()}else{a.$tmp.myText=a.title}a.removeAttribute("title")}else{a.$tmp.myText=false}if(a.$tmp.myTitle&&a.$tmp.myTitle.length>this.options.maxTitleChars)a.$tmp.myTitle=a.$tmp.myTitle.substr(0,this.options.maxTitleChars-1)+"…";a.addEvent("mouseenter",function(b){this.start(a);if(!this.options.fixed)this.locate(b);else this.position(a)}.bind(this));if(!this.options.fixed)a.addEvent("mousemove",this.locate.bindWithEvent(this));var c=this.end.bind(this);a.addEvent("mouseleave",c);a.addEvent("trash",c)},start:function(a){this.wrapper.empty();if(a.$tmp.myTitle){this.title=(new Element("span")).inject((new Element("div",{"class":this.options.className+"-title"})).inject(this.wrapper)).setHTML(a.$tmp.myTitle)}if(a.$tmp.myText){this.text=(new Element("span")).inject((new Element("div",{"class":this.options.className+"-text"})).inject(this.wrapper)).setHTML(a.$tmp.myText)}$clear(this.timer);this.timer=this.show.delay(this.options.showDelay,this)},end:function(a){$clear(this.timer);this.timer=this.hide.delay(this.options.hideDelay,this)},position:function(a){var b=a.getPosition();this.toolTip.setStyles({left:b.x+this.options.offsets.x,top:b.y+this.options.offsets.y})},locate:function(a){var b={x:window.getWidth(),y:window.getHeight()};var c={x:window.getScrollLeft(),y:window.getScrollTop()};var d={x:this.toolTip.offsetWidth,y:this.toolTip.offsetHeight};var e={x:"left",y:"top"};for(var f in e){var g=a.page[f]+this.options.offsets[f];if(g+d[f]-c[f]>b[f])g=a.page[f]-this.options.offsets[f]-d[f];this.toolTip.setStyle(e[f],g)}},show:function(){if(this.options.timeout)this.timer=this.hide.delay(this.options.timeout,this);this.fireEvent("onShow",[this.toolTip])},hide:function(){this.fireEvent("onHide",[this.toolTip])}});Tips.implement(new Events,new Options);var Group=new Class({initialize:function(){this.instances=$A(arguments);this.events={};this.checker={}},addEvent:function(a,b){this.checker[a]=this.checker[a]||{};this.events[a]=this.events[a]||[];if(this.events[a].contains(b))return false;else this.events[a].push(b);this.instances.each(function(b,c){b.addEvent(a,this.check.bind(this,[a,b,c]))},this);return this},check:function(a,b,c){this.checker[a][c]=true;var d=this.instances.every(function(b,c){return this.checker[a][c]||false},this);if(!d)return;this.checker[a]={};this.events[a].each(function(a){a.call(this,this.instances,b)},this)}});var Accordion=Fx.Elements.extend({options:{onActive:Class.empty,onBackground:Class.empty,display:0,show:false,height:true,width:false,opacity:true,fixedHeight:false,fixedWidth:false,wait:false,alwaysHide:false},initialize:function(){var a,b,c,d;$each(arguments,function(e,f){switch($type(e)){case"object":a=e;break;case"element":d=$(e);break;default:var g=$$(e);if(!b)b=g;else c=g}});this.togglers=b||[];this.elements=c||[];this.container=$(d);this.setOptions(a);this.previous=-1;if(this.options.alwaysHide)this.options.wait=true;if($chk(this.options.show)){this.options.display=false;this.previous=this.options.show}if(this.options.start){this.options.display=false;this.options.show=false}this.effects={};if(this.options.opacity)this.effects.opacity="fullOpacity";if(this.options.width)this.effects.width=this.options.fixedWidth?"fullWidth":"offsetWidth";if(this.options.height)this.effects.height=this.options.fixedHeight?"fullHeight":"scrollHeight";for(var e=0,f=this.togglers.length;e<f;e++)this.addSection(this.togglers[e],this.elements[e]);this.elements.each(function(a,b){if(this.options.show===b){this.fireEvent("onActive",[this.togglers[b],a])}else{for(var c in this.effects)a.setStyle(c,0)}},this);this.parent(this.elements);if($chk(this.options.display))this.display(this.options.display)},addSection:function(a,b,c){a=$(a);b=$(b);var d=this.togglers.contains(a);var e=this.togglers.length;this.togglers.include(a);this.elements.include(b);if(e&&(!d||c)){c=$pick(c,e-1);a.injectBefore(this.togglers[c]);b.injectAfter(a)}else if(this.container&&!d){a.inject(this.container);b.inject(this.container)}var f=this.togglers.indexOf(a);a.addEvent("click",this.display.bind(this,f));if(this.options.height)b.setStyles({"padding-top":0,"border-top":"none","padding-bottom":0,"border-bottom":"none"});if(this.options.width)b.setStyles({"padding-left":0,"border-left":"none","padding-right":0,"border-right":"none"});b.fullOpacity=1;if(this.options.fixedWidth)b.fullWidth=this.options.fixedWidth;if(this.options.fixedHeight)b.fullHeight=this.options.fixedHeight;b.setStyle("overflow","hidden");if(!d){for(var g in this.effects)b.setStyle(g,0)}return this},display:function(a){a=$type(a)=="element"?this.elements.indexOf(a):a;if(this.timer&&this.options.wait||a===this.previous&&!this.options.alwaysHide)return this;this.previous=a;var b={};this.elements.each(function(c,d){b[d]={};var e=d!=a||this.options.alwaysHide&&c.offsetHeight>0;this.fireEvent(e?"onBackground":"onActive",[this.togglers[d],c]);for(var f in this.effects)b[d][f]=e?0:c[this.effects[f]]},this);return this.start(b)},showThisHideOpen:function(a){return this.display(a)}});Fx.Accordion=Accordion
/*
Name:    Highslide JS
Version: 4.1.8 (October 27 2009)
*/
if(!hs){var hs={lang:{cssDirection:"ltr",loadingText:"Loading...",loadingTitle:"Click to cancel",focusTitle:"Click to bring to front",fullExpandTitle:"Expand to actual size (f)",creditsText:"Powered by <i>Highslide JS</i>",creditsTitle:"Go to the Highslide JS homepage",previousText:"Previous",nextText:"Next",moveText:"Move",closeText:"Close",closeTitle:"Close (esc)",resizeTitle:"Resize",playText:"Play",playTitle:"Play slideshow (spacebar)",pauseText:"Pause",pauseTitle:"Pause slideshow (spacebar)",previousTitle:"Previous (arrow left)",nextTitle:"Next (arrow right)",moveTitle:"Move",fullExpandText:"1:1",number:"Image %1 of %2",restoreTitle:"Click to close image, click and drag to move. Use arrow keys for next and previous."},graphicsDir:"highslide/graphics/",expandCursor:"zoomin.cur",restoreCursor:"zoomout.cur",expandDuration:250,restoreDuration:250,marginLeft:15,marginRight:15,marginTop:15,marginBottom:15,zIndexCounter:1001,loadingOpacity:0.75,allowMultipleInstances:true,numberOfImagesToPreload:5,outlineWhileAnimating:2,outlineStartOffset:3,padToMinWidth:false,fullExpandPosition:"bottom right",fullExpandOpacity:1,showCredits:true,creditsHref:"http://highslide.com/",creditsTarget:"_self",enableKeyListener:true,openerTagNames:["a","area"],transitions:[],transitionDuration:250,dimmingOpacity:0,dimmingDuration:50,allowWidthReduction:false,allowHeightReduction:true,preserveContent:true,objectLoadTime:"before",cacheAjax:true,anchor:"auto",align:"auto",targetX:null,targetY:null,dragByHeading:true,minWidth:200,minHeight:200,allowSizeReduction:true,outlineType:"drop-shadow",skin:{controls:'<div class="highslide-controls"><ul><li class="highslide-previous"><a href="#" title="{hs.lang.previousTitle}"><span>{hs.lang.previousText}</span></a></li><li class="highslide-play"><a href="#" title="{hs.lang.playTitle}"><span>{hs.lang.playText}</span></a></li><li class="highslide-pause"><a href="#" title="{hs.lang.pauseTitle}"><span>{hs.lang.pauseText}</span></a></li><li class="highslide-next"><a href="#" title="{hs.lang.nextTitle}"><span>{hs.lang.nextText}</span></a></li><li class="highslide-move"><a href="#" title="{hs.lang.moveTitle}"><span>{hs.lang.moveText}</span></a></li><li class="highslide-full-expand"><a href="#" title="{hs.lang.fullExpandTitle}"><span>{hs.lang.fullExpandText}</span></a></li><li class="highslide-close"><a href="#" title="{hs.lang.closeTitle}" ><span>{hs.lang.closeText}</span></a></li></ul></div>',contentWrapper:'<div class="highslide-header"><ul><li class="highslide-previous"><a href="#" title="{hs.lang.previousTitle}" onclick="return hs.previous(this)"><span>{hs.lang.previousText}</span></a></li><li class="highslide-next"><a href="#" title="{hs.lang.nextTitle}" onclick="return hs.next(this)"><span>{hs.lang.nextText}</span></a></li><li class="highslide-move"><a href="#" title="{hs.lang.moveTitle}" onclick="return false"><span>{hs.lang.moveText}</span></a></li><li class="highslide-close"><a href="#" title="{hs.lang.closeTitle}" onclick="return hs.close(this)"><span>{hs.lang.closeText}</span></a></li></ul></div><div class="highslide-body"></div><div class="highslide-footer"><div><span class="highslide-resize" title="{hs.lang.resizeTitle}"><span></span></span></div></div>'},preloadTheseImages:[],continuePreloading:true,expanders:[],overrides:["allowSizeReduction","useBox","anchor","align","targetX","targetY","outlineType","outlineWhileAnimating","captionId","captionText","captionEval","captionOverlay","headingId","headingText","headingEval","headingOverlay","creditsPosition","dragByHeading","autoplay","numberPosition","transitions","dimmingOpacity","width","height","contentId","allowWidthReduction","allowHeightReduction","preserveContent","maincontentId","maincontentText","maincontentEval","objectType","cacheAjax","objectWidth","objectHeight","objectLoadTime","swfOptions","wrapperClassName","minWidth","minHeight","maxWidth","maxHeight","slideshowGroup","easing","easingClose","fadeInOut","src"],overlays:[],idCounter:0,oPos:{x:["leftpanel","left","center","right","rightpanel"],y:["above","top","middle","bottom","below"]},mouse:{},headingOverlay:{},captionOverlay:{},swfOptions:{flashvars:{},params:{},attributes:{}},timers:[],slideshows:[],pendingOutlines:{},sleeping:[],preloadTheseAjax:[],cacheBindings:[],cachedGets:{},clones:{},onReady:[],uaVersion:/Trident\/4\.0/.test(navigator.userAgent)?8:parseFloat((navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1]),ie:(document.all&&!window.opera),safari:/Safari/.test(navigator.userAgent),geckoMac:/Macintosh.+rv:1\.[0-8].+Gecko/.test(navigator.userAgent),$:function(a){if(a){return document.getElementById(a)}},push:function(a,b){a[a.length]=b},createElement:function(a,f,e,d,c){var b=document.createElement(a);if(f){hs.extend(b,f)}if(c){hs.setStyles(b,{padding:0,border:"none",margin:0})}if(e){hs.setStyles(b,e)}if(d){d.appendChild(b)}return b},extend:function(b,c){for(var a in c){b[a]=c[a]}return b},setStyles:function(b,c){for(var a in c){if(hs.ie&&a=="opacity"){if(c[a]>0.99){b.style.removeAttribute("filter")}else{b.style.filter="alpha(opacity="+(c[a]*100)+")"}}else{b.style[a]=c[a]}}},animate:function(f,a,d){var c,g,j;if(typeof d!="object"||d===null){var i=arguments;d={duration:i[2],easing:i[3],complete:i[4]}}if(typeof d.duration!="number"){d.duration=250}d.easing=Math[d.easing]||Math.easeInQuad;d.curAnim=hs.extend({},a);for(var b in a){var h=new hs.fx(f,d,b);c=parseFloat(hs.css(f,b))||0;g=parseFloat(a[b]);j=b!="opacity"?"px":"";h.custom(c,g,j)}},css:function(a,c){if(document.defaultView){return document.defaultView.getComputedStyle(a,null).getPropertyValue(c)}else{if(c=="opacity"){c="filter"}var b=a.currentStyle[c.replace(/\-(\w)/g,function(e,d){return d.toUpperCase()})];if(c=="filter"){b=b.replace(/alpha\(opacity=([0-9]+)\)/,function(e,d){return d/100})}return b===""?1:b}},getPageSize:function(){var f=document,b=window,e=f.compatMode&&f.compatMode!="BackCompat"?f.documentElement:f.body;var c=hs.ie?e.clientWidth:(f.documentElement.clientWidth||self.innerWidth),a=hs.ie?e.clientHeight:self.innerHeight;hs.page={width:c,height:a,scrollLeft:hs.ie?e.scrollLeft:pageXOffset,scrollTop:hs.ie?e.scrollTop:pageYOffset}},getPosition:function(c){if(/area/i.test(c.tagName)){var e=document.getElementsByTagName("img");for(var b=0;b<e.length;b++){var a=e[b].useMap;if(a&&a.replace(/^.*?#/,"")==c.parentNode.name){c=e[b];break}}}var d={x:c.offsetLeft,y:c.offsetTop};while(c.offsetParent){c=c.offsetParent;d.x+=c.offsetLeft;d.y+=c.offsetTop;if(c!=document.body&&c!=document.documentElement){d.x-=c.scrollLeft;d.y-=c.scrollTop}}return d},expand:function(b,h,f,d){if(!b){b=hs.createElement("a",null,{display:"none"},hs.container)}if(typeof b.getParams=="function"){return h}if(d=="html"){for(var c=0;c<hs.sleeping.length;c++){if(hs.sleeping[c]&&hs.sleeping[c].a==b){hs.sleeping[c].awake();hs.sleeping[c]=null;return false}}hs.hasHtmlExpanders=true}try{new hs.Expander(b,h,f,d);return false}catch(g){return true}},htmlExpand:function(b,d,c){return hs.expand(b,d,c,"html")},getSelfRendered:function(){return hs.createElement("div",{className:"highslide-html-content",innerHTML:hs.replaceLang(hs.skin.contentWrapper)})},getElementByClass:function(e,c,d){var b=e.getElementsByTagName(c);for(var a=0;a<b.length;a++){if((new RegExp(d)).test(b[a].className)){return b[a]}}return null},replaceLang:function(c){c=c.replace(/\s/g," ");var b=/{hs\.lang\.([^}]+)\}/g,d=c.match(b),e;if(d){for(var a=0;a<d.length;a++){e=d[a].replace(b,"$1");if(typeof hs.lang[e]!="undefined"){c=c.replace(d[a],hs.lang[e])}}}return c},setClickEvents:function(){var b=document.getElementsByTagName("a");for(var a=0;a<b.length;a++){var c=hs.isUnobtrusiveAnchor(b[a]);if(c&&!b[a].hsHasSetClick){(function(){var d=c;if(hs.fireEvent(hs,"onSetClickEvent",{element:b[a],type:d})){b[a].onclick=(c=="image")?function(){return hs.expand(this)}:function(){return hs.htmlExpand(this,{objectType:d})}}})();b[a].hsHasSetClick=true}}hs.getAnchors()},isUnobtrusiveAnchor:function(a){if(a.rel=="highslide"){return"image"}else{if(a.rel=="highslide-ajax"){return"ajax"}else{if(a.rel=="highslide-iframe"){return"iframe"}else{if(a.rel=="highslide-swf"){return"swf"}}}}},getCacheBinding:function(b){for(var d=0;d<hs.cacheBindings.length;d++){if(hs.cacheBindings[d][0]==b){var e=hs.cacheBindings[d][1];hs.cacheBindings[d][1]=e.cloneNode(1);return e}}return null},preloadAjax:function(f){var b=hs.getAnchors();for(var d=0;d<b.htmls.length;d++){var c=b.htmls[d];if(hs.getParam(c,"objectType")=="ajax"&&hs.getParam(c,"cacheAjax")){hs.push(hs.preloadTheseAjax,c)}}hs.preloadAjaxElement(0)},preloadAjaxElement:function(d){if(!hs.preloadTheseAjax[d]){return}var b=hs.preloadTheseAjax[d];var c=hs.getNode(hs.getParam(b,"contentId"));if(!c){c=hs.getSelfRendered()}var e=new hs.Ajax(b,c,1);e.onError=function(){};e.onLoad=function(){hs.push(hs.cacheBindings,[b,c]);hs.preloadAjaxElement(d+1)};e.run()},focusTopmost:function(){var c=0,b=-1,a=hs.expanders,e,f;for(var d=0;d<a.length;d++){e=a[d];if(e){f=e.wrapper.style.zIndex;if(f&&f>c){c=f;b=d}}}if(b==-1){hs.focusKey=-1}else{a[b].focus()}},getParam:function(b,d){b.getParams=b.onclick;var c=b.getParams?b.getParams():null;b.getParams=null;return(c&&typeof c[d]!="undefined")?c[d]:(typeof hs[d]!="undefined"?hs[d]:null)},getSrc:function(b){var c=hs.getParam(b,"src");if(c){return c}return b.href},getNode:function(e){var c=hs.$(e),d=hs.clones[e],b={};if(!c&&!d){return null}if(!d){d=c.cloneNode(true);d.id="";hs.clones[e]=d;return c}else{return d.cloneNode(true)}},discardElement:function(a){if(a){hs.garbageBin.appendChild(a)}hs.garbageBin.innerHTML=""},dim:function(a){if(!hs.dimmer){hs.dimmer=hs.createElement("div",{className:"highslide-dimming highslide-viewport-size",owner:"",onclick:function(){if(hs.fireEvent(hs,"onDimmerClick")){hs.close()}}},{visibility:"visible",opacity:0},hs.container,true)}hs.dimmer.style.display="";hs.dimmer.owner+="|"+a.key;if(hs.geckoMac&&hs.dimmingGeckoFix){hs.setStyles(hs.dimmer,{background:"url("+hs.graphicsDir+"geckodimmer.png)",opacity:1})}else{hs.animate(hs.dimmer,{opacity:a.dimmingOpacity},hs.dimmingDuration)}},undim:function(a){if(!hs.dimmer){return}if(typeof a!="undefined"){hs.dimmer.owner=hs.dimmer.owner.replace("|"+a,"")}if((typeof a!="undefined"&&hs.dimmer.owner!="")||(hs.upcoming&&hs.getParam(hs.upcoming,"dimmingOpacity"))){return}if(hs.geckoMac&&hs.dimmingGeckoFix){hs.dimmer.style.display="none"}else{hs.animate(hs.dimmer,{opacity:0},hs.dimmingDuration,null,function(){hs.dimmer.style.display="none"})}},transit:function(a,d){var b=d=d||hs.getExpander();if(hs.upcoming){return false}else{hs.last=b}try{hs.upcoming=a;a.onclick()}catch(c){hs.last=hs.upcoming=null}try{if(!a||d.transitions[1]!="crossfade"){d.close()}}catch(c){}return false},previousOrNext:function(a,c){var b=hs.getExpander(a);if(b){return hs.transit(b.getAdjacentAnchor(c),b)}else{return false}},previous:function(a){return hs.previousOrNext(a,-1)},next:function(a){return hs.previousOrNext(a,1)},keyHandler:function(a){if(!a){a=window.event}if(!a.target){a.target=a.srcElement}if(typeof a.target.form!="undefined"){return true}if(!hs.fireEvent(hs,"onKeyDown",a)){return true}var b=hs.getExpander();var c=null;switch(a.keyCode){case 70:if(b){b.doFullExpand()}return true;case 32:c=2;break;case 34:case 39:case 40:c=1;break;case 8:case 33:case 37:case 38:c=-1;break;case 27:case 13:c=0}if(c!==null){if(c!=2){hs.removeEventListener(document,window.opera?"keypress":"keydown",hs.keyHandler)}if(!hs.enableKeyListener){return true}if(a.preventDefault){a.preventDefault()}else{a.returnValue=false}if(b){if(c==0){b.close()}else{if(c==2){if(b.slideshow){b.slideshow.hitSpace()}}else{if(b.slideshow){b.slideshow.pause()}hs.previousOrNext(b.key,c)}}return false}}return true},registerOverlay:function(a){hs.push(hs.overlays,hs.extend(a,{hsId:"hsId"+hs.idCounter++}))},addSlideshow:function(b){var d=b.slideshowGroup;if(typeof d=="object"){for(var c=0;c<d.length;c++){var e={};for(var a in b){e[a]=b[a]}e.slideshowGroup=d[c];hs.push(hs.slideshows,e)}}else{hs.push(hs.slideshows,b)}},getWrapperKey:function(c,b){var e,d=/^highslide-wrapper-([0-9]+)$/;e=c;while(e.parentNode){if(e.hsKey!==undefined){return e.hsKey}if(e.id&&d.test(e.id)){return e.id.replace(d,"$1")}e=e.parentNode}if(!b){e=c;while(e.parentNode){if(e.tagName&&hs.isHsAnchor(e)){for(var a=0;a<hs.expanders.length;a++){var f=hs.expanders[a];if(f&&f.a==e){return a}}}e=e.parentNode}}return null},getExpander:function(b,a){if(typeof b=="undefined"){return hs.expanders[hs.focusKey]||null}if(typeof b=="number"){return hs.expanders[b]||null}if(typeof b=="string"){b=hs.$(b)}return hs.expanders[hs.getWrapperKey(b,a)]||null},isHsAnchor:function(b){return(b.onclick&&b.onclick.toString().replace(/\s/g," ").match(/hs.(htmlE|e)xpand/))},reOrder:function(){for(var a=0;a<hs.expanders.length;a++){if(hs.expanders[a]&&hs.expanders[a].isExpanded){hs.focusTopmost()}}},fireEvent:function(c,a,b){return c&&c[a]?(c[a](c,b)!==false):true},mouseClickHandler:function(d){if(!d){d=window.event}if(d.button>1){return true}if(!d.target){d.target=d.srcElement}var b=d.target;while(b.parentNode&&!(/highslide-(image|move|html|resize)/.test(b.className))){b=b.parentNode}var f=hs.getExpander(b);if(f&&(f.isClosing||!f.isExpanded)){return true}if(f&&d.type=="mousedown"){if(d.target.form){return true}var a=b.className.match(/highslide-(image|move|resize)/);if(a){hs.dragArgs={exp:f,type:a[1],left:f.x.pos,width:f.x.size,top:f.y.pos,height:f.y.size,clickX:d.clientX,clickY:d.clientY};hs.addEventListener(document,"mousemove",hs.dragHandler);if(d.preventDefault){d.preventDefault()}if(/highslide-(image|html)-blur/.test(f.content.className)){f.focus();hs.hasFocused=true}return false}else{if(/highslide-html/.test(b.className)&&hs.focusKey!=f.key){f.focus();f.doShowHide("hidden")}}}else{if(d.type=="mouseup"){hs.removeEventListener(document,"mousemove",hs.dragHandler);if(hs.dragArgs){if(hs.styleRestoreCursor&&hs.dragArgs.type=="image"){hs.dragArgs.exp.content.style.cursor=hs.styleRestoreCursor}var c=hs.dragArgs.hasDragged;if(!c&&!hs.hasFocused&&!/(move|resize)/.test(hs.dragArgs.type)){if(hs.fireEvent(f,"onImageClick")){f.close()}}else{if(c||(!c&&hs.hasHtmlExpanders)){hs.dragArgs.exp.doShowHide("hidden")}}if(hs.dragArgs.exp.releaseMask){hs.dragArgs.exp.releaseMask.style.display="none"}if(c){hs.fireEvent(hs.dragArgs.exp,"onDrop",hs.dragArgs)}hs.hasFocused=false;hs.dragArgs=null}else{if(/highslide-image-blur/.test(b.className)){b.style.cursor=hs.styleRestoreCursor}}}}return false},dragHandler:function(c){if(!hs.dragArgs){return true}if(!c){c=window.event}var b=hs.dragArgs,d=b.exp;if(d.iframe){if(!d.releaseMask){d.releaseMask=hs.createElement("div",null,{position:"absolute",width:d.x.size+"px",height:d.y.size+"px",left:d.x.cb+"px",top:d.y.cb+"px",zIndex:4,background:(hs.ie?"white":"none"),opacity:0.01},d.wrapper,true)}if(d.releaseMask.style.display=="none"){d.releaseMask.style.display=""}}b.dX=c.clientX-b.clickX;b.dY=c.clientY-b.clickY;var f=Math.sqrt(Math.pow(b.dX,2)+Math.pow(b.dY,2));if(!b.hasDragged){b.hasDragged=(b.type!="image"&&f>0)||(f>(hs.dragSensitivity||5))}if(b.hasDragged&&c.clientX>5&&c.clientY>5){if(!hs.fireEvent(d,"onDrag",b)){return false}if(b.type=="resize"){d.resize(b)}else{d.moveTo(b.left+b.dX,b.top+b.dY);if(b.type=="image"){d.content.style.cursor="move"}}}return false},wrapperMouseHandler:function(c){try{if(!c){c=window.event}var b=/mouseover/i.test(c.type);if(!c.target){c.target=c.srcElement}if(hs.ie){c.relatedTarget=b?c.fromElement:c.toElement}var d=hs.getExpander(c.target);if(!d.isExpanded){return}if(!d||!c.relatedTarget||hs.getExpander(c.relatedTarget,true)==d||hs.dragArgs){return}hs.fireEvent(d,b?"onMouseOver":"onMouseOut",c);for(var a=0;a<d.overlays.length;a++){(function(){var e=hs.$("hsId"+d.overlays[a]);if(e&&e.hideOnMouseOut){if(b){hs.setStyles(e,{visibility:"visible",display:""})}hs.animate(e,{opacity:b?e.opacity:0},e.dur)}})()}}catch(c){}},addEventListener:function(a,c,b){if(a==document&&c=="ready"){hs.push(hs.onReady,b)}try{a.addEventListener(c,b,false)}catch(d){try{a.detachEvent("on"+c,b);a.attachEvent("on"+c,b)}catch(d){a["on"+c]=b}}},removeEventListener:function(a,c,b){try{a.removeEventListener(c,b,false)}catch(d){try{a.detachEvent("on"+c,b)}catch(d){a["on"+c]=null}}},preloadFullImage:function(b){if(hs.continuePreloading&&hs.preloadTheseImages[b]&&hs.preloadTheseImages[b]!="undefined"){var a=document.createElement("img");a.onload=function(){a=null;hs.preloadFullImage(b+1)};a.src=hs.preloadTheseImages[b]}},preloadImages:function(c){if(c&&typeof c!="object"){hs.numberOfImagesToPreload=c}var a=hs.getAnchors();for(var b=0;b<a.images.length&&b<hs.numberOfImagesToPreload;b++){hs.push(hs.preloadTheseImages,hs.getSrc(a.images[b]))}if(hs.outlineType){new hs.Outline(hs.outlineType,function(){hs.preloadFullImage(0)})}else{hs.preloadFullImage(0)}if(hs.restoreCursor){var d=hs.createElement("img",{src:hs.graphicsDir+hs.restoreCursor})}},init:function(){if(!hs.container){hs.getPageSize();hs.ieLt7=hs.ie&&hs.uaVersion<7;hs.ie6SSL=hs.ieLt7&&location.protocol=="https:";for(var a in hs.langDefaults){if(typeof hs[a]!="undefined"){hs.lang[a]=hs[a]}else{if(typeof hs.lang[a]=="undefined"&&typeof hs.langDefaults[a]!="undefined"){hs.lang[a]=hs.langDefaults[a]}}}hs.container=hs.createElement("div",{className:"highslide-container"},{position:"absolute",left:0,top:0,width:"100%",zIndex:hs.zIndexCounter,direction:"ltr"},document.body,true);hs.loading=hs.createElement("a",{className:"highslide-loading",title:hs.lang.loadingTitle,innerHTML:hs.lang.loadingText,href:"javascript:;"},{position:"absolute",top:"-9999px",opacity:hs.loadingOpacity,zIndex:1},hs.container);hs.garbageBin=hs.createElement("div",null,{display:"none"},hs.container);hs.viewport=hs.createElement("div",{className:"highslide-viewport highslide-viewport-size"},{visibility:(hs.safari&&hs.uaVersion<525)?"visible":"hidden"},hs.container,1);hs.clearing=hs.createElement("div",null,{clear:"both",paddingTop:"1px"},null,true);Math.linearTween=function(f,e,h,g){return h*f/g+e};Math.easeInQuad=function(f,e,h,g){return h*(f/=g)*f+e};Math.easeOutQuad=function(f,e,h,g){return -h*(f/=g)*(f-2)+e};hs.hideSelects=hs.ieLt7;hs.hideIframes=((window.opera&&hs.uaVersion<9)||navigator.vendor=="KDE"||(hs.ie&&hs.uaVersion<5.5));hs.fireEvent(this,"onActivate")}},ready:function(){if(hs.isReady){return}hs.isReady=true;for(var a=0;a<hs.onReady.length;a++){hs.onReady[a]()}},updateAnchors:function(){var a,d,l=[],h=[],k=[],b={},m;for(var e=0;e<hs.openerTagNames.length;e++){d=document.getElementsByTagName(hs.openerTagNames[e]);for(var c=0;c<d.length;c++){a=d[c];m=hs.isHsAnchor(a);if(m){hs.push(l,a);if(m[0]=="hs.expand"){hs.push(h,a)}else{if(m[0]=="hs.htmlExpand"){hs.push(k,a)}}var f=hs.getParam(a,"slideshowGroup")||"none";if(!b[f]){b[f]=[]}hs.push(b[f],a)}}}hs.anchors={all:l,groups:b,images:h,htmls:k};return hs.anchors},getAnchors:function(){return hs.anchors||hs.updateAnchors()},close:function(a){var b=hs.getExpander(a);if(b){b.close()}return false}};hs.fx=function(b,a,c){this.options=a;this.elem=b;this.prop=c;if(!a.orig){a.orig={}}};hs.fx.prototype={update:function(){(hs.fx.step[this.prop]||hs.fx.step._default)(this);if(this.options.step){this.options.step.call(this.elem,this.now,this)}},custom:function(e,d,c){this.startTime=(new Date()).getTime();this.start=e;this.end=d;this.unit=c;this.now=this.start;this.pos=this.state=0;var a=this;function b(f){return a.step(f)}b.elem=this.elem;if(b()&&hs.timers.push(b)==1){hs.timerId=setInterval(function(){var g=hs.timers;for(var f=0;f<g.length;f++){if(!g[f]()){g.splice(f--,1)}}if(!g.length){clearInterval(hs.timerId)}},13)}},step:function(d){var c=(new Date()).getTime();if(d||c>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var a=true;for(var b in this.options.curAnim){if(this.options.curAnim[b]!==true){a=false}}if(a){if(this.options.complete){this.options.complete.call(this.elem)}}return false}else{var e=c-this.startTime;this.state=e/this.options.duration;this.pos=this.options.easing(e,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};hs.extend(hs.fx,{step:{opacity:function(a){hs.setStyles(a.elem,{opacity:a.now})},_default:function(a){try{if(a.elem.style&&a.elem.style[a.prop]!=null){a.elem.style[a.prop]=a.now+a.unit}else{a.elem[a.prop]=a.now}}catch(b){}}}});hs.Outline=function(g,e){this.onLoad=e;this.outlineType=g;var a=hs.uaVersion,f;this.hasAlphaImageLoader=hs.ie&&a>=5.5&&a<7;if(!g){if(e){e()}return}hs.init();this.table=hs.createElement("table",{cellSpacing:0},{visibility:"hidden",position:"absolute",borderCollapse:"collapse",width:0},hs.container,true);var b=hs.createElement("tbody",null,null,this.table,1);this.td=[];for(var c=0;c<=8;c++){if(c%3==0){f=hs.createElement("tr",null,{height:"auto"},b,true)}this.td[c]=hs.createElement("td",null,null,f,true);var d=c!=4?{lineHeight:0,fontSize:0}:{position:"relative"};hs.setStyles(this.td[c],d)}this.td[4].className=g+" highslide-outline";this.preloadGraphic()};hs.Outline.prototype={preloadGraphic:function(){var b=hs.graphicsDir+(hs.outlinesDir||"outlines/")+this.outlineType+".png";var a=hs.safari?hs.container:null;this.graphic=hs.createElement("img",null,{position:"absolute",top:"-9999px"},a,true);var c=this;this.graphic.onload=function(){c.onGraphicLoad()};this.graphic.src=b},onGraphicLoad:function(){var d=this.offset=this.graphic.width/4,f=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],c={height:(2*d)+"px",width:(2*d)+"px"};for(var b=0;b<=8;b++){if(f[b]){if(this.hasAlphaImageLoader){var a=(b==1||b==7)?"100%":this.graphic.width+"px";var e=hs.createElement("div",null,{width:"100%",height:"100%",position:"relative",overflow:"hidden"},this.td[b],true);hs.createElement("div",null,{filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='"+this.graphic.src+"')",position:"absolute",width:a,height:this.graphic.height+"px",left:(f[b][0]*d)+"px",top:(f[b][1]*d)+"px"},e,true)}else{hs.setStyles(this.td[b],{background:"url("+this.graphic.src+") "+(f[b][0]*d)+"px "+(f[b][1]*d)+"px"})}if(window.opera&&(b==3||b==5)){hs.createElement("div",null,c,this.td[b],true)}hs.setStyles(this.td[b],c)}}this.graphic=null;if(hs.pendingOutlines[this.outlineType]){hs.pendingOutlines[this.outlineType].destroy()}hs.pendingOutlines[this.outlineType]=this;if(this.onLoad){this.onLoad()}},setPosition:function(g,e,c,b,f){var d=this.exp,a=d.wrapper.style,e=e||0,g=g||{x:d.x.pos+e,y:d.y.pos+e,w:d.x.get("wsize")-2*e,h:d.y.get("wsize")-2*e};if(c){this.table.style.visibility=(g.h>=4*this.offset)?"visible":"hidden"}hs.setStyles(this.table,{left:(g.x-this.offset)+"px",top:(g.y-this.offset)+"px",width:(g.w+2*this.offset)+"px"});g.w-=2*this.offset;g.h-=2*this.offset;hs.setStyles(this.td[4],{width:g.w>=0?g.w+"px":0,height:g.h>=0?g.h+"px":0});if(this.hasAlphaImageLoader){this.td[3].style.height=this.td[5].style.height=this.td[4].style.height}},destroy:function(a){if(a){this.table.style.visibility="hidden"}else{hs.discardElement(this.table)}}};hs.Dimension=function(b,a){this.exp=b;this.dim=a;this.ucwh=a=="x"?"Width":"Height";this.wh=this.ucwh.toLowerCase();this.uclt=a=="x"?"Left":"Top";this.lt=this.uclt.toLowerCase();this.ucrb=a=="x"?"Right":"Bottom";this.rb=this.ucrb.toLowerCase();this.p1=this.p2=0};hs.Dimension.prototype={get:function(a){switch(a){case"loadingPos":return this.tpos+this.tb+(this.t-hs.loading["offset"+this.ucwh])/2;case"loadingPosXfade":return this.pos+this.cb+this.p1+(this.size-hs.loading["offset"+this.ucwh])/2;case"wsize":return this.size+2*this.cb+this.p1+this.p2;case"fitsize":return this.clientSize-this.marginMin-this.marginMax;case"maxsize":return this.get("fitsize")-2*this.cb-this.p1-this.p2;case"opos":return this.pos-(this.exp.outline?this.exp.outline.offset:0);case"osize":return this.get("wsize")+(this.exp.outline?2*this.exp.outline.offset:0);case"imgPad":return this.imgSize?Math.round((this.size-this.imgSize)/2):0}},calcBorders:function(){this.cb=(this.exp.content["offset"+this.ucwh]-this.t)/2;this.marginMax=hs["margin"+this.ucrb]},calcThumb:function(){this.t=this.exp.el[this.wh]?parseInt(this.exp.el[this.wh]):this.exp.el["offset"+this.ucwh];this.tpos=this.exp.tpos[this.dim];this.tb=(this.exp.el["offset"+this.ucwh]-this.t)/2;if(this.tpos==0||this.tpos==-1){this.tpos=(hs.page[this.wh]/2)+hs.page["scroll"+this.uclt]}},calcExpanded:function(){var a=this.exp;this.justify="auto";if(a.align=="center"){this.justify="center"}else{if(new RegExp(this.lt).test(a.anchor)){this.justify=null}else{if(new RegExp(this.rb).test(a.anchor)){this.justify="max"}}}this.pos=this.tpos-this.cb+this.tb;if(this.maxHeight&&this.dim=="x"){a.maxWidth=Math.min(a.maxWidth||this.full,a.maxHeight*this.full/a.y.full)}this.size=Math.min(this.full,a["max"+this.ucwh]||this.full);this.minSize=a.allowSizeReduction?Math.min(a["min"+this.ucwh],this.full):this.full;if(a.isImage&&a.useBox){this.size=a[this.wh];this.imgSize=this.full}if(this.dim=="x"&&hs.padToMinWidth){this.minSize=a.minWidth}this.target=a["target"+this.dim.toUpperCase()];this.marginMin=hs["margin"+this.uclt];this.scroll=hs.page["scroll"+this.uclt];this.clientSize=hs.page[this.wh]},setSize:function(a){var f=this.exp;if(f.isImage&&(f.useBox||hs.padToMinWidth)){this.imgSize=a;this.size=Math.max(this.size,this.imgSize);f.content.style[this.lt]=this.get("imgPad")+"px"}else{this.size=a}f.content.style[this.wh]=a+"px";f.wrapper.style[this.wh]=this.get("wsize")+"px";if(f.outline){f.outline.setPosition()}if(f.releaseMask){f.releaseMask.style[this.wh]=a+"px"}if(this.dim=="y"&&f.iDoc&&f.body.style.height!="auto"){try{f.iDoc.body.style.overflow="auto"}catch(b){}}if(f.isHtml){var c=f.scrollerDiv;if(this.sizeDiff===undefined){this.sizeDiff=f.innerContent["offset"+this.ucwh]-c["offset"+this.ucwh]}c.style[this.wh]=(this.size-this.sizeDiff)+"px";if(this.dim=="x"){f.mediumContent.style.width="auto"}if(f.body){f.body.style[this.wh]="auto"}}if(this.dim=="x"&&f.overlayBox){f.sizeOverlayBox(true)}if(this.dim=="x"&&f.slideshow&&f.isImage){if(a==this.full){f.slideshow.disable("full-expand")}else{f.slideshow.enable("full-expand")}}},setPos:function(a){this.pos=a;this.exp.wrapper.style[this.lt]=a+"px";if(this.exp.outline){this.exp.outline.setPosition()}}};hs.Expander=function(k,f,b,l){if(document.readyState&&hs.ie&&!hs.isReady){hs.addEventListener(document,"ready",function(){new hs.Expander(k,f,b,l)});return}this.a=k;this.custom=b;this.contentType=l||"image";this.isHtml=(l=="html");this.isImage=!this.isHtml;hs.continuePreloading=false;this.overlays=[];this.last=hs.last;hs.last=null;hs.init();var m=this.key=hs.expanders.length;for(var g=0;g<hs.overrides.length;g++){var c=hs.overrides[g];this[c]=f&&typeof f[c]!="undefined"?f[c]:hs[c]}if(!this.src){this.src=k.href}var d=(f&&f.thumbnailId)?hs.$(f.thumbnailId):k;d=this.thumb=d.getElementsByTagName("img")[0]||d;this.thumbsUserSetId=d.id||k.id;if(!hs.fireEvent(this,"onInit")){return true}for(var g=0;g<hs.expanders.length;g++){if(hs.expanders[g]&&hs.expanders[g].a==k&&!(this.last&&this.transitions[1]=="crossfade")){hs.expanders[g].focus();return false}}if(!hs.allowSimultaneousLoading){for(var g=0;g<hs.expanders.length;g++){if(hs.expanders[g]&&hs.expanders[g].thumb!=d&&!hs.expanders[g].onLoadStarted){hs.expanders[g].cancelLoading()}}}hs.expanders[m]=this;if(!hs.allowMultipleInstances&&!hs.upcoming){if(hs.expanders[m-1]){hs.expanders[m-1].close()}if(typeof hs.focusKey!="undefined"&&hs.expanders[hs.focusKey]){hs.expanders[hs.focusKey].close()}}this.el=d;this.tpos=hs.getPosition(d);hs.getPageSize();var j=this.x=new hs.Dimension(this,"x");j.calcThumb();var h=this.y=new hs.Dimension(this,"y");h.calcThumb();if(/area/i.test(d.tagName)){this.getImageMapAreaCorrection(d)}this.wrapper=hs.createElement("div",{id:"highslide-wrapper-"+this.key,className:"highslide-wrapper "+this.wrapperClassName},{visibility:"hidden",position:"absolute",zIndex:hs.zIndexCounter+=2},null,true);this.wrapper.onmouseover=this.wrapper.onmouseout=hs.wrapperMouseHandler;if(this.contentType=="image"&&this.outlineWhileAnimating==2){this.outlineWhileAnimating=0}if(!this.outlineType||(this.last&&this.isImage&&this.transitions[1]=="crossfade")){this[this.contentType+"Create"]()}else{if(hs.pendingOutlines[this.outlineType]){this.connectOutline();this[this.contentType+"Create"]()}else{this.showLoading();var e=this;new hs.Outline(this.outlineType,function(){e.connectOutline();e[e.contentType+"Create"]()})}}return true};hs.Expander.prototype={error:function(a){window.location.href=this.src},connectOutline:function(){var a=this.outline=hs.pendingOutlines[this.outlineType];a.exp=this;a.table.style.zIndex=this.wrapper.style.zIndex-1;hs.pendingOutlines[this.outlineType]=null},showLoading:function(){if(this.onLoadStarted||this.loading){return}this.loading=hs.loading;var c=this;this.loading.onclick=function(){c.cancelLoading()};if(!hs.fireEvent(this,"onShowLoading")){return}var c=this,a=this.x.get("loadingPos")+"px",b=this.y.get("loadingPos")+"px";if(!d&&this.last&&this.transitions[1]=="crossfade"){var d=this.last}if(d){a=d.x.get("loadingPosXfade")+"px";b=d.y.get("loadingPosXfade")+"px";this.loading.style.zIndex=hs.zIndexCounter++}setTimeout(function(){if(c.loading){hs.setStyles(c.loading,{left:a,top:b,zIndex:hs.zIndexCounter++})}},100)},imageCreate:function(){var b=this;var a=document.createElement("img");this.content=a;a.onload=function(){if(hs.expanders[b.key]){b.contentLoaded()}};if(hs.blockRightClick){a.oncontextmenu=function(){return false}}a.className="highslide-image";hs.setStyles(a,{visibility:"hidden",display:"block",position:"absolute",maxWidth:"9999px",zIndex:3});a.title=hs.lang.restoreTitle;if(hs.safari){hs.container.appendChild(a)}if(hs.ie&&hs.flushImgSize){a.src=null}a.src=this.src;this.showLoading()},htmlCreate:function(){if(!hs.fireEvent(this,"onBeforeGetContent")){return}this.content=hs.getCacheBinding(this.a);if(!this.content){this.content=hs.getNode(this.contentId)}if(!this.content){this.content=hs.getSelfRendered()}this.getInline(["maincontent"]);if(this.maincontent){var a=hs.getElementByClass(this.content,"div","highslide-body");if(a){a.appendChild(this.maincontent)}this.maincontent.style.display="block"}hs.fireEvent(this,"onAfterGetContent");var d=this.innerContent=this.content;if(/(swf|iframe)/.test(this.objectType)){this.setObjContainerSize(d)}hs.container.appendChild(this.wrapper);hs.setStyles(this.wrapper,{position:"static",padding:"0 "+hs.marginRight+"px 0 "+hs.marginLeft+"px"});this.content=hs.createElement("div",{className:"highslide-html"},{position:"relative",zIndex:3,overflow:"hidden"},this.wrapper);this.mediumContent=hs.createElement("div",null,null,this.content,1);this.mediumContent.appendChild(d);hs.setStyles(d,{position:"relative",display:"block",direction:hs.lang.cssDirection||""});if(this.width){d.style.width=this.width+"px"}if(this.height){hs.setStyles(d,{height:this.height+"px",overflow:"hidden"})}if(d.offsetWidth<this.minWidth){d.style.width=this.minWidth+"px"}if(this.objectType=="ajax"&&!hs.getCacheBinding(this.a)){this.showLoading();var c=this;var b=new hs.Ajax(this.a,d);b.src=this.src;b.onLoad=function(){if(hs.expanders[c.key]){c.contentLoaded()}};b.onError=function(){location.href=c.src};b.run()}else{if(this.objectType=="iframe"&&this.objectLoadTime=="before"){this.writeExtendedContent()}else{this.contentLoaded()}}},contentLoaded:function(){try{if(!this.content){return}this.content.onload=null;if(this.onLoadStarted){return}else{this.onLoadStarted=true}var j=this.x,g=this.y;if(this.loading){hs.setStyles(this.loading,{top:"-9999px"});this.loading=null;hs.fireEvent(this,"onHideLoading")}if(this.isImage){j.full=this.content.width;g.full=this.content.height;hs.setStyles(this.content,{width:j.t+"px",height:g.t+"px"});this.wrapper.appendChild(this.content);hs.container.appendChild(this.wrapper)}else{if(this.htmlGetSize){this.htmlGetSize()}}j.calcBorders();g.calcBorders();hs.setStyles(this.wrapper,{left:(j.tpos+j.tb-j.cb)+"px",top:(g.tpos+j.tb-g.cb)+"px"});this.initSlideshow();this.getOverlays();var f=j.full/g.full;j.calcExpanded();this.justify(j);g.calcExpanded();this.justify(g);if(this.isHtml){this.htmlSizeOperations()}if(this.overlayBox){this.sizeOverlayBox(0,1)}if(this.allowSizeReduction){if(this.isImage){this.correctRatio(f)}else{this.fitOverlayBox()}var k=this.slideshow;if(k&&this.last&&k.controls&&k.fixedControls){var h=k.overlayOptions.position||"",a;for(var c in hs.oPos){for(var b=0;b<5;b++){a=this[c];if(h.match(hs.oPos[c][b])){a.pos=this.last[c].pos+(this.last[c].p1-a.p1)+(this.last[c].size-a.size)*[0,0,0.5,1,1][b];if(k.fixedControls=="fit"){if(a.pos+a.size+a.p1+a.p2>a.scroll+a.clientSize-a.marginMax){a.pos=a.scroll+a.clientSize-a.size-a.marginMin-a.marginMax-a.p1-a.p2}if(a.pos<a.scroll+a.marginMin){a.pos=a.scroll+a.marginMin}}}}}}if(this.isImage&&this.x.full>(this.x.imgSize||this.x.size)){this.createFullExpand();if(this.overlays.length==1){this.sizeOverlayBox()}}}this.show()}catch(d){this.error(d)}},setObjContainerSize:function(a,d){var b=hs.getElementByClass(a,"DIV","highslide-body");if(/(iframe|swf)/.test(this.objectType)){if(this.objectWidth){b.style.width=this.objectWidth+"px"}if(this.objectHeight){b.style.height=this.objectHeight+"px"}}},writeExtendedContent:function(){if(this.hasExtendedContent){return}var f=this;this.body=hs.getElementByClass(this.innerContent,"DIV","highslide-body");if(this.objectType=="iframe"){this.showLoading();var g=hs.clearing.cloneNode(1);this.body.appendChild(g);this.newWidth=this.innerContent.offsetWidth;if(!this.objectWidth){this.objectWidth=g.offsetWidth}var c=this.innerContent.offsetHeight-this.body.offsetHeight,d=this.objectHeight||hs.page.height-c-hs.marginTop-hs.marginBottom,e=this.objectLoadTime=="before"?' onload="if (hs.expanders['+this.key+"]) hs.expanders["+this.key+'].contentLoaded()" ':"";this.body.innerHTML+='<iframe name="hs'+(new Date()).getTime()+'" frameborder="0" key="'+this.key+'"  style="width:'+this.objectWidth+"px; height:"+d+'px" '+e+' src="'+this.src+'" ></iframe>';this.ruler=this.body.getElementsByTagName("div")[0];this.iframe=this.body.getElementsByTagName("iframe")[0];if(this.objectLoadTime=="after"){this.correctIframeSize()}}if(this.objectType=="swf"){this.body.id=this.body.id||"hs-flash-id-"+this.key;var b=this.swfOptions;if(!b.params){b.params={}}if(typeof b.params.wmode=="undefined"){b.params.wmode="transparent"}if(swfobject){swfobject.embedSWF(this.src,this.body.id,this.objectWidth,this.objectHeight,b.version||"7",b.expressInstallSwfurl,b.flashvars,b.params,b.attributes)}}this.hasExtendedContent=true},htmlGetSize:function(){if(this.iframe&&!this.objectHeight){this.iframe.style.height=this.body.style.height=this.getIframePageHeight()+"px"}this.innerContent.appendChild(hs.clearing);if(!this.x.full){this.x.full=this.innerContent.offsetWidth}this.y.full=this.innerContent.offsetHeight;this.innerContent.removeChild(hs.clearing);if(hs.ie&&this.newHeight>parseInt(this.innerContent.currentStyle.height)){this.newHeight=parseInt(this.innerContent.currentStyle.height)}hs.setStyles(this.wrapper,{position:"absolute",padding:"0"});hs.setStyles(this.content,{width:this.x.t+"px",height:this.y.t+"px"})},getIframePageHeight:function(){var a;try{var d=this.iDoc=this.iframe.contentDocument||this.iframe.contentWindow.document;var b=d.createElement("div");b.style.clear="both";d.body.appendChild(b);a=b.offsetTop;if(hs.ie){a+=parseInt(d.body.currentStyle.marginTop)+parseInt(d.body.currentStyle.marginBottom)-1}}catch(c){a=300}return a},correctIframeSize:function(){var b=this.innerContent.offsetWidth-this.ruler.offsetWidth;hs.discardElement(this.ruler);if(b<0){b=0}var a=this.innerContent.offsetHeight-this.iframe.offsetHeight;if(this.iDoc&&!this.objectHeight&&!this.height&&this.y.size==this.y.full){try{this.iDoc.body.style.overflow="hidden"}catch(c){}}hs.setStyles(this.iframe,{width:Math.abs(this.x.size-b)+"px",height:Math.abs(this.y.size-a)+"px"});hs.setStyles(this.body,{width:this.iframe.style.width,height:this.iframe.style.height});this.scrollingContent=this.iframe;this.scrollerDiv=this.scrollingContent},htmlSizeOperations:function(){this.setObjContainerSize(this.innerContent);if(this.objectType=="swf"&&this.objectLoadTime=="before"){this.writeExtendedContent()}if(this.x.size<this.x.full&&!this.allowWidthReduction){this.x.size=this.x.full}if(this.y.size<this.y.full&&!this.allowHeightReduction){this.y.size=this.y.full}this.scrollerDiv=this.innerContent;hs.setStyles(this.mediumContent,{position:"relative",width:this.x.size+"px"});hs.setStyles(this.innerContent,{border:"none",width:"auto",height:"auto"});var e=hs.getElementByClass(this.innerContent,"DIV","highslide-body");if(e&&!/(iframe|swf)/.test(this.objectType)){var b=e;e=hs.createElement(b.nodeName,null,{overflow:"hidden"},null,true);b.parentNode.insertBefore(e,b);e.appendChild(hs.clearing);e.appendChild(b);var c=this.innerContent.offsetWidth-e.offsetWidth;var a=this.innerContent.offsetHeight-e.offsetHeight;e.removeChild(hs.clearing);var d=hs.safari||navigator.vendor=="KDE"?1:0;hs.setStyles(e,{width:(this.x.size-c-d)+"px",height:(this.y.size-a)+"px",overflow:"auto",position:"relative"});if(d&&b.offsetHeight>e.offsetHeight){e.style.width=(parseInt(e.style.width)+d)+"px"}this.scrollingContent=e;this.scrollerDiv=this.scrollingContent}if(this.iframe&&this.objectLoadTime=="before"){this.correctIframeSize()}if(!this.scrollingContent&&this.y.size<this.mediumContent.offsetHeight){this.scrollerDiv=this.content}if(this.scrollerDiv==this.content&&!this.allowWidthReduction&&!/(iframe|swf)/.test(this.objectType)){this.x.size+=17}if(this.scrollerDiv&&this.scrollerDiv.offsetHeight>this.scrollerDiv.parentNode.offsetHeight){setTimeout("try { hs.expanders["+this.key+"].scrollerDiv.style.overflow = 'auto'; } catch(e) {}",hs.expandDuration)}},getImageMapAreaCorrection:function(d){var h=d.coords.split(",");for(var b=0;b<h.length;b++){h[b]=parseInt(h[b])}if(d.shape.toLowerCase()=="circle"){this.x.tpos+=h[0]-h[2];this.y.tpos+=h[1]-h[2];this.x.t=this.y.t=2*h[2]}else{var f,e,a=f=h[0],g=e=h[1];for(var b=0;b<h.length;b++){if(b%2==0){a=Math.min(a,h[b]);f=Math.max(f,h[b])}else{g=Math.min(g,h[b]);e=Math.max(e,h[b])}}this.x.tpos+=a;this.x.t=f-a;this.y.tpos+=g;this.y.t=e-g}},justify:function(f,b){var g,h=f.target,e=f==this.x?"x":"y";if(h&&h.match(/ /)){g=h.split(" ");h=g[0]}if(h&&hs.$(h)){f.pos=hs.getPosition(hs.$(h))[e];if(g&&g[1]&&g[1].match(/^[-]?[0-9]+px$/)){f.pos+=parseInt(g[1])}if(f.size<f.minSize){f.size=f.minSize}}else{if(f.justify=="auto"||f.justify=="center"){var d=false;var a=f.exp.allowSizeReduction;if(f.justify=="center"){f.pos=Math.round(f.scroll+(f.clientSize+f.marginMin-f.marginMax-f.get("wsize"))/2)}else{f.pos=Math.round(f.pos-((f.get("wsize")-f.t)/2))}if(f.pos<f.scroll+f.marginMin){f.pos=f.scroll+f.marginMin;d=true}if(!b&&f.size<f.minSize){f.size=f.minSize;a=false}if(f.pos+f.get("wsize")>f.scroll+f.clientSize-f.marginMax){if(!b&&d&&a){f.size=Math.min(f.size,f.get(e=="y"?"fitsize":"maxsize"))}else{if(f.get("wsize")<f.get("fitsize")){f.pos=f.scroll+f.clientSize-f.marginMax-f.get("wsize")}else{f.pos=f.scroll+f.marginMin;if(!b&&a){f.size=f.get(e=="y"?"fitsize":"maxsize")}}}}if(!b&&f.size<f.minSize){f.size=f.minSize;a=false}}else{if(f.justify=="max"){f.pos=Math.floor(f.pos-f.size+f.t)}}}if(f.pos<f.marginMin){var c=f.pos;f.pos=f.marginMin;if(a&&!b){f.size=f.size-(f.pos-c)}}},correctRatio:function(c){var a=this.x,g=this.y,e=false,d=Math.min(a.full,a.size),b=Math.min(g.full,g.size),f=(this.useBox||hs.padToMinWidth);if(d/b>c){d=b*c;if(d<a.minSize){d=a.minSize;b=d/c}e=true}else{if(d/b<c){b=d/c;e=true}}if(hs.padToMinWidth&&a.full<a.minSize){a.imgSize=a.full;g.size=g.imgSize=g.full}else{if(this.useBox){a.imgSize=d;g.imgSize=b}else{a.size=d;g.size=b}}e=this.fitOverlayBox(f?null:c,e);if(f&&g.size<g.imgSize){g.imgSize=g.size;a.imgSize=g.size*c}if(e||f){a.pos=a.tpos-a.cb+a.tb;a.minSize=a.size;this.justify(a,true);g.pos=g.tpos-g.cb+g.tb;g.minSize=g.size;this.justify(g,true);if(this.overlayBox){this.sizeOverlayBox()}}},fitOverlayBox:function(b,c){var a=this.x,d=this.y;if(this.overlayBox&&(this.isImage||this.allowHeightReduction)){while(d.size>this.minHeight&&a.size>this.minWidth&&d.get("wsize")>d.get("fitsize")){d.size-=10;if(b){a.size=d.size*b}this.sizeOverlayBox(0,1);c=true}}return c},reflow:function(){if(this.scrollerDiv){var a=/iframe/i.test(this.scrollerDiv.tagName)?(this.getIframePageHeight()+1)+"px":"auto";if(this.body){this.body.style.height=a}this.scrollerDiv.style.height=a;this.y.setSize(this.innerContent.offsetHeight)}},show:function(){var a=this.x,b=this.y;this.doShowHide("hidden");hs.fireEvent(this,"onBeforeExpand");if(this.slideshow&&this.slideshow.thumbstrip){this.slideshow.thumbstrip.selectThumb()}this.changeSize(1,{wrapper:{width:a.get("wsize"),height:b.get("wsize"),left:a.pos,top:b.pos},content:{left:a.p1+a.get("imgPad"),top:b.p1+b.get("imgPad"),width:a.imgSize||a.size,height:b.imgSize||b.size}},hs.expandDuration)},changeSize:function(d,i,b){var k=this.transitions,e=d?(this.last?this.last.a:null):hs.upcoming,j=(k[1]&&e&&hs.getParam(e,"transitions")[1]==k[1])?k[1]:k[0];if(this[j]&&j!="expand"){this[j](d,i);return}if(this.outline&&!this.outlineWhileAnimating){if(d){this.outline.setPosition()}else{this.outline.destroy((this.isHtml&&this.preserveContent))}}if(!d){this.destroyOverlays()}var c=this,h=c.x,g=c.y,f=this.easing;if(!d){f=this.easingClose||f}var a=d?function(){if(c.outline){c.outline.table.style.visibility="visible"}setTimeout(function(){c.afterExpand()},50)}:function(){c.afterClose()};if(d){hs.setStyles(this.wrapper,{width:h.t+"px",height:g.t+"px"})}if(d&&this.isHtml){hs.setStyles(this.wrapper,{left:(h.tpos-h.cb+h.tb)+"px",top:(g.tpos-g.cb+g.tb)+"px"})}if(this.fadeInOut){hs.setStyles(this.wrapper,{opacity:d?0:1});hs.extend(i.wrapper,{opacity:d})}hs.animate(this.wrapper,i.wrapper,{duration:b,easing:f,step:function(n,l){if(c.outline&&c.outlineWhileAnimating&&l.prop=="top"){var m=d?l.pos:1-l.pos;var o={w:h.t+(h.get("wsize")-h.t)*m,h:g.t+(g.get("wsize")-g.t)*m,x:h.tpos+(h.pos-h.tpos)*m,y:g.tpos+(g.pos-g.tpos)*m};c.outline.setPosition(o,0,1)}if(c.isHtml){if(l.prop=="left"){c.mediumContent.style.left=(h.pos-n)+"px"}if(l.prop=="top"){c.mediumContent.style.top=(g.pos-n)+"px"}}}});hs.animate(this.content,i.content,b,f,a);if(d){this.wrapper.style.visibility="visible";this.content.style.visibility="visible";if(this.isHtml){this.innerContent.style.visibility="visible"}this.a.className+=" highslide-active-anchor"}},fade:function(f,h){this.outlineWhileAnimating=false;var c=this,j=f?hs.expandDuration:0;if(f){hs.animate(this.wrapper,h.wrapper,0);hs.setStyles(this.wrapper,{opacity:0,visibility:"visible"});hs.animate(this.content,h.content,0);this.content.style.visibility="visible";hs.animate(this.wrapper,{opacity:1},j,null,function(){c.afterExpand()})}if(this.outline){this.outline.table.style.zIndex=this.wrapper.style.zIndex;var b=f||-1,d=this.outline.offset,a=f?3:d,g=f?d:3;for(var e=a;b*e<=b*g;e+=b,j+=25){(function(){var i=f?g-e:a-e;setTimeout(function(){c.outline.setPosition(0,i,1)},j)})()}}if(f){}else{setTimeout(function(){if(c.outline){c.outline.destroy(c.preserveContent)}c.destroyOverlays();hs.animate(c.wrapper,{opacity:0},hs.restoreDuration,null,function(){c.afterClose()})},j)}},crossfade:function(g,o,p){if(!g){return}var f=this,q=this.last,m=this.x,l=this.y,d=q.x,b=q.y,a=this.wrapper,j=this.content,c=this.overlayBox;hs.removeEventListener(document,"mousemove",hs.dragHandler);hs.setStyles(j,{width:(m.imgSize||m.size)+"px",height:(l.imgSize||l.size)+"px"});if(c){c.style.overflow="visible"}this.outline=q.outline;if(this.outline){this.outline.exp=f}q.outline=null;var i=hs.createElement("div",{className:"highslide-image"},{position:"absolute",zIndex:4,overflow:"hidden",display:"none"});var k={oldImg:q,newImg:this};for(var e in k){this[e]=k[e].content.cloneNode(1);hs.setStyles(this[e],{position:"absolute",border:0,visibility:"visible"});i.appendChild(this[e])}a.appendChild(i);if(this.isHtml){hs.setStyles(this.mediumContent,{left:0,top:0})}if(c){c.className="";a.appendChild(c)}i.style.display="";q.content.style.display="none";if(hs.safari){var h=navigator.userAgent.match(/Safari\/([0-9]{3})/);if(h&&parseInt(h[1])<525){this.wrapper.style.visibility="visible"}}hs.animate(a,{width:m.size},{duration:hs.transitionDuration,step:function(v,s){var y=s.pos,r=1-y;var x,t={},u=["pos","size","p1","p2"];for(var w in u){x=u[w];t["x"+x]=Math.round(r*d[x]+y*m[x]);t["y"+x]=Math.round(r*b[x]+y*l[x]);t.ximgSize=Math.round(r*(d.imgSize||d.size)+y*(m.imgSize||m.size));t.ximgPad=Math.round(r*d.get("imgPad")+y*m.get("imgPad"));t.yimgSize=Math.round(r*(b.imgSize||b.size)+y*(l.imgSize||l.size));t.yimgPad=Math.round(r*b.get("imgPad")+y*l.get("imgPad"))}if(f.outline){f.outline.setPosition({x:t.xpos,y:t.ypos,w:t.xsize+t.xp1+t.xp2+2*m.cb,h:t.ysize+t.yp1+t.yp2+2*l.cb})}q.wrapper.style.clip="rect("+(t.ypos-b.pos)+"px, "+(t.xsize+t.xp1+t.xp2+t.xpos+2*d.cb-d.pos)+"px, "+(t.ysize+t.yp1+t.yp2+t.ypos+2*b.cb-b.pos)+"px, "+(t.xpos-d.pos)+"px)";hs.setStyles(j,{top:(t.yp1+l.get("imgPad"))+"px",left:(t.xp1+m.get("imgPad"))+"px",marginTop:(l.pos-t.ypos)+"px",marginLeft:(m.pos-t.xpos)+"px"});hs.setStyles(a,{top:t.ypos+"px",left:t.xpos+"px",width:(t.xp1+t.xp2+t.xsize+2*m.cb)+"px",height:(t.yp1+t.yp2+t.ysize+2*l.cb)+"px"});hs.setStyles(i,{width:(t.ximgSize||t.xsize)+"px",height:(t.yimgSize||t.ysize)+"px",left:(t.xp1+t.ximgPad)+"px",top:(t.yp1+t.yimgPad)+"px",visibility:"visible"});hs.setStyles(f.oldImg,{top:(b.pos-t.ypos+b.p1-t.yp1+b.get("imgPad")-t.yimgPad)+"px",left:(d.pos-t.xpos+d.p1-t.xp1+d.get("imgPad")-t.ximgPad)+"px"});hs.setStyles(f.newImg,{opacity:y,top:(l.pos-t.ypos+l.p1-t.yp1+l.get("imgPad")-t.yimgPad)+"px",left:(m.pos-t.xpos+m.p1-t.xp1+m.get("imgPad")-t.ximgPad)+"px"});if(c){hs.setStyles(c,{width:t.xsize+"px",height:t.ysize+"px",left:(t.xp1+m.cb)+"px",top:(t.yp1+l.cb)+"px"})}},complete:function(){a.style.visibility=j.style.visibility="visible";j.style.display="block";i.style.display="none";f.a.className+=" highslide-active-anchor";f.afterExpand();q.afterClose();f.last=null}})},reuseOverlay:function(d,c){if(!this.last){return false}for(var b=0;b<this.last.overlays.length;b++){var a=hs.$("hsId"+this.last.overlays[b]);if(a&&a.hsId==d.hsId){this.genOverlayBox();a.reuse=this.key;hs.push(this.overlays,this.last.overlays[b]);return true}}return false},afterExpand:function(){this.isExpanded=true;this.focus();if(this.isHtml&&this.objectLoadTime=="after"){this.writeExtendedContent()}if(this.iframe){try{var g=this,f=this.iframe.contentDocument||this.iframe.contentWindow.document;hs.addEventListener(f,"mousedown",function(){if(hs.focusKey!=g.key){g.focus()}})}catch(d){}if(hs.ie&&typeof this.isClosing!="boolean"){this.iframe.style.width=(this.objectWidth-1)+"px"}}if(this.dimmingOpacity){hs.dim(this)}if(hs.upcoming&&hs.upcoming==this.a){hs.upcoming=null}this.prepareNextOutline();var c=hs.page,b=hs.mouse.x+c.scrollLeft,a=hs.mouse.y+c.scrollTop;this.mouseIsOver=this.x.pos<b&&b<this.x.pos+this.x.get("wsize")&&this.y.pos<a&&a<this.y.pos+this.y.get("wsize");if(this.overlayBox){this.showOverlays()}hs.fireEvent(this,"onAfterExpand")},prepareNextOutline:function(){var a=this.key;var b=this.outlineType;new hs.Outline(b,function(){try{hs.expanders[a].preloadNext()}catch(c){}})},preloadNext:function(){var b=this.getAdjacentAnchor(1);if(b&&b.onclick.toString().match(/hs\.expand/)){var a=hs.createElement("img",{src:hs.getSrc(b)})}},getAdjacentAnchor:function(c){var b=this.getAnchorIndex(),a=hs.anchors.groups[this.slideshowGroup||"none"];if(!a[b+c]&&this.slideshow&&this.slideshow.repeat){if(c==1){return a[0]}else{if(c==-1){return a[a.length-1]}}}return a[b+c]||null},getAnchorIndex:function(){var a=hs.getAnchors().groups[this.slideshowGroup||"none"];if(a){for(var b=0;b<a.length;b++){if(a[b]==this.a){return b}}}return null},getNumber:function(){if(this[this.numberPosition]){var a=hs.anchors.groups[this.slideshowGroup||"none"];if(a){var b=hs.lang.number.replace("%1",this.getAnchorIndex()+1).replace("%2",a.length);this[this.numberPosition].innerHTML='<div class="highslide-number">'+b+"</div>"+this[this.numberPosition].innerHTML}}},initSlideshow:function(){if(!this.last){for(var c=0;c<hs.slideshows.length;c++){var b=hs.slideshows[c],d=b.slideshowGroup;if(typeof d=="undefined"||d===null||d===this.slideshowGroup){this.slideshow=new hs.Slideshow(this.key,b)}}}else{this.slideshow=this.last.slideshow}var b=this.slideshow;if(!b){return}var a=b.expKey=this.key;b.checkFirstAndLast();b.disable("full-expand");if(b.controls){var e=b.overlayOptions||{};e.overlayId=b.controls;e.hsId="controls";this.createOverlay(e)}if(b.thumbstrip){b.thumbstrip.add(this)}if(!this.last&&this.autoplay){b.play(true)}if(b.autoplay){b.autoplay=setTimeout(function(){hs.next(a)},(b.interval||500))}},cancelLoading:function(){hs.discardElement(this.wrapper);hs.expanders[this.key]=null;if(hs.upcoming==this.a){hs.upcoming=null}hs.undim(this.key);if(this.loading){hs.loading.style.left="-9999px"}hs.fireEvent(this,"onHideLoading")},writeCredits:function(){if(this.credits){return}this.credits=hs.createElement("a",{href:hs.creditsHref,target:hs.creditsTarget,className:"highslide-credits",innerHTML:hs.lang.creditsText,title:hs.lang.creditsTitle});this.createOverlay({overlayId:this.credits,position:this.creditsPosition||"top left",hsId:"credits"})},getInline:function(types,addOverlay){for(var i=0;i<types.length;i++){var type=types[i],s=null;if(type=="caption"&&!hs.fireEvent(this,"onBeforeGetCaption")){return}else{if(type=="heading"&&!hs.fireEvent(this,"onBeforeGetHeading")){return}}if(!this[type+"Id"]&&this.thumbsUserSetId){this[type+"Id"]=type+"-for-"+this.thumbsUserSetId}if(this[type+"Id"]){this[type]=hs.getNode(this[type+"Id"])}if(!this[type]&&!this[type+"Text"]&&this[type+"Eval"]){try{s=eval(this[type+"Eval"])}catch(e){}}if(!this[type]&&this[type+"Text"]){s=this[type+"Text"]}if(!this[type]&&!s){this[type]=hs.getNode(this.a["_"+type+"Id"]);if(!this[type]){var next=this.a.nextSibling;while(next&&!hs.isHsAnchor(next)){if((new RegExp("highslide-"+type)).test(next.className||null)){if(!next.id){this.a["_"+type+"Id"]=next.id="hsId"+hs.idCounter++}this[type]=hs.getNode(next.id);break}next=next.nextSibling}}}if(!this[type]&&!s&&this.numberPosition==type){s="\n"}if(!this[type]&&s){this[type]=hs.createElement("div",{className:"highslide-"+type,innerHTML:s})}if(addOverlay&&this[type]){var o={position:(type=="heading")?"above":"below"};for(var x in this[type+"Overlay"]){o[x]=this[type+"Overlay"][x]}o.overlayId=this[type];this.createOverlay(o)}}},doShowHide:function(a){if(hs.hideSelects){this.showHideElements("SELECT",a)}if(hs.hideIframes){this.showHideElements("IFRAME",a)}if(hs.geckoMac){this.showHideElements("*",a)}},showHideElements:function(c,b){var e=document.getElementsByTagName(c);var a=c=="*"?"overflow":"visibility";for(var f=0;f<e.length;f++){if(a=="visibility"||(document.defaultView.getComputedStyle(e[f],"").getPropertyValue("overflow")=="auto"||e[f].getAttribute("hidden-by")!=null)){var h=e[f].getAttribute("hidden-by");if(b=="visible"&&h){h=h.replace("["+this.key+"]","");e[f].setAttribute("hidden-by",h);if(!h){e[f].style[a]=e[f].origProp}}else{if(b=="hidden"){var k=hs.getPosition(e[f]);k.w=e[f].offsetWidth;k.h=e[f].offsetHeight;if(!this.dimmingOpacity){var j=(k.x+k.w<this.x.get("opos")||k.x>this.x.get("opos")+this.x.get("osize"));var g=(k.y+k.h<this.y.get("opos")||k.y>this.y.get("opos")+this.y.get("osize"))}var d=hs.getWrapperKey(e[f]);if(!j&&!g&&d!=this.key){if(!h){e[f].setAttribute("hidden-by","["+this.key+"]");e[f].origProp=e[f].style[a];e[f].style[a]="hidden"}else{if(h.indexOf("["+this.key+"]")==-1){e[f].setAttribute("hidden-by",h+"["+this.key+"]")}}}else{if((h=="["+this.key+"]"||hs.focusKey==d)&&d!=this.key){e[f].setAttribute("hidden-by","");e[f].style[a]=e[f].origProp||""}else{if(h&&h.indexOf("["+this.key+"]")>-1){e[f].setAttribute("hidden-by",h.replace("["+this.key+"]",""))}}}}}}}},focus:function(){this.wrapper.style.zIndex=hs.zIndexCounter+=2;for(var a=0;a<hs.expanders.length;a++){if(hs.expanders[a]&&a==hs.focusKey){var b=hs.expanders[a];b.content.className+=" highslide-"+b.contentType+"-blur";if(b.isImage){b.content.style.cursor=hs.ie?"hand":"pointer";b.content.title=hs.lang.focusTitle}hs.fireEvent(b,"onBlur")}}if(this.outline){this.outline.table.style.zIndex=this.wrapper.style.zIndex-1}this.content.className="highslide-"+this.contentType;if(this.isImage){this.content.title=hs.lang.restoreTitle;if(hs.restoreCursor){hs.styleRestoreCursor=window.opera?"pointer":"url("+hs.graphicsDir+hs.restoreCursor+"), pointer";if(hs.ie&&hs.uaVersion<6){hs.styleRestoreCursor="hand"}this.content.style.cursor=hs.styleRestoreCursor}}hs.focusKey=this.key;hs.addEventListener(document,window.opera?"keypress":"keydown",hs.keyHandler);hs.fireEvent(this,"onFocus")},moveTo:function(a,b){this.x.setPos(a);this.y.setPos(b)},resize:function(d){var a,b,c=d.width/d.height;a=Math.max(d.width+d.dX,Math.min(this.minWidth,this.x.full));if(this.isImage&&Math.abs(a-this.x.full)<12){a=this.x.full}b=this.isHtml?d.height+d.dY:a/c;if(b<Math.min(this.minHeight,this.y.full)){b=Math.min(this.minHeight,this.y.full);if(this.isImage){a=b*c}}this.resizeTo(a,b)},resizeTo:function(a,b){this.y.setSize(b);this.x.setSize(a);this.wrapper.style.height=this.y.get("wsize")+"px"},close:function(){if(this.isClosing||!this.isExpanded){return}if(this.transitions[1]=="crossfade"&&hs.upcoming){hs.getExpander(hs.upcoming).cancelLoading();hs.upcoming=null}if(!hs.fireEvent(this,"onBeforeClose")){return}this.isClosing=true;if(this.slideshow&&!hs.upcoming){this.slideshow.pause()}hs.removeEventListener(document,window.opera?"keypress":"keydown",hs.keyHandler);try{if(this.isHtml){this.htmlPrepareClose()}this.content.style.cursor="default";this.changeSize(0,{wrapper:{width:this.x.t,height:this.y.t,left:this.x.tpos-this.x.cb+this.x.tb,top:this.y.tpos-this.y.cb+this.y.tb},content:{left:0,top:0,width:this.x.t,height:this.y.t}},hs.restoreDuration)}catch(a){this.afterClose()}},htmlPrepareClose:function(){if(hs.geckoMac){if(!hs.mask){hs.mask=hs.createElement("div",null,{position:"absolute"},hs.container)}hs.setStyles(hs.mask,{width:this.x.size+"px",height:this.y.size+"px",left:this.x.pos+"px",top:this.y.pos+"px",display:"block"})}if(this.objectType=="swf"){try{hs.$(this.body.id).StopPlay()}catch(a){}}if(this.objectLoadTime=="after"&&!this.preserveContent){this.destroyObject()}if(this.scrollerDiv&&this.scrollerDiv!=this.scrollingContent){this.scrollerDiv.style.overflow="hidden"}},destroyObject:function(){if(hs.ie&&this.iframe){try{this.iframe.contentWindow.document.body.innerHTML=""}catch(a){}}if(this.objectType=="swf"){swfobject.removeSWF(this.body.id)}this.body.innerHTML=""},sleep:function(){if(this.outline){this.outline.table.style.display="none"}this.releaseMask=null;this.wrapper.style.display="none";hs.push(hs.sleeping,this)},awake:function(){try{hs.expanders[this.key]=this;if(!hs.allowMultipleInstances&&hs.focusKey!=this.key){try{hs.expanders[hs.focusKey].close()}catch(b){}}var d=hs.zIndexCounter++,a={display:"",zIndex:d};hs.setStyles(this.wrapper,a);this.isClosing=false;var c=this.outline||0;if(c){if(!this.outlineWhileAnimating){a.visibility="hidden"}hs.setStyles(c.table,a)}if(this.slideshow){this.initSlideshow()}this.show()}catch(b){}},createOverlay:function(e){var d=e.overlayId,a=(e.relativeTo=="viewport"&&!/panel$/.test(e.position));if(typeof d=="string"){d=hs.getNode(d)}if(e.html){d=hs.createElement("div",{innerHTML:e.html})}if(!d||typeof d=="string"){return}if(!hs.fireEvent(this,"onCreateOverlay",{overlay:d})){return}d.style.display="block";e.hsId=e.hsId||e.overlayId;if(this.transitions[1]=="crossfade"&&this.reuseOverlay(e,d)){return}this.genOverlayBox();var c=e.width&&/^[0-9]+(px|%)$/.test(e.width)?e.width:"auto";if(/^(left|right)panel$/.test(e.position)&&!/^[0-9]+px$/.test(e.width)){c="200px"}var b=hs.createElement("div",{id:"hsId"+hs.idCounter++,hsId:e.hsId},{position:"absolute",visibility:"hidden",width:c,direction:hs.lang.cssDirection||"",opacity:0},a?hs.viewport:this.overlayBox,true);if(a){b.hsKey=this.key}b.appendChild(d);hs.extend(b,{opacity:1,offsetX:0,offsetY:0,dur:(e.fade===0||e.fade===false||(e.fade==2&&hs.ie))?0:250});hs.extend(b,e);if(this.gotOverlays){this.positionOverlay(b);if(!b.hideOnMouseOut||this.mouseIsOver){hs.animate(b,{opacity:b.opacity},b.dur)}}hs.push(this.overlays,hs.idCounter-1)},positionOverlay:function(e){var f=e.position||"middle center",c=(e.relativeTo=="viewport"),b=e.offsetX,a=e.offsetY;if(c){hs.viewport.style.display="block";e.hsKey=this.key;if(e.offsetWidth>e.parentNode.offsetWidth){e.style.width="100%"}}else{if(e.parentNode!=this.overlayBox){this.overlayBox.appendChild(e)}}if(/left$/.test(f)){e.style.left=b+"px"}if(/center$/.test(f)){hs.setStyles(e,{left:"50%",marginLeft:(b-Math.round(e.offsetWidth/2))+"px"})}if(/right$/.test(f)){e.style.right=-b+"px"}if(/^leftpanel$/.test(f)){hs.setStyles(e,{right:"100%",marginRight:this.x.cb+"px",top:-this.y.cb+"px",bottom:-this.y.cb+"px",overflow:"auto"});this.x.p1=e.offsetWidth}else{if(/^rightpanel$/.test(f)){hs.setStyles(e,{left:"100%",marginLeft:this.x.cb+"px",top:-this.y.cb+"px",bottom:-this.y.cb+"px",overflow:"auto"});this.x.p2=e.offsetWidth}}var d=e.parentNode.offsetHeight;e.style.height="auto";if(c&&e.offsetHeight>d){e.style.height=hs.ieLt7?d+"px":"100%"}if(/^top/.test(f)){e.style.top=a+"px"}if(/^middle/.test(f)){hs.setStyles(e,{top:"50%",marginTop:(a-Math.round(e.offsetHeight/2))+"px"})}if(/^bottom/.test(f)){e.style.bottom=-a+"px"}if(/^above$/.test(f)){hs.setStyles(e,{left:(-this.x.p1-this.x.cb)+"px",right:(-this.x.p2-this.x.cb)+"px",bottom:"100%",marginBottom:this.y.cb+"px",width:"auto"});this.y.p1=e.offsetHeight}else{if(/^below$/.test(f)){hs.setStyles(e,{position:"relative",left:(-this.x.p1-this.x.cb)+"px",right:(-this.x.p2-this.x.cb)+"px",top:"100%",marginTop:this.y.cb+"px",width:"auto"});this.y.p2=e.offsetHeight;e.style.position="absolute"}}},getOverlays:function(){this.getInline(["heading","caption"],true);this.getNumber();if(this.caption){hs.fireEvent(this,"onAfterGetCaption")}if(this.heading){hs.fireEvent(this,"onAfterGetHeading")}if(this.heading&&this.dragByHeading){this.heading.className+=" highslide-move"}if(hs.showCredits){this.writeCredits()}for(var a=0;a<hs.overlays.length;a++){var d=hs.overlays[a],e=d.thumbnailId,b=d.slideshowGroup;if((!e&&!b)||(e&&e==this.thumbsUserSetId)||(b&&b===this.slideshowGroup)){if(this.isImage||(this.isHtml&&d.useOnHtml)){this.createOverlay(d)}}}var c=[];for(var a=0;a<this.overlays.length;a++){var d=hs.$("hsId"+this.overlays[a]);if(/panel$/.test(d.position)){this.positionOverlay(d)}else{hs.push(c,d)}}for(var a=0;a<c.length;a++){this.positionOverlay(c[a])}this.gotOverlays=true},genOverlayBox:function(){if(!this.overlayBox){this.overlayBox=hs.createElement("div",{className:this.wrapperClassName},{position:"absolute",width:(this.x.size||(this.useBox?this.width:null)||this.x.full)+"px",height:(this.y.size||this.y.full)+"px",visibility:"hidden",overflow:"hidden",zIndex:hs.ie?4:"auto"},hs.container,true)}},sizeOverlayBox:function(f,d){var c=this.overlayBox,a=this.x,h=this.y;hs.setStyles(c,{width:a.size+"px",height:h.size+"px"});if(f||d){for(var e=0;e<this.overlays.length;e++){var g=hs.$("hsId"+this.overlays[e]);var b=(hs.ieLt7||document.compatMode=="BackCompat");if(g&&/^(above|below)$/.test(g.position)){if(b){g.style.width=(c.offsetWidth+2*a.cb+a.p1+a.p2)+"px"}h[g.position=="above"?"p1":"p2"]=g.offsetHeight}if(g&&b&&/^(left|right)panel$/.test(g.position)){g.style.height=(c.offsetHeight+2*h.cb)+"px"}}}if(f){hs.setStyles(this.content,{top:h.p1+"px"});hs.setStyles(c,{top:(h.p1+h.cb)+"px"})}},showOverlays:function(){var a=this.overlayBox;a.className="";hs.setStyles(a,{top:(this.y.p1+this.y.cb)+"px",left:(this.x.p1+this.x.cb)+"px",overflow:"visible"});if(hs.safari){a.style.visibility="visible"}this.wrapper.appendChild(a);for(var c=0;c<this.overlays.length;c++){var d=hs.$("hsId"+this.overlays[c]);d.style.zIndex=d.hsId=="controls"?5:4;if(!d.hideOnMouseOut||this.mouseIsOver){d.style.visibility="visible";hs.setStyles(d,{visibility:"visible",display:""});hs.animate(d,{opacity:d.opacity},d.dur)}}},destroyOverlays:function(){if(!this.overlays.length){return}if(this.slideshow){var d=this.slideshow.controls;if(d&&hs.getExpander(d)==this){d.parentNode.removeChild(d)}}for(var a=0;a<this.overlays.length;a++){var b=hs.$("hsId"+this.overlays[a]);if(b&&b.parentNode==hs.viewport&&hs.getExpander(b)==this){hs.discardElement(b)}}if(this.isHtml&&this.preserveContent){this.overlayBox.style.top="-9999px";hs.container.appendChild(this.overlayBox)}else{hs.discardElement(this.overlayBox)}},createFullExpand:function(){if(this.slideshow&&this.slideshow.controls){this.slideshow.enable("full-expand");return}this.fullExpandLabel=hs.createElement("a",{href:"javascript:hs.expanders["+this.key+"].doFullExpand();",title:hs.lang.fullExpandTitle,className:"highslide-full-expand"});if(!hs.fireEvent(this,"onCreateFullExpand")){return}this.createOverlay({overlayId:this.fullExpandLabel,position:hs.fullExpandPosition,hideOnMouseOut:true,opacity:hs.fullExpandOpacity})},doFullExpand:function(){try{if(!hs.fireEvent(this,"onDoFullExpand")){return}if(this.fullExpandLabel){hs.discardElement(this.fullExpandLabel)}this.focus();var b=this.x.size;this.resizeTo(this.x.full,this.y.full);var a=this.x.pos-(this.x.size-b)/2;if(a<hs.marginLeft){a=hs.marginLeft}this.moveTo(a,this.y.pos);this.doShowHide("hidden")}catch(c){this.error(c)}},afterClose:function(){this.a.className=this.a.className.replace("highslide-active-anchor","");this.doShowHide("visible");if(this.isHtml&&this.preserveContent&&this.transitions[1]!="crossfade"){this.sleep()}else{if(this.outline&&this.outlineWhileAnimating){this.outline.destroy()}hs.discardElement(this.wrapper)}if(hs.mask){hs.mask.style.display="none"}this.destroyOverlays();if(!hs.viewport.childNodes.length){hs.viewport.style.display="none"}if(this.dimmingOpacity){hs.undim(this.key)}hs.fireEvent(this,"onAfterClose");hs.expanders[this.key]=null;hs.reOrder()}};hs.Ajax=function(b,c,d){this.a=b;this.content=c;this.pre=d};hs.Ajax.prototype={run:function(){var d;if(!this.src){this.src=hs.getSrc(this.a)}if(this.src.match("#")){var a=this.src.split("#");this.src=a[0];this.id=a[1]}if(hs.cachedGets[this.src]){this.cachedGet=hs.cachedGets[this.src];if(this.id){this.getElementContent()}else{this.loadHTML()}return}try{d=new XMLHttpRequest()}catch(b){try{d=new ActiveXObject("Msxml2.XMLHTTP")}catch(b){try{d=new ActiveXObject("Microsoft.XMLHTTP")}catch(b){this.onError()}}}var f=this;d.onreadystatechange=function(){if(f.xhr.readyState==4){if(f.id){f.getElementContent()}else{f.loadHTML()}}};var c=this.src;this.xhr=d;if(hs.forceAjaxReload){c=c.replace(/$/,(/\?/.test(c)?"&":"?")+"dummy="+(new Date()).getTime())}d.open("GET",c,true);d.setRequestHeader("X-Requested-With","XMLHttpRequest");d.setRequestHeader("Content-Type","application/x-www-form-urlencoded");d.send(null)},getElementContent:function(){hs.init();var a=window.opera||hs.ie6SSL?{src:"about:blank"}:null;this.iframe=hs.createElement("iframe",a,{position:"absolute",top:"-9999px"},hs.container);this.loadHTML()},loadHTML:function(){var c=this.cachedGet||this.xhr.responseText,b;if(this.pre){hs.cachedGets[this.src]=c}if(!hs.ie||hs.uaVersion>=5.5){c=c.replace(new RegExp("<link[^>]*>","gi"),"").replace(new RegExp("<script[^>]*>.*?<\/script>","gi"),"");if(this.iframe){var f=this.iframe.contentDocument;if(!f&&this.iframe.contentWindow){f=this.iframe.contentWindow.document}if(!f){var g=this;setTimeout(function(){g.loadHTML()},25);return}f.open();f.write(c);f.close();try{c=f.getElementById(this.id).innerHTML}catch(d){try{c=this.iframe.document.getElementById(this.id).innerHTML}catch(d){}}hs.discardElement(this.iframe)}else{b=/(<body[^>]*>|<\/body>)/ig;if(b.test(c)){c=c.split(b)[hs.ie?1:2]}}}hs.getElementByClass(this.content,"DIV","highslide-body").innerHTML=c;this.onLoad();for(var a in this){this[a]=null}}};hs.Slideshow=function(c,b){if(hs.dynamicallyUpdateAnchors!==false){hs.updateAnchors()}this.expKey=c;for(var a in b){this[a]=b[a]}if(this.useControls){this.getControls()}if(this.thumbstrip){this.thumbstrip=hs.Thumbstrip(this)}};hs.Slideshow.prototype={getControls:function(){this.controls=hs.createElement("div",{innerHTML:hs.replaceLang(hs.skin.controls)},null,hs.container);var b=["play","pause","previous","next","move","full-expand","close"];this.btn={};var c=this;for(var a=0;a<b.length;a++){this.btn[b[a]]=hs.getElementByClass(this.controls,"li","highslide-"+b[a]);this.enable(b[a])}this.btn.pause.style.display="none"},checkFirstAndLast:function(){if(this.repeat||!this.controls){return}var c=hs.expanders[this.expKey],b=c.getAnchorIndex(),a=/disabled$/;if(b==0){this.disable("previous")}else{if(a.test(this.btn.previous.getElementsByTagName("a")[0].className)){this.enable("previous")}}if(b+1==hs.anchors.groups[c.slideshowGroup||"none"].length){this.disable("next");this.disable("play")}else{if(a.test(this.btn.next.getElementsByTagName("a")[0].className)){this.enable("next");this.enable("play")}}},enable:function(d){if(!this.btn){return}var c=this,b=this.btn[d].getElementsByTagName("a")[0],e=/disabled$/;b.onclick=function(){c[d]();return false};if(e.test(b.className)){b.className=b.className.replace(e,"")}},disable:function(c){if(!this.btn){return}var b=this.btn[c].getElementsByTagName("a")[0];b.onclick=function(){return false};if(!/disabled$/.test(b.className)){b.className+=" disabled"}},hitSpace:function(){if(this.autoplay){this.pause()}else{this.play()}},play:function(a){if(this.btn){this.btn.play.style.display="none";this.btn.pause.style.display=""}this.autoplay=true;if(!a){hs.next(this.expKey)}},pause:function(){if(this.btn){this.btn.pause.style.display="none";this.btn.play.style.display=""}clearTimeout(this.autoplay);this.autoplay=null},previous:function(){this.pause();hs.previous(this.btn.previous)},next:function(){this.pause();hs.next(this.btn.next)},move:function(){},"full-expand":function(){hs.getExpander().doFullExpand()},close:function(){hs.close(this.btn.close)}};hs.Thumbstrip=function(k){function p(i){hs.extend(f||{},{overlayId:r,hsId:"thumbstrip",className:"highslide-thumbstrip-"+m+"-overlay "+(f.className||"")});if(hs.ieLt7){f.fade=0}i.createOverlay(f);hs.setStyles(r.parentNode,{overflow:"hidden"})}function c(i){d(undefined,Math.round(i*r[h?"offsetWidth":"offsetHeight"]*0.7))}function d(L,M){if(L===undefined){for(var K=0;K<j.length;K++){if(j[K]==hs.expanders[k.expKey].a){L=K;break}}}if(L===undefined){return}var G=r.getElementsByTagName("a"),z=G[L],w=z.parentNode,y=h?"Left":"Top",N=h?"Right":"Bottom",I=h?"Width":"Height",B="offset"+y,H="offset"+I,x=n.parentNode.parentNode[H],F=x-s[H],v=parseInt(s.style[h?"left":"top"])||0,C=v,D=20;if(M!==undefined){C=v-M;if(F>0){F=0}if(C>0){C=0}if(C<F){C=F}}else{for(var K=0;K<G.length;K++){G[K].className=""}z.className="highslide-active-anchor";var J=L>0?G[L-1].parentNode[B]:w[B],A=w[B]+w[H]+(G[L+1]?G[L+1].parentNode[H]:0);if(A>x-v){C=x-A}else{if(J<-v){C=-J}}}var E=w[B]+(w[H]-g[H])/2+C;hs.animate(s,h?{left:C}:{top:C},null,"easeOutQuad");hs.animate(g,h?{left:E}:{top:E},null,"easeOutQuad");l.style.display=C<0?"block":"none";t.style.display=(C>F)?"block":"none"}var j=hs.anchors.groups[hs.expanders[k.expKey].slideshowGroup||"none"],f=k.thumbstrip,m=f.mode||"horizontal",u=(m=="float"),o=u?["div","ul","li","span"]:["table","tbody","tr","td"],h=(m=="horizontal"),r=hs.createElement("div",{className:"highslide-thumbstrip highslide-thumbstrip-"+m,innerHTML:'<div class="highslide-thumbstrip-inner"><'+o[0]+"><"+o[1]+"></"+o[1]+"></"+o[0]+'></div><div class="highslide-scroll-up"><div></div></div><div class="highslide-scroll-down"><div></div></div><div class="highslide-marker"><div></div></div>'},{display:"none"},hs.container),e=r.childNodes,n=e[0],l=e[1],t=e[2],g=e[3],s=n.firstChild,a=r.getElementsByTagName(o[1])[0],b;for(var q=0;q<j.length;q++){if(q==0||!h){b=hs.createElement(o[2],null,null,a)}(function(){var v=j[q],i=hs.createElement(o[3],null,null,b),w=q;hs.createElement("a",{href:v.href,onclick:function(){hs.getExpander(this).focus();return hs.transit(v)},innerHTML:hs.stripItemFormatter?hs.stripItemFormatter(v):v.innerHTML},null,i)})()}if(!u){l.onclick=function(){c(-1)};t.onclick=function(){c(1)};hs.addEventListener(a,document.onmousewheel!==undefined?"mousewheel":"DOMMouseScroll",function(i){var v=0;i=i||window.event;if(i.wheelDelta){v=i.wheelDelta/120;if(hs.opera){v=-v}}else{if(i.detail){v=-i.detail/3}}if(v){c(-v*0.2)}if(i.preventDefault){i.preventDefault()}i.returnValue=false})}return{add:p,selectThumb:d}};hs.langDefaults=hs.lang;var HsExpander=hs.Expander;if(hs.ie){(function(){try{document.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,50);return}hs.ready()})()}hs.addEventListener(document,"DOMContentLoaded",hs.ready);hs.addEventListener(window,"load",hs.ready);hs.addEventListener(document,"ready",function(){if(hs.expandCursor||hs.dimmingOpacity){var c=hs.createElement("style",{type:"text/css"},null,document.getElementsByTagName("HEAD")[0]);function b(e,f){if(!hs.ie){c.appendChild(document.createTextNode(e+" {"+f+"}"))}else{var d=document.styleSheets[document.styleSheets.length-1];if(typeof(d.addRule)=="object"){d.addRule(e,f)}}}function a(d){return"expression( ( ( ignoreMe = document.documentElement."+d+" ? document.documentElement."+d+" : document.body."+d+" ) ) + 'px' );"}if(hs.expandCursor){b(".highslide img","cursor: url("+hs.graphicsDir+hs.expandCursor+"), pointer !important;")}b(".highslide-viewport-size",hs.ie&&(hs.uaVersion<7||document.compatMode=="BackCompat")?"position: absolute; left:"+a("scrollLeft")+"top:"+a("scrollTop")+"width:"+a("clientWidth")+"height:"+a("clientHeight"):"position: fixed; width: 100%; height: 100%; left: 0; top: 0")}});hs.addEventListener(window,"resize",function(){hs.getPageSize();if(hs.viewport){for(var a=0;a<hs.viewport.childNodes.length;a++){var b=hs.viewport.childNodes[a],c=hs.getExpander(b);c.positionOverlay(b);if(b.hsId=="thumbstrip"){c.slideshow.thumbstrip.selectThumb()}}}});hs.addEventListener(document,"mousemove",function(a){hs.mouse={x:a.clientX,y:a.clientY}});hs.addEventListener(document,"mousedown",hs.mouseClickHandler);hs.addEventListener(document,"mouseup",hs.mouseClickHandler);hs.addEventListener(document,"ready",hs.setClickEvents);hs.addEventListener(window,"load",hs.preloadImages);hs.addEventListener(window,"load",hs.preloadAjax)};

/*  JCaption javascript behavior */
var JCaption=new Class({initialize:function(a){this.selector=a;var b=$$(a);b.each(function(a){this.createCaption(a)},this)},createCaption:function(a){var b=document.createTextNode(a.title);var c=document.createElement("div");var d=document.createElement("p");var e=a.getAttribute("width");var f=a.getAttribute("align");if(!e){e=a.width}d.appendChild(b);a.parentNode.insertBefore(c,a);c.appendChild(a);if(a.title!=""){c.appendChild(d)}c.className=this.selector.replace(".","_");c.className=c.className+" "+f;c.setAttribute("style","float:"+f);c.style.width=e+"px"}});document.caption=null;window.addEvent("load",function(){var a=new JCaption("img.caption");document.caption=a})

/* Ultimate Fade-In Slideshow (v1.5) */
function fadepic(a){if(a.degree<100){a.degree+=10;if(a.tempobj.filters&&a.tempobj.filters[0]){if(typeof a.tempobj.filters[0].opacity=="number")a.tempobj.filters[0].opacity=a.degree;else a.tempobj.style.filter="alpha(opacity="+a.degree+")"}else if(a.tempobj.style.MozOpacity)a.tempobj.style.MozOpacity=a.degree/101;else if(a.tempobj.style.KhtmlOpacity)a.tempobj.style.KhtmlOpacity=a.degree/100}else{clearInterval(fadeclear[a.slideshowid]);a.nextcanvas=a.curcanvas==a.canvasbase+"_0"?a.canvasbase+"_0":a.canvasbase+"_1";a.tempobj=iebrowser?iebrowser[a.nextcanvas]:document.getElementById(a.nextcanvas);a.populateslide(a.tempobj,a.nextimageindex);a.nextimageindex=a.nextimageindex<a.postimages.length-1?a.nextimageindex+1:0;setTimeout("fadearray["+a.slideshowid+"].rotateimage()",a.delay)}}function fadeshow(a,b,c,d,e,f,g){this.pausecheck=f;this.mouseovercheck=0;this.delay=e;this.degree=10;this.curimageindex=0;this.nextimageindex=1;fadearray[fadearray.length]=this;this.slideshowid=fadearray.length-1;this.canvasbase="canvas"+this.slideshowid;this.curcanvas=this.canvasbase+"_0";if(typeof g!="undefined")a.sort(function(){return.5-Math.random()});this.theimages=a;this.imageborder=parseInt(d);this.postimages=new Array;for(p=0;p<a.length;p++){this.postimages[p]=new Image;this.postimages[p].src=a[p][0]}var b=b+this.imageborder*2;var c=c+this.imageborder*2;var h=document.getElementById("phocagallerycontent");if(h){if(iebrowser&&dom||dom)h.innerHTML='<div id="master'+this.slideshowid+'" style="position:relative;width:'+b+"px;height:"+c+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+b+"px;height:"+c+"px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;-khtml-opacity:10;background-color:"+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+b+"px;height:"+c+"px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;background-color:"+fadebgcolor+'"></div></div>';else h.innerHTML='<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>';if(iebrowser&&dom||dom)this.startit();else{this.curimageindex++;setInterval("fadearray["+this.slideshowid+"].rotateimage()",this.delay)}}}var fadeimages2=new Array;var fadebgcolor="transparent";var fadearray=new Array;var fadeclear=new Array;var dom=document.getElementById;var iebrowser=document.all;fadeshow.prototype.populateslide=function(a,b){var c='<div style="text-align:center;valign:middle">';if(this.theimages[b][1]!="")c='<a href="'+this.theimages[b][1]+'" target="'+this.theimages[b][2]+'">';c+='<img src="'+this.postimages[b].src+'" border="'+this.imageborder+'px">';if(this.theimages[b][1]!="")c+="</a>";a.innerHTML=c};fadeshow.prototype.rotateimage=function(){if(this.pausecheck==1)var a=this;if(this.mouseovercheck==1)setTimeout(function(){a.rotateimage()},100);else if(iebrowser&&dom||dom){this.resetit();var b=this.tempobj=iebrowser?iebrowser[this.curcanvas]:document.getElementById(this.curcanvas);b.style.zIndex++;fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50);this.curcanvas=this.curcanvas==this.canvasbase+"_0"?this.canvasbase+"_1":this.canvasbase+"_0"}else{var c=document.images["defaultslide"+this.slideshowid];c.src=this.postimages[this.curimageindex].src}this.curimageindex=this.curimageindex<this.postimages.length-1?this.curimageindex+1:0};fadeshow.prototype.resetit=function(){this.degree=10;var a=iebrowser?iebrowser[this.curcanvas]:document.getElementById(this.curcanvas);if(a.filters&&a.filters[0]){if(typeof a.filters[0].opacity=="number")a.filters(0).opacity=this.degree;else a.style.filter="alpha(opacity="+this.degree+")"}else if(a.style.MozOpacity)a.style.MozOpacity=this.degree/101;else if(a.style.KhtmlOpacity)a.style.KhtmlOpacity=this.degree/100};fadeshow.prototype.startit=function(){var a=iebrowser?iebrowser[this.curcanvas]:document.getElementById(this.curcanvas);this.populateslide(a,this.curimageindex);if(this.pausecheck==1){var b=this;var c=iebrowser?iebrowser["master"+this.slideshowid]:document.getElementById("master"+this.slideshowid);c.onmouseover=function(){b.mouseovercheck=1};c.onmouseout=function(){b.mouseovercheck=0}}this.rotateimage()}

/* dTree 2.05 */
function dTree2548(a,b){this.config={target:null,folderLinks:true,useSelection:true,useCookies:true,useLines:true,useIcons:true,useStatusText:false,closeSameLevel:false,inOrder:false};this.icon={root:"data:image/gif;base64,R0lGODlhEAAQAPcAAO7u7ujq8O3r0O/px97o7eXl5dzn7Nzm7Nvl6tnl697j19jj6uDg4NTh6NPh59jkuuLgxdLg593d3drc59zc3Nnc5tjb5dDc5Nfa5NXa3tba49bZ49Db4srb4tvXw7/c58vY4dHW483Y08HZ28rZzdTU1NHS1sPau9HS1c3S1szR4M3S38jS2LzbocvQ3sXT0s7OzsLR2MrO2szN0cjM2cbK1rDR3snJycXJ1a3O26rTpcPG0q7L18HF0MPFyb/Dzb7CzZzSib/Cyb/Awr7Axbu/ybq+yri7xbi7xrS9xrG8xY/MkZ3Bxba5wrm6vLy4oZq9yrO3vKq4wqq3waG5w33KcpO7yq6xvK2ytZe2wHfGf6ixuI62xXLFe461xaavtqeutJ6ttoC0yKKuj6ippIivvpWrtJCqrV2/YYWpt5elrn2qu3upuo6krXKqvXCud0u6VYChrn6kgpeam2ilu4mXn2uZq3CYqGCbsk6pTWaWp1uVq1OWrlWNokqVUH9/f2yBi25vb2hoZVVUUEdXSP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEHAIUALAAAAAAQABAAAAjJAAsJHEiwoMGDCBMW9OHDhIkhTlA4dDhjYJMkU75gSZEhChgpIJVcEXikzJ42DQwYcEDFDh48bJAILALlTowEBHIiiCNGjBUjAn/wSMMiwoIDSM18+JADiMAdHWzUuXABBIctWUaIINNDYI01fPoAUhNmjqAnAwZAwCFQBhc6cPWcUeBh0JgqaGgIXOHFDRMSAh60CJKHkB84LgSGeHFCxxItXSJ3eRNIjgqBASZoxrChs2chf4gMBFCAQgkYN27AKCGhAAOFCAMCADs%3D",folder:"data:image/gif;base64,R0lGODlhEAAQAOYAAPbbn/Xan/PZoPTZnfLYoOvZrvLXm/LWmuvUoPDUl+zUnu7Slu7SlenQmurOkejOlenNkNrKq+PJj93JndvIn+XIi9jIqNvHndrHoOPGiePGiNfGoNXFoN/Ei9PEpuDChN7CidPCntrBit7Agt2/gdq+hNS+i9u9fti8gti6e9e5etK5iNS4ftW3eNK2fNO0ddGyc7i0qcayh86yeMaxgdCxccaxgsmxgcawgMawgc2ubsmueMusbMura8mscbirjsenZ8Sna8WlZMalZaunnL+iar+hZbeidcKhYMGgXsGgX7+fXbudYLuaWLyaWZ2ZjreXWbeVU7aUUrSRT7KPTI+LgIeEeo59WJR6RpJ6SIt6VJN3Qoh2UYVzTYJvSX9sRXxoQXhlPnZiOnNfNnFdNf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEHAGUALAAAAAAQABAAAAeZgGWCg4SFhgUIBIoNCgILhhMJkgkiJgAAEIYXDpwdVzaXGYYUFaUlWqAGI4YYH64sXDQACymGGye4M105ARAvhhwtwj5eOAMaOoYhNcxBXzgHJECGMj3WRmBHDCpIhTErQ+FMYWEPME6FRBFJSu1ZYhI8UYVPFk33TVhjIEJThVUepAiUsoUMiiVFCln5QQXKjUEudhiaaCgQADs%3D",folderOpen:b+"img/imgfolder.gif",node:"data:image/gif;base64,R0lGODlhEAAQAOYAAPbbn/Xan/PZoPTZnfLYoOvZrvLXm/LWmuvUoPDUl+zUnu7Slu7SlenQmurOkejOlenNkNrKq+PJj93JndvIn+XIi9jIqNvHndrHoOPGiePGiNfGoNXFoN/Ei9PEpuDChN7CidPCntrBit7Agt2/gdq+hNS+i9u9fti8gti6e9e5etK5iNS4ftW3eNK2fNO0ddGyc7i0qcayh86yeMaxgdCxccaxgsmxgcawgMawgc2ubsmueMusbMura8mscbirjsenZ8Sna8WlZMalZaunnL+iar+hZbeidcKhYMGgXsGgX7+fXbudYLuaWLyaWZ2ZjreXWbeVU7aUUrSRT7KPTI+LgIeEeo59WJR6RpJ6SIt6VJN3Qoh2UYVzTYJvSX9sRXxoQXhlPnZiOnNfNnFdNf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEHAGUALAAAAAAQABAAAAeZgGWCg4SFhgUIBIoNCgILhhMJkgkiJgAAEIYXDpwdVzaXGYYUFaUlWqAGI4YYH64sXDQACymGGye4M105ARAvhhwtwj5eOAMaOoYhNcxBXzgHJECGMj3WRmBHDCpIhTErQ+FMYWEPME6FRBFJSu1ZYhI8UYVPFk33TVhjIEJThVUepAiUsoUMiiVFCln5QQXKjUEudhiaaCgQADs%3D",empty:"data:image/gif;base64,R0lGODlhEgASAJEAAAAAAP///4CAgP///yH5BAEAAAMALAAAAAASABIAAAIPnI+py+0Po5y02ouz3pwXADs%3D",line:"data:image/gif;base64,R0lGODlhEgASAIABAICAgP///yH5BAEAAAEALAAAAAASABIAAAIZjB+Ay+2rnpwo0uss3kfz7X1XKE5k+ZxoAQA7",join:"data:image/gif;base64,R0lGODlhEgASAIABAICAgP///yH5BAEAAAEALAAAAAASABIAAAIcjB+Ay+2rnpwo0uss3kf5BGocNJZiSZ2opK5BAQA7",joinBottom:"data:image/gif;base64,R0lGODlhEgASAIABAICAgP///yH5BAEAAAEALAAAAAASABIAAAIZjB+Ay+2rnpwo0uss3kf5BGrcSJbmiaZGAQA7",plus:"data:image/gif;base64,R0lGODlhEgASAJECAICAgAAAAP///wAAACH5BAEAAAIALAAAAAASABIAAAIqlC+Ay+2rnpygWvsizCcczWieAW7BeSaqookfZ4yqU5LZdU06vfe8rysAADs%3D",plusBottom:"data:image/gif;base64,R0lGODlhEgASAJECAICAgAAAAP///wAAACH5BAEAAAIALAAAAAASABIAAAIplC+Ay+2rnpygWvsizCcczWieAW7BeSaqookfZ4yqU5LZdU36zvd+XwAAOw%3D%3D",minus:b+"img/minus.gif",minusBottom:b+"img/minusbottom.gif",nlPlus:b+"img/nolines_plus.gif",nlMinus:b+"img/nolines_minus.gif"};this.obj=a;this.aNodes=[];this.aIndent=[];this.root=new Node(-1);this.selectedNode=null;this.selectedFound=false;this.completed=false}function Node(a,b,c,d,e,f,g,h,i){this.id=a;this.pid=b;this.name=c;this.url=d;this.title=e;this.target=f;this.icon=g;this.iconOpen=h;this._io=i||false;this._is=false;this._ls=false;this._hc=false;this._ai=0;this._p}dTree2548.prototype.add=function(a,b,c,d,e,f,g,h,i){this.aNodes[this.aNodes.length]=new Node(a,b,c,d,e,f,g,h,i)};dTree2548.prototype.openAll=function(){this.oAll(true)};dTree2548.prototype.closeAll=function(){this.oAll(false)};dTree2548.prototype.toString=function(){var a='<div class="dtree">\n';if(document.getElementById){if(this.config.useCookies)this.selectedNode=this.getSelected();a+=this.addNode(this.root)}else a+="Browser not supported.";a+="</div>";if(!this.selectedFound)this.selectedNode=null;this.completed=true;return a};dTree2548.prototype.addNode=function(a){var b="";var c=0;if(this.config.inOrder)c=a._ai;for(c;c<this.aNodes.length;c++){if(this.aNodes[c].pid==a.id){var d=this.aNodes[c];d._p=a;d._ai=c;this.setCS(d);if(!d.target&&this.config.target)d.target=this.config.target;if(d._hc&&!d._io&&this.config.useCookies)d._io=this.isOpen(d.id);if(!this.config.folderLinks&&d._hc)d.url=null;if(this.config.useSelection&&d.id==this.selectedNode&&!this.selectedFound){d._is=true;this.selectedNode=c;this.selectedFound=true}b+=this.node(d,c);if(d._ls)break}}return b};dTree2548.prototype.node=function(a,b){var c='<div class="dTreeNode">'+this.indent(a,b);if(this.config.useIcons){if(!a.icon)a.icon=this.root.id==a.pid?this.icon.root:a._hc?this.icon.folder:this.icon.node;if(!a.iconOpen)a.iconOpen=a._hc?this.icon.folderOpen:this.icon.node;if(this.root.id==a.pid){a.icon=this.icon.root;a.iconOpen=this.icon.root}c+='<img id="i'+this.obj+b+'" src="'+(a._io?a.iconOpen:a.icon)+'" alt="" />'}if(a.url){c+='<a id="s'+this.obj+b+'" class="'+(this.config.useSelection?a._is?"nodeSel":"node":"node")+'" href="'+a.url+'"';if(a.title)c+=' title="'+a.title+'"';if(a.target)c+=' target="'+a.target+'"';if(this.config.useStatusText)c+=" onmouseover=\"window.status='"+a.name+"';return true;\" onmouseout=\"window.status='';return true;\" ";if(this.config.useSelection&&(a._hc&&this.config.folderLinks||!a._hc))c+=' onclick="javascript: '+this.obj+".s("+b+');"';c+=">"}else if((!this.config.folderLinks||!a.url)&&a._hc&&a.pid!=this.root.id)c+='<a href="javascript: '+this.obj+".o("+b+');" class="node">';c+=a.name;if(a.url||(!this.config.folderLinks||!a.url)&&a._hc)c+="</a>";c+="</div>";if(a._hc){c+='<div id="d'+this.obj+b+'" class="clip" style="display:'+(this.root.id==a.pid||a._io?"block":"none")+';">';c+=this.addNode(a);c+="</div>"}this.aIndent.pop();return c};dTree2548.prototype.indent=function(a,b){var c="";if(this.root.id!=a.pid){for(var d=0;d<this.aIndent.length;d++)c+='<img src="'+(this.aIndent[d]==1&&this.config.useLines?this.icon.line:this.icon.empty)+'" alt="" />';a._ls?this.aIndent.push(0):this.aIndent.push(1);if(a._hc){c+='<a href="javascript: '+this.obj+".o("+b+');"><img id="j'+this.obj+b+'" src="';if(!this.config.useLines)c+=a._io?this.icon.nlMinus:this.icon.nlPlus;else c+=a._io?a._ls&&this.config.useLines?this.icon.minusBottom:this.icon.minus:a._ls&&this.config.useLines?this.icon.plusBottom:this.icon.plus;c+='" alt="" /></a>'}else c+='<img src="'+(this.config.useLines?a._ls?this.icon.joinBottom:this.icon.join:this.icon.empty)+'" alt="" />'}return c};dTree2548.prototype.setCS=function(a){var b;for(var c=0;c<this.aNodes.length;c++){if(this.aNodes[c].pid==a.id)a._hc=true;if(this.aNodes[c].pid==a.pid)b=this.aNodes[c].id}if(b==a.id)a._ls=true};dTree2548.prototype.getSelected=function(){var a=this.getCookie("cs"+this.obj);return a?a:null};dTree2548.prototype.s=function(a){if(!this.config.useSelection)return;var b=this.aNodes[a];if(b._hc&&!this.config.folderLinks)return;if(this.selectedNode!=a){if(this.selectedNode||this.selectedNode==0){eOld=document.getElementById("s"+this.obj+this.selectedNode);eOld.className="node"}eNew=document.getElementById("s"+this.obj+a);eNew.className="nodeSel";this.selectedNode=a;if(this.config.useCookies)this.setCookie("cs"+this.obj,b.id)}};dTree2548.prototype.o=function(a){var b=this.aNodes[a];this.nodeStatus(!b._io,a,b._ls);b._io=!b._io;if(this.config.closeSameLevel)this.closeLevel(b);if(this.config.useCookies)this.updateCookie()};dTree2548.prototype.oAll=function(a){for(var b=0;b<this.aNodes.length;b++){if(this.aNodes[b]._hc&&this.aNodes[b].pid!=this.root.id){this.nodeStatus(a,b,this.aNodes[b]._ls);this.aNodes[b]._io=a}}if(this.config.useCookies)this.updateCookie()};dTree2548.prototype.openTo=function(a,b,c){if(!c){for(var d=0;d<this.aNodes.length;d++){if(this.aNodes[d].id==a){a=d;break}}}var e=this.aNodes[a];if(e.pid==this.root.id||!e._p)return;e._io=true;e._is=b;if(this.completed&&e._hc)this.nodeStatus(true,e._ai,e._ls);if(this.completed&&b)this.s(e._ai);else if(b)this._sn=e._ai;this.openTo(e._p._ai,false,true)};dTree2548.prototype.closeLevel=function(a){for(var b=0;b<this.aNodes.length;b++){if(this.aNodes[b].pid==a.pid&&this.aNodes[b].id!=a.id&&this.aNodes[b]._hc){this.nodeStatus(false,b,this.aNodes[b]._ls);this.aNodes[b]._io=false;this.closeAllChildren(this.aNodes[b])}}};dTree2548.prototype.closeAllChildren=function(a){for(var b=0;b<this.aNodes.length;b++){if(this.aNodes[b].pid==a.id&&this.aNodes[b]._hc){if(this.aNodes[b]._io)this.nodeStatus(false,b,this.aNodes[b]._ls);this.aNodes[b]._io=false;this.closeAllChildren(this.aNodes[b])}}};dTree2548.prototype.nodeStatus=function(a,b,c){eDiv=document.getElementById("d"+this.obj+b);eJoin=document.getElementById("j"+this.obj+b);if(this.config.useIcons){eIcon=document.getElementById("i"+this.obj+b);eIcon.src=a?this.aNodes[b].iconOpen:this.aNodes[b].icon}eJoin.src=this.config.useLines?a?c?this.icon.minusBottom:this.icon.minus:c?this.icon.plusBottom:this.icon.plus:a?this.icon.nlMinus:this.icon.nlPlus;eDiv.style.display=a?"block":"none"};dTree2548.prototype.clearCookie=function(){var a=new Date;var b=new Date(a.getTime()-1e3*60*60*24);this.setCookie("co"+this.obj,"cookieValue",b);this.setCookie("cs"+this.obj,"cookieValue",b)};dTree2548.prototype.setCookie=function(a,b,c,d,e,f){document.cookie=escape(a)+"="+escape(b)+(c?"; expires="+c.toGMTString():"")+(d?"; path="+d:"")+(e?"; domain="+e:"")+(f?"; secure":"")};dTree2548.prototype.getCookie=function(a){var b="";var c=document.cookie.indexOf(escape(a)+"=");if(c!=-1){var d=c+(escape(a)+"=").length;var e=document.cookie.indexOf(";",d);if(e!=-1)b=unescape(document.cookie.substring(d,e));else b=unescape(document.cookie.substring(d))}return b};dTree2548.prototype.updateCookie=function(){var a="";for(var b=0;b<this.aNodes.length;b++){if(this.aNodes[b]._io&&this.aNodes[b].pid!=this.root.id){if(a)a+=".";a+=this.aNodes[b].id}}this.setCookie("co"+this.obj,a)};dTree2548.prototype.isOpen=function(a){var b=this.getCookie("co"+this.obj).split(".");for(var c=0;c<b.length;c++)if(b[c]==a)return true;return false};if(!Array.prototype.push){Array.prototype.push=function a(){for(var a=0;a<arguments.length;a++)this[this.length]=arguments[a];return this.length}}if(!Array.prototype.pop){Array.prototype.pop=function b(){lastElement=this[this.length-1];this.length=Math.max(this.length-1,0);return lastElement}}

window.addEvent("domready",function(){Fx.Height=Fx.Style.extend({initialize:function(a,b){$(a).setStyle("overflow","hidden");this.parent(a,"height",b)},toggle:function(){var a=this.element.getStyle("height").toInt();return this.start(a>0?(a,0):(0,this.element.scrollHeight))},show:function(){return this.set(this.element.scrollHeight)}});Fx.Opacity=Fx.Style.extend({initialize:function(a,b){this.now=1;this.parent(a,"opacity",b)},toggle:function(){return this.start(this.now>0?(1,0):(0,1))},show:function(){return this.set(1)}});$$(".gk_news_show_table").each(function(a,b){var c=a.getProperty("id");var d=1;if($E(".gk_news_show_panel",a)){$E(".gk_news_show_panel",a).setStyle("display","block");var e=(new Fx.Opacity($E(".gk_news_show_panel",a),{duration:500})).hide();var f=(new Fx.Height($E(".gk_news_show_panel",a),{duration:500})).hide();var g=2;if($E(".gk_news_show_panel_tools",a)){$E(".gk_news_show_panel_tools",a).addEvent("click",function(){g++;$E(".gk_news_show_panel_tools",a).setHTML(g%2==0?"Show options":"Hide options");$E(".gk_news_show_panel_tools",a).toggleClass("gk_news_show_panel_tools_hidden");e.toggle();f.toggle()})}var h=Cookie.get("gk_news_show_font"+c)?Cookie.get("gk_news_show_font"+c).toInt():20;if($E(".gk_news_show_panel_font_path",a)){var i=(new Slider($E(".gk_news_show_panel_font_path",a),$E(".gk_news_show_panel_font_knob",a),{steps:70,onChange:function(b){$E(".gk_news_show_panel_font_value",a).setHTML(b+80+"%");$(c).getElementsBySelector("img,p,a").setStyle("font-size",b+80+"%");Cookie.set("gk_news_show_font"+c,b,{duration:14,path:"/"})}})).set(h)}if($E(".gk_news_show_panel_amount_value",a)){var j=$A($(c).getElementsBySelector("tr")[0].getElementsBySelector("td")).length;var k=$A($(c).getElementsBySelector("tr")).length-2;var l=0;$A($(c).getElementsBySelector("tr")).each(function(a){a.getStyle("display")=="none"?l++:l=l});$E(".gk_news_show_panel_amount_value",a).setHTML(k-l);var m=$E(".gk_news_show_list_floated",a)||$E(".gk_news_show_list",a)||false;if(m){var n=m.getElementsBySelector("li");var o=n.length}$E(".gk_news_show_panel_amount_minus",a).addEvent("click",function(){if(l<k){$(c).getElementsBySelector("tr")[k-l-1].setStyle("display","none");l++;$E(".gk_news_show_panel_amount_value",a).setHTML(k-l);Cookie.set("gk_news_show_amount"+c,k-l,{duration:14,path:"/"});if(m){for(var b=0;b<j;b++){if((k-l)*j+b>=0&&(k-l)*j+b<o)n[(k-l)*j+b].setStyle("display","block")}}}});$E(".gk_news_show_panel_amount_plus",a).addEvent("click",function(){if(l>0){$(c).getElementsBySelector("tr")[k-l].setStyle("display","");l--;$E(".gk_news_show_panel_amount_value",a).setHTML(k-l);Cookie.set("gk_news_show_amount"+c,k-l,{duration:14,path:"/"});if(m){for(var b=0;b<j;b++){if((k-l)*j-(1+b)<o)n[(k-l)*j-(1+b)].setStyle("display","none")}}}})}}})})

/* JA Nickel */
var wrap_W=0;var JATabs=new Class({initialize:function(element,options){this.options=Object.extend({position:"top",width:"100%",height:"auto",skipAnim:false,animType:"animMoveHor",mouseType:"mouseover",changeTransition:Fx.Transitions.Pow.easeIn,duration:1e3,mouseOverClass:"hover",activateOnLoad:"first",useAjax:false,ajaxUrl:"",ajaxOptions:"get",ajaxLoadingText:"Loading...",fixheight:1,fixwidth:1,colors:""},options||{});this.el=$(element);this.elid=element;this._W=this.el.offsetWidth.toInt();wrap_W=this._W;if(this.options.height=="auto"){this.options.fixheight=0}if($type(this.options.colors)=="string"){regex=/(\d*):([^,]*)/gi;var colors=[];while(result=regex.exec(this.options.colors))colors[result[1]]=result[2];this.options.colors=colors}this._H=this.el.getParent().getStyle("height").toInt();this._H=this.el.getParent().offsetHeight.toInt();this.panels=$$("#"+this.elid+" .ja-tab-content");this.panelwrap=$E(".ja-tab-panels-"+this.options.position,this.el);this.divtitles=$$("#"+this.elid+" .ja-tabs-title-"+this.options.position);this.titles=$$("#"+this.elid+" div.ja-tabs-title-"+this.options.position+" ul li");if(this.panels.length<=1){this.panels.setStyle("position","relative");return}this.titles.each(function(a,b){var c=a.getElement("h3").className;if(!c)c=this.options.colors[b];a._color="";if(c){a.addClass(c);a._color=c}a.addEvent(this.options.mouseType,function(){if(a.className.indexOf("active")!=-1)return;a.removeClass(this.options.mouseOverClass);this.activate(a,this.options.skipAnim)}.bind(this));a.addEvent("mouseover",function(){if(a!=this.activeTitle){a.addClass(this.options.mouseOverClass)}}.bind(this));a.addEvent("mouseout",function(){if(a!=this.activeTitle){a.removeClass(this.options.mouseOverClass)}}.bind(this))}.bind(this));this.titles[0].addClass("first");this.titles[this.titles.length-1].addClass("last");this.titles[0].addClass("active");this.tabHeight=$E(".ja-tabs-title-"+this.options.position,this.el);this.tabHeight=this.el.getElement(".ja-tabs-title-"+this.options.position);this.minHeight=0;if(this.options.position=="left"||this.options.position=="right"){this.minHeight=this.tabHeight.offsetHeight;if(!this.options.fixheight){this.divtitles.setStyle("height",this.minHeight)}}if(!this.options.fixheight){this.panelwrap.setStyle("height",this.minHeight+10)}else{this.panelwrap.setStyle("height",this._H-this.titles[0].offsetHeight.toInt())}if(this.options.position=="left"||this.options.position=="right"){var maxw=eval(this._W-this.divtitles[0].offsetWidth.toInt()-10);this.panelwrap.setStyle("width",maxw)}this.titles.each(function(a,b){a.panel=this.panels[b];a.panel._idx=b},this);if(this.options.skipAnim)this.options.animType="animNone";if(eval("typeof "+this.options.animType)=="undefined"||eval("$type ("+this.options.animType+")")!="class"){this.options.animType="animFade"}this.anim=eval("new "+this.options.animType+"(this)");if(this.options.activateOnLoad!="none"){if(this.options.activateOnLoad=="first"){this.activate(this.titles[0],true)}else{this.activate(this.options.activateOnLoad,true)}}if(window.ie)this.firstload=true;window.addEvent("resize",this.resize.bind(this))},resize:function(){this._W=this.el.offsetWidth;maxW=this._W;if(this.options.position=="left"||this.options.position=="right"){this.minHeight=this.tabHeight.offsetHeight+10;if(!this.options.fixheight){this.divtitles.setStyle("height",Math.max(this.minHeight,this.activeTitle.panel.offsetHeight+10))}maxW=this._W-this.divtitles[0].offsetWidth.toInt()-10;this.panelwrap.setStyle("width",maxW)}if(wrap_W!=this._W){this.anim.reposition()}},activate:function(a,b){if(this.options.useAjax)this.cancelAjax();if(this.options.useAjax&&!a.loaded){this._getContent(a);return}if(!$defined(b)){b=false}if($type(a)=="string"){myTab=$$("#"+this.elid+" ul li").filterByAttribute("title","=",a)[0];a=myTab}if($type(a)=="element"){var c=a.panel;var d=this.activePanel;this.activePanel=c;this.anim.move(d,c,b);this.titles.removeClass("active");a.addClass("active");if(this.activeTitle&&this.activeTitle._color)this.panelwrap.removeClass(this.activeTitle._color);if(a._color)this.panelwrap.addClass(a._color);this.activeTitle=a;if(!this.options.fixheight){if(b){this.panelwrap.setStyle("height",Math.max(this.minHeight,this.activeTitle.panel.offsetHeight+10));if(this.options.position=="left"||this.options.position=="right"){this.tabHeight.setStyle("height",Math.max(this.minHeight,this.panelwrap.offsetHeight))}}else{(new Fx.Style(this.panelwrap,"height",{duration:this.options.duration})).start(this.panelwrap.offsetHeight,Math.max(this.minHeight,this.activeTitle.panel.offsetHeight+10));if(this.options.position=="left"||this.options.position=="right"){(new Fx.Style(this.tabHeight,"height",{duration:this.options.duration})).start(this.tabHeight.offsetHeight,Math.max(this.minHeight,this.activeTitle.panel.offsetHeight))}}}}},cancelAjax:function(){if(this.loadingTab){this.tabRequest.cancel();this.loadingTab.imgLoading.remove();this.tabRequest=null;this.loadingTab=null}},_getContent:function(a){this.loadingTab=a;var b=$(this.loadingTab.getElementsByTagName("H3")[0]);var c=new Element("img",{src:"plugins/content/ja_tabs/loading.gif",width:13});if(this.options.position=="right")c.inject(b,"top");else c.inject(b);this.loadingTab.imgLoading=c;this.tabRequest=new Ajax(this.options.ajaxUrl+"&tab="+this.loadingTab.getProperty("title"),{method:this.options.ajaxOptions,onComplete:this.update.bind(this)});this.tabRequest.request()},update:function(a){this.loadingTab.loaded=true;this.loadingTab.panel.subpanel=$E(".ja-tab-subcontent",this.loadingTab.panel);this.loadingTab.panel.subpanel.innerHTML=a;this.loadingTab.imgLoading.remove();var b=this.loadingTab;this.tabRequest=null;this.loadingTab=null;this.anim.reposition();this.activate(b)}});var animNone=new Class({initialize:function(a){this.options=a.options||{};this.tabwrap=a;this.tabwrap.panels.setStyle("position","absolute");this.tabwrap.panels.setStyle("left",0)},move:function(a,b,c){this.tabwrap.panels.setStyle("display","none");b.setStyle("display","block")}});var animFade=new Class({initialize:function(a){this.options=a.options||{};this.tabwrap=a;this.changeEffect=new Fx.Elements(this.tabwrap.panels,{duration:this.options.duration});this.tabwrap.panels.setStyles({opacity:0,width:"100%"})},move:function(a,b,c){if(this.options.changeTransition!="none"&&c==false){if(a){curOpac=a.getStyle("opacity");var d=new Fx.Style(a,"opacity",{duration:this.options.duration,transition:this.options.changeTransition});d.stop();d.start(curOpac,0)}curOpac=b.getStyle("opacity");var d=new Fx.Style(b,"opacity",{duration:this.options.duration,transition:this.options.changeTransition});d.stop();d.start(curOpac,1)}else{if(a)a.setStyle("opacity",0);b.setStyle("opacity",1)}},reposition:function(){if(this.tabwrap.activePanel){this.changeEffect.stop();for(var a=this.tabwrap.activePanel._idx-1;a>=0;a--){this.tabwrap.panels[a].setStyle("opacity",0)}for(a=this.tabwrap.activePanel._idx+1;a<this.tabwrap.panels.length;a++){this.tabwrap.panels[a].setStyle("opacity",0)}}}});var animMoveHor=new Class({initialize:function(a){this.options=a.options||{};this.tabwrap=a;this.changeEffect=new Fx.Elements(this.tabwrap.panels,{duration:this.options.duration});var b=0;this.tabwrap.panels.each(function(a){a.setStyle("left",b);b+=a.offsetWidth});this.tabwrap.panels.setStyle("top",0)},move:function(a,b,c){if(this.options.changeTransition!="none"&&!c){this.changeEffect.stop();var d={};var e=b.offsetLeft.toInt();i=0;this.tabwrap.panels.each(function(a){d[i++]={left:[a.offsetLeft.toInt(),a.offsetLeft.toInt()-e]}});this.changeEffect.start(d)}},reposition:function(){if(this.tabwrap.activePanel){this.changeEffect.stop();var a=this.tabwrap.activePanel.offsetLeft;for(var b=this.tabwrap.activePanel._idx-1;b>=0;b--){a-=this.tabwrap.panels[b].offsetWidth;this.tabwrap.panels[b].setStyle("left",a)}var a=this.tabwrap.activePanel.offsetLeft;for(b=this.tabwrap.activePanel._idx+1;b<this.tabwrap.panels.length;b++){a+=this.tabwrap.panels[b-1].offsetWidth;this.tabwrap.panels[b].setStyle("left",a)}}}});var animMoveVir=new Class({initialize:function(a){this.options=a.options||{};this.tabwrap=a;this.changeEffect=new Fx.Elements(this.tabwrap.panels,{duration:this.options.duration});var b=0;this.tabwrap.panels.each(function(a){a.setStyle("top",b);b+=Math.max(a.offsetHeight,a.getParent().getParent().offsetHeight)});this.tabwrap.panels.setStyle("left",0)},move:function(a,b,c){if(this.options.changeTransition!="none"&&c==false){this.changeEffect.stop();var d={};var e=b.offsetTop.toInt();i=0;this.tabwrap.panels.each(function(a){d[i++]={top:[a.offsetTop.toInt(),a.offsetTop.toInt()-e]}});this.changeEffect.start(d)}},reposition:function(){if(this.tabwrap.activePanel){this.changeEffect.stop();var a=this.tabwrap.activePanel.offsetTop;for(var b=this.tabwrap.activePanel._idx-1;b>=0;b--){a-=this.tabwrap.panels[b].offsetHeight;this.tabwrap.panels[b].setStyle("top",a-10)}var a=this.tabwrap.activePanel.offsetTop;for(b=this.tabwrap.activePanel._idx+1;b<this.tabwrap.panels.length;b++){a+=this.tabwrap.panels[b-1].offsetHeight+10;this.tabwrap.panels[b].setStyle("top",a)}}}})
function getElementsByClass(a,b,c){var d=new Array;var e=0;if(b==null)b=document;if(c==null)c="*";var f=b.getElementsByTagName(c);var g=f.length;var h=new RegExp("(^|\\s)"+a+"(\\s|$)");for(var i=0;i<g;i++){if(h.test(f[i].className)){d[e]=f[i];e++}}return d}function isIE6(){version=0;if(navigator.appVersion.indexOf("MSIE")!=-1){temp=navigator.appVersion.split("MSIE");version=parseFloat(temp[1])}return version&&version<7}function makeTransBg(a,b,c,d,e){var f=a;if(!f)return;if($type(f)!="array")f=[f];if(!c)c="crop";if(!e)e=0;var g=siteurl+"images/blank.png";f.each(function(a){var f=b;if(a.tagName=="IMG"){if(!f)f=a.src;if(!/\.png$/i.test(f)||/blank\.png$/i.test(f))return;a.setStyle("height",a.offsetHeight);a.setStyle("width",a.offsetWidth);a.src=g;a.setStyle("visibility","visible");a.setStyle("filter","progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+f+", sizingMethod='"+c+"')")}else{if(!f)f=a.getStyle("backgroundImage");var h=new RegExp("urls*[(\"']*([^'\")]*)['\")]*");if(m=h.exec(f))f=m[1];if(!/\.png$/i.test(f)||/blank\.png$/i.test(f))return;if(!d){a.setStyles({background:"none"});if(a.getStyle("position")!="absolute"&&a.getStyle("position")!="relative"){a.setStyle("position","relative")}a.getChildren().each(function(a){if(a.getStyle("position")!="absolute"&&a.getStyle("position")!="relative"){a.setStyle("position","relative")}a.setStyle("z-index",2)});var i=new Element("IMG");i.src=g;i.width=a.offsetWidth-e;i.height=a.offsetHeight-e;i.setStyles({position:"absolute",top:0,left:-a.getStyle("padding-left").toInt()});i.className="TransBG";i.setStyle("filter","progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+f+", sizingMethod='"+c+"')");i.inject(a,"top")}else{a.setStyle("filter","progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+f+", sizingMethod='"+c+"')")}}}.bind(this))}function addSpanToTitle(){var a=$$("#ja-botsl div.moduletable h3");if(!a)return;a.each(function(a){var b=a.innerHTML;var c=a.getText();var d=c.indexOf(" ");if(d!=-1){c=c.substr(0,d)}a.setHTML(b.replace(new RegExp(c),'<span class="first-word">'+c+"</span>"))})}function preloadImages(){var a=new Array;for(var b=0;b<arguments.length;b++){var c=arguments[b];a[b]=new Image;a[b].src=c}}function getDeepestDiv(a){while(a.getChildren().length==1&&a.getChildren()[0].tagName=="DIV"){a=a.getChildren()[0]}return a}function makeEqualHeight(a,b){if(!b)b=0;if(!a||a.length<2)return;var c=0;a.each(function(a,b){var d=a.getCoordinates().height;c=c<d?d:c},this);c+=b;a.each(function(a,b){a.setStyle("height",c-a.getStyle("padding-top").toInt()-a.getStyle("padding-bottom").toInt())},this)}function equalHeight(){if($("ja-botsl1")){var a=$$(getElementsByClass("ja-boxct-wrap",$("ja-botsl1"),"div"));if(a&&a.length>1){makeEqualHeight(a)}}}function jaAddEvent(a,b,c){if(a.addEventListener){a.addEventListener(b,c,false);return true}else if(a.attachEvent){var d=a.attachEvent("on"+b,c);return d}else{return false}}function createCookie(a,b,c){if(c){var d=new Date;d.setTime(d.getTime()+c*24*60*60*1e3);var e="; expires="+d.toGMTString()}else e="";document.cookie=a+"="+b+e+"; path=/"}function switchTool(a,b){createCookie(a,b,365);window.location.reload()}function switchFontSize(a,b){var c=$E("body");switch(b){case"inc":if(CurrentFontSize+1<7){c.removeClass("fs"+CurrentFontSize);CurrentFontSize++;c.addClass("fs"+CurrentFontSize)}break;case"dec":if(CurrentFontSize-1>0){c.removeClass("fs"+CurrentFontSize);CurrentFontSize--;c.addClass("fs"+CurrentFontSize)}break;default:c.removeClass("fs"+CurrentFontSize);CurrentFontSize=b;c.addClass("fs"+CurrentFontSize)}Cookie.set(a,CurrentFontSize,{duration:365})}String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};jaAddFirstItemToTopmenu=function(){li=$E("#mainlevel-nav li");if(li){li.addClass("ja-firstitem")}};jaRemoveLastContentSeparator=function(){var a=$$("#ja-content .article_separator");if(a&&a.length)a[a.length-1].remove()};jaRemoveLastTrBg=function(){var a=$$("#ja-topsl3 tr");if(!a||a.length<1)return;var b=a[a.length-1];if(a[a.length-1].innerHTML.trim()==""&&a.length>2){b.remove();b=a[a.length-2]}if(b)b.setStyle("background","none")};fixMenuWidth=function(){if(!$("ja-splitmenu"))return;var a=$("ja-splitmenu").getElement("ul").getChildren();if(a.length){var b=Math.floor($("ja-mainnav").offsetWidth/a.length);a.setStyle("width",b)}};moveReadmore=function(){var a=$$(".contentpaneopen");if(!a)return;a.each(function(a){var b=a.getElement(".readon");var c=a.getElement(".article-content");if(b&&c){b.remove().inject(c)}})};addIEHover=function(){if(!window.ie6)return;var a=$("ja-topsl");if(!a||!a.getChildren())return;a.getChildren().each(function(a){var b="topsl-hover-center";if(a.className.test("ja-box-left")){b="topsl-hover-left"}if(a.className.test("ja-box-right")){b="topsl-hover-right"}a.addEvent("mouseenter",function(){a.addClass(b)}.bind(this));a.addEvent("mouseleave",function(){a.removeClass(b)}.bind(this))})};window.addEvent("load",function(){equalHeight()});var boxes=[];showBox=function(a,b,c){a=$(a);if(!a)return;if($(c))a._caller=$(c);boxes.include(a);if(a.getStyle("display")=="none"){a.setStyles({display:"block",opacity:0})}if(a.status=="show"){a.status="hide";var d=new Fx.Style(a,"opacity");d.stop();d.start(a.getStyle("opacity"),0);if(a._caller)a._caller.removeClass("show")}else{boxes.each(function(b){if(b!=a&&b.status=="show"){b.status="hide";var c=new Fx.Style(b,"opacity");c.stop();c.start(b.getStyle("opacity"),0);if(b._caller)b._caller.removeClass("show")}},this);a.status="show";var d=new Fx.Style(a,"opacity",{onComplete:function(){if($(b))$(b).focus()}});d.stop();d.start(a.getStyle("opacity"),1);if(a._caller)a._caller.addClass("show")}};slideshowOnWalk=function(){if(window.JaSlideshow){var a=JaSlideshow.options.images.length;var b=.4;for(var c=0;c<a;c++){var d=$("jsnav"+c);if(!d||d.className.test("active"))continue;d.setStyle("opacity",b)}JaSlideshow.mask=(new Element("div",{id:"ja-slideshow-mask"})).inject(JaSlideshow.elementdiv);if(JaSlideshow.options.urls){JaSlideshow.mask.setStyle("cursor","pointer");JaSlideshow.mask.onclick=function(){location.href=JaSlideshow.options.urls[0]}}JaSlideshow.onWalk=function(a){var c={duration:JaSlideshow.options.duration[0],wait:false};var d=$("jsnav"+a[2]);thumb1fx=new Fx.Style(d,"opacity",c);thumb1fx.start(b);var e=$("jsnav"+a[0]);thumb2fx=new Fx.Style(e,"opacity",c);thumb2fx.start(1);if(JaSlideshow.options.urls){JaSlideshow.mask.onclick=function(){location.href=JaSlideshow.options.urls[a[2]]}}}}};jaMenuIcon=function(){var a=$$("#ja-splitmenu img");var b=$$("#ja-splitmenu li.active img");if(!a)return;a.each(function(a){var c=a.src;if(!(pos=c.lastIndexOf(".")))return;a.ext=c.substr(pos);a.src_on=c.substr(0,pos)+"-on"+c.substr(pos);a.src_off=c;if(a.ext==".png"&&window.ie6){a.src_on="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+a.src_on+"', sizingMethod='image')";a.src_off="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+a.src+"', sizingMethod='image')";a.src=siteurl+"images/blank.png";a.setStyle("filter",a.src_off)}var d=new Image;d.src=a.src_on;if(b&&b.contains(a)){if(a.ext==".png"&&window.ie6){a.setStyle("filter",a.src_on)}else{a.src=a.src_on}return}a.getParent().addEvent("mouseenter",function(){if(a.ext==".png"&&window.ie6){a.setStyle("filter",a.src_on)}else{a.src=a.src_on}},this);a.getParent().addEvent("mouseleave",function(){if(a.ext==".png"&&window.ie6){a.setStyle("filter",a.src_off)}else{a.src=a.src_off}},this)})};ja_topsl_button=function(){var a=$("ja-topsl-button");if(a){a.el=$("ja-topslwrap");a.el.setStyles({position:"relative",overflow:"hidden"});a.fx=new Fx.Style(a.el,"height");a._maxh=a.el.offsetHeight;a._status=true;a._alt=a.title;a.title=a.getText();a.addEvent("click",function(){var a=this._status?0:this.el.scrollHeight-20;this.fx.start(a);this._status=!this._status;this.setText(this._alt);this._alt=this.title;this.title=this.getText();return false})}}
function sfHoverOut(){clearTimeout(this.timer);this.className=this.className.replace(new RegExp("sfhover\\b"),"")}sfHover=function(){var a=document.getElementById("ja-cssmenu").getElementsByTagName("li");for(var b=0;b<a.length;++b){a[b].onmouseover=function(){clearTimeout(this.timer);if(this.className.indexOf("sfhover")==-1)this.className+="sfhover"};a[b].onmouseout=function(){this.timer=setTimeout(sfHoverOut.bind(this),20)}}};if(window.attachEvent)window.attachEvent("onload",sfHover)
