//FUNZIONE CONVERSIONE NEWS in HTML
var item_max = 2;

function xml2news(channel)	{
	var div = d.getElementById("news");
	var items = channel.getElementsByTagName("item");
	var titolo;
	var txt;

	var num_item = items.length;
	if (num_item>item_max) num_item = item_max;

	//CANCELLA CONTENUTO NODO <DIV> NEWS
	div.innerHTML = "";

	for (i=0;i<num_item;i++) {
		if (i>0) appendNode(div,"hr","");

		titolo = get_txt("title",items[i],0);
		href = get_txt("link",items[i],0);
		titolo = "<a href='" + href + "' target='_blank'>" + titolo + "</a>";

		txt = get_txt("description",items[i],0);

		appendNode(div,"h3",titolo);
		appendNode(div,"p",txt);
	}
}
