function Tree(treeId, collapsedImagePath, expandedImagePath, leftIndentationMargin, expcolImageCssClass,  leafNodeCssClass, nodeCssClass, tooglingSpeed, data )
{
	this.treeRef = $(treeId);
	this.expandedImagePath = expandedImagePath;
	this.collapsedImagePath = collapsedImagePath;
	this.leftIndentationMargin = leftIndentationMargin;
	this.expcolImageCssClass = expcolImageCssClass;
	this.leafNodeCssClass = leafNodeCssClass;
	this.nodeCssClass = nodeCssClass;
	this.tooglingSpeed = tooglingSpeed;
	
	
 	this.TreeBuilder = function(data, ref, leftIndentationMargin)
	{
		for(var i=0; data.length > i; ++i)
		{
	
			var container = document.createElement("div");
			container.style.marginLeft = leftIndentationMargin;
			
 			var anchor = document.createElement("a");
 			anchor.href = data[i][2];
 			anchor.appendChild(document.createTextNode(data[i][1]));
 			
 			container.appendChild(anchor);
 	 		ref.appendChild(container);

 	 		if(typeof(data[i][4]) != 'undefined' && data[i][4].length > 0)
 	 		{
 	 			var img = document.createElement("img");
 	 		
 	 			img.setAttribute("id", this.treeRef.id + "_" + "img" + "_" + data[i][0]);
 	 			img.className = this.expcolImageCssClass;
 	 			container.insertBefore(img, anchor);
 	 			
 	 			container.className = this.nodeCssClass;
 	 			
 	 			var subContainer = document.createElement("div");
 	 			subContainer.setAttribute("id", this.treeRef.id + "_" + "div" + "_" + data[i][0]);
 	 	 		subContainer.style.marginLeft = leftIndentationMargin; 

 	 			ref.appendChild(subContainer);
 	 	 		this.TreeBuilder(data[i][4], subContainer, this.leftIndentationMargin);	
 	 	 		new PanelRoller(img, subContainer, this.expandedImagePath, this.collapsedImagePath, data[i][3], this.tooglingSpeed);
 	 	 	}
 	 	 	else
 	 	 		container.className = this.leafNodeCssClass;
		}
	}
	this.TreeBuilder(data, this.treeRef, 0);
}