[leg_layer_html order=ascending opt_flag=15]

[if name=CWC_TMP_LAYER oper=isnull]
[if name=WMS_SHOWINLEGEND oper=isnull] 

  <tr bgcolor="#FFFFFF">
[if name=layer_group oper=isnull]
    <td align="center"><input type="checkbox" name="legendlayername[]" value="[leg_layer_name]"
[/if]

[if name=layer_group oper=isset]
    <td align="center"><input type="checkbox" name="legendlayername[]" value="[leg_layer_name]"
[/if]

    [if name=layer_status oper=eq  value=1]CHECKED[/if]
    [if name=layer_status oper=eq value=2]CHECKED[/if]>
</td>
    [if name=wms_name oper=isnull]

<td><a href="#" onclick="javascript:LegendTemplateLayerInfo('[leg_layer_name]');"><font face="Arial, Helvetica, sans-serif" size="1">[leg_layer_name]</font></a></td>
  </tr>
    [/if]
    [if name=wms_name oper=isset]
    <td><a href="#" onclick="javascript:LegendTemplateLayerInfo('[leg_layer_name]');"><font face="Arial, Helvetica, sans-serif" size="1">[metadata name=WMS_TITLE]</font></a></td>
  </tr>
    [/if]

[/if]
[/if]

[/leg_layer_html]