/** * Functions to support the tree view of nodes in the Content Manager Admin scree * * */ function stopEvent(e, stopDefault) { if (e.stopPropagation) e.stopPropagation(); //DOM 2 else e.cancelBubble = true; //IE if (stopDefault) { if (e.preventDefault) e.preventDefault(); //DOM 2 else e.returnValue = false; //IE } } function nodeSelect(e, id) { if (!e) e= window.event; //IE Event Model stopEvent(e, true); } function doNodeClick(e,id) { if (!e) e= window.event; //IE Event Model stopEvent(e, true); var children = document.getElementById("children"+id); var expander = document.getElementById("expander"+id); if (children.style.display== "block"){ children.style.display="none"; expander.innerHTML = "+"; } else { children.style.display="block"; expander.innerHTML = "-"; } } function expandTree(nodeid){ var e = document.getElementById(nodeid); var parent = e.parentNode; while (parent.id != 0) { parent.style.display = "block"; parent = parent.parentNode; } }