ALEX DEVELOPER PAGE
");
outputFrame.close();
window.status="Alex Developer Page";
}
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++;
}
}
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','HOME','test.htm','','')); // Root Node MUST be first!
treeData.add(new FolderNode('pm','root','Planned Maintenance','',''));
treeData.add(new LinkNode('pm','What is a PMS','html/whatpm.htm','',''));
treeData.add(new FolderNode('talk','root','Amos Talk','',''));
treeData.add(new LinkNode('talk','Summary','html/talk.htm','',''));
treeData.add(new LinkNode('talk','Highlights','html/talkhighlights.htm','',''));
treeData.add(new LinkNode('talk','Installation','html/talkinstallation.htm','',''));
treeData.add(new LinkNode('talk','Supported Registers','html/talkregisters.htm','',''));
treeData.add(new LinkNode('talk','Configuration','html/talkconfiguration.htm','',''));
treeData.add(new LinkNode('talk','Running Selection Files','html/talkselection.htm','',''));
treeData.add(new LinkNode('talk','Import Commands','html/talkimportcommands.htm','',''));
treeData.add(new LinkNode('talk','Export Commands','html/talkexportcommands.htm','',''));
treeData.add(new LinkNode('talk','Selection File Example','html/talkselectionexample.htm','',''));
treeData.add(new LinkNode('talk','Comments','html/talkcomments.htm','',''));
treeData.add(new FolderNode('projects','root','Projects','',''));
treeData.add(new LinkNode('projects','SAP Link','html/projectsap.htm','',''));
treeData.add(new LinkNode('projects','D.E.C.','html/dec.htm','',''));
treeData.add(new FolderNode('articles','root','Articles','',''));
treeData.add(new LinkNode('articles','Internet and Maintenance','html/internetandmaintenance.htm','','img-newsgroup.html'));
treeData.add(new FolderNode('downloads','root','Downloads','',''));
treeData.add(new LinkNode('downloads','SQL Scripts','html/sqlscripts.htm','','sqlscriptsico.html'));
treeData.add(new LinkNode('downloads','Small Applications','html/downapp.htm','','program-icon.html'));
treeData.add(new LinkNode('downloads','Reports','html/downreports.htm','','reports.html'));
treeData.add(new LinkNode('downloads','Triggers','html/downtriggers.htm','','triggers.html'));
treeData.add(new FolderNode('email','root','E-mail','',''));
treeData.add(new LinkNode('email','Alessandro Di Marco','mailto:dimarco@rapallo.newnetworks.it?subject=A Question for you...','','img-email.html'));
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 = 'images/bckgr_left.html'; // 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/index.html'; // 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 = "";
suffixHTML = suffixHTML + "Best viewed with
";
}
// End Hiding -->