

	function cal() {
	
	    
	    // variables
       
        
        //variables user can enter
        var C13= parseFloat(document.getElementById("C13").value);
        var C14= parseFloat(document.getElementById("C14").value);
        var C15= parseFloat(document.getElementById("C15").value);
       
       
       
        
        //variables that get calculated according to their formula
        var C16= parseFloat(C13) * 3.14159 * (parseFloat(C14)/60);
        
         
     
        
       var C17=  (2.7776 * Math.pow(C13, 3) + 53.049 * Math.pow(C13, 2) - 54.105 * C13 + 15.475) * C15 * C14 * C13 * 0.001745278;
        
        
        
        var C18= parseFloat(C17) * 0.85;
        
        
        
        
        //variables for unit conversions:
        var E13= parseFloat(C13) * 25.4;
        var E17= parseFloat(C17) / 2.2;
        var E18= parseFloat(E17) * 0.85;
        
        
       
       
        //assign new values to form field after calculation:
        
        //new entered values
        document.getElementById("C13").value= C13.toFixed(2);
        
        
       
        document.getElementById("C14").value= C14.toFixed(2);
        document.getElementById("C15").value= C15.toFixed(2);
        
        
        
        //calculated variables
        document.getElementById("C16").value= C16.toFixed(2);
        document.getElementById("C17").value= C17.toFixed(2);
        document.getElementById("C18").value= C18.toFixed(2);
        
        
        
        //unit conversion variables
        document.getElementById("E13").value= E13.toFixed(2);
        document.getElementById("E17").value= E17.toFixed(2);
        document.getElementById("E18").value= E18.toFixed(2);
              
        
        
	//end of function
	}


