\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].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);
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].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("
")
outputFrame.write("
" + children[currentIndex].name + "
\n")
}
else {
outputFrame.write("
");
outputFrame.write("
" + children[currentIndex].name + "
\n");
newStructure = newStructure + "
";
drawBranch(children[currentIndex].id,newStructure);
}
}
else {
if (children[currentIndex].open == 0) {
outputFrame.write("
")
outputFrame.write("
" + children[currentIndex].name + "
\n")
}
else {
outputFrame.write("
");
outputFrame.write("
" + 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')) {
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}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// 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','Games & Software','right.html','','')); // Root Node MUST be first!
treeData.add(new FolderNode('Links','root','Links','',''));
treeData.add(new LinkNode('Links','Computers','Links/computers.html','',''));
treeData.add(new LinkNode('Links','Coworkers','Links/coworkers.html','',''));
treeData.add(new LinkNode('Links','Diversen','Links/diversen.html','',''));
treeData.add(new LinkNode('Links','Games','Links/games.html','',''));
treeData.add(new LinkNode('Links','Search engines','Links/searchengines.html','',''));
treeData.add(new LinkNode('Links','Software','Links/software.html','',''));
treeData.add(new FolderNode('trouble','root','Trouble shooting','',''));
treeData.add(new FolderNode('Dailup','trouble','Dail Up Networking','',''));
treeData.add(new LinkNode('Dailup','Reinstall Dialup Network','trouble/dailup/dailup1.html','',''));
treeData.add(new LinkNode('Dailup','Settings Dialup Network','','trouble/settings/dailup.html','',''));
treeData.add(new FolderNode('ras','trouble','Remote Access Service','',''));
treeData.add(new LinkNode('ras','Reinstall RAS','trouble/ras/ras.html','',''));
treeData.add(new LinkNode('ras','Settings RAS','trouble/ras/instellingenras/ras.html','',''));
treeData.add(new FolderNode('netwerk','trouble','Network','',''));
treeData.add(new LinkNode('netwerk','Network','trouble/netwerk/netwerk1.html','',''));
treeData.add(new FolderNode('Mail','trouble','Mail','',''));
treeData.add(new LinkNode('Mail','Mail Communicator','trouble/mailcom/mail.html','',''));
treeData.add(new LinkNode('Mail','Mail Navigator','trouble/mailnet/mailnet1.html','',''));
treeData.add(new LinkNode('Mail','Outlook 97','trouble/outlook97/outlook.html','',''));
treeData.add(new LinkNode('Mail','Outlook Express','trouble/outlookex/outlook.html','',''));
treeData.add(new FolderNode('diversen','trouble','Diversen','',''));
treeData.add(new LinkNode('diversen','Wizard Internet','trouble/wizardinter/wizard.html.html','',''));
treeData.add(new FolderNode('games','root','Javascript games','',''));
treeData.add(new LinkNode('games','Atrun','javascriptgames/atrun/artrun.html','','')); treeData.add(new LinkNode('games','Facegame','javascriptgames/facegame/game03w.htm','',''));
treeData.add(new LinkNode('games','Fastestlap','javascriptgames/fastestlapindex.html','',''));
treeData.add(new LinkNode('games','Flanker','javascriptgames/flanker/index.html','',''));
treeData.add(new LinkNode('games','Hardblock','javascriptgames/hardblock/index.html','',''));
treeData.add(new LinkNode('games','Jsfalcon','javascriptgames/jsfalcon/index.html','',''));
treeData.add(new LinkNode('games','Mario2','javascriptgames/mario2/index.html','',''));
treeData.add(new LinkNode('games','Marionette','javascriptgames/marionette/supermarionette.html','',''));
treeData.add(new LinkNode('games','Pman','javascriptgames/pman/index.html','',''));
treeData.add(new LinkNode('games','Ridgeplayer','javascriptgames/ridgeplayer/index.html','',''));
treeData.add(new LinkNode('games','Spacefire','javascriptgames/spacefire/index.html','',''));
treeData.add(new LinkNode('games','Tetris','javascriptgames/tetris/tetriscript.html','',''));
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// User defined variables:
structureStyle = 0; // 0 for light background, 1 for dark background
backgroundColor = 'FFFFFF'; // sets the bgColor of the menu
textColor = 'FF0000'; // 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 = 'images/marmolnegro.gif'; // give the complete path to a gif or jpeg to use as a background image
defaultTargetFrame = 'right'; // 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 -->