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 top = Math.round($(window).height() / 2) - Math.round(height / 2) + $(document).scrollTop()/2;	
	var left = Math.round($(window).width() / 2) - Math.round(width / 2);
	
	$("#tree").css("top",top).css("left",left);
	$("#tree > .simpleTree").show();
	$("#tree").show();
}

function show_tree_all(elem)
{
	var id = $(elem).attr('id');
	var overbody_id = '#tree-' + id.replace(/-edit$/gi, "");
	var width = $(overbody_id).css("width");
	var height = $(overbody_id).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 top = Math.round($(window).height() / 2) - Math.round(height / 2) + $(document).scrollTop()/2;	
	var left = Math.round($(window).width() / 2) - Math.round(width / 2);
	
	$(overbody_id).css("top",top).css("left",left);
	$(overbody_id + ' > .simpleTree').show();
	$(overbody_id).show();
}
