\n"); outputFrame.write("\n"); outputFrame.write(prefixHTML + "\n\n"); if (treeData[1].target == "") {var targetFrame = defaultTargetFrame} else {var targetFrame = treeData[1].target} if (treeData[1].icon == "") {var imageString = defaultImageURL + 'img-globe-' + structureStyle + '.gif'} else {imageString = defaultImageURL + treeData[1].icon} outputFrame.write("" + treeData[1].url + " " + treeData[1].name + "
\n"); drawBranch("root",""); outputFrame.write("
\n" + suffixHTML + "\n"); outputFrame.write("
\ \n



"); outputFrame.close(); window.status="OmenTree v1.0 - (C) 1998 Colin Tucker/OmenSoft - http://omensoft.home.ml.org"; } function drawBranch(startNode,structureString) { var children = extractChildrenOf(startNode); var currentIndex = 1; while (currentIndex <= children.length) { outputFrame.write(structureString); if (children[currentIndex].type == 'link') { if (children[currentIndex].icon == "") { var imageString = defaultImageURL + defaultLinkIcon; } else {var imageString = defaultImageURL + children[currentIndex].icon} if (children[currentIndex].target == "") { var targetFrame = defaultTargetFrame; } else {var targetFrame = children[currentIndex].target} if (currentIndex != children.length) { outputFrame.write("") } else { outputFrame.write("") } outputFrame.write("" + children[currentIndex].url + " " + children[currentIndex].name + "
\n") } else { var newStructure = structureString; if (children[currentIndex].iconClosed == "") {var iconClosed = "img-folder-closed-" + structureStyle + ".gif"} else {var iconClosed = children[currentIndex].iconClosed} if (children[currentIndex].iconOpen == "") {var iconOpen = "img-folder-open-" + structureStyle + ".gif"} else {var iconOpen = children[currentIndex].iconOpen} if (currentIndex != children.length) { if (children[currentIndex].open == 0) { outputFrame.write("Click to open this folder") outputFrame.write("Click to open this folder " + children[currentIndex].name + "
\n") } else { outputFrame.write("Click to close this folder"); outputFrame.write("Click to close this folder " + children[currentIndex].name + "
\n"); newStructure = newStructure + ""; drawBranch(children[currentIndex].id,newStructure); } } else { if (children[currentIndex].open == 0) { outputFrame.write("Click to open this folder") outputFrame.write("Click to open this folder " + children[currentIndex].name + "
\n") } else { outputFrame.write("Click to close this folder"); outputFrame.write("Click to close this folder " + children[currentIndex].name + "
\n"); newStructure = newStructure + ""; drawBranch(children[currentIndex].id,newStructure); } } } currentIndex++; } } function toggleFolder(id,status) { var nodeIndex = indexOfNode(id); treeData[nodeIndex].open = status; timeOutId = setTimeout("drawTree()",100)} function indexOfNode(id) { var currentIndex = 1; while (currentIndex <= treeData.length) { if ((treeData[currentIndex].type == 'root') || (treeData[currentIndex].type == 'folder')) { if (treeData[currentIndex].id == id) {return currentIndex}} currentIndex++} return -1} function extractChildrenOf(node) { var children = new Collection(); var currentIndex = 1; while (currentIndex <= treeData.length) { if ((treeData[currentIndex].type == 'folder') || (treeData[currentIndex].type == 'link')) { if (treeData[currentIndex].parent == node) { children.add(treeData[currentIndex])}} currentIndex++} return children} function Collection() { this.length = 0; this.add = add; return this} function add(object) { this.length++; this[this.length] = object} function RootNode(id,name,url,target,icon) { this.id = id; this.name = name; this.url = url; this.target = target; this.icon = icon; this.type = 'root'; return this} function FolderNode(id,parent,name,iconClosed,iconOpen) { this.id = id; this.parent = parent; this.name = name; this.iconClosed = iconClosed; this.iconOpen = iconOpen; this.type = 'folder'; this.open = 0; return this} function LinkNode(parent,name,url,target,icon) { this.parent = parent; this.name = name; this.url = url; this.target = target; this.icon = icon; this.type = 'link'; return this} function loadData() { treeData = new Collection(); treeData.add(new RootNode('root','DF Web','welcome.html','','')); // Root Node MUST be first! treeData.add(new FolderNode('gifs','root','Animated GIF und JPEG','','')); treeData.add(new FolderNode('background','gifs','Background','','')); treeData.add(new LinkNode('background','Animated','gifs/background/animated.html','','img-page.html')); treeData.add(new LinkNode('background','Bunt','gifs/background/bunt.html','','img-page.html')); treeData.add(new LinkNode('background','Dunkel','gifs/background/dunkel.html','','img-page.html')); treeData.add(new LinkNode('background','Hell','gifs/background/hell.html','','img-page.html')); treeData.add(new LinkNode('background','Animated','gifs/background/mittel.html','','img-page.html')); treeData.add(new LinkNode('gifs','Baustelle','gifs/baustelle.html','','img-page.html')); treeData.add(new LinkNode('gifs','Buttons','gifs/buttons.html','','img-page.html')); treeData.add(new LinkNode('gifs','Flags','gifs/flags.html','','img-page.html')); treeData.add(new LinkNode('gifs','Guestbook','gifs/guestbook.html','','img-page.html')); treeData.add(new LinkNode('gifs','Mail','gifs/mail.html','','img-page.html')); treeData.add(new LinkNode('gifs','Trennlinien','gifs/linien.html','','img-page.html')); treeData.add(new FolderNode('sonstige','gifs','Sonstige','','')); treeData.add(new LinkNode('sonstige','Augen','gifs/sonstige/augen.html','','img-page.html')); treeData.add(new LinkNode('sonstige','Bullets','gifs/sonstige/bullets.html','','img-page.html')); treeData.add(new LinkNode('sonstige','Geld','gifs/sonstige/geld.html','','img-page.html')); treeData.add(new LinkNode('sonstige','Menschen','gifs/sonstige/menschen.html','','img-page.html')); treeData.add(new LinkNode('sonstige','Planeten','gifs/sonstige/planeten.html','','img-page.html')); treeData.add(new LinkNode('sonstige','Smiley','gifs/sonstige/smiley.html','','img-page.html')); treeData.add(new LinkNode('sonstige','Wirr','gifs/sonstige/wirr.html','','img-page.html')); treeData.add(new FolderNode('pics','root','Bilder','','')); treeData.add(new LinkNode('pics','Desktopmotive','bilder/desktopmotive.html','','img-page.html')); treeData.add(new FolderNode('links','root','Links','','')); treeData.add(new FolderNode('software','links','Software','','')); treeData.add(new LinkNode('software','Download.com','http://www.download.com/','_top','img-page-globe-link.html')); treeData.add(new LinkNode('software','DaveCentral','http://www.davecentral.com/','_top','img-page-globe-link.html')); treeData.add(new FolderNode('suchmaschinen','links','Suchmaschinen','','')); treeData.add(new LinkNode('suchmaschinen','AltaVista','http://www.altavista.digital.com/','','img-page-link.html')); treeData.add(new LinkNode('suchmaschinen','InfoSeek','http://www.infoseek.com/','','img-page-link.html')); treeData.add(new LinkNode('suchmaschinen','HotBot','http://www.hotbot.com/','','img-page-link.html')); treeData.add(new LinkNode('suchmaschinen','WebCrawler','http://www.webcrawler.com/','','img-page-link.html')); treeData.add(new LinkNode('suchmaschinen','Yahoo!','http://www.yahoo.com/','','img-page-link.html')); treeData.add(new LinkNode('suchmaschinen','Excite','http://www.excite.com/','','img-page-link.html')); treeData.add(new LinkNode('suchmaschinen','Lycos','http://www.lycos.com/','','img-page-link.html')); treeData.add(new FolderNode('email','root','E-mail','','')); treeData.add(new LinkNode('email','Daniel Fesenmeyer','mailto:[email protected]?subject=To the webmaster of DF Web','','img-email.html')); structureStyle = 1; // 0 for light background, 1 for dark background stylesheet = 'style/dfweb-stylesheet.css' backgroundColor = '#FFFFFF'; // sets the bgColor of the menu textColor = ''; // sets the color of the text used in the menu linkColor = '#0000AA'; // sets the color of any text links (usually defined in additional HTML sources) aLinkColor = '#FF0000'; // sets the active link color (when you click on the link) vLinkColor = '#880088'; // sets the visited link color backgroundImage = ''; // give the complete path to a gif or jpeg to use as a background image defaultTargetFrame = 'mainframe'; // the name of the frame that links will load into by default defaultImageURL = 'images/'; // the URL or path where the OmenTree images are located defaultLinkIcon = 'img-page-globe.html'; // the default icon image used for links omenTreeFont = 'MS Sans Serif,Arial,Helvetica'; // the font used for the menu omenTreeFontSize = 1; // its size - don't make it too big! prefixHTML = ""; suffixHTML = ""; }