/**
 * Facilitates the treePicker popup.
 */
var treePickerPrevPath = "";

function openTreeSelector(targetField, displayField, startWithEntity, fieldType, append, seperator, prePost, atCursorPos, namePath) {
	if (!append) append = false;
	if (!seperator) seperator = false;
	if (!fieldType) fieldType = "";
	if (!prePost) prePost = "";
	if (!atCursorPos) atCursorPos = false;
	if (!namePath) namePath = false;
	window.open('TreePicker.action?targetField='+targetField+
			                     '&displayField=' + displayField + 
								 '&entity=' + startWithEntity + 
								 '&path=' + treePickerPrevPath + 
								 '&fieldType=' + fieldType + 
								 '&append=' + append +
								 '&seperator=' + seperator +
								 '&prePost=' + prePost +
								 '&atCursorPos=' + atCursorPos +
								 '&namePath=' + namePath,
			    'treePicker', 'width=300,height=400,scrollbars=yes,toolbar=no,location=no,status=no,resizable=yes,menubar=no,directories=no'); 
}