var simpleTreeCollection;

$(document).ready(function(){

	simpleTreeCollection = $('.simpleTree').simpleTree({
		autoclose: true,
		afterAjax:function()
		{
			//alert('Loaded');
		},
		animate:true
		//,docToFolderConvert:true
   	});
});

function show_tree()
{
	var width = $("#tree").css("width");
	var height = $("#tree").css("height");
	
	width = width.substring(0, width.lastIndexOf("px")) * 1;
	height = height.substring(0, height.lastIndexOf("px")) * 1;
	
	if (width == 0)
		width = 550;
		
	if (height == 0)
		height = 330;
	
	var top = Math.round($(window).height() / 2) - Math.round(height / 2) + $(document).scrollTop();	
	var left = Math.round($(window).width() / 2) - Math.round(width / 2);
	
	$("#tree").css("top",top).css("left",left);
	$("#tree").show();
}
