function readRSS(URI, display_limit, text_limit, tab_width, display_replies, display_GMT)
{
	var div_id;
	do
		div_id = 'rss_' + Math.round(Math.random() * 10000);
	while ($('body').is('#' + div_id));
	document.write('<div id="' + div_id + '"></div>');

	$.get(URI, '', function(xml){
		var items_count = $('item', xml).length;
		if (items_count == 0)
			return false;
		var title, link, creator, pubDate, description;
		var forum_title = $('title:first', xml).text();
		var forum_url = URI.substr(0, URI.indexOf('/', 7) + 1) + 'viewforum.forum?f=' + URI.substr(URI.indexOf('f=') + 2, URI.length);
		var display_html = '<table border="1" cellspacing="0" cellpadding="5" width="' + tab_width + '"><tr><td><center><h3><a href="' + forum_url + '" target="_blank">' + forum_title + '</a></h3></center></td></tr><tr><td>';
		if (display_limit == -1)
			display_limit = items_count;

		$('item', xml).each(function(i){
			title = $('title', this).text();
			link = $('link', this).text();
			display_html += (i + 1) + '. ' + (title == '' ? '' : '<a href="' + link + '">' + title + '</a>');
			creator = $('creator', this).text();
			display_html += '<br />' + (creator == '' ? '<i>Undefined author</i>' : '<b>' + creator + '</b>');
			pubDate = $('pubDate', this).text();
			display_html += '<br />' + (pubDate == '' ? '<i>Undefined date</i>' : '<b>' + (display_GMT ? pubDate : pubDate.substring(0, pubDate.indexOf(' GMT')) + '</b>'));
			if (text_limit == 0)
				description = '';
			else
			{
				description = $('description', this).text();
				if (text_limit != -1 && description.length > text_limit)
					description = description.substring(0, text_limit - 3) + '...';
			}
			display_html += '<br />' + description;
			if (i < display_limit - 1)
				display_html += '<hr />';
			else
				return false;
		});

		$('#' + div_id).html(display_html + '</td></tr></table>');
	}, 'xml');

}

if (typeof($) == 'undefined')
	document.write('<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script>');