var Prototype={Version:"1.5.0_rc0",ScriptFragment:"(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)",emptyFunction:function(){},K:function(A){return A}};var Class={create:function(){return function(){this.initialize.apply(this,arguments)}}};var Abstract={};Object.extend=function(C,B){for(var A in B){C[A]=B[A]}return C};Object.inspect=function(A){try{if(A==undefined){return"undefined"}if(A==null){return"null"}return A.inspect?A.inspect():A.toString()}catch(B){if(B instanceof RangeError){return"..."}throw B}};Function.prototype.bind=function(){var C=this,B=$A(arguments),A=B.shift();return function(){return C.apply(A,B.concat($A(arguments)))}};Function.prototype.bindAsEventListener=function(A){var B=this;return function(C){return B.call(A,C||window.event)}};Object.extend(Number.prototype,{toColorPart:function(){var A=this.toString(16);if(this<16){return"0"+A}return A},succ:function(){return this+1},times:function(A){$R(0,this,true).each(A);return this}});var Try={these:function(){var A;for(var B=0;B<arguments.length;B++){var D=arguments[B];try{A=D();break}catch(C){}}return A}};var PeriodicalExecuter=Class.create();PeriodicalExecuter.prototype={initialize:function(B,A){this.callback=B;this.frequency=A;this.currentlyExecuting=false;this.registerCallback()},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.callback()}finally{this.currentlyExecuting=false}}}};Object.extend(String.prototype,{gsub:function(E,D){var C="",B=this,A;D=arguments.callee.prepareReplacement(D);while(B.length>0){if(A=B.match(E)){C+=B.slice(0,A.index);C+=(D(A)||"").toString();B=B.slice(A.index+A[0].length)}else{C+=B,B=""}}return C},sub:function(B,A,C){A=this.gsub.prepareReplacement(A);C=C===undefined?1:C;return this.gsub(B,function(D){if(--C<0){return D[0]}return A(D)})},scan:function(B,A){this.gsub(B,A);return this},truncate:function(B,A){B=B||30;A=A===undefined?"...":A;return this.length>B?this.slice(0,B-A.length)+A:this},strip:function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"")},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"")},extractScripts:function(){var B=new RegExp(Prototype.ScriptFragment,"img");var A=new RegExp(Prototype.ScriptFragment,"im");return(this.match(B)||[]).map(function(C){return(C.match(A)||["",""])[1]})},evalScripts:function(){return this.extractScripts().map(function(_23){return eval(_23)})},escapeHTML:function(){var B=document.createElement("div");var A=document.createTextNode(this);B.appendChild(A);return B.innerHTML},unescapeHTML:function(){var A=document.createElement("div");A.innerHTML=this.stripTags();return A.childNodes[0]?A.childNodes[0].nodeValue:""},toQueryParams:function(){var A=this.match(/^\??(.*)$/)[1].split("&");return A.inject({},function(C,B){var D=B.split("=");C[D[0]]=D[1];return C})},toArray:function(){return this.split("")},camelize:function(){var E=this.split("-");if(E.length==1){return E[0]}var D=this.indexOf("-")==0?E[0].charAt(0).toUpperCase()+E[0].substring(1):E[0];for(var B=1,A=E.length;B<A;B++){var C=E[B];D+=C.charAt(0).toUpperCase()+C.substring(1)}return D},inspect:function(){return"'"+this.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+"'"}});String.prototype.gsub.prepareReplacement=function(B){if(typeof B=="function"){return B}var A=new Template(B);return function(C){return A.evaluate(C)}};String.prototype.parseQuery=String.prototype.toQueryParams;var Template=Class.create();Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;Template.prototype={initialize:function(A,B){this.template=A.toString();this.pattern=B||Template.Pattern},evaluate:function(A){return this.template.gsub(this.pattern,function(C){var B=C[1];if(B=="\\"){return C[2]}return B+(A[C[3]]||"").toString()})}};var $break=new Object();var $continue=new Object();var Enumerable={each:function(B){var A=0;try{this._each(function(E){try{B(E,A++)}catch(D){if(D!=$continue){throw D}}})}catch(C){if(C!=$break){throw C}}},all:function(B){var A=true;this.each(function(D,C){A=A&&!!(B||Prototype.K)(D,C);if(!A){throw $break}});return A},any:function(A){var B=true;this.each(function(D,C){if(B=!!(A||Prototype.K)(D,C)){throw $break}});return B},collect:function(B){var A=[];this.each(function(C,D){A.push(B(C,D))});return A},detect:function(B){var A;this.each(function(D,C){if(B(D,C)){A=D;throw $break}});return A},findAll:function(B){var A=[];this.each(function(D,C){if(B(D,C)){A.push(D)}});return A},grep:function(B,C){var A=[];this.each(function(F,E){var D=F.toString();if(D.match(B)){A.push((C||Prototype.K)(F,E))}});return A},include:function(B){var A=false;this.each(function(C){if(C==B){A=true;throw $break}});return A},inject:function(B,A){this.each(function(D,C){B=A(B,D,C)});return B},invoke:function(A){var B=$A(arguments).slice(1);return this.collect(function(C){return C[A].apply(C,B)})},max:function(A){var B;this.each(function(D,C){D=(A||Prototype.K)(D,C);if(B==undefined||D>=B){B=D}});return B},min:function(B){var A;this.each(function(D,C){D=(B||Prototype.K)(D,C);if(A==undefined||D<A){A=D}});return A},partition:function(C){var B=[],A=[];this.each(function(E,D){((C||Prototype.K)(E,D)?B:A).push(E)});return[B,A]},pluck:function(B){var A=[];this.each(function(C,D){A.push(C[B])});return A},reject:function(A){var B=[];this.each(function(D,C){if(!A(D,C)){B.push(D)}});return B},sortBy:function(A){return this.collect(function(C,B){return{value:C,criteria:A(C,B)}}).sort(function(E,D){var C=E.criteria,B=D.criteria;return C<B?-1:C>B?1:0}).pluck("value")},toArray:function(){return this.collect(Prototype.K)},zip:function(){var C=Prototype.K,B=$A(arguments);if(typeof B.last()=="function"){C=B.pop()}var A=[this].concat(B).map($A);return this.map(function(E,D){return C(A.pluck(D))})},inspect:function(){return"#<Enumerable:"+this.toArray().inspect()+">"}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray});var $A=Array.from=function(B){if(!B){return[]}if(B.toArray){return B.toArray()}else{var A=[];for(var C=0;C<B.length;C++){A.push(B[C])}return A}};Object.extend(Array.prototype,Enumerable);if(!Array.prototype._reverse){Array.prototype._reverse=Array.prototype.reverse}Object.extend(Array.prototype,{_each:function(B){for(var A=0;A<this.length;A++){B(this[A])}},clear:function(){this.length=0;return this},first:function(){return this[0]},last:function(){return this[this.length-1]},compact:function(){return this.select(function(A){return A!=undefined||A!=null})},flatten:function(){return this.inject([],function(B,A){return B.concat(A&&A.constructor==Array?A.flatten():[A])})},without:function(){var A=$A(arguments);return this.select(function(B){return !A.include(B)})},indexOf:function(B){for(var A=0;A<this.length;A++){if(this[A]==B){return A}}return -1},reverse:function(A){return(A!==false?this:this.toArray())._reverse()},inspect:function(){return"["+this.map(Object.inspect).join(", ")+"]"}});var Hash={_each:function(D){for(var C in this){var A=this[C];if(typeof A=="function"){continue}var B=[C,A];B.key=C;B.value=A;D(B)}},keys:function(){return this.pluck("key")},values:function(){return this.pluck("value")},merge:function(A){return $H(A).inject($H(this),function(C,B){C[B.key]=B.value;return C})},toQueryString:function(){return this.map(function(A){return A.map(encodeURIComponent).join("=")}).join("&")},inspect:function(){return"#<Hash:{"+this.map(function(A){return A.map(Object.inspect).join(": ")}).join(", ")+"}>"}};function $H(B){var A=Object.extend({},B||{});Object.extend(A,Enumerable);Object.extend(A,Hash);return A}ObjectRange=Class.create();Object.extend(ObjectRange.prototype,Enumerable);Object.extend(ObjectRange.prototype,{initialize:function(B,A,C){this.start=B;this.end=A;this.exclusive=C},_each:function(B){var A=this.start;do{B(A);A=A.succ()}while(this.include(A))},include:function(A){if(A<this.start){return false}if(this.exclusive){return A<this.end}return A<=this.end}});var $R=function(B,A,C){return new ObjectRange(B,A,C)};function $(){var C=[],B;for(var A=0;A<arguments.length;A++){B=arguments[A];if(typeof B=="string"){B=document.getElementById(B)}C.push(Element.extend(B))}return C.length<2?C[0]:C}document.getElementsByClassName=function(C,B){var A=($(B)||document.body).getElementsByTagName("*");return $A(A).inject([],function(D,E){if(E.className.match(new RegExp("(^|\\s)"+C+"(\\s|$)"))){D.push(Element.extend(E))}return D})};if(!window.Element){var Element=new Object()}Element.extend=function(D){if(!D){return }if(_nativeExtensions){return D}if(!D._extended&&D.tagName&&D!=window){var C=Element.Methods,B=Element.extend.cache;for(property in C){var A=C[property];if(typeof A=="function"){D[property]=B.findOrStore(A)}}}D._extended=true;return D};Element.extend.cache={findOrStore:function(A){return this[A]=this[A]||function(){return A.apply(null,[this].concat($A(arguments)))}}};Element.Methods={visible:function(A){return $(A).style.display!="none"},toggle:function(){for(var A=0;A<arguments.length;A++){var B=$(arguments[A]);Element[Element.visible(B)?"hide":"show"](B)}},hide:function(){for(var A=0;A<arguments.length;A++){var B=$(arguments[A]);B.style.display="none"}},show:function(){for(var A=0;A<arguments.length;A++){var B=$(arguments[A]);B.style.display=""}},remove:function(A){A=$(A);A.parentNode.removeChild(A)},update:function(B,A){$(B).innerHTML=A.stripScripts();setTimeout(function(){A.evalScripts()},10)},replace:function(B,A){B=$(B);if(B.outerHTML){B.outerHTML=A.stripScripts()}else{var C=B.ownerDocument.createRange();C.selectNodeContents(B);B.parentNode.replaceChild(C.createContextualFragment(A.stripScripts()),B)}setTimeout(function(){A.evalScripts()},10)},getHeight:function(A){A=$(A);return A.offsetHeight},classNames:function(A){return new Element.ClassNames(A)},hasClassName:function(B,A){if(!(B=$(B))){return }return Element.classNames(B).include(A)},addClassName:function(B,A){if(!(B=$(B))){return }return Element.classNames(B).add(A)},removeClassName:function(B,A){if(!(B=$(B))){return }return Element.classNames(B).remove(A)},cleanWhitespace:function(C){C=$(C);for(var A=0;A<C.childNodes.length;A++){var B=C.childNodes[A];if(B.nodeType==3&&!/\S/.test(B.nodeValue)){Element.remove(B)}}},empty:function(A){return $(A).innerHTML.match(/^\s*$/)},childOf:function(B,A){B=$(B),A=$(A);while(B=B.parentNode){if(B==A){return true}}return false},scrollTo:function(B){B=$(B);var A=B.x?B.x:B.offsetLeft,C=B.y?B.y:B.offsetTop;window.scrollTo(A,C)},getStyle:function(D,B){D=$(D);var A=D.style[B.camelize()];if(!A){if(document.defaultView&&document.defaultView.getComputedStyle){var C=document.defaultView.getComputedStyle(D,null);A=C?C.getPropertyValue(B):null}else{if(D.currentStyle){A=D.currentStyle[B.camelize()]}}}if(window.opera&&["left","top","right","bottom"].include(B)){if(Element.getStyle(D,"position")=="static"){A="auto"}}return A=="auto"?null:A},setStyle:function(C,B){C=$(C);for(var A in B){C.style[A.camelize()]=B[A]}},getDimensions:function(F){F=$(F);if(Element.getStyle(F,"display")!="none"){return{width:F.offsetWidth,height:F.offsetHeight}}var A=F.style;var E=A.visibility;var D=A.position;A.visibility="hidden";A.position="absolute";A.display="";var C=F.clientWidth;var B=F.clientHeight;A.display="none";A.position=D;A.visibility=E;return{width:C,height:B}},makePositioned:function(A){A=$(A);var B=Element.getStyle(A,"position");if(B=="static"||!B){A._madePositioned=true;A.style.position="relative";if(window.opera){A.style.top=0;A.style.left=0}}},undoPositioned:function(A){A=$(A);if(A._madePositioned){A._madePositioned=undefined;A.style.position=A.style.top=A.style.left=A.style.bottom=A.style.right=""}},makeClipping:function(A){A=$(A);if(A._overflow){return }A._overflow=A.style.overflow;if((Element.getStyle(A,"overflow")||"visible")!="hidden"){A.style.overflow="hidden"}},undoClipping:function(A){A=$(A);if(A._overflow){return }A.style.overflow=A._overflow;A._overflow=undefined}};Object.extend(Element,Element.Methods);var _nativeExtensions=false;if(!HTMLElement&&/Konqueror|Safari|KHTML/.test(navigator.userAgent)){var HTMLElement={};HTMLElement.prototype=document.createElement("div").__proto__}Element.addMethods=function(C){Object.extend(Element.Methods,C||{});if(typeof HTMLElement!="undefined"){var C=Element.Methods,A=Element.extend.cache;for(property in C){var B=C[property];if(typeof B=="function"){HTMLElement.prototype[property]=A.findOrStore(B)}}_nativeExtensions=true}};Element.addMethods();var Toggle=new Object();Toggle.display=Element.toggle;Abstract.Insertion=function(A){this.adjacency=A};Abstract.Insertion.prototype={initialize:function(C,B){this.element=$(C);this.content=B.stripScripts();if(this.adjacency&&this.element.insertAdjacentHTML){try{this.element.insertAdjacentHTML(this.adjacency,this.content)}catch(D){var A=this.element.tagName.toLowerCase();if(A=="tbody"||A=="tr"){this.insertContent(this.contentFromAnonymousTable())}else{throw D}}}else{this.range=this.element.ownerDocument.createRange();if(this.initializeRange){this.initializeRange()}this.insertContent([this.range.createContextualFragment(this.content)])}setTimeout(function(){B.evalScripts()},10)},contentFromAnonymousTable:function(){var A=document.createElement("div");A.innerHTML="<table><tbody>"+this.content+"</tbody></table>";return $A(A.childNodes[0].childNodes[0].childNodes)}};var Insertion=new Object();Insertion.Before=Class.create();Insertion.Before.prototype=Object.extend(new Abstract.Insertion("beforeBegin"),{initializeRange:function(){this.range.setStartBefore(this.element)},insertContent:function(A){A.each((function(B){this.element.parentNode.insertBefore(B,this.element)}).bind(this))}});Insertion.Top=Class.create();Insertion.Top.prototype=Object.extend(new Abstract.Insertion("afterBegin"),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(true)},insertContent:function(A){A.reverse(false).each((function(B){this.element.insertBefore(B,this.element.firstChild)}).bind(this))}});Insertion.Bottom=Class.create();Insertion.Bottom.prototype=Object.extend(new Abstract.Insertion("beforeEnd"),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(this.element)},insertContent:function(A){A.each((function(B){this.element.appendChild(B)}).bind(this))}});Insertion.After=Class.create();Insertion.After.prototype=Object.extend(new Abstract.Insertion("afterEnd"),{initializeRange:function(){this.range.setStartAfter(this.element)},insertContent:function(A){A.each((function(B){this.element.parentNode.insertBefore(B,this.element.nextSibling)}).bind(this))}});Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(A){this.element=$(A)},_each:function(A){this.element.className.split(/\s+/).select(function(B){return B.length>0})._each(A)},set:function(A){this.element.className=A},add:function(A){if(this.include(A)){return }this.set(this.toArray().concat(A).join(" "))},remove:function(A){if(!this.include(A)){return }this.set(this.select(function(B){return B!=A}).join(" "))},toString:function(){return this.toArray().join(" ")}};Object.extend(Element.ClassNames.prototype,Enumerable);var Selector=Class.create();Selector.prototype={initialize:function(A){this.params={classNames:[]};this.expression=A.toString().strip();this.parseExpression();this.compileMatcher()},parseExpression:function(){function G(H){throw"Parse error in selector: "+H}if(this.expression==""){G("empty expression")}var F=this.params,D=this.expression,C,B,A,E;while(C=D.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)){F.attributes=F.attributes||[];F.attributes.push({name:C[2],operator:C[3],value:C[4]||C[5]||""});D=C[1]}if(D=="*"){return this.params.wildcard=true}while(C=D.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)){B=C[1],A=C[2],E=C[3];switch(B){case"#":F.id=A;break;case".":F.classNames.push(A);break;case"":case undefined:F.tagName=A.toUpperCase();break;default:G(D.inspect())}D=E}if(D.length>0){G(D.inspect())}},buildMatchExpression:function(){var D=this.params,C=[],B;if(D.wildcard){C.push("true")}if(B=D.id){C.push("element.id == "+B.inspect())}if(B=D.tagName){C.push("element.tagName.toUpperCase() == "+B.inspect())}if((B=D.classNames).length>0){for(var A=0;A<B.length;A++){C.push("Element.hasClassName(element, "+B[A].inspect()+")")}}if(B=D.attributes){B.each(function(G){var F="element.getAttribute("+G.name.inspect()+")";var E=function(H){return F+" && "+F+".split("+H.inspect()+")"};switch(G.operator){case"=":C.push(F+" == "+G.value.inspect());break;case"~=":C.push(E(" ")+".include("+G.value.inspect()+")");break;case"|=":C.push(E("-")+".first().toUpperCase() == "+G.value.toUpperCase().inspect());break;case"!=":C.push(F+" != "+G.value.inspect());break;case"":case undefined:C.push(F+" != null");break;default:throw"Unknown operator "+G.operator+" in selector"}})}return C.join(" && ")},compileMatcher:function(){this.match=new Function("element","if (!element.tagName) return false;       return "+this.buildMatchExpression())},findElements:function(B){var A;if(A=$(this.params.id)){if(this.match(A)){if(!B||Element.childOf(A,B)){return[A]}}}B=(B||document).getElementsByTagName(this.params.tagName||"*");var D=[];for(var C=0;C<B.length;C++){if(this.match(A=B[C])){D.push(Element.extend(A))}}return D},toString:function(){return this.expression}};function $$(){return $A(arguments).map(function(A){return A.strip().split(/\s+/).inject([null],function(B,C){var D=new Selector(C);return B.map(D.findElements.bind(D)).flatten()})}).flatten()}var Field={clear:function(){for(var A=0;A<arguments.length;A++){$(arguments[A]).value=""}},focus:function(A){$(A).focus()},present:function(){for(var A=0;A<arguments.length;A++){if($(arguments[A]).value==""){return false}}return true},select:function(A){$(A).select()},activate:function(A){A=$(A);A.focus();if(A.select){A.select()}}};var Form={serialize:function(E){var D=Form.getElements($(E));var C=[];for(var B=0;B<D.length;B++){var A=Form.Element.serialize(D[B]);if(A){C.push(A)}}return C.join("&")},getElements:function(D){D=$(D);var A=[];for(var E in Form.Element.Serializers){var C=D.getElementsByTagName(E);for(var B=0;B<C.length;B++){A.push(C[B])}}return A},getInputs:function(D,A,B){D=$(D);var F=D.getElementsByTagName("input");if(!A&&!B){return F}var G=[];for(var C=0;C<F.length;C++){var E=F[C];if((A&&E.type!=A)||(B&&E.name!=B)){continue}G.push(E)}return G},disable:function(D){var C=Form.getElements(D);for(var B=0;B<C.length;B++){var A=C[B];A.blur();A.disabled="true"}},enable:function(D){var A=Form.getElements(D);for(var B=0;B<A.length;B++){var C=A[B];C.disabled=""}},findFirstElement:function(A){return Form.getElements(A).find(function(B){return B.type!="hidden"&&!B.disabled&&["input","select","textarea"].include(B.tagName.toLowerCase())})},focusFirstElement:function(A){Field.activate(Form.findFirstElement(A))},reset:function(A){$(A).reset()}};Form.Element={serialize:function(B){B=$(B);var C=B.tagName.toLowerCase();var A=Form.Element.Serializers[C](B);if(A){var D=encodeURIComponent(A[0]);if(D.length==0){return }if(A[1].constructor!=Array){A[1]=[A[1]]}return A[1].map(function(E){return D+"="+encodeURIComponent(E)}).join("&")}},getValue:function(C){C=$(C);var B=C.tagName.toLowerCase();var A=Form.Element.Serializers[B](C);if(A){return A[1]}}};Form.Element.Serializers={input:function(A){switch(A.type.toLowerCase()){case"submit":case"hidden":case"password":case"text":return Form.Element.Serializers.textarea(A);case"checkbox":case"radio":return Form.Element.Serializers.inputSelector(A)}return false},inputSelector:function(A){if(A.checked){return[A.name,A.value]}},textarea:function(A){return[A.name,A.value]},select:function(A){return Form.Element.Serializers[A.type=="select-one"?"selectOne":"selectMany"](A)},selectOne:function(D){var C="",B,A=D.selectedIndex;if(A>=0){B=D.options[A];C=B.value||B.text}return[D.name,C]},selectMany:function(A){var B=[];for(var D=0;D<A.length;D++){var C=A.options[D];if(C.selected){B.push(C.value||C.text)}}return[A.name,B]}};var $F=Form.Element.getValue;Abstract.TimedObserver=function(){};Abstract.TimedObserver.prototype={initialize:function(A,C,B){this.frequency=C;this.element=$(A);this.callback=B;this.lastValue=this.getValue();this.registerCallback()},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},onTimerEvent:function(){var A=this.getValue();if(this.lastValue!=A){this.callback(this.element,A);this.lastValue=A}}};Form.Element.Observer=Class.create();Form.Element.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){return Form.Element.getValue(this.element)}});Form.Observer=Class.create();Form.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){return Form.serialize(this.element)}});Abstract.EventObserver=function(){};Abstract.EventObserver.prototype={initialize:function(B,A){this.element=$(B);this.callback=A;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=="form"){this.registerFormCallbacks()}else{this.registerCallback(this.element)}},onElementEvent:function(){var A=this.getValue();if(this.lastValue!=A){this.callback(this.element,A);this.lastValue=A}},registerFormCallbacks:function(){var B=Form.getElements(this.element);for(var A=0;A<B.length;A++){this.registerCallback(B[A])}},registerCallback:function(A){if(A.type){switch(A.type.toLowerCase()){case"checkbox":case"radio":Event.observe(A,"click",this.onElementEvent.bind(this));break;case"password":case"text":case"textarea":case"select-one":case"select-multiple":Event.observe(A,"change",this.onElementEvent.bind(this));break}}}};Form.Element.EventObserver=Class.create();Form.Element.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){return Form.Element.getValue(this.element)}});Form.EventObserver=Class.create();Form.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){return Form.serialize(this.element)}});if(!window.Event){var Event=new Object()}Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(A){return A.target||A.srcElement},isLeftClick:function(A){return(((A.which)&&(A.which==1))||((A.button)&&(A.button==1)))},pointerX:function(A){return A.pageX||(A.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))},pointerY:function(A){return A.pageY||(A.clientY+(document.documentElement.scrollTop||document.body.scrollTop))},stop:function(A){if(A.preventDefault){A.preventDefault();A.stopPropagation()}else{A.returnValue=false;A.cancelBubble=true}},findElement:function(C,B){var A=Event.element(C);while(A.parentNode&&(!A.tagName||(A.tagName.toUpperCase()!=B.toUpperCase()))){A=A.parentNode}return A},observers:false,_observeAndCache:function(A,B,D,C){if(!this.observers){this.observers=[]}if(A.addEventListener){this.observers.push([A,B,D,C]);A.addEventListener(B,D,C)}else{if(A.attachEvent){this.observers.push([A,B,D,C]);A.attachEvent("on"+B,D)}}},unloadCache:function(){if(!Event.observers){return }for(var A=0;A<Event.observers.length;A++){Event.stopObserving.apply(this,Event.observers[A]);Event.observers[A][0]=null}Event.observers=false},observe:function(A,B,D,C){var A=$(A);C=C||false;if(B=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||A.attachEvent)){B="keydown"}this._observeAndCache(A,B,D,C)},stopObserving:function(D,A,C,B){var D=$(D);B=B||false;if(A=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||D.detachEvent)){A="keydown"}if(D.removeEventListener){D.removeEventListener(A,C,B)}else{if(D.detachEvent){D.detachEvent("on"+A,C)}}}});if(navigator.appVersion.match(/\bMSIE\b/)){Event.observe(window,"unload",Event.unloadCache,false)}var bOpera=navigator.userAgent.toLowerCase().indexOf("opera")>-1;var bIe=document.all&&!bOpera;var bIe6=bIe&&navigator.userAgent.toLowerCase().indexOf("msie 6.0")>-1?true:false;function valueInArray(C,B){if(B.length){for(var A=0;A<B.length;A++){if(B[A]==C){return true}}}return false}var iCharSize;var iWidth_page=-1;var iWidth_content=-1;var iWidth_side=-1;var iWidth_list=-1;var bSizesSet=false;function setSizes(){if(bSizesSet){return }bSizesSet=true;var C=$("page");if(C){iWidth_page=C.offsetWidth}var B=$("content");if(B){iWidth_content=B.offsetWidth}var A=$("side");if(A){iWidth_side=A.offsetWidth}var D=$("list");if(D){iWidth_list=D.offsetWidth}}function init(){Event.observe($("query"),"focus",queryFocus);Event.observe($("query"),"blur",queryBlur);if($("query").value!="Suchbegriff"){queryFocus()}}function queryFocus(){$("query").value="";$("query").focus()}function queryBlur(){if($("query").value==""){$("query").value="Suchbegriff"}}function resize(){setSizes();var I=document.all?document.body.offsetWidth:window.innerWidth;var M=document.all?document.body.offsetHeight:window.innerHeight;var L=$("list");if(L){for(var D=0;D<L.childNodes.length;D++){var B=L.childNodes[D];if(Element.hasClassName(B,"featured")){continue}var N=B.firstChild;var G=B.childNodes[1];if(G.nodeName.toLowerCase()=="a"){if(I<iWidth_list){G.style.marginBottom="0.4em"}else{var K=parseInt(G.style.marginBottom);if(!(K>0)){var K=B.offsetHeight-G.offsetHeight-12;if(K>0){G.style.marginBottom=K+"px"}}if(B.offsetHeight<=136){B.style.height="136px"}}}}}if(I<iWidth_page||iWidth_content+iWidth_side>iWidth_page){Element.addClassName($("page"),"small");Element.removeClassName($("page"),"normal")}else{Element.removeClassName($("page"),"small");Element.addClassName($("page"),"normal")}if(I<940){Element.addClassName($("pageFrame"),"noBg")}else{Element.removeClassName($("pageFrame"),"noBg")}var H=$("content");var F=$("side");if(H.offsetHeight<F.offsetHeight){H.style.height=F.offsetHeight+"px"}for(var J=0;J<document.images.length;J++){if(document.images[J].className.indexOf("photo")>-1){var E=document.images[J];var G=E.parentNode;var A=G.href;if(A){var C=A.indexOf("&");if(A.indexOf("&")>-1){A=A.substr(0,A.indexOf("&",C+1))}A=A+"&bMax=1&";if(I<=320){G.href=A+"iWidth=160&iHeight=120"}else{if(I<=640){G.href=A+"iWidth=240&iHeight=180"}else{if(I<=800){G.href=A+"iWidth=300&iHeight=225"}else{if(I>1024){G.href=A+"iWidth=800&iHeight=600"}else{G.href=A+"iWidth=500&iHeight=375"}}}}}}}}Event.observe(window,"load",init);Event.observe(window,"resize",resize);function addIEAlpha(){for(var D=0;D<document.images.length;D++){if(document.images[D].className.indexOf("trans")>-1){var C=document.images[D].src;var A=document.images[D].offsetWidth-2;var B=document.images[D].offsetHeight-2;document.images[D].src=sSystemBaseUrl+"/graphics/dummy.png";document.images[D].style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+C+'",sizingMethod="scale");';document.images[D].style.width=A+"px";document.images[D].style.height=B+"px"}}}function substrCount(D,C){var B=0;var A=0;while(true){A=D.indexOf(C,A+1);if(A>-1){B++}else{break}}return B}function setPreviewMark(){var C=$("description");if(C&&C.previousSibling&&location.href.indexOf("bMore=1")>-1){var A=document.referrer.indexOf("Presse")>-1?328:168;var B=new TextMarker(C,"light",A)}}String.prototype.parseColor=function(){var C="#";if(this.slice(0,4)=="rgb("){var B=this.slice(4,this.length-1).split(",");var A=0;do{C+=parseInt(B[A]).toColorPart()}while(++A<3)}else{if(this.slice(0,1)=="#"){if(this.length==4){for(var A=1;A<4;A++){C+=(this.charAt(A)+this.charAt(A)).toLowerCase()}}if(this.length==7){C=this.toLowerCase()}}}return(C.length==7?C:(arguments[0]||this))};Element.collectTextNodes=function(A){return $A($(A).childNodes).collect(function(B){return(B.nodeType==3?B.nodeValue:(B.hasChildNodes()?Element.collectTextNodes(B):""))}).flatten().join("")};Element.collectTextNodesIgnoreClass=function(B,A){return $A($(B).childNodes).collect(function(C){return(C.nodeType==3?C.nodeValue:((C.hasChildNodes()&&!Element.hasClassName(C,A))?Element.collectTextNodesIgnoreClass(C,A):""))}).flatten().join("")};Element.setContentZoom=function(B,A){B=$(B);B.setStyle({fontSize:(A/100)+"em"});if(navigator.appVersion.indexOf("AppleWebKit")>0){window.scrollBy(0,0)}return B};Element.getOpacity=function(B){B=$(B);var A;if(A=B.getStyle("opacity")){return parseFloat(A)}if(A=(B.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){if(A[1]){return parseFloat(A[1])/100}}return 1};Element.setOpacity=function(B,A){B=$(B);if(A==1){B.setStyle({opacity:(/Gecko/.test(navigator.userAgent)&&!/Konqueror|Safari|KHTML/.test(navigator.userAgent))?0.999999:1});if(/MSIE/.test(navigator.userAgent)&&!window.opera){B.setStyle({filter:Element.getStyle(B,"filter").replace(/alpha\([^\)]*\)/gi,"")})}}else{if(A<0.00001){A=0}B.setStyle({opacity:A});if(/MSIE/.test(navigator.userAgent)&&!window.opera){B.setStyle({filter:B.getStyle("filter").replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+A*100+")"})}}return B};Element.getInlineOpacity=function(A){return $(A).style.opacity||""};Element.forceRerendering=function(A){try{A=$(A);var C=document.createTextNode(" ");A.appendChild(C);A.removeChild(C)}catch(B){}};Array.prototype.call=function(){var A=arguments;this.each(function(B){B.apply(this,A)})};var Effect={_elementDoesNotExistError:{name:"ElementDoesNotExistError",message:"The specified DOM element does not exist, but is required for this effect to operate"},tagifyText:function(B){if(typeof Builder=="undefined"){throw ("Effect.tagifyText requires including script.aculo.us' builder.js library")}var A="position:relative";if(/MSIE/.test(navigator.userAgent)&&!window.opera){A+=";zoom:1"}B=$(B);$A(B.childNodes).each(function(C){if(C.nodeType==3){C.nodeValue.toArray().each(function(D){B.insertBefore(Builder.node("span",{style:A},D==" "?String.fromCharCode(160):D),C)});Element.remove(C)}})},multiple:function(A,E){var D;if(((typeof A=="object")||(typeof A=="function"))&&(A.length)){D=A}else{D=$(A).childNodes}var C=Object.extend({speed:0.1,delay:0},arguments[2]||{});var B=C.delay;$A(D).each(function(G,F){new E(G,Object.extend(C,{delay:F*C.speed+B}))})},PAIRS:{slide:["SlideDown","SlideUp"],blind:["BlindDown","BlindUp"],appear:["Appear","Fade"]},toggle:function(C,B){C=$(C);B=(B||"appear").toLowerCase();var A=Object.extend({queue:{position:"end",scope:(C.id||"global"),limit:1}},arguments[2]||{});Effect[C.visible()?Effect.PAIRS[B][1]:Effect.PAIRS[B][0]](C,A)}};var Effect2=Effect;Effect.Transitions={linear:Prototype.K,sinoidal:function(A){return(-Math.cos(A*Math.PI)/2)+0.5},reverse:function(A){return 1-A},flicker:function(A){return((-Math.cos(A*Math.PI)/4)+0.75)+Math.random()/4},wobble:function(A){return(-Math.cos(A*Math.PI*(9*A))/2)+0.5},pulse:function(B,A){A=A||5;return(Math.round((B%(1/A))*A)==0?((B*A*2)-Math.floor(B*A*2)):1-((B*A*2)-Math.floor(B*A*2)))},none:function(A){return 0},full:function(A){return 1}};Effect.ScopedQueue=Class.create();Object.extend(Object.extend(Effect.ScopedQueue.prototype,Enumerable),{initialize:function(){this.effects=[];this.interval=null},_each:function(A){this.effects._each(A)},add:function(C){var B=new Date().getTime();var A=(typeof C.options.queue=="string")?C.options.queue:C.options.queue.position;switch(A){case"front":this.effects.findAll(function(D){return D.state=="idle"}).each(function(D){D.startOn+=C.finishOn;D.finishOn+=C.finishOn});break;case"with-last":B=this.effects.pluck("startOn").max()||B;break;case"end":B=this.effects.pluck("finishOn").max()||B;break}C.startOn+=B;C.finishOn+=B;if(!C.options.queue.limit||(this.effects.length<C.options.queue.limit)){this.effects.push(C)}if(!this.interval){this.interval=setInterval(this.loop.bind(this),40)}},remove:function(A){this.effects=this.effects.reject(function(B){return B==A});if(this.effects.length==0){clearInterval(this.interval);this.interval=null}},loop:function(){var A=new Date().getTime();this.effects.invoke("loop",A)}});Effect.Queues={instances:$H(),get:function(A){if(typeof A!="string"){return A}if(!this.instances[A]){this.instances[A]=new Effect.ScopedQueue()}return this.instances[A]}};Effect.Queue=Effect.Queues.get("global");Effect.DefaultOptions={transition:Effect.Transitions.sinoidal,duration:1,fps:25,sync:false,from:0,to:1,delay:0,queue:"parallel"};Effect.Base=function(){};Effect.Base.prototype={position:null,start:function(A){this.options=Object.extend(Object.extend({},Effect.DefaultOptions),A||{});this.currentFrame=0;this.state="idle";this.startOn=this.options.delay*1000;this.finishOn=this.startOn+(this.options.duration*1000);this.event("beforeStart");if(!this.options.sync){Effect.Queues.get(typeof this.options.queue=="string"?"global":this.options.queue.scope).add(this)}},loop:function(A){if(A>=this.startOn){if(A>=this.finishOn){this.render(1);this.cancel();this.event("beforeFinish");if(this.finish){this.finish()}this.event("afterFinish");return }var C=(A-this.startOn)/(this.finishOn-this.startOn);var B=Math.round(C*this.options.fps*this.options.duration);if(B>this.currentFrame){this.render(C);this.currentFrame=B}}},render:function(A){if(this.state=="idle"){this.state="running";this.event("beforeSetup");if(this.setup){this.setup()}this.event("afterSetup")}if(this.state=="running"){if(this.options.transition){A=this.options.transition(A)}A*=(this.options.to-this.options.from);A+=this.options.from;this.position=A;this.event("beforeUpdate");if(this.update){this.update(A)}this.event("afterUpdate")}},cancel:function(){if(!this.options.sync){Effect.Queues.get(typeof this.options.queue=="string"?"global":this.options.queue.scope).remove(this)}this.state="finished"},event:function(A){if(this.options[A+"Internal"]){this.options[A+"Internal"](this)}if(this.options[A]){this.options[A](this)}},inspect:function(){return"#<Effect:"+$H(this).inspect()+",options:"+$H(this.options).inspect()+">"}};Effect.Parallel=Class.create();Object.extend(Object.extend(Effect.Parallel.prototype,Effect.Base.prototype),{initialize:function(A){this.effects=A||[];this.start(arguments[1])},update:function(A){this.effects.invoke("render",A)},finish:function(A){this.effects.each(function(B){B.render(1);B.cancel();B.event("beforeFinish");if(B.finish){B.finish(A)}B.event("afterFinish")})}});Effect.Event=Class.create();Object.extend(Object.extend(Effect.Event.prototype,Effect.Base.prototype),{initialize:function(){var A=Object.extend({duration:0},arguments[0]||{});this.start(A)},update:Prototype.emptyFunction});Effect.Opacity=Class.create();Object.extend(Object.extend(Effect.Opacity.prototype,Effect.Base.prototype),{initialize:function(B){this.element=$(B);if(!this.element){throw (Effect._elementDoesNotExistError)}if(/MSIE/.test(navigator.userAgent)&&!window.opera&&(!this.element.currentStyle.hasLayout)){this.element.setStyle({zoom:1})}var A=Object.extend({from:this.element.getOpacity()||0,to:1},arguments[1]||{});this.start(A)},update:function(A){this.element.setOpacity(A)}});Effect.Move=Class.create();Object.extend(Object.extend(Effect.Move.prototype,Effect.Base.prototype),{initialize:function(B){this.element=$(B);if(!this.element){throw (Effect._elementDoesNotExistError)}var A=Object.extend({x:0,y:0,mode:"relative"},arguments[1]||{});this.start(A)},setup:function(){this.element.makePositioned();this.originalLeft=parseFloat(this.element.getStyle("left")||"0");this.originalTop=parseFloat(this.element.getStyle("top")||"0");if(this.options.mode=="absolute"){this.options.x=this.options.x-this.originalLeft;this.options.y=this.options.y-this.originalTop}},update:function(A){this.element.setStyle({left:Math.round(this.options.x*A+this.originalLeft)+"px",top:Math.round(this.options.y*A+this.originalTop)+"px"})}});Effect.MoveBy=function(C,B,A){return new Effect.Move(C,Object.extend({x:A,y:B},arguments[3]||{}))};Effect.Scale=Class.create();Object.extend(Object.extend(Effect.Scale.prototype,Effect.Base.prototype),{initialize:function(A,C){this.element=$(A);if(!this.element){throw (Effect._elementDoesNotExistError)}var B=Object.extend({scaleX:true,scaleY:true,scaleContent:true,scaleFromCenter:false,scaleMode:"box",scaleFrom:100,scaleTo:C},arguments[2]||{});this.start(B)},setup:function(){this.restoreAfterFinish=this.options.restoreAfterFinish||false;this.elementPositioning=this.element.getStyle("position");this.originalStyle={};["top","left","width","height","fontSize"].each(function(B){this.originalStyle[B]=this.element.style[B]}.bind(this));this.originalTop=this.element.offsetTop;this.originalLeft=this.element.offsetLeft;var A=this.element.getStyle("font-size")||"100%";["em","px","%","pt"].each(function(B){if(A.indexOf(B)>0){this.fontSize=parseFloat(A);this.fontSizeType=B}}.bind(this));this.factor=(this.options.scaleTo-this.options.scaleFrom)/100;this.dims=null;if(this.options.scaleMode=="box"){this.dims=[this.element.offsetHeight,this.element.offsetWidth]}if(/^content/.test(this.options.scaleMode)){this.dims=[this.element.scrollHeight,this.element.scrollWidth]}if(!this.dims){this.dims=[this.options.scaleMode.originalHeight,this.options.scaleMode.originalWidth]}},update:function(B){var A=(this.options.scaleFrom/100)+(this.factor*B);if(this.options.scaleContent&&this.fontSize){this.element.setStyle({fontSize:this.fontSize*A+this.fontSizeType})}this.setDimensions(this.dims[0]*A,this.dims[1]*A)},finish:function(A){if(this.restoreAfterFinish){this.element.setStyle(this.originalStyle)}},setDimensions:function(E,C){var D={};if(this.options.scaleX){D.width=Math.round(C)+"px"}if(this.options.scaleY){D.height=Math.round(E)+"px"}if(this.options.scaleFromCenter){var A=(E-this.dims[0])/2;var B=(C-this.dims[1])/2;if(this.elementPositioning=="absolute"){if(this.options.scaleY){D.top=this.originalTop-A+"px"}if(this.options.scaleX){D.left=this.originalLeft-B+"px"}}else{if(this.options.scaleY){D.top=-A+"px"}if(this.options.scaleX){D.left=-B+"px"}}}this.element.setStyle(D)}});Effect.Highlight=Class.create();Object.extend(Object.extend(Effect.Highlight.prototype,Effect.Base.prototype),{initialize:function(B){this.element=$(B);if(!this.element){throw (Effect._elementDoesNotExistError)}var A=Object.extend({startcolor:"#ffff99"},arguments[1]||{});this.start(A)},setup:function(){if(this.element.getStyle("display")=="none"){this.cancel();return }this.oldStyle={backgroundImage:this.element.getStyle("background-image")};this.element.setStyle({backgroundImage:"none"});if(!this.options.endcolor){this.options.endcolor=this.element.getStyle("background-color").parseColor("#ffffff")}if(!this.options.restorecolor){this.options.restorecolor=this.element.getStyle("background-color")}this._base=$R(0,2).map(function(A){return parseInt(this.options.startcolor.slice(A*2+1,A*2+3),16)}.bind(this));this._delta=$R(0,2).map(function(A){return parseInt(this.options.endcolor.slice(A*2+1,A*2+3),16)-this._base[A]}.bind(this))},update:function(A){this.element.setStyle({backgroundColor:$R(0,2).inject("#",function(B,C,D){return B+(Math.round(this._base[D]+(this._delta[D]*A)).toColorPart())}.bind(this))})},finish:function(){this.element.setStyle(Object.extend(this.oldStyle,{backgroundColor:this.options.restorecolor}))}});Effect.ScrollTo=Class.create();Object.extend(Object.extend(Effect.ScrollTo.prototype,Effect.Base.prototype),{initialize:function(A){this.element=$(A);this.start(arguments[1]||{})},setup:function(){Position.prepare();var B=Position.cumulativeOffset(this.element);if(this.options.offset){B[1]+=this.options.offset}var A=window.innerHeight?window.height-window.innerHeight:document.body.scrollHeight-(document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight);this.scrollStart=Position.deltaY;this.delta=(B[1]>A?A:B[1])-this.scrollStart},update:function(A){Position.prepare();window.scrollTo(Position.deltaX,this.scrollStart+(A*this.delta))}});Effect.Fade=function(C){C=$(C);var B=C.getInlineOpacity();var A=Object.extend({from:C.getOpacity()||1,to:0,afterFinishInternal:function(D){if(D.options.to!=0){return }D.element.hide().setStyle({opacity:B})}},arguments[1]||{});return new Effect.Opacity(C,A)};Effect.Appear=function(B){B=$(B);var A=Object.extend({from:(B.getStyle("display")=="none"?0:B.getOpacity()||0),to:1,afterFinishInternal:function(C){C.element.forceRerendering()},beforeSetup:function(C){C.element.setOpacity(C.options.from).show()}},arguments[1]||{});return new Effect.Opacity(B,A)};Effect.SwitchOff=function(B){B=$(B);var A=B.getInlineOpacity();return new Effect.Appear(B,Object.extend({duration:0.4,from:0,transition:Effect.Transitions.flicker,afterFinishInternal:function(C){new Effect.Scale(C.element,1,{duration:0.3,scaleFromCenter:true,scaleX:false,scaleContent:false,restoreAfterFinish:true,beforeSetup:function(D){D.element.makePositioned().makeClipping()},afterFinishInternal:function(D){D.element.hide().undoClipping().undoPositioned().setStyle({opacity:A})}})}},arguments[1]||{}))};Effect.SlideDown=function(C){C=$(C).cleanWhitespace();var B=C.down().getStyle("bottom");var A=C.getDimensions();return new Effect.Scale(C,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:window.opera?0:1,scaleMode:{originalHeight:A.height,originalWidth:A.width},restoreAfterFinish:true,afterSetup:function(D){D.element.makePositioned();D.element.down().makePositioned();if(window.opera){D.element.setStyle({top:""})}D.element.makeClipping().setStyle({height:"0px"}).show()},afterUpdateInternal:function(D){D.element.down().setStyle({bottom:(D.dims[0]-D.element.clientHeight)+"px"})},afterFinishInternal:function(D){D.element.undoClipping().undoPositioned();D.element.down().undoPositioned().setStyle({bottom:B})}},arguments[1]||{}))};Effect.SlideUp=function(B){B=$(B).cleanWhitespace();var A=B.down().getStyle("bottom");return new Effect.Scale(B,window.opera?0:1,Object.extend({scaleContent:false,scaleX:false,scaleMode:"box",scaleFrom:100,restoreAfterFinish:true,beforeStartInternal:function(C){C.element.makePositioned();C.element.down().makePositioned();if(window.opera){C.element.setStyle({top:""})}C.element.makeClipping().show()},afterUpdateInternal:function(C){C.element.down().setStyle({bottom:(C.dims[0]-C.element.clientHeight)+"px"})},afterFinishInternal:function(C){C.element.hide().undoClipping().undoPositioned().setStyle({bottom:A});C.element.down().undoPositioned()}},arguments[1]||{}))};Effect.Fold=function(B){B=$(B);var A={top:B.style.top,left:B.style.left,width:B.style.width,height:B.style.height};B.makeClipping();return new Effect.Scale(B,5,Object.extend({scaleContent:false,scaleX:false,afterFinishInternal:function(C){new Effect.Scale(B,1,{scaleContent:false,scaleY:false,afterFinishInternal:function(D){D.element.hide().undoClipping().setStyle(A)}})}},arguments[1]||{}))};["setOpacity","getOpacity","getInlineOpacity","forceRerendering","setContentZoom","collectTextNodes","collectTextNodesIgnoreClass"].each(function(A){Element.Methods[A]=Element[A]});Element.Methods.visualEffect=function(C,B,A){s=B.gsub(/_/,"-").camelize();effect_class=s.charAt(0).toUpperCase()+s.substring(1);new Effect[effect_class](C,A);return $(C)};Element.addMethods();var fileLoadingImage="./lightbox/images/loading.gif";var resizeSpeed=8;var borderSize=10;var imageArray=new Array;var iHistoryImageCount=1;var activeImage;if(resizeSpeed>10){resizeSpeed=10}if(resizeSpeed<1){resizeSpeed=1}resizeDuration=(11-resizeSpeed)*0.15;Object.extend(Element,{getWidth:function(A){A=$(A);return A.offsetWidth},setWidth:function(B,A){B=$(B);B.style.width=A+"px"},setHeight:function(B,A){B=$(B);B.style.height=A+"px"},setTop:function(B,A){B=$(B);B.style.top=A+"px"},setLeft:function(B,A){B=$(B);B.style.left=A+"px"},setSrc:function(A,B){A=$(A);A.src=B},setHref:function(B,A){B=$(B);B.href=A},setInnerHTML:function(B,A){B=$(B);B.innerHTML=A}});Array.prototype.removeDuplicates=function(){for(i=1;i<this.length;i++){if(this[i][0]==this[i-1][0]){this.splice(i,1)}}};Array.prototype.empty=function(){for(i=0;i<=this.length;i++){this.shift()}};var Lightbox=Class.create();Lightbox.prototype={bLoading:false,initialize:function(){if(!document.getElementsByTagName){return }var B=document.getElementsByTagName("a");for(var C=0;C<B.length;C++){var A=B[C];var D=String(A.getAttribute("rel"));if(A.getAttribute("href")&&(D.toLowerCase().match("lightbox"))){A.onclick=function(){myLightbox.start(this);return false}}}},browserNavClick:function(A){if(this.bIframeSet){myLightbox.end()}this.bIframeSet=true},build:function(){if(this.bBuild){return true}this.bBuild=true;var C=document.getElementsByTagName("body").item(0);var B=document.createElement("div");B.setAttribute("id","lightbox");B.style.display="none";C.appendChild(B);var A=document.createElement("div");A.setAttribute("id","outerImageContainer");B.appendChild(A);var I=document.createElement("div");I.setAttribute("id","imageContainer");A.appendChild(I);var H=document.createElement("img");H.setAttribute("id","lightboxImage");I.appendChild(H);var G=document.createElement("div");G.setAttribute("id","hoverNav");I.appendChild(G);var F=document.createElement("a");F.setAttribute("id","prevLink");F.setAttribute("href","#");G.appendChild(F);var E=document.createElement("a");E.setAttribute("id","nextLink");E.setAttribute("href","#");G.appendChild(E);var D=document.createElement("div");D.setAttribute("id","loading");I.appendChild(D);var W=document.createElement("a");W.setAttribute("id","loadingLink");W.setAttribute("href","#");W.onclick=function(){myLightbox.end();return false};D.appendChild(W);var V=document.createElement("img");V.setAttribute("src",fileLoadingImage);W.appendChild(V);var U=document.createElement("div");U.setAttribute("id","imageDataContainer");U.className="clearfix";B.appendChild(U);U.onclick=function(X){(X||window.event).cancelBubble=true;return false};var R=document.createElement("div");R.setAttribute("id","imageData");U.appendChild(R);var P=document.createElement("div");P.setAttribute("id","imageDetails");R.appendChild(P);var N=document.createElement("span");N.setAttribute("id","caption");P.appendChild(N);var L=document.createElement("span");L.setAttribute("id","numberDisplay");P.appendChild(L);if(window.bAdmin){var K=document.createElement("a");K.setAttribute("id","editAnchor");K.setAttribute("href","#");Element.addClassName(K,"nav");K.onclick=this.editImage.bind(this);P.appendChild(K);K.appendChild(document.createTextNode("bearbeiten"))}P.appendChild(document.createTextNode(" "));var J=document.createElement("a");J.setAttribute("id","downloadAnchor");J.setAttribute("href","#");Element.addClassName(J,"nav");J.onclick=this.download.bind(this);P.appendChild(J);J.appendChild(document.createTextNode("download"));var T=document.createElement("div");T.setAttribute("id","bottomNav");R.appendChild(T);this.oFrame=document.createElement("iframe");this.oFrame.id="lightboxIframe";this.oFrame.style.display="none";this.oFrame.src=sSystemBaseUrl+"/dummy.php?image=-1";C.appendChild(this.oFrame);this.oNavigation=document.createElement("div");this.oNavigation.setAttribute("id","lightboxNavigation");this.oNavigation.style.display="none";C.appendChild(this.oNavigation);var S=document.createElement("a");S.setAttribute("id","navPrevLink");S.setAttribute("href","#");S.setAttribute("title","vorheriges Bild");this.oNavigation.appendChild(S);var Q=document.createElement("img");Q.src=sSystemBaseUrl+"/graphics/previous.png";S.appendChild(Q);var O=document.createElement("a");O.setAttribute("id","navNextLink");O.setAttribute("href","#");O.setAttribute("title","n\xe4chstes Bild");this.oNavigation.appendChild(O);var M=document.createElement("img");M.src=sSystemBaseUrl+"/graphics/next.png";O.appendChild(M)},editImage:function(){var A=imageArray[activeImage][0];var E=A.split("&");var D=E[0].split("=");var C=D[1];var D=E[1].split("=");var B=D[1];editContent(B,C);return false},download:function(){var A=imageArray[activeImage][0].substr(0,imageArray[activeImage][0].indexOf("&bMax"));location.href=A+"&bDownload=1";return false},start:function(E){hideSelectBoxes();this.build();var C=getPageSize();$("mainMenu").style.visibility="hidden";$("page").style.visibility="hidden";$("foot").style.visibility="hidden";imageArray=[];imageNum=0;if(!document.getElementsByTagName){return }var A=document.getElementsByTagName("a");if((E.getAttribute("rel")=="lightbox")){imageArray.push(new Array(E.getAttribute("href"),E.getAttribute("title")))}else{for(var F=0;F<A.length;F++){var G=A[F];if(G.getAttribute("href")&&(G.getAttribute("rel")==E.getAttribute("rel"))){imageArray.push(new Array(G.getAttribute("href"),G.getAttribute("title")))}}imageArray.removeDuplicates();while(imageArray[imageNum][0]!=E.getAttribute("href")){imageNum++}}var C=getPageSize();var D=getPageScroll();var B=D[1]+(C[3]/10);Element.setTop("lightboxNavigation",D[1]+C[3]-88);Element.setTop("lightbox",B);Element.show("lightbox");this.changeImage(imageNum)},changeImage:function(A){if(!imageArray[A]){if(A<0){this.end()}else{if($("linkNextSite")){location.href=$("linkNextSite").href}else{this.end()}}}this.bLoading=true;activeImage=A;Element.show("loading");Element.hide("lightboxImage");Element.hide("hoverNav");Element.hide("prevLink");Element.hide("nextLink");Element.hide("imageDataContainer");Element.hide("numberDisplay");imgPreloader=new Image();imgPreloader.onload=function(){Element.setSrc("lightboxImage",imageArray[activeImage][0]);myLightbox.resizeImageContainer(imgPreloader.width,imgPreloader.height)};imgPreloader.src=imageArray[activeImage][0]},resizeImageContainer:function(A,B){this.wCur=Element.getWidth("outerImageContainer");this.hCur=Element.getHeight("outerImageContainer");this.xScale=((A+(borderSize*2))/this.wCur)*100;this.yScale=((B+(borderSize*2))/this.hCur)*100;wDiff=(this.wCur-borderSize*2)-A;hDiff=(this.hCur-borderSize*2)-B;if(!(hDiff==0)){new Effect.Scale("outerImageContainer",this.yScale,{scaleX:false,duration:resizeDuration,queue:"front"})}if(!(wDiff==0)){new Effect.Scale("outerImageContainer",this.xScale,{scaleY:false,delay:resizeDuration,duration:resizeDuration})}if((hDiff==0)&&(wDiff==0)){if(navigator.appVersion.indexOf("MSIE")!=-1){pause(250)}else{pause(100)}}Element.setHeight("prevLink",B);Element.setHeight("nextLink",B);Element.setWidth("imageDataContainer",A);this.showImage()},showImage:function(){Element.hide("loading");Element.setOpacity($("imageDataContainer"),0);new Effect.Appear("lightboxImage",{duration:0.4,queue:"end",afterFinish:function(){myLightbox.updateDetails()}});this.preloadNeighborImages();Event.observe(document,"click",bodyClick,false)},updateDetails:function(){Element.show("imageDataContainer");new Effect.Appear("imageDataContainer",{duration:0.2,to:1});Element.show("caption");Element.setInnerHTML("caption",imageArray[activeImage][1]);if(imageArray.length>1){Element.show("numberDisplay");Element.setInnerHTML("numberDisplay","Bild "+eval(activeImage+1)+" von "+imageArray.length)}myLightbox.updateNav();this.bIframeSet=false;window.frames[0].location.href=sSystemBaseUrl+"/dummy.php?image="+activeImage;iHistoryImageCount--;if(imageArray.length>1){new Effect.Appear("lightboxNavigation",{duration:0.4,queue:"end",afterFinish:function(){myLightbox.bLoading=false}})}else{this.bLoading=false}},updateNav:function(){Element.show("hoverNav");if(!this.bPrevInitialized){document.getElementById("prevLink").onclick=function(A){(A||window.event).cancelBubble=true;myLightbox.changeImage(activeImage-1);return false};document.getElementById("navPrevLink").onclick=function(A){(A||window.event).cancelBubble=true;if(myLightbox.bLoading){return false}myLightbox.changeImage(activeImage-1);return false};this.bPrevInitialized=true}if(activeImage!=0){Element.show("prevLink")}if(!this.bNextInitialized){$("nextLink").onclick=function(A){(A||window.event).cancelBubble=true;myLightbox.changeImage(activeImage+1);return false};$("navNextLink").onclick=function(A){(A||window.event).cancelBubble=true;if(myLightbox.bLoading){return false}myLightbox.changeImage(activeImage+1);return false};this.bNextInitialized=true}if(activeImage!=(imageArray.length-1)){Element.show("nextLink")}this.enableKeyboardNav()},enableKeyboardNav:function(){document.onkeydown=this.keyboardAction},disableKeyboardNav:function(){document.onkeydown=""},keyboardAction:function(A){if(A==null){keycode=event.keyCode}else{keycode=A.which}key=String.fromCharCode(keycode).toLowerCase();if((key=="x")||(key=="o")||(key=="c")){myLightbox.end()}else{if(key=="p"){if(activeImage!=0){myLightbox.disableKeyboardNav();myLightbox.changeImage(activeImage-1)}}else{if(key=="n"){if(activeImage!=(imageArray.length-1)){myLightbox.disableKeyboardNav();myLightbox.changeImage(activeImage+1)}}}}},preloadNeighborImages:function(){if((imageArray.length-1)>activeImage){preloadNextImage=new Image();preloadNextImage.src=imageArray[activeImage+1][0]}if(activeImage>0){preloadPrevImage=new Image();preloadPrevImage.src=imageArray[activeImage-1][0]}},end:function(){this.disableKeyboardNav();Element.hide("lightbox");Element.hide("lightboxNavigation");$("mainMenu").style.visibility="visible";$("page").style.visibility="visible";$("foot").style.visibility="visible";showSelectBoxes();Event.stopObserving(document,"click",bodyClick,false);if(iHistoryImageCount<0){window.frames[0].history.go(iHistoryImageCount)}iHistoryImageCount=1}};function getPageScroll(){var A;if(self.pageYOffset){A=self.pageYOffset}else{if(document.documentElement&&document.documentElement.scrollTop){A=document.documentElement.scrollTop}else{if(document.body){A=document.body.scrollTop}}}arrayPageScroll=new Array("",A);return arrayPageScroll}function getPageSize(){var D,C;if(window.innerHeight&&window.scrollMaxY){D=document.body.scrollWidth;C=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){D=document.body.scrollWidth;C=document.body.scrollHeight}else{D=document.body.offsetWidth;C=document.body.offsetHeight}}var B,A;if(self.innerHeight){B=self.innerWidth;A=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){B=document.documentElement.clientWidth;A=document.documentElement.clientHeight}else{if(document.body){B=document.body.clientWidth;A=document.body.clientHeight}}}if(C<A){pageHeight=A}else{pageHeight=C}if(D<B){pageWidth=B}else{pageWidth=D}arrayPageSize=new Array(pageWidth,pageHeight,B,A);return arrayPageSize}function getKey(A){if(A==null){keycode=event.keyCode}else{keycode=A.which}key=String.fromCharCode(keycode).toLowerCase();if(key=="x"){}}function listenKey(){document.onkeypress=getKey}function showSelectBoxes(){selects=document.getElementsByTagName("select");for(i=0;i!=selects.length;i++){selects[i].style.visibility="visible"}}function hideSelectBoxes(){selects=document.getElementsByTagName("select");for(i=0;i!=selects.length;i++){selects[i].style.visibility="hidden"}}function pause(C){var B=new Date();var A=B.getTime()+C;while(true){B=new Date();if(B.getTime()>A){return }}}function bodyClick(A){if(myLightbox&&!myLightbox.bLoading){iHistoryImageCount--;myLightbox.end()}}function ListExpander(C,A){this.bHidden=true;this.oList=$(C);if(!this.oList){return false}this.iMaxLength=A||4;var B=this.oList.nodeName.toLowerCase();if(B!="ul"&&B!="ul"){alert("ul or ol element required");return }if(this.oList.childNodes.length<=A+1){return false}this.bHard=Element.hasClassName(this.oList,"hard");if(this.bHard){Element.removeClassName(this.oList,"hard")}this.oExpand=document.createElement("div");Element.addClassName(this.oExpand,"ExpanderButton");var D=document.createElement("a");D.className="nav";if(this.oList.nextSibling){this.oList.parentNode.insertBefore(this.oExpand,this.oList.nextSibling)}else{this.oList.parentNode.appendChild(this.oExpand)}this.oExpand.appendChild(document.createTextNode(String.fromCharCode(8230)+" "));this.oExpand.appendChild(D);D.appendChild(document.createTextNode("mehr"));D.href="#";D.onclick=this.click.bind(this);this.hide()}ListExpander.prototype.click=function(){if(this.bHard){Element.addClassName(this.oList,"hard")}this.show();this.oExpand.parentNode.removeChild(this.oExpand);if(window.resize){resize()}return false};ListExpander.prototype.hide=function(){for(var B=0;B<this.oList.childNodes.length;B++){var A=this.oList.childNodes[B];if(B<this.iMaxLength){Element.removeClassName(A,"hidden")}else{Element.addClassName(A,"hidden")}}};ListExpander.prototype.show=function(){for(var B=0;B<this.oList.childNodes.length;B++){var A=this.oList.childNodes[B];if(B>=this.iMaxLength){Element.removeClassName(A,"hidden")}}};function TextExpander(C,B){this.oNode=$(C);if(!this.oNode){return false}this.iMaxLength=B?250:130;this.sClassName=B?"previewClipLong":"previewClip";if(this.oNode.offsetHeight>this.iMaxLength){if(this.oNode.offsetHeight-this.iMaxLength<this.iMaxLength*0.4){return }this.bHard=Element.hasClassName(this.oNode,"hard");Element.addClassName(this.oNode,this.sClassName);if(this.bHard){Element.removeClassName(this.oNode,"hard")}this.oExpand=document.createElement("div");Element.addClassName(this.oExpand,"ExpanderButton");var A=document.createElement("a");A.className="nav";if(this.oNode.nextSibling){this.oNode.parentNode.insertBefore(this.oExpand,this.oNode.nextSibling)}else{this.oNode.parentNode.appendChild(this.oExpand)}this.oExpand.appendChild(document.createTextNode(String.fromCharCode(8230)+" "));this.oExpand.appendChild(A);A.appendChild(document.createTextNode("mehr"));A.href="#";A.onclick=this.click.bind(this)}}TextExpander.prototype.click=function(){Element.removeClassName(this.oNode,this.sClassName);Element.addClassName(this.oNode,"hard");this.oExpand.parentNode.removeChild(this.oExpand);if(window.resize){resize()}return false};function TextMarker(A,C,B){this.oNode=A;this._iRestLength;this._sClassName=C||"light";this._iMaxLength=B||100;this.mark()}TextMarker.prototype.mark=function(){this._iRest=this._iMaxLength;this._mark(this.oNode)};TextMarker.prototype.getElementCount=function(B){var A=0;for(var C=0;C<B.childNodes.length;C++){if(B.childNodes[C].nodeType==1){A++}}return A};TextMarker.prototype._mark=function(D){for(var G=0;G<D.childNodes.length;G++){var C=D.childNodes[G];switch(C.nodeType){case 1:if(!valueInArray(C.nodeName.toLowerCase(),Array("blockquote","p","div"))){this._iRest-=(C.nodeName.length*2+5)}if(C.childNodes.length>0){if(this._mark(C)==false){return false}}break;case 3:var B=C.nodeValue;var A=B.length;if(A>this._iRest){var F=document.createElement("span");F.className=this._sClassName;var E=B.indexOf(" ",this._iRest);if(E==-1){E=A}C.nodeValue=B.substr(E);D.insertBefore(F,C);F.appendChild(document.createTextNode(B.substr(0,E)));return false}else{var F=document.createElement("span");F.className=this._sClassName;D.insertBefore(F,C);D.removeChild(C);F.appendChild(document.createTextNode(B));this._iRest-=A}break;default:alert("unknown nodeType");break}}return true};function addExpanders(){var A=document.getElementsByClassName("preview");A.each(function(B){switch(B.nodeName.toLowerCase()){case"ul":case"ol":new ListExpander(B,4);break;default:new TextExpander(B);break}});var A=document.getElementsByClassName("previewLong");A.each(function(B){new TextExpander(B,330)})};