// You can find instructions for this file here:
// http://www.treeview.net

USETEXTLINKS = 1  
STARTALLOPEN = 0
HIGHLIGHT = 1
PERSERVESTATE = 1


// If you don't have server-side coding, make your nodes.js file similar to the others
// in the ZIP, not this one.
// Without a database, the auxiliary functions defined and used here are the only way 
// I am able to test the "PERSERVESTATE through .xID keys" functionality. 
// Your server side code will do something similar, but without the need to these functions.
// It will simply output nodes with two lines of statements, one for insDoc or insFld call,
// the other with the assignment of xID to an actual database ID
// See online instructions for limitations on the use of xID
var counterI = 0
function insFldX(parentOb, childOb)
{
  childOb.xID = 'X' + counterI;
  counterI--;
  return insFld(parentOb, childOb)
}
function insDocX(parentOb, childOb)
{
  childOb.xID = 'Y' + counterI;
  counterI--;
  return insDoc(parentOb, childOb)
}
//In my QA tests I use this function to test what happens in terms of PERSERVESTATE 
//when the structure of the tree changes
function insertExtraFolder(parentOb)
{
  auxxx1 = insFld(parentOb, gFld("insert",  "hazlogo.jpg"))
  auxxx1.xID = "gg1"
  auxxx2 = insDoc(auxxx1, gLnk("R", "Ben", "hazlogo.jpg"))
  auxxx2.xID = "gg2"  
}

foldersTree = gFld("Electrical Hazards", "HazardsMainRight.html")
foldersTree.treeID = "big"
foldersTree.xID = 'X0'; 
counterI--;
//insertExtraFolder(foldersTree)
auxfusor = insFldX(foldersTree, gFld("Fusor", "fusor.html" ))
auxcoils = insFldX(foldersTree, gFld("Tesla Coils", "big3.html" ))
auxtwins = insFldX(auxcoils, gFld("The Twins", "twinmain.html"))
//insertExtraFolder(auxtwins)
insDocX(auxtwins, gLnk("R", "The Chronicle", "TheTwins.html"))
insDocX(auxtwins, gLnk("R", "The Movie", "TheMovie.html"))
auxttop = insFldX(auxcoils, gFld("Table Top Coils", "javascript:parent.op()"))
insDocX(auxttop, gLnk("R", "Tiny Coil", "TinyCoil.html"))
insDocX(auxttop, gLnk("R", "Tube Coil", "TubeCoil.html"))
insDocX(auxttop, gLnk("R", "Mini Twins", "minitwins.html"))
aux11inch = insFldX(auxcoils, gFld("11-Inch Coil", "javascript:parent.op()"))
insDocX(aux11inch, gLnk("R", "Photos", "11inch.html"))
aux8inch = insFldX(auxcoils, gFld("8-Inch Coil", "javascript:parent.op()"))
insDocX(aux8inch, gLnk("R", "Photos", "8inch.html"))
aux6inch = insFldX(auxcoils, gFld("6-Inch", "javascript:parent.op()"))
insDocX(aux6inch, gLnk("R", "Photos", "6inch.html"))
software = insFldX(foldersTree, gFld("Sofware", "software.html"))
wintesla = insFldX(software, gFld("WinTesla", "wintesla.html"))
insDocX(wintesla, gLnk("R", "Version 3.2", "dload3.html"))
insDocX(wintesla, gLnk("R", "Version 4.0", "dload4.html"))
insDocX(wintesla, gLnk("R", "Version 5.0.0.1", "dload5.html"))
aux20012 = insFldX(software, gFld("Port Defender", "javascript:parent.op()"))
insDocX(aux20012, gLnk("R", "Version 1.0", "soon.html"))
aux20013 = insFldX(software, gFld("ParaPort", "javascript:parent.op()"))
insDocX(aux20013, gLnk("R", "Version 1.0", "soon.html"))
aux2002 = insFldX(foldersTree, gFld("Other Projects", "javascript:parent.op()"))
aux20021 = insFldX(aux2002, gFld("SparkyCycle", "javascript:parent.op()"))
insDocX(aux20021, gLnk("R", "Photos", "soon.html"))
aux20022 = insFldX(aux2002, gFld("RC Helicopters", "javascript:parent.op()"))
insDocX(aux20022, gLnk("R", "Photos", "soon.html"))
insDocX(aux20022, gLnk("R", "Auto Pilot Project", "soon.html"))
aux20023 = insFldX(aux2002, gFld("Embedded Systems", "javascript:parent.op()"))
insDocX(aux20023, gLnk("R", "MC68HC11 Development Board", "soon.html"))
insDocX(aux20023, gLnk("R", "MC68HC16 Development Board", "soon.html"))
aux20024 = insFldX(aux2002, gFld("Audio Engineering", "javascript:parent.op()"))
insDocX(aux20024, gLnk("R", "Audio Mixer Project", "soon.html"))
insDocX(aux20024, gLnk("R", "Patent", "soon.html"))
insDocX(aux20024, gLnk("R", "Photos", "soon.html"))
aux20025 = insFldX(aux2002, gFld("Remote Control", "javascript:parent.op()"))
insDocX(aux20025, gLnk("R", "Trolling Motor Control", "soon.html"))
aux20026 = insFldX(aux2002, gFld("Mechanical Engineering", "javascript:parent.op()"))
insDocX(aux20026, gLnk("R", "My Shop", "soon.html"))
insDocX(aux20026, gLnk("R", "Projects", "soon.html"))
aux20027 = insFldX(aux2002, gFld("Weapons", "javascript:parent.op()"))
insDocX(aux20027, gLnk("R", "Dual Laser Sight", "soon.html"))
email = insFldX(foldersTree, gFld("EMail", "email.html"))
foldersTree.treeID = "L1" 

