// Functions called by the menu under the tree
// If you are not going to have an extra frame with action buttons, if your links
// are embedded in the documents that load in the right frame, for example,
// you should move these functions to the frameset file (in this case demoFuncs.html)
// If you are using a frameless layout, you will also have to move these functions
// to the appropriate page.
// In both cases: you will have to update the DOM paths used to access the functions
// and used by the functions themselves.

// Open all folders
// May not work with very large trees (browser may time out)
// You may call this on a node other than the root, but it must be a folder
function expandTree(folderObj)
{
    var childObj;
    var i;

    //Open folder
    if (!folderObj.isOpen)
      parent.clickOnNodeObj(folderObj)

    //Call this function for all folder children
    for (i=0 ; i < folderObj.nChildren; i++)  {
      childObj = folderObj.children[i]
      if (typeof childObj.setState != "undefined") {//is folder
        expandTree(childObj)
      }
    }
}

// Close all folders
function collapseTree() {
	//hide all folders
	parent.clickOnNodeObj(parent.foldersTree)
	//restore first level
	parent.clickOnNodeObj(parent.foldersTree)
}

function setTopicCategory(topic) {

//var Ausgabe = '<span class="eventlist-expertsearch-col-label">Themenauswahl</span> geändert <input type="hidden" name="eventtopic" value="'+topic+'" />';
  var Ausgabe = '<input type="hidden" name="eventtopic" value="'+topic+'" />';
  
  document.getElementById("treeviewTopicID").innerHTML = Ausgabe;
  //document.all.treeviewTopicID.innerHTML = Ausgabe;
}


