function t(en,p){
	if(p!='')
		document.getElementById("label").innerHTML="<font color='CCFF99' size='4'><b>Campings " + en + " " + p + "</font>";
	else
		document.getElementById("label").innerHTML="";
}

function calcu(pta, ptb, cant, resta, restb){
	pta.value=pta.value.replace(",",".");
	ptb.value=ptb.value.replace(",",".");
	resta.innerHTML= "<b>" + ((cant.value.valueOf()*pta.value.valueOf()).toFixed(2))+" €&nbsp;";
	totales();
}

function totales(){
	var totalDiarioTA=new Number("0");
	var totalDiarioTB=new Number("0");
	var f=document.f1;
	if(f.taadultos){
	  totalDiarioTA+=new Number((f.cantadultos.value.replace(",",".").valueOf()*f.taadultos.value.replace(",",".").valueOf()).toFixed(2).valueOf());
	}
	if(f.taninos){
	  totalDiarioTA+=new Number((f.cantninos.value.replace(",",".").valueOf()*f.taninos.value.replace(",",".").valueOf()).toFixed(2).valueOf());
	}
	if(f.taauto){
	  totalDiarioTA+=new Number((f.cantauto.value.replace(",",".").valueOf()*f.taauto.value.replace(",",".").valueOf()).toFixed(2).valueOf());
	}
	if(f.tamoto){
	  totalDiarioTA+=new Number((f.cantmoto.value.replace(",",".").valueOf()*f.tamoto.value.replace(",",".").valueOf()).toFixed(2).valueOf());
	}
	if(f.tacarav){
	  totalDiarioTA+=new Number((f.cantcarav.value.replace(",",".").valueOf()*f.tacarav.value.replace(",",".").valueOf()).toFixed(2).valueOf());
	}
	if(f.tatienda){
	  totalDiarioTA+=new Number((f.canttienda.value.replace(",",".").valueOf()*f.tatienda.value.replace(",",".").valueOf()).toFixed(2).valueOf());
	}
	if(f.taautoc){
	  totalDiarioTA+=new Number((f.cantautoc.value.replace(",",".").valueOf()*f.taautoc.value.replace(",",".").valueOf()).toFixed(2).valueOf());
	}
	if(f.taparcela){
	  totalDiarioTA+=new Number((f.cantparcela.value.replace(",",".").valueOf()*f.taparcela.value.replace(",",".").valueOf()).toFixed(2).valueOf());
	}
	if(f.taperros){
	  totalDiarioTA+=new Number((f.cantperros.value.replace(",",".").valueOf()*f.taperros.value.replace(",",".").valueOf()).toFixed(2).valueOf());
	}
	if(f.tbadultos){
	  totalDiarioTB+=new Number((f.cantadultos.value.replace(",",".").valueOf()*f.tbadultos.value.replace(",",".").valueOf()).toFixed(2).valueOf());
	}
	if(f.tbninos){
	  totalDiarioTB+=new Number((f.cantninos.value.replace(",",".").valueOf()*f.tbninos.value.replace(",",".").valueOf()).toFixed(2).valueOf());
	}
	if(f.tbauto){
	  totalDiarioTB+=new Number((f.cantauto.value.replace(",",".").valueOf()*f.tbauto.value.replace(",",".").valueOf()).toFixed(2).valueOf());
	}
	if(f.tbmoto){
	  totalDiarioTB+=new Number((f.cantmoto.value.replace(",",".").valueOf()*f.tbmoto.value.replace(",",".").valueOf()).toFixed(2).valueOf());
	}
	if(f.tbcarav){
	  totalDiarioTB+=new Number((f.cantcarav.value.replace(",",".").valueOf()*f.tbcarav.value.replace(",",".").valueOf()).toFixed(2).valueOf());
	}
	if(f.tbtienda){
	  totalDiarioTB+=new Number((f.canttienda.value.replace(",",".").valueOf()*f.tbtienda.value.replace(",",".").valueOf()).toFixed(2).valueOf());
	}
	if(f.tbautoc){
	  totalDiarioTB+=new Number((f.cantautoc.value.replace(",",".").valueOf()*f.tbautoc.value.replace(",",".").valueOf()).toFixed(2).valueOf());
	}
	if(f.tbparcela){
	  totalDiarioTB+=new Number((f.cantparcela.value.replace(",",".").valueOf()*f.tbparcela.value.replace(",",".").valueOf()).toFixed(2).valueOf());
	}
	if(f.tbperros){
	  totalDiarioTB+=new Number((f.cantperros.value.replace(",",".").valueOf()*f.tbperros.value.replace(",",".").valueOf()).toFixed(2).valueOf());
	}
	if(f.electricidad){
	  if(document.f1.electricidad.checked){
	    totalDiarioTB+=new Number((f.tbelec.value.replace(",",".").valueOf()*1).toFixed(2).valueOf());
	    totalDiarioTA+=new Number((f.taelec.value.replace(",",".").valueOf()*1).toFixed(2).valueOf());
	    document.getElementById("taelectd").innerHTML="<b>" + new Number(document.f1.taelec.value.replace(",",".").valueOf()).toFixed(2) + " €&nbsp;";
	
	  }else{
	    document.getElementById("taelectd").innerHTML="<b>0.00 €&nbsp;";
	  }
	}
	document.getElementById("tatotaldiario").innerHTML="<b>" + totalDiarioTA.toFixed(2) + " €&nbsp;";
	
	document.getElementById("tatotal").innerHTML="<font color=blue size=2><b>" + new Number((f.cantdias.value.replace(",",".").valueOf()*totalDiarioTA.valueOf()).toFixed(2).valueOf()).toFixed(2) + " €&nbsp;";
	
	document.getElementById("taparcelas").innerHTML="<b>" + new Number(f.taparcela.value.replace(",",".").valueOf()).toFixed(2) + " €&nbsp;";
	
}

function selElect(){
totales();
}