function submitForm(frmId, frmAction) {
	var theForm = document.getElementById(frmId);
	if (theForm != null) {
		if (frmAction != null) theForm.action = frmAction;
		theForm.submit();
	}
	
	return false;
}

function submitFormTarget(frmId, frmAction, frmTarget) {
	var theForm = document.getElementById(frmId);
	if (theForm != null) {
		if (frmAction != null) theForm.action = frmAction;
		theForm.target = frmTarget;
		theForm.submit();
	}
	
	return false;
}

function submitFormOneChecked(frmId, frmAction) {
	var theForm = document.getElementById(frmId);
	if (theForm != null) {
		var elements = theForm.elements;
		var count = 0;
		for (var i = 0; i < elements.length; i++) {
			if ((elements[i].type == "checkbox" || elements[i].type == "CHECKBOX") && elements[i].checked) count++;
		}
		
		if (count == 1) {
			theForm.action = frmAction;
			theForm.submit();
		} else {
			alert("Se debe seleccionar solo 1 registro para continuar");
		}
	}
	
	return false;
}

function submitFormMinOneChecked(frmId, frmAction) {
	var theForm = document.getElementById(frmId);
	if (theForm != null) {
		var elements = theForm.elements;
		var count = 0;
		for (var i = 0; i < elements.length; i++) {
			if ((elements[i].type == "checkbox" || elements[i].type == "CHECKBOX") && elements[i].checked) count++;
		}
		
		if (count >= 1) {
			theForm.action = frmAction;
			theForm.submit();
		} else {
			alert("Se debe seleccionar al menos 1 registro para continuar");
		}
	}
	
	return false;
}