function getCheckedValue(radioObj) {
	if(!radioObj) return "";
	var out = new Array();
	var radioLength = radioObj.length;
	if(radioLength == undefined) {
		if (radioObj.checked) {
			return radioObj.value;
		}
		else {
			return "";
		}
	}
	var c = 0;
	for(var i = 0; i < radioLength; i++) {
		if(radioObj[i].checked) {
			out[c] = radioObj[i].value;
			c++;
		}
	}
	if (c) {
		return out.join(',');
	}
	return "";
}

function checkboxmenu() {
	var form = document.catmenuform['tx-ogcatmenu[category]'];
	var params = getCheckedValue(form);
	var l = window.location;
	var url = l['protocol']+'//'+l['hostname']+l['pathname'] + l['search'].replace(/[&?]tx-ogcatmenu\[category\]=[^&]*/ig, "");
	if (params) {
		//params = l['search'] ? '&tx-ogcatmenu[category]='+params : '?tx-ogcatmenu[category]='+params;
		params = '?tx-ogcatmenu[category]='+params;
	}
        document.location.href = url+params;
}

