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=$$;