var TREE_TPL = {

	// general
	'target':'_self',	// name of the frame the links will be opened in
						// predefined values are:
						// _blank, _parent, _search, _self and _top
						// see HTML specification for more information on link's target attribute

	'contID' : 'treeID', // ID of the element in which to initialize the tree, if element with that ID doesn't exist the tree will create one
	'contClass' : 'treeClass', // the CSS class to assign to the tree container if one is created by the tree

	'msgLoading' : '<div style="font-weight:bold">Loading...</div>', // HTML code to display inside the tree container while the data is being loaded
	'ajaxURL' : 'cgi-bin/vianb/private/converse/list.cgi', // URL of the back end script processing AJAX requests
	'multiselect': false, // multiselect switch false - selecting one item unselects the last, true - clicking the item toggles the selection without affecting the rest of the items
	'itemTextEx': 'f_myShowSize', // optional - the name of the function that generates additional item's HTML
	'preEvent' : 'f_myPreEvent',
	'postEvent' : null,

	// NOTE: for information on numeric indexes used in icon_* and styles_* see comments in function f_itemUpdateProps
	// Keep in mind that some bits may be masked in different situations as not relevant
						
	// icons - default
	// 'icon_0':'http://groupeconversationpapillon.com/vianb/images/tigra/tree/page.gif', // leaf icon normal
	'icon_0':'http://groupeconversationpapillon.com/vianb/images/mlm/green.jpg', // leaf icon normal

	// icons - node	
	// 'icon_16' :'http://groupeconversationpapillon.com/vianb/images/tigra/tree/folder.gif', // node icon normal
	// 'icon_144':'http://groupeconversationpapillon.com/vianb/images/tigra/tree/folder_wait.gif', // node icon loading
	
	// 'icon_24':'http://groupeconversationpapillon.com/vianb/images/tigra/tree/folderopen.gif', // node icon opened
	// 'icon_80':'http://groupeconversationpapillon.com/vianb/images/tigra/tree/folder.gif', // mouseovered node icon normal
	// 'icon_88':'http://groupeconversationpapillon.com/vianb/images/tigra/tree/folderopen.gif', // mouseovered node icon normal

	// NEW icons - node	
	'icon_16' :'http://groupeconversationpapillon.com/vianb/images/mlm/green.jpg', // node icon normal
	'icon_144':'http://groupeconversationpapillon.com/vianb/images/mlm/green.jpg', // node icon loading
	
	'icon_24':'http://groupeconversationpapillon.com/vianb/images/mlm/green.jpg', // node icon opened
	'icon_80':'http://groupeconversationpapillon.com/vianb/images/mlm/green.jpg', // mouseovered node icon normal
	'icon_88':'http://groupeconversationpapillon.com/vianb/images/mlm/green.jpg', // mouseovered node icon normal

	// icons - root	
	// 'icon_32':'http://vianb.com/vianb/images/tigra/tree/base.gif', // root icon normal
	'icon_32':'http://groupeconversationpapillon.com/vianb/images/mlm/green.jpg', // root icon normal

	// junctions - root node
	'icon_50':'http://groupeconversationpapillon.com/vianb/images/tigra/tree/plusroot.gif', // junction for closed root
	'icon_51':'http://groupeconversationpapillon.com/vianb/images/tigra/tree/plusroot.gif', // junction for last closed root
	'icon_58':'http://groupeconversationpapillon.com/vianb/images/tigra/tree/minusroot.gif', // junction for opened root
	'icon_59':'http://groupeconversationpapillon.com/vianb/images/tigra/tree/minusroot.gif', // junction for last open root

	// junctions - root leaf
	'icon_34':'http://groupeconversationpapillon.com/vianb/images/tigra/tree/empty.gif', // junction for leaf root
	'icon_35':'http://groupeconversationpapillon.com/vianb/images/tigra/tree/empty.gif', // junction for last leaf root
	
	// junctions - node
	'icon_18':'http://groupeconversationpapillon.com/vianb/images/tigra/tree/plusbottom.gif', // junction for closed node
	'icon_19':'http://groupeconversationpapillon.com/vianb/images/tigra/tree/plus.gif', // junction for last closed node
	'icon_26':'http://groupeconversationpapillon.com/vianb/images/tigra/tree/minusbottom.gif', // junction for opened node
	'icon_27':'http://groupeconversationpapillon.com/vianb/images/tigra/tree/minus.gif', // junction for last open node

	// junctions - leaf
	'icon_2':'http://groupeconversationpapillon.com/vianb/images/tigra/tree/joinbottom.gif', // junction for leaf
	'icon_3':'http://groupeconversationpapillon.com/vianb/images/tigra/tree/join.gif', // junction for last leaf
	
	// icons - misc
	'icon_e':'http://groupeconversationpapillon.com/vianb/images/tigra/tree/empty.gif', // empty image
	'icon_l':'http://groupeconversationpapillon.com/vianb/images/tigra/tree/line.gif', // vertical line

	// styles - default
	'style_0'  : 'mout',
	
	// styles - selected (4+)
	'style_4'  : 'mout sel', // leaf
	'style_20' : 'mout sel', // node
	'style_148': 'mout sel', // node loading
	'style_28' : 'mout sel', // node open
	'style_36' : 'mout sel', // leaf root 
	'style_52' : 'mout sel', // node root 
	'style_60' : 'mout sel', // node root open
	
	// styles - mouseover (64+)
	'style_64' : 'mover', // leaf
	'style_80' : 'mover', // leaf root 
	'style_96' : 'mover', // node root
	'style_112': 'mover', // node root open 

	// styles - mouseover selected (68+)
	'style_68' : 'mover sel', // leaf
	'style_84' : 'mover sel', // node
	'style_212': 'mover sel', // node loading
	'style_92' : 'mover sel', // node open 
	'style_100': 'mover sel', // leaf root 
	'style_116': 'mover sel', // node root 
	'style_244': 'mover sel', // node root loading
	'style_124': 'mover sel'  // node root open
};

// sample function demonstrating the use of itemTextEx key in the template configuration (see above)
function f_myShowSize(o_item) {
	var s_title = o_item.e_ahref.getAttribute('myCustomAttr');
	return s_title ? '<span class="itemNote">' + s_title + '</span>' : '';
}

function f_myPreEvent (s_event, o_item) {
	// s_event: mouseover, mouseout, toggle, select

//	if (s_event == 'select')
//		alert('intercepted select for "' + o_item.s_text + '"');

	// return false to cancel the default processing
	return true;
}

