')
// Write the node
// Calculate and display the indentation
indent_width = child_node[0].level * 20
frames["tree_frame"].document.writeln('')
frames["tree_frame"].document.writeln('')
frames["tree_frame"].document.writeln('<\/td>')
// Write the node text
frames["tree_frame"].document.writeln(' | ')
frames["tree_frame"].document.writeln(' ')
// First check to see if this is a folder or a document
if (child_node.length > 1) {
// It's a folder
frames["tree_frame"].document.writeln('' + child_node[0].text + '')
frames["tree_frame"].document.writeln('<\/td>')
frames["tree_frame"].document.writeln('<\/tr>')
frames["tree_frame"].document.writeln('<\/table>')
// If this child's state is "open", recursively call
// this function to write the child's children (if any)
if (child_node[0].state == "open") {
write_children(child_node)
}
}
else {
// It's a document
// Is it the currently displayed document?
//if (current_document) {
if (child_node[0].index == current_document) {
frames["tree_frame"].document.writeln(child_node[0].text)
}
//}
else {
frames["tree_frame"].document.writeln('' + child_node[0].text + '')
}
frames["tree_frame"].document.writeln('<\/td>')
frames["tree_frame"].document.writeln('<\/tr>')
frames["tree_frame"].document.writeln('<\/table>')
}
}
}
function toggle_state(node_index) {
// Get the node from the global nodes_array
var current_node = nodes_array[node_index]
// Store the node's current state
current_state = current_node[0].state
// Change it to the other state
if (current_state == "open") {
current_node[0].state = "closed"
}
else {
current_node[0].state = "open"
}
// Is this a document?
if (current_node.length == 1) {
if (current_document != -1) {
nodes_array[current_document].state = "closed"
}
current_document = current_node[0].index
frames["content_frame"].location = current_node[0].url
}
// Rewrite the menu
timeout_id = setTimeout("write_menu()", 50)
}
function change_all(new_state) {
var current_node
// Run through the global nodes_array
for (counter = 0; counter < nodes_array.length; counter++) {
//Store the current node
current_node = nodes_array[counter]
// Work only with folders
if (current_node.length > 1) {
current_node[0].state = new_state
}
}
// Rewrite the menu
timeout_id = setTimeout("write_menu()", 50)
}
//-->
|