Element.extend({isVisible:function(){return this.getStyle("display")!="none"},toggle:function(){return this[this.isVisible()?"hide":"show"]()},hide:function(){this.originalDisplay=this.getStyle("display");this.setStyle("display","none");return this},show:function(A){this.originalDisplay=(this.originalDisplay=="none")?"block":this.originalDisplay;this.setStyle("display",(A||this.originalDisplay||"block"));return this},tidy:function(){try{if(this.getValue().tidy()){this.value=this.getValue().tidy()}}catch(A){dbug.log("element.tidy error: %o",A)}},findParent:function(A){return $$(A).filter(function(B){return B.hasChild(this)},this)[0]},fxOpacityOk:function(){if(!window.ie6){return true}var A=false;try{if(new Color(this.getStyle("backgroundColor"))){A=true}}catch(B){}return A}});Element.visible=Element.isVisible;if(!Element.empty){Element.extend({empty:function(){return this.setHTML("")}})}var $S=$$;