function pivotcalc(form) {
high1 = form.high.value * 1;
low1 = form.low.value * 1;
close1 = form.close.value * 1;

pivot = Math.round(((high1 + low1 + close1) / 3) * Math.pow(10,4)) / 10000;
r1 = Math.round((2 * pivot - low1) * Math.pow(10,4)) / 10000;
s1 = Math.round((2 * pivot - high1) * Math.pow(10,4)) / 10000;
r2 = Math.round((pivot - s1 + r1) * Math.pow(10,4)) / 10000;
s2 = Math.round((pivot - (r1 - s1)) * Math.pow(10,4)) / 10000;
r3 = Math.round((2 * (pivot - low1) + high1) * Math.pow(10,4)) / 10000;
s3 = Math.round((low1 - (2 * (high1 - pivot))) * Math.pow(10,4)) / 10000;

form.result6.value = r3;
form.result.value = r2;
form.result2.value = r1;
form.result3.value = pivot;
form.result4.value = s1;
form.result5.value = s2;
form.result7.value = s3;
}

