function resetvalue() {
	document.menu_form.menu_list.value = '';
	var idx = document.URL.indexOf('?');
	var params = new Array();
	if (idx != -1) {
		var pairs = document.URL.substring(idx+1, document.URL.length).split('&');
		var param = pairs[0].split('=');
		var values = param[1].split('+');
		for(i=0;i<values.length;i++) {
			if(document.getElementById('Menu' + values[i])) {
				document.getElementById('Menu' + values[i]).style.display='block';
				document.getElementById('Item' + values[i]).style.backgroundImage='url(GUI/link_on.gif)';
			}
		}
		document.menu_form.menu_list.value = param[1];
	}
}

function displaymenu(n) {
	
	if(document.getElementById('Menu' + n)) {
		if(document.getElementById('Menu' + n).style.display!='block') {
			document.getElementById('Item' + n).style.backgroundImage='url(GUI/link_on.gif)';
			document.getElementById('Menu' + n).style.display='block';
			if(document.menu_form.menu_list.value=='') {
				document.menu_form.menu_list.value = n;
			} else {
				document.menu_form.menu_list.value += '+' + n;
			}
		} else {
			document.getElementById('Item' + n).style.backgroundImage='url(GUI/link_off.gif)';
			document.getElementById('Menu' + n).style.display='none';
			var arr = document.menu_form.menu_list.value.split('+');
			for(i=0;i<arr.length;i++) {
				if(n==arr[i]) {
					arr[i]='';
				}
			}
			arr.sort();
			document.menu_form.menu_list.value = '';
			for(i=0;i<arr.length;i++) {
				if(document.menu_form.menu_list.value=='') {
					document.menu_form.menu_list.value = arr[i];
				} else {
					document.menu_form.menu_list.value += '+' + arr[i];
				}
			}
		}
	}
}

function gopage(s) {
	location = s + '?openmenu=' + document.menu_form.menu_list.value;
}