<br />
<b>Notice</b>:  Undefined index:  CBC in <b>/home/georgeb/sites/cbc-blacksea/site/js/news.js.php</b> on line <b>18</b><br />
var news=new Array();


function displayNews(collection) {
	for (var i=0;i<news.length;i++) {
		var obj=news[i];
		if (obj.collection==collection) {
			document.write('<h1>');
			document.write(obj.title);
			document.write('</h1>');
			document.write('<h2>');
			document.write(obj.date);
			document.write('</h2>');
			document.write(obj.html);
		}
	}

}

function displayShortNews(att,collection,title,link) {
	if (arguments.length>4) maxNo=arguments[4];
	else maxNo=false;
	var currentIndex=0;
	var el=document.createElement('h1');
	el.innerHTML=title;
	att.appendChild(el);
	for (var i=0;i<news.length;i++) {
		var obj=news[i];
		if (obj.collection==collection) {
			var el=document.createElement('h2');
			el.className='date';
			el.innerHTML=obj.date;
			att.appendChild(el);
			var el=document.createElement('p');
			el.innerHTML=('<a href="index.php?page='+link+'">'+obj.description+'</a>');
			att.appendChild(el);
			currentIndex++;
		}
		if (maxNo && currentIndex==maxNo) return true;
	}
}
