<%-- $Id: NavigationComponent.jsp,v 1.19.4.7.2.6 2004/12/06 14:43:58 sudharshan Exp $ --%>

<%@page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="tree" uri="http://www.adventnet.com/webclient/tree-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="html" uri="http://jakarta.apache.org/struts/tags-html" %>
<%@ taglib prefix="html-el" uri="http://jakarta.apache.org/struts/tags-html-el"  %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>

<%@include file="/webclient/common/jspf/commonIncludes.jspf" %>
<SCRIPT LANGUAGE="JavaScript1.2" SRC="/webclient/common/js/LoadPageScript.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript1.2" SRC="/webclient/common/js/treeSelection.js"></SCRIPT>

<script>
function validateValues()
{
	if(eval("document.dashboard.name").value == "")
	{
		alert("Enter a valid device name");
		return false;
	}
	return true;
}
</script>

<table width="80%" cellpadding=4 cellspacing=0 border=0 align="center" >
  <c:choose>
    <c:when test="${selectedTab == 'Home'}">
    <tr height="17"><td colspan="2"> </td></tr>
    <c:forEach var="map" items="${maps}" > 
    <tr> 
    <c:set var="lists" value="${map.list}" />
    <td colspan="2" height="26" class="leftHeader"><fmt:message key='${map.displayName}'/></td>
    
    </tr>

    <c:forEach var="list1" items="${lists}" varStatus="loopstatus"> 
    <c:choose> 
    <c:when test="${loopstatus.count % 2 ==0}" > 
    <tr>
    <td height=24 nowrap class="txtGlobal"><img src="/webclient/common/images/dots.gif"  border="0" align="absmiddle">&nbsp;&nbsp; <a class="txtGlobal" href="<c:out value="${list1.url}" />"><c:out value="${list1.displayName}" /></a> 
     </td>
     </tr>
     </c:when> 
    
     <c:otherwise> 
     <tr> 
     <td height=17 nowrap class="txtGlobal" > <img src="/webclient/common/images/dots.gif"  border="0"> &nbsp;&nbsp;<a  class="txtGlobal" href="<c:out value="${list1.url}" />"><c:out value="${list1.displayName}" /></a> 
     </td>
     </tr>
     </c:otherwise> 
     </c:choose>        
     </c:forEach> 

    </c:forEach>  
  </table>  

</c:when> 
<c:otherwise> 


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

        <tr>
          <td>

        <c:choose>
           <c:when test='${Treetype =="SimpleTree"}'>
                <jsp:include page="/webclient/common/jsp/SimpleTree.jsp" />
           </c:when>
          <c:when test='${Treetype =="HideRootTree"}'>
                <jsp:include page="/webclient/common/jsp/HideRootTree.jsp" />
           </c:when>
          <c:when test='${Treetype =="HideLinesTree"}'>
                <jsp:include page="/webclient/common/jsp/HideLinesTree.jsp" />
           </c:when>
           <c:otherwise>

             <jsp:include page="/webclient/common/jsp/SwipeTree.jsp" />
           </c:otherwise>
  </c:choose>

<%-- The Tree model has been moved to a new file SimpleTree.jsp file --%>

<%--
      <tree:simpleTree dataSource="TreeModel" treeNodeRenderer="com.adventnet.nms.webclient.common.WebTreeRenderer" showRootNode="false" showLines="false" openFirstChild="true" nodeToOpen="path">

      <tr nowrap>

        <c:url var="link" value="${expand_collapse_link}">
           <c:param name="nodeClicked" value="${NODEID}"/>
        </c:url>

        <c:set var="level" value="${NODE_LEVEL}"/>
        <c:choose>
           <c:when test="${level != '0'}">
              <td nowrap height="23">
           </c:when>
           <c:otherwise>
              <td nowrap height="25" class="treeHeader">
           </c:otherwise>
        </c:choose>
        <c:choose>
           <c:when test="${level != '0'}">
           <img src="/webclient/common/images/trans.gif" width="4" height="1">
              <c:forEach var="image" items="${pageScope[\"TREE-IMAGES\"]}" varStatus="status">
                 <c:choose>
                    <c:when test="${image == 'ME'}">
                       <a href='<c:out value="${link}"/>&<c:out value="${querystring}"/>'><img src="/webclient/common/images/minus.gif" alt="Expand/Collapse Item" border="0" align="absmiddle"></a>
                    </c:when>
                    <c:when test="${image == 'MC'}">
                       <a href='<c:out value="${link}"/>&<c:out value="${querystring}"/>'><img src="/webclient/common/images/minus.gif" alt="Expand/Collapse Item" border="0" align="absmiddle"></a>
                    </c:when>
                    <c:when test="${image == 'PE'}">
                       <a href='<c:out value="${link}"/>&<c:out value="${querystring}"/>'><img src="/webclient/common/images/plus.gif"  border="0" align="absmiddle"></a>
                    </c:when>
                    <c:when test="${image == 'PC'}">
                       <a href='<c:out value="${link}"/>&<c:out value="${querystring}"/>'><img src="/webclient/common/images/plus.gif" border="0" align="absmiddle"></a>
                    </c:when>
                    <c:when test="${image == 'E'}">
                       <img src="/webclient/common/images/trcont.png" width="24" border="0" height="24" align="absmiddle">
                    </c:when>
                    <c:when test="${image == 'L'}">
                       <img src="/webclient/common/images/trend.png" width="24" border="0" height="24" align="absmiddle">
                    </c:when>
                    <c:when test="${image == 'V'}">
                       <img src="/webclient/common/images/trvline.png" width="24" border="0" height="24" align="absmiddle">
                    </c:when>
                    <c:when test="${image == 'S'}">
                    <c:choose>
                       <c:when test="${ status.last }">
          <img src='/webclient/common/images/treedot.gif' border="0" width="15" align="absmiddle">
                       </c:when>
                       <c:otherwise>
                        <img src="/webclient/common/images/trans.gif" border="0" width="9" height="15" align="absmiddle">
                       </c:otherwise>
                     </c:choose>
                    </c:when>
                 </c:choose>
              </c:forEach>
           </c:when>
        </c:choose>

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

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

	  <c:choose>
            <c:when test="${selectedNode == NODEID}">
             <a name='<c:out value="${NODEID}"/>' class="boldText" href='<c:out value="${treelink}"/>'> <c:out value="${DISPLAY_NAME}"/></a>
            </c:when>
            <c:otherwise> 
             <a name='<c:out value="${NODEID}"/>' class="text" href='<c:out value="${treelink}"/>'> <c:out value="${DISPLAY_NAME}"/></a>
            </c:otherwise> 
          </c:choose>
         </c:when>
        </c:choose>

      </td>
    </tr>

</tree:simpleTree>

--%>

</td>
</tr>

</table>

</c:otherwise>
</c:choose>

