home *** CD-ROM | disk | FTP | other *** search
- <!-- Document that displays the tree-structured TOC-->
- <%
- L_CACHE_TEXT = "This server is not cached. Expand to load"
- L_CONNECTED_TEXT = "(connected)"
- L_EXPAND_TEXT = "Expand Node"
- L_COLLAPSE_TEXT = "Collapse Node"
- %>
-
- <HTML>
- <HEAD>
- <script language="Javascript">
-
-
- function writeSelected(isSelected)
- {
- document.write("<TABLE BORDER = 0 CELLPADDING = 0 CELLSPACING=0><TR><TD>");
-
- for (x=1; x < theLevel; x++)
- {
-
- gParent = getGrandParent(i,theLevel-x)
- if (theList[gParent].lastChild)
- {
- document.write("<IMAGE SRC='"+gVars.spaceImg+"' WIDTH = 16>");
- }
- else
- {
- document.write("<IMAGE SRC='"+gVars.lineImg+"' WIDTH = 16>");
- }
- }
-
- document.write("</TD><TD>");
-
- if (((i+1) < listLength) && (theList[i+1].parent == i) && (!theList[i+1].deleted) || (!theList[i].isCached))
- {
- if (theList[i].open)
- {
- document.write("<A HREF='javascript:expand("+i+")'><IMAGE SRC='");
- if (!theList[i].lastChild)
- {
- document.write(gVars.minusImg);
- }
- else
- {
- document.write(gVars.minusImgLast);
- }
- document.write("' WIDTH =16 HEIGHT=18 Border = 0 ALT='<%=L_COLLAPSE_TEXT%>'></A>");
- }
- else
- {
- document.write("<A HREF='javascript:expand("+i+")'><IMAGE SRC='");
- if (!theList[i].lastChild)
- {
- document.write(gVars.plusImg);
- }
- else
- {
- document.write(gVars.plusImgLast);
- }
- document.write("' WIDTH =16 HEIGHT=18 Border = 0 ALT='<%=L_EXPAND_TEXT%>'></A>");
- }
- }
- else{
- if (theList[i].lastChild)
- {
- document.write("<IMAGE SRC='");
- document.write(gVars.emptyImgLast);
- document.write("' WIDTH =16 HEIGHT=18 Border = 0>");
- }
- else
- {
- document.write("<IMAGE SRC='");
- document.write(gVars.emptyImg);
- document.write("' WIDTH =16 HEIGHT=18 Border = 0>");
- }
- }
-
- document.write("</TD>");
-
- <% REM ##################################################### %>
-
- <% REM Builds the links and images for each node in the tree %>
-
- <% REM ##################################################### %>
-
- if (isSelected)
- {
- document.write("<TD><A HREF='javascript:editItem("+i+")'>");
- if (theList[i].icon != "")
- {
- if ((theList[i].icon == "images/slideroff") || (theList[i].icon == "images/slidersp") || (theList[i].icon == "images/sliderend") || (theList[i].icon == "images/slideron"))
- {
- thisImageState = "";
- }
- else
- {
- <% REM if the server state is paused ("6") then set the imagestate to 3 %>
- <% REM the gif name for paused is suffixed with a "3" %>
-
- if(theList[i].state == 6)
- {
- thisImageState = 3;
- }
- else
- {
- thisImageState = theList[i].state;
- }
- }
- if (theList[i].isCached)
- {
- document.write("<IMAGE BORDER=0 SRC='"+theList[i].icon+thisImageState+".gif'><IMAGE BORDER = 0 SRC='"+gVars.spaceImg+"' HSPACE="+gVars.hSpace+"></TD>");
- }
- else
- {
- document.write("<IMAGE BORDER=0 SRC='"+theList[i].icon+thisImageState+".gif' ALT='<%=L_CACHE_TEXT%>'><IMAGE BORDER=0 SRC='"+gVars.spaceImg+"' HSPACE="+gVars.hSpace+"></TD>");
- }
- }
- document.write("</A></TD>");
-
- document.write("<TD BGCOLOR='"+gVars.selTColor+"'>");
- document.write("<FONT FACE="+gVars.face+" SIZE="+gVars.fSize+" COLOR='"+gVars.selFColor+"'>");
- document.write("<A HREF='javascript:editItem("+i+")'>");
- document.write(theList[i].title);
- if (theList[i].isWorkingServer)
- {
- document.write(" <%=L_CONNECTED_TEXT%>");
- }
- document.write("</A></TD>");
- }
- else
- {
- document.write("<TD><A HREF='javascript:selectItem("+i+")'>");
- if (theList[i].icon != "")
- {
- if ((theList[i].icon == "images/slideroff") || (theList[i].icon == "images/slidersp") || (theList[i].icon == "images/sliderend") || (theList[i].icon == "images/slideron"))
- {
- thisImageState = "";
- }
- else
- {
- <% REM if the server state is paused ("6") then set the imagestate to 3 %>
- <% REM the gif name for paused is suffixed with a "3" %>
-
- if(theList[i].state == 6)
- {
- thisImageState = 3;
- }
- else
- {
- thisImageState = theList[i].state;
- }
- }
-
- if (theList[i].isCached)
- {
- document.write("<IMAGE BORDER = 0 SRC='"+ theList[i].icon + thisImageState + ".gif'><IMAGE BORDER=0 SRC='" + gVars.spaceImg + "' HSPACE=" + gVars.hSpace + "></TD>");
- }
- else
- {
- document.write("<IMAGE BORDER = 0 SRC='"+ theList[i].icon + thisImageState + ".gif' ALT = '<%=L_CACHE_TEXT%>'><IMAGE BORDER=0 SRC='" + gVars.spaceImg+"' HSPACE=" + gVars.hSpace + "></TD>");
- }
- }
- document.write("</A></TD>");
-
- document.write("<TD>");
- document.write("<FONT FACE="+gVars.face+" SIZE="+gVars.fSize+" COLOR='"+gVars.selFColor+"'>");
- document.write("<A HREF='javascript:selectItem("+i+")'>");
- document.write(theList[i].title);
- if (theList[i].isWorkingServer)
- {
- document.write(" <%=L_CONNECTED_TEXT%>");
- }
- document.write("</A></TD>");
- }
-
-
- document.write("</TR></TABLE>");
- }
-
- function getGrandParent(item,numLevels)
- {
- var theItem = item;
- for (z=0; z < numLevels; z++)
- {
- theItem = theList[theItem].parent;
- }
-
- return theItem;
- }
-
- function expand(item)
- {
- if (theList[item].isCached)
- {
- theList[item].open = !(theList[item].open);
- selectItem(item);
- self.location=self.location;
- }
- else
- {
-
- theList[item].cache(item);
- }
-
- }
-
-
- function selectItem(item)
- {
- if (theList[item].isCached)
- {
- theList[gVars.selId].selected = false;
- gVars.selId = item;
- theList[item].selected = true;
- self.location=self.location;
- }
- else
- {
- theList[item].cache(item);
- }
- }
-
- function editItem(item)
- {
- theList[item].openLocation();
- }
-
-
- function printList()
- {
- document.write("<TABLE><TR>");
- document.write("<TD>ID ");
- document.write("<TD>Title ");
- document.write("<TD>Parent ");
- document.write("<TD>Level ");
- document.write("<TD>isOpen ");
- document.write("<TD>lastChild ");
- document.write("</TR>");
- for (var i = 0; i < theList.length; i++)
- {
- document.write("<TR>")
- document.write("<TD>"+theList[i].id + " ");
- document.write("<TD>"+theList[i].title+ " ");
- document.write("<TD>"+theList[i].parent+ " ");
- document.write("<TD>"+theList[i].level+ " ");
- document.write("<TD>"+theList[i].open+ " ");
- document.write("<TD>"+theList[i].lastChild+ " <P>");
- document.write("</TR>");
- }
- document.write("</TABLE>");
- }
-
-
- </script>
- <BODY BGCOLOR="#FFFFFF" LINK="#000000">
-
- <SCRIPT LANGUAGE="JavaScript">
- var theList = top.head.cList;
- var gVars = top.head.Global;
- var listLength = theList.length;
- document.write("<TABLE BORDER = 0 WIDTH ="+gVars.tblWidth+" ><TR><TD WIDTH =100%>");
-
- for (i=0; i < listLength; i++)
- {
- if (!theList[i].deleted)
- {
- theParent = theList[i].parent;
- theLevel = theList[i].level;
-
- if (theParent == null)
- {
- writeSelected(theList[i].selected);
- }
- else{
- curParent = theParent;
- isOpen = true;
- while(isOpen)
- {
- if (theList[curParent].parent == null)
- {
- isOpen = (theList[curParent].open);
-
- break;
- }
- if (!theList[curParent].open)
- {
- isOpen = false;
- break;
- }
- curParent = theList[curParent].parent;
- }
-
- if (isOpen)
- {
-
- writeSelected(theList[i].selected);
- }
- }
- }
-
-
- }
-
- document.write("</TD></TR></TABLE>");
-
-
- </SCRIPT>
- </BODY>
- </HTML>
-