function activateFactura(){
	var fact = document.getElementById("formFacturacion");
	var check = document.getElementById("q25_0");
	
	if (fact.style.display == "none"){
		fact.style.display="block";
		check.checked = true;
	}else{
		fact.style.display = "none";
		check.checked = false;
	}
}

function showFormInscrip(sel){
	var id = sel.options[sel.selectedIndex].value;
	window.location="index.php?secc=inscripcion&id="+id;
}

function revisaFormulario()
{
	if(!isValidNif(document.getElementById('dni').value))
		alert("El DNI no es correcto.\n\nFormato: 00000000X");
	else if(confirm('¿Están correctos los datos?'))
		document.q_form_11015815396.submit();
}

function isValidNif(abc)
{
	dni=abc.substring(0,abc.length-1);
	let=abc.charAt(abc.length-1);
	if (!isNaN(let)) {
		return false;
	}else{
		cadena = "TRWAGMYFPDXBNJZSQVHLCKET";
		posicion = dni % 23;
		letra = cadena.substring(posicion,posicion+1);
		if (letra!=let.toUpperCase()){
			return false;
		}
	}
	return true;
}
