      var NewsTicker = Class.create();
	  
      NewsTicker.prototype = {
          messages: new Array(),
          counter: 0, 
		  interval: 0,
          target: null, 
		  source: null,
          initialize: function(target, source, options)
          {
              this.target = $(target);
              this.source = $(source);
              this.options = Object.extend({
                  updateRate: 2,
                  duration: 0.5,
                  beforeStart:function(){
                      this.counter++;
                  }.bind(this)
              }, options || {});
			  

			  if(this.source == undefined) { return false };
              Element.cleanWhitespace(this.source);
			  
              $A($(this.source).childNodes).each(function(sel) {
                 //this.messages.push(sel.innerHTML.strip());
				 this.messages.push(sel.innerHTML);
              }.bind(this));
              this.start();
          },
          start: function()
          {
              this.interval = new PeriodicalExecuter(function() {
                  //this.target.update('&nbsp;').appendChild(Builder.node('span',{style:'opacity:0'}, this.messages[this.counter]));
				  this.target.update("<span style='opacity:0'>" + this.messages[this.counter] + "</span>");
                  new Effect.Appear(this.target.lastChild, this.options);
                  if(this.counter == this.messages.length){ this.counter = 0;}
              }.bind(this), this.options.updateRate);
          },
          stop: function()
          {
              this.interval.stop();
          }
      };
