String.prototype.trim = function() {
	return this.replace(/^\s*/, "").replace(/\s*$/, "");
}

function montre(element) {
	if (element.tagName.toLowerCase() == 'ul') {
		var listChilds = element.childNodes;
		for (var i = 0; i < listChilds.length; i++) {
			if ((listChilds.item(i).tagName == undefined) ||
				(listChilds.item(i).tagName == null) ||
				(listChilds.item(i).tagName.toLowerCase() != 'li'))
				continue;
			var entryChilds = listChilds.item(i).childNodes;
			listChilds.item(i).className = listChilds.item(i).className.replace("courant", "").trim();
			for (var j = 0; j < entryChilds.length; j++) {
				if ((entryChilds.item(j).tagName == undefined) ||
					(entryChilds.item(j).tagName == null) ||
					(entryChilds.item(j).tagName.toLowerCase() != 'ul'))
					continue;
				entryChilds.item(j).style.display = 'none';
			}
		}
	}
	else if (element.tagName.toLowerCase() == 'li') {
		element.className = (element.className + " courant").trim();
		var entryChilds = element.childNodes;
		for (var j = 0; j < entryChilds.length; j++) {
			if ((entryChilds.item(j).tagName == undefined) ||
				(entryChilds.item(j).tagName == null) ||
				(entryChilds.item(j).tagName.toLowerCase() != 'ul'))
				continue;
			entryChilds.item(j).style.display = 'block';
			montre(entryChilds.item(j));
		}
	}
}
