function updateTabs(which) {
		if (which == 'news') {
			new Tabs($('news_listing'), $$('.togglers li'), $$('.tab_content'), 0);
		}
		else {
			new Tabs($('news_listing'), $$('.togglers li'), $$('.tab_content'), 1);
	  }
}

function showPage(num,tab_on) {
	new Ajax.Updater('main_content','',{
parameters: {page:num,tab_on:tab_on},
			method: 'get',
			spinner: '<p id="spinner">loading...</p>',
			onComplete: function() {
		 		updateTabs(tab_on);
			}
			});	
}

/*----------------------------------------------------------------------------------------*/
document.observe('dom:loaded', function(){
	if ($('tabs')) {
		new Tabs($('tabs'), $$('.togglers li'), $$('.tab_content'), 0);
	}
	if ($('news_listing')) {
		new Tabs($('news_listing'), $$('.togglers li'), $$('.tab_content'), 0);
	}
});
