	//[ v2009.1120
	var News = Class.create();
	News.prototype =
	{
		tag_id_container: 'news',
		tag_id_label: 'label_headline',
		tag_id_headline: 'headline',
		
		label: 'News: ',
		max_length: 100,
		headlines: new Array(),
		effect: 'fade',
		interval: 7,

		_cursor: 0,
		

		//////////////////////////////////////////////////	
		initialize: function(tag_id_container, label)
		{
			this.tag_id_container = (tag_id_container != undefined) ? tag_id_container : this.tag_id_container;
			this.label = (label != undefined) ? label : this.label;
		},
		SetTagIds: function(container, label, headline)
		{
			this.tag_id_container = (container != undefined) ? container : this.tag_id_container;
			this.tag_id_label = (label != undefined) ? label : this.tag_id_label;
			this.tag_id_headline = (headline != undefined) ? headline : this.tag_id_headline;
		},
		//////////////////////////////////////////////////
		AddHeadline: function(title, link, ts)
		{
			link  = link.blank() ? '' : link;
			title = title.truncate(this.max_length, '...');
			
			var headline = new Hash({title: title, link: link, ts: ts});
			
			this.headlines.push( headline );
		},
		//////////////////////////////////////////////////
		Update: function()
		{
			//---[ ensure container ]---
			if( $(this.tag_id_container) )
			{
				//---[ look for missing slots and setup if not there ]---
				if( !$(this.tag_id_label) || !$(this.tag_id_headline) )
				{
					$(this.tag_id_container).innerHTML = '<span id="' + this.tag_id_label + '"><strong>' + this.label + '</strong></span>';
					$(this.tag_id_container).innerHTML += '<span id="' + this.tag_id_headline + '">Loading...</span>';
				}
			}
			
			if( $(this.tag_id_container) )
			{		
				this.Set( this.GetNext() );
				
				switch( this.effect )
				{
					case 'blind':
						//---[ wipe ]---
					break;
				
					case 'fade':
					default:
						//---[ calculate interval ]---
						var interval = (this.interval > 1000) ? this.interval : (this.interval * 1000);
					
						//---[ appear fade ]---
						Effect.Appear(this.tag_id_headline);
						setTimeout('Effect.Fade("' + this.tag_id_headline + '", {duration:1.0} );', (interval - 1000) );
					break;
				}
			}
		},
		//////////////////////////////////////////////////
		GetNext: function()
		{
			var html = '';
			
			this._cursor = ( this._cursor >= this.headlines.length ) ? 0 : this._cursor;

			if( this.headlines[this._cursor] != undefined )
			{
				var headline = this.headlines[this._cursor];
				
				html = this.GetHtml(headline);
				
				this._cursor++;
			}
			
			return html;
		},
		//////////////////////////////////////////////////
		GetHtml: function( headline )
		{
			var html = '';
			
			if( typeof headline != 'function')
			{
				var format = headline.get('link').blank() ? '#{title}' : '<a href="#{link}">#{title}</a>';
				
				var myTemplate = new Template(format);
				
				html = myTemplate.evaluate( headline );
			}
			
			return html;
		},		
		//////////////////////////////////////////////////
		Set: function(text)
		{
			$(this.tag_id_headline).innerHTML = text;
		}
	}