var Prototype={Version:"1.5.0_rc2",BrowserFeatures:{XPath:!!document.evaluate},ScriptFragment:"(?:<script.*?>)((\n|\r|.)*?)(?:</script>)",emptyFunction:function(){},K:function(x){return x;}};var Class={create:function(){return function(){this.initialize.apply(this,arguments);};}};var Abstract=new Object();Object.extend=function(_2,_3){for(var _4 in _3){_2[_4]=_3[_4];}return _2;};Object.extend(Object,{inspect:function(_5){try{if(_5===undefined){return "undefined";}if(_5===null){return "null";}return _5.inspect?_5.inspect():_5.toString();}catch(e){if(e instanceof RangeError){return "...";}throw e;}},keys:function(_6){var _7=[];for(var _8 in _6){_7.push(_8);}return _7;},values:function(_9){var _a=[];for(var _b in _9){_a.push(_9[_b]);}return _a;},clone:function(_c){return Object.extend({},_c);}});Function.prototype.bind=function(){var _d=this,args=$A(arguments),object=args.shift();return function(){return _d.apply(object,args.concat($A(arguments)));};};Function.prototype.bindAsEventListener=function(_e){var _f=this,args=$A(arguments),_e=args.shift();return function(_10){return _f.apply(_e,[(_10||window.event)].concat(args).concat($A(arguments)));};};Object.extend(Number.prototype,{toColorPart:function(){var _11=this.toString(16);if(this<16){return "0"+_11;}return _11;},succ:function(){return this+1;},times:function(_12){$R(0,this,true).each(_12);return this;}});var Try={these:function(){var _13;for(var i=0,length=arguments.length;i<length;i++){var _15=arguments[i];try{_13=_15();break;}catch(e){}}return _13;}};var PeriodicalExecuter=Class.create();PeriodicalExecuter.prototype={initialize:function(_16,_17){this.callback=_16;this.frequency=_17;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.prototype,{gsub:function(_18,_19){var _1a="",source=this,match;_19=arguments.callee.prepareReplacement(_19);while(source.length>0){if(match=source.match(_18)){_1a+=source.slice(0,match.index);_1a+=(_19(match)||"").toString();source=source.slice(match.index+match[0].length);}else{_1a+=source,source="";}}return _1a;},sub:function(_1b,_1c,_1d){_1c=this.gsub.prepareReplacement(_1c);_1d=_1d===undefined?1:_1d;return this.gsub(_1b,function(_1e){if(--_1d<0){return _1e[0];}return _1c(_1e);});},scan:function(_1f,_20){this.gsub(_1f,_20);return this;},truncate:function(_21,_22){_21=_21||30;_22=_22===undefined?"...":_22;return this.length>_21?this.slice(0,_21-_22.length)+_22: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 _23=new RegExp(Prototype.ScriptFragment,"img");var _24=new RegExp(Prototype.ScriptFragment,"im");return (this.match(_23)||[]).map(function(_25){return (_25.match(_24)||["",""])[1];});},evalScripts:function(){return this.extractScripts().map(function(_26){return eval(_26);});},escapeHTML:function(){var div=document.createElement("div");var _28=document.createTextNode(this);div.appendChild(_28);return div.innerHTML;},unescapeHTML:function(){var div=document.createElement("div");div.innerHTML=this.stripTags();return div.childNodes[0]?(div.childNodes.length>1?$A(div.childNodes).inject("",function(_2a,_2b){return _2a+_2b.nodeValue;}):div.childNodes[0].nodeValue):"";},toQueryParams:function(_2c){var _2d=this.strip().match(/([^?#]*)(#.*)?$/);if(!_2d){return {};}return _2d[1].split(_2c||"&").inject({},function(_2e,_2f){if((_2f=_2f.split("="))[0]){var _30=decodeURIComponent(_2f[0]);var _31=_2f[1]?decodeURIComponent(_2f[1]):undefined;if(_2e[_30]!==undefined){if(_2e[_30].constructor!=Array){_2e[_30]=[_2e[_30]];}if(_31){_2e[_30].push(_31);}}else{_2e[_30]=_31;}}return _2e;});},toArray:function(){return this.split("");},camelize:function(){var _32=this.split("-");if(_32.length==1){return _32[0];}var _33=this.indexOf("-")==0?_32[0].charAt(0).toUpperCase()+_32[0].substring(1):_32[0];for(var i=1,length=_32.length;i<length;i++){var s=_32[i];_33+=s.charAt(0).toUpperCase()+s.substring(1);}return _33;},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(_36){var _37=this.replace(/\\/g,"\\\\");if(_36){return "\""+_37.replace(/"/g,"\\\"")+"\"";}else{return "'"+_37.replace(/'/g,"\\'")+"'";}}});String.prototype.gsub.prepareReplacement=function(_38){if(typeof _38=="function"){return _38;}var _39=new Template(_38);return function(_3a){return _39.evaluate(_3a);};};String.prototype.parseQuery=String.prototype.toQueryParams;var Template=Class.create();Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;Template.prototype={initialize:function(_3b,_3c){this.template=_3b.toString();this.pattern=_3c||Template.Pattern;},evaluate:function(_3d){return this.template.gsub(this.pattern,function(_3e){var _3f=_3e[1];if(_3f=="\\"){return _3e[2];}return _3f+(_3d[_3e[3]]||"").toString();});}};var $break=new Object();var $continue=new Object();var Enumerable={each:function(_40){var _41=0;try{this._each(function(_42){try{_40(_42,_41++);}catch(e){if(e!=$continue){throw e;}}});}catch(e){if(e!=$break){throw e;}}return this;},eachSlice:function(_43,_44){var _45=-_43,slices=[],array=this.toArray();while((_45+=_43)<array.length){slices.push(array.slice(_45,_45+_43));}return slices.collect(_44||Prototype.K);},all:function(_46){var _47=true;this.each(function(_48,_49){_47=_47&&!!(_46||Prototype.K)(_48,_49);if(!_47){throw $break;}});return _47;},any:function(_4a){var _4b=false;this.each(function(_4c,_4d){if(_4b=!!(_4a||Prototype.K)(_4c,_4d)){throw $break;}});return _4b;},collect:function(_4e){var _4f=[];this.each(function(_50,_51){_4f.push(_4e(_50,_51));});return _4f;},detect:function(_52){var _53;this.each(function(_54,_55){if(_52(_54,_55)){_53=_54;throw $break;}});return _53;},findAll:function(_56){var _57=[];this.each(function(_58,_59){if(_56(_58,_59)){_57.push(_58);}});return _57;},grep:function(_5a,_5b){var _5c=[];this.each(function(_5d,_5e){var _5f=_5d.toString();if(_5f.match(_5a)){_5c.push((_5b||Prototype.K)(_5d,_5e));}});return _5c;},include:function(_60){var _61=false;this.each(function(_62){if(_62==_60){_61=true;throw $break;}});return _61;},inGroupsOf:function(_63,_64){_64=_64||null;var _65=this.eachSlice(_63);if(_65.length>0){(_63-_65.last().length).times(function(){_65.last().push(_64);});}return _65;},inject:function(_66,_67){this.each(function(_68,_69){_66=_67(_66,_68,_69);});return _66;},invoke:function(_6a){var _6b=$A(arguments).slice(1);return this.collect(function(_6c){return _6c[_6a].apply(_6c,_6b);});},max:function(_6d){var _6e;this.each(function(_6f,_70){_6f=(_6d||Prototype.K)(_6f,_70);if(_6e==undefined||_6f>=_6e){_6e=_6f;}});return _6e;},min:function(_71){var _72;this.each(function(_73,_74){_73=(_71||Prototype.K)(_73,_74);if(_72==undefined||_73<_72){_72=_73;}});return _72;},partition:function(_75){var _76=[],falses=[];this.each(function(_77,_78){((_75||Prototype.K)(_77,_78)?_76:falses).push(_77);});return [_76,falses];},pluck:function(_79){var _7a=[];this.each(function(_7b,_7c){_7a.push(_7b[_79]);});return _7a;},reject:function(_7d){var _7e=[];this.each(function(_7f,_80){if(!_7d(_7f,_80)){_7e.push(_7f);}});return _7e;},sortBy:function(_81){return this.collect(function(_82,_83){return {value:_82,criteria:_81(_82,_83)};}).sort(function(_84,_85){var a=_84.criteria,b=_85.criteria;return a<b?-1:a>b?1:0;}).pluck("value");},toArray:function(){return this.collect(Prototype.K);},zip:function(){var _87=Prototype.K,args=$A(arguments);if(typeof args.last()=="function"){_87=args.pop();}var _88=[this].concat(args).map($A);return this.map(function(_89,_8a){return _87(_88.pluck(_8a));});},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(_8b){if(!_8b){return [];}if(_8b.toArray){return _8b.toArray();}else{var _8c=[];for(var i=0,length=_8b.length;i<length;i++){_8c.push(_8b[i]);}return _8c;}};Object.extend(Array.prototype,Enumerable);if(!Array.prototype._reverse){Array.prototype._reverse=Array.prototype.reverse;}Object.extend(Array.prototype,{_each:function(_8e){for(var i=0,length=this.length;i<length;i++){_8e(this[i]);}},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(_90){return _90!=undefined||_90!=null;});},flatten:function(){return this.inject([],function(_91,_92){return _91.concat(_92&&_92.constructor==Array?_92.flatten():[_92]);});},without:function(){var _93=$A(arguments);return this.select(function(_94){return !_93.include(_94);});},indexOf:function(_95){for(var i=0,length=this.length;i<length;i++){if(this[i]==_95){return i;}}return -1;},reverse:function(_97){return (_97!==false?this:this.toArray())._reverse();},reduce:function(){return this.length>1?this:this[0];},uniq:function(){return this.inject([],function(_98,_99){return _98.include(_99)?_98:_98.concat([_99]);});},clone:function(){return [].concat(this);},inspect:function(){return "["+this.map(Object.inspect).join(", ")+"]";}});Array.prototype.toArray=Array.prototype.clone;if(window.opera){Array.prototype.concat=function(){var _9a=[];for(var i=0,length=this.length;i<length;i++){_9a.push(this[i]);}for(var i=0,length=arguments.length;i<length;i++){if(arguments[i].constructor==Array){for(var j=0,arrayLength=arguments[i].length;j<arrayLength;j++){_9a.push(arguments[i][j]);}}else{_9a.push(arguments[i]);}}return _9a;};}var Hash={_each:function(_9e){for(var key in this){var _a0=this[key];if(typeof _a0=="function"){continue;}var _a1=[key,_a0];_a1.key=key;_a1.value=_a0;_9e(_a1);}},keys:function(){return this.pluck("key");},values:function(){return this.pluck("value");},merge:function(_a2){return $H(_a2).inject(this,function(_a3,_a4){_a3[_a4.key]=_a4.value;return _a3;});},toQueryString:function(){return this.map(function(_a5){if(!_a5.key){return null;}if(_a5.value&&_a5.value.constructor==Array){_a5.value=_a5.value.compact();if(_a5.value.length<2){_a5.value=_a5.value.reduce();}else{var key=encodeURIComponent(_a5.key);return _a5.value.map(function(_a7){return key+"="+encodeURIComponent(_a7);}).join("&");}}if(_a5.value==undefined){_a5[1]="";}return _a5.map(encodeURIComponent).join("=");}).join("&");},inspect:function(){return "#<Hash:{"+this.map(function(_a8){return _a8.map(Object.inspect).join(": ");}).join(", ")+"}>";}};function $H(_a9){var _aa=Object.extend({},_a9||{});Object.extend(_aa,Enumerable);Object.extend(_aa,Hash);return _aa;}ObjectRange=Class.create();Object.extend(ObjectRange.prototype,Enumerable);Object.extend(ObjectRange.prototype,{initialize:function(_ab,end,_ad){this.start=_ab;this.end=end;this.exclusive=_ad;},_each:function(_ae){var _af=this.start;while(this.include(_af)){_ae(_af);_af=_af.succ();}},include:function(_b0){if(_b0<this.start){return false;}if(this.exclusive){return _b0<this.end;}return _b0<=this.end;}});var $R=function(_b1,end,_b3){return new ObjectRange(_b1,end,_b3);};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(_b4){this.responders._each(_b4);},register:function(_b5){if(!this.include(_b5)){this.responders.push(_b5);}},unregister:function(_b6){this.responders=this.responders.without(_b6);},dispatch:function(_b7,_b8,_b9,_ba){this.each(function(_bb){if(typeof _bb[_b7]=="function"){try{_bb[_b7].apply(_bb,[_b8,_b9,_ba]);}catch(e){}}});}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++;},onComplete:function(){Ajax.activeRequestCount--;}});Ajax.Base=function(){};Ajax.Base.prototype={setOptions:function(_bc){this.options={method:"post",asynchronous:true,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",parameters:""};Object.extend(this.options,_bc||{});this.options.method=this.options.method.toLowerCase();this.options.parameters=$H(typeof this.options.parameters=="string"?this.options.parameters.toQueryParams():this.options.parameters);}};Ajax.Request=Class.create();Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];Ajax.Request.prototype=Object.extend(new Ajax.Base(),{_complete:false,initialize:function(url,_be){this.transport=Ajax.getTransport();this.setOptions(_be);this.request(url);},request:function(url){var _c0=this.options.parameters;if(_c0.any()){_c0["_"]="";}if(!["get","post"].include(this.options.method)){_c0["_method"]=this.options.method;this.options.method="post";}this.url=url;if(this.options.method=="get"&&_c0.any()){this.url+=(this.url.indexOf("?")>=0?"&":"?")+_c0.toQueryString();}try{Ajax.Responders.dispatch("onCreate",this,this.transport);this.transport.open(this.options.method.toUpperCase(),this.url,this.options.asynchronous,this.options.username,this.options.password);if(this.options.asynchronous){setTimeout(function(){this.respondToReadyState(1);}.bind(this),10);}this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();var _c1=this.options.method=="post"?(this.options.postBody||_c0.toQueryString()):null;this.transport.send(_c1);if(!this.options.asynchronous&&this.transport.overrideMimeType){this.onStateChange();}}catch(e){this.dispatchException(e);}},onStateChange:function(){var _c2=this.transport.readyState;if(_c2>1&&!((_c2==4)&&this._complete)){this.respondToReadyState(this.transport.readyState);}},setRequestHeaders:function(){var _c3={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,"Accept":"text/javascript, text/html, application/xml, text/xml, */*"};if(this.options.method=="post"){_c3["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){_c3["Connection"]="close";}}if(typeof this.options.requestHeaders=="object"){var _c4=this.options.requestHeaders;if(typeof _c4.push=="function"){for(var i=0,length=_c4.length;i<length;i+=2){_c3[_c4[i]]=_c4[i+1];}}else{$H(_c4).each(function(_c6){_c3[_c6.key]=_c6.value;});}}for(var _c7 in _c3){this.transport.setRequestHeader(_c7,_c3[_c7]);}},success:function(){return !this.transport.status||(this.transport.status>=200&&this.transport.status<300);},respondToReadyState:function(_c8){var _c9=Ajax.Request.Events[_c8];var _ca=this.transport,json=this.evalJSON();if(_c9=="Complete"){try{this._complete=true;(this.options["on"+this.transport.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(_ca,json);}catch(e){this.dispatchException(e);}}try{(this.options["on"+_c9]||Prototype.emptyFunction)(_ca,json);Ajax.Responders.dispatch("on"+_c9,this,_ca,json);}catch(e){this.dispatchException(e);}if(_c9=="Complete"){if((this.getHeader("Content-type")||"").strip().match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i)){this.evalResponse();}this.transport.onreadystatechange=Prototype.emptyFunction;}},getHeader:function(_cb){try{return this.transport.getResponseHeader(_cb);}catch(e){return null;}},evalJSON:function(){try{var _cc=this.getHeader("X-JSON");return _cc?eval("("+_cc+")"):null;}catch(e){return null;}},evalResponse:function(){try{return eval(this.transport.responseText);}catch(e){this.dispatchException(e);}},dispatchException:function(_cd){(this.options.onException||Prototype.emptyFunction)(this,_cd);Ajax.Responders.dispatch("onException",this,_cd);}});Ajax.Updater=Class.create();Object.extend(Object.extend(Ajax.Updater.prototype,Ajax.Request.prototype),{initialize:function(_ce,url,_d0){this.container={success:(_ce.success||_ce),failure:(_ce.failure||(_ce.success?null:_ce))};this.transport=Ajax.getTransport();this.setOptions(_d0);var _d1=this.options.onComplete||Prototype.emptyFunction;this.options.onComplete=(function(_d2,_d3){this.updateContent();_d1(_d2,_d3);}).bind(this);this.request(url);},updateContent:function(){var _d4=this.container[this.success()?"success":"failure"];var _d5=this.transport.responseText;if(!this.options.evalScripts){_d5=_d5.stripScripts();}if(_d4=$(_d4)){if(this.options.insertion){new this.options.insertion(_d4,_d5);}else{_d4.update(_d5);}}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(_d6,url,_d8){this.setOptions(_d8);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=_d6;this.url=url;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(_d9){if(this.options.decay){this.decay=(_d9.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=_d9.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 $(_da){if(arguments.length>1){for(var i=0,elements=[],length=arguments.length;i<length;i++){elements.push($(arguments[i]));}return elements;}if(typeof _da=="string"){_da=document.getElementById(_da);}return Element.extend(_da);}if(Prototype.BrowserFeatures.XPath){document._getElementsByXPath=function(_dc,_dd){var _de=[];var _df=document.evaluate(_dc,$(_dd)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var i=0,length=_df.snapshotLength;i<length;i++){_de.push(_df.snapshotItem(i));}return _de;};}document.getElementsByClassName=function(_e1,_e2){if(Prototype.BrowserFeatures.XPath){var q=".//*[contains(concat(' ', @class, ' '), ' "+_e1+" ')]";return document._getElementsByXPath(q,_e2);}else{var _e4=($(_e2)||document.body).getElementsByTagName("*");var _e5=[],child;for(var i=0,length=_e4.length;i<length;i++){child=_e4[i];if(Element.hasClassName(child,_e1)){_e5.push(Element.extend(child));}}return _e5;}};if(!window.Element){var Element=new Object();}Element.extend=function(_e7){if(!_e7){return;}if(_nativeExtensions||_e7.nodeType==3){return _e7;}if(!_e7._extended&&_e7.tagName&&_e7!=window){var _e8=Object.clone(Element.Methods),cache=Element.extend.cache;if(_e7.tagName=="FORM"){Object.extend(_e8,Form.Methods);}if(["INPUT","TEXTAREA","SELECT"].include(_e7.tagName)){Object.extend(_e8,Form.Element.Methods);}Object.extend(_e8,Element.Methods.Simulated);for(var _e9 in _e8){var _ea=_e8[_e9];if(typeof _ea=="function"&&!(_e9 in _e7)){_e7[_e9]=cache.findOrStore(_ea);}}}_e7._extended=true;return _e7;};Element.extend.cache={findOrStore:function(_eb){return this[_eb]=this[_eb]||function(){return _eb.apply(null,[this].concat($A(arguments)));};}};Element.Methods={visible:function(_ec){return $(_ec).style.display!="none";},toggle:function(_ed){_ed=$(_ed);Element[Element.visible(_ed)?"hide":"show"](_ed);return _ed;},hide:function(_ee){$(_ee).style.display="none";return _ee;},show:function(_ef){$(_ef).style.display="";return _ef;},remove:function(_f0){_f0=$(_f0);_f0.parentNode.removeChild(_f0);return _f0;},update:function(_f1,_f2){_f2=typeof _f2=="undefined"?"":_f2.toString();$(_f1).innerHTML=_f2.stripScripts();setTimeout(function(){_f2.evalScripts();},10);return _f1;},replace:function(_f3,_f4){_f3=$(_f3);if(_f3.outerHTML){_f3.outerHTML=_f4.stripScripts();}else{var _f5=_f3.ownerDocument.createRange();_f5.selectNodeContents(_f3);_f3.parentNode.replaceChild(_f5.createContextualFragment(_f4.stripScripts()),_f3);}setTimeout(function(){_f4.evalScripts();},10);return _f3;},inspect:function(_f6){_f6=$(_f6);var _f7="<"+_f6.tagName.toLowerCase();$H({"id":"id","className":"class"}).each(function(_f8){var _f9=_f8.first(),attribute=_f8.last();var _fa=(_f6[_f9]||"").toString();if(_fa){_f7+=" "+attribute+"="+_fa.inspect(true);}});return _f7+">";},recursivelyCollect:function(_fb,_fc){_fb=$(_fb);var _fd=[];while(_fb=_fb[_fc]){if(_fb.nodeType==1){_fd.push(Element.extend(_fb));}}return _fd;},ancestors:function(_fe){return $(_fe).recursivelyCollect("parentNode");},descendants:function(_ff){_ff=$(_ff);return $A(_ff.getElementsByTagName("*"));},immediateDescendants:function(_100){if(!(_100=$(_100).firstChild)){return [];}while(_100&&_100.nodeType!=1){_100=_100.nextSibling;}if(_100){return [_100].concat($(_100).nextSiblings());}return [];},previousSiblings:function(_101){return $(_101).recursivelyCollect("previousSibling");},nextSiblings:function(_102){return $(_102).recursivelyCollect("nextSibling");},siblings:function(_103){_103=$(_103);return _103.previousSiblings().reverse().concat(_103.nextSiblings());},match:function(_104,_105){_104=$(_104);if(typeof _105=="string"){_105=new Selector(_105);}return _105.match(_104);},up:function(_106,_107,_108){return Selector.findElement($(_106).ancestors(),_107,_108);},down:function(_109,_10a,_10b){return Selector.findElement($(_109).descendants(),_10a,_10b);},previous:function(_10c,_10d,_10e){return Selector.findElement($(_10c).previousSiblings(),_10d,_10e);},next:function(_10f,_110,_111){return Selector.findElement($(_10f).nextSiblings(),_110,_111);},getElementsBySelector:function(){var args=$A(arguments),element=$(args.shift());return Selector.findChildElements(element,args);},getElementsByClassName:function(_113,_114){_113=$(_113);return document.getElementsByClassName(_114,_113);},readAttribute:function(_115,name){return $(_115).getAttribute(name);},getHeight:function(_117){_117=$(_117);return _117.offsetHeight;},classNames:function(_118){return new Element.ClassNames(_118);},hasClassName:function(_119,_11a){if(!(_119=$(_119))){return;}var _11b=_119.className;if(_11b.length==0){return false;}if(_11b==_11a||_11b.match(new RegExp("(^|\\s)"+_11a+"(\\s|$)"))){return true;}return false;},addClassName:function(_11c,_11d){if(!(_11c=$(_11c))){return;}Element.classNames(_11c).add(_11d);return _11c;},removeClassName:function(_11e,_11f){if(!(_11e=$(_11e))){return;}Element.classNames(_11e).remove(_11f);return _11e;},observe:function(){Event.observe.apply(Event,arguments);return $A(arguments).first();},stopObserving:function(){Event.stopObserving.apply(Event,arguments);return $A(arguments).first();},cleanWhitespace:function(_120){_120=$(_120);var node=_120.firstChild;while(node){var _122=node.nextSibling;if(node.nodeType==3&&!/\S/.test(node.nodeValue)){_120.removeChild(node);}node=_122;}return _120;},empty:function(_123){return $(_123).innerHTML.match(/^\s*$/);},childOf:function(_124,_125){_124=$(_124),_125=$(_125);while(_124=_124.parentNode){if(_124==_125){return true;}}return false;},scrollTo:function(_126){_126=$(_126);var x=_126.x?_126.x:_126.offsetLeft,y=_126.y?_126.y:_126.offsetTop;window.scrollTo(x,y);return _126;},getStyle:function(_128,_129){_128=$(_128);var _12a=(_129=="float"?(typeof _128.style.styleFloat!="undefined"?"styleFloat":"cssFloat"):_129);var _12b=_128.style[_12a.camelize()];if(!_12b){if(document.defaultView&&document.defaultView.getComputedStyle){var css=document.defaultView.getComputedStyle(_128,null);_12b=css?css.getPropertyValue(_129):null;}else{if(_128.currentStyle){_12b=_128.currentStyle[_12a.camelize()];}}}if((_12b=="auto")&&["width","height"].include(_129)&&(_128.getStyle("display")!="none")){_12b=_128["offset"+_129.charAt(0).toUpperCase()+_129.substring(1)]+"px";}if(window.opera&&["left","top","right","bottom"].include(_129)){if(Element.getStyle(_128,"position")=="static"){_12b="auto";}}return _12b=="auto"?null:_12b;},setStyle:function(_12d,_12e){_12d=$(_12d);for(var name in _12e){_12d.style[(name=="float"?((typeof _12d.style.styleFloat!="undefined")?"styleFloat":"cssFloat"):name).camelize()]=_12e[name];}return _12d;},getDimensions:function(_130){_130=$(_130);if(Element.getStyle(_130,"display")!="none"){return {width:_130.offsetWidth,height:_130.offsetHeight};}var els=_130.style;var _132=els.visibility;var _133=els.position;els.visibility="hidden";els.position="absolute";els.display="";var _134=_130.clientWidth;var _135=_130.clientHeight;els.display="none";els.position=_133;els.visibility=_132;return {width:_134,height:_135};},makePositioned:function(_136){_136=$(_136);var pos=Element.getStyle(_136,"position");if(pos=="static"||!pos){_136._madePositioned=true;_136.style.position="relative";if(window.opera){_136.style.top=0;_136.style.left=0;}}return _136;},undoPositioned:function(_138){_138=$(_138);if(_138._madePositioned){_138._madePositioned=undefined;_138.style.position=_138.style.top=_138.style.left=_138.style.bottom=_138.style.right="";}return _138;},makeClipping:function(_139){_139=$(_139);if(_139._overflow){return _139;}_139._overflow=_139.style.overflow||"auto";if((Element.getStyle(_139,"overflow")||"visible")!="hidden"){_139.style.overflow="hidden";}return _139;},undoClipping:function(_13a){_13a=$(_13a);if(!_13a._overflow){return _13a;}_13a.style.overflow=_13a._overflow=="auto"?"":_13a._overflow;_13a._overflow=null;return _13a;}};Element.Methods.Simulated={hasAttribute:function(_13b,_13c){return $(_13b).getAttributeNode(_13c).specified;}};if(document.all){Element.Methods.update=function(_13d,html){_13d=$(_13d);html=typeof html=="undefined"?"":html.toString();var _13f=_13d.tagName.toUpperCase();if(["THEAD","TBODY","TR","TD"].include(_13f)){var div=document.createElement("div");switch(_13f){case "THEAD":case "TBODY":div.innerHTML="<table><tbody>"+html.stripScripts()+"</tbody></table>";depth=2;break;case "TR":div.innerHTML="<table><tbody><tr>"+html.stripScripts()+"</tr></tbody></table>";depth=3;break;case "TD":div.innerHTML="<table><tbody><tr><td>"+html.stripScripts()+"</td></tr></tbody></table>";depth=4;}$A(_13d.childNodes).each(function(node){_13d.removeChild(node);});depth.times(function(){div=div.firstChild;});$A(div.childNodes).each(function(node){_13d.appendChild(node);});}else{_13d.innerHTML=html.stripScripts();}setTimeout(function(){html.evalScripts();},10);return _13d;};}Object.extend(Element,Element.Methods);var _nativeExtensions=false;if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){["","Form","Input","TextArea","Select"].each(function(tag){var _144="HTML"+tag+"Element";if(window[_144]){return;}var _145=window[_144]={};_145.prototype=document.createElement(tag?tag.toLowerCase():"div").__proto__;});}Element.addMethods=function(_146){Object.extend(Element.Methods,_146||{});function copy(_147,_148,_149){_149=_149||false;var _14a=Element.extend.cache;for(var _14b in _147){var _14c=_147[_14b];if(!_149||!(_14b in _148)){_148[_14b]=_14a.findOrStore(_14c);}}}if(typeof HTMLElement!="undefined"){copy(Element.Methods,HTMLElement.prototype);copy(Element.Methods.Simulated,HTMLElement.prototype,true);copy(Form.Methods,HTMLFormElement.prototype);[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement].each(function(_14d){copy(Form.Element.Methods,_14d.prototype);});_nativeExtensions=true;}};var Toggle=new Object();Toggle.display=Element.toggle;Abstract.Insertion=function(_14e){this.adjacency=_14e;};Abstract.Insertion.prototype={initialize:function(_14f,_150){this.element=$(_14f);this.content=_150.stripScripts();if(this.adjacency&&this.element.insertAdjacentHTML){try{this.element.insertAdjacentHTML(this.adjacency,this.content);}catch(e){var _151=this.element.tagName.toUpperCase();if(["TBODY","TR"].include(_151)){this.insertContent(this.contentFromAnonymousTable());}else{throw e;}}}else{this.range=this.element.ownerDocument.createRange();if(this.initializeRange){this.initializeRange();}this.insertContent([this.range.createContextualFragment(this.content)]);}setTimeout(function(){_150.evalScripts();},10);},contentFromAnonymousTable:function(){var div=document.createElement("div");div.innerHTML="<table><tbody>"+this.content+"</tbody></table>";return $A(div.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(_153){_153.each((function(_154){this.element.parentNode.insertBefore(_154,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(_155){_155.reverse(false).each((function(_156){this.element.insertBefore(_156,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(_157){_157.each((function(_158){this.element.appendChild(_158);}).bind(this));}});Insertion.After=Class.create();Insertion.After.prototype=Object.extend(new Abstract.Insertion("afterEnd"),{initializeRange:function(){this.range.setStartAfter(this.element);},insertContent:function(_159){_159.each((function(_15a){this.element.parentNode.insertBefore(_15a,this.element.nextSibling);}).bind(this));}});Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(_15b){this.element=$(_15b);},_each:function(_15c){this.element.className.split(/\s+/).select(function(name){return name.length>0;})._each(_15c);},set:function(_15e){this.element.className=_15e;},add:function(_15f){if(this.include(_15f)){return;}this.set($A(this).concat(_15f).join(" "));},remove:function(_160){if(!this.include(_160)){return;}this.set($A(this).without(_160).join(" "));},toString:function(){return $A(this).join(" ");}};Object.extend(Element.ClassNames.prototype,Enumerable);var Selector=Class.create();Selector.prototype={initialize:function(_161){this.params={classNames:[]};this.expression=_161.toString().strip();this.parseExpression();this.compileMatcher();},parseExpression:function(){function abort(_162){throw "Parse error in selector: "+_162;}if(this.expression==""){abort("empty expression");}var _163=this.params,expr=this.expression,match,modifier,clause,rest;while(match=expr.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)){_163.attributes=_163.attributes||[];_163.attributes.push({name:match[2],operator:match[3],value:match[4]||match[5]||""});expr=match[1];}if(expr=="*"){return this.params.wildcard=true;}while(match=expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)){modifier=match[1],clause=match[2],rest=match[3];switch(modifier){case "#":_163.id=clause;break;case ".":_163.classNames.push(clause);break;case "":case undefined:_163.tagName=clause.toUpperCase();break;default:abort(expr.inspect());}expr=rest;}if(expr.length>0){abort(expr.inspect());}},buildMatchExpression:function(){var _164=this.params,conditions=[],clause;if(_164.wildcard){conditions.push("true");}if(clause=_164.id){conditions.push("element.id == "+clause.inspect());}if(clause=_164.tagName){conditions.push("element.tagName.toUpperCase() == "+clause.inspect());}if((clause=_164.classNames).length>0){for(var i=0,length=clause.length;i<length;i++){conditions.push("Element.hasClassName(element, "+clause[i].inspect()+")");}}if(clause=_164.attributes){clause.each(function(_166){var _167="element.getAttribute("+_166.name.inspect()+")";var _168=function(_169){return _167+" && "+_167+".split("+_169.inspect()+")";};switch(_166.operator){case "=":conditions.push(_167+" == "+_166.value.inspect());break;case "~=":conditions.push(_168(" ")+".include("+_166.value.inspect()+")");break;case "|=":conditions.push(_168("-")+".first().toUpperCase() == "+_166.value.toUpperCase().inspect());break;case "!=":conditions.push(_167+" != "+_166.value.inspect());break;case "":case undefined:conditions.push(_167+" != null");break;default:throw "Unknown operator "+_166.operator+" in selector";}});}return conditions.join(" && ");},compileMatcher:function(){this.match=new Function("element","if (!element.tagName) return false; \t\t\treturn "+this.buildMatchExpression());},findElements:function(_16a){var _16b;if(_16b=$(this.params.id)){if(this.match(_16b)){if(!_16a||Element.childOf(_16b,_16a)){return [_16b];}}}_16a=(_16a||document).getElementsByTagName(this.params.tagName||"*");var _16c=[];for(var i=0,length=_16a.length;i<length;i++){if(this.match(_16b=_16a[i])){_16c.push(Element.extend(_16b));}}return _16c;},toString:function(){return this.expression;}};Object.extend(Selector,{matchElements:function(_16e,_16f){var _170=new Selector(_16f);return _16e.select(_170.match.bind(_170)).collect(Element.extend);},findElement:function(_171,_172,_173){if(typeof _172=="number"){_173=_172,_172=false;}return Selector.matchElements(_171,_172||"*")[_173||0];},findChildElements:function(_174,_175){return _175.map(function(_176){return _176.strip().split(/\s+/).inject([null],function(_177,expr){var _179=new Selector(expr);return _177.inject([],function(_17a,_17b){return _17a.concat(_179.findElements(_17b||_174));});});}).flatten();}});function $$(){return Selector.findChildElements(document,$A(arguments));}var Form={reset:function(form){$(form).reset();return form;},serializeElements:function(_17d){return _17d.inject([],function(_17e,_17f){var _180=Form.Element.serialize(_17f);if(_180){_17e.push(_180);}return _17e;}).join("&");}};Form.Methods={serialize:function(form){return Form.serializeElements($(form).getElements());},getElements:function(form){return $A($(form).getElementsByTagName("*")).inject([],function(_183,_184){if(Form.Element.Serializers[_184.tagName.toLowerCase()]){_183.push(Element.extend(_184));}return _183;});},getInputs:function(form,_186,name){form=$(form);var _188=form.getElementsByTagName("input");if(!_186&&!name){return _188;}var _189=new Array();for(var i=0,length=_188.length;i<length;i++){var _18b=_188[i];if((_186&&_18b.type!=_186)||(name&&_18b.name!=name)){continue;}_189.push(Element.extend(_18b));}return _189;},disable:function(form){form=$(form);form.getElements().each(function(_18d){_18d.blur();_18d.disabled="true";});return form;},enable:function(form){form=$(form);form.getElements().each(function(_18f){_18f.disabled="";});return form;},findFirstElement:function(form){return $(form).getElements().find(function(_191){return _191.type!="hidden"&&!_191.disabled&&["input","select","textarea"].include(_191.tagName.toLowerCase());});},focusFirstElement:function(form){form=$(form);form.findFirstElement().activate();return form;}};Object.extend(Form,Form.Methods);Form.Element={focus:function(_193){$(_193).focus();return _193;},select:function(_194){$(_194).select();return _194;}};Form.Element.Methods={serialize:function(_195){_195=$(_195);if(_195.disabled){return "";}var _196=_195.tagName.toLowerCase();var _197=Form.Element.Serializers[_196](_195);if(_197){var key=encodeURIComponent(_197[0]);if(key.length==0){return;}if(_197[1].constructor!=Array){_197[1]=[_197[1]];}return _197[1].map(function(_199){return key+"="+encodeURIComponent(_199);}).join("&");}},getValue:function(_19a){_19a=$(_19a);var _19b=_19a.tagName.toLowerCase();var _19c=Form.Element.Serializers[_19b](_19a);if(_19c){return _19c[1];}},clear:function(_19d){$(_19d).value="";return _19d;},present:function(_19e){return $(_19e).value!="";},activate:function(_19f){_19f=$(_19f);_19f.focus();if(_19f.select&&(_19f.tagName.toLowerCase()!="input"||!["button","reset","submit"].include(_19f.type))){_19f.select();}return _19f;},disable:function(_1a0){_1a0=$(_1a0);_1a0.disabled=true;return _1a0;},enable:function(_1a1){_1a1=$(_1a1);_1a1.blur();_1a1.disabled=false;return _1a1;}};Object.extend(Form.Element,Form.Element.Methods);var Field=Form.Element;Form.Element.Serializers={input:function(_1a2){switch(_1a2.type.toLowerCase()){case "checkbox":case "radio":return Form.Element.Serializers.inputSelector(_1a2);default:return Form.Element.Serializers.textarea(_1a2);}return false;},inputSelector:function(_1a3){if(_1a3.checked){return [_1a3.name,_1a3.value];}},textarea:function(_1a4){return [_1a4.name,_1a4.value];},select:function(_1a5){return Form.Element.Serializers[_1a5.type=="select-one"?"selectOne":"selectMany"](_1a5);},selectOne:function(_1a6){var _1a7="",opt,index=_1a6.selectedIndex;if(index>=0){opt=Element.extend(_1a6.options[index]);_1a7=opt.hasAttribute("value")?opt.value:opt.text;}return [_1a6.name,_1a7];},selectMany:function(_1a8){var _1a9=[];for(var i=0,length=_1a8.length;i<length;i++){var opt=Element.extend(_1a8.options[i]);if(opt.selected){_1a9.push(opt.hasAttribute("value")?opt.value:opt.text);}}return [_1a8.name,_1a9];}};var $F=Form.Element.getValue;Abstract.TimedObserver=function(){};Abstract.TimedObserver.prototype={initialize:function(_1ac,_1ad,_1ae){this.frequency=_1ad;this.element=$(_1ac);this.callback=_1ae;this.lastValue=this.getValue();this.registerCallback();},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000);},onTimerEvent:function(){var _1af=this.getValue();if(this.lastValue!=_1af){this.callback(this.element,_1af);this.lastValue=_1af;}}};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(_1b0,_1b1){this.element=$(_1b0);this.callback=_1b1;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=="form"){this.registerFormCallbacks();}else{this.registerCallback(this.element);}},onElementEvent:function(){var _1b2=this.getValue();if(this.lastValue!=_1b2){this.callback(this.element,_1b2);this.lastValue=_1b2;}},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback.bind(this));},registerCallback:function(_1b3){if(_1b3.type){switch(_1b3.type.toLowerCase()){case "checkbox":case "radio":Event.observe(_1b3,"click",this.onElementEvent.bind(this));break;default:Event.observe(_1b3,"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(_1b4){return _1b4.target||_1b4.srcElement;},isLeftClick:function(_1b5){return (((_1b5.which)&&(_1b5.which==1))||((_1b5.button)&&(_1b5.button==1)));},pointerX:function(_1b6){return _1b6.pageX||(_1b6.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));},pointerY:function(_1b7){return _1b7.pageY||(_1b7.clientY+(document.documentElement.scrollTop||document.body.scrollTop));},stop:function(_1b8){if(_1b8.preventDefault){_1b8.preventDefault();_1b8.stopPropagation();}else{_1b8.returnValue=false;_1b8.cancelBubble=true;}},findElement:function(_1b9,_1ba){var _1bb=Event.element(_1b9);while(_1bb.parentNode&&(!_1bb.tagName||(_1bb.tagName.toUpperCase()!=_1ba.toUpperCase()))){_1bb=_1bb.parentNode;}return _1bb;},observers:false,_observeAndCache:function(_1bc,name,_1be,_1bf){if(!this.observers){this.observers=[];}if(_1bc.addEventListener){this.observers.push([_1bc,name,_1be,_1bf]);_1bc.addEventListener(name,_1be,_1bf);}else{if(_1bc.attachEvent){this.observers.push([_1bc,name,_1be,_1bf]);_1bc.attachEvent("on"+name,_1be);}}},unloadCache:function(){if(!Event.observers){return;}for(var i=0,length=Event.observers.length;i<length;i++){Event.stopObserving.apply(this,Event.observers[i]);Event.observers[i][0]=null;}Event.observers=false;},observe:function(_1c1,name,_1c3,_1c4){_1c1=$(_1c1);_1c4=_1c4||false;if(name=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||_1c1.attachEvent)){name="keydown";}Event._observeAndCache(_1c1,name,_1c3,_1c4);},stopObserving:function(_1c5,name,_1c7,_1c8){_1c5=$(_1c5);_1c8=_1c8||false;if(name=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||_1c5.detachEvent)){name="keydown";}if(_1c5.removeEventListener){_1c5.removeEventListener(name,_1c7,_1c8);}else{if(_1c5.detachEvent){try{_1c5.detachEvent("on"+name,_1c7);}catch(e){}}}}});if(navigator.appVersion.match(/\bMSIE\b/)){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(_1c9){var _1ca=0,valueL=0;do{_1ca+=_1c9.scrollTop||0;valueL+=_1c9.scrollLeft||0;_1c9=_1c9.parentNode;}while(_1c9);return [valueL,_1ca];},cumulativeOffset:function(_1cb){var _1cc=0,valueL=0;do{_1cc+=_1cb.offsetTop||0;valueL+=_1cb.offsetLeft||0;_1cb=_1cb.offsetParent;}while(_1cb);return [valueL,_1cc];},positionedOffset:function(_1cd){var _1ce=0,valueL=0;do{_1ce+=_1cd.offsetTop||0;valueL+=_1cd.offsetLeft||0;_1cd=_1cd.offsetParent;if(_1cd){if(_1cd.tagName=="BODY"){break;}var p=Element.getStyle(_1cd,"position");if(p=="relative"||p=="absolute"){break;}}}while(_1cd);return [valueL,_1ce];},offsetParent:function(_1d0){if(_1d0.offsetParent){return _1d0.offsetParent;}if(_1d0==document.body){return _1d0;}while((_1d0=_1d0.parentNode)&&_1d0!=document.body){if(Element.getStyle(_1d0,"position")!="static"){return _1d0;}}return document.body;},within:function(_1d1,x,y){if(this.includeScrollOffsets){return this.withinIncludingScrolloffsets(_1d1,x,y);}this.xcomp=x;this.ycomp=y;this.offset=this.cumulativeOffset(_1d1);return (y>=this.offset[1]&&y<this.offset[1]+_1d1.offsetHeight&&x>=this.offset[0]&&x<this.offset[0]+_1d1.offsetWidth);},withinIncludingScrolloffsets:function(_1d4,x,y){var _1d7=this.realOffset(_1d4);this.xcomp=x+_1d7[0]-this.deltaX;this.ycomp=y+_1d7[1]-this.deltaY;this.offset=this.cumulativeOffset(_1d4);return (this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+_1d4.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+_1d4.offsetWidth);},overlap:function(mode,_1d9){if(!mode){return 0;}if(mode=="vertical"){return ((this.offset[1]+_1d9.offsetHeight)-this.ycomp)/_1d9.offsetHeight;}if(mode=="horizontal"){return ((this.offset[0]+_1d9.offsetWidth)-this.xcomp)/_1d9.offsetWidth;}},page:function(_1da){var _1db=0,valueL=0;var _1dc=_1da;do{_1db+=_1dc.offsetTop||0;valueL+=_1dc.offsetLeft||0;if(_1dc.offsetParent==document.body){if(Element.getStyle(_1dc,"position")=="absolute"){break;}}}while(_1dc=_1dc.offsetParent);_1dc=_1da;do{if(!window.opera||_1dc.tagName=="BODY"){_1db-=_1dc.scrollTop||0;valueL-=_1dc.scrollLeft||0;}}while(_1dc=_1dc.parentNode);return [valueL,_1db];},clone:function(_1dd,_1de){var _1df=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});_1dd=$(_1dd);var p=Position.page(_1dd);_1de=$(_1de);var _1e1=[0,0];var _1e2=null;if(Element.getStyle(_1de,"position")=="absolute"){_1e2=Position.offsetParent(_1de);_1e1=Position.page(_1e2);}if(_1e2==document.body){_1e1[0]-=document.body.offsetLeft;_1e1[1]-=document.body.offsetTop;}if(_1df.setLeft){_1de.style.left=(p[0]-_1e1[0]+_1df.offsetLeft)+"px";}if(_1df.setTop){_1de.style.top=(p[1]-_1e1[1]+_1df.offsetTop)+"px";}if(_1df.setWidth){_1de.style.width=_1dd.offsetWidth+"px";}if(_1df.setHeight){_1de.style.height=_1dd.offsetHeight+"px";}},absolutize:function(_1e3){_1e3=$(_1e3);if(_1e3.style.position=="absolute"){return;}Position.prepare();var _1e4=Position.positionedOffset(_1e3);var top=_1e4[1];var left=_1e4[0];var _1e7=_1e3.clientWidth;var _1e8=_1e3.clientHeight;_1e3._originalLeft=left-parseFloat(_1e3.style.left||0);_1e3._originalTop=top-parseFloat(_1e3.style.top||0);_1e3._originalWidth=_1e3.style.width;_1e3._originalHeight=_1e3.style.height;_1e3.style.position="absolute";_1e3.style.top=top+"px";_1e3.style.left=left+"px";_1e3.style.width=_1e7+"px";_1e3.style.height=_1e8+"px";},relativize:function(_1e9){_1e9=$(_1e9);if(_1e9.style.position=="relative"){return;}Position.prepare();_1e9.style.position="relative";var top=parseFloat(_1e9.style.top||0)-(_1e9._originalTop||0);var left=parseFloat(_1e9.style.left||0)-(_1e9._originalLeft||0);_1e9.style.top=top+"px";_1e9.style.left=left+"px";_1e9.style.height=_1e9._originalHeight;_1e9.style.width=_1e9._originalWidth;}};if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){Position.cumulativeOffset=function(_1ec){var _1ed=0,valueL=0;do{_1ed+=_1ec.offsetTop||0;valueL+=_1ec.offsetLeft||0;if(_1ec.offsetParent==document.body){if(Element.getStyle(_1ec,"position")=="absolute"){break;}}_1ec=_1ec.offsetParent;}while(_1ec);return [valueL,_1ed];};}Element.addMethods();
