//when the dom is ready... window.addEvent('domready', function() { //time to implement basic show / hide Element.implement({ //implement show show: function() { this.setStyle('display','block'); }, //implement hide hide: function() { this.setStyle('display','none'); }, //implement toggle toggle: function() { if(this.getStyle('display')=='none') { this.setStyle('display','block'); }else{ this.setStyle('display','none'); } } }); });