function Feed(id, title, _link, items)
{
	this.id = id;
	this.title = title;
	this._link = _link;
	this.titleArray = new Array();
	this.linkTitleArray = new Array();
	this.linkArray = new Array();
	this.descriptionArray = new Array();
	this.pubDateArray = new Array();
	this.guidArray = new Array();
	
	this.parseItems(items);
}

Feed.prototype.GetTitle = function()
{
	return "<div id='title_"+ this.id +"'>" + this.title + "</div>";
}

Feed.prototype.parseItems = function(items)
{
	for(var i=0; i<items.length; i++)
	{
		var linkTitle = items[i].getElementsByTagName("title")[0].firstChild.nodeValue;
		var title = "<a href='#' class='title' onclick='Aggregator.DisplayItem("+ this.id +", "+ i +");'>" + linkTitle +"</a>";
		this.titleArray.push(title);
		this.linkTitleArray.push(linkTitle);
		
		var _link = items[i].getElementsByTagName("link")[0].firstChild.nodeValue;
		this.linkArray.push(_link);
		
		var description = items[i].getElementsByTagName("description")[0].firstChild.nodeValue;
		this.descriptionArray.push(description);
		
		var pubDate = items[i].getElementsByTagName("pubDate")[0].firstChild.nodeValue;
		this.pubDateArray.push(pubDate);

		try { 
			var guid = items[i].getElementsByTagName("guid")[0].firstChild.nodeValue;
			this.guidArray.push(guid);
		}
		catch(err){}
	}
}

Feed.prototype.GetAllTitles = function()
{
	return this.titleArray;
}

Feed.prototype.GetDetails = function(id)
{
	details = "<a href='"+ this.linkArray[id] +"' target='_blank'>"+ this.linkTitleArray[id] +"</a><br/>";
	details += this.descriptionArray[id] +"<br/>";
	details += this.pubDateArray[id];
	details += '<br/><br/><embed src= "http://www.odeo.com/flash/audio_player_standard_gray.swf" quality="high" width="300" height="52" allowScriptAccess="always" wmode="transparent" type="application/x-shockwave-flash" flashvars="valid_sample_rate=true&external_url='+this.guidArray[id]+'" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>';
	return details;
}