var Class={create:function(){return function(){this.initialize.apply(this,arguments);};}};Object.extend=function(_1,_2){for(property in _2){_1[property]=_2[property];}return _1;};Function.prototype.bind=function(_3){var _4=this;return function(){return _4.apply(_3,arguments);};};Function.prototype.bindAsEventListener=function(_5){var _6=this;return function(_7){_6.call(_5,_7||window.event);};};function $(){if(arguments.length==1){return get$(arguments[0]);}var _8=[];$c(arguments).each(function(el){_8.push(get$(el));});return _8;function get$(el){if(typeof el=="string"){el=document.getElementById(el);}return el;}}if(!window.Element){var Element=new Object();}Object.extend(Element,{remove:function(_b){_b=$(_b);_b.parentNode.removeChild(_b);},hasClassName:function(_c,_d){_c=$(_c);if(!_c){return;}var _e=false;_c.className.split(" ").each(function(cn){if(cn==_d){_e=true;}});return _e;},addClassName:function(_10,_11){_10=$(_10);Element.removeClassName(_10,_11);_10.className+=" "+_11;},removeClassName:function(_12,_13){_12=$(_12);if(!_12){return;}var _14="";_12.className.split(" ").each(function(cn,i){if(cn!=_13){if(i>0){_14+=" ";}_14+=cn;}});_12.className=_14;},cleanWhitespace:function(_17){_17=$(_17);$c(_17.childNodes).each(function(_18){if(_18.nodeType==3&&!/\S/.test(_18.nodeValue)){Element.remove(_18);}});},find:function(_19,_1a){_19=$(_19)[_1a];while(_19.nodeType!=1){_19=_19[_1a];}return _19;}});var Position={cumulativeOffset:function(_1b){var _1c=0,valueL=0;do{_1c+=_1b.offsetTop||0;valueL+=_1b.offsetLeft||0;_1b=_1b.offsetParent;}while(_1b);return [valueL,_1c];}};document.getElementsByClassName=function(_1d){var _1e=document.getElementsByTagName("*")||document.all;var _1f=[];$c(_1e).each(function(_20){if(Element.hasClassName(_20,_1d)){_1f.push(_20);}});return _1f;};Array.prototype.iterate=function(_21){for(var i=0;i<this.length;i++){_21(this[i],i);}};if(!Array.prototype.each){Array.prototype.each=Array.prototype.iterate;}function $c(_23){var _24=[];for(var i=0;i<_23.length;i++){_24.push(_23[i]);}return _24;}function getElementsByClassName(_1,_2,_3){_2=_2||"*";_3=_3||document;var _4=_3.getElementsByTagName(_2);if(!_4.length&&_2=="*"&&_3.all){_4=_3.all;}var _5=new Array();var _6=_1.indexOf("|")!=-1?"|":" ";var _7=_1.split(_6);for(var i=0,j=_4.length;i<j;i++){var _9=_4[i].className.split(" ");if(_6==" "&&_7.length>_9.length){continue;}var c=0;comparisonLoop:for(var k=0,l=_9.length;k<l;k++){for(var m=0,n=_7.length;m<n;m++){if(_7[m]==_9[k]){c++;}if((_6=="|"&&c==1)||(_6==" "&&c==_7.length)){_5.push(_4[i]);break comparisonLoop;}}}}return _5;}function isUndefined(a){return typeof a=="undefined";}function isString(s){return typeof s=="string";}Array.prototype.push=function(_f){this[this.length]=_f;};function addLoadEvent(_10){var _11=window.onload;if(typeof window.onload!="function"){window.onload=_10;}else{window.onload=function(){if(_11){_11();}_10();};}}var Fx=fx={};Fx.Base=function(){};Fx.Base.prototype={setOptions:function(_1){this.options=Object.extend({onStart:function(){},onComplete:function(){},transition:Fx.Transitions.sineInOut,duration:500,unit:"px",wait:true,fps:50},_1||{});},step:function(){var _2=new Date().getTime();if(_2<this.time+this.options.duration){this.cTime=_2-this.time;this.setNow();}else{setTimeout(this.options.onComplete.bind(this,this.element),10);this.clearTimer();this.now=this.to;}this.increase();},setNow:function(){this.now=this.compute(this.from,this.to);},compute:function(_3,to){var _5=to-_3;return this.options.transition(this.cTime,_3,_5,this.options.duration);},clearTimer:function(){clearInterval(this.timer);this.timer=null;return this;},_start:function(_6,to){if(!this.options.wait){this.clearTimer();}if(this.timer){return;}setTimeout(this.options.onStart.bind(this,this.element),10);this.from=_6;this.to=to;this.time=new Date().getTime();this.timer=setInterval(this.step.bind(this),Math.round(1000/this.options.fps));return this;},custom:function(_8,to){return this._start(_8,to);},set:function(to){this.now=to;this.increase();return this;},hide:function(){return this.set(0);},setStyle:function(e,p,v){if(p=="opacity"){if(v==0&&e.style.visibility!="hidden"){e.style.visibility="hidden";}else{if(e.style.visibility!="visible"){e.style.visibility="visible";}}if(window.ActiveXObject){e.style.filter="alpha(opacity="+v*100+")";}e.style.opacity=v;}else{e.style[p]=v+this.options.unit;}}};Fx.Style=Class.create();Fx.Style.prototype=Object.extend(new Fx.Base(),{initialize:function(el,_f,_10){this.element=$(el);this.setOptions(_10);this.property=_f.camelize();},increase:function(){this.setStyle(this.element,this.property,this.now);}});Fx.Styles=Class.create();Fx.Styles.prototype=Object.extend(new Fx.Base(),{initialize:function(el,_12){this.element=$(el);this.setOptions(_12);this.now={};},setNow:function(){for(p in this.from){this.now[p]=this.compute(this.from[p],this.to[p]);}},custom:function(obj){if(this.timer&&this.options.wait){return;}var _14={};var to={};for(p in obj){_14[p]=obj[p][0];to[p]=obj[p][1];}return this._start(_14,to);},increase:function(){for(var p in this.now){this.setStyle(this.element,p,this.now[p]);}}});Fx.Transitions={linear:function(t,b,c,d){return c*t/d+b;},sineInOut:function(t,b,c,d){return -c/2*(Math.cos(Math.PI*t/d)-1)+b;}};Fx.Height=Class.create();Fx.Height.prototype=Object.extend(new Fx.Base(),{initialize:function(el,_2){this.element=$(el);this.setOptions(_2);this.element.style.overflow="hidden";},toggle:function(){if(this.element.offsetHeight>0){return this.custom(this.element.offsetHeight,0);}else{return this.custom(0,this.element.scrollHeight);}},show:function(){return this.set(this.element.scrollHeight);},increase:function(){this.setStyle(this.element,"height",this.now);}});Fx.Width=Class.create();Fx.Width.prototype=Object.extend(new Fx.Base(),{initialize:function(el,_4){this.element=$(el);this.setOptions(_4);this.element.style.overflow="hidden";this.iniWidth=this.element.offsetWidth;},toggle:function(){if(this.element.offsetWidth>0){return this.custom(this.element.offsetWidth,0);}else{return this.custom(0,this.iniWidth);}},show:function(){return this.set(this.iniWidth);},increase:function(){this.setStyle(this.element,"width",this.now);}});Fx.Opacity=Class.create();Fx.Opacity.prototype=Object.extend(new Fx.Base(),{initialize:function(el,_6){this.element=$(el);this.setOptions(_6);this.now=1;},toggle:function(){if(this.now>0){return this.custom(1,0);}else{return this.custom(0,1);}},show:function(){return this.set(1);},increase:function(){this.setStyle(this.element,"opacity",this.now);}});addLoadEvent(registerEvents54);var settingsLinkOpacity;var loginLinkOpacity;function registerEvents54(){var _1=$("settingslink");_1.onclick=doSettingsPopup;settingsLinkOpacity=new fx.Opacity("optionsarea",{duration:120});$("optionsarea").style.display="";settingsLinkOpacity.hide();$("closesettingslink").onclick=hideSettingsPopup;var _2=$("loginlink");var _3=$("closeloginlink");if(_2){_2.onclick=doLoginPopup;}loginLinkOpacity=new fx.Opacity("login",{duration:120,onComplete:function(){if($("login").style.display!="none"&&loginLinkOpacity.now!=0){$("logemail").focus();}else{$("logemail").blur();}}});$("login").style.display="";loginLinkOpacity.hide();if(_3){_3.onclick=hideLoginPopup;}}function doLoginPopup(e){loginLinkOpacity.toggle();window.event?window.event.cancelBubble=true:e.stopPropagation();return false;}function hideLoginPopup(e){loginLinkOpacity.toggle();window.event?window.event.cancelBubble=true:e.stopPropagation();return false;}function doSettingsPopup(e){settingsLinkOpacity.toggle();window.event?window.event.cancelBubble=true:e.stopPropagation();return false;}function hideSettingsPopup(e){settingsLinkOpacity.toggle();window.event?window.event.cancelBubble=true:e.stopPropagation();return false;}