+var showControls = new Class({
+
+ getOptions: function(){
+ return {
+ next: $empty,
+ prev: $empty,
+ stop: $empty,
+ play: $empty,
+ exit: $empty,
+ }
+ },
+
+ initialize: function(name,options){
+ this.setOptions(this.getOptions(), options)
+
+ this.container = $(name)
+
+ var buttons = ['prev','stop','play','next','exit','comm']
+ buttons.each(function(el){
+ var sub = new Element('div')
+ if (el == 'comm') {
+ this.comm = sub
+ sub.set('text', 'this is a comment field')
+ /*
+ } else {
+ sub.set('text', el)
+ */
+ }
+ if (this.options[el]) {
+ sub.addEvent('click', function() {
+ this.options[el]()
+ }.bind(this))
+ }
+ sub.addClass('controlButton').setProperties({
+ id: el,
+ name: el,
+ }).injectInside(this.container)
+ },this)
+ },
+
+ settext: function(text) {
+ this.comm.set(text)
+ }
+})
+showControls.implement(new Options)
+