/*Javascript*/
function calc1() {
    var cc9 = jQuery("#C9").val();
    var cc11 = jQuery("#C11").val();
    var cc26 = jQuery("#C26").val();
    if(cc9>30) { cc9=30; jQuery("#C9").val("30"); }
    	if(cc9<0) { cc9=0; jQuery("#C9").val("0"); }
    if(cc11>15) { cc11=15; jQuery("#C11").val("15"); }
    	if(cc11<0) { cc11=0; jQuery("#C11").val("0"); }	
    if(cc26>80) { cc26=80; jQuery("#C26").val("80"); }
    	if(cc26<0) { cc26=0; jQuery("#C26").val("0"); }
    jQuery.post("timber.class.php", { c9:cc9, c11:cc11, c26:cc26 },
        function(data) {
            jQuery("#C7").html(data.c7+'%');
            jQuery("#F16").html("+"+data.f16+' kr/m3to');
            jQuery("#F7").html(data.d7+' kr/m3to');
            jQuery("#F24").html(data.d24+' kr/m3fub');
    }, "json");
}
function calc2() {
    var cc9 = jQuery("#C9").val();
    var cc11 = jQuery("#C11").val();
    var cc26 = jQuery("#C26").val();
    if(cc9>30) { cc9=30; jQuery("#C9").val("30"); }
    	if(cc9<0) { cc9=0; jQuery("#C9").val("0"); }
    if(cc11>15) { cc11=15; jQuery("#C11").val("15"); }
    	if(cc11<0) { cc11=0; jQuery("#C11").val("0"); }	
    if(cc26>80) { cc26=80; jQuery("#C26").val("80"); }
    	if(cc26<0) { cc26=0; jQuery("#C26").val("0"); }
    jQuery.post("timber.class.php", { c9:cc9, c11:cc11, c26:cc26 },
        function(data) {
            jQuery("#F32").html("+"+data.f32+' kr/m3fub');
            jQuery("#C24").html(data.c24+'%');
            jQuery("#F7").html(data.d7+' kr/m3to');
            jQuery("#F24").html(data.d24+' kr/m3fub');        
    }, "json");
}
