function CalcPivot() {
var F= document.Pivot;
var piv,res1,res2,res3,sup1,sup2,sup3;
piv= (1*F.H.value+1*F.L.value+1*F.C.value)/3;
res1= 2*piv-F.L.value;
sup1= 2*piv-F.H.value;
res2= piv+(res1-sup1);
sup2= piv-(res1-sup1);
sup3= F.L.value - 2*(F.H.value - piv);
res3= 1*F.H.value+2*piv-2*F.L.value;
F.P.value= Math.round(piv*10000)/10000;
F.R1.value= Math.round(res1*10000)/10000;
F.S1.value= Math.round(sup1*10000)/10000;
F.R2.value= Math.round(res2*10000)/10000;
F.S2.value= Math.round(sup2*10000)/10000;
F.R3.value= Math.round(res3*10000)/10000;
F.S3.value= Math.round(sup3*10000)/10000;
return;
}

function fibonacci(){
sta=parseFloat(document.fibo.val1.value);
end=parseFloat(document.fibo.val2.value);
if (isNaN(sta) || isNaN(end)) {alert("数字は半角で入力してください");}
else {
if (sta <= end) {
temp1=" 38.2% 押し： "+Math.round(((sta-end)* 38.2/100+end)

*10000)/10000;
temp2=" 50.0% 押し： "+Math.round(((sta-end)* 50.0/100+end)

*10000)/10000;
temp3=" 61.8% 押し： "+Math.round(((sta-end)* 61.8/100+end)

*10000)/10000;
} else {
temp3=" 38.2% 戻し： "+Math.round(((sta-end)* 38.2/100+end)

*10000)/10000;
temp2=" 50.0% 戻し： "+Math.round(((sta-end)* 50.0/100+end)

*10000)/10000;
temp1=" 61.8% 戻し： "+Math.round(((sta-end)* 61.8/100+end)

*10000)/10000;
}
document.fibo.retrace1.value= temp1;
document.fibo.retrace2.value= temp2;
document.fibo.retrace3.value= temp3;
}
}
