<script type="text/javascript">
jQuery(function(){
	<{foreach item=index from=$block.indexes}>
	jQuery('#<{$block.dirname}>_index_tree_<{$index.index_id}>').treeview({
		control: '#<{$block.dirname}>_treecontrol',
		persist: 'cookie',
		cookieId: '<{$block.dirname}>_index_treeview_<{$index.index_id}>'
	});
	<{/foreach}>
	jQuery('#<{$block.dirname}>_index_tree_tabs').tabs({ 
		cookie: {}
	});
});
</script>
<div id="<{$block.dirname}>_treecontrol" style="float: none; clear: both; margin: 0px 0px 3px 0px; padding: 0px;">
<button class="formButton">open all</button>
<button class="formButton">close all</button>
<{if $block.checkbox}>
	<button class="formButton" id="<{$block.dirname}>_index_tree_clear_button">clear</button>
	<script type="text/javascript">
	jQuery(function(){
		var <{$block.dirname}>Edit = new XoonipsEdit.edit('<{$xoops_url}>', '<{$block.dirname}>', 'itemindexeditform');
		<{$block.dirname}>Edit.setIndexTreeButton('');
	});
	</script>
<{/if}>
</div>
<div style="margin: 0px; padding: 0px;font-size:80%;" id="<{$block.dirname}>_index_tree_tabs">
<ul>
<{foreach item=index from=$block.indexes}>
	<li><a href="#<{$block.dirname}>_index_tree_div_<{$index.index_id}>"><{$index.title|xoops_escape}></a></li>
<{/foreach}>
</ul>
<{foreach item=tree from=$block.trees}>
	<div id="<{$block.dirname}>_index_tree_div_<{$tree.index_id}>" style="border-right: 1px solid #404040;border-top: 1px solid #e4e4e4; border-left: 1px solid #e4e4e4;
    	border-bottom: 1px solid #858585; border-right: 1px solid #858585; padding: 0px; margin: 0px;">
	<ul id="<{$block.dirname}>_index_tree_<{$tree.index_id}>" class="filetree">
	<{$tree.html}>
	</ul>
	</div>
<{/foreach}>
</div>
