\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 + "<\/A> " + treeData[1].name + "<\/B>
\n"); drawBranch("root",""); outputFrame.write("<\/NOBR>\n" + suffixHTML + "\n"); outputFrame.write("<\/FONT>\n<\/BODY>\n<\/HTML>"); 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 + "<\/A> " + 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<\/A> " + children[currentIndex].name + "
\n") } else { outputFrame.write("
Click to close this folder"); outputFrame.write("Click to close this folder<\/A> " + 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<\/A> " + children[currentIndex].name + "
\n") } else { outputFrame.write("
Click to close this folder"); outputFrame.write("Click to close this folder<\/A> " + 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','Railwaysoftware','indexp.html','','')); // Root Node MUST be first! treeData.add(new FolderNode('gb','root','Main folder','','')); treeData.add(new FolderNode('folders','gb','General','','')); treeData.add(new LinkNode('folders','Links Page','linksgbrw.html#root','','')); treeData.add(new LinkNode('folders','Newsarchive','newsarch1gbrw.html#folders','','')); treeData.add(new LinkNode('folders','Guest Book','guest.html#links','','')); treeData.add(new FolderNode('simgb','gb','Trainsims','','')); treeData.add(new FolderNode('bosogb','simgb','BVE','','')); treeData.add(new LinkNode('bosogb','BVE page 1','bvgblrw.html#links','','')); treeData.add(new FolderNode('bahngb','simgb','BAHN','','')); treeData.add(new LinkNode('bahngb','BAHN page 1','bahngbrw.html#links','','')); treeData.add(new LinkNode('bahngb','BAHN page 2','bahngbrw2.html#links','','')); //treeData.add(new LinkNode('bahngb','BAHN screenshots','bahnscrsrw.html#links','','')); treeData.add(new FolderNode('mts','simgb','MTS','','')); treeData.add(new LinkNode('mts','MTS page','mts.html#links','','')); treeData.add(new LinkNode('mts','projects 1','mtspro.html#links','','')); treeData.add(new LinkNode('mts','projects 2','mtspro2.html#links','','')); treeData.add(new LinkNode('mts','projects 3(NEW)','mtspro3.html#links','','')); treeData.add(new LinkNode('mts','myproject','mtspro4.html#links','','')); treeData.add(new FolderNode('history','gb','Porter History','','')); treeData.add(new LinkNode('history','Start Page','pormaingbrw.html#links','','')); treeData.add(new LinkNode('history','Page 1','por1gbrw.html#links','','')); treeData.add(new LinkNode('history','Page 2','por1Agbrw.html#links','','')); treeData.add(new LinkNode('history','Page 3','por1Bgbrw.html#links','','')); treeData.add(new LinkNode('history','Page 4','por2gbrw.html#links','','')); treeData.add(new LinkNode('history','Page 5','por3gbrw.html#links','','')); treeData.add(new LinkNode('history','Page 6','por4gbrw.html#links','','')); treeData.add(new LinkNode('history','Page 7','por5gbrw.html#links','','')); treeData.add(new LinkNode('history','Page 8','por6gbrw.html#links','','')); treeData.add(new LinkNode('history','Page 9','por7gbrw.html#links','','')); treeData.add(new LinkNode('history','Page 10','por8gbrw.Html#links','','')); treeData.add(new LinkNode('history','Page 11','por99gbrw.Html#links','','')); treeData.add(new LinkNode('history','Page 12','port1.html#links','','')); treeData.add(new LinkNode('history','Page 13','port2.html#links','','')); treeData.add(new LinkNode('history','Page 14','port3.html#links','','')); treeData.add(new LinkNode('history','Page 15','port5.html#links','','')); treeData.add(new LinkNode('history','Chart','porchrt.Html#links','','')); treeData.add(new FolderNode('teegb','gb','Trans Europ Express','','')); treeData.add(new LinkNode('teegb','Edelweiss','edelgbrw.html#links','','')); treeData.add(new LinkNode('teegb','Parsifal','parsgbrw.html#links','','')); treeData.add(new LinkNode('teegb','Rheingold','rhein1.html#links','','')); treeData.add(new LinkNode('teegb','Gottardo/Ticino','gotta1.html#links','','')); treeData.add(new LinkNode('teegb','Mediolanum','tijdel.html#links','','')); treeData.add(new LinkNode('teegb','Ligure','tijdel.html#links','','')); treeData.add(new LinkNode('teegb','The end of a legend','lasttee.html#links','','')); treeData.add(new FolderNode('files','gb','Downloads','','')); treeData.add(new LinkNode('files','Download Page','downlds.html#links','','')); treeData.add(new FolderNode('mess','gb','Message','','')); treeData.add(new LinkNode('mess','Message','readme.html#links','','')); //treeData.add(new FolderNode('ned','root','Nederlandse Site','','')); //treeData.add(new FolderNode('mappen','ned','Algemeen','','')); //treeData.add(new LinkNode('mappen','Links Pagina','linksrwnl.html#root','','')); //treeData.add(new LinkNode('mappen','News Page','newsnlrw.html#folders','','')); //treeData.add(new LinkNode('mappen','Gasten Boek','guest.html#links','','')); //treeData.add(new FolderNode('simnl','ned','Treinsims','','')); //treeData.add(new FolderNode('bosonl','simnl','BVE','','')); //treeData.add(new LinkNode('bosonl','BVE pagina 1','bvenlrw.html#links','','')); //treeData.add(new FolderNode('bahnnl','simnl','BAHN','','')); //treeData.add(new LinkNode('bahnnl','Bahn pagina 1','bahnnlrw.html#links','','')); //treeData.add(new LinkNode('bahnnl','Bahn pagina 2','bahnnlrw2.html#links','','')); //treeData.add(new LinkNode('bahnnl','Bahn afbeeldingen','bahnscrsrwnl.html#links','','')); //treeData.add(new FolderNode('geschiedenis','ned','Porter Geschiedenis','','')); //treeData.add(new FolderNode('teenl','ned','Trans Europ Express','','')); //treeData.add(new FolderNode('files','ned','Downloads','','')); treeData.add(new FolderNode('search','root','Search Engine','','')); treeData.add(new LinkNode('search','Google Search Engine','http://www.google.com/','','')); treeData.add(new FolderNode('email','root','E-mail','','')); treeData.add(new LinkNode('email','webmaster','mailto:[email protected]?subject=no subject entered...','','img-email.gif')); structureStyle = 0; // 0 for light background, 1 for dark background backgroundColor = '#FFEEE'; // sets the bgColor of the menu textColor = '#660000'; // 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 = 'pageFrame'; // the name of the frame that links will load into by default defaultImageURL = ''; // the URL or path where the OmenTree images are located defaultLinkIcon = 'img-page-globe.gif'; // 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 = ""; }