<%-- $Id: SwipeTree.jsp,v 1.1.2.7 2004/11/18 12:27:54 gnanasekar Exp $ --%>

<%@ taglib uri="http://www.adventnet.com/webclient/tree-tags" prefix="tree"%>
<link href="styles/style.css" rel="stylesheet" type="text/css">
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<body>

<table width="98%" align="center" cellspacing="0" cellpadding="0" border="0">

   <tr> 
        <td colspan="2" height="22" class="leftHeader"><c:out value='${tabProps[selectedTab]}' /></td>
  </tr>  
  <tr> 
     <td height="2" colspan="2" class="blueLine"></td>
   </tr>

	<tree:swipeTree dataSource="TreeModel" treeNodeRenderer="com.adventnet.nms.webclient.common.WebTreeRenderer" showRootNode="false" showLines="false" >
	<tr>
		<td nowrap height="24">

       <c:choose>
         <c:when test="${NODE_LEVEL != '0'}">
        <c:choose>   
          <c:when test ="${NODE_LEVEL == '1'}">

           <c:url var="link" value="${ACTION_LINK}">
             <c:param name="selectedTab" value="${selectedTab}"/>
             <c:param name="viewId" value="${NODEID}"/>
             <c:param name="displayName" value="${DISPLAY_NAME}"/>
            <c:param name="firstChild" value="false"/>
			 <c:param name="swipe" value="true"/>   
             <c:param name="nodeClicked" value="${NODEID}"/>
             <c:param name="selectedNode" value="${NODEID}"/>
           </c:url>
         </c:when>
        <c:otherwise> 

            <c:url var="link" value="${ACTION_LINK}">
             <c:param name="selectedTab" value="${selectedTab}"/>
             <c:param name="viewId" value="${NODEID}"/>
             <c:param name="displayName" value="${DISPLAY_NAME}"/>
  			 <c:param name="swipe" value="true"/>   
             <c:param name="nodeClicked" value="${NODEID}"/>
             <c:param name="selectedNode" value="${NODEID}"/>
           </c:url>

        </c:otherwise> 
     </c:choose>
 <%--
           	<c:url var="link" value="${ACTION_LINK}">
				<c:param name="nodeClicked" value="${NODEID}"/>
				<c:param name="selectedNode" value="${NODEID}"/>
				<c:param name="swipe" value="true"/>
			</c:url>

--%>
			<c:forEach var="image" items="${pageScope[\"TREE-IMAGES\"]}" varStatus="status">
				<c:choose>
					<c:when test="${image == 'ME'}">
						<a href='<c:out value="${link}"/>'><img src="/webclient/common/images/arrow_treeexpand.gif" alt="Expand/Collapse Item"  border="0" align="absmiddle"></a>
					</c:when>
					<c:when test="${image == 'MC'}">
						<a href='<c:out value="${link}"/>'><img src="/webclient/common/images/arrow_treeexpand.gif" alt="Expand/Collapse Item"  border="0" align="absmiddle"></a>
					</c:when>
					<c:when test="${image == 'PE'}">	
						<a href='<c:out value="${link}"/>'><img src="/webclient/common/images/arrow.gif"  border="0" align="absmiddle"></a>
					</c:when>
					<c:when test="${image == 'PC'}">	
						<a href='<c:out value="${link}"/>'><img src="/webclient/common/images/arrow.gif"  border="0"  align="absmiddle"></a>
					</c:when>
					<c:when test="${image == 'E'}">	
						<a href='<c:out value="${link}"/>'><img src="/webclient/common/images/trcont.png"  border="0"  align="absmiddle"></a>
					</c:when>
					<c:when test="${image == 'L'}">	
						<a href='<c:out value="${link}"/>'><img src="/webclient/common/images/dots.gif"  border="0" align="absmiddle"></a>
					</c:when>
					<c:when test="${image == 'V'}">	
						<a href='<c:out value="${link}"/>'><img src="/webclient/common/images/trvline.png" width="24" border="0" height="24" align="absmiddle"></a>
					</c:when>
					<c:when test="${image == 'S'}">

                    <c:choose>
                       <c:when test="${ status.last }">
                          <img src='/webclient/common/images/dots.gif' border="0"  align="absmiddle">
                       </c:when>
                       <c:otherwise>
                          <img src="/webclient/common/images/trans.gif" border="0" align="absmiddle">
                       </c:otherwise>
                     </c:choose>

					
					</c:when>	
				</c:choose>
			</c:forEach>

<%--
<c:out value='${NODE_LEVEL}' />

<c:out value='${NODEID}' />  
<c:out value='${selectedNode}' />
	
--%>      
	       <c:choose>
              <c:when test="${selectedNode == NODEID  }">
                 <a name='<c:out value="${NODEID}"/>' class="boldTxtGlobal" href='<c:out value="${link}"/>'> <c:out value="${DISPLAY_NAME}"/></a>
              </c:when>
              <c:otherwise> 
                  <a name='<c:out value="${NODEID}"/>' class="txtGlobal" href='<c:out value="${link}"/>'> <c:out value="${DISPLAY_NAME}"/></a>
              </c:otherwise> 
           </c:choose>
         </c:when>
      </c:choose>

	</font>
  </td>
</tr>
</tree:swipeTree>
</table>
