var Prototype={Version:"1.4.0",ScriptFragment:"(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)",emptyFunction:function(){},K:function($){return $}},Class={create:function(){return function(){this.initialize.apply(this,arguments)}}},Abstract=new Object();Object.extend=function(_,$){for(property in $)_[property]=$[property];return _};Object.inspect=function(_){try{if(_==undefined)return"undefined";if(_==null)return"null";return _.inspect?_.inspect():_.toString()}catch($){if($ instanceof RangeError)return"...";throw $}};Function.prototype.bind=function(){var $=this,_=$A(arguments),A=_.shift();return function(){return $.apply(A,_.concat($A(arguments)))}};Function.prototype.bindAsEventListener=function(_){var $=this;return function(A){return $.call(_,A||window.event)}};Object.extend(Number.prototype,{toColorPart:function(){var $=this.toString(16);if(this<16)return"0"+$;return $},succ:function(){return this+1},times:function($){$R(0,this,true).each($);return this}});var Try={these:function(){var A;for(var B=0;B<arguments.length;B++){var $=arguments[B];try{A=$();break}catch(_){}}return A}},PeriodicalExecuter=Class.create();PeriodicalExecuter.prototype={initialize:function($,_){this.callback=$;this.frequency=_;this.currentlyExecuting=false;this.registerCallback()},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.callback()}finally{this.currentlyExecuting=false}}}};function $(){var _=new Array();for(var A=0;A<arguments.length;A++){var $=arguments[A];if(typeof $=="string")$=document.getElementById($);if(arguments.length==1)return $;_.push($)}return _}Object.extend(String.prototype,{stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"")},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"")},extractScripts:function(){var $=new RegExp(Prototype.ScriptFragment,"img"),_=new RegExp(Prototype.ScriptFragment,"im");return(this.match($)||[]).map(function($){return($.match(_)||["",""])[1]})},evalScripts:function(){return this.extractScripts().map(eval)},escapeHTML:function(){var _=document.createElement("div"),$=document.createTextNode(this);_.appendChild($);return _.innerHTML},unescapeHTML:function(){var $=document.createElement("div");$.innerHTML=this.stripTags();return $.childNodes[0]?$.childNodes[0].nodeValue:""},toQueryParams:function(){var $=this.match(/^\??(.*)$/)[1].split("&");return $.inject({},function(A,_){var $=_.split("=");A[$[0]]=$[1];return A})},toArray:function(){return this.split("")},camelize:function(){var $=this.split("-");if($.length==1)return $[0];var A=this.indexOf("-")==0?$[0].charAt(0).toUpperCase()+$[0].substring(1):$[0];for(var C=1,B=$.length;C<B;C++){var _=$[C];A+=_.charAt(0).toUpperCase()+_.substring(1)}return A},inspect:function(){return"'"+this.replace("\\","\\\\").replace("'","\\'")+"'"}});String.prototype.parseQuery=String.prototype.toQueryParams;var $break=new Object(),$continue=new Object(),Enumerable={each:function(_){var $=0;try{this._each(function(B){try{_(B,$++)}catch(A){if(A!=$continue)throw A}})}catch(A){if(A!=$break)throw A}},all:function(_){var $=true;this.each(function(B,A){$=$&&!!(_||Prototype.K)(B,A);if(!$)throw $break});return $},any:function(_){var $=true;this.each(function(B,A){if($=!!(_||Prototype.K)(B,A))throw $break});return $},collect:function($){var _=[];this.each(function(B,A){_.push($(B,A))});return _},detect:function(_){var $;this.each(function(B,A){if(_(B,A)){$=B;throw $break}});return $},findAll:function($){var _=[];this.each(function(B,A){if($(B,A))_.push(B)});return _},grep:function(A,$){var _=[];this.each(function(C,B){var D=C.toString();if(D.match(A))_.push(($||Prototype.K)(C,B))});return _},include:function($){var _=false;this.each(function(A){if(A==$){_=true;throw $break}});return _},inject:function(_,$){this.each(function(B,A){_=$(_,B,A)});return _},invoke:function(_){var $=$A(arguments).slice(1);return this.collect(function(A){return A[_].apply(A,$)})},max:function(_){var $;this.each(function(B,A){B=(_||Prototype.K)(B,A);if(B>=($||B))$=B});return $},min:function(_){var $;this.each(function(B,A){B=(_||Prototype.K)(B,A);if(B<=($||B))$=B});return $},partition:function(_){var $=[],A=[];this.each(function(C,B){((_||Prototype.K)(C,B)?$:A).push(C)});return[$,A]},pluck:function(_){var $=[];this.each(function(B,A){$.push(B[_])});return $},reject:function($){var _=[];this.each(function(B,A){if(!$(B,A))_.push(B)});return _},sortBy:function($){return this.collect(function(A,_){return{value:A,criteria:$(A,_)}}).sort(function(A,B){var _=A.criteria,$=B.criteria;return _<$?-1:_>$?1:0}).pluck("value")},toArray:function(){return this.collect(Prototype.K)},zip:function(){var $=Prototype.K,_=$A(arguments);if(typeof _.last()=="function")$=_.pop();var A=[this].concat(_).map($A);return this.map(function(B,_){$(B=A.pluck(_));return B})},inspect:function(){return"#<Enumerable:"+this.toArray().inspect()+">"}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray});var $A=Array.from=function(_){if(!_)return[];if(_.toArray)return _.toArray();else{var $=[];for(var A=0;A<_.length;A++)$.push(_[A]);return $}};Object.extend(Array.prototype,Enumerable);Array.prototype._reverse=Array.prototype.reverse;Object.extend(Array.prototype,{_each:function($){for(var _=0;_<this.length;_++)$(this[_])},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($){return $!=undefined||$!=null})},flatten:function(){return this.inject([],function(_,$){return _.concat($.constructor==Array?$.flatten():[$])})},without:function(){var $=$A(arguments);return this.select(function(_){return!$.include(_)})},indexOf:function($){for(var _=0;_<this.length;_++)if(this[_]==$)return _;return-1},reverse:function($){return($!==false?this:this.toArray())._reverse()},shift:function(){var $=this[0];for(var _=0;_<this.length-1;_++)this[_]=this[_+1];this.length--;return $},inspect:function(){return"["+this.map(Object.inspect).join(", ")+"]"}});var Hash={_each:function($){for(key in this){var A=this[key];if(typeof A=="function")continue;var _=[key,A];_.key=key;_.value=A;$(_)}},keys:function(){return this.pluck("key")},values:function(){return this.pluck("value")},merge:function($){return $H($).inject($H(this),function(_,$){_[$.key]=$.value;return _})},toQueryString:function(){return this.map(function($){return $.map(encodeURIComponent).join("=")}).join("&")},inspect:function(){return"#<Hash:{"+this.map(function($){return $.map(Object.inspect).join(": ")}).join(", ")+"}>"}};function $H(_){var $=Object.extend({},_||{});Object.extend($,Enumerable);Object.extend($,Hash);return $}ObjectRange=Class.create();Object.extend(ObjectRange.prototype,Enumerable);Object.extend(ObjectRange.prototype,{initialize:function($,A,_){this.start=$;this.end=A;this.exclusive=_},_each:function($){var _=this.start;do{$(_);_=_.succ()}while(this.include(_))},include:function($){if($<this.start)return false;if(this.exclusive)return $<this.end;return $<=this.end}});var $R=function($,A,_){return new ObjectRange($,A,_)},Ajax={getTransport:function(){return Try.these(function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new XMLHttpRequest()})||false},activeRequestCount:0};Ajax.Responders={responders:[],_each:function($){this.responders._each($)},register:function($){if(!this.include($))this.responders.push($)},unregister:function($){this.responders=this.responders.without($)},dispatch:function(B,A,_,$){this.each(function(D){if(D[B]&&typeof D[B]=="function"){try{D[B].apply(D,[A,_,$])}catch(C){}}})}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=function(){};Ajax.Base.prototype={setOptions:function($){this.options={method:"post",asynchronous:true,parameters:""};Object.extend(this.options,$||{})},responseIsSuccess:function(){return this.transport.status==undefined||this.transport.status==0||(this.transport.status>=200&&this.transport.status<300)},responseIsFailure:function(){return!this.responseIsSuccess()}};Ajax.Request=Class.create();Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];Ajax.Request.prototype=Object.extend(new Ajax.Base(),{initialize:function($,_){this.transport=Ajax.getTransport();this.setOptions(_);this.request($)},request:function(C){var A=this.options.parameters||"";if(typeof currentSpaceName!="undefined"&&currentSpaceName!=""){var B="spacename="+currentSpaceName;A=A+(A==""?"":"&")+"spacename="+currentSpaceName}if(A.length>0)A+="&_=";try{this.url=C;if(this.options.method=="get"&&A.length>0)this.url+=(this.url.match(/\?/)?"&":"?")+A;Ajax.Responders.dispatch("onCreate",this,this.transport);this.transport.open(this.options.method,this.url,this.options.asynchronous);if(this.options.asynchronous){this.transport.onreadystatechange=this.onStateChange.bind(this);setTimeout((function(){this.respondToReadyState(1)}).bind(this),10)}this.setRequestHeaders();var $=this.options.postBody?this.options.postBody:A;this.transport.send(this.options.method=="post"?$:null)}catch(_){this.dispatchException(_)}},setRequestHeaders:function(){var $=["X-Requested-With","XMLHttpRequest","X-Prototype-Version",Prototype.Version];if(this.options.method=="post"){$.push("Content-type","application/x-www-form-urlencoded");if(this.transport.overrideMimeType)$.push("Connection","close")}if(this.options.requestHeaders)$.push.apply($,this.options.requestHeaders);for(var _=0;_<$.length;_+=2)this.transport.setRequestHeader($[_],$[_+1])},onStateChange:function(){var $=this.transport.readyState;if($!=1)this.respondToReadyState(this.transport.readyState)},header:function(_){try{return this.transport.getResponseHeader(_)}catch($){}},evalJSON:function(){try{return eval(this.header("X-JSON"))}catch(e){}},evalResponse:function(){try{return eval(this.transport.responseText)}catch(e){this.dispatchException(e)}},respondToReadyState:function(C){var B=Ajax.Request.Events[C],A=this.transport,_=this.evalJSON();if(B=="Complete"){try{(this.options["on"+this.transport.status]||this.options["on"+(this.responseIsSuccess()?"Success":"Failure")]||Prototype.emptyFunction)(A,_)}catch($){this.dispatchException($)}if((this.header("Content-type")||"").match(/^text\/javascript/i))this.evalResponse()}try{(this.options["on"+B]||Prototype.emptyFunction)(A,_);Ajax.Responders.dispatch("on"+B,this,A,_)}catch($){this.dispatchException($)}if(B=="Complete")this.transport.onreadystatechange=Prototype.emptyFunction},dispatchException:function($){(this.options.onException||Prototype.emptyFunction)(this,$);Ajax.Responders.dispatch("onException",this,$)}});Ajax.Updater=Class.create();Object.extend(Object.extend(Ajax.Updater.prototype,Ajax.Request.prototype),{initialize:function(A,B,C){this.containers={success:A.success?$(A.success):$(A),failure:A.failure?$(A.failure):(A.success?null:$(A))};this.transport=Ajax.getTransport();this.setOptions(C);var _=this.options.onComplete||Prototype.emptyFunction;this.options.onComplete=(function($,A){this.updateContent();_($,A)}).bind(this);this.request(B)},updateContent:function(){var _=this.responseIsSuccess()?this.containers.success:this.containers.failure,$=this.transport.responseText;if(!this.options.evalScripts)$=$.stripScripts();if(_)if(this.options.insertion)new this.options.insertion(_,$);else Element.update(_,$);if(this.responseIsSuccess())if(this.onComplete)setTimeout(this.onComplete.bind(this),10)}});Ajax.PeriodicalUpdater=Class.create();Ajax.PeriodicalUpdater.prototype=Object.extend(new Ajax.Base(),{initialize:function($,_,A){this.setOptions(A);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=$;this.url=_;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments)},updateComplete:function($){if(this.options.decay){this.decay=($.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=$.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)}});document.getElementsByClassName=function(A,B){var _=($(B)||document.body).getElementsByTagName("*");return $A(_).inject([],function(_,$){if($.className.match(new RegExp("(^|\\s)"+A+"(\\s|$)")))_.push($);return _})};if(!window.Element)var Element=new Object();Object.extend(Element,{visible:function(_){return $(_).style.display!="none"},toggle:function(){for(var A=0;A<arguments.length;A++){var _=$(arguments[A]);Element[Element.visible(_)?"hide":"show"](_)}},hide:function(){for(var A=0;A<arguments.length;A++){var _=$(arguments[A]);_.style.display="none"}},show:function(){for(var A=0;A<arguments.length;A++){var _=$(arguments[A]);_.style.display=""}},remove:function(_){_=$(_);_.parentNode.removeChild(_)},update:function(_,A){$(_).innerHTML=A.stripScripts();setTimeout(function(){A.evalScripts()},10)},getHeight:function(_){_=$(_);return _.offsetHeight},classNames:function($){return new Element.ClassNames($)},hasClassName:function(_,A){if(!(_=$(_)))return;return Element.classNames(_).include(A)},addClassName:function(_,A){if(!(_=$(_)))return;return Element.classNames(_).add(A)},removeClassName:function(_,A){if(!(_=$(_)))return;return Element.classNames(_).remove(A)},cleanWhitespace:function(_){_=$(_);for(var B=0;B<_.childNodes.length;B++){var A=_.childNodes[B];if(A.nodeType==3&&!/\S/.test(A.nodeValue))Element.remove(A)}},empty:function(_){return $(_).innerHTML.match(/^\s*$/)},scrollTo:function(_){_=$(_);var B=_.x?_.x:_.offsetLeft,A=_.y?_.y:_.offsetTop;window.scrollTo(B,A)},getStyle:function(_,A){_=$(_);var B=_.style[A.camelize()];if(!B)if(document.defaultView&&document.defaultView.getComputedStyle){var C=document.defaultView.getComputedStyle(_,null);B=C?C.getPropertyValue(A):null}else if(_.currentStyle)B=_.currentStyle[A.camelize()];if(window.opera&&["left","top","right","bottom"].include(A))if(Element.getStyle(_,"position")=="static")B="auto";return B=="auto"?null:B},setStyle:function(_,A){_=$(_);for(name in A)_.style[name.camelize()]=A[name]},getDimensions:function(_){_=$(_);if(Element.getStyle(_,"display")!="none")return{width:_.offsetWidth,height:_.offsetHeight};var D=_.style,E=D.visibility,A=D.position;D.visibility="hidden";D.position="absolute";D.display="";var C=_.clientWidth,B=_.clientHeight;D.display="none";D.position=A;D.visibility=E;return{width:C,height:B}},makePositioned:function(_){_=$(_);var A=Element.getStyle(_,"position");if(A=="static"||!A){_._madePositioned=true;_.style.position="relative";if(window.opera){_.style.top=0;_.style.left=0}}},undoPositioned:function(_){_=$(_);if(_._madePositioned){_._madePositioned=undefined;_.style.position=_.style.top=_.style.left=_.style.bottom=_.style.right=""}},makeClipping:function(_){_=$(_);if(_._overflow)return;_._overflow=_.style.overflow;if((Element.getStyle(_,"overflow")||"visible")!="hidden")_.style.overflow="hidden"},undoClipping:function(_){_=$(_);if(_._overflow)return;_.style.overflow=_._overflow;_._overflow=undefined}});var Toggle=new Object();Toggle.display=Element.toggle;Abstract.Insertion=function($){this.adjacency=$};Abstract.Insertion.prototype={initialize:function(A,_){this.element=$(A);this.content=_.stripScripts();if(this.adjacency&&this.element.insertAdjacentHTML){try{this.element.insertAdjacentHTML(this.adjacency,this.content)}catch(B){if(this.element.tagName.toLowerCase()=="tbody")this.insertContent(this.contentFromAnonymousTable());else throw B}}else{this.range=this.element.ownerDocument.createRange();if(this.initializeRange)this.initializeRange();this.insertContent([this.range.createContextualFragment(this.content)])}setTimeout(function(){_.evalScripts()},10)},contentFromAnonymousTable:function(){var $=document.createElement("div");$.innerHTML="<table><tbody>"+this.content+"</tbody></table>";return $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($){$.each((function($){this.element.parentNode.insertBefore($,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($){$.reverse(false).each((function($){this.element.insertBefore($,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($){$.each((function($){this.element.appendChild($)}).bind(this))}});Insertion.After=Class.create();Insertion.After.prototype=Object.extend(new Abstract.Insertion("afterEnd"),{initializeRange:function(){this.range.setStartAfter(this.element)},insertContent:function($){$.each((function($){this.element.parentNode.insertBefore($,this.element.nextSibling)}).bind(this))}});Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(_){this.element=$(_)},_each:function($){this.element.className.split(/\s+/).select(function($){return $.length>0})._each($)},set:function($){this.element.className=$},add:function($){if(this.include($))return;this.set(this.toArray().concat($).join(" "))},remove:function($){if(!this.include($))return;this.set(this.select(function(_){return _!=$}).join(" "))},toString:function(){return this.toArray().join(" ")}};Object.extend(Element.ClassNames.prototype,Enumerable);var Field={clear:function(){for(var _=0;_<arguments.length;_++)$(arguments[_]).value=""},focus:function(_){$(_).focus()},present:function(){for(var _=0;_<arguments.length;_++)if($(arguments[_]).value=="")return false;return true},select:function(_){$(_).select()},activate:function(_){_=$(_);_.focus();if(_.select)_.select()}},Form={serialize:function(A){var C=Form.getElements($(A)),B=new Array();for(var D=0;D<C.length;D++){var _=Form.Element.serialize(C[D]);if(_)B.push(_)}return B.join("&")},getElements:function(_){_=$(_);var C=new Array();for(tagName in Form.Element.Serializers){var A=_.getElementsByTagName(tagName);for(var B=0;B<A.length;B++)C.push(A[B])}return C},getInputs:function(D,_,E){D=$(D);var C=D.getElementsByTagName("input");if(!_&&!E)return C;var B=new Array();for(var F=0;F<C.length;F++){var A=C[F];if((_&&A.type!=_)||(E&&A.name!=E))continue;B.push(A)}return B},disable:function(_){var A=Form.getElements(_);for(var B=0;B<A.length;B++){var $=A[B];$.blur();$.disabled="true"}},enable:function(_){var A=Form.getElements(_);for(var B=0;B<A.length;B++){var $=A[B];$.disabled=""}},findFirstElement:function($){return Form.getElements($).find(function($){return $.type!="hidden"&&!$.disabled&&["input","select","textarea"].include($.tagName.toLowerCase())})},focusFirstElement:function($){Field.activate(Form.findFirstElement($))},reset:function(_){$(_).reset()}};Form.Element={serialize:function(_){_=$(_);var B=_.tagName.toLowerCase(),A=Form.Element.Serializers[B](_);if(A){var C=encodeURIComponent(A[0]);if(C.length==0)return;if(A[1].constructor!=Array)A[1]=[A[1]];return A[1].map(function($){return C+"="+encodeURIComponent($)}).join("&")}},getValue:function(_){_=$(_);var B=_.tagName.toLowerCase(),A=Form.Element.Serializers[B](_);if(A)return A[1]}};Form.Element.Serializers={input:function($){switch($.type.toLowerCase()){case"submit":case"hidden":case"password":case"text":return Form.Element.Serializers.textarea($);case"checkbox":case"radio":return Form.Element.Serializers.inputSelector($)}return false},inputSelector:function($){if($.checked)return[$.name,$.value]},textarea:function($){return[$.name,$.value]},select:function($){return Form.Element.Serializers[$.type=="select-one"?"selectOne":"selectMany"]($)},selectOne:function($){var A="",B,_=$.selectedIndex;if(_>=0){B=$.options[_];A=B.value;if(!A&&!("value"in B))A=B.text}return[$.name,A]},selectMany:function($){var A=new Array();for(var C=0;C<$.length;C++){var B=$.options[C];if(B.selected){var _=B.value;if(!_&&!("value"in B))_=B.text;A.push(_)}}return[$.name,A]}};var $F=Form.Element.getValue;Abstract.TimedObserver=function(){};Abstract.TimedObserver.prototype={initialize:function(_,B,A){this.frequency=B;this.element=$(_);this.callback=A;this.lastValue=this.getValue();this.registerCallback()},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},onTimerEvent:function(){var $=this.getValue();if(this.lastValue!=$){this.callback(this.element,$);this.lastValue=$}}};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){this.element=$(_);this.callback=A;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=="form")this.registerFormCallbacks();else this.registerCallback(this.element)},onElementEvent:function(){var $=this.getValue();if(this.lastValue!=$){this.callback(this.element,$);this.lastValue=$}},registerFormCallbacks:function(){var $=Form.getElements(this.element);for(var _=0;_<$.length;_++)this.registerCallback($[_])},registerCallback:function($){if($.type)switch($.type.toLowerCase()){case"checkbox":case"radio":Event.observe($,"click",this.onElementEvent.bind(this));break;case"password":case"text":case"textarea":case"select-one":case"select-multiple":Event.observe($,"change",this.onElementEvent.bind(this));break}}};Form.Element.EventObserver=Class.create();Form.Element.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){return Form.Element.getValue(this.element)}});Form.EventObserver=Class.create();Form.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){return Form.serialize(this.element)}});if(!window.Event)var Event=new Object();Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function($){return $.target||$.srcElement},isLeftClick:function($){return((($.which)&&($.which==1))||(($.button)&&($.button==1)))},pointerX:function($){return $.pageX||($.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))},pointerY:function($){return $.pageY||($.clientY+(document.documentElement.scrollTop||document.body.scrollTop))},stop:function($){if($.preventDefault){$.preventDefault();$.stopPropagation()}else{$.returnValue=false;$.cancelBubble=true}},findElement:function(_,A){var $=Event.element(_);while($.parentNode&&(!$.tagName||($.tagName.toUpperCase()!=A.toUpperCase())))$=$.parentNode;return $},observers:false,_observeAndCache:function(_,A,B,$){if(!this.observers)this.observers=[];if(_.addEventListener){this.observers.push([_,A,B,$]);_.addEventListener(A,B,$)}else if(_.attachEvent){this.observers.push([_,A,B,$]);_.attachEvent("on"+A,B)}},unloadCache:function(){if(!Event.observers)return;for(var $=0;$<Event.observers.length;$++){Event.stopObserving.apply(this,Event.observers[$]);Event.observers[$][0]=null}Event.observers=false},observe:function(A,B,C,_){A=$(A);_=_||false;if(B=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||A.attachEvent))B="keydown";this._observeAndCache(A,B,C,_)},stopObserving:function(A,B,C,_){A=$(A);_=_||false;if(B=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||A.detachEvent))B="keydown";if(A.removeEventListener)A.removeEventListener(B,C,_);else if(A.detachEvent)A.detachEvent("on"+B,C)}});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(_){var $=0,A=0;do{$+=_.scrollTop||0;A+=_.scrollLeft||0;_=_.parentNode}while(_)return[A,$]},cumulativeOffset:function(_){var $=0,A=0;do{$+=_.offsetTop||0;A+=_.offsetLeft||0;_=_.offsetParent}while(_)return[A,$]},positionedOffset:function(_){var $=0,A=0;do{$+=_.offsetTop||0;A+=_.offsetLeft||0;_=_.offsetParent;if(_){p=Element.getStyle(_,"position");if(p=="relative"||p=="absolute")break}}while(_)return[A,$]},offsetParent:function($){if($.offsetParent)return $.offsetParent;if($==document.body)return $;while(($=$.parentNode)&&$!=document.body)if(Element.getStyle($,"position")!="static")return $;return document.body},within:function($,A,_){if(this.includeScrollOffsets)return this.withinIncludingScrolloffsets($,A,_);this.xcomp=A;this.ycomp=_;this.offset=this.cumulativeOffset($);return(_>=this.offset[1]&&_<this.offset[1]+$.offsetHeight&&A>=this.offset[0]&&A<this.offset[0]+$.offsetWidth)},withinIncludingScrolloffsets:function($,B,A){var _=this.realOffset($);this.xcomp=B+_[0]-this.deltaX;this.ycomp=A+_[1]-this.deltaY;this.offset=this.cumulativeOffset($);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+$.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+$.offsetWidth)},overlap:function(_,$){if(!_)return 0;if(_=="vertical")return((this.offset[1]+$.offsetHeight)-this.ycomp)/$.offsetHeight;if(_=="horizontal")return((this.offset[0]+$.offsetWidth)-this.xcomp)/$.offsetWidth},clone:function(_,B){_=$(_);B=$(B);B.style.position="absolute";var A=this.cumulativeOffset(_);B.style.top=A[1]+"px";B.style.left=A[0]+"px";B.style.width=_.offsetWidth+"px";B.style.height=_.offsetHeight+"px"},page:function(B){var $=0,A=0,_=B;do{$+=_.offsetTop||0;A+=_.offsetLeft||0;if(_.offsetParent==document.body)if(Element.getStyle(_,"position")=="absolute")break}while(_=_.offsetParent)_=B;do{$-=_.scrollTop||0;A-=_.scrollLeft||0}while(_=_.parentNode)return[A,$]},clone:function(_,C){var E=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});_=$(_);var B=Position.page(_);C=$(C);var A=[0,0],D=null;if(Element.getStyle(C,"position")=="absolute"){D=Position.offsetParent(C);A=Position.page(D)}if(D==document.body){A[0]-=document.body.offsetLeft;A[1]-=document.body.offsetTop}if(E.setLeft)C.style.left=(B[0]-A[0]+E.offsetLeft)+"px";if(E.setTop)C.style.top=(B[1]-A[1]+E.offsetTop)+"px";if(E.setWidth)C.style.width=_.offsetWidth+"px";if(E.setHeight)C.style.height=_.offsetHeight+"px"},absolutize:function(_){_=$(_);if(_.style.position=="absolute")return;Position.prepare();var B=Position.positionedOffset(_),E=B[1],D=B[0],C=_.clientWidth,A=_.clientHeight;_._originalLeft=D-parseFloat(_.style.left||0);_._originalTop=E-parseFloat(_.style.top||0);_._originalWidth=_.style.width;_._originalHeight=_.style.height;_.style.position="absolute";_.style.top=E+"px";_.style.left=D+"px";_.style.width=C+"px";_.style.height=A+"px"},relativize:function(_){_=$(_);if(_.style.position=="relative")return;Position.prepare();_.style.position="relative";var B=parseFloat(_.style.top||0)-(_._originalTop||0),A=parseFloat(_.style.left||0)-(_._originalLeft||0);_.style.top=B+"px";_.style.left=A+"px";_.style.height=_._originalHeight;_.style.width=_._originalWidth}};if(/Konqueror|Safari|KHTML/.test(navigator.userAgent))Position.cumulativeOffset=function(_){var $=0,A=0;do{$+=_.offsetTop||0;A+=_.offsetLeft||0;if(_.offsetParent==document.body)if(Element.getStyle(_,"position")=="absolute")break;_=_.offsetParent}while(_)return[A,$]}