function exp_menu(me) {
	var child = document.getElementById(me.getAttribute("child",false));
	if (child) {
		if (child.className == "collapsed") {
			me.src = "images/menu_exp.gif"
//			me.title = '<%= label_compress %>';
			child.className = "expanded";
		} else {
			me.src = "images/menu_coll.gif"
//			me.title = '<%= label_expand %>';
			child.className = "collapsed";
		}
	}
}

function exp_menu_all(expand) {
	var tb, th, tabs = document.getElementsByTagName('TABLE');
	if (tabs != null) {
    for (i=0; i < tabs.length; i++) {
			tb = tabs[i]
			if ((tb.className == 'collapsed') || (tb.className == 'expanded')) {
				th = document.getElementById('h' + tb.id)
				if (th) {
					if (expand) {
//						th.title = '<%= label_compress %>';
						th.src = 'images/menu_exp.gif';
						tb.className = 'expanded';
					} else {
//						th.title = '<%= label_expand %>';
						th.src = 'images/menu_coll.gif';
						tb.className = 'collapsed';
					}
				}
			}
		}
	}
}

function exp_cond(me) {
	var child = document.getElementById(me.getAttribute("child",false));
	if (child) {
		if (child.className == "collapsed") {
			me.src = "images/minus.gif"
//			me.title = '<%= label_compress %>';
			child.className = "expanded";
		} else {
			me.src = "images/plus.gif"
//			me.title = '<%= label_expand %>';
			child.className = "collapsed";
		}
	}
}

function exp_cond_all(expand, context_id) {
	var tb, th, tabs, context_id = document.getElementById(context_id);
	tabs = context_id.getElementsByTagName('TABLE');
	if (tabs != null) {
    for (i=0; i < tabs.length; i++) {
			tb = tabs[i]
			if ((tb.className == 'collapsed') || (tb.className == 'expanded')) {
				th = document.getElementById('h' + tb.id)
				if (th) {
					if (expand) {
//						th.title = '<%= label_compress %>';
						th.src = 'images/minus.gif';
						tb.className = 'expanded';
					} else {
//						th.title = '<%= label_expand %>';
						th.src = 'images/plus.gif';
						tb.className = 'collapsed';
					}
				}
			}
		}
	}
}
