function Breadcrumb(container,objectList)
{
	this.container=container;
	this.objectList=objectList;
	this.separator=' » ';
}

Breadcrumb.prototype = {
	
	render : function()
	{
		for (var i=this.objectList.length-1;i>=0;i--)
		{
			text=document.createTextNode(this.objectList[i].title);
			link=document.createElement('a');
			link.setAttribute('href',this.objectList[i].link);
			link.appendChild(text);	
					
			this.container.appendChild(link);
			
			if (i!=0)	this.container.appendChild(document.createTextNode(this.separator));
			else	link.className+=' active';
		}
		
		if (this.objectList.length>0)
			this.container.show();
	},
	
	push : function(title,link)
	{
		this.objectList[this.objectList.length]={title:title,link:link};
	}
}
