function calc()
{
low=document.forms["form1"].lowValue.value
high=document.forms["form1"].highValue.value

if(high=="") 
{alert("Please enter your High Value"); document.forms["form1"].highValue.focus();return;}

if(low=="") 
{alert("Please enter your Low Value"); document.forms["form1"].lowValue.focus();return;}

if( (parseFloat(low)) > (parseFloat(high)) ) 
{alert("Please make sure your Low Value is smaller than your High Value"); document.forms["form1"].lowValue.focus();return;}
r76=parseFloat(high)-0.764*(high-low)
r61=parseFloat(high)-0.618*(high-low)
r50=parseFloat(high)-0.5*(high-low)
r38=parseFloat(high)-0.382*(high-low)
r23=parseFloat(high)-0.236*(high-low)

rf76=(Math.round(r76*10000)/10000)
rf61=(Math.round(r61*10000)/10000)
rf50=(Math.round(r50*10000)/10000)
rf38=(Math.round(r38*10000)/10000)
rf23=(Math.round(r23*10000)/10000)

document.form1.retracement76.value=rf76
document.form1.retracement61.value=rf61
document.form1.retracement50.value=rf50
document.form1.retracement38.value=rf38
document.form1.retracement23.value=rf23

}
