// JavaScript Document
function printWindow(){
browserVersion = parseInt(navigator.appVersion)
if (browserVersion >= 4) window.print()
}

 
var a,b,c,d,e,f,g,h,j,k
function hor(ihor){
   	//  bereking horizon 
		var H4 = 0.015;
		//var inputhor = document.fruit.inputhor.value 
		var hormin = ihor * H4
		var harmin = hormin
		return hormin
		} 
function ste(ist){
		// berekening steigen
		var s4 = 0.15;
		//var inputst = document.fruit.inputst.value 
		var stmin = ist * s4 
		return stmin
		}
function dal(idal){
			// bereking dalen 
			var d6 = 0.10;
			//var inputdl = document.fruit.inputst.value 
			var dlmin = idal * d6 
			return dlmin
}

function omzet(hsss){
		// afronden
		var hss = Math.round(hsss)
		// omzetting van min naar uren:min 
		var min = 1 * hss
		//min naar uur
		var hrs = Math.floor(min/60);
  	min = min % 60;
  	if(min<10) min = "0" + min;
    tot = hrs + " : " + min ;
		return tot
		}
		
function check0(){
       	// horizontaal/steigen berekening 0
    		if (document.fruit.RadioGroup1[0].checked==true){
					 document.fruit.output[0].value = "Stijgen"
					 var inputhor = document.fruit.inputhor[0].value 
					 var inputst = document.fruit.inputst[0].value 
					 var hs = hor(inputhor)+ ste(inputst)
    			     document.fruit.eerste[0].value = hs;
					 var hsmin = omzet(hs)
    			     document.fruit.outputhm[0].value = hsmin;}
		
		
					 //horizontaal/dalen berekening 0
			if (document.fruit.RadioGroup1[1].checked==true){
					 document.fruit.output[0].value = "Dalen"
					 var inputhor = document.fruit.inputhor[0].value 
					 var inputdl = document.fruit.inputst[0].value
					 var st = hor(inputhor) + dal(inputdl)
					 document.fruit.eerste[0].value = st;
					 var hdmin = omzet(st)
					 document.fruit.outputhm[0].value = hdmin;}
					 }
function check1(){
				 // horizontaal/steigen berekening 1
    		if (document.fruit.RadioGroup2[0].checked==true){	
				     document.fruit.output[1].value = "Stijgen"
					 var inputhor = document.fruit.inputhor[1].value 
					 var inputst = document.fruit.inputst[1].value 
					 var hs = hor(inputhor)+ ste(inputst)
    			     document.fruit.eerste[1].value = hs;
					 var hsmin = omzet(hs)
    			     document.fruit.outputhm[1].value = hsmin;}
		
		
					 //horizontaal/dalen berekening 1
				if (document.fruit.RadioGroup2[1].checked==true){
					 document.fruit.output[1].value = "Dalen"
					 var inputhor = document.fruit.inputhor[1].value 
					 var inputdl = document.fruit.inputst[1].value
					 var st = hor(inputhor) + dal(inputdl)
					 document.fruit.eerste[1].value = st;
					 var hdmin = omzet(st)
					 document.fruit.outputhm[1].value = hdmin;}
					 }
function check2(){
				 // horizontaal/steigen berekening 1
    		if (document.fruit.RadioGroup3[0].checked==true){	
				     document.fruit.output[2].value = "Stijgen"
					 var inputhor = document.fruit.inputhor[2].value 
					 var inputst = document.fruit.inputst[2].value 
					 var hs = hor(inputhor)+ ste(inputst)
    			     document.fruit.eerste[2].value = hs;
					 var hsmin = omzet(hs)
    			     document.fruit.outputhm[2].value = hsmin;}
		
		
					 //horizontaal/dalen berekening 1
				if (document.fruit.RadioGroup3[1].checked==true){
					 document.fruit.output[2].value = "Dalen"
					 var inputhor = document.fruit.inputhor[2].value 
					 var inputdl = document.fruit.inputst[2].value
					 var st = hor(inputhor) + dal(inputdl)
					 document.fruit.eerste[2].value = st;
					 var hdmin = omzet(st)
					 document.fruit.outputhm[2].value = hdmin;}
					 }
function check3(){
				 // horizontaal/steigen berekening 1
    		if (document.fruit.RadioGroup4[0].checked==true){	
				     document.fruit.output[3].value = "Stijgen"
					 var inputhor = document.fruit.inputhor[3].value 
					 var inputst = document.fruit.inputst[3].value 
					 var hs = hor(inputhor)+ ste(inputst)
    			     document.fruit.eerste[3].value = hs;
					 var hsmin = omzet(hs)
    			     document.fruit.outputhm[3].value = hsmin;}
		
		
					 //horizontaal/dalen berekening 1
				if (document.fruit.RadioGroup4[1].checked==true){
					 document.fruit.output[3].value = "Dalen"
					 var inputhor = document.fruit.inputhor[3].value 
					 var inputdl = document.fruit.inputst[3].value
					 var st = hor(inputhor) + dal(inputdl)
					 document.fruit.eerste[3].value = st;
					 var hdmin = omzet(st)
					 document.fruit.outputhm[3].value = hdmin;}
					 }
function check4(){
				 // horizontaal/steigen berekening 1
    		if (document.fruit.RadioGroup5[0].checked==true){	
				     document.fruit.output[4].value = "Stijgen"
					 var inputhor = document.fruit.inputhor[4].value 
					 var inputst = document.fruit.inputst[4].value 
					 var hs = hor(inputhor)+ ste(inputst)
    			     document.fruit.eerste[4].value = hs;
					 var hsmin = omzet(hs)
    			     document.fruit.outputhm[4].value = hsmin;}
		
		
					 //horizontaal/dalen berekening 1
				if (document.fruit.RadioGroup5[1].checked==true){
					 document.fruit.output[4].value = "Dalen"
					 var inputhor = document.fruit.inputhor[4].value 
					 var inputdl = document.fruit.inputst[4].value
					 var st = hor(inputhor) + dal(inputdl)
					 document.fruit.eerste[4].value = st;
					 var hdmin = omzet(st)
					 document.fruit.outputhm[4].value = hdmin;}
					 }
function check5(){
				 // horizontaal/steigen berekening 1
    		if (document.fruit.RadioGroup6[0].checked==true){	
				     document.fruit.output[5].value = "Stijgen"
					 var inputhor = document.fruit.inputhor[5].value 
					 var inputst = document.fruit.inputst[5].value 
					 var hs = hor(inputhor)+ ste(inputst)
    			     document.fruit.eerste[5].value = hs;
					 var hsmin = omzet(hs)
    			     document.fruit.outputhm[5].value = hsmin;}
		
		
					 //horizontaal/dalen berekening 1
				if (document.fruit.RadioGroup6[1].checked==true){
					 document.fruit.output[5].value = "Dalen"
					 var inputhor = document.fruit.inputhor[5].value 
					 var inputdl = document.fruit.inputst[5].value
					 var st = hor(inputhor) + dal(inputdl)
					 document.fruit.eerste[5].value = st;
					 var hdmin = omzet(st)
					 document.fruit.outputhm[5].value = hdmin;}
					 }
function check6(){
				 // horizontaal/steigen berekening 1
    		if (document.fruit.RadioGroup7[0].checked==true){	
				     document.fruit.output[6].value = "Stijgen"
					 var inputhor = document.fruit.inputhor[6].value 
					 var inputst = document.fruit.inputst[6].value 
					 var hs = hor(inputhor)+ ste(inputst)
    			 document.fruit.eerste[6].value = hs;
					 var hsmin = omzet(hs)
    			 document.fruit.outputhm[6].value = hsmin;}
		
		
					 //horizontaal/dalen berekening 1
				if (document.fruit.RadioGroup7[1].checked==true){
					 document.fruit.output[6].value = "Dalen"
					 var inputhor = document.fruit.inputhor[6].value 
					 var inputdl = document.fruit.inputst[6].value
					 var st = hor(inputhor) + dal(inputdl)
					 document.fruit.eerste[6].value = st;
					 var hdmin = omzet(st)
					 document.fruit.outputhm[6].value = hdmin;}
					 }
function check7(){
				 // horizontaal/steigen berekening 1
    		if (document.fruit.RadioGroup8[0].checked==true){	
				     document.fruit.output[7].value = "Stijgen"
					 var inputhor = document.fruit.inputhor[7].value 
					 var inputst = document.fruit.inputst[7].value 
					 var hs = hor(inputhor)+ ste(inputst)
    			     document.fruit.eerste[7].value = hs;
					 var hsmin = omzet(hs)
    			     document.fruit.outputhm[7].value = hsmin;}
		
		
					 //horizontaal/dalen berekening 1
				if (document.fruit.RadioGroup8[1].checked==true){
					 document.fruit.output[7].value = "Dalen"
					 var inputhor = document.fruit.inputhor[7].value 
					 var inputdl = document.fruit.inputst[7].value
					 var st = hor(inputhor) + dal(inputdl)
					 document.fruit.eerste[7].value = st;
					 var hdmin = omzet(st)
					 document.fruit.outputhm[7].value = hdmin;}
					 }
function check8(){
				 // horizontaal/steigen berekening 1
    		if (document.fruit.RadioGroup9[0].checked==true){	
				     document.fruit.output[8].value = "Stijgen"
					 var inputhor = document.fruit.inputhor[8].value 
					 var inputst = document.fruit.inputst[8].value 
					 var hs = hor(inputhor)+ ste(inputst)
    			     document.fruit.eerste[8].value = hs;
					 var hsmin = omzet(hs)
    			     document.fruit.outputhm[8].value = hsmin;}
		
		
					 //horizontaal/dalen berekening 1
				if (document.fruit.RadioGroup9[1].checked==true){
					 document.fruit.output[8].value = "Dalen"
					 var inputhor = document.fruit.inputhor[8].value 
					 var inputdl = document.fruit.inputst[8].value
					 var st = hor(inputhor) + dal(inputdl)
					 document.fruit.eerste[8].value = st;
					 var hdmin = omzet(st)
					 document.fruit.outputhm[8].value = hdmin;}
					 }
function check9(){
				 // horizontaal/steigen berekening 1
    		if (document.fruit.RadioGroup10[0].checked==true){	
				     document.fruit.output[9].value = "Stijgen"
					 var inputhor = document.fruit.inputhor[9].value 
					 var inputst = document.fruit.inputst[9].value 
					 var hs = hor(inputhor)+ ste(inputst)
    			     document.fruit.eerste[9].value = hs;
					 var hsmin = omzet(hs)
    			     document.fruit.outputhm[9].value = hsmin;}
		
		
					 //horizontaal/dalen berekening 1
				if (document.fruit.RadioGroup10[1].checked==true){
					 document.fruit.output[9].value = "Dalen"
					 var inputhor = document.fruit.inputhor[9].value 
					 var inputdl = document.fruit.inputst[9].value
					 var st = hor(inputhor) + dal(inputdl)
					 document.fruit.eerste[9].value = st;
					 var hdmin = omzet(st)
					 document.fruit.outputhm[9].value = hdmin;}
					 }



function totaal(){
				 if (document.fruit.checkbox1.checked==true){
				 var a = document.fruit.eerste[0].value}
				 else{
				 		 var a=0}
						 
				 if (document.fruit.checkbox2.checked==true){
				 var b = document.fruit.eerste[1].value}
				 else{
				 		 var b=0}
						 
				 if (document.fruit.checkbox3.checked==true){
				 var c = document.fruit.eerste[2].value}
				 else{
				 		 var c=0}
						  
				 if (document.fruit.checkbox4.checked==true){
				 var d = document.fruit.eerste[3].value}
				 else{
				 		 var d=0}
				 
				 if (document.fruit.checkbox5.checked==true){
				 var e = document.fruit.eerste[4].value}
				 else{
				 		 var e=0}
				
				 if (document.fruit.checkbox6.checked==true){
				 var f = document.fruit.eerste[5].value}
				 else{
				 		 var f=0}
						 
				 if (document.fruit.checkbox7.checked==true){
				 var g = document.fruit.eerste[6].value}
				 else{
				 		 var g=0}
				 
				 if (document.fruit.checkbox8.checked==true){
				 var h = document.fruit.eerste[7].value}
				 else{
				 		 var h=0}
						 
				 if (document.fruit.checkbox9.checked==true){
				 var j = document.fruit.eerste[8].value}
				 else{
				 		 var j=0}
				 if (document.fruit.checkbox10.checked==true){
				 var k = document.fruit.eerste[9].value}
				 else{
				 		 var k=0}			 
				 
				 
				 
				 var m = 1*a + 1*b + 1*c + 1*d + 1*e + 1*f + 1*g + 1*h + 1*j + 1*k
				  document.fruit.rest.value = omzet(m)}
