// --------------------------------------------------------------------------------
// news class
function news (a_items, n_count, b_showUnderline)
{
	// browser check
	if (!document.body || !document.body.style)
		return;

	// store items structure
	this.a_config = a_items;
	this.b_underline = b_showUnderline;
	
  this.n_showCount = n_count ? n_count : a_items.length;

  if (this.n_showCount > a_items.length)
    this.n_showCount = a_items.length;
     	
	// make root level visible
	for (var n = 0; n < this.n_showCount; n++)
		new news_item(this, n);
}

// --------------------------------------------------------------------------------
// news item Class
function news_item (o_parent, n_order) 
{
	this.a_config = o_parent.a_config[n_order];

 	document.write ('<div style="padding-top:10px;" ');
 	
 	if (o_parent.b_underline)
    document.write('class="underline" ');
 	
 	document.write('align="left"><strong>');

  if (this.a_config[1])
  	document.write ('<a class="morelink" href="', this.a_config[1], '" target="_blank">');
  	
  document.write(this.a_config[0]);

  if (this.a_config[1])
      document.write ('</a>');
  
  document.write('</strong>');
  
  if (this.a_config[2])
    document.write('<br/>', this.a_config[2]);
  
  document.write('</div>');
}

