function Breadcrumbs( sInID, oInPageVar ){
	this.ID = sInID;
	this.PageVar = oInPageVar;
	
	// VisType:
	// 1: Hidden
	// 2: Visible, Plain Text
	// 3: Visible, Hyperlink
	this.SelfVis = 1;
	this.RootVis = 1;
	this.Separator = '';
	
	this.ShowBreadcrumbs = function ShowBreadcrumbs(){
		// root
		if( this.PageVar.Parents.length > 0 && this.RootVis == 3 ){
			this.ShowLink( this.PageVar.Parents[ this.PageVar.Parents.length - 1 ] );
			this.ShowSeparator();
		}
		// parents
		for( var i = 0; i < this.PageVar.Parents.length - 1; i++ ){
			this.ShowLink( this.PageVar.Parents[ this.PageVar.Parents.length - 2 - i ] );
			this.ShowSeparator();
		}
		// self
		if( this.SelfVis == 2 ){
			this.ShowText( this.PageVar.NodeInfo );
		}
		else if( this.SelfVis == 3 ){
			this.ShowLink( this.PageVar.NodeInfo );
		}
	}
	
	this.ShowLink = function ShowText( oInNode ){
		document.write('<A HREF="' + oInNode.NodeLink + '"');
		document.write(' CLASS="BreadCrumbs_Link_' + this.ID + '"');
		document.write('>' + oInNode.PageName + '</A>');
	}
	
	this.ShowText = function ShowLink( oInNode ){
		document.write('<SPAN CLASS="BreadCrumbs_Text_' + this.ID + '"');
		document.write('>' + oInNode.PageName + '</SPAN>');
	}
	
	this.ShowSeparator = function ShowSeparator(){
		document.write('<SPAN CLASS="BreadCrumbs_Text_' + this.ID + '"> ' + this.Separator + ' </SPAN>');
	}
}
