rem: if (currentLevel != parentLevel+1) { Element.removeClassName(element, 'level-'+currentLevel); Element.addClassName(element, 'level-'+(parentLevel+1)); }  var container = Element.findChildren(element, false, false, 'UL'); if (container.length == 1) { var childs = Element.findChildren(container[0], false, false, 'LI'); for (var i=0; i < childs.length; i++) childs[i].className = childs[i].className.replace(/level-(\d+)/, 'level-'+(parentLevel+2)); } }, 
add: if (currentLevel != parentLevel+1) { Element.removeClassName(element, 'level-'+currentLevel); Element.addClassName(element, 'level-'+(parentLevel+1)); }  var container = Element.findChildren(element, false, false, 'UL'); if (container.length == 1) { var childs = Element.findChildren(container[0], false, false, 'LI'); for (var i=0; i < childs.length; i++) childs[i].className = childs[i].className.replace(/level-(\d+)/, 'level-'+(parentLevel+2)); } }, 
context: 	adjustLevelOf: function(element)	{		// this will make the page displayed at the level + 1 of the parent		var currentLevel = 1;		var parentLevel = 0;		currentElementSelected = element;				if (/level-(\d+)/i.test(element.className))			currentLevel = RegExp.$1.toInteger();					if (/level-(\d+)/i.test(element.parentNode.parentNode.className))			parentLevel = RegExp.$1.toInteger();		if (currentLevel != parentLevel+1)		{			Element.removeClassName(element, 'level-'+currentLevel);			Element.addClassName(element, 'level-'+(parentLevel+1));		}		// this will update all childs level		var container = Element.findChildren(element, false, false, 'UL');		if (container.length == 1)		{			var childs = Element.findChildren(container[0], false, false, 'LI');			for (var i=0; i < childs.length; i++)				childs[i].className = childs[i].className.replace(/level-(\d+)/, 'level-'+(parentLevel+2));		}	},
meta: 7704	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/7704/f57c98afcf9653e1e2c6eb9d33a8af5d5aa1a26c/frog.js/clean/admin/javascripts/frog.js