/* * ul2finder * written by Christian Heilmann (http://icant.co.uk) * turns the nested list with the ID "finder" into a dynamic list * uses the CSS classes defined in the variables */ function ul2finder() { // Define variables used and classes to be applied/removed var i,uls,als,finder; var parentClass='parent'; var showClass='shown'; var hideClass='hidden'; var openClass='open'; window.finderOpened = new Object(); window.finderPrevious = null; // check if our finder list exists, if not, stop all activities finder=document.getElementById('finder'); if(!finder){return;} // add the class domenabled to the body cssjs('add',document.body,'domenabled'); // loop through all lists inside finder, position and hide them // by applying the class hidden uls=finder.getElementsByTagName('ul'); for(i=0;i= 0) { return true; } return false; } function isparent_std(par, child) { if (par == child) { return true; } else if (par.hasChildNodes()) { children = par.childNodes; for (var i=0;i