function NewsScroller()
{
	this.NewsItems;
	this.Width;
	this.Height;
	this.Speed;
	this.BackgroundColor;
	this.Font;
	this.FontColor;
	this.FontSize;

	// Databinding for property NewsItems
	this.SetNewsItems = function(data)
	{
		///UserCodeRegionStart:[SetNewsItems] (do not remove this comment.)
		this.NewsItems = data;					
		
		
		///UserCodeRegionEnd: (do not remove this comment.)
	}

	// Databinding for property NewsItems
	this.GetNewsItems = function()
	{
		///UserCodeRegionStart:[GetNewsItems] (do not remove this comment.)
		return this.NewsItems;
		
		
		///UserCodeRegionEnd: (do not remove this comment.)
	}

	this.show = function()
	{
		///UserCodeRegionStart:[show] (do not remove this comment.)
 	var marqueecontent ='<nobr><ul id="list">';
	for(i=0;this.NewsItems[i]!=undefined;i++)
	{
		marqueecontent += '<li ><font face="'+this.Font+' "color=#FFFFFF size="'+this.FontSize+'"><font color="red"> &#8226; </font> '+ this.NewsItems[i].NewsItem +' </font></li>'
	}
	marqueecontent += '</ul></nobr>';
	
	if (!this.copySpeed){
		this.copySpeed = this.Speed;
	}
	
	var wrapperId = this.ControlName + 'Wrapper';
 
	var buffer = '<div style="border: 0px solid rgb(211, 211,211);position:relative;width:'+ this.Width +';height:'+ this.Height +';overflow:hidden">';
	buffer += '<div id="' + wrapperId + '" style="position:absolute;width:'+ this.Width +';height:'+ this.Height +';background-color:'+this.BackgroundColor+'">';
	buffer += '<div id="' + this.ControlName + '" style="position:absolute;left:0px;top:0px"> ';
	buffer += marqueecontent;
	buffer += '</div></div></div>';
	
	
	this.setHtml(buffer);
	
	var wrapperEl = gx.dom.el(wrapperId);
	gx.evt.attach(wrapperEl, 'mouseover', (function(){ this.copySpeed = 0 }).closure(this));
	gx.evt.attach(wrapperEl, 'mouseout', (function(){ this.copySpeed = this.Speed }).closure(this));
	
  	this.timer = setInterval(this.scrollmarquee.closure(this),20); 
		
		
		
		///UserCodeRegionEnd: (do not remove this comment.)
	}
	///UserCodeRegionStart:[User Functions] (do not remove this comment.)
 
	

	this.scrollmarquee = function(){
		if (parseInt(gx.dom.byId(this.ControlName).style.left)>( (gx.dom.byId(this.ControlName).offsetWidth) *(-1)+8))
			gx.dom.byId(this.ControlName).style.left = parseInt(gx.dom.byId(this.ControlName).style.left)-this.copySpeed+"px"
		else
			gx.dom.byId(this.ControlName).style.left=parseInt( this.Width)+8+"px"		 
	} 
	 
	
	
	
	///UserCodeRegionEnd: (do not remove this comment.):
}

