var Prototype={Version:"1.5.1",Browser:{IE:!!(window.attachEvent&&!window.opera),Opera:!!window.opera,WebKit:navigator.userAgent.indexOf("AppleWebKit/")>-1,Gecko:navigator.userAgent.indexOf("Gecko")>-1&&navigator.userAgent.indexOf("KHTML")==-1},BrowserFeatures:{XPath:!!document.evaluate,ElementExtensions:!!window.HTMLElement,SpecificElementExtensions:(document.createElement("div").__proto__!==document.createElement("form").__proto__)},ScriptFragment:"<script[^>]*>([\u0001-\uFFFF]*?)<\/script>",JSONFilter:/^\/\*-secure-\s*(.*)\s*\*\/\s*$/,emptyFunction:function(){},K:function(A){return A}};function $A(D){if(!D){return[]}if(D.toArray){return D.toArray()}else{var B=[];for(var A=0,C=D.length;A<C;A++){B.push(D[A])}return B}}var Class={create:function(){return function(){this.initialize.apply(this,arguments)}}};var Abstract=new Object();Object.extend=function(A,C){for(var B in C){A[B]=C[B]}return A};Object.extend(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}},toJSON:function(A){var C=typeof A;switch(C){case"undefined":case"function":case"unknown":return ;case"boolean":return A.toString()}if(A===null){return"null"}if(A.toJSON){return A.toJSON()}if(A.ownerDocument===document){return }var B=[];for(var E in A){var D=Object.toJSON(A[E]);if(D!==undefined){B.push(E.toJSON()+": "+D)}}return"{"+B.join(", ")+"}"},keys:function(A){var B=[];for(var C in A){B.push(C)}return B},values:function(B){var A=[];for(var C in B){A.push(B[C])}return A},clone:function(A){return Object.extend({},A)}});Function.prototype.bind=function(){var A=this,C=$A(arguments),B=C.shift();return function(){return A.apply(B,C.concat($A(arguments)))}};Function.prototype.bindAsEventListener=function(C){var A=this,B=$A(arguments),C=B.shift();return function(D){return A.apply(C,[D||window.event].concat(B))}};Object.extend(Number.prototype,{toColorPart:function(){return this.toPaddedString(2,16)},succ:function(){return this+1},times:function(A){$R(0,this,true).each(A);return this},toPaddedString:function(C,B){var A=this.toString(B||10);return"0".times(C-A.length)+A},toJSON:function(){return isFinite(this)?this.toString():"null"}});Date.prototype.toJSON=function(){return'"'+this.getFullYear()+"-"+(this.getMonth()+1).toPaddedString(2)+"-"+this.getDate().toPaddedString(2)+"T"+this.getHours().toPaddedString(2)+":"+this.getMinutes().toPaddedString(2)+":"+this.getSeconds().toPaddedString(2)+'"'};var Try={these:function(){var C;for(var B=0,D=arguments.length;B<D;B++){var A=arguments[B];try{C=A();break}catch(E){}}return C}};var PeriodicalExecuter=Class.create();PeriodicalExecuter.prototype={initialize:function(B,A){this.callback=B;this.frequency=A;this.currentlyExecuting=false;this.registerCallback()},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},stop:function(){if(!this.timer){return }clearInterval(this.timer);this.timer=null},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.callback(this)}finally{this.currentlyExecuting=false}}}};Object.extend(String,{interpret:function(A){return A==null?"":String(A)},specialChar:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\\":"\\\\"}});Object.extend(String.prototype,{gsub:function(E,C){var A="",D=this,B;C=arguments.callee.prepareReplacement(C);while(D.length>0){if(B=D.match(E)){A+=D.slice(0,B.index);A+=String.interpret(C(B));D=D.slice(B.index+B[0].length)}else{A+=D,D=""}}return A},sub:function(C,A,B){A=this.gsub.prepareReplacement(A);B=B===undefined?1:B;return this.gsub(C,function(D){if(--B<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(script){return eval(script)})},escapeHTML:function(){var A=arguments.callee;A.text.data=this;return A.div.innerHTML},unescapeHTML:function(){var A=document.createElement("div");A.innerHTML=this.stripTags();return A.childNodes[0]?(A.childNodes.length>1?$A(A.childNodes).inject("",function(B,C){return B+C.nodeValue}):A.childNodes[0].nodeValue):""},toQueryParams:function(B){var A=this.strip().match(/([^?#]*)(#.*)?$/);if(!A){return{}}return A[1].split(B||"&").inject({},function(E,J){if((J=J.split("="))[0]){var C=decodeURIComponent(J.shift());var D=J.length>1?J.join("="):J[0];if(D!=undefined){D=decodeURIComponent(D)}if(C in E){if(E[C].constructor!=Array){E[C]=[E[C]]}E[C].push(D)}else{E[C]=D}}return E})},toArray:function(){return this.split("")},succ:function(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)},times:function(C){var A="";for(var B=0;B<C;B++){A+=this}return A},camelize:function(){var D=this.split("-"),A=D.length;if(A==1){return D[0]}var C=this.charAt(0)=="-"?D[0].charAt(0).toUpperCase()+D[0].substring(1):D[0];for(var B=1;B<A;B++){C+=D[B].charAt(0).toUpperCase()+D[B].substring(1)}return C},capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()},underscore:function(){return this.gsub(/::/,"/").gsub(/([A-Z]+)([A-Z][a-z])/,"#{1}_#{2}").gsub(/([a-z\d])([A-Z])/,"#{1}_#{2}").gsub(/-/,"_").toLowerCase()},dasherize:function(){return this.gsub(/_/,"-")},inspect:function(B){var A=this.gsub(/[\x00-\x1f\\]/,function(C){var D=String.specialChar[C[0]];return D?D:"\\u00"+C[0].charCodeAt().toPaddedString(2,16)});if(B){return'"'+A.replace(/"/g,'\\"')+'"'}return"'"+A.replace(/'/g,"\\'")+"'"},toJSON:function(){return this.inspect(true)},unfilterJSON:function(A){return this.sub(A||Prototype.JSONFilter,"#{1}")},evalJSON:function(sanitize){var json=this.unfilterJSON();try{if(!sanitize||(/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.test(json))){return eval("("+json+")")}}catch(e){}throw new SyntaxError("Badly formed JSON string: "+this.inspect())},include:function(A){return this.indexOf(A)>-1},startsWith:function(A){return this.indexOf(A)===0},endsWith:function(A){var B=this.length-A.length;return B>=0&&this.lastIndexOf(A)===B},empty:function(){return this==""},blank:function(){return/^\s*$/.test(this)}});if(Prototype.Browser.WebKit||Prototype.Browser.IE){Object.extend(String.prototype,{escapeHTML:function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},unescapeHTML:function(){return this.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/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;Object.extend(String.prototype.escapeHTML,{div:document.createElement("div"),text:document.createTextNode("")});with(String.prototype.escapeHTML){div.appendChild(text)}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(B){var C=B[1];if(C=="\\"){return B[2]}return C+String.interpret(A[B[3]])})}};var $break={},$continue=new Error('"throw $continue" is deprecated, use "return" instead');var Enumerable={each:function(B){var A=0;try{this._each(function(D){B(D,A++)})}catch(C){if(C!=$break){throw C}}return this},eachSlice:function(C,B){var A=-C,D=[],E=this.toArray();while((A+=C)<E.length){D.push(E.slice(A,A+C))}return D.map(B)},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(B){var A=false;this.each(function(D,C){if(A=!!(B||Prototype.K)(D,C)){throw $break}});return A},collect:function(B){var A=[];this.each(function(D,C){A.push((B||Prototype.K)(D,C))});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(C,B){var A=[];this.each(function(J,E){var D=J.toString();if(D.match(C)){A.push((B||Prototype.K)(J,E))}});return A},include:function(A){var B=false;this.each(function(C){if(C==A){B=true;throw $break}});return B},inGroupsOf:function(B,A){A=A===undefined?null:A;return this.eachSlice(B,function(C){while(C.length<B){C.push(A)}return C})},inject:function(A,B){this.each(function(D,C){A=B(A,D,C)});return A},invoke:function(B){var A=$A(arguments).slice(1);return this.map(function(C){return C[B].apply(C,A)})},max:function(B){var A;this.each(function(D,C){D=(B||Prototype.K)(D,C);if(A==undefined||D>=A){A=D}});return A},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(D,C){A.push(D[B])});return A},reject:function(B){var A=[];this.each(function(D,C){if(!B(D,C)){A.push(D)}});return A},sortBy:function(A){return this.map(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.map()},zip:function(){var B=Prototype.K,A=$A(arguments);if(typeof A.last()=="function"){B=A.pop()}var C=[this].concat(A).map($A);return this.map(function(E,D){return B(C.pluck(D))})},size:function(){return this.toArray().length},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});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,C=this.length;A<C;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!=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(A){for(var B=0,C=this.length;B<C;B++){if(this[B]==A){return B}}return -1},reverse:function(A){return(A!==false?this:this.toArray())._reverse()},reduce:function(){return this.length>1?this:this[0]},uniq:function(A){return this.inject([],function(D,C,B){if(0==B||(A?D.last()!=C:!D.include(C))){D.push(C)}return D})},clone:function(){return[].concat(this)},size:function(){return this.length},inspect:function(){return"["+this.map(Object.inspect).join(", ")+"]"},toJSON:function(){var A=[];this.each(function(B){var C=Object.toJSON(B);if(C!==undefined){A.push(C)}});return"["+A.join(", ")+"]"}});Array.prototype.toArray=Array.prototype.clone;function $w(A){A=A.strip();return A?A.split(/\s+/):[]}if(Prototype.Browser.Opera){Array.prototype.concat=function(){var E=[];for(var B=0,C=this.length;B<C;B++){E.push(this[B])}for(var B=0,C=arguments.length;B<C;B++){if(arguments[B].constructor==Array){for(var A=0,D=arguments[B].length;A<D;A++){E.push(arguments[B][A])}}else{E.push(arguments[B])}}return E}}var Hash=function(A){if(A instanceof Hash){this.merge(A)}else{Object.extend(this,A||{})}};Object.extend(Hash,{toQueryString:function(B){var A=[];A.add=arguments.callee.addPair;this.prototype._each.call(B,function(D){if(!D.key){return }var C=D.value;if(C&&typeof C=="object"){if(C.constructor==Array){C.each(function(E){A.add(D.key,E)})}return }A.add(D.key,C)});return A.join("&")},toJSON:function(A){var B=[];this.prototype._each.call(A,function(D){var C=Object.toJSON(D.value);if(C!==undefined){B.push(D.key.toJSON()+": "+C)}});return"{"+B.join(", ")+"}"}});Hash.toQueryString.addPair=function(A,C,B){A=encodeURIComponent(A);if(C===undefined){this.push(A)}else{this.push(A+"="+(C==null?"":encodeURIComponent(C)))}};Object.extend(Hash.prototype,Enumerable);Object.extend(Hash.prototype,{_each:function(B){for(var A in this){var C=this[A];if(C&&C==Hash.prototype[A]){continue}var D=[A,C];D.key=A;D.value=C;B(D)}},keys:function(){return this.pluck("key")},values:function(){return this.pluck("value")},merge:function(A){return $H(A).inject(this,function(B,C){B[C.key]=C.value;return B})},remove:function(){var A;for(var B=0,C=arguments.length;B<C;B++){var D=this[arguments[B]];if(D!==undefined){if(A===undefined){A=D}else{if(A.constructor!=Array){A=[A]}A.push(D)}}delete this[arguments[B]]}return A},toQueryString:function(){return Hash.toQueryString(this)},inspect:function(){return"#<Hash:{"+this.map(function(A){return A.map(Object.inspect).join(": ")}).join(", ")+"}>"},toJSON:function(){return Hash.toJSON(this)}});function $H(A){if(A instanceof Hash){return A}return new Hash(A)}if(function(){var A=0,C=function(D){this.key=D};C.prototype.key="foo";for(var B in new C("bar")){A++}return A>1}()){Hash.prototype._each=function(C){var A=[];for(var B in this){var D=this[B];if((D&&D==Hash.prototype[B])||A.include(B)){continue}A.push(B);var E=[B,D];E.key=B;E.value=D;C(E)}}}ObjectRange=Class.create();Object.extend(ObjectRange.prototype,Enumerable);Object.extend(ObjectRange.prototype,{initialize:function(C,A,B){this.start=C;this.end=A;this.exclusive=B},_each:function(A){var B=this.start;while(this.include(B)){A(B);B=B.succ()}},include:function(A){if(A<this.start){return false}if(this.exclusive){return A<this.end}return A<=this.end}});var $R=function(C,A,B){return new ObjectRange(C,A,B)};var Ajax={getTransport:function(){return Try.these(function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")})||false},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(A){this.responders._each(A)},register:function(A){if(!this.include(A)){this.responders.push(A)}},unregister:function(A){this.responders=this.responders.without(A)},dispatch:function(D,B,C,A){this.each(function(E){if(typeof E[D]=="function"){try{E[D].apply(E,[B,C,A])}catch(J){}}})}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=function(){};Ajax.Base.prototype={setOptions:function(A){this.options={method:"post",asynchronous:true,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",parameters:""};Object.extend(this.options,A||{});this.options.method=this.options.method.toLowerCase();if(typeof this.options.parameters=="string"){this.options.parameters=this.options.parameters.toQueryParams()}}};Ajax.Request=Class.create();Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];Ajax.Request.prototype=Object.extend(new Ajax.Base(),{_complete:false,initialize:function(B,A){this.transport=Ajax.getTransport();this.setOptions(A);this.request(B)},request:function(A){this.url=A;this.method=this.options.method;var C=Object.clone(this.options.parameters);if(!["get","post"].include(this.method)){C._method=this.method;this.method="post"}this.parameters=C;if(C=Hash.toQueryString(C)){if(this.method=="get"){this.url+=(this.url.include("?")?"&":"?")+C}else{if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){C+="&_="}}}try{if(this.options.onCreate){this.options.onCreate(this.transport)}Ajax.Responders.dispatch("onCreate",this,this.transport);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);if(this.options.asynchronous){setTimeout(function(){this.respondToReadyState(1)}.bind(this),10)}this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();this.body=this.method=="post"?(this.options.postBody||C):null;this.transport.send(this.body);if(!this.options.asynchronous&&this.transport.overrideMimeType){this.onStateChange()}}catch(B){this.dispatchException(B)}},onStateChange:function(){var A=this.transport.readyState;if(A>1&&!((A==4)&&this._complete)){this.respondToReadyState(this.transport.readyState)}},setRequestHeaders:function(){var E={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,Accept:"text/javascript, text/html, application/xml, text/xml, */*"};if(this.method=="post"){E["Content-type"]=this.options.contentType+(this.options.encoding?"; charset="+this.options.encoding:"");if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005){E.Connection="close"}}if(typeof this.options.requestHeaders=="object"){var C=this.options.requestHeaders;if(typeof C.push=="function"){for(var B=0,D=C.length;B<D;B+=2){E[C[B]]=C[B+1]}}else{$H(C).each(function(J){E[J.key]=J.value})}}for(var A in E){this.transport.setRequestHeader(A,E[A])}},success:function(){return !this.transport.status||(this.transport.status>=200&&this.transport.status<300)},respondToReadyState:function(A){var C=Ajax.Request.Events[A];var J=this.transport,B=this.evalJSON();if(C=="Complete"){try{this._complete=true;(this.options["on"+this.transport.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(J,B)}catch(D){this.dispatchException(D)}var E=this.getHeader("Content-type");if(E&&E.strip().match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i)){this.evalResponse()}}try{(this.options["on"+C]||Prototype.emptyFunction)(J,B);Ajax.Responders.dispatch("on"+C,this,J,B)}catch(D){this.dispatchException(D)}if(C=="Complete"){this.transport.onreadystatechange=Prototype.emptyFunction}},getHeader:function(A){try{return this.transport.getResponseHeader(A)}catch(B){return null}},evalJSON:function(){try{var A=this.getHeader("X-JSON");return A?A.evalJSON():null}catch(B){return null}},evalResponse:function(){try{return eval((this.transport.responseText||"").unfilterJSON())}catch(e){this.dispatchException(e)}},dispatchException:function(A){(this.options.onException||Prototype.emptyFunction)(this,A);Ajax.Responders.dispatch("onException",this,A)}});Ajax.Updater=Class.create();Object.extend(Object.extend(Ajax.Updater.prototype,Ajax.Request.prototype),{initialize:function(A,C,B){this.container={success:(A.success||A),failure:(A.failure||(A.success?null:A))};this.transport=Ajax.getTransport();this.setOptions(B);var D=this.options.onComplete||Prototype.emptyFunction;this.options.onComplete=(function(J,E){this.updateContent();D(J,E)}).bind(this);this.request(C)},updateContent:function(){var B=this.container[this.success()?"success":"failure"];var A=this.transport.responseText;if(!this.options.evalScripts){A=A.stripScripts()}if(B=$(B)){if(this.options.insertion){new this.options.insertion(B,A)}else{B.update(A)}}if(this.success()){if(this.onComplete){setTimeout(this.onComplete.bind(this),10)}}}});Ajax.PeriodicalUpdater=Class.create();Ajax.PeriodicalUpdater.prototype=Object.extend(new Ajax.Base(),{initialize:function(A,C,B){this.setOptions(B);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=A;this.url=C;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.options.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments)},updateComplete:function(A){if(this.options.decay){this.decay=(A.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=A.responseText}this.timer=setTimeout(this.onTimerEvent.bind(this),this.decay*this.frequency*1000)},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options)}});function $(B){if(arguments.length>1){for(var A=0,D=[],C=arguments.length;A<C;A++){D.push($(arguments[A]))}return D}if(typeof B=="string"){B=document.getElementById(B)}return Element.extend(B)}if(Prototype.BrowserFeatures.XPath){document._getElementsByXPath=function(J,A){var C=[];var E=document.evaluate(J,$(A)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var B=0,D=E.snapshotLength;B<D;B++){C.push(E.snapshotItem(B))}return C};document.getElementsByClassName=function(B,A){var C=".//*[contains(concat(' ', @class, ' '), ' "+B+" ')]";return document._getElementsByXPath(C,A)}}else{document.getElementsByClassName=function(D,A){var C=($(A)||document.body).getElementsByTagName("*");var J=[],K;for(var B=0,E=C.length;B<E;B++){K=C[B];if(Element.hasClassName(K,D)){J.push(Element.extend(K))}}return J}}if(!window.Element){var Element={}}Element.extend=function(E){var J=Prototype.BrowserFeatures;if(!E||!E.tagName||E.nodeType==3||E._extended||J.SpecificElementExtensions||E==window){return E}var B={},D=E.tagName,A=Element.extend.cache,C=Element.Methods.ByTag;if(!J.ElementExtensions){Object.extend(B,Element.Methods),Object.extend(B,Element.Methods.Simulated)}if(C[D]){Object.extend(B,C[D])}for(var L in B){var K=B[L];if(typeof K=="function"&&!(L in E)){E[L]=A.findOrStore(K)}}E._extended=Prototype.emptyFunction;return E};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(A){A=$(A);Element[Element.visible(A)?"hide":"show"](A);return A},hide:function(A){$(A).style.display="none";return A},show:function(A){$(A).style.display="";return A},remove:function(A){A=$(A);A.parentNode.removeChild(A);return A},update:function(B,A){A=typeof A=="undefined"?"":A.toString();$(B).innerHTML=A.stripScripts();setTimeout(function(){A.evalScripts()},10);return B},replace:function(C,B){C=$(C);B=typeof B=="undefined"?"":B.toString();if(C.outerHTML){C.outerHTML=B.stripScripts()}else{var A=C.ownerDocument.createRange();A.selectNodeContents(C);C.parentNode.replaceChild(A.createContextualFragment(B.stripScripts()),C)}setTimeout(function(){B.evalScripts()},10);return C},inspect:function(B){B=$(B);var A="<"+B.tagName.toLowerCase();$H({id:"id",className:"class"}).each(function(J){var E=J.first(),C=J.last();var D=(B[E]||"").toString();if(D){A+=" "+C+"="+D.inspect(true)}});return A+">"},recursivelyCollect:function(A,C){A=$(A);var B=[];while(A=A[C]){if(A.nodeType==1){B.push(Element.extend(A))}}return B},ancestors:function(A){return $(A).recursivelyCollect("parentNode")},descendants:function(A){return $A($(A).getElementsByTagName("*")).each(Element.extend)},firstDescendant:function(A){A=$(A).firstChild;while(A&&A.nodeType!=1){A=A.nextSibling}return $(A)},immediateDescendants:function(A){if(!(A=$(A).firstChild)){return[]}while(A&&A.nodeType!=1){A=A.nextSibling}if(A){return[A].concat($(A).nextSiblings())}return[]},previousSiblings:function(A){return $(A).recursivelyCollect("previousSibling")},nextSiblings:function(A){return $(A).recursivelyCollect("nextSibling")},siblings:function(A){A=$(A);return A.previousSiblings().reverse().concat(A.nextSiblings())},match:function(B,A){if(typeof A=="string"){A=new Selector(A)}return A.match($(B))},up:function(B,D,A){B=$(B);if(arguments.length==1){return $(B.parentNode)}var C=B.ancestors();return D?Selector.findElement(C,D,A):C[A||0]},down:function(B,C,A){B=$(B);if(arguments.length==1){return B.firstDescendant()}var D=B.descendants();return C?Selector.findElement(D,C,A):D[A||0]},previous:function(B,D,A){B=$(B);if(arguments.length==1){return $(Selector.handlers.previousElementSibling(B))}var C=B.previousSiblings();return D?Selector.findElement(C,D,A):C[A||0]},next:function(C,D,B){C=$(C);if(arguments.length==1){return $(Selector.handlers.nextElementSibling(C))}var A=C.nextSiblings();return D?Selector.findElement(A,D,B):A[B||0]},getElementsBySelector:function(){var A=$A(arguments),B=$(A.shift());return Selector.findChildElements(B,A)},getElementsByClassName:function(A,B){return document.getElementsByClassName(B,A)},readAttribute:function(C,A){C=$(C);if(Prototype.Browser.IE){if(!C.attributes){return null}var B=Element._attributeTranslations;if(B.values[A]){return B.values[A](C,A)}if(B.names[A]){A=B.names[A]}var D=C.attributes[A];return D?D.nodeValue:null}return C.getAttribute(A)},getHeight:function(A){return $(A).getDimensions().height},getWidth:function(A){return $(A).getDimensions().width},classNames:function(A){return new Element.ClassNames(A)},hasClassName:function(A,B){if(!(A=$(A))){return }var C=A.className;if(C.length==0){return false}if(C==B||C.match(new RegExp("(^|\\s)"+B+"(\\s|$)"))){return true}return false},addClassName:function(A,B){if(!(A=$(A))){return }Element.classNames(A).add(B);return A},removeClassName:function(A,B){if(!(A=$(A))){return }Element.classNames(A).remove(B);return A},toggleClassName:function(A,B){if(!(A=$(A))){return }Element.classNames(A)[A.hasClassName(B)?"remove":"add"](B);return A},observe:function(){Event.observe.apply(Event,arguments);return $A(arguments).first()},stopObserving:function(){Event.stopObserving.apply(Event,arguments);return $A(arguments).first()},cleanWhitespace:function(B){B=$(B);var C=B.firstChild;while(C){var A=C.nextSibling;if(C.nodeType==3&&!/\S/.test(C.nodeValue)){B.removeChild(C)}C=A}return B},empty:function(A){return $(A).innerHTML.blank()},descendantOf:function(B,A){B=$(B),A=$(A);while(B=B.parentNode){if(B==A){return true}}return false},scrollTo:function(A){A=$(A);var B=Position.cumulativeOffset(A);window.scrollTo(B[0],B[1]);return A},getStyle:function(B,C){B=$(B);C=C=="float"?"cssFloat":C.camelize();var D=B.style[C];if(!D){var A=document.defaultView.getComputedStyle(B,null);D=A?A[C]:null}if(C=="opacity"){return D?parseFloat(D):1}return D=="auto"?null:D},getOpacity:function(A){return $(A).getStyle("opacity")},setStyle:function(A,C,B){A=$(A);var E=A.style;for(var D in C){if(D=="opacity"){A.setOpacity(C[D])}else{E[(D=="float"||D=="cssFloat")?(E.styleFloat===undefined?"cssFloat":"styleFloat"):(B?D:D.camelize())]=C[D]}}return A},setOpacity:function(A,B){A=$(A);A.style.opacity=(B==1||B==="")?"":(B<0.00001)?0:B;return A},getDimensions:function(C){C=$(C);var K=$(C).getStyle("display");if(K!="none"&&K!=null){return{width:C.offsetWidth,height:C.offsetHeight}}var B=C.style;var J=B.visibility;var D=B.position;var A=B.display;B.visibility="hidden";B.position="absolute";B.display="block";var L=C.clientWidth;var E=C.clientHeight;B.display=A;B.position=D;B.visibility=J;return{width:L,height:E}},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}}return A},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=""}return A},makeClipping:function(A){A=$(A);if(A._overflow){return A}A._overflow=A.style.overflow||"auto";if((Element.getStyle(A,"overflow")||"visible")!="hidden"){A.style.overflow="hidden"}return A},undoClipping:function(A){A=$(A);if(!A._overflow){return A}A.style.overflow=A._overflow=="auto"?"":A._overflow;A._overflow=null;return A}};Object.extend(Element.Methods,{childOf:Element.Methods.descendantOf,childElements:Element.Methods.immediateDescendants});if(Prototype.Browser.Opera){Element.Methods._getStyle=Element.Methods.getStyle;Element.Methods.getStyle=function(A,B){switch(B){case"left":case"top":case"right":case"bottom":if(Element._getStyle(A,"position")=="static"){return null}default:return Element._getStyle(A,B)}}}else{if(Prototype.Browser.IE){Element.Methods.getStyle=function(A,B){A=$(A);B=(B=="float"||B=="cssFloat")?"styleFloat":B.camelize();var C=A.style[B];if(!C&&A.currentStyle){C=A.currentStyle[B]}if(B=="opacity"){if(C=(A.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){if(C[1]){return parseFloat(C[1])/100}}return 1}if(C=="auto"){if((B=="width"||B=="height")&&(A.getStyle("display")!="none")){return A["offset"+B.capitalize()]+"px"}return null}return C};Element.Methods.setOpacity=function(A,D){A=$(A);var C=A.getStyle("filter"),B=A.style;if(D==1||D===""){B.filter=C.replace(/alpha\([^\)]*\)/gi,"");return A}else{if(D<0.00001){D=0}}B.filter=C.replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+(D*100)+")";return A};Element.Methods.update=function(C,B){C=$(C);B=typeof B=="undefined"?"":B.toString();var A=C.tagName.toUpperCase();if(["THEAD","TBODY","TR","TD"].include(A)){var D=document.createElement("div");switch(A){case"THEAD":case"TBODY":D.innerHTML="<table><tbody>"+B.stripScripts()+"</tbody></table>";depth=2;break;case"TR":D.innerHTML="<table><tbody><tr>"+B.stripScripts()+"</tr></tbody></table>";depth=3;break;case"TD":D.innerHTML="<table><tbody><tr><td>"+B.stripScripts()+"</td></tr></tbody></table>";depth=4}$A(C.childNodes).each(function(E){C.removeChild(E)});depth.times(function(){D=D.firstChild});$A(D.childNodes).each(function(E){C.appendChild(E)})}else{C.innerHTML=B.stripScripts()}setTimeout(function(){B.evalScripts()},10);return C}}else{if(Prototype.Browser.Gecko){Element.Methods.setOpacity=function(A,B){A=$(A);A.style.opacity=(B==1)?0.999999:(B==="")?"":(B<0.00001)?0:B;return A}}}}Element._attributeTranslations={names:{colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",datetime:"dateTime",accesskey:"accessKey",tabindex:"tabIndex",enctype:"encType",maxlength:"maxLength",readonly:"readOnly",longdesc:"longDesc"},values:{_getAttr:function(A,B){return A.getAttribute(B,2)},_flag:function(A,B){return $(A).hasAttribute(B)?B:null},style:function(A){return A.style.cssText.toLowerCase()},title:function(A){var B=A.getAttributeNode("title");return B.specified?B.nodeValue:null}}};(function(){Object.extend(this,{href:this._getAttr,src:this._getAttr,type:this._getAttr,disabled:this._flag,checked:this._flag,readonly:this._flag,multiple:this._flag})}).call(Element._attributeTranslations.values);Element.Methods.Simulated={hasAttribute:function(B,D){var A=Element._attributeTranslations,C;D=A.names[D]||D;C=$(B).getAttributeNode(D);return C&&C.specified}};Element.Methods.ByTag={};Object.extend(Element,Element.Methods);if(!Prototype.BrowserFeatures.ElementExtensions&&document.createElement("div").__proto__){window.HTMLElement={};window.HTMLElement.prototype=document.createElement("div").__proto__;Prototype.BrowserFeatures.ElementExtensions=true}Element.hasAttribute=function(A,B){if(A.hasAttribute){return A.hasAttribute(B)}return Element.Methods.Simulated.hasAttribute(A,B)};Element.addMethods=function(C){var L=Prototype.BrowserFeatures,D=Element.Methods.ByTag;if(!C){Object.extend(Form,Form.Methods);Object.extend(Form.Element,Form.Element.Methods);Object.extend(Element.Methods.ByTag,{FORM:Object.clone(Form.Methods),INPUT:Object.clone(Form.Element.Methods),SELECT:Object.clone(Form.Element.Methods),TEXTAREA:Object.clone(Form.Element.Methods)})}if(arguments.length==2){var B=C;C=arguments[1]}if(!B){Object.extend(Element.Methods,C||{})}else{if(B.constructor==Array){B.each(K)}else{K(B)}}function K(N){N=N.toUpperCase();if(!Element.Methods.ByTag[N]){Element.Methods.ByTag[N]={}}Object.extend(Element.Methods.ByTag[N],C)}function A(Q,O,N){N=N||false;var P=Element.extend.cache;for(var S in Q){var R=Q[S];if(!N||!(S in O)){O[S]=P.findOrStore(R)}}}function E(P){var N;var O={OPTGROUP:"OptGroup",TEXTAREA:"TextArea",P:"Paragraph",FIELDSET:"FieldSet",UL:"UList",OL:"OList",DL:"DList",DIR:"Directory",H1:"Heading",H2:"Heading",H3:"Heading",H4:"Heading",H5:"Heading",H6:"Heading",Q:"Quote",INS:"Mod",DEL:"Mod",A:"Anchor",IMG:"Image",CAPTION:"TableCaption",COL:"TableCol",COLGROUP:"TableCol",THEAD:"TableSection",TFOOT:"TableSection",TBODY:"TableSection",TR:"TableRow",TH:"TableCell",TD:"TableCell",FRAMESET:"FrameSet",IFRAME:"IFrame"};if(O[P]){N="HTML"+O[P]+"Element"}if(window[N]){return window[N]}N="HTML"+P+"Element";if(window[N]){return window[N]}N="HTML"+P.capitalize()+"Element";if(window[N]){return window[N]}window[N]={};window[N].prototype=document.createElement(P).__proto__;return window[N]}if(L.ElementExtensions){A(Element.Methods,HTMLElement.prototype);A(Element.Methods.Simulated,HTMLElement.prototype,true)}if(L.SpecificElementExtensions){for(var M in Element.Methods.ByTag){var J=E(M);if(typeof J=="undefined"){continue}A(D[M],J.prototype)}}Object.extend(Element,Element.Methods);delete Element.ByTag};var Toggle={display:Element.toggle};Abstract.Insertion=function(A){this.adjacency=A};Abstract.Insertion.prototype={initialize:function(B,C){this.element=$(B);this.content=C.stripScripts();if(this.adjacency&&this.element.insertAdjacentHTML){try{this.element.insertAdjacentHTML(this.adjacency,this.content)}catch(D){var A=this.element.tagName.toUpperCase();if(["TBODY","TR"].include(A)){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(){C.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($A(this).concat(A).join(" "))},remove:function(A){if(!this.include(A)){return }this.set($A(this).without(A).join(" "))},toString:function(){return $A(this).join(" ")}};Object.extend(Element.ClassNames.prototype,Enumerable);var Selector=Class.create();Selector.prototype={initialize:function(A){this.expression=A.strip();this.compileMatcher()},compileMatcher:function(){if(Prototype.BrowserFeatures.XPath&&!(/\[[\w-]*?:/).test(this.expression)){return this.compileXPathMatcher()}var e=this.expression,ps=Selector.patterns,h=Selector.handlers,c=Selector.criteria,le,p,m;if(Selector._cache[e]){this.matcher=Selector._cache[e];return }this.matcher=["this.matcher = function(root) {","var r = root, h = Selector.handlers, c = false, n;"];while(e&&le!=e&&(/\S/).test(e)){le=e;for(var i in ps){p=ps[i];if(m=e.match(p)){this.matcher.push(typeof c[i]=="function"?c[i](m):new Template(c[i]).evaluate(m));e=e.replace(m[0],"");break}}}this.matcher.push("return h.unique(n);\n}");eval(this.matcher.join("\n"));Selector._cache[this.expression]=this.matcher},compileXPathMatcher:function(){var E=this.expression,J=Selector.patterns,B=Selector.xpath,D,A;if(Selector._cache[E]){this.xpath=Selector._cache[E];return }this.matcher=[".//*"];while(E&&D!=E&&(/\S/).test(E)){D=E;for(var C in J){if(A=E.match(J[C])){this.matcher.push(typeof B[C]=="function"?B[C](A):new Template(B[C]).evaluate(A));E=E.replace(A[0],"");break}}}this.xpath=this.matcher.join("");Selector._cache[this.expression]=this.xpath},findElements:function(A){A=A||document;if(this.xpath){return document._getElementsByXPath(this.xpath,A)}return this.matcher(A)},match:function(A){return this.findElements(document).include(A)},toString:function(){return this.expression},inspect:function(){return"#<Selector:"+this.expression.inspect()+">"}};Object.extend(Selector,{_cache:{},xpath:{descendant:"//*",child:"/*",adjacent:"/following-sibling::*[1]",laterSibling:"/following-sibling::*",tagName:function(A){if(A[1]=="*"){return""}return"[local-name()='"+A[1].toLowerCase()+"' or local-name()='"+A[1].toUpperCase()+"']"},className:"[contains(concat(' ', @class, ' '), ' #{1} ')]",id:"[@id='#{1}']",attrPresence:"[@#{1}]",attr:function(A){A[3]=A[5]||A[6];return new Template(Selector.xpath.operators[A[2]]).evaluate(A)},pseudo:function(A){var B=Selector.xpath.pseudos[A[1]];if(!B){return""}if(typeof B==="function"){return B(A)}return new Template(Selector.xpath.pseudos[A[1]]).evaluate(A)},operators:{"=":"[@#{1}='#{3}']","!=":"[@#{1}!='#{3}']","^=":"[starts-with(@#{1}, '#{3}')]","$=":"[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']","*=":"[contains(@#{1}, '#{3}')]","~=":"[contains(concat(' ', @#{1}, ' '), ' #{3} ')]","|=":"[contains(concat('-', @#{1}, '-'), '-#{3}-')]"},pseudos:{"first-child":"[not(preceding-sibling::*)]","last-child":"[not(following-sibling::*)]","only-child":"[not(preceding-sibling::* or following-sibling::*)]",empty:"[count(*) = 0 and (count(text()) = 0 or translate(text(), ' \t\r\n', '') = '')]",checked:"[@checked]",disabled:"[@disabled]",enabled:"[not(@disabled)]",not:function(B){var L=B[6],K=Selector.patterns,A=Selector.xpath,E,B,C;var J=[];while(L&&E!=L&&(/\S/).test(L)){E=L;for(var D in K){if(B=L.match(K[D])){C=typeof A[D]=="function"?A[D](B):new Template(A[D]).evaluate(B);J.push("("+C.substring(1,C.length-1)+")");L=L.replace(B[0],"");break}}}return"[not("+J.join(" and ")+")]"},"nth-child":function(A){return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ",A)},"nth-last-child":function(A){return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ",A)},"nth-of-type":function(A){return Selector.xpath.pseudos.nth("position() ",A)},"nth-last-of-type":function(A){return Selector.xpath.pseudos.nth("(last() + 1 - position()) ",A)},"first-of-type":function(A){A[6]="1";return Selector.xpath.pseudos["nth-of-type"](A)},"last-of-type":function(A){A[6]="1";return Selector.xpath.pseudos["nth-last-of-type"](A)},"only-of-type":function(A){var B=Selector.xpath.pseudos;return B["first-of-type"](A)+B["last-of-type"](A)},nth:function(E,C){var J,K=C[6],B;if(K=="even"){K="2n+0"}if(K=="odd"){K="2n+1"}if(J=K.match(/^(\d+)$/)){return"["+E+"= "+J[1]+"]"}if(J=K.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(J[1]=="-"){J[1]=-1}var D=J[1]?Number(J[1]):1;var A=J[2]?Number(J[2]):0;B="[((#{fragment} - #{b}) mod #{a} = 0) and ((#{fragment} - #{b}) div #{a} >= 0)]";return new Template(B).evaluate({fragment:E,a:D,b:A})}}}},criteria:{tagName:'n = h.tagName(n, r, "#{1}", c);   c = false;',className:'n = h.className(n, r, "#{1}", c); c = false;',id:'n = h.id(n, r, "#{1}", c);        c = false;',attrPresence:'n = h.attrPresence(n, r, "#{1}"); c = false;',attr:function(A){A[3]=(A[5]||A[6]);return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}"); c = false;').evaluate(A)},pseudo:function(A){if(A[6]){A[6]=A[6].replace(/"/g,'\\"')}return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(A)},descendant:'c = "descendant";',child:'c = "child";',adjacent:'c = "adjacent";',laterSibling:'c = "laterSibling";'},patterns:{laterSibling:/^\s*~\s*/,child:/^\s*>\s*/,adjacent:/^\s*\+\s*/,descendant:/^\s/,tagName:/^\s*(\*|[\w\-]+)(\b|$)?/,id:/^#([\w\-\*]+)(\b|$)/,className:/^\.([\w\-\*]+)(\b|$)/,pseudo:/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|\s|(?=:))/,attrPresence:/^\[([\w]+)\]/,attr:/\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\]]*?)\4|([^'"][^\]]*?)))?\]/},handlers:{concat:function(B,A){for(var C=0,D;D=A[C];C++){B.push(D)}return B},mark:function(A){for(var B=0,C;C=A[B];B++){C._counted=true}return A},unmark:function(A){for(var B=0,C;C=A[B];B++){C._counted=undefined}return A},index:function(A,D,J){A._counted=true;if(D){for(var B=A.childNodes,E=B.length-1,C=1;E>=0;E--){node=B[E];if(node.nodeType==1&&(!J||node._counted)){node.nodeIndex=C++}}}else{for(var E=0,C=1,B=A.childNodes;node=B[E];E++){if(node.nodeType==1&&(!J||node._counted)){node.nodeIndex=C++}}}},unique:function(B){if(B.length==0){return B}var D=[],E;for(var C=0,A=B.length;C<A;C++){if(!(E=B[C])._counted){E._counted=true;D.push(Element.extend(E))}}return Selector.handlers.unmark(D)},descendant:function(A){var D=Selector.handlers;for(var C=0,B=[],E;E=A[C];C++){D.concat(B,E.getElementsByTagName("*"))}return B},child:function(A){var J=Selector.handlers;for(var E=0,D=[],K;K=A[E];E++){for(var B=0,C=[],L;L=K.childNodes[B];B++){if(L.nodeType==1&&L.tagName!="!"){D.push(L)}}}return D},adjacent:function(A){for(var C=0,B=[],E;E=A[C];C++){var D=this.nextElementSibling(E);if(D){B.push(D)}}return B},laterSibling:function(A){var D=Selector.handlers;for(var C=0,B=[],E;E=A[C];C++){D.concat(B,Element.nextSiblings(E))}return B},nextElementSibling:function(A){while(A=A.nextSibling){if(A.nodeType==1){return A}}return null},previousElementSibling:function(A){while(A=A.previousSibling){if(A.nodeType==1){return A}}return null},tagName:function(B,A,E,L){E=E.toUpperCase();var D=[],J=Selector.handlers;if(B){if(L){if(L=="descendant"){for(var C=0,K;K=B[C];C++){J.concat(D,K.getElementsByTagName(E))}return D}else{B=this[L](B)}if(E=="*"){return B}}for(var C=0,K;K=B[C];C++){if(K.tagName.toUpperCase()==E){D.push(K)}}return D}else{return A.getElementsByTagName(E)}},id:function(B,A,L,J){var K=$(L),D=Selector.handlers;if(!B&&A==document){return K?[K]:[]}if(B){if(J){if(J=="child"){for(var C=0,E;E=B[C];C++){if(K.parentNode==E){return[K]}}}else{if(J=="descendant"){for(var C=0,E;E=B[C];C++){if(Element.descendantOf(K,E)){return[K]}}}else{if(J=="adjacent"){for(var C=0,E;E=B[C];C++){if(Selector.handlers.previousElementSibling(K)==E){return[K]}}}else{B=D[J](B)}}}}for(var C=0,E;E=B[C];C++){if(E==K){return[K]}}return[]}return(K&&Element.descendantOf(K,A))?[K]:[]},className:function(B,A,C,D){if(B&&D){B=this[D](B)}return Selector.handlers.byClassName(B,A,C)},byClassName:function(C,B,J){if(!C){C=Selector.handlers.descendant([B])}var L=" "+J+" ";for(var E=0,D=[],K,A;K=C[E];E++){A=K.className;if(A.length==0){continue}if(A==J||(" "+A+" ").include(L)){D.push(K)}}return D},attrPresence:function(C,B,A){var E=[];for(var D=0,J;J=C[D];D++){if(Element.hasAttribute(J,A)){E.push(J)}}return E},attr:function(A,L,K,M,B){if(!A){A=L.getElementsByTagName("*")}var N=Selector.operators[B],D=[];for(var E=0,C;C=A[E];E++){var J=Element.readAttribute(C,K);if(J===null){continue}if(N(J,M)){D.push(C)}}return D},pseudo:function(B,C,E,A,D){if(B&&D){B=this[D](B)}if(!B){B=A.getElementsByTagName("*")}return Selector.pseudos[C](B,E,A)}},pseudos:{"first-child":function(B,J,A){for(var D=0,C=[],E;E=B[D];D++){if(Selector.handlers.previousElementSibling(E)){continue}C.push(E)}return C},"last-child":function(B,J,A){for(var D=0,C=[],E;E=B[D];D++){if(Selector.handlers.nextElementSibling(E)){continue}C.push(E)}return C},"only-child":function(B,K,A){var E=Selector.handlers;for(var D=0,C=[],J;J=B[D];D++){if(!E.previousElementSibling(J)&&!E.nextElementSibling(J)){C.push(J)}}return C},"nth-child":function(B,C,A){return Selector.pseudos.nth(B,C,A)},"nth-last-child":function(B,C,A){return Selector.pseudos.nth(B,C,A,true)},"nth-of-type":function(B,C,A){return Selector.pseudos.nth(B,C,A,false,true)},"nth-last-of-type":function(B,C,A){return Selector.pseudos.nth(B,C,A,true,true)},"first-of-type":function(B,C,A){return Selector.pseudos.nth(B,"1",A,false,true)},"last-of-type":function(B,C,A){return Selector.pseudos.nth(B,"1",A,true,true)},"only-of-type":function(B,D,A){var C=Selector.pseudos;return C["last-of-type"](C["first-of-type"](B,D,A),D,A)},getIndices:function(B,A,C){if(B==0){return A>0?[A]:[]}return $R(1,C).inject([],function(D,E){if(0==(E-A)%B&&(E-A)/B>=0){D.push(E)}return D})},nth:function(A,P,R,O,C){if(A.length==0){return[]}if(P=="even"){P="2n+0"}if(P=="odd"){P="2n+1"}var N=Selector.handlers,M=[],B=[],E;N.mark(A);for(var L=0,D;D=A[L];L++){if(!D.parentNode._counted){N.index(D.parentNode,O,C);B.push(D.parentNode)}}if(P.match(/^\d+$/)){P=Number(P);for(var L=0,D;D=A[L];L++){if(D.nodeIndex==P){M.push(D)}}}else{if(E=P.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(E[1]=="-"){E[1]=-1}var S=E[1]?Number(E[1]):1;var Q=E[2]?Number(E[2]):0;var T=Selector.pseudos.getIndices(S,Q,A.length);for(var L=0,D,J=T.length;D=A[L];L++){for(var K=0;K<J;K++){if(D.nodeIndex==T[K]){M.push(D)}}}}}N.unmark(A);N.unmark(B);return M},empty:function(B,J,A){for(var D=0,C=[],E;E=B[D];D++){if(E.tagName=="!"||(E.firstChild&&!E.innerHTML.match(/^\s*$/))){continue}C.push(E)}return C},not:function(A,D,M){var K=Selector.handlers,N,C;var L=new Selector(D).findElements(M);K.mark(L);for(var J=0,E=[],B;B=A[J];J++){if(!B._counted){E.push(B)}}K.unmark(L);return E},enabled:function(B,J,A){for(var D=0,C=[],E;E=B[D];D++){if(!E.disabled){C.push(E)}}return C},disabled:function(B,J,A){for(var D=0,C=[],E;E=B[D];D++){if(E.disabled){C.push(E)}}return C},checked:function(B,J,A){for(var D=0,C=[],E;E=B[D];D++){if(E.checked){C.push(E)}}return C}},operators:{"=":function(B,A){return B==A},"!=":function(B,A){return B!=A},"^=":function(B,A){return B.startsWith(A)},"$=":function(B,A){return B.endsWith(A)},"*=":function(B,A){return B.include(A)},"~=":function(B,A){return(" "+B+" ").include(" "+A+" ")},"|=":function(B,A){return("-"+B.toUpperCase()+"-").include("-"+A.toUpperCase()+"-")}},matchElements:function(J,K){var E=new Selector(K).findElements(),D=Selector.handlers;D.mark(E);for(var C=0,B=[],A;A=J[C];C++){if(A._counted){B.push(A)}}D.unmark(E);return B},findElement:function(B,C,A){if(typeof C=="number"){A=C;C=false}return Selector.matchElements(B,C||"*")[A||0]},findChildElements:function(E,K){var L=K.join(","),K=[];L.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/,function(M){K.push(M[1].strip())});var D=[],J=Selector.handlers;for(var C=0,B=K.length,A;C<B;C++){A=new Selector(K[C].strip());J.concat(D,A.findElements(E))}return(B>1)?J.unique(D):D}});function $$(){return Selector.findChildElements(document,$A(arguments))}var Form={reset:function(A){$(A).reset();return A},serializeElements:function(C,A){var B=C.inject({},function(D,J){if(!J.disabled&&J.name){var E=J.name,K=$(J).getValue();if(K!=null){if(E in D){if(D[E].constructor!=Array){D[E]=[D[E]]}D[E].push(K)}else{D[E]=K}}}return D});return A?B:Hash.toQueryString(B)}};Form.Methods={serialize:function(B,A){return Form.serializeElements(Form.getElements(B),A)},getElements:function(A){return $A($(A).getElementsByTagName("*")).inject([],function(B,C){if(Form.Element.Serializers[C.tagName.toLowerCase()]){B.push(Element.extend(C))}return B})},getInputs:function(K,C,D){K=$(K);var A=K.getElementsByTagName("input");if(!C&&!D){return $A(A).map(Element.extend)}for(var E=0,L=[],J=A.length;E<J;E++){var B=A[E];if((C&&B.type!=C)||(D&&B.name!=D)){continue}L.push(Element.extend(B))}return L},disable:function(A){A=$(A);Form.getElements(A).invoke("disable");return A},enable:function(A){A=$(A);Form.getElements(A).invoke("enable");return A},findFirstElement:function(A){return $(A).getElements().find(function(B){return B.type!="hidden"&&!B.disabled&&["input","select","textarea"].include(B.tagName.toLowerCase())})},focusFirstElement:function(A){A=$(A);A.findFirstElement().activate();return A},request:function(B,A){B=$(B),A=Object.clone(A||{});var C=A.parameters;A.parameters=B.serialize(true);if(C){if(typeof C=="string"){C=C.toQueryParams()}Object.extend(A.parameters,C)}if(B.hasAttribute("method")&&!A.method){A.method=B.method}return new Ajax.Request(B.readAttribute("action"),A)}};Form.Element={focus:function(A){$(A).focus();return A},select:function(A){$(A).select();return A}};Form.Element.Methods={serialize:function(A){A=$(A);if(!A.disabled&&A.name){var B=A.getValue();if(B!=undefined){var C={};C[A.name]=B;return Hash.toQueryString(C)}}return""},getValue:function(A){A=$(A);var B=A.tagName.toLowerCase();return Form.Element.Serializers[B](A)},clear:function(A){$(A).value="";return A},present:function(A){return $(A).value!=""},activate:function(A){A=$(A);try{A.focus();if(A.select&&(A.tagName.toLowerCase()!="input"||!["button","reset","submit"].include(A.type))){A.select()}}catch(B){}return A},disable:function(A){A=$(A);A.blur();A.disabled=true;return A},enable:function(A){A=$(A);A.disabled=false;return A}};var Field=Form.Element;var $F=Form.Element.Methods.getValue;Form.Element.Serializers={input:function(A){switch(A.type.toLowerCase()){case"checkbox":case"radio":return Form.Element.Serializers.inputSelector(A);default:return Form.Element.Serializers.textarea(A)}},inputSelector:function(A){return A.checked?A.value:null},textarea:function(A){return A.value},select:function(A){return this[A.type=="select-one"?"selectOne":"selectMany"](A)},selectOne:function(B){var A=B.selectedIndex;return A>=0?this.optionValue(B.options[A]):null},selectMany:function(D){var A,E=D.length;if(!E){return null}for(var C=0,A=[];C<E;C++){var B=D.options[C];if(B.selected){A.push(this.optionValue(B))}}return A},optionValue:function(A){return Element.extend(A).hasAttribute("value")?A.value:A.text}};Abstract.TimedObserver=function(){};Abstract.TimedObserver.prototype={initialize:function(A,B,C){this.frequency=B;this.element=$(A);this.callback=C;this.lastValue=this.getValue();this.registerCallback()},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},onTimerEvent:function(){var A=this.getValue();var B=("string"==typeof this.lastValue&&"string"==typeof A?this.lastValue!=A:String(this.lastValue)!=String(A));if(B){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(A,B){this.element=$(A);this.callback=B;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(){Form.getElements(this.element).each(this.registerCallback.bind(this))},registerCallback:function(A){if(A.type){switch(A.type.toLowerCase()){case"checkbox":case"radio":Event.observe(A,"click",this.onElementEvent.bind(this));break;default: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,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,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(D,C,B,A){if(!this.observers){this.observers=[]}if(D.addEventListener){this.observers.push([D,C,B,A]);D.addEventListener(C,B,A)}else{if(D.attachEvent){this.observers.push([D,C,B,A]);D.attachEvent("on"+C,B)}}},unloadCache:function(){if(!Event.observers){return }for(var A=0,B=Event.observers.length;A<B;A++){Event.stopObserving.apply(this,Event.observers[A]);Event.observers[A][0]=null}Event.observers=false},observe:function(D,C,B,A){D=$(D);A=A||false;if(C=="keypress"&&(Prototype.Browser.WebKit||D.attachEvent)){C="keydown"}Event._observeAndCache(D,C,B,A)},stopObserving:function(D,C,B,A){D=$(D);A=A||false;if(C=="keypress"&&(Prototype.Browser.WebKit||D.attachEvent)){C="keydown"}if(D.removeEventListener){D.removeEventListener(C,B,A)}else{if(D.detachEvent){try{D.detachEvent("on"+C,B)}catch(E){}}}}});if(Prototype.Browser.IE){Event.observe(window,"unload",Event.unloadCache,false)}var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},realOffset:function(B){var A=0,C=0;do{A+=B.scrollTop||0;C+=B.scrollLeft||0;B=B.parentNode}while(B);return[C,A]},cumulativeOffset:function(B){var A=0,C=0;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;B=B.offsetParent}while(B);return[C,A]},positionedOffset:function(B){var A=0,D=0;do{A+=B.offsetTop||0;D+=B.offsetLeft||0;B=B.offsetParent;if(B){if(B.tagName=="BODY"){break}var C=Element.getStyle(B,"position");if(C=="relative"||C=="absolute"){break}}}while(B);return[D,A]},offsetParent:function(A){if(A.offsetParent){return A.offsetParent}if(A==document.body){return A}while((A=A.parentNode)&&A!=document.body){if(Element.getStyle(A,"position")!="static"){return A}}return document.body},within:function(B,A,C){if(this.includeScrollOffsets){return this.withinIncludingScrolloffsets(B,A,C)}this.xcomp=A;this.ycomp=C;this.offset=this.cumulativeOffset(B);return(C>=this.offset[1]&&C<this.offset[1]+B.offsetHeight&&A>=this.offset[0]&&A<this.offset[0]+B.offsetWidth)},withinIncludingScrolloffsets:function(B,A,D){var C=this.realOffset(B);this.xcomp=A+C[0]-this.deltaX;this.ycomp=D+C[1]-this.deltaY;this.offset=this.cumulativeOffset(B);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+B.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+B.offsetWidth)},overlap:function(B,A){if(!B){return 0}if(B=="vertical"){return((this.offset[1]+A.offsetHeight)-this.ycomp)/A.offsetHeight}if(B=="horizontal"){return((this.offset[0]+A.offsetWidth)-this.xcomp)/A.offsetWidth}},page:function(D){var A=0,C=0;var B=D;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;if(B.offsetParent==document.body){if(Element.getStyle(B,"position")=="absolute"){break}}}while(B=B.offsetParent);B=D;do{if(!window.opera||B.tagName=="BODY"){A-=B.scrollTop||0;C-=B.scrollLeft||0}}while(B=B.parentNode);return[C,A]},clone:function(C,E){var A=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});C=$(C);var D=Position.page(C);E=$(E);var J=[0,0];var B=null;if(Element.getStyle(E,"position")=="absolute"){B=Position.offsetParent(E);J=Position.page(B)}if(B==document.body){J[0]-=document.body.offsetLeft;J[1]-=document.body.offsetTop}if(A.setLeft){E.style.left=(D[0]-J[0]+A.offsetLeft)+"px"}if(A.setTop){E.style.top=(D[1]-J[1]+A.offsetTop)+"px"}if(A.setWidth){E.style.width=C.offsetWidth+"px"}if(A.setHeight){E.style.height=C.offsetHeight+"px"}},absolutize:function(B){B=$(B);if(B.style.position=="absolute"){return }Position.prepare();var D=Position.positionedOffset(B);var J=D[1];var E=D[0];var C=B.clientWidth;var A=B.clientHeight;B._originalLeft=E-parseFloat(B.style.left||0);B._originalTop=J-parseFloat(B.style.top||0);B._originalWidth=B.style.width;B._originalHeight=B.style.height;B.style.position="absolute";B.style.top=J+"px";B.style.left=E+"px";B.style.width=C+"px";B.style.height=A+"px"},relativize:function(A){A=$(A);if(A.style.position=="relative"){return }Position.prepare();A.style.position="relative";var C=parseFloat(A.style.top||0)-(A._originalTop||0);var B=parseFloat(A.style.left||0)-(A._originalLeft||0);A.style.top=C+"px";A.style.left=B+"px";A.style.height=A._originalHeight;A.style.width=A._originalWidth}};if(Prototype.Browser.WebKit){Position.cumulativeOffset=function(B){var A=0,C=0;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;if(B.offsetParent==document.body){if(Element.getStyle(B,"position")=="absolute"){break}}B=B.offsetParent}while(B);return[C,A]}}Element.addMethods();var drh=function(){};var dua=(drh.UA=navigator.userAgent);var dav=(drh.AV=navigator.appVersion);var t=true;var f=false;drh.capable=t;drh.opera=dua.indexOf("Opera")>=0;drh.khtml=(dav.indexOf("Konqueror")>=0)||(dav.indexOf("Safari")>=0);drh.safari=dav.indexOf("Safari")>=0;var geckoPos=dua.indexOf("Gecko");drh.mozilla=drh.moz=(geckoPos>=0)&&(!drh.khtml);if(drh.mozilla){drh.geckoVersion=dua.substring(geckoPos+6,geckoPos+14)}drh.ie=(document.all)&&(!drh.opera);drh.ie50=drh.ie&&dav.indexOf("MSIE 5.0")>=0;drh.ie55=drh.ie&&dav.indexOf("MSIE 5.5")>=0;drh.ie60=drh.ie&&dav.indexOf("MSIE 6.0")>=0;drh.ie70=drh.ie&&dav.indexOf("MSIE 7.0")>=0;var cm=document.compatMode;drh.quirks=(cm=="BackCompat")||(cm=="QuirksMode")||drh.ie55||drh.ie50;function sarray(A){for(i=0;i<A;i++){this[i]=0}this.length=A}function integer(A){return A%(4294967295+1)}function shr(B,A){B=integer(B);A=integer(A);if(B-2147483648>=0){B=B%2147483648;B>>=A;B+=1073741824>>(A-1)}else{B>>=A}return B}function shl1(A){A=A%2147483648;if(A&1073741824==1073741824){A-=1073741824;A*=2;A+=2147483648}else{A*=2}return A}function shl(B,A){B=integer(B);A=integer(A);for(var C=0;C<A;C++){B=shl1(B)}return B}function and(B,A){B=integer(B);A=integer(A);var D=(B-2147483648);var C=(A-2147483648);if(D>=0){if(C>=0){return((D&C)+2147483648)}else{return(D&A)}}else{if(C>=0){return(B&C)}else{return(B&A)}}}function or(B,A){B=integer(B);A=integer(A);var D=(B-2147483648);var C=(A-2147483648);if(D>=0){if(C>=0){return((D|C)+2147483648)}else{return((D|A)+2147483648)}}else{if(C>=0){return((B|C)+2147483648)}else{return(B|A)}}}function xor(B,A){B=integer(B);A=integer(A);var D=(B-2147483648);var C=(A-2147483648);if(D>=0){if(C>=0){return(D^C)}else{return((D^A)+2147483648)}}else{if(C>=0){return((B^C)+2147483648)}else{return(B^A)}}}function not(A){A=integer(A);return(4294967295-A)}var state=new sarray(4);var count=new sarray(2);count[0]=0;count[1]=0;var buffer=new sarray(64);var transformBuffer=new sarray(16);var digestBits=new sarray(16);var S11=7;var S12=12;var S13=17;var S14=22;var S21=5;var S22=9;var S23=14;var S24=20;var S31=4;var S32=11;var S33=16;var S34=23;var S41=6;var S42=10;var S43=15;var S44=21;function F(A,C,B){return or(and(A,C),and(not(A),B))}function G(A,C,B){return or(and(A,B),and(C,not(B)))}function H(A,C,B){return xor(xor(A,C),B)}function I(A,C,B){return xor(C,or(A,not(B)))}function rotateLeft(A,B){return or(shl(A,B),(shr(A,(32-B))))}function FF(C,B,K,J,A,D,E){C=C+F(B,K,J)+A+E;C=rotateLeft(C,D);C=C+B;return C}function GG(C,B,K,J,A,D,E){C=C+G(B,K,J)+A+E;C=rotateLeft(C,D);C=C+B;return C}function HH(C,B,K,J,A,D,E){C=C+H(B,K,J)+A+E;C=rotateLeft(C,D);C=C+B;return C}function II(C,B,K,J,A,D,E){C=C+I(B,K,J)+A+E;C=rotateLeft(C,D);C=C+B;return C}function transform(D,J){var C=0,B=0,K=0,E=0;var A=transformBuffer;C=state[0];B=state[1];K=state[2];E=state[3];for(i=0;i<16;i++){A[i]=and(D[i*4+J],255);for(j=1;j<4;j++){A[i]+=shl(and(D[i*4+j+J],255),j*8)}}C=FF(C,B,K,E,A[0],S11,3614090360);E=FF(E,C,B,K,A[1],S12,3905402710);K=FF(K,E,C,B,A[2],S13,606105819);B=FF(B,K,E,C,A[3],S14,3250441966);C=FF(C,B,K,E,A[4],S11,4118548399);E=FF(E,C,B,K,A[5],S12,1200080426);K=FF(K,E,C,B,A[6],S13,2821735955);B=FF(B,K,E,C,A[7],S14,4249261313);C=FF(C,B,K,E,A[8],S11,1770035416);E=FF(E,C,B,K,A[9],S12,2336552879);K=FF(K,E,C,B,A[10],S13,4294925233);B=FF(B,K,E,C,A[11],S14,2304563134);C=FF(C,B,K,E,A[12],S11,1804603682);E=FF(E,C,B,K,A[13],S12,4254626195);K=FF(K,E,C,B,A[14],S13,2792965006);B=FF(B,K,E,C,A[15],S14,1236535329);C=GG(C,B,K,E,A[1],S21,4129170786);E=GG(E,C,B,K,A[6],S22,3225465664);K=GG(K,E,C,B,A[11],S23,643717713);B=GG(B,K,E,C,A[0],S24,3921069994);C=GG(C,B,K,E,A[5],S21,3593408605);E=GG(E,C,B,K,A[10],S22,38016083);K=GG(K,E,C,B,A[15],S23,3634488961);B=GG(B,K,E,C,A[4],S24,3889429448);C=GG(C,B,K,E,A[9],S21,568446438);E=GG(E,C,B,K,A[14],S22,3275163606);K=GG(K,E,C,B,A[3],S23,4107603335);B=GG(B,K,E,C,A[8],S24,1163531501);C=GG(C,B,K,E,A[13],S21,2850285829);E=GG(E,C,B,K,A[2],S22,4243563512);K=GG(K,E,C,B,A[7],S23,1735328473);B=GG(B,K,E,C,A[12],S24,2368359562);C=HH(C,B,K,E,A[5],S31,4294588738);E=HH(E,C,B,K,A[8],S32,2272392833);K=HH(K,E,C,B,A[11],S33,1839030562);B=HH(B,K,E,C,A[14],S34,4259657740);C=HH(C,B,K,E,A[1],S31,2763975236);E=HH(E,C,B,K,A[4],S32,1272893353);K=HH(K,E,C,B,A[7],S33,4139469664);B=HH(B,K,E,C,A[10],S34,3200236656);C=HH(C,B,K,E,A[13],S31,681279174);E=HH(E,C,B,K,A[0],S32,3936430074);K=HH(K,E,C,B,A[3],S33,3572445317);B=HH(B,K,E,C,A[6],S34,76029189);C=HH(C,B,K,E,A[9],S31,3654602809);E=HH(E,C,B,K,A[12],S32,3873151461);K=HH(K,E,C,B,A[15],S33,530742520);B=HH(B,K,E,C,A[2],S34,3299628645);C=II(C,B,K,E,A[0],S41,4096336452);E=II(E,C,B,K,A[7],S42,1126891415);K=II(K,E,C,B,A[14],S43,2878612391);B=II(B,K,E,C,A[5],S44,4237533241);C=II(C,B,K,E,A[12],S41,1700485571);E=II(E,C,B,K,A[3],S42,2399980690);K=II(K,E,C,B,A[10],S43,4293915773);B=II(B,K,E,C,A[1],S44,2240044497);C=II(C,B,K,E,A[8],S41,1873313359);E=II(E,C,B,K,A[15],S42,4264355552);K=II(K,E,C,B,A[6],S43,2734768916);B=II(B,K,E,C,A[13],S44,1309151649);C=II(C,B,K,E,A[4],S41,4149444226);E=II(E,C,B,K,A[11],S42,3174756917);K=II(K,E,C,B,A[2],S43,718787259);B=II(B,K,E,C,A[9],S44,3951481745);state[0]+=C;state[1]+=B;state[2]+=K;state[3]+=E}function init(){count[0]=count[1]=0;state[0]=1732584193;state[1]=4023233417;state[2]=2562383102;state[3]=271733878;for(i=0;i<digestBits.length;i++){digestBits[i]=0}}function update(A){var B,C;B=and(shr(count[0],3),63);if(count[0]<4294967295-7){count[0]+=8}else{count[1]++;count[0]-=4294967295+1;count[0]+=8}buffer[B]=and(A,255);if(B>=63){transform(buffer,0)}}function finish(){var D=new sarray(8);var E;var C=0,B=0,A=0;for(C=0;C<4;C++){D[C]=and(shr(count[0],(C*8)),255)}for(C=0;C<4;C++){D[C+4]=and(shr(count[1],(C*8)),255)}B=and(shr(count[0],3),63);A=(B<56)?(56-B):(120-B);E=new sarray(64);E[0]=128;for(C=0;C<A;C++){update(E[C])}for(C=0;C<8;C++){update(D[C])}for(C=0;C<4;C++){for(j=0;j<4;j++){digestBits[C*4+j]=and(shr(state[C],(j*8)),255)}}}function hexa(D){var C="0123456789abcdef";var A="";var B=D;for(hexa_i=0;hexa_i<8;hexa_i++){A=C.charAt(Math.abs(B)%16)+A;B=Math.floor(B/16)}return A}var ascii="01234567890123456789012345678901 !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";function MD5(L){var A,J,B,K,E,D,C;init();for(B=0;B<L.length;B++){A=L.charAt(B);update(ascii.lastIndexOf(A))}finish();K=E=D=C=0;for(i=0;i<4;i++){K+=shl(digestBits[15-i],(i*8))}for(i=4;i<8;i++){E+=shl(digestBits[15-i],((i-4)*8))}for(i=8;i<12;i++){D+=shl(digestBits[15-i],((i-8)*8))}for(i=12;i<16;i++){C+=shl(digestBits[15-i],((i-12)*8))}J=hexa(C)+hexa(D)+hexa(E)+hexa(K);return J}var ajaxDialogs=new Array();function link_foo(B,A,C){}function getPageSize(){var C,A;if(window.innerHeight&&window.scrollMaxY){C=document.body.scrollWidth;A=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){C=document.body.scrollWidth;A=document.body.scrollHeight}else{C=document.body.offsetWidth;A=document.body.offsetHeight}}var B,D;if(self.innerHeight){B=self.innerWidth;D=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){B=document.documentElement.clientWidth;D=document.documentElement.clientHeight}else{if(document.body){B=document.body.clientWidth;D=document.body.clientHeight}}}if(A<D){pageHeight=D}else{pageHeight=A}if(C<B){pageWidth=B}else{pageWidth=C}arrayPageSize=new Array(pageWidth,pageHeight,B,D);return arrayPageSize}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}var overlay_effect=false;function CenterProgressBar(){if($("please_wait")){var B=getPageSize();var A=getPageScroll();var D=(B[2]/2)-85;var C=A[1]+(B[3]/2)-23;document.getElementById("please_wait_under").style.position="absolute";Element.setStyle("please_wait",$H({left:D+"px"}));Element.setStyle("please_wait",$H({top:C+"px"}));Element.setStyle("please_wait_under",$H({left:D+"px"}));Element.setStyle("please_wait_under",$H({top:C+"px"}));Element.setStyle("please_wait",$H({"z-index":30000}));Element.setStyle("please_wait_under",$H({"z-index":29999}))}}window.onresize=CenterProgressBar;function ShowProgressBar(){CenterProgressBar();if(progress_bar){progress_bar.showBar();if(progress_bar_paused){progress_bar.togglePause();progress_bar_paused=false}}if($("please_wait")){Element.show("please_wait")}if($("please_wait_overlay")){var A=getPageSize();Element.setStyle("please_wait_overlay",$H({height:A[1]+"px"}));if(overlay_effect){new Effect.Appear("please_wait_overlay",{duration:0.1,from:0,to:0.2})}else{Element.setOpacity("please_wait_overlay",0);Element.show("please_wait_overlay")}}}function HideProgressBar(){if(progress_bar){if(!progress_bar_paused){progress_bar.togglePause();progress_bar_paused=true}progress_bar.hideBar()}if($("please_wait")){Element.hide("please_wait")}if($("please_wait_overlay")){if(overlay_effect){new Effect.Fade("please_wait_overlay",{duration:0.1,from:0.2,to:0})}else{Element.setOpacity("please_wait_overlay",0);Element.hide("please_wait_overlay")}}}printf=function(){var B=arguments.length;var A=arguments[0];for(var C=1;C<B;C++){var E="\\{"+(C-1)+"\\}";var D=new RegExp(E,"g");A=A.replace(D,arguments[C])}return A};function clickon(E,D,B,J){if(E.id){id=E.id}else{id=E}if(id.substr(-4,0)=="_div"){id=id.substr(0,id.length-4)}ps="";if($(D)){ps=$(D).id}var C=0;var A=0;for(C=0;C<ajaxDialogs.length;C++){if(ajaxDialogs[C]!=id){tmp=document.getElementById(ajaxDialogs[C]+"_div");if(tmp&&ajaxDialogs[C]+"_div"!=ps){tmp.style.display="none"}}if(ajaxDialogs[C]==id){A=true}}if(A==0){ajaxDialogs.push(id)}a=document.getElementById(id+"_refId");if(a){if(clickon.arguments&&clickon.arguments[1]){a.value=clickon.arguments[1]}else{if(arguments[1]){a.value=arguments[1]}else{a.value="NULL"}}}a=document.getElementById(id+"_div");if(a){org=a;if(a.style.display=="none"){a.style.display="block";if(B){B(a)}}else{if(a.style.display=="block"){a.style.display="none";if(J){J(a)}}}b=document.getElementById(id+"_nodata_div");if(b){if(b.style.display=="none"){b.style.display="block"}else{if(b.style.display=="block"){b.style.display="none"}}}a=document.getElementById(id+"_dialog");if(a){a.style.display="block"}a=document.getElementById(id+"_process");if(a){a.style.display="none"}a=document.getElementById(id+"_finished");if(a){a.style.display="none"}b=document.getElementById(id+"_focus");if(b&&org.style.display!="none"){b.focus()}}if(typeof resizeblend=="function"){resizeblend()}}function toggleShow(B,A){a=document.getElementById(B.id+"_div");if(a.style.display=="none"){a.style.display="block"}else{if(a.style.display=="block"){a.style.display="none"}}}function toggleCollapse(B,A){a=document.getElementById(B);b=document.getElementById(B.replace(/filters/,"legend"));if(a){org=a;if((a.style.display=="none"&&!A)||(A&&A==1)){a.style.display="block";if(b){b.className="on"}}else{if((a.style.display=="block"&&!A)||(A&&A==-1)){a.style.display="none";if(b){b.className="off"}}}}}function doLogin(){show_please_wait();if(!$("response").value.match(/[a-f0-9]{32,32}/)){$("response").value=MD5($("pass").value)}$("pass").value="";delay(500);document.forms.login.submit();show_please_wait()}function delay(C){var B,A;B=new Date().getTime();A=B;while((A-B)<C){A=new Date().getTime()}}function updateTokens(E,C){if(typeof resizeblend=="function"){resizeblend()}try{if(window.parent&&window.parent.opener&&window.parent.opener.parent&&window.parent.opener.parent.document){obj=window.parent.opener.parent.document.getElementById("blogEntryEdit_form_token");if(obj){obj.value=E}}}catch(B){}var D=Array("smallAjax","quickUserList","invite_form","accuse_form","poke_form","topic_del_form","comment_form","forum_topic_add_form","friendInvite_form","mailboxAction_form","msg-form_token","navsearchform_form","mail_form","comment_form","albumMarksSave_form","blog_form","blogEntryEdit_form","blogEntryEdit_form_token","ctoken_form","accuse_form","poke_form","friendInvite_form","comment_form","mailboxAction_form","pokeDiscard_form","comment_form","ctoken_form","accuse_form","poke_form","friendInvite_form","comment_form","mailboxAction_form","pokeDiscard_form","comment_form","ctoken_form","groupInvitation_form","groupInvitation","groups","groupOptions_form","pokeDiscard_form","comment_form","ctoken_form","innerGroupMembers_form","groupAnchorman_form","groupUninvite_form","groupAnchorman","groupUninvite","mailboxAction_form","marks_form","accuse_form","poke_form","forum_topic_form","navsearchform","friendInvite_form","groupMembershipEnd_form","groupInivitation","albumMarksSave_form","mailboxAction_form","comment_form","ctoken_form","objPropertiesSave_form","navsearchform","pokeDiscard_form","comment_form","mailboxAction_form","pokeDiscard_form","comment_form","ctoken_form","groupInvitation_form","groupInvitation","groups","marks_form","accuse_form","poke_form","forum_topic_form","navsearchform","friendInvite_form","groupMembershipEnd_form","groupInivitation","albumMarksSave_form","mailboxAction_form","innerGroupMembers_form","groupAnchorman_form","groupUninvite_form","groupAnchorman","groupUninvite","marks_form","accuse_form","poke_form","forum_topic_form","navsearchform","friendInvite_form","groupMembershipEnd_form","groupInivitation","albumMarksSave_form","mailboxSend_form","mailboxAction_form","cform_form","cform","marks_form","accuse_form","poke_form","poke_form_token","forum_topic_form","navsearchform","friendInvite_form","groupMembershipEnd_form","groupInivitation","albumMarksSave_form","mailboxAction_form","cform_form","cform","forum_topic_add_form_token","comment_form","forum_topic_add_form","msg-form","pokeDiscard_form","tag","profil_edit","album_edit","mode_edit","blog_edit","msg-form","modeprops_form_token","editProfile_form","editProfile2_form","editProfileDialog_form","signup2","contact_form","calendar","dateDetails","calendarOptions_form");if(C){D.concat(C)}D.push("navsearchform");var A="";for(i=0;i<ajaxDialogs.length;i++){tmp=document.getElementById(ajaxDialogs[i]+"_token");if(tmp){tmp.value=E;A=A+ajaxDialogs[i]+"_token, "}tmp=document.getElementById(ajaxDialogs[i]+"_form_token");if(tmp){tmp.value=E;A=A+ajaxDialogs[i]+"_form_token, "}}if((typeof D)=="object"){for(i=0;i<D.length;i++){tmp=document.getElementById(D[i]+"_token");if(tmp){tmp.value=E;A=A+D[i]+"_token, "}tmp=document.getElementById(D[i]+"_form_token");if(tmp){tmp.value=E;A=A+D[i]+"_form_token, "}}}if(debug_mode){alert("update "+E+" auf "+A)}}currentAjaxAction=null;function ajaxAction(D,J,A,C,E){if(ajaxCheck(D)){if(!C){C=D}var B=root_url+"community/ajax/"+C+".php";var K=new Ajax.Request(B,{method:"post",postBody:(document.forms[D+"_form"]?Form.serialize(document.forms[D+"_form"]):E),onCreate:(A?A:ajaxProcess(D)),onComplete:(J?J:ajaxFinished(D))})}}function ajaxProcess(A){a=$(A+"_dialog");if(a){a.style.display="none"}a=$(A+"_finished");if(a){a.style.display="none"}a=$(A+"_process");if(a){a.style.display="block"}a=document.getElementById(A+"_dialog_buttons");if(a){a.style.display="none"}a=document.getElementById(A+"_dialog_buttons_finished");if(a){a.style.display="none"}if(typeof resizeblend=="function"){resizeblend()}}function ajaxFinished(A){a=$(A+"_dialog");if(a){a.style.display="none"}a=document.getElementById(A+"_process");if(a){a.style.display="none"}a=document.getElementById(A+"_finished");if(a){a.style.display="block"}a=document.getElementById(A+"_dialog_buttons");if(a){a.style.display="none"}a=document.getElementById(A+"_dialog_buttons_finished");if(a){a.style.display="block"}if(typeof resizeblend=="function"){resizeblend()}}function ajaxCheck(A){if(A.substr(0,6)=="accuse"){if(document.getElementById(A+"_reason").value.length<10){alert(lang.common.errReport);return false}}if(A=="forum_post"){if($("forum_textbody").value.length>0){return true}else{alert(lang.common.errForumTopic);return false}}if(A=="forum_topic"){if(trim($("subject").value).length>0){return true}else{alert(lang.common.errForumSubj);return false}}return true}function ajaxReturn(C,B,A,D){}var stars=Array();function starset(A){x=A.id.substr(A.id.lastIndexOf("_")+1);pref=A.id.substr(0,A.id.lastIndexOf("_"));path=$(pref+"_"+1).src;path=path.substr(0,path.lastIndexOf("/"));if(typeof stars[path]=="undefined"||stars[path]==false){stars[path]=true;for(i=1;i<11;i++){$(pref+"_"+i).style.cursor="pointer"}}else{stars[path]=false;for(i=1;i<11;i++){$(pref+"_"+i).style.cursor="w-resize"}}}var currentStarCont="";function showStarSet(E,A,D,C,B){currentStarCont=E.innerHTML;E.onclick=function(){var J=root_url+"community/ajax/rate.php";var K=new Ajax.Request(J,{method:"post",postBody:"o1="+D+"&o2="+C+"&o3="+B+"&val="+A.value+"&target="+E.id+"&token="+$("common_action_token").value+"&formSubmit=common",onCreate:show_please_wait(),onSuccess:function(){hide_please_wait();$("starsetcontainer").appendChild($("starset"))}});stars=Array();E.onclick=function(){showStarSet(E,A,D,C,B)}};E.innerHTML="";E.appendChild($("starset"))}function star(B,A,C){if(typeof C!="undefined"){B=math.Round(C/10)}x=A.id.substr(A.id.lastIndexOf("_")+1);pref=A.id.substr(0,A.id.lastIndexOf("_"));path=$(pref+"_"+1).src;path=path.substr(0,path.lastIndexOf("/"));if(typeof stars[path]=="undefined"||stars[path]==false){for(i=1;i<11;i++){if(B>0&&i<x&&i%2==1){$(pref+"_"+i).src=path+"/star_on_1.gif"}if(B>0&&i<x&&i%2==0){$(pref+"_"+i).src=path+"/star_on_2.gif"}if(B>0&&i==x&&i%2==1){$(pref+"_"+i).src=path+"/star_on_1b.gif"}if(B>0&&i==x&&i%2==0){$(pref+"_"+i).src=path+"/star_on_2.gif"}if((B==0||i>x)&&i%2==1){$(pref+"_"+i).src=path+"/star_off_1.gif"}if((B==0||i>x)&&i%2==0){$(pref+"_"+i).src=path+"/star_off_2.gif"}}if(typeof C=="undefined"){$(pref+"_perc").innerHTML="&nbsp;"+(B*10)+"%";$(pref+"_val").value=B*10}else{$(pref+"_perc").innerHTML="&nbsp;"+(C)+"%";$(pref+"_val").value=C}}}ns4=(document.layers)?true:false;ie4=(document.all)?true:false;dom=(document.getElementById)?true:false;function ZeitDatum(){Jetzt=new Date();Tag=Jetzt.getDate();Monat=Jetzt.getMonth()+1;Jahr=Jetzt.getFullYear();if(language=="de"||language=="fr"){DatumsString=Tag;DatumsString+=((Monat<10)?".0":".")+Monat;DatumsString+="."+Jahr}else{if(language=="en"){DatumsString=(Tag<10?"0"+Tag:Tag);DatumsString+=((Monat<10)?"/0":"/")+Monat;DatumsString+="/"+Jahr}}if(document.getElementById("currentDate")){document.getElementById("currentDate").innerHTML=DatumsString}Stunden=Jetzt.getHours();Minuten=Jetzt.getMinutes();Sekunden=Jetzt.getSeconds();ZeitString=Stunden;ZeitString+=((Minuten<10)?":0":":")+Minuten;if(document.getElementById("currentTime")){document.getElementById("currentTime").innerHTML=ZeitString}setTimeout("ZeitDatum()",10000)}function hideInvite(A){$("inv_"+A).style.display="none"}function autoLoader(){ZeitDatum()}function sTab(A){$("sTab1").className="inactivelink";$("sTab2").className="inactivelink";$("sTab3").className="inactivelink";$("sTab"+A).className="activelink";if(A==2||A==3){$("navsearchformkeyword").value=lang.common.seekWeb}else{$("navsearchformkeyword").value=lang.common.seekPeople}$("navsearchforms").value=A}function sOnBl(A){if(A.value==""&&$("navsearchforms").value==1){A.value=lang.common.seekPeople}if(A.value==""&&$("navsearchforms").value==2){A.value=lang.common.seekWeb}if(A.value==""&&$("navsearchforms").value==3){A.value=lang.common.seekWiki}}function sOnFo(A){frm=document.forms.navsearchform;if($("navsearchforms").value==1){frm.action="s.php";$("navsearchformkeyword").name="q";frm.target="_self"}if($("navsearchforms").value==2){frm.action="http://www.google.de/search?hl=de&meta=";$("navsearchformkeyword").name="q";frm.target="_new"}if($("navsearchforms").value==3){frm.action="http://de.wikipedia.org/wiki/Special:Search?go=Go";$("navsearchformkeyword").name="search";frm.target="_new"}A.value=""}function showElement(A){if(typeof (A)=="string"){A=$(A)}if(isArray(A)){for(i=0;m=A[i];i++){showElement(m)}}else{A.style.display=""}}function hideElement(A){if(typeof (A)=="string"){A=$(A)}if(isArray(A)){for(i=0;m=A[i];i++){hideElement(m)}}else{A.style.display="none"}}function isArray(A){if(!window.Array){return false}else{return A.constructor==window.Array}}function getAllChildren(A){return A.all?A.all:A.getElementsByTagName("*")}function selectElements(U){if(!document.getElementsByTagName){return new Array()}var O=U.split(" ");var J=new Array(document);for(var W=0;W<O.length;W++){token=O[W].replace(/^\s+/,"").replace(/\s+$/,"");if(token.indexOf("#")>-1){var R=token.split("#");var D=R[0];var Q=R[1];var B=document.getElementById(Q);if(D&&B.nodeName.toLowerCase()!=D){return new Array()}J=new Array(B);continue}if(token.indexOf(".")>-1){var R=token.split(".");var D=R[0];var C=R[1];if(!D){D="*"}var L=new Array;var K=0;for(var X=0;X<J.length;X++){var M;if(D=="*"){M=getAllChildren(J[X])}else{M=J[X].getElementsByTagName(D)}for(var T=0;T<M.length;T++){L[K++]=M[T]}}J=new Array;var P=0;for(var S=0;S<L.length;S++){if(L[S].className&&L[S].className.match(new RegExp("\\b"+C+"\\b"))){J[P++]=L[S]}}continue}if(token.match(/^(\w*)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/)){var D=RegExp.$1;var V=RegExp.$2;var A=RegExp.$3;var N=RegExp.$4;if(!D){D="*"}var L=new Array;var K=0;for(var X=0;X<J.length;X++){var M;if(D=="*"){M=getAllChildren(J[X])}else{M=J[X].getElementsByTagName(D)}for(var T=0;T<M.length;T++){L[K++]=M[T]}}J=new Array;var P=0;var E;switch(A){case"=":E=function(Y){return(Y.getAttribute(V)==N)};break;case"~":E=function(Y){return(Y.getAttribute(V).match(new RegExp("\\b"+N+"\\b")))};break;case"|":E=function(Y){return(Y.getAttribute(V).match(new RegExp("^"+N+"-?")))};break;case"^":E=function(Y){return(Y.getAttribute(V).indexOf(N)==0)};break;case"$":E=function(Y){return(Y.getAttribute(V).lastIndexOf(N)==Y.getAttribute(V).length-N.length)};break;case"*":E=function(Y){return(Y.getAttribute(V).indexOf(N)>-1)};break;default:E=function(Y){return Y.getAttribute(V)}}J=new Array;var P=0;for(var S=0;S<L.length;S++){if(E(L[S])){J[P++]=L[S]}}continue}if(!J[0]){return }D=token;var L=new Array;var K=0;for(var X=0;X<J.length;X++){var M=J[X].getElementsByTagName(D);for(var T=0;T<M.length;T++){L[K++]=M[T]}}J=L}return J}function editor_two_level_change(B,A,D){B=$(B);if(B.getAttribute("typefor")){subselector=$(B.getAttribute("typefor"))}if(B&&subselector){subselector.options.length=1;type_value=B.options[B.selectedIndex].value;if(type_value==""){type_value=-1}index=1;suboptions=A[type_value];for(var C in suboptions){if(!isNaN(C)){subselector.options[index]=new Option(suboptions[C],C);index++}}subselector.disabled=subselector.options.length<=1}}function trim(A){while(A.substring(0,1)==" "){A=A.substring(1,A.length)}while(A.substring(A.length-1,A.length)==" "){A=A.substring(0,A.length-1)}return A}function show_please_wait(){CenterProgressBar();if($("please_wait")){$("please_wait").style.display="block"}if($("please_wait_under")){$("please_wait_under").style.display="block"}}function hide_please_wait(){if($("please_wait")){$("please_wait").style.display="none"}if($("please_wait_under")){$("please_wait_under").style.display="none"}}var profile_changed=false;function pns(){profile_changed=true}function p_redir(A){if(profile_changed){a=confirm(lang.common.errProfileNotSaved);if(a){document.location.href=A}}else{document.location.href=A}}function objectDelete(C,D,B){var A="";if(C==3){A=lang.common.deleteAlbum}if(C==4){A=lang.common.deleteBlog}if(confirm(A)){show_please_wait();if(C==3){document.location.href="album.php?action=deleteAlbum&aid="+D+"&token="+$("common_action_token").value+"&formSubmit=common"}if(C==4){document.location.href="blog.php?action=deleteBlog&token="+$("common_action_token").value+"&formSubmit=common"}}}function objPropertiesSave(){$("please_wait").style.display="block";ajaxAction("objPropertiesSave",objPropertiesSaveFinished,show_please_wait())}function objPropertiesSaveFinished(){}function cryptPasswords(){if($("error_1")){$("error_1").style.display="none"}if($("error_2")){$("error_2").style.display="none"}if($("error_3")){$("error_3").style.display="none"}if($("pass1").value.length<7){$("error_1").style.display="block"}else{if($("pass1").value!=$("pass2").value){$("error_2").style.display="block"}else{if($("pass0_response")){$("pass0_response").value=MD5($("pass0").value)}if($("pass1_response")){$("pass1_response").value=MD5($("pass1").value)}if($("pass2_response")){$("pass2_response").value=MD5($("pass2").value)}$("pass0").value="";$("pass1").value="";$("pass2").value="";if(document.forms.changepassword){document.forms.changepassword.submit()}else{ajaxAction("editProfileDialog",link_foo,ajaxProcess("editProfileDialog"),"editProfile")}}}}function changeYear(B){var C=document.getElementById("bday_day");var A=document.getElementById("bday_month");if(B==0){C.selectedIndex=0;A.selectedIndex=0;C.disabled=true;A.disabled=true}else{A.disabled=false;daysInMonth(C,document.getElementById("bday_year").value,A.value)}}function changeMonth(A){var B=document.getElementById("bday_day");if(A==0){B.selectedIndex=0;B.disabled=true}else{B.disabled=false;daysInMonth(B,document.getElementById("bday_year").value,document.getElementById("bday_month").value)}}function daysInMonth(E,C,J){if(J>0&&C>0){J=--J;var K;if(J==11){K=new Date(++C,0)}else{K=new Date(C,++J)}var D=new Date(K-1);var A=1+D.getDate();for(var B=E.length;B<=A;B++){E.options[B]=new Option(B,B)}if(E.length>A){E.length=A}if(E.value>A){E.value=A}}}function toggleSearchFilter(){if($("sfiltershow").style.display=="block"){$("sfiltershow").style.display="none";$("sfilter").style.display="block";$("leftallcont").className="leftsmall clearfix search";$("listview").style.width="490px"}else{$("sfiltershow").style.display="block";$("sfilter").style.display="none";$("leftallcont").className="left clearfix searchbroad";$("listview").style.width="684px"}}function togglefaq(A){for(i=1;i<5;i++){A=A.nextSibling;if(A.tagName=="div"||A.className=="ans"){break}}if(A.style.display=="none"){A.style.display="block"}else{A.style.display="none"}}function disableVisitors(C,B,A){if(B==""&&$("youKnowTable")){$("youKnowTable").style.display="none"}}function smallAjax(M,D,J,C,L,K){if(typeof C=="undefined"){C="smallAjax"}if(typeof J=="undefined"){J=""}if(typeof K=="undefined"){K="post"}if($(C+"_action_token")){tok=$(C+"_action_token").value;tokI=C}else{tok=$("common_action_token").value;tokI="common"}parameterString="&token="+tok+"&formSubmit="+tokI+"&what="+M+"&where="+D+"&"+J;var B=root_url+"community/ajax/"+C+".php";if(K=="get"){B=B+"?"+parameterString}var A=new Ajax.Request(B,{method:K,postBody:parameterString,onCreate:function E(){},what:M,where:D,onSuccess:function(N,O,P){if(K=="post"){x=N.responseText;token=x.substr(0,64);x=x.substr(64);if(D&&$(D)){$(D).innerHTML=x}common.updateToken("common",token)}else{if(D&&$(D)){$(D).innerHTML=N.responseText}}if(typeof L!="undefined"){L(x,x,x)}}})}function againstPfusch(){if($("pokeSelect").options[$("pokeSelect").options.selectedIndex].value==-1){$("pokeExecBt").style.display="none";$("error").style.display="block"}else{$("pokeExecBt").style.display="";$("error").style.display="none"}}function checkNotice(A,C,B){chkval=C.options[C.selectedIndex].value;if(typeof B=="undefined"){B="notice_note_"}for(i=0;i<20;i++){if($(B+i)){$(B+i).style.display="none"}}if($(B+chkval)){$(B+chkval).style.display="block"}if(A==100){if($("capRow")){$("capRow").style.display=""}if($("emailRow")){$("emailRow").style.display=""}if($("nameRow")){$("nameRow").style.display=""}$("contactSendBtn").style.display="";$("contactSendBtn").value=lang.common.send;$("msgRow").style.display="";if(chkval==0){$("contactSendBtn").style.display="none"}if(chkval>0){$("error_1").style.display="none"}if(chkval==9||chkval==6||chkval==7){if($("capRow")){$("capRow").style.display="none"}if($("emailRow")){$("emailRow").style.display="none"}if($("nameRow")){$("nameRow").style.display="none"}$("contactSendBtn").style.display="none";$("msgRow").style.display="none"}if(chkval==10||chkval==2||chkval==3||chkval==11){$("msgRow").style.display="none"}if(chkval==11){$("contactSendBtn").value=lang.common.resendMail;$("msgRow").style.display="none"}}}function checkAccuseDialog(){if($("answer1").checked||$("answer2").checked){$("reactionExecBt").style.display="";if($("reaction_msg")){$("reaction_msg").style.display="block"}}else{$("reactionExecBt").style.display="none";if($("reaction_msg")){$("reaction_msg").style.display="none"}}}function selectLocation(J,A){if(typeof A=="undefined"){A=""}selectMax=$("locationInstance"+A).value;if(selectMax==""){selectMax=3}if(J>selectMax){return }var B=root_url+"community/ajax/selectLocation.php";token=$("selectlocation"+A+"_action_token").value;postString="&what="+J+"&selectMax="+selectMax+"&instance="+A+"&token="+token+"&formSubmit=selectlocation"+A+"&country"+A+"="+$("country"+A).options[$("country"+A).selectedIndex].value;if(J>=2&&$("state"+A)){postString+="&state"+A+"="+$("state"+A).options[$("state"+A).selectedIndex].value}if(J>=3&&$("city"+A)){postString+="&city"+A+"="+$("city"+A).options[$("city"+A).selectedIndex].value}var E=new Ajax.Request(B,{method:"post",postBody:postString,onCreate:function D(K,L,M){if(typeof A=="undefined"){A=""}show_please_wait();$("country"+A).disabled=true;if($("city"+A)){$("city"+A).disabled=true}if($("state"+A)){$("state"+A).disabled=true}if($("uni"+A)){$("uni"+A).disabled=true}},onComplete:function C(K,L,M){if(typeof A=="undefined"){A=""}x=K.responseText;token=x.substr(0,64);x=x.substr(64);$("selectlocation"+A+"_action_token").value=token;if($("selectLocation"+A)){$("selectLocation"+A).innerHTML=x}hide_please_wait()}})}function chooseCard(A){$("card").src="../templates/layout/start/ecards/"+A+"-big.jpg";$("card_id").value=A;popupCancel()}var commonJSLoaded=true;function init_mousemove(){if(document.layers){document.captureEvents(Event.MOUSEMOVE)}$("photo_overlay").onmousemove=dpl_mouse_pos}function dpl_mouse_pos(A){xPos=A?(A.layerX):window.event.x;yPos=A?(A.layerY):window.event.y;if(typeof mode=="undefined"){mode=0}if(mode==1){if(xPos>0&&yPos>0){newid=newmarkid;$("inphotocontainer_"+newid).style.left=xPos+"px";$("inphotocontainer_"+newid).style.top=yPos+"px"}}if(mode==0){marks_show();for(i=0;i<Marks.length;i++){obj=$("inphotocontainer_"+Marks[i]).style;objLeft=parseInt(obj.left.replace("px",""));objTop=parseInt(obj.top.replace("px",""));if(xPos>=objLeft&&xPos<=objLeft+boxwidth&&yPos>=objTop&&yPos<=objTop+boxheight){showVariable(Marks[i]);mark_show(Marks[i],false,true);$("debug").innerHTML="Mark "+Marks[i]}else{$("debug").innerHTML=xPos+", "+yPos+"("+obj.left+", "+obj.top+")";$("outsidename_a_"+Marks[i]).className="name_nohoover"}}}if(document.layers){routeEvent(A)}}function enterPhoto(){$("photo_overlay_img").width=$("photo").width;$("photo_overlay_img").height=$("photo").height;photox=$("photo").width;photoy=$("photo").height;marks_show();init_mousemove()}function leavePhoto(){marks_hide();$("variable").style.display="none"}function marks_show(){for(i=0;i<Marks.length;i++){mark_show(Marks[i],false,false)}}function marks_hide(){for(i=0;i<Marks.length;i++){mark_hide(Marks[i],false,false)}}if(typeof mode=="undefined"){mode=0}function mark_show(C,B,A){if(mode==0){if($("inphotocontainer_"+C)&&$("inphotocontainer_"+C).style.display=="none"){$("inphotocontainer_"+C).style.display="block"}if(A&&$("outsidename_a_"+C)){$("outsidename_a_"+C).className="name_hoover"}if(B){showVariable(C)}}}function mark_hide(A){if(mode==0){if($("inphotocontainer_"+A)&&$("inphotocontainer_"+A).style.display=="block"){$("inphotocontainer_"+A).style.display="none"}if($("outsidename_a_"+A)){$("outsidename_a_"+A).className="name_nohoover"}}}function showVariable(B){if(mode==0){$("variable").style.width=infoboxwidth;$("variable").style.height=infoboxheight;$("variable").style.display="block";obj=parseInt($("inphotocontainer_"+B).style.left.replace("px",""))+(boxwidth/2);if(obj+Math.floor(boxwidth/2)+infoboxwidth>=photox){obj=obj-infoboxwidth}$("variable").style.left=obj+"px";obj=parseInt($("inphotocontainer_"+B).style.top.replace("px",""))+(boxheight/2);if(obj+Math.floor(boxheight/2)+infoboxheight>=photoy){obj=obj-infoboxheight}$("variable").style.top=obj+"px";info=$("hidden_mark_"+B).value.split(",");var A=false;if($("outsidename_info_"+B).innerHTML.search(/Markiert von Dir/)!="-1"){A=true}else{if($("outsidename_info_a_"+B).innerHTML==currentUserName){A=true}}if(info[3]==currentUserName||myAlbum=="1"||A){delmarkstr=""}else{delmarkstr=""}$("variable").innerHTML='<table class="markbox"><tr><td><b>'+$("outsidename_a_"+B).innerHTML+"</b>"+$("outsidename_info_"+B).innerHTML+delmarkstr+"</td></tr></table>";$("inphotocontainer_"+B).style.display="block"}}function hideVariable(){}function del_mark(B){obj=$("inphotocontainer_"+B);obj.parentNode.replaceChild(document.createTextNode(""),obj);obj=$("outsidename_"+B);obj.parentNode.replaceChild(document.createTextNode(""),obj);obj=$("hidden_mark_"+B);obj.value=obj.value+",deleted,"+currentUser+","+currentUserName;$("markctrl-save").style.display="block";$("variable").style.display="none";var A=Array();for(i=0;i<Marks.length;i++){if(Marks[i]!=B){A.push(Marks[i])}}Marks=A;if(Marks.length==0){$("outside_none").style.display="inline"}else{$("outside_none").style.display="none"}}function hide_info_layer(A){if(mode==0&&$("variable")){$("variable").style.display="none"}}function add_mark(){newmarkid=(Marks.length+1)*2+100;newdiv=newmarkid;if(mode==0){mode=1;marks_hide();$("markctrl").value=lang.album.bearbeitungBeenden;$("photocontainer").innerHTML=$("photocontainer").innerHTML+'<div id="inphotocontainer_'+newdiv+'" style="position: absolute; z-index: '+newdiv+'; top: 60px; left: 200px; display: none;" onmouseover="showVariable(\''+newdiv+"');\" onmouseout=\"hideVariable('"+newdiv+'\'); "><img src="../templates/img/focus.gif" /></div>';$("inphotocontainer_"+newdiv).style.position="absolute";$("inphotocontainer_"+newdiv).style.left="0px";$("inphotocontainer_"+newdiv).style.top="0px";$("inphotocontainer_"+newdiv).style.display="block";init_mousemove($("photo"));$("markctrl-save").style.display="block"}else{if(mode>0){mode=0;$("markctrl").value=(Marks.length>0?lang.album.addMoreMarks:lang.common.addMarks);$("box").style.display="none";$("inphotocontainer_"+newdiv).style.display="none";$("inphotocontainer_"+newdiv).outerHTML=""}}}function save_marks(){$("markctrl-save").style.display="none";$("please_wait").style.display="block";ajaxAction("albumMarksSave",saved_marks,saving_marks)}function saving_marks(A){}function saved_marks(A){$("please_wait").style.display="none";for(i=0;i<Marks.length;i++){if($("hidden_mark_"+Marks[i])){v=$("hidden_mark_"+Marks[i]).value;if(v.search(/added/)!="-1"||v.search(/deleted/)!="-1"){$("hidden_mark_"+Marks[i]).value=""}}}window.location.reload()}function show_box(){if(mode==1){newdiv=newmarkid;$("box").style.display="block";obj=parseInt($("inphotocontainer_"+newdiv).style.left.replace("px",""))+40;if(obj+selectwidth>=photox){obj=obj-selectwidth}$("box").style.left=obj+"px";obj=parseInt($("inphotocontainer_"+newdiv).style.top.replace("px",""))+40;if(obj+selectheight>=photoy){obj=obj-selectheight}$("box").style.top=obj+"px";mode=2}}function hide_box(){if(mode==2){$("box").style.display="none";mode=1}}function handle_click(S){if(!S){S=window.event}var K=$("friendscroller");var Q=new Object();var M=$("friendsName");var R=M.value;K.innerHTML="";var E=0;for(var U in friends){Q[U]=friends[U];var J=Q[U].length;var B=R.length;var C=Q[U].toLowerCase();var O=C.indexOf(R.toLowerCase());var T,D;if(O!=-1){E++;var N=document.createElement("div");var P=U;var L=document.createTextNode(""+Q[U].replace(/\\/,"")+"");var A=document.createElement("a");A.href="javascript:set_friend('"+U+"','"+Q[U]+"')";A.appendChild(L);N.appendChild(A);K.appendChild(N);T=Q[U];D=U}}if(E==0){K.innerHTML=lang.album.markOnlyFriends}}function set_friend(D,B){var C=false;for(i=0;i<Marks.length;i++){if($("hidden_mark_"+Marks[i])){var A=$("hidden_mark_"+Marks[i]).value.replace(/ /,"").split(",");if(A[2].substr(0,1)==" "){A[2]=A[2].substr(1)}if(A[2]==D){C=true}}}mode=0;$("box").style.display="none";$("markctrl").value=lang.album.addMoreMarksBtn;if(C){alert(lang.album.personAlreadyMarked);$("inphotocontainer_"+newdiv).style.display="none"}else{newdiv=newmarkid;mynewobj=$("inphotocontainer_"+newdiv);$("inphotocontainer_"+newdiv).innerHTML='<a href="profil.php?pid='+D+'"><img src="../templates/img/focus.gif" /></a>';$("outer_names").innerHTML=$("outer_names").innerHTML+'<div id="outsidename_'+newdiv+'" style="display: inline; "onmouseover="mark_show(\''+newdiv+"', false);\" onmouseout=\"mark_hide('"+newdiv+'\',false);"><a href="profil.php?pid='+D+'" id="outsidename_a_'+newdiv+'" class="name_nohoover">'+B+'</a><span class="x" onclick="del_mark(\''+newdiv+'\');" onmouseout="this.className=\'x\'" onmouseover="this.className=\'x_hover\'" >&nbsp;</span></div><div id="outsidename_info_'+newdiv+'" style="display: none"><br>'+lang.album.markedByYou+"&nbsp;</div>";$("albumMarksSave_form").innerHTML=$("albumMarksSave_form").innerHTML+'<input type="hidden" name="hidden_mark_'+newdiv+'" id="hidden_mark_'+newdiv+'" value="'+mynewobj.style.left+", "+mynewobj.style.top+", "+D+", "+B+", "+currentUser+", "+currentUserName+',added">';Marks.push(newdiv);if(Marks.length==0){$("outside_none").style.display="inline"}else{$("outside_none").style.display="none"}}}function editphotos_click(){$("please_wait").style.display="block";ajaxAction("editphotos",editphotos_add,editphotos_status)}function editphotos_add(A){$("please_wait").style.display="none";document.location.href="album.php?aid="+A.responseText}function editphotos_status(){$("please_wait").style.display="block"}var mouseOffset=null;var mousePos=null;var iMouseDown=false;var lMouseState=false;var dragObject=null;var DragDrops=[];var curTarget=null;var lastTarget=null;var dragHelper=null;var tempDiv=null;var rootParent=null;var rootSibling=null;Number.prototype.NaN0=function(){return isNaN(this)?0:this};function Createdragcontainer(){var A=DragDrops.length;DragDrops[A]=[];for(var D=0;D<arguments.length;D++){var C=arguments[D];DragDrops[A].push(C);C.setAttribute("DropObj",A);for(var B=0;B<C.childNodes.length;B++){if(C.childNodes[B].nodeName=="#text"){continue}C.childNodes[B].setAttribute("DragObj",A)}}}function getPosition(C){var B=0;var A=0;while(C.offsetParent){B+=C.offsetLeft+(C.currentStyle?(parseInt(C.currentStyle.borderLeftWidth)).NaN0():0);A+=C.offsetTop+(C.currentStyle?(parseInt(C.currentStyle.borderTopWidth)).NaN0():0);C=C.offsetParent}B+=C.offsetLeft+(C.currentStyle?(parseInt(C.currentStyle.borderLeftWidth)).NaN0():0);A+=C.offsetTop+(C.currentStyle?(parseInt(C.currentStyle.borderTopWidth)).NaN0():0);return{x:B,y:A}}function mouseCoords(A){if(A.pageX||A.pageY){return{x:A.pageX,y:A.pageY}}return{x:A.clientX+document.body.scrollLeft-document.body.clientLeft,y:A.clientY+document.body.scrollTop-document.body.clientTop}}function getMouseOffset(D,C){C=C||window.event;var B=getPosition(D);var A=mouseCoords(C);return{x:A.x-B.x,y:A.y-B.y}}function mouseMove(ev){ev=ev||window.event;var target=ev.target||ev.srcElement;mousePos=mouseCoords(ev);var dragObj=target.getAttribute("DragObj");if(dragObj!=null){if(target!=lastTarget){var oClass=target.getAttribute("overClass");if(oClass){target.setAttribute("origClass",target.className);target.className=oClass}}if(iMouseDown&&!lMouseState){curTarget=target;rootParent=curTarget.parentNode;rootSibling=curTarget.nextSibling;mouseOffset=getMouseOffset(target,ev);for(var i=0;i<dragHelper.childNodes.length;i++){dragHelper.removeChild(dragHelper.childNodes[i])}dragHelper.appendChild(curTarget.cloneNode(true));dragHelper.style.display="block";var dragClass=curTarget.getAttribute("dragClass");if(dragClass){dragHelper.firstChild.className=dragClass}dragHelper.firstChild.removeAttribute("DragObj");var dragConts=DragDrops[dragObj];curTarget.setAttribute("startWidth",parseInt(curTarget.offsetWidth));curTarget.setAttribute("startHeight",parseInt(curTarget.offsetHeight));curTarget.style.display="none";for(var i=0;i<dragConts.length;i++){with(dragConts[i]){var pos=getPosition(dragConts[i]);setAttribute("startWidth",parseInt(offsetWidth));setAttribute("startHeight",parseInt(offsetHeight));setAttribute("startLeft",pos.x);setAttribute("startTop",pos.y)}for(var j=0;j<dragConts[i].childNodes.length;j++){with(dragConts[i].childNodes[j]){if((nodeName=="#text")||(dragConts[i].childNodes[j]==curTarget)){continue}var pos=getPosition(dragConts[i].childNodes[j]);setAttribute("startWidth",parseInt(offsetWidth));setAttribute("startHeight",parseInt(offsetHeight));setAttribute("startLeft",pos.x);setAttribute("startTop",pos.y)}}}}}if(curTarget){dragHelper.style.top=(mousePos.y-mouseOffset.y)+"px";dragHelper.style.left=(mousePos.x-mouseOffset.x)+"px";var dragConts=DragDrops[curTarget.getAttribute("DragObj")];var activeCont=null;var xPos=mousePos.x-mouseOffset.x+(parseInt(curTarget.getAttribute("startWidth"))/2);var yPos=mousePos.y-mouseOffset.y+(parseInt(curTarget.getAttribute("startHeight"))/2);for(var i=0;i<dragConts.length;i++){with(dragConts[i]){if((parseInt(getAttribute("startLeft"))<xPos)&&(parseInt(getAttribute("startTop"))<yPos)&&((parseInt(getAttribute("startLeft"))+parseInt(getAttribute("startWidth")))>xPos)&&((parseInt(getAttribute("startTop"))+parseInt(getAttribute("startHeight")))>yPos)){activeCont=dragConts[i];break}}}if(activeCont){var beforeNode=null;for(var i=activeCont.childNodes.length-1;i>=0;i--){with(activeCont.childNodes[i]){if(nodeName=="#text"){continue}if(curTarget!=activeCont.childNodes[i]&&((parseInt(getAttribute("startLeft"))+parseInt(getAttribute("startWidth")))>xPos)&&((parseInt(getAttribute("startTop"))+parseInt(getAttribute("startHeight")))>yPos)){beforeNode=activeCont.childNodes[i]}}}if(beforeNode){if(beforeNode!=curTarget.nextSibling){activeCont.insertBefore(curTarget,beforeNode)}}else{if((curTarget.nextSibling)||(curTarget.parentNode!=activeCont)){activeCont.appendChild(curTarget)}}setTimeout(function(){var contPos=getPosition(activeCont);activeCont.setAttribute("startWidth",parseInt(activeCont.offsetWidth));activeCont.setAttribute("startHeight",parseInt(activeCont.offsetHeight));activeCont.setAttribute("startLeft",contPos.x);activeCont.setAttribute("startTop",contPos.y)},5);if(curTarget.style.display!=""){curTarget.style.display="";curTarget.style.visibility="hidden"}}else{if(curTarget.style.display!="none"){curTarget.style.display="none"}}}lMouseState=iMouseDown;lastTarget=target;if(dragObject){dragObject.style.position="absolute";dragObject.style.top=(mousePos.y-mouseOffset.y)+"px";dragObject.style.left=(mousePos.x-mouseOffset.x)+"px"}lMouseState=iMouseDown;if(curTarget||dragObject){return false}}function mouseUp(A){if(curTarget){dragHelper.style.display="none";if(curTarget.style.display=="none"){if(rootSibling){rootParent.insertBefore(curTarget,rootSibling)}else{rootParent.appendChild(curTarget)}}curTarget.style.display="";curTarget.style.visibility="visible";if(curTarget.getAttribute("delete_checked")==1){document.getElementById("delete_"+curTarget.id).checked=1}updateSortingList()}curTarget=null;dragObject=null;iMouseDown=false}function updateSortingList(){mynode=DragDrops[0][0].firstChild;i=0;while(mynode){if(mynode.nodeName!="#text"){sort_id="sorting_"+mynode.id;if(document.getElementById(sort_id)){document.getElementById(sort_id).value=i;i++}}mynode=mynode.nextSibling}}function mouseDown(A){A=A||window.event;var B=A.target||A.srcElement;iMouseDown=true;if(B.onmousedown||B.getAttribute("DragObj")){return false}}function makeDraggable(A){if(!A){return }A.onmousedown=function(B){dragObject=this;mouseOffset=getMouseOffset(this,B);return false}}function makeClickable(A){if(!A){return }A.onmousedown=function(B){document.getElementById("ClickImage").value=this.name}}function addDropTarget(A,B){A.setAttribute("droptarget",B)}function showTitleBox(B,D){if(!TitleBoxIsOpen){myTitleBox=document.getElementById("titlebox");var C=getPageSize();var A=getPageScroll();var J=(C[2]/2)-230;var E=A[1]+(C[3]/2)-70;myTitleBox.style.left=J+"px";myTitleBox.style.top=E+"px";document.getElementById("titlebox_image").src=pictures[D].replace(/-s.jpg/,"-m.jpg");document.getElementById("titlebox_newtitle").value=document.getElementById("caption_"+B).value;document.getElementById("titlebox_startpic").checked=(document.getElementById("startpic_"+B).value=="1"?true:false);showElement("titlebox");document.getElementById("titlebox_newtitle").focus();TitleBoxIsOpen=1;ActiveItemCode=B}}function hideTitleBox(){hideElement("titlebox");TitleBoxIsOpen=0}function cancelTitleBox(){hideTitleBox()}function trim(A){return A.replace(/^\s*/,"").replace(/\s*$/,"")}function toggled_checkbox(B,C,A){if(document.getElementById("delete_"+B).checked){document.getElementById(B).style.backgroundImage='url("'+root_url+'templates/img/im-delete-s.jpg")';document.getElementById(B).setAttribute("delete_checked",1)}else{document.getElementById(B).style.backgroundImage='url("'+pictures[C]+'")';document.getElementById(B).setAttribute("delete_checked",0)}}function nop(){}function saveTitleBox(){title_box_newtitle=trim(document.getElementById("titlebox_newtitle").value);document.getElementById("caption_"+ActiveItemCode).value=title_box_newtitle;title_box_startpic=document.getElementById("titlebox_startpic").checked;if(title_box_startpic){for(c=0;c<itemcodes.length;c++){document.getElementById("startpic_"+itemcodes[c]).value="0"}document.getElementById("startpic_"+ActiveItemCode).value="1"}title_box_preview=title_box_newtitle.replace(/</g,"&lt;");title_box_preview=title_box_preview.replace(/>/g,"&gt;");if(title_box_newtitle.length==0){document.getElementById("title_preview_"+ActiveItemCode).innerHTML="Titel geben"}else{if(title_box_newtitle.length>12){document.getElementById("title_preview_"+ActiveItemCode).innerHTML=title_box_newtitle.substr(0,12).replace(/</g,"&lt;").replace(/>/g,"&gt;")+"..."}else{document.getElementById("title_preview_"+ActiveItemCode).innerHTML=title_box_preview}}hideTitleBox()}function blogEntryDelete(C){if(confirm(lang.blog.confirmEntryDeletion)){var A=root_url+"community/ajax/blogEntryDelete.php";var B=new Ajax.Request(A,{method:"post",postBody:"&id="+C+"&href="+encodeURIComponent(document.location.href)+"&token="+$("blog_action_token").value+"&formSubmit=blog",onCreate:show_please_wait(),onSuccess:blogEntryDeleteFinished})}}function blogEntryDeleteFinished(B){var A=B.responseText;token=A.substr(0,64);A=A.substr(64);$("innerBlogEntries").innerHTML=A;common.updateToken("blog",token);hide_please_wait()}function blogCategoryDelete(C){if(confirm(lang.blog.confirmCategoryDeletion)){var A=root_url+"community/ajax/blogCategoryDelete.php";var B=new Ajax.Request(A,{method:"post",postBody:"&action=blogCategoryDelete&id="+C+"&token="+$("blogEntryEdit_form_token").value+"&formSubmit=blogEntryEdit_form",onCreate:show_please_wait(),onSuccess:hide_please_wait()})}}function blogCommentDelete(D,A){if(confirm(lang.common.confirmCommentDeletion)){var B=root_url+"community/ajax.php?action=blogcomment_del&commid="+D+"&eid="+A;var C=new Ajax.Request(B,{method:"post",postBody:"",onCreate:blog_comment_delete_status(D),onSuccess:blog_comment_deleted})}}function blog_comment_deleted(A){$("inner_main_content").innerHTML=A.responseText}function blog_comment_delete_status(A){}function popupDialog(N,M,L,K,J,E,D,C,O){if($("popup_dialog")&&$("popup_dialog").style.display=="none"){$("popup_dialog").parentNode.removeChild($("popup_dialog"))}if(!$("popup_dialog")&&typeof N!="undefined"){if(typeof L=="undefined"){L=""}if(typeof K=="undefined"){K=""}if(typeof J=="undefined"){J=""}if(typeof E=="undefined"){E=""}if(typeof D=="undefined"){D=""}if(typeof C=="undefined"){C=460}if(typeof O=="undefined"){O=440}pars="&c2="+encodeURI(M)+"&c3="+encodeURI(L)+"&c4="+encodeURI(K)+"&c5="+encodeURI(J)+"&c6="+encodeURI(E)+"&c7="+encodeURI(D)+"&width="+encodeURI(C)+"&height="+encodeURI(O)+"&token="+$("popup_action_token").value+"&formSubmit=popup";var B=root_url+"community/ajax/popup/"+N+".php";var A=new Ajax.Request(B,{method:"post",postBody:pars,onCreate:show_please_wait(),onSuccess:function(R,Q,P){popupFinished(R,null,C,O)}})}}function popupFinished(originalRequest,content,pwidth,pheight){if(typeof pwidth=="undefined"){pwidth=460}if(typeof pheight=="undefined"){pheight=440}var newDiv=document.createElement("div");var att=document.createAttribute("id");att.nodeValue="popup_dialog";newDiv.setAttributeNode(att);var x=document.getElementsByTagName("body")[0];x.insertBefore(newDiv,x.firstChild);var newI=document.createElement("iframe");var att=document.createAttribute("id");att.nodeValue="popup_dialogi";newI.setAttributeNode(att);var x=document.getElementsByTagName("body")[0];x.insertBefore(newI,x.firstChild);var arrayPageSize=getPageSize();var arrayPageScroll=getPageScroll();var left=(arrayPageSize[2]/2)-(pwidth/2);var top=arrayPageScroll[1]+(arrayPageSize[3]/2)-(pheight/2);Element.setStyle("popup_dialog",$H({left:left+"px"}));Element.setStyle("popup_dialog",$H({top:top+"px"}));Element.setStyle("popup_dialog",$H({padding:"10px"}));Element.setStyle("popup_dialogi",$H({left:left+"px"}));Element.setStyle("popup_dialogi",$H({top:top+"px"}));if(!content){var x=originalRequest.responseText;token=x.substr(0,64);x=x.substr(64)}else{var x=content}obj=$("popup_dialog");obj.style.display="none";obj.innerHTML=x;if($j){$j("#popup_dialog").fadeIn("slow")}else{obj.style.display="block"}obj.style.position="absolute";obj.style["z-index"]="1000";Element.setStyle("popup_dialog",$H({"z-index":1300}));$("popup_dialog").style.zIndex=1300;obj.className="dialog_window_object";obj.style.width=pwidth+"px";if($("popup_dialog")&&$("popup_dialog").firstChild){oha=($("popup_dialog").firstChild.offsetHeight)}if(typeof oha!="undefined"){if(oha>0){obj.style.height=oha+"px"}else{obj.style.height="700px"}}else{obj.style.height="700px"}obj2=$("popup_dialogi");if(drh.ie){obj2.style.display="block"}else{Element.setStyle("popup_dialog",$H({overflow:"auto"}));obj2.style.display="none"}obj2.style.position="absolute";obj2.style["z-index"]="900";Element.setStyle("popup_dialogi",$H({"z-index":900}));$("popup_dialogi").style.zIndex=900;obj2.style.width=(pwidth+5)+"px";obj2.style.border="none";obj2.style.height=obj.style.height;if(typeof resizeblend=="function"){resizeblend(pwidth)}start=0;cpos=0;while(cpos!=-1){cpos=x.indexOf('<script type="text/javascript">',start);if(cpos!=-1){jscode=x.substr(cpos+31);jscode=jscode.substr(0,jscode.indexOf("<\/script>"));eval(jscode);start=cpos+31}}obj.style.display="block";if(!content){common.updateToken("popup",token)}hide_please_wait()}function resizeblend(B){if($("popup_dialog")){$("popup_dialog").style.width=(B?B:460)+"px"}if($("pop_dialog_table")&&$("popup_dialogi")){var A=$("pop_dialog_table").offsetHeight;if(typeof A=="string"&&A.indexOf("px")!=-1){A=A.substr(0,A.indexOf("px")-1)}$("popup_dialogi").style.height=A+"px";Element.setStyle("popup_dialogi",$H({opacity:"0.00"}));$("popup_dialogi").style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)"}}function popupCancel(A){if($j){$j("#popup_dialog").fadeOut("slow",popupCancelCallback)}else{popupCancelCallback()}}function popupCancelCallback(){if(typeof obj=="undefined"){obj=$("popup_dialog")}var A=document.getElementsByTagName("body")[0];A.removeChild(obj);if(typeof obj2=="undefined"){obj2=$("popup_dialogi")}var A=document.getElementsByTagName("body")[0];A.removeChild(obj2)}function updateAndClose(A,B){if(A=="selectLocation"||A=="selectLocation2"||A=="selectLocation3"){ct=($("country")?$("country").options[$("country").selectedIndex].value:null);ctt=($("country")?$("country").options[$("country").selectedIndex].text:null);st=($("state")?$("state").options[$("state").selectedIndex].value:null);stt=($("state")?$("state").options[$("state").selectedIndex].text:null);ci=($("city")?$("city").options[$("city").selectedIndex].value:null);cit=($("city")?$("city").options[$("city").selectedIndex].text:null);un=($("uni")?$("uni").options[$("uni").selectedIndex].value:null);unt=($("uni")?$("uni").options[$("uni").selectedIndex].text:null);if(A=="selectLocation"&&(!ct||ct==0)){alert(lang.popup.chooseCtry)}else{if(A=="selectLocation2"&&(!ct||ct==0)){alert(lang.popup.chooseCtry)}else{text="";if($(B+"_ct")){$(B+"_ct").value=ct;if(ct&&ct!=0){text+=ctt}}if($(B+"_st")){$(B+"_st").value=st;if(ct&&st&&ct!=0&&st!=0){text+=", "+stt}}if($(B+"_ci")){$(B+"_ci").value=ci;if(ct&&st&&ci&&ct!=0&&st!=0&&ci!=0){text+=", "+cit}}if($(B+"_un")){$(B+"_un").value=un;if(ct&&st&&ci&&un&&ct!=0&&st!=0&&ci!=0&&un!=0){text+=", "+unt}}if(A=="selectLocation3"){document.location.href="market.php?ct="+ct+"&st="+st+"&ci="+ci}else{$(B).innerHTML=text;popupCancel()}}}}if(A=="selectProfession"){p1=$("two_level_profession");p1c=p1.options[p1.selectedIndex].value;p1c=(p1c==-1?0:p1c);p2=$("two_level_profession2");p2c=p2.options[p2.selectedIndex].value;p2c=(p2c==-1?0:p2c);p3=$("two_level_profession3");p3c=p3.options[p3.selectedIndex].value;p3c=(p3c==-1?0:p3c);p1m=$("two_level_profession_detail");p1mc=p1m.options[p1m.selectedIndex].value;p1mc=(p1mc==-1?0:p1mc);p2m=$("two_level_profession_detail2");p2mc=p2m.options[p2m.selectedIndex].value;p2mc=(p2mc==-1?0:p2mc);p3m=$("two_level_profession_detail3");p3mc=p3m.options[p3m.selectedIndex].value;p3mc=(p3mc==-1?0:p3mc);if(p1mc){p1t=p1m.options[p1m.selectedIndex].text}else{if(p1c){p1t=p1.options[p1.selectedIndex].text}}if(p2mc){p2t=p2m.options[p2m.selectedIndex].text}else{if(p2c){p2t=p2.options[p2.selectedIndex].text}}if(p3mc){p3t=p3m.options[p3m.selectedIndex].text}else{if(p3c){p3t=p3.options[p3.selectedIndex].text}}text="";if($(B+"_1")&&$(B+"_1c")){$(B+"_1").value=p1mc;$(B+"_1c").value=p1c;if(p1c&&p1c!=0){text+=lang.popup.major+" <b>"+p1t+"</b>"}}if($(B+"_2")&&$(B+"_2c")){$(B+"_2").value=p2mc;$(B+"_2c").value=p2c;if(p2c&&p2c!=0){text+=(p1c&&p1c!=0?", ":"")+lang.popup.minor+" <b>"+p2t+"</b>"}}if($(B+"_3")&&$(B+"_3c")){$(B+"_3").value=p3mc;$(B+"_3c").value=p3c;if(p3c&&p3c!=0){if(p2c&&p2c!=0){text+=", "}else{if(p1c&&p1c!=0){text+=", "}text+=lang.popup.minor+" "}text+="<b>"+p3t+"</b>"}}$(B).innerHTML=text;popupCancel()}}function commentFinished(B){$("comment_div").style.display="none";var A=B.responseText;token=A.substr(0,64);A=A.substr(64);$("innerPinn").innerHTML=A;hide_please_wait();common.updateToken("comment_form",token)}function commentDelete(D,J,K,C,B){if(D==1){text=lang.comment.confirmGBDelete;par="id="+K}if(D==2){text=lang.comment.confirmBlackBoardDelete;par="id="+K}if(D==5){text=lang.comment.confirmPhotoCommentDelete;par="id="+B+"&aid="+C+"&pid="+K}if(D==6){text=lang.comment.confirmBlogCommentDelete;par="id="+C+"&bid="+K}if(confirm(text)){var A=root_url+"community/ajax/comment.php";var E=new Ajax.Request(A,{method:"post",postBody:"&token="+$("comment_form_form_token").value+"&formSubmit=comment_form&delid="+J+"&type="+D+"&"+par,onCreate:show_please_wait(),onSuccess:commentFinished})}}function groupMembership(A,C){var B=root_url+"community/ajax/groupAction.php";var D=new Ajax.Request(B,{method:"post",postBody:"&token="+$("common_action_token").value+"&formSubmit=common&action=enterGroup&gid="+C+"&answered=1"+(A==2?"&no_enter=1":""),onCreate:show_please_wait(),onSuccess:function E(){hide_please_wait()}})}function groupDeleteFinished(A){$("please_wait").style.display="none";document.location.href="groups.php?deleted="+A}function groupMembershipAction(D,B,A,J){var C=root_url+"community/ajax/groupAnchorman.php";var E=new Ajax.Request(C,{method:"post",postBody:"&token="+$("groupMembershipAction_form_form_token").value+"&formSubmit=groupMembershipAction_form&gid="+D+"&pid="+B+"&setStatus="+A+"&offset="+J,onCreate:show_please_wait(),onSuccess:groupMembershipActionFinished})}function groupMembershipActionFinished(B){var A=B.responseText;token=A.substr(0,64);A=A.substr(64);$("innerGroupMembers").innerHTML=A;hide_please_wait();common.updateToken("groupMembershipAction_form",token)}function groupForumEntryDelete(C,E,A){if(confirm("Willst Du diesen Beitrag wirklich löschen?")){var B=root_url+"community/ajax/groupForumEntryDelete.php";var D=new Ajax.Request(B,{method:"post",postBody:"&gid="+C+"&tid="+E+"&eid="+A+"&token="+$("common_action_token").value+"&formSubmit=common",onCreate:show_please_wait(),onSuccess:groupEntryDeleteFinished})}}function groupEntryDeleteFinished(A){hide_please_wait();$("group").innerHTML=A.responseText}function submitGroupDelete(){$("pass_response").value=MD5($("pass").value);$("pass").value="";ajaxAction("groupAction",link_foo)}function setBigPic(A){$("bigpiccontaier").innerHTML='<img src="'+A+'" />';$("pic1").value=A}function tagAdd(E){var A=root_url+"community/ajax/tags.php?";str="";if($("tag_action").value=="blogEntryAddTag"){str+="&eid="+$("extra_to").value;for(i=1;i<200;i++){if($("cat_"+i)&&$("cat_"+i).checked){str+="&c"+i+"="+$("cat_"+i).value}}}var D="&action="+encodeURI($("tag_action").value)+"&to="+encodeURI($("tag_to").value)+"&tag="+encodeURI($("tag").value)+"&token="+$("keyword_action_token").value+"&formSubmit=keyword&tag_id="+encodeURI($("tag_id").value)+($("text_link")?"&link="+encodeURI($("text_link").value):"")+str;var C=new Ajax.Request(A,{method:"post",postBody:D,onCreate:function B(){},onSuccess:tagAddFinished});$("tag_dialog").style.display="none";$("tag_process").style.display="block"}function tagRemove(E,B,L,D){if(D=="1"){what=printf(lang.tagging.remove1,L)}if(D=="2"){what=printf(lang.tagging.remove2,L)}if(D=="3"){what=printf(lang.tagging.remove3,L)}if(D=="4"){what=printf(lang.tagging.remove4,L)}if(confirm(what)){var A=root_url+"community/ajax/tags.php";var K="&action="+encodeURI($("tag_action").value)+"&to="+encodeURI(E)+"&remove=1&token="+$("keyword_action_token").value+"&formSubmit=keyword&tag_id="+encodeURI(B);var J=new Ajax.Request(A,{method:"post",postBody:K,onCreate:function C(){},onSuccess:tagAddFinished});$("tag_dialog").style.display="none";$("tag_process").style.display="block"}}function tagAddFinished(B){$("tag_id").value="";$("tag_dialog").style.display="block";$("tag_process").style.display="none";$("tag").value="";var A=B.responseText;token=A.substr(0,64);A=A.substr(64);$("tag_list").innerHTML=A;common.updateToken("keyword",token);hide_please_wait()}function toggleMailboxActions(){var A=$("action_title");if(A){if(checkSelectedMessages()){A.style.display="block"}else{A.style.display="none"}}}if(typeof lockAjaxAction=="undefined"){lockAjaxAction=false}function selectMailboxMessages(A){var B=null;switch(A){case"all":B=true;break;case"none":B=false;break;case"total":B=$("chkAll").checked;break;default:for(i=0;i<message_ids.length;i++){if($(("chk_"+message_ids[i]+"_flag"))){if($(("chk_"+message_ids[i]+"_flag")).value==A){$(("chk_"+message_ids[i])).checked=true;if($(("chk_"+message_ids[i]+"_2"))){$(("chk_"+message_ids[i]+"_2")).checked=true}}else{$(("chk_"+message_ids[i])).checked=false;if($(("chk_"+message_ids[i]+"_2"))){$(("chk_"+message_ids[i]+"_2")).checked=false}}}}break}if(B!=null){for(i=0;i<message_ids.length;i++){if($(("chk_"+message_ids[i]))){$(("chk_"+message_ids[i])).checked=B;if($(("chk_"+message_ids[i]+"_2"))){$(("chk_"+message_ids[i]+"_2")).checked=B}}}}toggleMailboxActions()}function checkSelectedMessages(){var A=false;for(i=0,j=message_ids.length;i<j;++i){if($("chk_"+message_ids[i])){if($(("chk_"+message_ids[i])).checked==true){A=true;break}}}return A}function submitMailbox(D,B){var A=$("action");$("flag").value=B;switch(D){case"delete":A.value="mailboxDelete";var C=confirm(lang.msg.confirmDelete);break;case"mark":A.value="mailboxMark";var C=true;break}if(C){show_please_wait();ajaxAction("mailboxAction",mailboxFinished)}}function deleteMail(C){var B=confirm(lang.msg.confirmSingleMsg);if(B){var A=$("action");A.value="mailboxDelete";for(i=0,j=message_ids.length;i<j;++i){if($(("chk_"+message_ids[i]))){$(("chk_"+message_ids[i])).checked=false}if(message_ids[i]==C){if($(("chk_"+message_ids[i]))){$(("chk_"+message_ids[i])).checked=true}}}show_please_wait();ajaxAction("mailboxAction",mailboxFinished)}}function mailboxFinished(originalRequest){hide_please_wait();src=originalRequest.responseText;token=src.substr(0,64);src=src.substr(64);common.updateToken("common",token);$("innerMailbox").innerHTML=src;start=0;x=0;while(x!=-1){x=src.indexOf('<script type="text/javascript">',start);if(x!=-1){jscode=src.substr(x+31);jscode=jscode.substr(0,jscode.indexOf("<\/script>"));eval(jscode);start=x+31}}}function mailboxMessageHistoryFinished(B){var A=B.responseText;token=A.substr(0,64);A=A.substr(64);$("innerHistory").innerHTML=A;$("mailboxMessageHistory_process").style.display="none";common.updateToken("",token)}var namecounter=0;var Recipients=Array();function msgFinished(M){var A=document.createElement("div");var J=document.createAttribute("id");J.nodeValue="send_mail_dialog";A.setAttributeNode(J);var L=document.getElementsByTagName("body")[0];L.insertBefore(A,L.firstChild);var C=getPageSize();var D=getPageScroll();var B=C[2]/2-230;var K=D[1]+(C[3]/2)-160;Element.setStyle("send_mail_dialog",$H({left:B+"px"}));Element.setStyle("send_mail_dialog",$H({top:K+"px"}));Element.setStyle("send_mail_dialog",$H({padding:"10px"}));var L=M.responseText;token=L.substr(0,64);L=L.substr(64);obj=$("send_mail_dialog");obj.style.display="none";obj.style.position="absolute";obj.style["z-index"]="1300";if($j){$j("#send_mail_dialog").fadeIn("slow")}else{obj.style.display="block"}Element.setStyle("send_mail_dialog",$H({"z-index":1300}));obj.style.width="460px";$("send_mail_dialog").innerHTML=L;common.updateToken("popup",token);var N={script:"ajax/ajax_tags.php?&json=true&action=showFriends&",varname:"input",json:true,widthPlus:3,widthMinus:3,noresults:lang.msg.typeFriendsName,callback:function(O){if(O){if(!$("recp_"+O.id)){if(namecounter==0){n=document.createElement("br");a=document.createAttribute("id");a.nodeValue="line_break";n.setAttributeNode(a);$("torow").insertBefore(n,$("to_field"))}if(namecounter<11){$("recp").innerHTML=$("recp").innerHTML+(namecounter>0?'<div style="display: inline" class="comma" id="comma_'+O.id+'">,&nbsp;</div> ':"")+'<div style="display: inline" onclick="removeMe(this)" id="recp_'+O.id+'"  onmouseover="Tip(\''+lang.msg.toolTipDelete+'\', DELAY, 0)" ><a href="javascript:link_foo()"><b>'+O.value+"</b></a></div>";namecounter++;Recipients.push(O.id)}else{alert(lang.msg.tenRecMax)}}}$("to_field").value=""}};hide_please_wait();var E=new _bsn.AutoSuggest("to_field",N)}function messageDialog(D,B){if(!$("send_mail_dialog")&&lockAjaxAction==false){Recipients=Array();namecounter=0;if(B){Recipients.push(B);namecounter=1}var A=root_url+"community/ajax/mail.php";var C=new Ajax.Request(A,{method:"post",postBody:"token="+$("popup_action_token").value+"&formSubmit=popup&answer="+(D?D:"")+(B?"&to="+B:""),onCreate:show_please_wait(),onSuccess:msgFinished})}}function messageDelete(C){if(confirm(lang.msg.confirmSingleMsg)){var A=root_url+"community/ajax/mailboxAction.php";show_please_wait();var B=new Ajax.Request(A,{method:"post",postBody:"&action=mailboxDelete&token="+$("common_action_token").value+"&formSubmit=common&chk_"+C+"=1&folderId="+$("folderId").value,onCreate:show_please_wait(),onSuccess:mailboxFinished})}}function dialogCancel(A){if($j){$j("#send_mail_dialog").fadeOut("slow",dialogCancelCallback)}else{dialogCancelCallback()}}function dialogCancelCallback(){var A=document.getElementsByTagName("body")[0];A.removeChild($("send_mail_dialog"))}function removeMe(A){tt_Hide();if($("comma_"+A.id.substr(5))){A.parentNode.removeChild($("comma_"+A.id.substr(5)))}if(Recipients.length==2){if($("comma_"+Recipients[0])){A.parentNode.removeChild($("comma_"+Recipients[0]))}if($("comma_"+Recipients[1])){A.parentNode.removeChild($("comma_"+Recipients[1]))}}A.parentNode.removeChild(A);namecounter--;if(namecounter==0){$("torow").removeChild($("line_break"))}rNew=Array();for(j=0;j<Recipients.length;j++){if(Recipients[j]!=A.id.substr(5)){rNew.push(Recipients[j])}}Recipients=rNew}function checkMailReady(){if(Recipients.length==0){alert(lang.msg.recMiss);return false}if($("body").value.length<2){alert(lang.msg.msgMiss);return false}return true}function doSendMessage(){var C="";for(i=0;i<Recipients.length;i++){C+="&rec[]="+Recipients[i]}$("what_to_do").style.display="none";$("mailboxSend_dialog").style.display="none";$("mailboxSend_process").style.display="block";$("dialog_buttons_do").style.display="none";var A=root_url+"community/ajax/mailboxSend.php";var B=new Ajax.Request(A,{method:"post",postBody:Form.serialize(document.forms.mailboxSend_form)+"&"+C,onComplete:sendMessageFinished})}function sendMessageFinished(A){if(window.location.href.indexOf("?f=2")!=-1){ajaxAction("mailboxAction",mailboxFinished)}}function Avatar(B,A){if(A==2&&!B){B="../templates/img/m-nopic-s.jpg"}if(A==1&&!B){B="../templates/img/f-nopic-s.jpg"}if(!A&&!B){B="../templates/img/u-nopic-s.jpg"}return'<img src="'+B+'" />'}function showMsg(L){var B=$("w_"+L);B.style.display="none";var J=document.createElement("tr");var C=document.createAttribute("id");C.nodeValue="w_"+L+"_child";J.setAttributeNode(C);var C=document.createAttribute("class");C.nodeValue="show";J.setAttributeNode(C);var A=document.createElement("td");var C=document.createAttribute("colspan");C.nodeValue="7";A.setAttributeNode(C);var C=document.createAttribute("id");C.nodeValue="w_"+L+"_child_content";A.setAttributeNode(C);J.appendChild(A);$("msg_all").insertBefore(J,B.nextSibling);var K="messageBoxElement_"+L+"_";content=$("masterElement").innerHTML.replace(/masterElement/gim,K);content=content.replace(/##ID##/g,L);$("w_"+L+"_child_content").innerHTML=content;$(K+"Subject").innerHTML="<b>"+$("msg_"+L+"_subject").innerHTML+"</b>";$(K+"Date").innerHTML=msgDate[L];s=$("chk_"+L+"_flag").value;if(s==0){status=lang.msg.read}if(s==1){status=lang.msg.unread}if(s==2){status=lang.msg.answered}$(K+"Status").innerHTML=status;av=bigAv[L];sex=msgSex[L];if(sex==2&&!av){av="../templates/img/m-nopic-s.jpg"}if(sex==1&&!av){av="../templates/img/f-nopic-s.jpg"}if(!sex&&!av){av="../templates/img/u-nopic-s.jpg"}if(av&&msgPerson[L]){$(K+"Avatar").innerHTML='<a href="profil.php?pid='+msgPerson[L]+'"><img src="'+av+'" /></a>';$(K+"From").innerHTML='<a href="profil.php?pid='+msgPerson[L]+'"><b>'+$("msg_"+L+"_link").innerHTML+"</b></a>"}else{$(K+"From").innerHTML="<b>"+lang.msg.delPerson+"</b>"}s=$("msg_"+L+"_body").innerHTML;$(K+"Body").innerHTML=s;$(K+"Check").innerHTML='<input type="checkbox" id="chk_'+L+'_2" name="chk_'+L+'_2" onclick="$(\'chk_'+L+'\').checked = this.checked;toggleMailboxActions(true);"  value="1" />';$("chk_"+L+"_2").checked=$("chk_"+L).checked;$("dest").innerHTML=($("folderId").value==1?lang.msg.vonB:lang.msg.anB)+" :";$(K+"Buttons").innerHTML=($("folderId").value==1?'<div style="float: left"><a href="javascript:link_foo();" onclick="popupDialog(\'accuse\',7,\''+L+'\')" id="accuse">'+lang.msg.accuseMsg+"</a></div>":"")+'<input type="button" value="'+lang.msg.butClose+'" onclick="hideMsg(\''+L+'\')" class="inputsubmit2"/> '+($("folderId").value==1&&msgPerson[L]?'<input type="button" value="'+lang.msg.butAnswer+'" onclick="messageDialog(\''+L+"', '"+msgPerson[L]+'\');" style="" class="inputsubmit2"/> ':"")+'<input type="button" value="'+lang.msg.butDelete+'" onclick="messageDelete(\''+L+'\',0,0)" class="inputsubmit2"/> ';if($("chk_"+L+"_flag").value==1){lockAjaxAction=true;var D=root_url+"community/ajax/mailboxAction.php";var E=new Ajax.Request(D,{method:"post",postBody:"&action=mailboxMark&token="+$("common_action_token").value+"&formSubmit=common&chk_"+L+"=1&flag=0&silent=1&folderId="+$("folderId").value,onSuccess:hideMsgFinished});$("chk_"+L+"_flag").value=0}if($("unread_counter")){B="";$("unread_counter").style.display="none";if(B.length>2){B=B.substr(B.indexOf("(")+1);B=B.substr(0,B.length-1);B=parseInt(B);B--;alert(B);if(B>0){$("unread_counter").innerHTML="&nbsp;("+B+")"}else{$("unread_counter").innerHTML=""}}}}function hideMsg(A){$("msg_all").removeChild($("w_"+A+"_child"));$("w_"+A).style.display="";$("w_"+A).className="rr"}function hideMsgFinished(A){common.updateToken("common",A.responseText);lockAjaxAction=false}function innerHistoryToggle(){if($("innerHistoryTable").style.display=="block"){$("innerHistoryTable").style.display="none";$("innerHistoryToggleLink").innerHTML=lang.msg.einblenden}else{$("innerHistoryTable").style.display="block";$("innerHistoryToggleLink").innerHTML=lang.msg.ausblenden}}var bigJSLoaded=true;