var Prototype={Version:"1.5.0",BrowserFeatures:{XPath:!!document.evaluate},ScriptFragment:"(?:<script.*?>)((\n|\r|.)*?)(?:</script>)",emptyFunction:function(){},K:function(i){return i;}};var Class={create:function(){return function(){this.initialize.apply(this,arguments);};}};var Abstract=new Object();Object.extend=function(i,R){for(var n in R){i[n]=R[n];}return i;};Object.extend(Object,{inspect:function(i){try{if(i===undefined){return "undefined";}if(i===null){return "null";}return i.inspect?i.inspect():i.toString();}catch(n){if(n instanceof RangeError){return "...";}throw n;}},keys:function(i){var n=[];for(var R in i){n.push(R);}return n;},values:function(n){var i=[];for(var R in n){i.push(n[R]);}return i;},clone:function(i){return Object.extend({},i);}});Function.prototype.bind=function(){var i=this,R=$A(arguments),n=R.shift();return function(){return i.apply(n,R.concat($A(arguments)));};};Function.prototype.bindAsEventListener=function(R){var i=this,n=$A(arguments),R=n.shift();return function(Q){return i.apply(R,[(Q||window.event)].concat(n).concat($A(arguments)));};};Object.extend(Number.prototype,{toColorPart:function(){var i=this.toString(16);if(this<16){return "0"+i;}return i;},succ:function(){return this+1;},times:function(i){$R(0,this,true).each(i);return this;}});var Try={these:function(){var Q;for(var R=0,x=arguments.length;R<x;R++){var n=arguments[R];try{Q=n();break;}catch(c){}}return Q;}};var PeriodicalExecuter=Class.create();PeriodicalExecuter.prototype={initialize:function(n,i){this.callback=n;this.frequency=i;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;}}}};String.interpret=function(i){return i==null?"":String(i);};Object.extend(String.prototype,{gsub:function(x,R){var i="",Q=this,n;R=arguments.callee.prepareReplacement(R);while(Q.length>0){if(n=Q.match(x)){i+=Q.slice(0,n.index);i+=String.interpret(R(n));Q=Q.slice(n.index+n[0].length);}else{i+=Q,Q="";}}return i;},sub:function(R,i,n){i=this.gsub.prepareReplacement(i);n=n===undefined?1:n;return this.gsub(R,function(Q){if(--n<0){return Q[0];}return i(Q);});},scan:function(n,i){this.gsub(n,i);return this;},truncate:function(n,i){n=n||30;i=i===undefined?"...":i;return this.length>n?this.slice(0,n-i.length)+i: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 n=new RegExp(Prototype.ScriptFragment,"img");var i=new RegExp(Prototype.ScriptFragment,"im");return (this.match(n)||[]).map(function(R){return (R.match(i)||["",""])[1];});},evalScripts:function(){return this.extractScripts().map(function(script){return eval(script);});},escapeHTML:function(){var n=document.createElement("div");var i=document.createTextNode(this);n.appendChild(i);return n.innerHTML;},unescapeHTML:function(){var i=document.createElement("div");i.innerHTML=this.stripTags();return i.childNodes[0]?(i.childNodes.length>1?$A(i.childNodes).inject("",function(n,R){return n+R.nodeValue;}):i.childNodes[0].nodeValue):"";},toQueryParams:function(n){var i=this.strip().match(/([^?#]*)(#.*)?$/);if(!i){return {};}return i[1].split(n||"&").inject({},function(x,c){if((c=c.split("="))[0]){var R=decodeURIComponent(c[0]);var Q=c[1]?decodeURIComponent(c[1]):undefined;if(x[R]!==undefined){if(x[R].constructor!=Array){x[R]=[x[R]];}if(Q){x[R].push(Q);}}else{x[R]=Q;}}return x;});},toArray:function(){return this.split("");},succ:function(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1);},camelize:function(){var x=this.split("-"),n=x.length;if(n==1){return x[0];}var Q=this.charAt(0)=="-"?x[0].charAt(0).toUpperCase()+x[0].substring(1):x[0];for(var R=1;R<n;R++){Q+=x[R].charAt(0).toUpperCase()+x[R].substring(1);}return Q;},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(n){var i=this.replace(/\\/g,"\\\\");if(n){return "\""+i.replace(/"/g,"\\\"")+"\"";}else{return "'"+i.replace(/'/g,"\\'")+"'";}}});String.prototype.gsub.prepareReplacement=function(n){if(typeof n=="function"){return n;}var i=new Template(n);return function(R){return i.evaluate(R);};};String.prototype.parseQuery=String.prototype.toQueryParams;var Template=Class.create();Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;Template.prototype={initialize:function(i,n){this.template=i.toString();this.pattern=n||Template.Pattern;},evaluate:function(i){return this.template.gsub(this.pattern,function(n){var R=n[1];if(R=="\\"){return n[2];}return R+String.interpret(i[n[3]]);});}};var $break=new Object();var $continue=new Object();var Enumerable={each:function(n){var i=0;try{this._each(function(Q){try{n(Q,i++);}catch(x){if(x!=$continue){throw x;}}});}catch(R){if(R!=$break){throw R;}}return this;},eachSlice:function(R,n){var i=-R,Q=[],x=this.toArray();while((i+=R)<x.length){Q.push(x.slice(i,i+R));}return Q.map(n);},all:function(n){var i=true;this.each(function(Q,R){i=i&&!!(n||Prototype.K)(Q,R);if(!i){throw $break;}});return i;},any:function(n){var i=false;this.each(function(Q,R){if(i=!!(n||Prototype.K)(Q,R)){throw $break;}});return i;},collect:function(n){var i=[];this.each(function(Q,R){i.push((n||Prototype.K)(Q,R));});return i;},detect:function(n){var i;this.each(function(Q,R){if(n(Q,R)){i=Q;throw $break;}});return i;},findAll:function(n){var i=[];this.each(function(Q,R){if(n(Q,R)){i.push(Q);}});return i;},grep:function(R,n){var i=[];this.each(function(c,x){var Q=c.toString();if(Q.match(R)){i.push((n||Prototype.K)(c,x));}});return i;},include:function(i){var n=false;this.each(function(R){if(R==i){n=true;throw $break;}});return n;},inGroupsOf:function(n,i){i=i===undefined?null:i;return this.eachSlice(n,function(R){while(R.length<n){R.push(i);}return R;});},inject:function(i,n){this.each(function(Q,R){i=n(i,Q,R);});return i;},invoke:function(n){var i=$A(arguments).slice(1);return this.map(function(R){return R[n].apply(R,i);});},max:function(n){var i;this.each(function(Q,R){Q=(n||Prototype.K)(Q,R);if(i==undefined||Q>=i){i=Q;}});return i;},min:function(n){var i;this.each(function(Q,R){Q=(n||Prototype.K)(Q,R);if(i==undefined||Q<i){i=Q;}});return i;},partition:function(R){var n=[],i=[];this.each(function(x,Q){((R||Prototype.K)(x,Q)?n:i).push(x);});return [n,i];},pluck:function(n){var i=[];this.each(function(Q,R){i.push(Q[n]);});return i;},reject:function(n){var i=[];this.each(function(Q,R){if(!n(Q,R)){i.push(Q);}});return i;},sortBy:function(i){return this.map(function(R,n){return {value:R,criteria:i(R,n)};}).sort(function(x,Q){var R=x.criteria,n=Q.criteria;return R<n?-1:R>n?1:0;}).pluck("value");},toArray:function(){return this.map();},zip:function(){var n=Prototype.K,i=$A(arguments);if(typeof i.last()=="function"){n=i.pop();}var R=[this].concat(i).map($A);return this.map(function(x,Q){return n(R.pluck(Q));});},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});var $A=Array.from=function(x){if(!x){return [];}if(x.toArray){return x.toArray();}else{var R=[];for(var n=0,Q=x.length;n<Q;n++){R.push(x[n]);}return R;}};Object.extend(Array.prototype,Enumerable);if(!Array.prototype._reverse){Array.prototype._reverse=Array.prototype.reverse;}Object.extend(Array.prototype,{_each:function(R){for(var n=0,Q=this.length;n<Q;n++){R(this[n]);}},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(i){return i!=null;});},flatten:function(){return this.inject([],function(n,i){return n.concat(i&&i.constructor==Array?i.flatten():[i]);});},without:function(){var i=$A(arguments);return this.select(function(n){return !i.include(n);});},indexOf:function(n){for(var R=0,Q=this.length;R<Q;R++){if(this[R]==n){return R;}}return -1;},reverse:function(i){return (i!==false?this:this.toArray())._reverse();},reduce:function(){return this.length>1?this:this[0];},uniq:function(){return this.inject([],function(n,i){return n.include(i)?n:n.concat([i]);});},clone:function(){return [].concat(this);},size:function(){return this.length;},inspect:function(){return "["+this.map(Object.inspect).join(", ")+"]";}});Array.prototype.toArray=Array.prototype.clone;function $w(i){i=i.strip();return i?i.split(/\s+/):[];}if(window.opera){Array.prototype.concat=function(){var c=[];for(var R=0,Q=this.length;R<Q;R++){c.push(this[R]);}for(var R=0,Q=arguments.length;R<Q;R++){if(arguments[R].constructor==Array){for(var n=0,x=arguments[R].length;n<x;n++){c.push(arguments[R][n]);}}else{c.push(arguments[R]);}}return c;};}var Hash=function(i){Object.extend(this,i||{});};Object.extend(Hash,{toQueryString:function(n){var i=[];this.prototype._each.call(n,function(Q){if(!Q.key){return ;}if(Q.value&&Q.value.constructor==Array){var R=Q.value.compact();if(R.length<2){Q.value=R.reduce();}else{key=encodeURIComponent(Q.key);R.each(function(x){x=x!=undefined?encodeURIComponent(x):"";i.push(key+"="+encodeURIComponent(x));});return ;}}if(Q.value==undefined){Q[1]="";}i.push(Q.map(encodeURIComponent).join("="));});return i.join("&");}});Object.extend(Hash.prototype,Enumerable);Object.extend(Hash.prototype,{_each:function(n){for(var i in this){var R=this[i];if(R&&R==Hash.prototype[i]){continue;}var Q=[i,R];Q.key=i;Q.value=R;n(Q);}},keys:function(){return this.pluck("key");},values:function(){return this.pluck("value");},merge:function(i){return $H(i).inject(this,function(n,R){n[R.key]=R.value;return n;});},remove:function(){var n;for(var R=0,Q=arguments.length;R<Q;R++){var x=this[arguments[R]];if(x!==undefined){if(n===undefined){n=x;}else{if(n.constructor!=Array){n=[n];}n.push(x);}}delete this[arguments[R]];}return n;},toQueryString:function(){return Hash.toQueryString(this);},inspect:function(){return "#<Hash:{"+this.map(function(i){return i.map(Object.inspect).join(": ");}).join(", ")+"}>";}});function $H(i){if(i&&i.constructor==Hash){return i;}return new Hash(i);}ObjectRange=Class.create();Object.extend(ObjectRange.prototype,Enumerable);Object.extend(ObjectRange.prototype,{initialize:function(R,i,n){this.start=R;this.end=i;this.exclusive=n;},_each:function(i){var n=this.start;while(this.include(n)){i(n);n=n.succ();}},include:function(i){if(i<this.start){return false;}if(this.exclusive){return i<this.end;}return i<=this.end;}});var $R=function(R,i,n){return new ObjectRange(R,i,n);};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(i){this.responders._each(i);},register:function(i){if(!this.include(i)){this.responders.push(i);}},unregister:function(i){this.responders=this.responders.without(i);},dispatch:function(Q,n,R,i){this.each(function(x){if(typeof x[Q]=="function"){try{x[Q].apply(x,[n,R,i]);}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(i){this.options={method:"post",asynchronous:true,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",parameters:""};Object.extend(this.options,i||{});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(n,i){this.transport=Ajax.getTransport();this.setOptions(i);this.request(n);},request:function(n){this.url=n;this.method=this.options.method;var Q=this.options.parameters;if(!["get","post"].include(this.method)){Q["_method"]=this.method;this.method="post";}Q=Hash.toQueryString(Q);if(Q&&/Konqueror|Safari|KHTML/.test(navigator.userAgent)){Q+="&_=";}if(this.method=="get"&&Q){this.url+=(this.url.indexOf("?")>-1?"&":"?")+Q;}try{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();var i=this.method=="post"?(this.options.postBody||Q):null;this.transport.send(i);if(!this.options.asynchronous&&this.transport.overrideMimeType){this.onStateChange();}}catch(R){this.dispatchException(R);}},onStateChange:function(){var i=this.transport.readyState;if(i>1&&!((i==4)&&this._complete)){this.respondToReadyState(this.transport.readyState);}},setRequestHeaders:function(){var c={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,"Accept":"text/javascript, text/html, application/xml, text/xml, */*"};if(this.method=="post"){c["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){c["Connection"]="close";}}if(typeof this.options.requestHeaders=="object"){var Q=this.options.requestHeaders;if(typeof Q.push=="function"){for(var R=0,x=Q.length;R<x;R+=2){c[Q[R]]=Q[R+1];}}else{$H(Q).each(function(i){c[i.key]=i.value;});}}for(var n in c){this.transport.setRequestHeader(n,c[n]);}},success:function(){return !this.transport.status||(this.transport.status>=200&&this.transport.status<300);},respondToReadyState:function(i){var R=Ajax.Request.Events[i];var x=this.transport,n=this.evalJSON();if(R=="Complete"){try{this._complete=true;(this.options["on"+this.transport.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(x,n);}catch(Q){this.dispatchException(Q);}if((this.getHeader("Content-type")||"text/javascript").strip().match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i)){this.evalResponse();}}try{(this.options["on"+R]||Prototype.emptyFunction)(x,n);Ajax.Responders.dispatch("on"+R,this,x,n);}catch(Q){this.dispatchException(Q);}if(R=="Complete"){this.transport.onreadystatechange=Prototype.emptyFunction;}},getHeader:function(i){try{return this.transport.getResponseHeader(i);}catch(n){return null;}},evalJSON:function(){try{var json=this.getHeader("X-JSON");return json?eval("("+json+")"):null;}catch(e){return null;}},evalResponse:function(){try{return eval(this.transport.responseText);}catch(e){this.dispatchException(e);}},dispatchException:function(i){(this.options.onException||Prototype.emptyFunction)(this,i);Ajax.Responders.dispatch("onException",this,i);}});Ajax.Updater=Class.create();Object.extend(Object.extend(Ajax.Updater.prototype,Ajax.Request.prototype),{initialize:function(i,R,n){this.container={success:(i.success||i),failure:(i.failure||(i.success?null:i))};this.transport=Ajax.getTransport();this.setOptions(n);var Q=this.options.onComplete||Prototype.emptyFunction;this.options.onComplete=(function(c,x){this.updateContent();Q(c,x);}).bind(this);this.request(R);},updateContent:function(){var n=this.container[this.success()?"success":"failure"];var i=this.transport.responseText;if(!this.options.evalScripts){i=i.stripScripts();}if(n=$(n)){if(this.options.insertion){new this.options.insertion(n,i);}else{n.update(i);}}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(i,R,n){this.setOptions(n);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=i;this.url=R;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(i){if(this.options.decay){this.decay=(i.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=i.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 $(R){if(arguments.length>1){for(var n=0,x=[],Q=arguments.length;n<Q;n++){x.push($(arguments[n]));}return x;}if(typeof R=="string"){R=document.getElementById(R);}return Element.extend(R);}if(Prototype.BrowserFeatures.XPath){document._getElementsByXPath=function(D,n){var Q=[];var c=document.evaluate(D,$(n)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var R=0,x=c.snapshotLength;R<x;R++){Q.push(c.snapshotItem(R));}return Q;};}document.getElementsByClassName=function(x,n){if(Prototype.BrowserFeatures.XPath){var f=".//*[contains(concat(' ', @class, ' '), ' "+x+" ')]";return document._getElementsByXPath(f,n);}else{var Q=($(n)||document.body).getElementsByTagName("*");var D=[],j;for(var R=0,c=Q.length;R<c;R++){j=Q[R];if(Element.hasClassName(j,x)){D.push(Element.extend(j));}}return D;}};if(!window.Element){var Element=new Object();}Element.extend=function(R){if(!R||_nativeExtensions||R.nodeType==3){return R;}if(!R._extended&&R.tagName&&R!=window){var n=Object.clone(Element.Methods),i=Element.extend.cache;if(R.tagName=="FORM"){Object.extend(n,Form.Methods);}if(["INPUT","TEXTAREA","SELECT"].include(R.tagName)){Object.extend(n,Form.Element.Methods);}Object.extend(n,Element.Methods.Simulated);for(var x in n){var Q=n[x];if(typeof Q=="function"&&!(x in R)){R[x]=i.findOrStore(Q);}}}R._extended=true;return R;};Element.extend.cache={findOrStore:function(i){return this[i]=this[i]||function(){return i.apply(null,[this].concat($A(arguments)));};}};Element.Methods={visible:function(i){return $(i).style.display!="none";},toggle:function(i){i=$(i);Element[Element.visible(i)?"hide":"show"](i);return i;},hide:function(i){$(i).style.display="none";return i;},show:function(i){$(i).style.display="";return i;},remove:function(i){i=$(i);i.parentNode.removeChild(i);return i;},update:function(n,i){i=typeof i=="undefined"?"":i.toString();$(n).innerHTML=i.stripScripts();setTimeout(function(){i.evalScripts();},10);return n;},replace:function(R,n){R=$(R);n=typeof n=="undefined"?"":n.toString();if(R.outerHTML){R.outerHTML=n.stripScripts();}else{var i=R.ownerDocument.createRange();i.selectNodeContents(R);R.parentNode.replaceChild(i.createContextualFragment(n.stripScripts()),R);}setTimeout(function(){n.evalScripts();},10);return R;},inspect:function(n){n=$(n);var i="<"+n.tagName.toLowerCase();$H({"id":"id","className":"class"}).each(function(c){var x=c.first(),R=c.last();var Q=(n[x]||"").toString();if(Q){i+=" "+R+"="+Q.inspect(true);}});return i+">";},recursivelyCollect:function(i,R){i=$(i);var n=[];while(i=i[R]){if(i.nodeType==1){n.push(Element.extend(i));}}return n;},ancestors:function(i){return $(i).recursivelyCollect("parentNode");},descendants:function(i){return $A($(i).getElementsByTagName("*"));},immediateDescendants:function(i){if(!(i=$(i).firstChild)){return [];}while(i&&i.nodeType!=1){i=i.nextSibling;}if(i){return [i].concat($(i).nextSiblings());}return [];},previousSiblings:function(i){return $(i).recursivelyCollect("previousSibling");},nextSiblings:function(i){return $(i).recursivelyCollect("nextSibling");},siblings:function(i){i=$(i);return i.previousSiblings().reverse().concat(i.nextSiblings());},match:function(n,i){if(typeof i=="string"){i=new Selector(i);}return i.match($(n));},up:function(n,R,i){return Selector.findElement($(n).ancestors(),R,i);},down:function(n,R,i){return Selector.findElement($(n).descendants(),R,i);},previous:function(n,R,i){return Selector.findElement($(n).previousSiblings(),R,i);},next:function(n,R,i){return Selector.findElement($(n).nextSiblings(),R,i);},getElementsBySelector:function(){var i=$A(arguments),n=$(i.shift());return Selector.findChildElements(n,i);},getElementsByClassName:function(i,n){return document.getElementsByClassName(n,i);},readAttribute:function(R,i){R=$(R);if(document.all&&!window.opera){var n=Element._attributeTranslations;if(n.values[i]){return n.values[i](R,i);}if(n.names[i]){i=n.names[i];}var Q=R.attributes[i];if(Q){return Q.nodeValue;}}return R.getAttribute(i);},getHeight:function(i){return $(i).getDimensions().height;},getWidth:function(i){return $(i).getDimensions().width;},classNames:function(i){return new Element.ClassNames(i);},hasClassName:function(i,n){if(!(i=$(i))){return ;}var R=i.className;if(R.length==0){return false;}if(R==n||R.match(new RegExp("(^|\\s)"+n+"(\\s|$)"))){return true;}return false;},addClassName:function(i,n){if(!(i=$(i))){return ;}Element.classNames(i).add(n);return i;},removeClassName:function(i,n){if(!(i=$(i))){return ;}Element.classNames(i).remove(n);return i;},toggleClassName:function(i,n){if(!(i=$(i))){return ;}Element.classNames(i)[i.hasClassName(n)?"remove":"add"](n);return i;},observe:function(){Event.observe.apply(Event,arguments);return $A(arguments).first();},stopObserving:function(){Event.stopObserving.apply(Event,arguments);return $A(arguments).first();},cleanWhitespace:function(n){n=$(n);var R=n.firstChild;while(R){var i=R.nextSibling;if(R.nodeType==3&&!/\S/.test(R.nodeValue)){n.removeChild(R);}R=i;}return n;},empty:function(i){return $(i).innerHTML.match(/^\s*$/);},descendantOf:function(n,i){n=$(n),i=$(i);while(n=n.parentNode){if(n==i){return true;}}return false;},scrollTo:function(i){i=$(i);var n=Position.cumulativeOffset(i);window.scrollTo(n[0],n[1]);return i;},getStyle:function(n,R){n=$(n);if(["float","cssFloat"].include(R)){R=(typeof n.style.styleFloat!="undefined"?"styleFloat":"cssFloat");}R=R.camelize();var Q=n.style[R];if(!Q){if(document.defaultView&&document.defaultView.getComputedStyle){var i=document.defaultView.getComputedStyle(n,null);Q=i?i[R]:null;}else{if(n.currentStyle){Q=n.currentStyle[R];}}}if((Q=="auto")&&["width","height"].include(R)&&(n.getStyle("display")!="none")){Q=n["offset"+R.capitalize()]+"px";}if(window.opera&&["left","top","right","bottom"].include(R)){if(Element.getStyle(n,"position")=="static"){Q="auto";}}if(R=="opacity"){if(Q){return parseFloat(Q);}if(Q=(n.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){if(Q[1]){return parseFloat(Q[1])/100;}}return 1;}return Q=="auto"?null:Q;},setStyle:function(n,R){n=$(n);for(var i in R){var Q=R[i];if(i=="opacity"){if(Q==1){Q=(/Gecko/.test(navigator.userAgent)&&!/Konqueror|Safari|KHTML/.test(navigator.userAgent))?0.999999:1;if(/MSIE/.test(navigator.userAgent)&&!window.opera){n.style.filter=n.getStyle("filter").replace(/alpha\([^\)]*\)/gi,"");}}else{if(Q==""){if(/MSIE/.test(navigator.userAgent)&&!window.opera){n.style.filter=n.getStyle("filter").replace(/alpha\([^\)]*\)/gi,"");}}else{if(Q<0.00001){Q=0;}if(/MSIE/.test(navigator.userAgent)&&!window.opera){n.style.filter=n.getStyle("filter").replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+Q*100+")";}}}}else{if(["float","cssFloat"].include(i)){i=(typeof n.style.styleFloat!="undefined")?"styleFloat":"cssFloat";}}n.style[i.camelize()]=Q;}return n;},getDimensions:function(R){R=$(R);var D=$(R).getStyle("display");if(D!="none"&&D!=null){return {width:R.offsetWidth,height:R.offsetHeight};}var n=R.style;var c=n.visibility;var Q=n.position;var i=n.display;n.visibility="hidden";n.position="absolute";n.display="block";var f=R.clientWidth;var x=R.clientHeight;n.display=i;n.position=Q;n.visibility=c;return {width:f,height:x};},makePositioned:function(i){i=$(i);var n=Element.getStyle(i,"position");if(n=="static"||!n){i._madePositioned=true;i.style.position="relative";if(window.opera){i.style.top=0;i.style.left=0;}}return i;},undoPositioned:function(i){i=$(i);if(i._madePositioned){i._madePositioned=undefined;i.style.position=i.style.top=i.style.left=i.style.bottom=i.style.right="";}return i;},makeClipping:function(i){i=$(i);if(i._overflow){return i;}i._overflow=i.style.overflow||"auto";if((Element.getStyle(i,"overflow")||"visible")!="hidden"){i.style.overflow="hidden";}return i;},undoClipping:function(i){i=$(i);if(!i._overflow){return i;}i.style.overflow=i._overflow=="auto"?"":i._overflow;i._overflow=null;return i;}};Object.extend(Element.Methods,{childOf:Element.Methods.descendantOf});Element._attributeTranslations={};Element._attributeTranslations.names={colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",datetime:"dateTime",accesskey:"accessKey",tabindex:"tabIndex",enctype:"encType",maxlength:"maxLength",readonly:"readOnly",longdesc:"longDesc"};Element._attributeTranslations.values={_getAttr:function(i,n){return i.getAttribute(n,2);},_flag:function(i,n){return $(i).hasAttribute(n)?n:null;},style:function(i){return i.style.cssText.toLowerCase();},title:function(i){var n=i.getAttributeNode("title");return n.specified?n.nodeValue:null;}};Object.extend(Element._attributeTranslations.values,{href:Element._attributeTranslations.values._getAttr,src:Element._attributeTranslations.values._getAttr,disabled:Element._attributeTranslations.values._flag,checked:Element._attributeTranslations.values._flag,readonly:Element._attributeTranslations.values._flag,multiple:Element._attributeTranslations.values._flag});Element.Methods.Simulated={hasAttribute:function(n,R){var i=Element._attributeTranslations;R=i.names[R]||R;return $(n).getAttributeNode(R).specified;}};if(document.all&&!window.opera){Element.Methods.update=function(R,n){R=$(R);n=typeof n=="undefined"?"":n.toString();var i=R.tagName.toUpperCase();if(["THEAD","TBODY","TR","TD"].include(i)){var Q=document.createElement("div");switch(i){case "THEAD":case "TBODY":Q.innerHTML="<table><tbody>"+n.stripScripts()+"</tbody></table>";depth=2;break;case "TR":Q.innerHTML="<table><tbody><tr>"+n.stripScripts()+"</tr></tbody></table>";depth=3;break;case "TD":Q.innerHTML="<table><tbody><tr><td>"+n.stripScripts()+"</td></tr></tbody></table>";depth=4;}$A(R.childNodes).each(function(x){R.removeChild(x);});depth.times(function(){Q=Q.firstChild;});$A(Q.childNodes).each(function(x){R.appendChild(x);});}else{R.innerHTML=n.stripScripts();}setTimeout(function(){n.evalScripts();},10);return R;};}Object.extend(Element,Element.Methods);var _nativeExtensions=false;if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){["","Form","Input","TextArea","Select"].each(function(n){var R="HTML"+n+"Element";if(window[R]){return ;}var i=window[R]={};i.prototype=document.createElement(n?n.toLowerCase():"div").__proto__;});}Element.addMethods=function(i){Object.extend(Element.Methods,i||{});function n(c,Q,R){R=R||false;var x=Element.extend.cache;for(var f in c){var D=c[f];if(!R||!(f in Q)){Q[f]=x.findOrStore(D);}}}if(typeof HTMLElement!="undefined"){n(Element.Methods,HTMLElement.prototype);n(Element.Methods.Simulated,HTMLElement.prototype,true);n(Form.Methods,HTMLFormElement.prototype);[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement].each(function(R){n(Form.Element.Methods,R.prototype);});_nativeExtensions=true;}};var Toggle=new Object();Toggle.display=Element.toggle;Abstract.Insertion=function(i){this.adjacency=i;};Abstract.Insertion.prototype={initialize:function(n,R){this.element=$(n);this.content=R.stripScripts();if(this.adjacency&&this.element.insertAdjacentHTML){try{this.element.insertAdjacentHTML(this.adjacency,this.content);}catch(Q){var i=this.element.tagName.toUpperCase();if(["TBODY","TR"].include(i)){this.insertContent(this.contentFromAnonymousTable());}else{throw Q;}}}else{this.range=this.element.ownerDocument.createRange();if(this.initializeRange){this.initializeRange();}this.insertContent([this.range.createContextualFragment(this.content)]);}setTimeout(function(){R.evalScripts();},10);},contentFromAnonymousTable:function(){var i=document.createElement("div");i.innerHTML="<table><tbody>"+this.content+"</tbody></table>";return $A(i.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(i){i.each((function(n){this.element.parentNode.insertBefore(n,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(i){i.reverse(false).each((function(n){this.element.insertBefore(n,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(i){i.each((function(n){this.element.appendChild(n);}).bind(this));}});Insertion.After=Class.create();Insertion.After.prototype=Object.extend(new Abstract.Insertion("afterEnd"),{initializeRange:function(){this.range.setStartAfter(this.element);},insertContent:function(i){i.each((function(n){this.element.parentNode.insertBefore(n,this.element.nextSibling);}).bind(this));}});Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(i){this.element=$(i);},_each:function(i){this.element.className.split(/\s+/).select(function(n){return n.length>0;})._each(i);},set:function(i){this.element.className=i;},add:function(i){if(this.include(i)){return ;}this.set($A(this).concat(i).join(" "));},remove:function(i){if(!this.include(i)){return ;}this.set($A(this).without(i).join(" "));},toString:function(){return $A(this).join(" ");}};Object.extend(Element.ClassNames.prototype,Enumerable);var Selector=Class.create();Selector.prototype={initialize:function(i){this.params={classNames:[]};this.expression=i.toString().strip();this.parseExpression();this.compileMatcher();},parseExpression:function(){function D(f){throw "Parse error in selector: "+f;}if(this.expression==""){D("empty expression");}var c=this.params,x=this.expression,n,i,Q,R;while(n=x.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)){c.attributes=c.attributes||[];c.attributes.push({name:n[2],operator:n[3],value:n[4]||n[5]||""});x=n[1];}if(x=="*"){return this.params.wildcard=true;}while(n=x.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)){i=n[1],Q=n[2],R=n[3];switch(i){case "#":c.id=Q;break;case ".":c.classNames.push(Q);break;case "":case undefined:c.tagName=Q.toUpperCase();break;default:D(x.inspect());}x=R;}if(x.length>0){D(x.inspect());}},buildMatchExpression:function(){var c=this.params,x=[],Q;if(c.wildcard){x.push("true");}if(Q=c.id){x.push("element.readAttribute(\"id\") == "+Q.inspect());}if(Q=c.tagName){x.push("element.tagName.toUpperCase() == "+Q.inspect());}if((Q=c.classNames).length>0){for(var n=0,R=Q.length;n<R;n++){x.push("element.hasClassName("+Q[n].inspect()+")");}}if(Q=c.attributes){Q.each(function(D){var f="element.readAttribute("+D.name.inspect()+")";var i=function(j){return f+" && "+f+".split("+j.inspect()+")";};switch(D.operator){case "=":x.push(f+" == "+D.value.inspect());break;case "~=":x.push(i(" ")+".include("+D.value.inspect()+")");break;case "|=":x.push(i("-")+".first().toUpperCase() == "+D.value.toUpperCase().inspect());break;case "!=":x.push(f+" != "+D.value.inspect());break;case "":case undefined:x.push("element.hasAttribute("+D.name.inspect()+")");break;default:throw "Unknown operator "+D.operator+" in selector";}});}return x.join(" && ");},compileMatcher:function(){this.match=new Function("element","if (!element.tagName) return false;       element = $(element);       return "+this.buildMatchExpression());},findElements:function(x){var Q;if(Q=$(this.params.id)){if(this.match(Q)){if(!x||Element.childOf(Q,x)){return [Q];}}}x=(x||document).getElementsByTagName(this.params.tagName||"*");var R=[];for(var n=0,c=x.length;n<c;n++){if(this.match(Q=x[n])){R.push(Element.extend(Q));}}return R;},toString:function(){return this.expression;}};Object.extend(Selector,{matchElements:function(n,R){var i=new Selector(R);return n.select(i.match.bind(i)).map(Element.extend);},findElement:function(n,R,i){if(typeof R=="number"){i=R,R=false;}return Selector.matchElements(n,R||"*")[i||0];},findChildElements:function(i,n){return n.map(function(R){return R.match(/[^\s"]+(?:"[^"]*"[^\s"]+)*/g).inject([null],function(x,c){var Q=new Selector(c);return x.inject([],function(f,D){return f.concat(Q.findElements(D||i));});});}).flatten();}});function $$(){return Selector.findChildElements(document,$A(arguments));}var Form={reset:function(i){$(i).reset();return i;},serializeElements:function(R,i){var n=R.inject({},function(Q,c){if(!c.disabled&&c.name){var x=c.name,D=$(c).getValue();if(D!=undefined){if(Q[x]){if(Q[x].constructor!=Array){Q[x]=[Q[x]];}Q[x].push(D);}else{Q[x]=D;}}}return Q;});return i?n:Hash.toQueryString(n);}};Form.Methods={serialize:function(n,i){return Form.serializeElements(Form.getElements(n),i);},getElements:function(i){return $A($(i).getElementsByTagName("*")).inject([],function(n,R){if(Form.Element.Serializers[R.tagName.toLowerCase()]){n.push(Element.extend(R));}return n;});},getInputs:function(f,Q,x){f=$(f);var n=f.getElementsByTagName("input");if(!Q&&!x){return $A(n).map(Element.extend);}for(var c=0,j=[],D=n.length;c<D;c++){var R=n[c];if((Q&&R.type!=Q)||(x&&R.name!=x)){continue;}j.push(Element.extend(R));}return j;},disable:function(i){i=$(i);i.getElements().each(function(n){n.blur();n.disabled="true";});return i;},enable:function(i){i=$(i);i.getElements().each(function(n){n.disabled="";});return i;},findFirstElement:function(i){return $(i).getElements().find(function(n){return n.type!="hidden"&&!n.disabled&&["input","select","textarea"].include(n.tagName.toLowerCase());});},focusFirstElement:function(i){i=$(i);i.findFirstElement().activate();return i;}};Object.extend(Form,Form.Methods);Form.Element={focus:function(i){$(i).focus();return i;},select:function(i){$(i).select();return i;}};Form.Element.Methods={serialize:function(i){i=$(i);if(!i.disabled&&i.name){var n=i.getValue();if(n!=undefined){var R={};R[i.name]=n;return Hash.toQueryString(R);}}return "";},getValue:function(i){i=$(i);var n=i.tagName.toLowerCase();return Form.Element.Serializers[n](i);},clear:function(i){$(i).value="";return i;},present:function(i){return $(i).value!="";},activate:function(i){i=$(i);i.focus();if(i.select&&(i.tagName.toLowerCase()!="input"||!["button","reset","submit"].include(i.type))){i.select();}return i;},disable:function(i){i=$(i);i.disabled=true;return i;},enable:function(i){i=$(i);i.blur();i.disabled=false;return i;}};Object.extend(Form.Element,Form.Element.Methods);var Field=Form.Element;var $F=Form.Element.getValue;Form.Element.Serializers={input:function(i){switch(i.type.toLowerCase()){case "checkbox":case "radio":return Form.Element.Serializers.inputSelector(i);default:return Form.Element.Serializers.textarea(i);}},inputSelector:function(i){return i.checked?i.value:null;},textarea:function(i){return i.value;},select:function(i){return this[i.type=="select-one"?"selectOne":"selectMany"](i);},selectOne:function(n){var i=n.selectedIndex;return i>=0?this.optionValue(n.options[i]):null;},selectMany:function(x){var n,c=x.length;if(!c){return null;}for(var Q=0,n=[];Q<c;Q++){var R=x.options[Q];if(R.selected){n.push(this.optionValue(R));}}return n;},optionValue:function(i){return Element.extend(i).hasAttribute("value")?i.value:i.text;}};Abstract.TimedObserver=function(){};Abstract.TimedObserver.prototype={initialize:function(i,n,R){this.frequency=n;this.element=$(i);this.callback=R;this.lastValue=this.getValue();this.registerCallback();},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000);},onTimerEvent:function(){var i=this.getValue();var n=("string"==typeof this.lastValue&&"string"==typeof i?this.lastValue!=i:String(this.lastValue)!=String(i));if(n){this.callback(this.element,i);this.lastValue=i;}}};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(i,n){this.element=$(i);this.callback=n;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=="form"){this.registerFormCallbacks();}else{this.registerCallback(this.element);}},onElementEvent:function(){var i=this.getValue();if(this.lastValue!=i){this.callback(this.element,i);this.lastValue=i;}},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback.bind(this));},registerCallback:function(i){if(i.type){switch(i.type.toLowerCase()){case "checkbox":case "radio":Event.observe(i,"click",this.onElementEvent.bind(this));break;default:Event.observe(i,"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(i){return i.target||i.srcElement;},isLeftClick:function(i){return (((i.which)&&(i.which==1))||((i.button)&&(i.button==1)));},pointerX:function(i){return i.pageX||(i.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));},pointerY:function(i){return i.pageY||(i.clientY+(document.documentElement.scrollTop||document.body.scrollTop));},stop:function(i){if(i.preventDefault){i.preventDefault();i.stopPropagation();}else{i.returnValue=false;i.cancelBubble=true;}},findElement:function(R,n){var i=Event.element(R);while(i.parentNode&&(!i.tagName||(i.tagName.toUpperCase()!=n.toUpperCase()))){i=i.parentNode;}return i;},observers:false,_observeAndCache:function(Q,R,n,i){if(!this.observers){this.observers=[];}if(Q.addEventListener){this.observers.push([Q,R,n,i]);Q.addEventListener(R,n,i);}else{if(Q.attachEvent){this.observers.push([Q,R,n,i]);Q.attachEvent("on"+R,n);}}},unloadCache:function(){if(!Event.observers){return ;}for(var n=0,R=Event.observers.length;n<R;n++){Event.stopObserving.apply(this,Event.observers[n]);Event.observers[n][0]=null;}Event.observers=false;},observe:function(Q,R,n,i){Q=$(Q);i=i||false;if(R=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||Q.attachEvent)){R="keydown";}Event._observeAndCache(Q,R,n,i);},stopObserving:function(Q,R,n,i){Q=$(Q);i=i||false;if(R=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||Q.detachEvent)){R="keydown";}if(Q.removeEventListener){Q.removeEventListener(R,n,i);}else{if(Q.detachEvent){try{Q.detachEvent("on"+R,n);}catch(x){}}}}});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(n){var i=0,R=0;do{i+=n.scrollTop||0;R+=n.scrollLeft||0;n=n.parentNode;}while(n);return [R,i];},cumulativeOffset:function(n){var i=0,R=0;do{i+=n.offsetTop||0;R+=n.offsetLeft||0;n=n.offsetParent;}while(n);return [R,i];},positionedOffset:function(n){var i=0,Q=0;do{i+=n.offsetTop||0;Q+=n.offsetLeft||0;n=n.offsetParent;if(n){if(n.tagName=="BODY"){break;}var R=Element.getStyle(n,"position");if(R=="relative"||R=="absolute"){break;}}}while(n);return [Q,i];},offsetParent:function(i){if(i.offsetParent){return i.offsetParent;}if(i==document.body){return i;}while((i=i.parentNode)&&i!=document.body){if(Element.getStyle(i,"position")!="static"){return i;}}return document.body;},within:function(n,i,R){if(this.includeScrollOffsets){return this.withinIncludingScrolloffsets(n,i,R);}this.xcomp=i;this.ycomp=R;this.offset=this.cumulativeOffset(n);return (R>=this.offset[1]&&R<this.offset[1]+n.offsetHeight&&i>=this.offset[0]&&i<this.offset[0]+n.offsetWidth);},withinIncludingScrolloffsets:function(n,i,Q){var R=this.realOffset(n);this.xcomp=i+R[0]-this.deltaX;this.ycomp=Q+R[1]-this.deltaY;this.offset=this.cumulativeOffset(n);return (this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+n.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+n.offsetWidth);},overlap:function(n,i){if(!n){return 0;}if(n=="vertical"){return ((this.offset[1]+i.offsetHeight)-this.ycomp)/i.offsetHeight;}if(n=="horizontal"){return ((this.offset[0]+i.offsetWidth)-this.xcomp)/i.offsetWidth;}},page:function(Q){var i=0,R=0;var n=Q;do{i+=n.offsetTop||0;R+=n.offsetLeft||0;if(n.offsetParent==document.body){if(Element.getStyle(n,"position")=="absolute"){break;}}}while(n=n.offsetParent);n=Q;do{if(!window.opera||n.tagName=="BODY"){i-=n.scrollTop||0;R-=n.scrollLeft||0;}}while(n=n.parentNode);return [R,i];},clone:function(R,x){var i=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});R=$(R);var Q=Position.page(R);x=$(x);var c=[0,0];var n=null;if(Element.getStyle(x,"position")=="absolute"){n=Position.offsetParent(x);c=Position.page(n);}if(n==document.body){c[0]-=document.body.offsetLeft;c[1]-=document.body.offsetTop;}if(i.setLeft){x.style.left=(Q[0]-c[0]+i.offsetLeft)+"px";}if(i.setTop){x.style.top=(Q[1]-c[1]+i.offsetTop)+"px";}if(i.setWidth){x.style.width=R.offsetWidth+"px";}if(i.setHeight){x.style.height=R.offsetHeight+"px";}},absolutize:function(n){n=$(n);if(n.style.position=="absolute"){return ;}Position.prepare();var Q=Position.positionedOffset(n);var c=Q[1];var x=Q[0];var R=n.clientWidth;var i=n.clientHeight;n._originalLeft=x-parseFloat(n.style.left||0);n._originalTop=c-parseFloat(n.style.top||0);n._originalWidth=n.style.width;n._originalHeight=n.style.height;n.style.position="absolute";n.style.top=c+"px";n.style.left=x+"px";n.style.width=R+"px";n.style.height=i+"px";},relativize:function(i){i=$(i);if(i.style.position=="relative"){return ;}Position.prepare();i.style.position="relative";var R=parseFloat(i.style.top||0)-(i._originalTop||0);var n=parseFloat(i.style.left||0)-(i._originalLeft||0);i.style.top=R+"px";i.style.left=n+"px";i.style.height=i._originalHeight;i.style.width=i._originalWidth;}};if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){Position.cumulativeOffset=function(n){var i=0,R=0;do{i+=n.offsetTop||0;R+=n.offsetLeft||0;if(n.offsetParent==document.body){if(Element.getStyle(n,"position")=="absolute"){break;}}n=n.offsetParent;}while(n);return [R,i];};}Element.addMethods();