[% FOREACH network IN networks %]

	[% IF network.parent %][% UNLESS network.noDiv %]<div id='[% network.rootID %].[% network.networkDec %]'>[% END %][% END %]
	<div class='tE' [% IF network.bgColor %]style='background-color:#[% network.bgColor %];'[% END %]>

	[% IF showTreeStructure %]
		[% IF network.GUINetCache %]
			[% FOR entry in network.GUINetCache %]
				[% name					= entry.level %]
				[% noLine.$name	= entry.value %]
			[% END %]
		[% END %]
	
		[% IF network.lastParent %]
			[% name					= network.lastParent %]
			[% noLine.$name	= 1 %]
		[% END %]

		[% level	= 1 %]
		[% WHILE level <= network.level %]
			<span class='tE'><img class='tES' src='[% imagepathrel %]/[% IF level < (network.level - 0)%][% IF noLine.$level %]noLine.png[% ELSE %]vertLine.png[% END %][% ELSE %][% IF network.parentBroadcast || network.lastParent %]tLine.png[% ELSE %]tLine.png[% END %][% END %]' /></span>
			[% level = level + 1 %]
		[% END %]
	[% ELSE %]
		<div id='tS' style='width:[% network.space %]px;'></div>
	[% END %]


	[% IF network.parent %]
		<a class='tE' onClick="[% network.picUrl %]" title="[% network.picTitle %]"><img class='tE' src='[% imagepathrel %]/[% IF network.expanded %]minus.gif[% ELSE %]plus.gif[% END %]' /></a>
	[% ELSE %]
		[% IF showTreeStructure %]
			<span class='tE'><img class='tES' src='[% imagepathrel %]/horizLine.png' /></span>
		[% ELSE %]
			<div id='tSFW'></div>
		[% END %]
		[% IF editTree %]
			[% IF network.fillNet %]
				<div id='tSFW'></div>
			[% END %]
		[% END %]
	[% END %]

	[% IF editTree %]
		[% UNLESS network.fillNet %]
			<input type	= 'checkbox' class	= 'tE' name	= 'selectedNetworks' id		= 'selectedNetworks' value	= '[% network.network %]_[% network.rootID %]' />
		[% END %]
	[% END %]
	<div class='tL[% IF network.ipv6 %]6[% END %]' >
	[% IF network.netUrl %]
		<a name="[% network.rootID %]-[% network.networkDec %]" onClick="[% network.netUrl %]" class='tLN'><font color='[% network.color %]'>[% network.network %]</font></a>
	[% ELSE %]
		<font color='[% network.color %]'><span class='tLN'>[% network.network %]</span></font>
	[% END %]
	[% IF network.statePic %]
		<img class="tE1" src="[% imagepathrel %]/[% network.statePic %]" alt="[% network.stateAlt %]" title="[% network.stateAlt %]"/>
	[% END %]
	[% IF network.defSubnetSize %]
		<span class=tdS alt='[% network.gettext_defSubnetSize %]'>[/[% network.defSubnetSize %]]</span>
	[% END %]
	</div>
	<p id='tD'>
		[% IF network.invisible %]
			<font color="#AAAAAA">[% network.descr %]</font>
		[% ELSE %]
			[% network.descr %]
		[% END %]
	</p>
	[% IF directaccess %]
		[% UNLESS network.fillNet OR network.invisible %]
			[% IF network.bEditNet %]
				<img class="tE3" src="[% imagepathrel %]/[% network.editPic %]" alt="[% network.editAlt %]" title="[% network.editAlt %]" onClick="[% network.editNetUrl %]" />
			[% END %]
			[% IF network.bDelNet %]
			<img class="tE3" src="[% imagepathrel %]/[% network.delPic %]" alt="[% network.delAlt %]" title="[% network.delAlt %]" onClick="[% network.delNetUrl %]" />
			[% END %]
		[% END %]
	[% END %]
	<div style='clear:left'></div>
	</div>
	[% IF network.parent %][% UNLESS network.expanded %]</div>[% END %][% END %]
	[% IF network.parentBroadcast %]
		[% iE = [ 1 .. network.parentBroadcast ] %]
		[% FOREACH i IN iE %]
			</div>
		[% END %]
	[% END %]
[% END %]
