NEWSLIST_AJAX_URL = '/common/ajax/front/components/NewsList/ajax.php';

function fncNewsListComponent_NewsList_Load(offset, object){
	
	elm                	= $(object.elm);
	news_category_id   	= object.news_category_id;
	uniqid             	= object.uniqid;
	str_this_page		= object.str_this_page;
	
	$('NewsList_'+uniqid).down().innerHTML = '<center><br><img src="/common/templates/default/images/loadingsmall.gif" /><br><br></center>';

	new Ajax.Updater({ success : $('NewsList_'+uniqid)}, NEWSLIST_AJAX_URL, {
		parameters: { 
			action             	: 'NewsList_Load',
			offset             	: offset,
			news_category_id   	: news_category_id,
			uniqid             	: uniqid,
			str_this_page		: str_this_page
		},
		evalScripts : true,
							
		onSuccess: function(transport){
		
		},
		
		onFailure: function(transport){
			$('NewsList_'+uniqid).down().innerHTML = 'Error retrieving news. Please refresh the page.'; 
		}
	});
}
