// JavaScript Document

function cambiaselect() {
	val = document.fcalculador.tipo_biomasa[ document.fcalculador.tipo_biomasa.selectedIndex].value;
	document.getElementById('res_select').innerHTML = '<p>Grupo tarifario seg&uacute;n RD 661/07: <strong>'+val+'</strong><p>';
}

function dibujavalor() {
	val = document.fcalculador.rendimiento.value;
	val2 = document.fcalculador.potencia_instalada.value;
	potencia_instalada = parseFloat(val2);
	rendimiento = parseFloat(val);
	if (potencia_instalada > 1) {
		//window.alert(numero);//
		if (rendimiento >= 30) {
			document.getElementById('res_tarf').innerHTML = 'Aplicaci&oacute;n de tarifa a.1.3: <strong>SI</strong>';
			document.fcalculador.aplicacion.value = "si"
		} else {
			document.getElementById('res_tarf').innerHTML = 'Aplicaci&oacute;n de tarifa a.1.3: <strong>NO</strong>';
			document.fcalculador.aplicacion.value = "no"
		}
	} else {
		if (rendimiento >= 27) {
			document.getElementById('res_tarf').innerHTML = 'Aplicaci&oacute;n de tarifa a.1.3: <strong>SI</strong>';
			document.fcalculador.aplicacion.value = "si"
		} else {
			document.getElementById('res_tarf').innerHTML = 'Aplicaci&oacute;n de tarifa a.1.3: <strong>NO</strong>';
			document.fcalculador.aplicacion.value = "no"
		}
	}
}