\n \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\n"); outputFrame.close(); window.status="OmenTree v1.0 - (C) 1998 Colin Tucker/OmenSoft - http://omensoft.home.ml.org"; } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // drawBranch() - GENERAL FUNCTION - used by the drawTree() function to recursively draw all // visable nodes in the tree structure. function drawBranch(startNode,structureString) { var children = extractChildrenOf(startNode); var currentIndex = 1; while (currentIndex <= children.length) { outputFrame.write(structureString); //debug tree //outputFrame.write(children[currentIndex].type); //outputFrame.write(children[currentIndex].icon); if (children[currentIndex].type == 'StefansNode') { var imageString = children[currentIndex].icon; if (currentIndex != children.length) { outputFrame.write("") } else { outputFrame.write("") } outputFrame.write("" + children[currentIndex].url + " " + children[currentIndex].name + "
\n") } else 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++; } } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // toggleFolder() - GENERAL FUNCTION - opens/closes folder nodes. function toggleFolder(id,status) { var nodeIndex = indexOfNode(id); treeData[nodeIndex].open = status; timeOutId = setTimeout("drawTree()",100) } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // indexOfNode() - GENERAL FUNCTION - finds the index in the treeData Collection of the node // with the given id. 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 } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // extractChildrenOf() - GENERAL FUNCTION - extracts and returns a Collection containing all // of the node's immediate children nodes. function extractChildrenOf(node) { var children = new Collection(); var currentIndex = 1; while (currentIndex <= treeData.length) { if ((treeData[currentIndex].type == 'folder') || (treeData[currentIndex].type == 'link') || (treeData[currentIndex].type == 'StefansNode')) { if (treeData[currentIndex].parent == node) { children.add(treeData[currentIndex]) } } currentIndex++ } return children } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Collection() - OBJECT - a dynamic storage structure similar to an Array. function Collection() { this.length = 0; this.add = add; return this } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // add() - METHOD of Collection - adds an object to a Collection. function add(object) { this.length++; this[this.length] = object } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // RootNode() - OBJECT - represents the top-most node of the hierarchial tree. 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 } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // FolderNode() - OBJECT - represents a node which branches to contain other nodes. 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 } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // LinkNode() - OBJECT - a node that represents a link using a URL. 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 } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // LinkNode() - OBJECT - a node that represents a link using a URL. function StefansNode(parent,name,url,target,icon) { this.parent = parent; this.name = name; this.url = url; this.target = target; this.icon = icon; this.type = 'StefansNode'; return this } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // loadData() - GENERAL FUNCTION - user defined data and variables exist in this function. function loadData() { //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Tree structure definitions: // Syntax: // ROOT NODE: // treeData.add(new RootNode("","","","","")); // NOTE: There must be only ONE root node, and it MUST be the FIRST node. // and can be left null - defaults will be used. // FOLDER NODE: // treeData.add(new FolderNode("","","","","")); // NOTE: Folder nodes MUST have a valid parent node, and they SHOULD have children nodes. // and can be left null - OmenTree will use the // default images. // LINK NODE: // treeData.add(new LinkNode("","","","","")); // NOTE: and may be left null - defaults specified in the user // defined variables section will be used. // Consult the OmenTree documentation for further assistance. treeData = new Collection(); treeData.add(new RootNode('root','Desktop','blank.html','img-desktop.gif','img-desktop.gif')); // Root Node MUST be first! treeData.add(new FolderNode('mycomp','root','My Computer','img-mycomp.gif','img-mycomp.gif')); treeData.add(new FolderNode('floppy','mycomp','3,5 Floppy (A:)','img-floppy.gif','img-floppy.gif')); treeData.add(new LinkNode('floppy','command.com','','','img-msdos.gif')); treeData.add(new LinkNode('floppy','fdisk.exe','','','img-msdos.gif')); treeData.add(new LinkNode('floppy','format.exe','','','img-msdos.gif')); treeData.add(new FolderNode('hdisk','mycomp','HDisk (C:)','img-hdisk.gif','img-hdisk.gif')); treeData.add(new FolderNode('general','hdisk','General','','')); treeData.add(new LinkNode('general','Latest Updates','news.html','','img-page.gif')); treeData.add(new LinkNode('general','Interesting Stuff','stuff.html','','img-page.gif')); treeData.add(new LinkNode('general','Who am I?','me.html','','img-page.gif')); treeData.add(new FolderNode('shareware','hdisk','Shareware','','')); treeData.add(new LinkNode('shareware','Download.com','http://www.download.com','','img-page-globe-link.gif')); treeData.add(new LinkNode('shareware','Shareware..com','http://www.shareware.com','','img-page-globe-link.gif')); treeData.add(new LinkNode('shareware','Windows95.com','http://www.windows95.com','','img-page-globe-link.gif')); treeData.add(new LinkNode('shareware','DaveCentral','http://www.davecentral.com','','img-page-globe-link.gif')); treeData.add(new FolderNode('games','hdisk','Games','','')); treeData.add(new FolderNode('gdownload','games','Downloads','','')); treeData.add(new LinkNode('gdownload','Adrenaline Vault','http://www.avault.com','','img-page-globe-link.gif')); treeData.add(new LinkNode('gdownload','Kick Ass','http://kickass.com','','img-page-globe-link.gif')); treeData.add(new LinkNode('gdownload','Games Domain','http://www.gamesdomain.co.uk/directd/directd.html','','img-page-globe-link.gif')); treeData.add(new FolderNode('f1gp2','games','Formula One Grand Prix 2','','')); treeData.add(new FolderNode('gp2teams','f1gp2','Great GP2 Teams','','')); treeData.add(new LinkNode('gp2teams','Lusa','http://lusa.sim-racing.net','','img-page.gif')); treeData.add(new LinkNode('gp2teams','Netrex','http://netrex.sim-racing.net','','img-page.gif')); treeData.add(new LinkNode('gp2teams','Delta','http://dr.sim-racing.net','','img-page.gif')); treeData.add(new LinkNode('gp2teams','Nemesis','http://www.sim-racing.net/Nemesis','','img-page.gif')); treeData.add(new LinkNode('gp2teams','Karjala','http://users.utu.fi/artani/karjala/','','img-page.gif')); treeData.add(new LinkNode('gp2teams','Hillcrest','http://www.sim-racing.net/Hillcrest','','img-page.gif')); treeData.add(new LinkNode('gp2teams','Imperial','http://www.geocities.com/MotorCity/Speedway/8883/index.html','_top','img-page.gif')); treeData.add(new LinkNode('f1gp2','LFRS','http://www.lfrs.com','','img-page.gif')); treeData.add(new LinkNode('f1gp2','German GP2 pages','http://216.13.117.37/~gp2/gp2.html','','img-page.gif')); treeData.add(new LinkNode('f1gp2','MicroProse','http://www.microprose.com/','','img-page.gif')); treeData.add(new LinkNode('f1gp2','My F1GP2 pages !','f1gp2.html','','img-page.gif')); treeData.add(new FolderNode('fallout','games','Fallout','','')); treeData.add(new LinkNode('fallout','Fallout 1','http://www.interplay.com/fallout/','','img-page.gif')); treeData.add(new LinkNode('fallout','Fallout 2','http://www.interplay.com/fallout2/','','img-page.gif')); treeData.add(new FolderNode('ta','games','Total Annihilation','','')); treeData.add(new LinkNode('ta','Cavedog','http://www.totalannihilation.com/','','img-page.gif')); treeData.add(new LinkNode('ta','TA Center','http://www.annihilationcenter.com/','','img-page.gif')); treeData.add(new LinkNode('ta','Annihilated','http://www.annihilated.com/','','img-page.gif')); treeData.add(new FolderNode('aoe','games','Age of the Empires','','')); treeData.add(new LinkNode('aoe','Strategy','http://www.geocities.com/TimesSquare/Battlefield/7683/','','img-page.gif')); treeData.add(new FolderNode('news','hdisk','News','','')); treeData.add(new FolderNode('mags','news','Magazines','','')); treeData.add(new LinkNode('mags','CNN','http://www.cnn.com','','img-page-globe-link.gif')); treeData.add(new LinkNode('mags','New York Times','http://www.nytimes.com','','img-page-globe-link.gif')); treeData.add(new FolderNode('f1','news','Formula One','','')); treeData.add(new LinkNode('f1','F1 News','http://www.autorace.com','','img-page.gif')); treeData.add(new LinkNode('f1','F1 Live','http://www.f1-live.com/GB/index.html','','img-page.gif')); treeData.add(new LinkNode('f1','Gale Force F1','http://www.monaco.mc/f1/','','img-page.gif')); treeData.add(new FolderNode('articles','hdisk','Technical Articles','','')); treeData.add(new LinkNode('articles','General','http://www.geocities.com/motorcity/downs/2884/articles/articles.html','','img-page-globe-link.gif')); treeData.add(new LinkNode('articles','Unsorted Stuff','http://www.geocities.com/motorcity/downs/2884/articles/unsorted/unsorted.html','','img-page-globe-link.gif')); treeData.add(new FolderNode('com','articles','COM','','')); treeData.add(new LinkNode('com','Specification','http://www.microsoft.com/oledev/olecom/title.htm','','img-page-globe-link.gif')); treeData.add(new LinkNode('com','DCOM protocol','http://www.microsoft.com/oledev/olecom/draft-brown-dcom-v1-spec-02.txt','','img-page-globe-link.gif')); treeData.add(new LinkNode('com','Resources','http://akpublic.research.att.com/~ymwang/resources/resources.htm','','img-page-globe-link.gif')); treeData.add(new FolderNode('compiler','articles','Compiler','','')); treeData.add(new LinkNode('compiler','C++ grammar','http://www.fortunecity.com/skyscraper/seque/84/cplusplus.txt','','img-page-globe-link.gif')); treeData.add(new FolderNode('mfc','articles','MFC','','')); treeData.add(new LinkNode('mfc','MFC Programmers SourceBook','http://209.66.99.126/','','img-page-globe-link.gif')); treeData.add(new FolderNode('engines','hdisk','Search Engines','','')); treeData.add(new LinkNode('engines','AltaVista','http://www.altavista.digital.com','','img-page-link.gif')); treeData.add(new LinkNode('engines','InfoSeek','http://www.infoseek.com','','img-page-link.gif')); treeData.add(new LinkNode('engines','HotBot','http://www.hotbot.com','','img-page-link.gif')); treeData.add(new LinkNode('engines','WebCrawler','http://www.webcrawler.com','','img-page-link.gif')); treeData.add(new LinkNode('engines','Yahoo!','http://www.yahoo.com','','img-page-link.gif')); treeData.add(new LinkNode('engines','Excite','http://www.excite.com','','img-page-link.gif')); treeData.add(new LinkNode('engines','Lycos','http://www.lycos.com','','img-page-link.gif')); treeData.add(new LinkNode('engines','Magellan','http://www.mckinley.com','','img-page-link.gif')); treeData.add(new FolderNode('german','hdisk','German Area','','')); treeData.add(new LinkNode('german','Becks Chat','http://www.becks.de','','boy4.gif')); treeData.add(new LinkNode('german','Vereinsbank','http://www.hypovereinsbank.de','','img-page-link.gif')); treeData.add(new LinkNode('german','CT','http://www.heise.de/ct','','img-page-link.gif')); treeData.add(new LinkNode('german','Altdorf - My Hometown','http://www.launet.baynet.de/stadt.altdorf','','img-page-link.gif')); treeData.add(new LinkNode('german','DSF','http://www.dsf.de/','','img-page-link.gif')); treeData.add(new FolderNode('gbook','hdisk','GuestBook','','')); treeData.add(new LinkNode('gbook','Sign','../../../cgi-bin/geoplus_apps/ans_entry','','img-page-link.gif')); treeData.add(new LinkNode('gbook','View','geobook.html','','img-page-link.gif')); treeData.add(new FolderNode('cdrom','mycomp','CDRom (D:)','img-cdrom.gif','img-cdrom.gif')); treeData.add(new FolderNode('homeserv','mycomp','home on "127.0.0.1" (H:)','img-serv.gif','img-serv.gif')); treeData.add(new FolderNode('dummy1','homeserv','Secrets','','')); treeData.add(new FolderNode('dummy2','homeserv','Passwords','','')); treeData.add(new FolderNode('dummy3','homeserv','Naked Chicks','','')); treeData.add(new FolderNode('mailbox','homeserv','Mailbox','','')); treeData.add(new LinkNode('mailbox','GMX Internet Mail','http://www.gmx.net','','img-page-link.gif')); treeData.add(new FolderNode('mp3','homeserv','MP3','','')); treeData.add(new LinkNode('mp3','Good MP3s','http://good-mp3.dhs.org/','','img-page-link.gif')); treeData.add(new LinkNode('mp3','The MP3 hangout','http://www.escalix.com/freepage/thehangout/main2.html','','img-page-link.gif')); treeData.add(new LinkNode('mp3','Evil Ernies','http://www.webstyle.net/mp3/index.htm','','img-page-link.gif')); treeData.add(new LinkNode('mp3','All MP3s','http://www.allmp3s.com/index.htm','','img-page-link.gif')); treeData.add(new LinkNode('mp3','A finnish guy ?!?','http://www.netti.fi/~je83/mp3.htm','','img-page-link.gif')); treeData.add(new LinkNode('mp3','Audio solutions','http://www.xaudio.com/','','img-page-link.gif')); treeData.add(new LinkNode('mp3','Audio find','http://www.audiofind.com/','','img-page-link.gif')); treeData.add(new FolderNode('network','root','Network Neighborhood','img-netw.gif','img-netw.gif')); treeData.add(new LinkNode('network','S. Ruescher','http://www.geocities.com/TimesSquare/Castle/2320','','img-page-link.gif')); treeData.add(new LinkNode('network','M. Groetsch','http://www.geocities.com/Paris/Metro/2534/','','img-page-link.gif')); treeData.add(new LinkNode('network','O. Steinmetz','http://www.geocities.com/MotorCity/Speedway/8883/','','img-page-link.gif')); treeData.add(new LinkNode('network','Lusa Drivers','icq.html','','img-page-link.gif')); treeData.add(new FolderNode('recbin','root','Recycle Bin','img-trash.gif','img-trash.gif')); treeData.add(new LinkNode('recbin','Gates World','http://www.microsoft.com','','img-page-link.gif')); treeData.add(new LinkNode('root','Contact me','me.html','','img-page-link.gif')); treeData.add(new StefansNode('root','Nedstat Counter','http://uk.nedstat.net/viewstat.asp?name=srcount','','http://uk.nedstat.net/scripts/nedstat.dll?name=srcount')); treeData.add(new FolderNode('shortcuts','root','Shortcuts','','')); treeData.add(new LinkNode('shortcuts','Lusa Drivers','icq.html','','img-page-link.gif')); treeData.add(new LinkNode('shortcuts','Latest Updates','news.html','','img-page.gif')); treeData.add(new LinkNode('shortcuts','Lusa','http://lusa.sim-racing.net','','img-page.gif')); treeData.add(new LinkNode('shortcuts','LFRS','http://www.lfrs.com','','img-page.gif')); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // User defined variables: structureStyle = 0; // 0 for light background, 1 for dark background backgroundColor = '#FFFFFF'; // sets the bgColor of the menu textColor = '#000000'; // 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 = 'images/'; // 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! //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Additional HTML sources: prefixHTML = ""; suffixHTML = ""; } // End Hiding -->