function checkCB(comp, cnt, limit, error, cbid) {
	actCnt = 0;

	if (limit>0) {
		for (var i = 0; i < cnt; i++) {
			if (document.getElementById("id__"+comp+"_"+(i+1)) != null) {
				if (document.getElementById("id__"+comp+"_"+(i+1)).checked) {
					actCnt++;
				}
			}
		}

		if (actCnt>limit) {
			document.getElementById("id__"+comp+"_"+cbid).checked = false;
			alert(error);
		}
	}
}

function markInputByID(element_id) {
	document.getElementById(element_id).checked = !document.getElementById(element_id).checked;
}

function checkNumericInput(element, error) {
	if (isNaN(element.value)) {
		alert(error);
		element.value = '';
	}
}